Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: glArrayElement in openGL 1.4

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2012
    Posts
    1

    glArrayElement in openGL 1.4

    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

  2. #2
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,264
    Quote Originally Posted by maximz View Post
    hello,
    can the api glArrayElement return GL_INVALID_OPERATION in openGL 1.4 implementation?
    Yes, it can.

    Quote Originally Posted by maximz View Post
    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.

    Quote Originally Posted by maximz View Post
    if not, in what version it was added?
    glArrayElement has been around since GL 1.1 and perhaps even GL 1.0.

    Quote Originally Posted by maximz View Post
    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.
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

  3. #3
    Senior Member OpenGL Pro Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    1,067
    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.

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Jan 2007
    Posts
    1,135
    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).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •