OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Geometry useVertexArrayObject

Goto page Previous  1, 2
 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Submission
View previous topic :: View next topic  
Author Message
Mathieu (Mathieu MARACHE)
Appreciator


Joined: 29 Oct 2009
Posts: 102

PostPosted: Fri Jul 08, 2016 2:16 pm    Post subject:
Geometry useVertexArrayObject
Reply with quote

Sure, sound promising, have a great evening

On Fri, Jul 8, 2016 at 3:33 PM Robert Osfield < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:

Quote:
On 8 July 2016 at 13:49, Mathieu MARACHE < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Great news Wink

Was hoping to finish it today, but have a birthday family walk and
dinner planned for the rest of today so heading off line.

I have a prototype of VAO functionality kinda working.  Performance is
on big city models better than without VAO but still not as good as
with display lists...

I'm currently refactoring the internals of how vertex data is passed
to try and avoid some of the CPU overhead.  I expected there is couple
more days work getting it all working smoothly.

Robert.
_______________________________________________
osg-submissions mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
mp3butcher (Julien Valentin)
Appreciator


Joined: 17 Feb 2010
Posts: 294

PostPosted: Sun Jul 10, 2016 12:51 am    Post subject:
Re: Geometry useVertexArrayObject
Reply with quote

Hi all
Ok I know what's wrong with my impl:
I've discovered a Huge bug linked to glvertexAttribPointer defined via ArrayDispatcher and so on with indices not offseted in primset sharing the vbo...Big mess:/
Will try to find out in the same time Robert work on it
Edit:My first guess would be to add some call to glXPointer(via arraydispatcher) in the VAO use scope but I don't know if repeated changes of its definition during its use could have a silly perf impact.
-In my previous engine I haven't this problem cause I massively used gl(Multi)DrawElementsBaseVertex I will think if it can fit for osg-

Have a Good Sunday

robertosfield wrote:
On 8 July 2016 at 13:49, Mathieu MARACHE <> wrote:
Quote:
Great news Wink

Was hoping to finish it today, but have a birthday family walk and
dinner planned for the rest of today so heading off line.

I have a prototype of VAO functionality kinda working. Performance is
on big city models better than without VAO but still not as good as
with display lists...

I'm currently refactoring the internals of how vertex data is passed
to try and avoid some of the CPU overhead. I expected there is couple
more days work getting it all working smoothly.

Robert.


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
mp3butcher (Julien Valentin)
Appreciator


Joined: 17 Feb 2010
Posts: 294

PostPosted: Sun Jul 10, 2016 11:48 am    Post subject:
Re: Geometry useVertexArrayObject
Reply with quote

Hi Robert
Heres my first step toward glDrawXvertexbase/VAO coupling
What's you feeling about it?
(It's dirty..i've done that very quickly)

mp3butcher wrote:
Hi all
Ok I know what's wrong with my impl:
I've discovered a Huge bug linked to glvertexAttribPointer defined via ArrayDispatcher and so on with indices not offseted in primset sharing the vbo...Big mess:/
Will try to find out in the same time Robert work on it
Edit:My first guess would be to add some call to glXPointer(via arraydispatcher) in the VAO use scope but I don't know if repeated changes of its definition during its use could have a silly perf impact.
-In my previous engine I haven't this problem cause I massively used gl(Multi)DrawElementsBaseVertex I will think if it can fit for osg-

Have a Good Sunday

robertosfield wrote:
On 8 July 2016 at 13:49, Mathieu MARACHE <> wrote:
Quote:
Great news Wink

Was hoping to finish it today, but have a birthday family walk and
dinner planned for the rest of today so heading off line.

I have a prototype of VAO functionality kinda working. Performance is
on big city models better than without VAO but still not as good as
with display lists...

I'm currently refactoring the internals of how vertex data is passed
to try and avoid some of the CPU overhead. I expected there is couple
more days work getting it all working smoothly.

Robert.


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 10982

PostPosted: Sun Jul 10, 2016 12:14 pm    Post subject:
Geometry useVertexArrayObject
Reply with quote

Hi Julien,

I'm currently working on new vertex array dispatch scheme which
directly integrates VAO support when available. I'm using the goal of
adding VAO support as an opportunity to refactor how other aspects of
vertex arrays are dispatched to OpenGL. I'm still trying figure out
the design/implementation details of this approach and have enough
going on in my head that I'm not about to start reviewing other codes
that do roughly the same thing but in a different way, doing such a
review will just distract the focus I need.

