]> git.cworth.org Git - apitrace/blobdiff - retrace/glstate_images.cpp
Don't abuse double-underscore prefix.
[apitrace] / retrace / glstate_images.cpp
index f16cba41194a3c5b58ff219b1ec8fcc70d6c762a..55afdd0a00392eba28c69b3eae459f1fe2d92f94 100644 (file)
@@ -467,7 +467,7 @@ dumpTextures(JSONWriter &json, Context &context)
      * proper value for this, but rather returns 0. The GL(ES) specification
      * mandates a minimum value of 2, so use this as a fall-back value.
      */
-    max_units = std::min(max_units, 2);
+    max_units = std::max(max_units, 2);
 
     for (GLint unit = 0; unit < max_units; ++unit) {
         GLenum texture = GL_TEXTURE0 + unit;
@@ -709,7 +709,7 @@ getFramebufferAttachmentDesc(Context &context, GLenum target, GLenum attachment,
 image::Image *
 getDrawBufferImage() {
     GLenum format = GL_RGB;
-    GLint channels = __gl_format_channels(format);
+    GLint channels = _gl_format_channels(format);
     if (channels > 4) {
         return NULL;
     }
@@ -816,7 +816,7 @@ static inline void
 dumpReadBufferImage(JSONWriter &json, GLint width, GLint height, GLenum format,
                     GLint internalFormat = GL_NONE)
 {
-    GLint channels = __gl_format_channels(format);
+    GLint channels = _gl_format_channels(format);
 
     Context context;