Re: [osg-users] Custom Drawable Error checking

2014-07-16 Thread Robert Osfield
Hi Sebastian, On 15 July 2014 22:04, Sebastian Messerschmidt sebastian.messerschm...@gmx.de wrote: The options seem to be limited here. Would you mind submitting some functionality to retrieve the error in the user-space and reporting them as needed? I'm thinking about some checkError

Re: [osg-users] Custom Drawable Error checking

2014-07-16 Thread Sebastian Messerschmidt
Hi Robert Hi Sebastian, On 15 July 2014 22:04, Sebastian Messerschmidt sebastian.messerschm...@gmx.de mailto:sebastian.messerschm...@gmx.de wrote: The options seem to be limited here. Would you mind submitting some functionality to retrieve the error in the user-space and

[osg-users] Custom Drawable Error checking

2014-07-15 Thread Sebastian Messerschmidt
Hi, I've got some custom drawable which fires some 3rd-party library. Unfortunately it is producing some OpenGL errors which are collected later on by OSG. Basically I do want to collect those errors on my own without displaying it (right now it is spamming the console) so to say skip them.

Re: [osg-users] Custom Drawable Error checking

2014-07-15 Thread Robert Osfield
Hi Sebastian, There isn't a glush GL errors function in the OSG. Calling glGetError in your custom Drawable would do the trick as would calling state.checkGLErrors(message); Although this would report the errors to OSG_WARN. Robert. On 15 July 2014 13:35, Sebastian Messerschmidt

Re: [osg-users] Custom Drawable Error checking

2014-07-15 Thread Sebastian Messerschmidt
Hi Robert, The options seem to be limited here. Would you mind submitting some functionality to retrieve the error in the user-space and reporting them as needed? I'm thinking about some checkError which returns the error(s). cheers Sebastian Hi Sebastian, There isn't a glush GL errors

Re: [osg-users] Custom Drawable GLSL

2012-09-05 Thread Jeremy Moles
On Tue, 2012-09-04 at 19:21 +0100, Robert Osfield wrote: Hi Jeremy, It should be possible to do a drawImplementation(..) { state.apply(stateSetOne); // do stuff state.apply(stateSetTwo); // do more stuff } I've settled on: drawImplementation() {

[osg-users] Custom Drawable GLSL

2012-09-04 Thread Jeremy Moles
I am creating a custom Drawable that needs to push a Fragment Shader into the current rendering state and then, after a single extension call, subsequently remove this shader from the state. I have some code I noodled through to make this work, but I feel like there is probably a better way. It

Re: [osg-users] Custom Drawable GLSL

2012-09-04 Thread Paul Martz
Doesn't a Drawable's state get applied prior to the call to Drawable::drawImplementation()? If so, you could just put the _program in your Drawable's StateSet? It's easy to verify that things are happening in the right order using a debugger with breakpoints set at your drawImplementation()

Re: [osg-users] Custom Drawable GLSL

2012-09-04 Thread Jeremy Moles
On Tue, 2012-09-04 at 11:05 -0600, Paul Martz wrote: Doesn't a Drawable's state get applied prior to the call to Drawable::drawImplementation()? If so, you could just put the _program in your Drawable's StateSet? I'm working on a nodekit for NV_path_rendering, which takes an as of yet

Re: [osg-users] Custom Drawable GLSL

2012-09-04 Thread Robert Osfield
Hi Jeremy, It should be possible to do a drawImplementation(..) { state.apply(stateSetOne); // do stuff state.apply(stateSetTwo); // do more stuff } I'm not 100% sure what will happen with the progress of draw traversal w.r.t how the drawable StateSet if any is applied and then later

Re: [osg-users] Custom Drawable GLSL

2012-09-04 Thread Jean-Sébastien Guay
Hi Jeremy, In the past I've done similar low-level 2-pass rendering in a Drawable, by doing as Robert suggests. Apply one stateset, draw, apply another, draw again (same or different geometry). A Program is just state, so you need to draw something in between setting different Programs.

Re: [osg-users] Custom Drawable GLSL

2012-09-04 Thread Jeremy Moles
On Tue, 2012-09-04 at 19:15 -0400, Jean-Sébastien Guay wrote: Hi Jeremy, In the past I've done similar low-level 2-pass rendering in a Drawable, by doing as Robert suggests. Apply one stateset, draw, apply another, draw again (same or different geometry). A Program is just state, so you

[osg-users] custom drawable

2008-04-14 Thread erf
i have some custom classes which inherits from osg::Drawable, and is inserted into an osg::Geode but nothing renders. I have implemented the drawImplementation(osg::RenderInfo renderInfo) method to do some custom OpenGL rendering calls. I found that useDisplayList is initially true which