OpenGL2: Add OpenGL ES 2.0+ support

This mainly targets OpenGL ES 2.0 but it also supports compiling GLSL as
ESSL 3.00. It's missing support for framebuffer objects which should be
possible on ES 2. (Though using renderbuffers instead of textures.)

opengl1 cvars that are not supported will display a message and disable
the cvar. This has not been reviewed for new opengl2 cvars. Enabling
cvars may cause rendering issues. Some of the broken cvars may be
possible to support using OpenGL ES 3 features.

The game displays okay with the default cvars.
This commit is contained in:
Zack Middleton committed 2024-06-05 21:33:08 -05:00
1 parent 1fc83e4845
commit 3b984d2b51
14 files changed
+658 -167

No files matched your search

+9
View File
@@ -1406,6 +1406,7 @@ typedef struct {
qboolean intelGraphics;
qboolean occlusionQuery;
GLenum occlusionQueryTarget;
int glslMajorVersion;
int glslMinorVersion;
@@ -1429,6 +1430,12 @@ typedef struct {
qboolean vertexArrayObject;
qboolean directStateAccess;
// OpenGL ES extensions
qboolean readDepth;
qboolean readStencil;
qboolean shadowSamplers;
qboolean standardDerivatives;
} glRefConfig_t;
@@ -2502,5 +2509,7 @@ size_t RE_SaveJPGToBuffer(byte *buffer, size_t bufSize, int quality,
void RE_TakeVideoFrame( int width, int height,
byte *captureBuffer, byte *encodeBuffer, qboolean motionJpeg );
void R_ConvertTextureFormat( const byte *in, int width, int height, GLenum format, GLenum type, byte *out );
#endif //TR_LOCAL_H