Lesson 48 & 3D texture rotation

Started by
-1 comments, last by glElsenhans 16 years, 12 months ago
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

This topic is closed to new replies.

Advertisement