Results 1 to 7 of 7

Thread: Fast, fast, very fast HUD?

  1. #1
    Senior Member Regular Contributor
    Join Date
    Aug 2000
    Posts
    118

    Fast, fast, very fast HUD?

    I wanted to know which way of drawing a HUD will be the faster. Speed is an issue here. Im managing 2 options, maybe you can come up with a third:
    - Drawing 2D overlays using glOrtho
    - Drawing 2D overlays near the near_z frustum clipping plane

    I read once about having 2 rendering context, one over the second, but I forgot where I read about that, maybe you know where.

    Thanks in advance!!!

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Mar 2001
    Posts
    3,574

    Re: Fast, fast, very fast HUD?

    The idea of changing rendering contexts probably isn't going to be particularly fast. wglSetRenderContext probably isn't the fastest operation, certainly not something designed for real-time apps.

    The only advantage of the second method over the first is that you have to change the projection matrix. It's more obvious exactly what you are doing (and therefore easier to code) if you use glOrtho, but you won't have the overhead of changing the projection matrix. How slow that operation is remains in question though. I'd go ahead and use glOrtho for now, and if you have any problems with speed, switch to the second option.

  3. #3
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Nov 2010
    Posts
    2,466

    Re: Fast, fast, very fast HUD?

    ild say the first is the fastest method, all games use this method.
    hmmmm why does the second method have to be near the near clip plane?

  4. #4
    Senior Member Regular Contributor
    Join Date
    Feb 2001
    Location
    Australia
    Posts
    431

    Re: Fast, fast, very fast HUD?

    What about if you change to a 2D projection with glOrtho then draw a use a blended textured transparent quad right up over the whole screen.

    I'm doing a 2D texture mapped volume rendering app where I have a series of images (slices) that I texture map onto blended quads so you only see the texture, not the underlying quad. That way I'm getting a 3D representation of the image slices.

    I've often thought if I was to do an app with an HUD that I could use a texture over the whole viewport. I think I may have the idea from other posts on these boards (don't remember exactly). Depending on the amount of drawing you have to do for your HUD, it could reduce a lot of function calls. Just means you'll have to use a drawing package to design your HUD - shouldn't be hard though.

  5. #5
    Senior Member Regular Contributor
    Join Date
    Aug 2000
    Posts
    118

    Re: Fast, fast, very fast HUD?

    Ok, I`ll use the first method...Like Korval said its the most obvious. Thank you!

  6. #6
    Senior Member Regular Contributor
    Join Date
    May 2001
    Location
    Germany, Hannover
    Posts
    160

    Re: Fast, fast, very fast HUD?

    Ortho or frustum, there is no difference !?! both produce a matrix, and they cannod be handled individually (or does the hardware know what the matrix represent ?)

    so for a fast hud you have to turn of depthtest(HUDs are always visible), and ortho is a bit easier to use !

  7. #7
    Senior Member Regular Contributor
    Join Date
    Feb 2000
    Location
    milano, italy
    Posts
    282

    Re: Fast, fast, very fast HUD?

    you anonymous coward!

    for the HUD case, remember to call glDisable(GL_DEPTH_TEST) when you draw your stuff.

    either methods work basically the same... performances too are similar.

    bye
    Dolo/\/\ightY

Similar Threads

  1. fast permanent texture to texture fast draw
    By alexopenglbeginner in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 09-01-2009, 12:55 PM
  2. NEED HELP FAST!!!!!
    By tripp in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 12-03-2003, 07:16 AM
  3. How fast is fast?
    By 3B in forum OpenGL: Advanced Coding
    Replies: 7
    Last Post: 10-27-2003, 05:03 PM
  4. i need help & fast!!!!!!!!!
    By karmoon in forum OpenGL: User Software
    Replies: 0
    Last Post: 05-31-2002, 01:09 AM
  5. Can this be done fast?
    By DFrey in forum OpenGL: Advanced Coding
    Replies: 8
    Last Post: 01-30-2001, 08:20 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