[Development] Blacklines only in OpenGL in a QGLView
niallcwhelan at eircom.net
niallcwhelan at eircom.net
Wed Aug 21 14:11:58 CEST 2013
Hi,
I'm using QGLView and glColor3f to set a line colour to any colour, but it only renders black lines.
For example:
void CubeView::plotLine( QVector3D start, QVector3D end )
{
glColor3f(1.0f,1.0f,1.0f); // Set my lines colour...
glLineWidth(3.0);
glEnable(GL_LINE_SMOOTH);
glBegin(GL_LINES);
glVertex3f(start.x(), start.y(), start.z());
glVertex3f(end.x(), end.y(), end.z());
glEnd();
glFlush();
}
Regardless of values is glColor3f, black is the only line colour drawn.
Suggestions gratefully received.
Niall.
More information about the Development
mailing list