Jump to content
  • Advertisement
Sign in to follow this  
EvilNando

why this triggers glGetError()?

This topic is 2549 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts



// Vertex data
if ( vertex_buffer == NULL )
{
// Create vertex buffer
glGenBuffers(1, &vertex_buffer);
glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer);

// Copy data
glBufferData(GL_ARRAY_BUFFER, sizeof(vertex_data), vertex_data, GL_DYNAMIC_DRAW);

GLenum _error_check_value = glGetError();
if ( _error_check_value != GL_NO_ERROR )
{
ShowMessage("Quad::Load() Error! %s", gluErrorString(_error_check_value));
}
}


just by doing this I trigger an invalid enumerator error , why is this?

Share this post


Link to post
Share on other sites
Advertisement
nevermind this error is getting triggered way before this piece of code

but it would be useful to know how to pinpoint the function that is causing this log entry, currently Im just placing glgeterror() all over the place and I think this error is getting triggered in my SDL initialization

Share this post


Link to post
Share on other sites
but it would be useful to know how to pinpoint the function that is causing this log entry, currently Im just placing glgeterror() all over the place and I think this error is getting triggered in my SDL initialization


There is a helpful extension - debug_output, but you'll need to upgrade your drivers to GL 4.1.


Define debug callback function, activate synchronous output and add a breakpoint inside callback function. Whenever an error occurs you'll have a function caused it in the call-stack.

Share this post


Link to post
Share on other sites

[quote name='EvilNando' timestamp='1306780725' post='4817609']but it would be useful to know how to pinpoint the function that is causing this log entry, currently Im just placing glgeterror() all over the place and I think this error is getting triggered in my SDL initialization


There is a helpful extension - debug_output, but you'll need to upgrade your drivers to GL 4.1.


Define debug callback function, activate synchronous output and add a breakpoint inside callback function. Whenever an error occurs you'll have a function caused it in the call-stack.


[/quote]

thank you

Share this post


Link to post
Share on other sites
http://www.opengl.org/wiki/Extension_Loading_Library

You might still get GL_INVALID_ENUM (depending on the version of GLEW you use), but at least GLEW ignores glGetString(GL_EXTENSIONS) and gets all function pointers.[/quote]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!