PDA

View Full Version : glArrayElement in openGL 1.4



maximz
06-17-2012, 03:18 AM
hello,
can the api glArrayElement return GL_INVALID_OPERATION in openGL 1.4 implementation?

if so, why in manual reference there isn't an error paragraph for this api? and can someone explain to me this error, please:
"GL_INVALID_OPERATION is generated if a non-zero buffer object name is bound to an enabled array and the buffer object's data store is currently mapped."

if not, in what version it was added?

i tried to find it in openGL updates every version in openGL WIKI, but no luck.


thanks

V-man
06-17-2012, 05:01 AM
hello,
can the api glArrayElement return GL_INVALID_OPERATION in openGL 1.4 implementation?

Yes, it can.



if so, why in manual reference there isn't an error paragraph for this api? and can someone explain to me this error, please:
"GL_INVALID_OPERATION is generated if a non-zero buffer object name is bound to an enabled array and the buffer object's data store is currently mapped."


What is an "error paragraph"? What manual reference are you looking at. There are plenty of manuals out there.
A buffer object is a VBO. It is saying that if you have a VBO bound and you have mapped it (glMapBuffer), glArrayElement throws GL_INVALID_OPERATION.



if not, in what version it was added?
glArrayElement has been around since GL 1.1 and perhaps even GL 1.0.



i tried to find it in openGL updates every version in openGL WIKI, but no luck.
There are no updates.

If you are trying to use a function beyong GL 1.1, then read the Wiki
http://www.opengl.org/wiki/Getting_started

However, glArrayElement has been around since GL 1.1, so you don't need to read that page.

Aleksandar
06-17-2012, 09:50 AM
Please post some code. If you are using VBO, than it is quite normal for glArrayElement() to emit GL_INVALID_OPERATION, since VBOs are introduced in GL 1.5. If you are using VAs (Vertex Arrays), than it should work.

mhagain
06-17-2012, 03:48 PM
glArrayElement is a very very old call that allows for a weird hybrid mixture of vertex arrays and immediate mode - I wouldn't be surprised if nobody bothered to update the documentation (I would be - and am - surprised to find anyone still using it in 2012 though).