Please be patient, this type of refactor work is something that I've
honed over the years, I'm good at it, what I come up with should sort
out various loose ends in a coherent design and implementation, but
this type of work can't be rushed.

Robert.

On 10 July 2016 at 12:48, Julien Valentin <> wrote:
Quote:
Hi Robert
Heres my first step toward glDrawXvertexbase/VAO coupling
What's you feeling about it?
(It's dirty..i've done that very quickly)


mp3butcher wrote:
Quote:
Hi all
Ok I know what's wrong with my impl:
I've discovered a Huge bug linked to glvertexAttribPointer defined via ArrayDispatcher and so on with indices not offseted in primset sharing the vbo...Big mess:/
Will try to find out in the same time Robert work on it
Edit:My first guess would be to add some call to glXPointer(via arraydispatcher) in the VAO use scope but I don't know if repeated changes of its definition during its use could have a silly perf impact.
-In my previous engine I haven't this problem cause I massively used gl(Multi)DrawElementsBaseVertex I will think if it can fit for osg-

Have a Good Sunday


robertosfield wrote:
Quote:
On 8 July 2016 at 13:49, Mathieu MARACHE <> wrote:

Quote:
Great news ;-)


Was hoping to finish it today, but have a birthday family walk and
dinner planned for the rest of today so heading off line.

I have a prototype of VAO functionality kinda working. Performance is
on big city models better than without VAO but still not as good as
with display lists...

I'm currently refactoring the internals of how vertex data is passed
to try and avoid some of the CPU overhead. I expected there is couple
more days work getting it all working smoothly.

Robert.
_______________________________________________
osg-submissions mailing list

http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

------------------
Post generated by Mail2Forum



------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=68087#68087








------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
mp3butcher (Julien Valentin)
Appreciator


Joined: 17 Feb 2010
Posts: 294

PostPosted: Sun Jul 10, 2016 2:52 pm    Post subject:
Re: Geometry useVertexArrayObject
Reply with quote

