[Scummvm-cvs-logs] CVS: residual bitmap.cpp,1.1,1.2

James Brown ender at users.sourceforge.net
Sat Aug 16 11:14:04 CEST 2003


Update of /cvsroot/scummvm/residual
In directory sc8-pr-cvs1:/tmp/cvs-serv31520

Modified Files:
	bitmap.cpp 
Log Message:
Add fixme for huuuuuuge performance bottleneck


Index: bitmap.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/bitmap.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- bitmap.cpp	15 Aug 2003 19:41:26 -0000	1.1
+++ bitmap.cpp	16 Aug 2003 17:34:33 -0000	1.2
@@ -69,12 +69,15 @@
 
 void Bitmap::draw() const {
   glRasterPos2i(x_, y_);
+
+  // FIXME: glDrawPixels is SLOW, we should be splitting the image into precached textures
+  // and mapping them onto rectangles, or something.
   if (format_ == 1)
-    glDrawPixels(width_, height_, GL_RGB, GL_UNSIGNED_SHORT_5_6_5,
-		 data_[curr_image_]);
-  else if (format_ == 5)
-    glDrawPixels(width_, height_, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT,
-		 data_[curr_image_]);
+    glDrawPixels(width_, height_, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, data_[curr_image_]);
+  else if (format_ == 5) {
+    printf("format2\n");
+    glDrawPixels(width_, height_, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, data_[curr_image_]);
+  }
 }
 
 Bitmap::~Bitmap() {





More information about the Scummvm-git-logs mailing list