Original Post
In some code where I create a Frame Buffer object I have: But when the line: glGenFramebuffersEXT(1, &id); gets executed the application crashes (found this with the debugger). Another post on the forum deals with the same problem: http://www.gamedev.net/community/forums/topic.asp?topic_id=386881 but cannot see how I can used the proposed solution. Why does the above line result in a crash? EDIT: I have found another post on the forum: http://www.gamedev.net/community/forums/topic.asp?topic_id=417657 I have now tried: but I still get the same error. Any hints are still appreciated!
class FBO {
...
static GLuint create()
{
GLuint id = 0;
glGenFramebuffersEXT(1, &id);
return id;
}
...
};
class FBO {
...
static GLuint create()
{
GLuint id = 0;
glGenFramebuffersEXT = (PFNGLGENFRAMEBUFFERSEXTPROC)wglGetProcAddress("glGenFramebuffersEXT");
glGenFramebuffersEXT(1, &id);
return id;
}
...
};