[AD] question about opengl bitmaps |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Hi,
What's this block in ogl_lock_region for?
--- src/opengl/ogl_bitmap.c (revision 11443)
+++ src/opengl/ogl_bitmap.c (local)
@@ -295,6 +295,7 @@ static ALLEGRO_LOCKED_REGION *ogl_lock_r
else {
//FIXME: use glPixelStore or similar to only synchronize the required
//region
+#if 0
glBindTexture(GL_TEXTURE_2D, ogl_bitmap->texture);
glGetTexImage(GL_TEXTURE_2D, 0, glformats[bitmap->format][2],
glformats[bitmap->format][1], bitmap->memory);
@@ -302,6 +303,7 @@ static ALLEGRO_LOCKED_REGION *ogl_lock_r
TRACE("ogl_bitmap: glGetTexImage for format %d failed.\n",
bitmap->format);
}
+#endif
}
}
AFAICS we already upload when a writable rectangle is unlocked so do we
need to do anything for locking?
That code is responsible for making all examples which use fonts to load
extremely slowly here (6 s or more), as the same bitmap is reuploaded
after grabbing each character in the font. All the examples and demos
still work after commenting it out.
Peter