Weird stuff with glGetFloatv

This topic contains 2 replies, has 2 voices, and was last updated by  emil_k 8 years, 6 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #29806

    emil_k
    Member

    Hi all,
    I have the following code (OpenGL ES 1.1, SDK ver. 2.4, WindowsXP):

    void func_1()
    {
         .
         .
         .
         glMatrixMode(GL_MODELVIEW);
         glLoadIdentity();

         glPushMatrix();
              glRotatef(-90.0, 1.0, 0.0, 0.0);
              glRotatef(-90.0, 0.0, 0.0, 1.0);
              func_2();
         glPopMatrix ();
    }

    void func_2()

    {

         glPushMatrix();

                glGetFloatv(GL_MODELVIEW_MATRIX, debug_matrix);
                glMultMatrixf(my_matrix);
                draw_model();
         glPopMatrix ();

    }

    So the issue is that if I comment out the “glGetFloatv(GL_MODELVIEW_MATRIX, debug_matrix);” call, I get completly different results (wrong results). I seems like the rotations in func_1 have no effect if the glGetFloatv is commented, which seems illogical to me. my_matrix does not get multiplied with the rotation matrix which is setup in func_1. What exactly does glGetFloatv do? Does it modify the matrix stack in any way?
    This bugs me several days now and I’m real close to insanity :). Any help will be greatly appreciated.
    Also, can I get debug version of libgles_cm.dll to see what’s happening in that function?

    Thanks, Emil.

    #33079

    Gordon
    Moderator

    This is actually a known issue (BRN27265) and has been fixed for our next release.

    Putting a glGetFloatv() in like you have is actually the recommended work-around for this problem at the moment, though.

    #33080

    emil_k
    Member

    Ok, thanks Gordon,
    I’ll be waiting for the next release than.

Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.