map draw working with lil bugs

This commit is contained in:
Henrique
2011-08-11 02:52:30 -03:00
parent 3a5683b549
commit 651315d4cd
24 changed files with 616 additions and 163 deletions

View File

@@ -34,7 +34,9 @@ Texture::Texture(int width, int height, int channels, uchar *pixels)
uint Texture::internalLoadGLTexture(uchar *pixels, int channels, int width, int height)
{
GLint texSize;
g_graphics.disableDrawing();
GLint texSize = 0;
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &texSize);
if(width > texSize || height > texSize) {
logError("loading texture with size ",width,"x",height," failed, the maximum size is ",texSize,"x",texSize);