+@@ -238,39 +239,14 @@
+ }
+
+ void
+-DrawingContext::get_light(const Vector& position, Color* color)
++DrawingContext::get_light(const Vector& , Color* color)
+ {
+- 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;
+- }
+- DrawingRequest request;
+- request.type = GETLIGHT;
+- request.pos = transform.apply(position);
+- request.layer = LAYER_GUI; //make sure all get_light requests are handled last.
+-
+- GetLightRequest* getlightrequest = new GetLightRequest;
+- getlightrequest->color_ptr = color;
+- request.request_data = getlightrequest;
+- lightmap_requests.push_back(request);
++ *color = Color(1.0f, 1.0f, 1.0f);
+ }
+
+ void
+-DrawingContext::get_light(DrawingRequest& request)
++DrawingContext::get_light(DrawingRequest& )
+ {
+- GetLightRequest* getlightrequest = (GetLightRequest*) request.request_data;
+-
+- float pixels[3];
+- for( int i = 0; i<3; i++)
+- pixels[i] = 0.0f; //set to black
+-
+- //TODO: hacky. Make coordinate conversion more generic
+- glReadPixels((GLint) request.pos.x / 4, 600-(GLint)request.pos.y / 4, 1, 1, GL_RGB, GL_FLOAT, pixels);
+- *(getlightrequest->color_ptr) = Color( pixels[0], pixels[1], pixels[2]);
+- //printf("get_light %f/%f r%f g%f b%f\n", request.pos.x, request.pos.y, pixels[0], pixels[1], pixels[2]);
+-
+- delete getlightrequest;
+ }
+
+ void
+@@ -288,6 +264,45 @@