mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Merge pull request #16182 from unknownbrackets/gles-indexed
GLES: Use GL_LUMINANCE on GLES for indexed tex
This commit is contained in:
commit
10fedf19bd
2 changed files with 11 additions and 14 deletions
|
@ -398,15 +398,3 @@ public:
|
|||
#undef STATE2
|
||||
|
||||
extern DirectXState dxstate;
|
||||
|
||||
struct GLExtensions {
|
||||
bool OES_depth24;
|
||||
bool OES_packed_depth_stencil;
|
||||
bool OES_depth_texture;
|
||||
bool EXT_discard_framebuffer;
|
||||
bool FBO_ARB;
|
||||
};
|
||||
|
||||
extern GLExtensions gl_extensions;
|
||||
|
||||
void CheckGLExtensions();
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "Common/GPU/OpenGL/DataFormatGL.h"
|
||||
#include "Common/GPU/OpenGL/GLFeatures.h"
|
||||
#include "Common/Log.h"
|
||||
|
||||
namespace Draw {
|
||||
|
@ -15,8 +16,16 @@ bool Thin3DFormatToGLFormatAndType(DataFormat fmt, GLuint &internalFormat, GLuin
|
|||
break;
|
||||
|
||||
case DataFormat::R8_UNORM:
|
||||
internalFormat = GL_RGBA;
|
||||
format = GL_RED;
|
||||
if (gl_extensions.IsGLES) {
|
||||
internalFormat = GL_LUMINANCE;
|
||||
format = GL_LUMINANCE;
|
||||
} else if (gl_extensions.VersionGEThan(3, 0)) {
|
||||
internalFormat = GL_RED;
|
||||
format = GL_RED;
|
||||
} else {
|
||||
internalFormat = GL_RGBA;
|
||||
format = GL_RED;
|
||||
}
|
||||
type = GL_UNSIGNED_BYTE;
|
||||
alignment = 1;
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue