mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 17:53:42 +01:00
Merge pull request #16182 from unknownbrackets/gles-indexed
GLES: Use GL_LUMINANCE on GLES for indexed tex
This commit is contained in:
2 files changed
+11
-14
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user