nullreference glBindFramebufferEXT C#

397 views Asked by At

I'm trying to render to a texture using Tao.OpenGl. I get a mysterious NullReference on the following line:

    Gl.glGenFramebuffersEXT(1, out targetFrameBuffer);   <---NullReference
    Gl.glBindFramebufferEXT(Gl.GL_FRAMEBUFFER_EXT, targetFrameBuffer);

and also on the second line if i do this:

    //Gl.glGenFramebuffersEXT(1, out targetFrameBuffer);   
    Gl.glBindFramebufferEXT(Gl.GL_FRAMEBUFFER_EXT, targetFrameBuffer);   <---NullReference

The obvious candidate is 'targetFrameBuffer', but the debugger reports that 'targetFrameBuffer' is not NULL, and i've also used dummy values to be sure...

Anyone of you know what could be the problem?

EDIT: After changing to OpenTK instead of Tao, it still complains on the same lines, although now it says "Unable to find an entry point named 'glGenFramebuffers' in DLL 'opengl32.dll'." instead. Perhaps my opengl32.dll is corrupt in some way?

0

There are 0 answers