Update of /cvsroot/super-tux/supertux/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25394/src
Modified Files:
background.cpp
Log Message:
Ignore the gradient Surface (cache) when in OpenGL (as asked by Ryan).
Index: background.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/background.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- background.cpp 10 Jun 2004 14:09:49 -0000 1.7
+++ background.cpp 10 Jun 2004 15:50:01 -0000 1.8
@@ -104,8 +104,12 @@
Background::draw(DrawingContext& context)
{
if(type == GRADIENT) {
- context.draw_surface(image, Vector(0, 0), LAYER_BACKGROUND0);
-// context.draw_gradient(gradient_top, gradient_bottom, LAYER_BACKGROUND0);
+ /* In case we are using OpenGL just draw the gradient, else (software mode)
+ use the cache. */
+ if(use_gl)
+ context.draw_gradient(gradient_top, gradient_bottom, LAYER_BACKGROUND0);
+ else
+ context.draw_surface(image, Vector(0, 0), LAYER_BACKGROUND0);
} else if(type == IMAGE) {
int sx = int(-context.get_translation().x * speed)
% image->w - image->w;
|