cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Rom1
Adept I

VBO Error with MFC

glGenBuffers return error 1281(0x00000501)

Hello,

I am not an OpenGL developer but an OpenCL developer but I need some OpenGL to display the computed result....

I'm facing some troubles using the glGenbuffers with AMD cards (HD 5850) on Windows 7 64bits. The app is using the MFC (so maybe there 's a link ?).

The code works like a charm with NVIDIA cards. And it's nearly OK with AMD gpu's on Windows XP 32bits; but it was working once only if i needed another VBO I had an error also.

The following code return an error :

GLuint Res = 0;
  _glGenBuffers(1, &Res);
  GLenum err = glGetError();
==>err=1281(0x00000501)

 

 

 

0 Likes
6 Replies
nou
Exemplar

0x0501 state for GL_INVALID_VALUE and it is generated when number of generated bufferes is negative.

are you sure that this function call generate this error? because when OpenGL generate error it stay there until you reset it with glGetError(). and subsequent GL calls dont overwrite stored error code.

0 Likes
Rom1
Adept I

Sorry my post has left the edition window before I finish to write it ...

Can anyone can help me and have some good advices, modification to try or anything ?

0 Likes

Goo Advice I will try a glGetError() before my glgenbuffers.

0 Likes

Thanks Nou, we found the problem with your tips, it was in the very beginning of the use of opengl, modifying the gl init when app launch  was enough.

0 Likes

just one thing. nVidia is much more benevolent to errors in OpenGL.. on AMD follow OpenGL specifications more strictly. so when it works on AMD card it will most likely work on nVidia without error. but code which work on nVidia without error can produce a wrong results on AMD.

0 Likes

We made some modifications in the early opengl init when MFC app launch, and now it's OK (on both). Thank for your help, nou !

 

0 Likes