FBO problems

Started by
9 comments, last by Lord Faron 17 years, 6 months ago
I'm not really sure if my video card supports frame buffer objects but I thought most cards starting adding support years ago. I've included glew.h (which has #define GL_FRAMEBUFFER_EXT 0x8D40 in it), I then created an OpenGL program and used the isExtensionSupported function from OpenGL.org and sent the function the parameter value "GL_FRAMEBUFFER_EXT". It returned false. So I'm using a laptop ATI Mobility Radeon X300, did I do that right and what's the easiest way to find this out?
Advertisement
I have no idea of how glew works, however if you just want to know really quickly. Then just type something like this:

printf("%s", glGetString(GL_EXTENSIONS));

And look through the printed string and see if it's there.
The extension name string is GL_EXT_framebuffer_object, not GL_FRAMEBUFFER_EXT which is just a constant that represents an FBO target. Also, if you're using GLEW, you might as well use GLEW's built-in extension support querying mechanism (whatever that is, I bet it's explained on the GLEW website).
Thanks a lot guys, it turns out I was using the wrong thing to check for like Kalidor said.

So now here's the original problem. This code crashes and says "Access violation reading 0x00000000", WHY?

I'm using glew.h, gl.h, glu.h, and glut.h.

	int test = isExtensionSupported("GL_EXT_framebuffer_object");	if(test)	{		// generate frame buffers, render buffers/* it crashes here */	glGenFramebuffersEXT(1, &fbos);		glGenRenderbuffersEXT(1, &rbos);		glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbos);	}
Probably glGenFramebuffersEXT is not a valid pointer.
if (time() == $) { $ = 0; }
Probably glGenFramebuffersEXT is not a valid pointer.
if (time() == $) { $ = 0; }
Probably glGenFramebuffersEXT is not a valid pointer.
if (time() == $) { $ = 0; }
Quote:Original post by Lord Faron
Probably glGenFramebuffersEXT is not a valid pointer.


What does that mean? Isn't glGenFrameBufferEXT a function call to generate buffers for frame buffer objects?

The only other time I've seen this type of error was when I was trying to run shaders without the correct graphics card drivers. So I'm almost positive this graphics card driver supports frame buffer objects but trying to get a straight answer from ATI is like pulling teeth.
Read the article mentioned in this entry in this forum's FAQ to learn about extensions. Then use an extension loading library such as GLee or the aforementioned GLEW.
Wow, thanks Kalidor that's just what I needed. So now I did
glGenFramebuffersEXT = (PFNGLGENFRAMEBUFFERSEXTPROC)wglGetProcAddress("glGenFramebuffersEXT");glGenFramebuffersEXT(1, &fbos);

and it works swimmingly :)

**edited - I'm dumber than I thought on this one but at least I learned another way of doing things. It turns out that I just forgot to initialize glew with glewInit(). So there's no need for the code above :p

[Edited by - adawg1414 on October 3, 2006 1:58:32 PM]

This topic is closed to new replies.

Advertisement