diff options
author | José Fonseca <jose.r.fonseca@gmail.com> | 2012-10-19 14:27:48 +0100 |
---|---|---|
committer | José Fonseca <jose.r.fonseca@gmail.com> | 2012-10-19 14:27:48 +0100 |
commit | 7c0362cdbe4dfae3c6ce0432d2fee16498288f2d (patch) | |
tree | 76567fefd19b81f88754458002f03a7ab4462f84 /helpers | |
parent | ba42a90896aa3539bfc18d1327d5a73637b3d098 (diff) |
Handle GL_ARB_vertex_array_bgra better.
Size can be a symbolic constant GL_BGRA, instead of a numeric value.
Diffstat (limited to 'helpers')
-rw-r--r-- | helpers/glsize.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/helpers/glsize.hpp b/helpers/glsize.hpp index 6ffba688..24c0ac99 100644 --- a/helpers/glsize.hpp +++ b/helpers/glsize.hpp @@ -301,6 +301,14 @@ _glArrayPointer_size(GLint size, GLenum type, GLsizei stride, GLsizei count) return 0; } + if (size == GL_BGRA) { + size = 4; + } + + if (size > 4) { + os::log("apitrace: warning: %s: unexpected size 0x%04X\n", __FUNCTION__, size); + } + size_t elementSize = size*_gl_type_size(type); if (!stride) { stride = (GLsizei)elementSize; |