- GradientRequest* gradientrequest = (GradientRequest*) request.request_data;
- const Color& top = gradientrequest->top;
- const Color& bottom = gradientrequest->bottom;
-
- glDisable(GL_TEXTURE_2D);
- glBegin(GL_QUADS);
- glColor4f(top.red, top.green, top.blue, top.alpha);
- glVertex2f(0, 0);
- glVertex2f(SCREEN_WIDTH, 0);
- glColor4f(bottom.red, bottom.green, bottom.blue, bottom.alpha);
- glVertex2f(SCREEN_WIDTH, SCREEN_HEIGHT);
- glVertex2f(0, SCREEN_HEIGHT);
- glEnd();
- glEnable(GL_TEXTURE_2D);
-
- delete gradientrequest;
-}
-
-void
-DrawingContext::draw_text(DrawingRequest& request)
-{
- TextRequest* textrequest = (TextRequest*) request.request_data;
+ if( ambient_color.red == 1.0f && ambient_color.green == 1.0f
+ && ambient_color.blue == 1.0f ) {
+ *color = Color( 1.0f, 1.0f, 1.0f);
+ return;
+ }