diff engine/core/video/opengl/glimage.cpp @ 661:e3140f01749d

* Merged the light branch back into trunk. * Modified the demos so they work with the new loaders and setting.
author helios2000@33b003aa-7bff-0310-803a-e67f0ece8222
date Fri, 05 Nov 2010 15:21:10 +0000
parents 5d6b1820b953
children
line wrap: on
line diff
--- a/engine/core/video/opengl/glimage.cpp	Wed Nov 03 13:44:12 2010 +0000
+++ b/engine/core/video/opengl/glimage.cpp	Fri Nov 05 15:21:10 2010 +0000
@@ -110,7 +110,7 @@
 		uint16_t w = static_cast<int>(round(scale_x*m_surface->w));
 		uint16_t h = static_cast<int>(round(scale_y*m_surface->h));
 
-		/// setting transparency for the whole primitive:
+		// setting transparency for the whole primitive:
 		glColor4ub( 255, 255, 255, alpha );
 
 		glEnable(GL_TEXTURE_2D);
@@ -239,7 +239,7 @@
 		glScissor(cliparea.x, getHeight() - cliparea.y - cliparea.h, cliparea.w, cliparea.h);
 
 		if (clear) {
-	        	glClear(GL_COLOR_BUFFER_BIT);
+			glClear(GL_COLOR_BUFFER_BIT);
 		}
 	}
 
@@ -277,4 +277,9 @@
 		cleanup();
 		m_sdlimage->drawVertex(p, size, r, g, b, a);
 	}
+
+	void GLImage::drawLightPrimitive(const Point& p, uint8_t intensity, float radius, int subdivisions, float xstretch, float ystretch, uint8_t red, uint8_t green, uint8_t blue) {
+		cleanup();
+		m_sdlimage->drawLightPrimitive(p, intensity, radius, subdivisions, xstretch, ystretch, red, green, blue);
+	}
 }