[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Hi!
I have found two problems in SVN version. Normally I would just commit a patch,
but we're aiming for a stable release soon and I haven't been carefully
following discussions lately so I'll ask first.
1.
Isn't al_create_sub_bitmap() supposed to clip w and h parameters to parent's
width/height? I know there have been some changes regarding that.
2.
Index: src/opengl/ogl_bitmap.c
===================================================================
--- src/opengl/ogl_bitmap.c (revision 13538)
+++ src/opengl/ogl_bitmap.c (working copy)
@@ -561,7 +561,7 @@
* However if we do that, without NPOT textures, we get some junk at the
* edges of our bitmaps when we draw them.
*/
- unsigned char *buf = al_calloc(ogl_bitmap->true_h, ogl_bitmap->true_w);
+ unsigned char *buf = al_calloc(4, ogl_bitmap->true_h * ogl_bitmap->true_w);
glTexImage2D(GL_TEXTURE_2D, 0, glformats[bitmap->format][0],
ogl_bitmap->true_w, ogl_bitmap->true_h, 0,
GL_ALPHA, GL_UNSIGNED_BYTE, buf);
I have hardcoded a "4" there but you get the picture. Valgrind told me about this.
--
Milan Mimica
http://sparklet.sf.net