Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Circle with 2 color changes

  1. #1
    Intern Contributor
    Join Date
    Oct 2002
    Location
    bangalore
    Posts
    56

    Circle with 2 color changes

    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.
    thanks & regards
    Prashant G.P

  2. #2
    Guest

    Re: Circle with 2 color changes

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •