OpenGL Fonts - Das ewige Problem
-
drei jahre später, aber es kommen ja immer noch leute her:
du musst die farbe VOR der rasterpos setzen.ein altguru hats so erklärt:
The trick is to set the color before you set the raster position:glColor3f(1.0, 0.0, 0.0); // sets the current color to red
glRasterPos2f(x, y); // sets the raster position and color
glColor3f(0.0, 1.0, 0.0); // sets the current color to blue
glBitmap(...); // draws a bitmap in redYou might expect to see a blue bitmap, but it will be red. In this
example, the second glColor() is just to demonstrate that the raster
color is set when you call glRasterPos(). The raster position is
treated like any other vertex: the position is transformed by the
current matrices, and the color is determined by the current color, or
by the current normal if lighting is enabled. Let me repeat that last
part: if lighting is enabled, the current color is ignored and the
raster color is determined by the lighting equation.