Files
bsnes/ruby/video/opengl/texture.hpp
byuu 903d1e4012 v107.8
* GB: integrated SameBoy v0.12.1 by Lior Halphon
* SFC: added HG51B169 (Cx4) math tables into bsnes binary
2019-07-17 21:11:46 +09:00

13 lines
418 B
C++
Executable File

auto OpenGLTexture::getFormat() const -> GLuint {
if(format == GL_R32I) return GL_RED_INTEGER;
if(format == GL_R32UI) return GL_RED_INTEGER;
return GL_BGRA;
}
auto OpenGLTexture::getType() const -> GLuint {
if(format == GL_R32I) return GL_UNSIGNED_INT;
if(format == GL_R32UI) return GL_UNSIGNED_INT;
if(format == GL_RGB10_A2) return GL_UNSIGNED_INT_2_10_10_10_REV;
return GL_UNSIGNED_INT_8_8_8_8_REV;
}