S.Seegel
03-29-2009, 02:24 PM
I've started to teach myself "modern" (read: 3.0+) OpenGL at the moment, so I wrote a small program only using non-deprecated features:
- using gen<Whatever> for object names
- vertice an colours interleaved in an vbo
- vertex and fragment shaders using glsl v1.30 (not using any deprecated build-in variables)
And then I got stuck with a problem I wasn't able to find anything about in the spec.
The mini-program ran fine on ubuntu 8.10 with Catalyst 9.2 on x86_64, at least as long as I don't create an FORWARD_COMPATIBLE context. If I created a forward compatible context, glBindBuffer() (and the following glBufferData()) failed with an GL_INVALID_OPERATION error.
I couldn't find a way to make it work.
Today I upgraded to ubuntu 9.04 beta, which (according to Linux Magazin (http://www.linux-magazine.com/online/news/proprietary_driver_for_ubuntu_9_04_fglrx_for_x_ser ver_1_6)) comes with an pre-release of Catalyst 9.4 (version 6.800 as opposed to Catalyst 9.3 which comes with version 6.593).
With this driver, the GL_INVALID_OPERATION error occured later on in my program on the two calls to glVertexAttribPointer().
I was able to work around this error by moving the corresponding glEnableVertexAttribArray() call before the call to glVertexAttribPointer().
It is remarkable, that it's sufficient to have one call to glEnableVertexAttribArray() before the first call to glVertexAttribPointer(), the second call no longer cause an error, even if preceding it's corresponding glEnableVertexAttribArray() call !
I suppose this is a quirk in the ATI driver, or am I missing something in the spec which should have told me to enable vertex attribute arrays before specifying their pointer ?
- using gen<Whatever> for object names
- vertice an colours interleaved in an vbo
- vertex and fragment shaders using glsl v1.30 (not using any deprecated build-in variables)
And then I got stuck with a problem I wasn't able to find anything about in the spec.
The mini-program ran fine on ubuntu 8.10 with Catalyst 9.2 on x86_64, at least as long as I don't create an FORWARD_COMPATIBLE context. If I created a forward compatible context, glBindBuffer() (and the following glBufferData()) failed with an GL_INVALID_OPERATION error.
I couldn't find a way to make it work.
Today I upgraded to ubuntu 9.04 beta, which (according to Linux Magazin (http://www.linux-magazine.com/online/news/proprietary_driver_for_ubuntu_9_04_fglrx_for_x_ser ver_1_6)) comes with an pre-release of Catalyst 9.4 (version 6.800 as opposed to Catalyst 9.3 which comes with version 6.593).
With this driver, the GL_INVALID_OPERATION error occured later on in my program on the two calls to glVertexAttribPointer().
I was able to work around this error by moving the corresponding glEnableVertexAttribArray() call before the call to glVertexAttribPointer().
It is remarkable, that it's sufficient to have one call to glEnableVertexAttribArray() before the first call to glVertexAttribPointer(), the second call no longer cause an error, even if preceding it's corresponding glEnableVertexAttribArray() call !
I suppose this is a quirk in the ATI driver, or am I missing something in the spec which should have told me to enable vertex attribute arrays before specifying their pointer ?