View Full Version : rotate of 3d texture
05-22-2005, 10:20 PM
hello i do the volume rendering via 3d texture.when i rotate texture matrix not only the image rotate but the image position moves.so , the image will be partly out of the viewport .could anyone give me some advice?
05-22-2005, 10:56 PM
Like any coordinate system, texture coordinates rotate about the origin.
Try to translate -0.5 -0.5 -0.5 then rotate then translate +0.5 +0.5 +0.5
For any origin change the 0.5 to whatever you like.
05-22-2005, 11:37 PM
do you mean to glTranslatef(-0.5,-0.5,-0.5) in after glMatrixMode(GL_TEXTURE)?i do but have no effects
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.