Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Cube map reflections - texture matrix

  1. #11
    Member Regular Contributor
    Join Date
    Sep 2002
    Posts
    384

    Re: Cube map reflections - texture matrix

    1. glMatrixMode( GL_MODELVIEW )
    glLoadIdentity()
    2. Set New Camera Pos/Rot
    Shouldn't you be setting the camera orientation with GL_PERSPECTIVE, not GL_MODELVIEW? Which is our point...the modelview matrix has nothing to do with the camera position.

  2. #12
    Member Regular Contributor
    Join Date
    Sep 2002
    Posts
    384

    Re: Cube map reflections - texture matrix

    I don't understand why comments suddenly stopped when I pointed out that the modelview matrix is not used in camera positioning, but rather the perspective matrix. Can someone address this?

  3. #13
    Junior Member Regular Contributor
    Join Date
    Aug 2001
    Posts
    204

    Re: Cube map reflections - texture matrix

    Put the camera orientation in the modelview!

    Have a quick read here
    http://sjbaker.org/steve/omniv/projection_abuse.html

    kon

  4. #14

    Re: Cube map reflections - texture matrix

    Thanks for your help, Lumunous Blue!

    With my own code the reflection maps on spheres worked until I moved the camera location (although looking around was fine) - as soon as I plugged in your texture matrix code it all worked perfectly!

    Can't thank you enough, mate =D

    Next step: Understand how it works!

Posting Permissions

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