Sorry
That was just to know if you come up with the same design:
*Array dispatchers should allow glXPointer to 0 offset if vao
*Buffers should be share between geometry in a automatic way (a BufferObjectManager used in bufferedDatas's getOrCreateBufferObject based on Geometry drawmode)
*Primitive set should implement 2 drawmethods draw and drawVAO (or new parameter in draw method)
*drawVAO should use glDrawXbasevertex when it could...
( it breaks the current glMultiDrawElements as glMultiDrawElementsBaseVertex need GLint[] and not GLint as basevertex parameter)



robertosfield wrote:
Hi Julien,

I'm currently working on new vertex array dispatch scheme which
directly integrates VAO support when available. I'm using the goal of
adding VAO support as an opportunity to refactor how other aspects of
vertex arrays are dispatched to OpenGL. I'm still trying figure out
the design/implementation details of this approach and have enough
going on in my head that I'm not about to start reviewing other codes
that do roughly the same thing but in a different way, doing such a
review will just distract the focus I need.

Please be patient, this type of refactor work is something that I've
honed over the years, I'm good at it, what I come up with should sort
out various loose ends in a coherent design and implementation, but
this type of work can't be rushed.

Robert.

On 10 July 2016 at 12:48, Julien Valentin <> wrote:
Quote:
Hi Robert
Heres my first step toward glDrawXvertexbase/VAO coupling
What's you feeling about it?
(It's dirty..i've done that very quickly)


mp3butcher wrote:
Quote:
Hi all
Ok I know what's wrong with my impl:
I've discovered a Huge bug linked to glvertexAttribPointer defined via ArrayDispatcher and so on with indices not offseted in primset sharing the vbo...Big mess:/
Will try to find out in the same time Robert work on it
Edit:My first guess would be to add some call to glXPointer(via arraydispatcher) in the VAO use scope but I don't know if repeated changes of its definition during its use could have a silly perf impact.
-In my previous engine I haven't this problem cause I massively used gl(Multi)DrawElementsBaseVertex I will think if it can fit for osg-

Have a Good Sunday


robertosfield wrote:
Quote:
On 8 July 2016 at 13:49, Mathieu MARACHE <> wrote:

Quote:
Great news Wink


Was hoping to finish it today, but have a birthday family walk and
dinner planned for the rest of today so heading off line.

I have a prototype of VAO functionality kinda working. Performance is
on big city models better than without VAO but still not as good as
with display lists...

I'm currently refactoring the internals of how vertex data is passed
to try and avoid some of the CPU overhead. I expected there is couple
more days work getting it all working smoothly.

Robert.
_______________________________________________
osg-submissions mailing list

http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

------------------
Post generated by Mail2Forum



------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=68087#68087








------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 10982

PostPosted: Sun Jul 10, 2016 4:51 pm    Post subject:
Geometry useVertexArrayObject
Reply with quote

Hi Julien,

At this stage of my work it's not appropriate to discuss it or any
other alternative implementations - I have to concentrate on what I'm
currently thinking about, not other side avenues.

You just have to trust me and be patient.

Robert.

On 10 July 2016 at 15:53, Julien Valentin <> wrote:
Quote:
Sorry
That was just to know if you come up with the same design:
*Array dispatchers should allow glXPointer to 0 offset if vao
*Buffers should be share between geometry in a automatic way (a BufferObjectManager used in bufferedDatas's getOrCreateBufferObject based on Geometry drawmode)
*Primitive set should implement 2 drawmethods draw and drawVAO (or new parameter in draw method)
*drawVAO should use glDrawXbasevertex when it could...
( it breaks the current glMultiDrawElements as glMultiDrawElementsBaseInstance need GLint[] and not GLint as basevertex parameter)




robertosfield wrote:
Quote:
Hi Julien,

I'm currently working on new vertex array dispatch scheme which
directly integrates VAO support when available. I'm using the goal of
adding VAO support as an opportunity to refactor how other aspects of
vertex arrays are dispatched to OpenGL. I'm still trying figure out
the design/implementation details of this approach and have enough
going on in my head that I'm not about to start reviewing other codes
that do roughly the same thing but in a different way, doing such a
review will just distract the focus I need.

Please be patient, this type of refactor work is something that I've
honed over the years, I'm good at it, what I come up with should sort
out various loose ends in a coherent design and implementation, but
this type of work can't be rushed.

Robert.

On 10 July 2016 at 12:48, Julien Valentin <> wrote:

Quote:
Hi Robert
Heres my first step toward glDrawXvertexbase/VAO coupling
What's you feeling about it?
(It's dirty..i've done that very quickly)


mp3butcher wrote:

Quote:
Hi all
Ok I know what's wrong with my impl:
I've discovered a Huge bug linked to glvertexAttribPointer defined via ArrayDispatcher and so on with indices not offseted in primset sharing the vbo...Big mess:/
Will try to find out in the same time Robert work on it
Edit:My first guess would be to add some call to glXPointer(via arraydispatcher) in the VAO use scope but I don't know if repeated changes of its definition during its use could have a silly perf impact.
-In my previous engine I haven't this problem cause I massively used gl(Multi)DrawElementsBaseVertex I will think if it can fit for osg-

Have a Good Sunday


robertosfield wrote:

Quote:
On 8 July 2016 at 13:49, Mathieu MARACHE <> wrote:


Quote:
Great news ;-)



Was hoping to finish it today, but have a birthday family walk and
dinner planned for the rest of today so heading off line.

I have a prototype of VAO functionality kinda working. Performance is
on big city models better than without VAO but still not as good as
with display lists...

I'm currently refactoring the internals of how vertex data is passed
to try and avoid some of the CPU overhead. I expected there is couple
more days work getting it all working smoothly.

Robert.
_______________________________________________
osg-submissions mailing list

http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

------------------
Post generated by Mail2Forum





------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=68087#68087




_______________________________________________
osg-submissions mailing list

http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org


_______________________________________________
osg-submissions mailing list

http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

------------------
Post generated by Mail2Forum


------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=68089#68089








------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
mp3butcher (Julien Valentin)
Appreciator


Joined: 17 Feb 2010
Posts: 294

PostPosted: Sun Aug 14, 2016 3:28 pm    Post subject:
Re: Geometry useVertexArrayObject
Reply with quote

Hello,
I've just look at the VAO branch, I have not tested -not enough HD space:/ so I can't give a full feedback
I can only compare with my own impl with this reduced perspective, I don't understand all so don't be regardant if i misunderstood the code:
-I like the idea of deporting vao in state..It seams a good place for them for state sorting.
-But I haven't spot the way you intend to share VAO among Geometries:
*you don't seam to use a singleton for bo affectation to geoms (so you're assuming user is in charge of sharing bo correctly among geoms?)
*it seams you haven't changed primset so I'm asking myself how could you manage basevertex when geoms arrays share same bos

