Game Development Community

Vector graphics in GUI

by Ken Finney · in Torque Game Engine · 05/12/2003 (4:51 pm) · 6 replies

I want to be able to do vector graphics under script control in the GUI. It looks to me like the ideal control to draw on would be EditTSCtrl - it has exactly what I need as its methods:

renderCircle
renderTriangle
renderLine

renderLine is the one I need to use. However (and you know its coming ... :-) I can't get anything to draw, or if it's drawing, it won't display. I've fiddled with the line colour and width (through the consoleFrameColor and consoleLineWidth properties), and still nothing.

Has anyone used this control before ? Is there some magic incantation that I need to perform first ?

myCtrl.renderLine ("10 10 0","200 200 0", 2);
that oughta do it, but doesn't :-(

#1
05/12/2003 (5:24 pm)
not with this control ..
but you didnt mention which texture was currently binded.
try binding 0.
#2
05/12/2003 (5:28 pm)
Badguy, I don't follow your reply. As far as I can tell, there are no textures associated with EditTSCtrl, and I don't want one anyway... or am I missing something ?
#3
05/12/2003 (5:30 pm)
yea maybe..
when you draw lines in the GL
if there is a texture binded but not mapped it can do some undefined stuff (depending in the texture binded)

so like .. you might no even See the line.. :)
Just a thought.

so setting
glBindTexture(GL_TEXTURE_2D, 0);
will effectivly bind no texture.
and make sure That is not your problem! :)
#4
05/12/2003 (5:38 pm)
:) didnt werk huh?
#5
05/12/2003 (7:28 pm)
Thanks BG, but nope, for this capability I don't want to make engine changes. It has to be doable with the out-of-the-box TGE.
#6
05/12/2003 (8:21 pm)
I dunno, if that is indeed the bug, then you're probably out of luck with the EditTSCtrl...