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 2 of 2

Thread: Problem with glRotatef

  1. #1
    Newbie Newbie
    Join Date
    Sep 2013
    Posts
    2

    Problem with glRotatef

    Hello,
    i've a problem to make a rotation around different axis:
    for example if i make a rotation around Y in clw and then acw I don't have any problems,
    but when i try to rotate it around X (after an y rotation) the model reset to start position (0,1,0) and then it rotate.

    I know what is a rotation matrix etc...but my problem is: how can I put right direction vector in glRotatef function?

    Another thing that i don't understand is that while i tried to solve this problem I added glGetFloatv(GL_MODELVIEW_MATRIX, modelViewMatrix); to get modelview matrix, but the strange thing is that the
    matrix only change 2times and then it remains the same, rotation matrix and the modelview matrix after a rotation are not the same things?


    Thank you

  2. #2
    Intern Newbie
    Join Date
    Mar 2012
    Location
    Devon, England
    Posts
    40
    I suppose you could put both rotation calls into one. glRotatef(//not sure how you'd work this out probably some sining and cosining//, 1, 1, 0);
    Help Me [img]<<GRAEMLIN_URL>>/smile.gif[/img]

Posting Permissions

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