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

Thread: glTranslate* and glRotate* in OpenGL ES 2.0

  1. #1
    Junior Member Newbie Yezu666's Avatar
    Join Date
    Sep 2008
    Location
    Gdynia, Poland
    Posts
    15

    glTranslate* and glRotate* in OpenGL ES 2.0

    Hi!
    I'm starting with OGL ES 2.0 and I'm a bit lost with one thing.
    The spec doesn't contain glTranslate, glRotate, glFrustum.

    How do I modify the position and/or orientation of object on my scene?

    I've managed to find glUniformMatrix*. And I can pass any 4x4 transformation matrix to the vertex shader and use it for my calculations.

    The thing is that I have to manually calculate each transformation matrix using the CPU. Right? Or is there a more fancy way to do this?

    BTW. Does this also apply to OpenGL 3.x ?

    thanks
    "In the arena of logic, I fight unarmed."
    Red Mage, Episode 835: Refining Moment

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Feb 2006
    Location
    Sweden
    Posts
    744

    Re: glTranslate* and glRotate* in OpenGL ES 2.0

    Quote Originally Posted by Yezu666
    BTW. Does this also apply to OpenGL 3.x ?
    thanks
    Yes it does, at least in forward compatible mode, you have to cook your own, but don't worry it's not hard.
    just folow this link

  3. #3
    Junior Member Newbie Yezu666's Avatar
    Join Date
    Sep 2008
    Location
    Gdynia, Poland
    Posts
    15

    Re: glTranslate* and glRotate* in OpenGL ES 2.0

    Thanks very much

    I do have one more question however.

    As I am only starting to use shaders. I'm not sure whether should or shouldn't I use glTranslate*, glRotate* etc. in OpenGL 2.x with shaders?
    "In the arena of logic, I fight unarmed."
    Red Mage, Episode 835: Refining Moment

  4. #4
    Advanced Member Frequent Contributor
    Join Date
    Feb 2006
    Location
    Sweden
    Posts
    744

    Re: glTranslate* and glRotate* in OpenGL ES 2.0

    it's up to you but it's a bit easier and you do have access to the resulting matrices from within the shader.

    But as your doing more and more advanced stuff, doing it your own way isn't a bad idea.

  5. #5
    Junior Member Newbie Yezu666's Avatar
    Join Date
    Sep 2008
    Location
    Gdynia, Poland
    Posts
    15

    Re: glTranslate* and glRotate* in OpenGL ES 2.0

    Many thanks for the help
    "In the arena of logic, I fight unarmed."
    Red Mage, Episode 835: Refining Moment

Posting Permissions

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