diff options
author | José Fonseca <jose.r.fonseca@gmail.com> | 2011-06-09 00:11:13 +0100 |
---|---|---|
committer | José Fonseca <jose.r.fonseca@gmail.com> | 2011-06-09 00:11:13 +0100 |
commit | bc45bdd10b91797e5073076fc4c84ab6bbc63c70 (patch) | |
tree | e5c263df2f5fa185c2ca414daaea325d4ad8bab9 /glsize.hpp | |
parent | cbd225f575a0b92a293513223c4c9a74d2d4f8ab (diff) |
(Re)trace glClearBuffer*v properly.
Diffstat (limited to 'glsize.hpp')
-rw-r--r-- | glsize.hpp | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -574,6 +574,25 @@ __gl_image_size(GLenum format, GLenum type, GLsizei width, GLsizei height, GLsiz #define __glBitmap_size(width, height) __glTexImage2D_size(GL_COLOR_INDEX, GL_BITMAP, width, height) #define __glPolygonStipple_size() __glBitmap_size(32, 32) +static inline size_t +__glClearBuffer_size(GLenum buffer) +{ + switch (buffer) { + case GL_COLOR: + case GL_FRONT: + case GL_BACK: + case GL_LEFT: + case GL_RIGHT: + case GL_FRONT_AND_BACK: + return 4; + case GL_DEPTH: + case GL_STENCIL: + return 1; + default: + OS::DebugMessage("apitrace: warning: %s: unexpected buffer GLenum 0x%04X\n", __FUNCTION__, buffer); + return 0; + } +} /* * 0 terminated integer/float attribute list. |