Re: [osg-users] vertex arrays in a custom drawable

2010-03-15 Thread Otto Cologne
Hi, ok this is definitely strange. This is what my draw implementation looks like now: Code: osg::State state = *renderInfo.getState(); state.setVertexPointer( 3, GL_FLOAT ,0, (*verts)[0] ); state.setColorPointer( 3 , GL_FLOAT ,0 , (*colors)[0] ); for ( size_t i = 0; i

Re: [osg-users] vertex arrays in a custom drawable

2010-03-15 Thread Ralph Kern
Hi Otto, do you also _disable_ all other pointers which might be set? If for example texture pointer is set from other drawables, it surely will crash when you overflow the current texture pointers size. OpenGL state can be a beast... regards Ralph Am 15.03.2010 16:12, schrieb Otto Cologne:

Re: [osg-users] vertex arrays in a custom drawable

2010-03-15 Thread Otto Cologne
Hi, YES Finally that seems to fix it. A state.disableAllVertexArrays(); before my pointer inits did the trick. Thank you! Cheers, Otto -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=25683#25683

Re: [osg-users] vertex arrays in a custom drawable

2010-03-13 Thread Otto Cologne
Hi, ok no answers for a while so I guess i need to explain my problem a bit more. The task is to render a selected set of lines out of a bigger dataset (http://sites.google.com/site/schurade/pic14.png). The test data I'm usually working with is about 70k lines with approx. 5M points but can

Re: [osg-users] vertex arrays in a custom drawable

2010-03-13 Thread Robert Osfield
Hi Otto, The OSG uses lazy state updating to prevent unnecessary calls being made to OpenGL, however, it does mean that if you change OpenGL state yourself without telling the OSG about it then it can get out of sync and cause problems. I would recommend using the osg::State methods for setting

Re: [osg-users] vertex arrays in a custom drawable

2010-03-13 Thread Otto Cologne
Well that's what I suspected. My problem is more the how than the if. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=25613#25613 ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] vertex arrays in a custom drawable

2010-03-09 Thread Otto Cologne
Hi, i'm trying to use vertex arrays in my own drawable. For some reason it crashes in the glDrawArrays call. The draw implementation is some code that works in another program of mine which uses pure opengl. Code: glEnableClientState( GL_VERTEX_ARRAY ); glEnableClientState(