Re: [osg-users] osg::Geometry and GL_PRIMITVE_RESTART

2011-08-09 Thread Peter Wrobel
Hi Sergey, thank you, now its working perfectly cheers, ParticlePeter Hi, Peter This is because osg tries to compute bound of drawable based on vertices it uses. So if your restart index behind memory allocated for vertices storage osg will go out of array bound when computing bounds of

Re: [osg-users] osg::Geometry and GL_PRIMITVE_RESTART

2011-08-08 Thread Sergey Polischuk
Hi, Peter This is because osg tries to compute bound of drawable based on vertices it uses. So if your restart index behind memory allocated for vertices storage osg will go out of array bound when computing bounds of drawable, thats where your access violation comes from. You can try to avoid

Re: [osg-users] osg::Geometry and GL_PRIMITVE_RESTART

2011-08-06 Thread Peter Wrobel
Hi Sergey, unfortunatelly I did not manage to make your code run. I am getting this Link Errors: error LNK2001: unresolved external symbol __imp__glEnableClientState@4 error LNK2001: unresolved external symbol __imp__glDisableClientState@4 Find my includes bellow, according to me, it should

Re: [osg-users] osg::Geometry and GL_PRIMITVE_RESTART

2011-08-06 Thread Jean-Sébastien Guay
Hi Peter, unfortunatelly I did not manage to make your code run. I am getting this Link Errors: error LNK2001: unresolved external symbol __imp__glEnableClientState@4 error LNK2001: unresolved external symbol __imp__glDisableClientState@4 Find my includes bellow, according to me, it should

Re: [osg-users] osg::Geometry and GL_PRIMITVE_RESTART

2011-08-06 Thread Peter Wrobel
Hi J-S, Yes, thank you, that did the trick, now it works. And to answer my question above, it has to be glEnableClientState, otherwise its not working. I have one more issue now. Sergey, I am getting a Access Violation Exception directly after calling viewer.run inside osg::Vec3f line 84, if I

Re: [osg-users] osg::Geometry and GL_PRIMITVE_RESTART

2011-08-05 Thread Sergey Polischuk
Hi all There are no direct support in osg for primitive restart extension. I've tried using it in osg in custom drawable, but i've found that it was about 3x times slower than either display lists with short tristrips or vbos with indexed triangle list on my hardware (295 gtx) so there isn't

Re: [osg-users] osg::Geometry and GL_PRIMITVE_RESTART

2011-08-05 Thread Peter Wrobel
Hi, Would it be possible for you to share you're implementation ? For me it is still not clear how to extend osg ( as you see on my question above ). I found this thread: http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg46962.html Sergey ( @hybr, is this you ? ) has created a

Re: [osg-users] osg::Geometry and GL_PRIMITVE_RESTART

2011-08-05 Thread Sergey Polischuk
example of drawElementsUShort with primitive restart class DrawElementsUShortRestart: public osg::DrawElementsUShort { public: DrawElementsUShortRestart(const osg::DrawElementsUShort); DrawElementsUShortRestart(GLenum mode=GL_TRIANGLE_STRIP): osg::DrawElementsUShort(mode),

Re: [osg-users] osg::Geometry and GL_PRIMITVE_RESTART

2011-08-05 Thread Peter Wrobel
Hi Sergey, thank you for your code, I will study it. :-) Thank you! Cheers, ParticlePeter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41893#41893 ___ osg-users mailing list

Re: [osg-users] osg::Geometry and GL_PRIMITVE_RESTART

2011-08-04 Thread Aurelien Albert
Hi, I'm facing the same problem : I try to use Code: glPrimitiveRestartIndex(0x); glEnableClientState(GL_PRIMITIVE_RESTART); In my OSG 3.0 project. Is there any way to use these functions without a big hack of osg ? Thank you! Cheers, Aurelien -- Read this

Re: [osg-users] osg::Geometry and GL_PRIMITVE_RESTART

2011-03-31 Thread Peter Wrobrl
Hi, I found this sceniX forum post http://developer.nvidia.com/forums/index.php?showtopic=5357pid=16495mode=threadedstart= and wonder if this is akin to the osg approach. If so, how can osg be extended in the right way so that currently not supported GL3 features are accessible ? Thank you!

Re: [osg-users] osg::Geometry and GL_PRIMITVE_RESTART

2011-03-31 Thread Sergey Polischuk
Hi, Peter There are some similarities with osg in that regard, osg caches current state to avoid redundant state changes and if you make gl calls yourself you should tell osg state that you changed something, look into osg::State docs about that. Most gl changes in osg done through statesets

Re: [osg-users] osg::Geometry and GL_PRIMITVE_RESTART

2011-03-31 Thread Peter Wrobrl
Thank you very much, that helps a lot in understanding. So I assume there is no example for this one ... Anyway, many thanks. Cheers, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38121#38121

[osg-users] osg::Geometry and GL_PRIMITVE_RESTART

2011-03-28 Thread Peter Wrobrl
Hi, Topics like GL Funktions in osg have been discussed in other posts, but still not getting the essence. I wonder which steps are required to make e.g. GL_PRIMITIVE_RESTART work within osg ? Could you point me to an example, more elaborated than osgTeapot ? Thank you! Cheers, Peter