mirror of
https://github.com/DerKoun/bsnes-hd.git
synced 2025-04-02 10:52:49 -04:00
12 lines
418 B
C++
12 lines
418 B
C++
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;
|
|
}
|