Lines on a bitmap
by Howard Dortch · in Torque Game Engine · 11/01/2007 (11:55 am) · 1 replies
I wanted to draw some lines on a bitmap so I took the guiBitmapCtrl.cc file (copy and named different) and added in code for some lines at the bottom of the render function but it doesn't show lines. Here is the code just above the renderChildControls()
Anyone help?
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glDisable(GL_TEXTURE_2D);
glColor4f(1.0f,1.0f,1.0f,1.0f);
glBegin(GL_LINE);
glVertex2f(offset.x + 20.0f,offset.y+ 20.0f);
glVertex2f(offset.x + 20.0f,offset.y + 120.0f);
glEnd();
glDisable(GL_BLEND);
renderChildControls(offset, updateRect);
Anyone help?
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glDisable(GL_TEXTURE_2D);
glColor4f(1.0f,1.0f,1.0f,1.0f);
glBegin(GL_LINE);
glVertex2f(offset.x + 20.0f,offset.y+ 20.0f);
glVertex2f(offset.x + 20.0f,offset.y + 120.0f);
glEnd();
glDisable(GL_BLEND);
renderChildControls(offset, updateRect);
Torque 3D Owner Howard Dortch
Default Studio Name