Jump to content

View more

Image of the Day

#ld38 #screenshotsaturday Mimosa Fizz action gif #2 https://t.co/TUzdppvfUL
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

glGenFramebuffers access violation in gl 3 . Deprecated?

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
8 replies to this topic

#1 fread   Members   

240
Like
0Likes
Like

Posted 11 May 2014 - 03:31 PM

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



#2 Jan2go   Members   

2017
Like
0Likes
Like

Posted 11 May 2014 - 03:47 PM

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, ...)?



#3 CoffeeandCode   Members   

188
Like
0Likes
Like

Posted 11 May 2014 - 03:48 PM

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.

#4 Xycaleth   Members   

2351
Like
3Likes
Like

Posted 11 May 2014 - 04:29 PM

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



#5 deftware   Prime Members   

1778
Like
0Likes
Like

Posted 11 May 2014 - 05:54 PM

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.



#6 fread   Members   

240
Like
0Likes
Like

Posted 11 May 2014 - 11:33 PM

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.



#7 Xycaleth   Members   

2351
Like
2Likes
Like

Posted 12 May 2014 - 11:04 AM

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 ) {
  ...
}


#8 swiftcoder   Senior Moderators   

18223
Like
2Likes
Like

Posted 12 May 2014 - 12:06 PM


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.


Edited by swiftcoder, 12 May 2014 - 12:06 PM.

Tristam MacDonald - Software Engineer @ Amazon - [swiftcoding] [GitHub]


#9 fread   Members   

240
Like
1Likes
Like

Posted 13 May 2014 - 08:57 AM

glewExperimental, thank you!






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.