More correct implementation of RGB565 Framebuffer format
This commit is contained in:
@@ -16,6 +16,7 @@ namespace Tegra {
|
||||
u32 FramebufferConfig::BytesPerPixel(PixelFormat format) {
|
||||
switch (format) {
|
||||
case PixelFormat::ABGR8:
|
||||
case PixelFormat::RGB565:
|
||||
return 4;
|
||||
default:
|
||||
return 4;
|
||||
|
||||
@@ -308,6 +308,12 @@ void RendererOpenGL::ConfigureFramebufferTexture(TextureInfo& texture,
|
||||
texture.gl_type = GL_UNSIGNED_INT_8_8_8_8_REV;
|
||||
gl_framebuffer_data.resize(texture.width * texture.height * 4);
|
||||
break;
|
||||
case Tegra::FramebufferConfig::PixelFormat::RGB565:
|
||||
internal_format = GL_RGB;
|
||||
texture.gl_format = GL_RGB;
|
||||
texture.gl_type = GL_UNSIGNED_SHORT_5_6_5;
|
||||
gl_framebuffer_data.resize(texture.width * texture.height * 4);
|
||||
break;
|
||||
default:
|
||||
internal_format = GL_RGBA;
|
||||
texture.gl_format = GL_RGBA;
|
||||
|
||||
Reference in New Issue
Block a user