Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Search:

Type: Posts; User: eugeneyche

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    1,096

    Apologies for not testing this, but from looking...

    Apologies for not testing this, but from looking at your code, I think the problem is this line:


    glVertexAttribPointer(2, 4, GL_FLOAT, GL_FALSE, sizeof(quad->tex_coords),
    ...
  2. I believe this is because OpenGL is column major....

    I believe this is because OpenGL is column major.

    Quick fix is to change this line:
    glUniformMatrix4fv(loc3, 1, GLboolean(GL_TRUE), &matrix[0])

    But the "right" way too do this is...
  3. Personally, I think rotating the cube should...

    Personally, I think rotating the cube should change the model matrix rather than the camera matrix, but let's work with this for now. The reason why the cube seems to flip orientation is because up...
Results 1 to 3 of 3