Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: glBindBuffer() execution problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Intern Contributor
    Join Date
    Sep 2012

    glBindBuffer() execution problem

    I am running MS VC++ 2010 in W7 trying to understand OpenGL buffers. A program copied from the red book runs fine up to and including the first line below.
    glGenBuffers(NUM_BUFFERS, buffers);
    glBindBuffer(GL_ARRAY_BUFFER, buffers[VERTICES]);
    // NUM_BUFFERS = 2, VERTICES = 0

    But once the second line is uncommented, it does compile but blows up executing with
    "Unhandled exception at 0x003bff04 in Buffers.exe: 0xC0000005: Access violation reading location 0x015efdf8."

    I have included and initialized GLUT and GLEW. So what could be the problem? glBindBuffer() wants to access the GPU but something has to be set first? Do I need to use freeGLUT rather than the (outdated?) GLUT?

    Any suggestions would be welcome.

  2. #2
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Montreal, Canada
    You need GL 1.5 at minimum to use VBO. Check your GL version.
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    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);

Posting Permissions

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