Results 1 to 6 of 6

Thread: World transform (like DX) in OpenGL?

  1. #1

    World transform (like DX) in OpenGL?

    Does OGL has a World transform matrix like DirectX?

    Regards!
    -Marco

  2. #2

    World transform (like DX) in OpenGL?

    OpenGL matrices are a bit different from DirectX ones.
    DX has 3 matrices in total that affect geometry transformations - World, View, Projection.
    OGL has only 2 - ModelView, Projection. ModelView is basically a combinations of World and View matrices.

    So to answer your question, OpenGL has a transform similar the Direct3D, but not exactly the same.

  3. #3

    World transform (like DX) in OpenGL?

    Hmm, how can I create a world transform + view transform matrix for OGL?

  4. #4

    World transform (like DX) in OpenGL?

    glMatrixMode(GL_MODELVIEW);
    glLoadIdentity;
    gluLookAt(EyeX, EyeY, EyeZ, TargetX, TargetY, TargetZ, UpX, UpY, UpZ);
    //this creates the view matrix transformation

    then you can use
    glRotatef, glScalef, glTranslatef to build the world matrix

    or you can use glLoadMatrixf to load already built World*View matrix.

  5. #5

    World transform (like DX) in OpenGL?

    So basically I just multiply World*View?

    Regards!
    -Marco

  6. #6

    World transform (like DX) in OpenGL?

    yes and then pass it to OGL with glLoadMatrixf

Bookmarks

Posting Permissions

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