glBegin(GL_LINES);
glColor4ub(255, 255, 255, 255);
glVertex2f( (GLfloat)x1, (GLfloat)y1);
glVertex2f( (GLfloat)x2, (GLfloat)y2);
glEnd();
But the line isn''t white, it''s greenish. But when I do this
glColor4ub(255, 0, 0, 255);
I get a red line, tough, it''s dark
glColor4ub(0, 255, 0, 255);
I get a green line, tough it''s dark too and the same goes for
glColor4ub(0, 0, 255, 255);
and
glColor4ub(255, 0, 255, 255);
and
glColor4ub(0, 255, 255, 255);
Which all seems to work fine, I have tried passing values to glColor4ub of type
typedef unsigned char BYTE;
but it didn''t change anything...
Can anyone help me out with this ?
WHO DO THEY
THINK THEY''RE
FOOLING : YOU ?
Problem with glColor4ub
I am using the following code to render a line :
WHO DO THEYTHINK THEY'REFOOLING : YOU ?
You probably have lighting or texturing enabled, which also affects the color of the line.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement