Results 1 to 3 of 3

Thread: Mixing 2d and 3d

  1. #1
    Junior Member Newbie
    Join Date
    May 2008
    Posts
    2

    Mixing 2d and 3d

    Hi. I'm writing a game in OpenGL. Everything is ok, but i need an HUD in 2d. I tried some solutions but i can't get the 2d and the 3d together. Thanks.

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: Mixing 2d and 3d

    draw the 3D as you do currently.
    then before swapbuffers :
    - reset projection matrix, and set it to glortho
    - disable depth test
    - draw your 2D hud

  3. #3
    Junior Member Newbie
    Join Date
    May 2008
    Posts
    2

    Re: Mixing 2d and 3d

    thanks
    it worked

Similar Threads

  1. RE mixing GDI with OpenGL
    By remdul in forum OpenGL: Windows
    Replies: 1
    Last Post: 08-30-2011, 06:44 PM
  2. Mixing 32 and 16 bit indices in a VBO
    By knackered in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 02-04-2008, 07:19 AM
  3. Mixing GL and Native
    By paradox in forum OpenGL ES
    Replies: 1
    Last Post: 01-11-2005, 08:50 PM
  4. mixing lightmaps ?
    By tomslee in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 01-23-2002, 03:56 AM
  5. Mixing GDI and OpenGL
    By Steve_7 in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 07-15-2001, 09:41 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