Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
OpenGL: Fix BGRA format mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed Feb 21, 2024
1 parent b7ef60d commit 053c2a7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/Irrlicht/OpenGLES2/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ namespace video {
TextureFormats[ECF_D24S8] = {GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8};

if (FeatureAvailable[IRR_GL_EXT_texture_format_BGRA8888])
TextureFormats[ECF_A8R8G8B8] = {GL_RGBA, GL_BGRA, GL_UNSIGNED_BYTE};
else if (FeatureAvailable[IRR_GL_APPLE_texture_format_BGRA8888])
TextureFormats[ECF_A8R8G8B8] = {GL_BGRA, GL_BGRA, GL_UNSIGNED_BYTE};
else if (FeatureAvailable[IRR_GL_APPLE_texture_format_BGRA8888])
TextureFormats[ECF_A8R8G8B8] = {GL_BGRA8_EXT, GL_BGRA, GL_UNSIGNED_BYTE};

if (FeatureAvailable[IRR_GL_OES_depth32])
TextureFormats[ECF_D32] = {GL_DEPTH_COMPONENT32, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT};
Expand All @@ -68,9 +68,9 @@ namespace video {
TextureFormats[ECF_A8R8G8B8] = {GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, CColorConverter::convert_A8R8G8B8toA8B8G8R8};

if (FeatureAvailable[IRR_GL_EXT_texture_format_BGRA8888])
TextureFormats[ECF_A8R8G8B8] = {GL_RGBA, GL_BGRA, GL_UNSIGNED_BYTE};
else if (FeatureAvailable[IRR_GL_APPLE_texture_format_BGRA8888])
TextureFormats[ECF_A8R8G8B8] = {GL_BGRA, GL_BGRA, GL_UNSIGNED_BYTE};
else if (FeatureAvailable[IRR_GL_APPLE_texture_format_BGRA8888])
TextureFormats[ECF_A8R8G8B8] = {GL_BGRA8_EXT, GL_BGRA, GL_UNSIGNED_BYTE};

if (FeatureAvailable[IRR_GL_OES_texture_half_float]) {
TextureFormats[ECF_A16B16G16R16F] = {GL_RGBA, GL_RGBA, HALF_FLOAT_OES};
Expand Down

0 comments on commit 053c2a7

Please sign in to comment.