View Full Version : Circle with 2 color changes

11-12-2002, 03:26 AM
i want to have a texture that is split into two halves, one for each color. Then draw a filled circle (e.g. GL_TRIANGLE_FAN), with the texture coordinates for each vertex mapping so that the texture will be drawn as if pitch & roll is "zero" (standing on the ground). Finally, rotate & and translate the texture with the GL_TEXTURE_MATRIX so that it corresponds to pitch and roll (pitch = translate, roll = rotate).

pitch & roll are the measures of aircraft movement.i am trying to simulate multifunction display of the aircraft.

11-12-2002, 08:05 AM
use the texture matrix.
glRotatef(-roll,0,0,1) i guess the texture rotates opposite to that of the aircraft.
then translate the textureusing translatef(0,p,0) where p is a function of the pitch.

u might want to set the texture to be clamped at the edges.