Results 1 to 2 of 2

Thread: Circle with 2 color changes

  1. #1
    Member Contributor
    Join Date
    Oct 2002

    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

    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.

Similar Threads

  1. Replies: 4
    Last Post: 05-31-2016, 05:21 PM
  2. Connect midpoint circle dots for circle outline
    By TalysShade in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 10-05-2012, 03:42 PM
  3. Custom color interpolation inside of a circle
    By hsencan in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 03-04-2012, 05:36 PM
  4. Replies: 1
    Last Post: 01-20-2005, 11:35 PM
  5. Drawing Circle that changes color dynamically
    By k_ILL in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 07-27-2004, 11:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean