Jump to content
  • Advertisement
Sign in to follow this  
glElsenhans

Lesson 48 & 3D texture rotation

This topic is 4170 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! I created a 3D texture and project it on a number of fixed polygons perpendicular to the viewing direction (volume rendering). For mouse interaction (rotation of the 3D texture) I'm using the Arcball code from lesson 48 but encountered a problem. While the sphere and the torus from the example are rotated correctly in GL_MODELVIEW mode (rotation is perpendicular to the viewing direction) my 3D texture rotates still around its original axes despite to its current spatial orientation. Below is the respective code snippet, all other code (besides the part of texture setup and generation) is the same as in lesson 48. glMatrixMode (GL_TEXTURE); glLoadIdentity(); glTranslatef(0.5f, 0.5f, 0.5f); glMultMatrixf(Transform.M); glMatrixMode (GL_MODELVIEW); Actually I'm using the sphere and torus transformation matrix for my 3D texture. Or should there be two matrices – one for GL_MODELVIEW and one for GL_TEXTURE? I hope someone can help me solve this problem. And yes, I'm a newbie to OpenGL. best regards, glElsenhans

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!