GL_DEPTH_TEST and or Blending

Posts: 89
Joined: 2005.06
Post: #1
'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.


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.



Well since everyone else is doing it:
Twilight Coders
Quote this message in a reply
Posts: 3,591
Joined: 2003.06
Post: #2
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?
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  general blending versus texture blending questions WhatMeWorry 2 7,113 Dec 7, 2006 02:43 PM
Last Post: arekkusu
  GL_DEPTH_TEST dilemma Wheatie 8 7,406 Sep 28, 2004 08:26 AM
Last Post: NYGhost