Hi there,
I have another problem about gl.glColor3f(). In my game, I draw a floor, walls and some text.
private void renderScene()
{
gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
gl.glMatrixMode(GL.GL_MODELVIEW);
gl.glLoadIdentity();
drawFloor();
drawText();
drawWall();
}
in each “draw” method, I define a color for it.
void drawFloor()
{
gl.glColor3f(1.0f, 1.0f, 1.0f);
}
void drawWall()
{
gl.glColor3f(0.2f, 0.2f, 0.2f);
}
void drawText()
{
gl.glColor3f(0.1f, 0.6f, 0.5f);
}
but when I run the program, all the floor, wall and text are in the same color. I don’t know why. How can I use different color for different things in JOGL?
Thanks a lot !