]> git.tdb.fi Git - gldbg.git/blobdiff - source/arraysize.c
Fix some array size calculations
[gldbg.git] / source / arraysize.c
index b81ea4beaf1b311a3e5fbc7487e0c2c7fc1bc187..779fbea6c5f376c165614a798acc7a3e80bbe218 100644 (file)
@@ -89,8 +89,13 @@ int paramsize(GLenum pname)
        }
 }
 
-int mapsize(GLenum target __attribute__((unused)))
+int buffersize(GLenum buffer)
 {
-       // XXX Implement this
-       return 1;
+       switch(buffer)
+       {
+       case GL_COLOR: return 4;
+       case GL_DEPTH: return 1;
+       case GL_STENCIL: return 1;
+       default: return 1;
+       }
 }