glGenFramebuffers access violation in gl 3 . Deprecated?

Started by
7 comments, last by fread 9 years, 11 months ago

Hello everyone,

I've recently started learning OpenGl3.

I am getting access violation on "glGenFramebuffers" call (using glew library).

Is glGenFramebuffers deprecated in GL3?

How can I replace it?
Thanks in advance ;s

Advertisement

As far as I know, glGenFramebuffers was added in OpenGL 3.0, so it should not be deprecated. :) Can you provide more details about what is happening (source code, full error message, ...)?

No, they didn't deprecate the creation of framebuffers in the version it was added :L you're probably trying to write to a read-only framebuffer or not loading the correct opengl version in your program.

Have you called glewInit() at the start of your program? Given you have an access violation, the glGenFramebuffers pointer is probably null.

Have you called glewInit() at the start of your program? Given you have an access violation, the glGenFramebuffers pointer is probably null.

I second that.

I've called glewInit and I've already used glUseProgram, ETC.

Only glGenFramebuffers is NULL.

This condition is true:


if(glGenFramebuffers  == 0) 
         printf("Error, glGenFramebuffers not present!")

It crashes on the frst call.

it's very strange because glGenFramebuffers is not NULL in a backwards compatitilibity mode.

Sounds like a driver bug to me. glGenFramebuffers should be available in compatibility and core contexts. Are you sure you're creating a GL 3.x context? If you are, then you can try setting glewExperimental to GL_TRUE before calling glewInit() and see if that works. Something like this:

glewExperimental = GL_TRUE;
if ( glewInit() != GLEW_OK ) {
  ...
}

try setting glewExperimental to GL_TRUE before calling glewInit()

Sadly, this is pretty much always required for GLEW these days. I spent an hour banging my head against this just a few weeks back.

I keep hoping for a new glew release that enables core functionality by default. I'm not holding my breath though.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

glewExperimental, thank you!

This topic is closed to new replies.

Advertisement