GL_DEPTH_TEST and or Blending
'lo folks.
I've got a user interface library (C++) which allows me to create a bunch of elements such as textfields, buttons, windows etc.
The way I have it now, I've assigned a background texture to my interface, and then a few game elements such as a chatbox etc.
Now, the problem is, I would like to be able to draw my game elements (planets, ships etc) in between the background, and the user interface objects.
interface.draw();
for each gameobject, gameobject.draw();
is there a way I can use a combination of zindices, GL_DEPTH_TEST and or blending to accomplish this? I don't exactly have the luxury of order of draw, but I can manipulate zindecies.
Thanks!
r.
I've got a user interface library (C++) which allows me to create a bunch of elements such as textfields, buttons, windows etc.
The way I have it now, I've assigned a background texture to my interface, and then a few game elements such as a chatbox etc.
Now, the problem is, I would like to be able to draw my game elements (planets, ships etc) in between the background, and the user interface objects.
interface.draw();
for each gameobject, gameobject.draw();
is there a way I can use a combination of zindices, GL_DEPTH_TEST and or blending to accomplish this? I don't exactly have the luxury of order of draw, but I can manipulate zindecies.
Thanks!
r.
Sure you can use depth testing. But if I understand your description, why not just draw the background texture yourself first, then the game objects, then the UI without a background?
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| general blending versus texture blending questions | WhatMeWorry | 2 | 4,243 |
Dec 7, 2006 02:43 PM Last Post: arekkusu |
|
| GL_DEPTH_TEST dilemma | Wheatie | 8 | 4,999 |
Sep 28, 2004 08:26 AM Last Post: NYGhost |
|

