Game Development Community

dgl draws on top of unnecessary elements

by Justin Mosiman · in Torque Game Builder · 03/10/2009 (8:39 pm) · 3 replies

For my game, I have it draw a selection box when the user clicks and drags. I am using dglDrawRect to do this, and this works well except one aspect. The rectangle also draws on top of elements that I don't want it to draw on top of, such as gui controls. Is there a way I can specify what layer it does not draw on? Or something instead of dglDrawRect?

Thanks,
Justin

#1
03/11/2009 (1:51 am)
If you could live with a filled rectangle (mostly transparent though) then you could use a static sprite and resize it. Alternately, you should be able to use the shape vector.

Melv.
#2
03/11/2009 (3:35 pm)
Hi Melv,

Thank you, I'll try going with the shape vector route.
#3
03/12/2009 (1:19 am)
You're welcome. Let me know how you get on.

Melv.