sdl/opengl - RGB-Codes werden anders interpretiert
-
hallo,
ich möchte ein farbiges rect in sdl/opengl zeichen:
glColor3f((GLfloat)200,(GLfloat)0,(GLfloat)0); glBegin(GL_QUADS); glTexCoord2f(0.0f, 0.0f); glVertex2i(x, y); glTexCoord2f(1.0f, 0.0f); glVertex2i(x+w, y); glTexCoord2f(1.0f, 1.0f); glVertex2i(x+w, y+h); glTexCoord2f(0.0f, 1.0f); glVertex2i(x, y+h); glEnd(); glColor3f((GLfloat)255,(GLfloat)255,(GLfloat)255);allerdings entprechen die farben nicht den normalen rgb-farben
(habe die codes in paint von den farben die ich möchte rausgesucht)das gleiche problem habe ich bei meiner glClearColor(100, 40, 200, 255);
woran kann das liegen?
danke euch schonmal

-
Soweit ich weis gibt man bei glColor3f
die Farben mit Paramtern zwischen 0.0 und 1.0 anVersuchs vll. mal mit glColor3b
void glColor3b( GLbyte red, GLbyte green, GLbyte blue )Siehe dazu auch:
http://www.hmug.org/man/3/GLCOLOR.php