i have a problem with newer ati-drivers. I use simple calls to glDrawElements. When i call this function, ati-drivers crash. On ALL other cards i have tested (even onboard chips) or disabled hardwareacceleration (windows) this functions make no problems. Here is a bit of code i use:
Thank you for your answer. glVertexAttribPointer is available if the graphiccards support OpenGL 2.0 and higher. My applications have to run on simplest office-pcs. My problem seems to have something to do with the “glEnable(GL_COLOR_MATERIAL);” if i remove this line, ati doesnt crash. but scene has no light then. there is a driver version of ati where this problems does not appear. in every newer version this bug crashes my applications.
this happens more likely if you bound some attributes but forgot to unbind them i.e. some vertex data doesnt have vertex colors which the driver still tries to look up from previous pointer.
Like _NK47 says… 99 times out of 100 with these glDrawArray crashes it is some binding, or attribute that you have forgotten about, or has got setup somehow causing the GPU to expect data that is not there, or sufficient for the current call.
That’s what I was alluding to when asking about the VBOs. It’s almost always what bites me.
its definitely not a bound buffer which i forgot. i dont use vbo and all buffers i use were enabled before i execute gldrawelements. every other buffer is disabled. the code i posted above is almost the full drawing-code!
Have you actually looked at the gl state using some kind of profiler?
I am not saying for sure it’s that, but just assuming everything is off / unbound is not enough. It should be, but one never knows for 100% unless one checks.
Of course it may still be a driver bug, in which case you should provide a reproducible example of the crash and pass it on to ATI.
I am just surprised that something so fundamental would have such a serious crash in such a simple implementation.
i made a small example for you to download. download
To compile this, you can use Visual Studio 2008. If you dont have this you can run the included binaries. The source is very simple. ATI drivers crash, but all other tested cards (even the virtual machine) work very well.
I would be glad, if someone could watch the code, before i send this to ATI.
You are calling lot of OpenGL functions before OpenGL context is created. This is not good. Check your OpenGL errors with glGetError() function after each OpenGL function. Or use GLintercept that will do it for you automatically.
Anyway that is no problem. I’m getting also crash on HD2400 with Catalyst 9.2. It seems that ATI doesn’t like 3 component GL_UNSIGNED_BYTE as colors. When I converted it to GL_FLOAT then everything works fine - no crash. I tried to convert it 4 component GL_UNSIGNED_BYTE - also no crash. Maybe it is alignment issue.
Btw for performance reasons it is better to use interleaved arrays, not each vertex component in different array. Try to pack vertex attributes together - using 4 component color, it is better to align floats to address dividable by 4.
Hi killerschaf,
I tested your app on Catalyst 9.2 and was able to see the crash. This issue is fixed in Catalyst 9.3, which will be available in a few weeks. Hope that helps a bit.