In my impl, I use a singleton to manage bo sets involved in vaos, it concatenate bufferdata in these bo and so bos and vao are shared among geometries
Further I also use drawElementBaseVertex to draw them in order to take into account offset induced by concatenation of bds in bo
I did a test in debug build (on a GTX440) with a triangle indexed city and default useVBO
it originally frames at 40FPS
+adding bo sharing among geometries : 55FPS
+adding useVAO 70FPS(The Draw charge drops from 12 to 6 even if i unbind vao after each geom draw)

https://github.com/mp3butcher/OpenSceneGraph

Again, these are just observations of gl features that accelerate drawing and that i would be glad to find in osg and not guidelines on what/how to achieve their impl.

I'll give you further feedback when i'll have actually test the branch

robertosfield wrote:
On 8 July 2016 at 13:49, Mathieu MARACHE <> wrote:
Quote:
Great news Wink

Was hoping to finish it today, but have a birthday family walk and
dinner planned for the rest of today so heading off line.

I have a prototype of VAO functionality kinda working. Performance is
on big city models better than without VAO but still not as good as
with display lists...

I'm currently refactoring the internals of how vertex data is passed
to try and avoid some of the CPU overhead. I expected there is couple
more days work getting it all working smoothly.

Robert.


------------------
Post generated by Mail2Forum


Last edited by mp3butcher (Julien Valentin) on Fri Aug 26, 2016 10:08 pm; edited 1 time in total
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 10982

PostPosted: Sun Aug 14, 2016 4:40 pm    Post subject:
Geometry useVertexArrayObject
Reply with quote

Hi Julien,

A general discussion of vertex array object would be best done on
osg-users forum/mailing list as lots of other would likely be
interested in the discussion and have their own perspective. So
rather than reply here on an osg-submissions thread I'll answer
questions over on an osg-users thread. Feel free to kick one off. My
implementation is getting pretty close to be ready to call for wider
testing.

Robert.

On 14 August 2016 at 16:28, Julien Valentin <> wrote:
Quote:
Hello,
I've just look at the VAO branch, I have not tested -not enough HD space:/ so I can't give a full feedback
I can only compare with my own impl with this reduced perspective, I don't understand all so don't be regardant if i misunderstood the code:
-I like the idea of deporting vao in state..It seams a good place for them for state sorting.
-But I haven't spot the way you intend to share VAO among Geometries:
*you don't seam to use a singleton for bo affectation to geoms (so you're assuming user is in charge of sharing bo correctly among geoms?)
*it seams you haven't changed primset so I'm asking myself how could you manage basevertex when geoms arrays share same bos

In my impl, I use a singleton to manage bo sets involved in vaos, it concatenate bufferdata in these bo and so bos and vao are shared among geometries
Further I also use drawElementBaseVertex to draw them in order to take into account offset induced by concatenation of bds in bo
I did a test in debug build (on a GTX640) with a triangle indexed city and default useVBO
it originally frames at 40FPS
+adding bo sharing among geometries : 55FPS
+adding useVAO 70FPS(The Draw charge drops from 12 to 6 even if i unbind vao after each geom draw)

https://raw.githubusercontent.com/mp3butcher/OpenSceneGraph

Again, these are just observations of gl features that accelerate drawing and that i would be glad to find in osg and not guidelines on what/how to achieve their impl.

I'll give you further feedback when i'll have actually test the branch


robertosfield wrote:
Quote:
On 8 July 2016 at 13:49, Mathieu MARACHE <> wrote:

Quote:
Great news ;-)


Was hoping to finish it today, but have a birthday family walk and
dinner planned for the rest of today so heading off line.

I have a prototype of VAO functionality kinda working. Performance is
on big city models better than without VAO but still not as good as
with display lists...

I'm currently refactoring the internals of how vertex data is passed
to try and avoid some of the CPU overhead. I expected there is couple
more days work getting it all working smoothly.

Robert.
_______________________________________________
osg-submissions mailing list

http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

------------------
Post generated by Mail2Forum


------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=68365#68365








------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Submission All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts ViewerBase::frame() method slow after... gambr General 7 Fri Jul 21, 2017 9:11 am View latest post
No new posts osgUtil::IntersectionVisitor slow wit... gambr General 4 Tue Jul 18, 2017 10:17 am View latest post
No new posts draw primitive sets and geometry shad... wernerM General 0 Wed May 24, 2017 3:20 pm View latest post
No new posts Using Geometry with packed vertex arrays ravidavi General 2 Sat Mar 25, 2017 4:39 am View latest post
No new posts Jittering/Flickering geometry problem umesh General 3 Tue Feb 14, 2017 10:53 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP