[osg-users] Transform Feedback

2010-06-21 Thread Ethan Kerzner
Hi, I am interested in using a geometry shader to do calculations on the GPU but instead of drawing the result, it should be piped back into a vertex buffer. A high level description of the process is: 1. Load scene and shaders to be used for transform feedback. (I do not know if I would

Re: [osg-users] Transform Feedback

2010-06-29 Thread Ethan Kerzner
Hi, I guess my first question was too vague. Sorry about that. I am still trying to use transform feedback on an entire scene inside osg. I have created a CustomDrawable class with a drawImplementation that can perform transform feedback on anything drawn inside it. I am now trying to draw

Re: [osg-users] Transform Feedback

2010-06-30 Thread Ethan Kerzner
Hi Paul, Thanks for your reply. I have decided to try using draw callbacks, and the osg encapsulation of shader programs. However, I have another question. How can we access the OpenGL pointer to an osg::program containing shaders? We need this pointer to set up transform feedback. I

[osg-users] Accessing StateSets

2011-04-12 Thread Ethan Kerzner
Hi, I am trying to access the material stored in a stateset. Is this possible? My approach is below- the first line returns a null pointer. Code: osg::StateAttribute* sa = myGeode.getOrCreateStateSet()-getAttribute(osg::StateAttribute::MATERIAL); osg::Material* mat =