Jump to content
  • Advertisement
Sign in to follow this  
glElsenhans

Lesson 48 & 3D texture rotation

This topic is 4250 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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!