On 02/29/2012 09:22 AM, "Martin Großer" wrote:
Hello,
I tried this in my camera draw callback:
virtual void operator()(const osg::Camera& camera) const
{
// GL-Context-ID
GLuint gcID = _gc->getState()->getContextID();
// GL-Program-Handle
osg::Program::PerContextProgram* pcp = _program->getPCP(gcID);
GLuint prID=pcp->getHandle();
const char* varyings[1] = { "vPosition" };
glTransformFeedbackVaryings(prID, 1, varyings, GL_SEPARATE_ATTRIBS);
}
But when I want to compile this, I get the error "glTransformFeedbackVaryings isn't
defined". I searched in my includes and it is in the glext.h and glew.h defined.
What is wrong?
On Linux, you might need to #define GL_GLEXT_PROTOTYPES
On Windows, you have to look up the function with wglGetProcAddress
In both cases, it's generally a good idea to test for the extension
first (OSG normally does for you in osg::GLExtensions).
--"J"
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org