Results 1 to 5 of 5

Thread: freesing the background

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2002
    Posts
    7

    freesing the background

    Hi guy's
    I am currently programming a gauge for a boat engine. The old gauges needle was very ugly when it was around 90 degrease because it was without anti aliasing. Now the gauge is almost finished but Id like to draw the background of the gauge independently of the needle. Is that possible with OpenGL and if so than how can I do it, where can I find a tutorial or sample-code?

    With kind regards Gerben Prins

  2. #2
    Senior Member Regular Contributor
    Join Date
    Jan 2002
    Location
    Kingston, Jamaica, W.I.
    Posts
    282

    Re: freesing the background

    Sure you can. Best bet is create the guage background as a texture. Then draw that followed by your needle code.

  3. #3
    Junior Member Newbie
    Join Date
    Mar 2002
    Posts
    7

    Re: freesing the background

    i'm sorry let me rephrase my question : because the gauge needs to use minimal processor usage Id like to refresh the needle and not draw the background plate every time I change de needle value

  4. #4
    Senior Member Regular Contributor
    Join Date
    Jan 2002
    Location
    Kingston, Jamaica, W.I.
    Posts
    282

    Re: freesing the background

    You can't do that if you are swapping buffers. Once the buffer is swapped the back buffer is left in an indeterminate state and any image for the next frame should be redrawn. Even if you are not swapping buffers the last image of the needle will become embedded in the image of the gauge so you'll have to redraw it anyway. Whether you want to use rendering, texture maps or DrawImage is up to you.

  5. #5
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: freesing the background

    You can not do that, you have to redraw the screen every time a object changes position.
    I do not think in the overall scheme of things that drawing the needle movement will take a lot of extra CPU time.




    Originally posted by rhs:
    i'm sorry let me rephrase my question : because the gauge needs to use minimal processor usage Id like to refresh the needle and not draw the background plate every time I change de needle value

Similar Threads

  1. Replies: 3
    Last Post: 04-24-2014, 12:36 PM
  2. fix background
    By in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 05-03-2002, 09:26 AM
  3. background ?
    By McZ in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 10-09-2001, 09:01 AM
  4. Background
    By Platinum in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 08-23-2001, 04:45 AM
  5. BackGround
    By Gelero in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 08-17-2001, 09:15 AM

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