Debian Codegraph @

ruby/video/opengl/texture.hpp

raw
1 GLuint OpenGLTexture::getFormat() const {
2 if(format == GL_R32I) return GL_RED_INTEGER;
3 if(format == GL_R32UI) return GL_RED_INTEGER;
4 return GL_BGRA;
5 }
6
7 GLuint OpenGLTexture::getType() const {
8 if(format == GL_R32I) return GL_UNSIGNED_INT;
9 if(format == GL_R32UI) return GL_UNSIGNED_INT;
10 if(format == GL_RGB10_A2) return GL_UNSIGNED_INT_2_10_10_10_REV;
11 return GL_UNSIGNED_INT_8_8_8_8_REV;
12 }