PDA

View Full Version : Drawing widgets on the "glass pane"



02-13-2003, 07:17 AM
Hi!

I'm just starting to enjoy OpenGL programming and I'm makgin a simple game of mine.

What I would like to do is during the game loop I want to display status info on the screen on top of every thing else ie something like the controls on you TV set, or ordinary game stats like ammo etc?

In Java you have a glass pane that's on top every thing else.

How can this be done with OpenGL?

Many Thanx!

nexusone
02-13-2003, 07:39 AM
Here are few way's right off that will work:

1. Draw your info panel last over top of everything else in ortho mode.

2. Could do it as a texture map on a quad that is drawn last, would be maybe more like the java glass pane. You draw your panel with a paint program and create a transparentcy mask of the area in which the game field will show through.


Hope this helps.



Originally posted by code_sword:
Hi!

I'm just starting to enjoy OpenGL programming and I'm makgin a simple game of mine.

What I would like to do is during the game loop I want to display status info on the screen on top of every thing else ie something like the controls on you TV set, or ordinary game stats like ammo etc?

In Java you have a glass pane that's on top every thing else.

How can this be done with OpenGL?

Many Thanx!