]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Remove GL defines in GLES mode
authoruis <uis9936@gmail.com>
Sun, 21 Jul 2024 23:13:27 +0000 (02:13 +0300)
committeruis <uis9936@gmail.com>
Sun, 21 Jul 2024 23:13:27 +0000 (02:13 +0300)
Now it does not compile for GLES

gl_backend.c
glquake.h

index b5336a226223f62d852b5760a5b8e534117c8546..8f15f9e626c054d581eb7445bb4b25c7c86a52c6 100644 (file)
@@ -955,7 +955,9 @@ static void GL_BindUBO(int bufferobject)
        }
 }
 
+#ifndef USE_GLES2
 static const GLuint drawbuffers[4] = {GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1, GL_COLOR_ATTACHMENT2, GL_COLOR_ATTACHMENT3};
+#endif
 int R_Mesh_CreateFramebufferObject(rtexture_t *depthtexture, rtexture_t *colortexture, rtexture_t *colortexture2, rtexture_t *colortexture3, rtexture_t *colortexture4)
 {
        int temp;
index 46efbf0721fe6ac23334c0a201fe1f9502d918b4..18d96939ee7e1f4cd94b8f22274c241e16cc0582 100644 (file)
--- a/glquake.h
+++ b/glquake.h
@@ -587,6 +587,43 @@ typedef void (GLAPIENTRY *GLDEBUGPROCARB)(GLenum source, GLenum type, GLuint id,
 #define GL_DEBUG_SEVERITY_MEDIUM_ARB      0x9147
 #define GL_DEBUG_SEVERITY_LOW_ARB         0x9148
 
+#define GL_COLOR_ATTACHMENT0                0x8CE0
+#define GL_COLOR_ATTACHMENT1                0x8CE1
+#define GL_COLOR_ATTACHMENT2                0x8CE2
+#define GL_COLOR_ATTACHMENT3                0x8CE3
+#define GL_COLOR_ATTACHMENT4                0x8CE4
+#define GL_COLOR_ATTACHMENT5                0x8CE5
+#define GL_COLOR_ATTACHMENT6                0x8CE6
+#define GL_COLOR_ATTACHMENT7                0x8CE7
+#define GL_COLOR_ATTACHMENT8                0x8CE8
+#define GL_COLOR_ATTACHMENT9                0x8CE9
+#define GL_COLOR_ATTACHMENT10               0x8CEA
+#define GL_COLOR_ATTACHMENT11               0x8CEB
+#define GL_COLOR_ATTACHMENT12               0x8CEC
+#define GL_COLOR_ATTACHMENT13               0x8CED
+#define GL_COLOR_ATTACHMENT14               0x8CEE
+#define GL_COLOR_ATTACHMENT15               0x8CEF
+
+#define GL_RGBA32F                                       0x8814
+#define GL_RGB32F                                        0x8815
+#define GL_ALPHA32F                                      0x8816
+#define GL_INTENSITY32F                                  0x8817
+#define GL_LUMINANCE32F                                  0x8818
+#define GL_LUMINANCE_ALPHA32F                            0x8819
+#define GL_RGBA16F                                       0x881A
+#define GL_RGB16F                                        0x881B
+#define GL_ALPHA16F                                      0x881C
+#define GL_INTENSITY16F                                  0x881D
+#define GL_LUMINANCE16F                                  0x881E
+#define GL_LUMINANCE_ALPHA16F                            0x881F
+
+#define GL_TEXTURE_3D                          0x806F
+
+#define GL_HALF_FLOAT                                    0x140B
+#define GL_MAJOR_VERSION                  0x821B
+#define GL_MINOR_VERSION                  0x821C
+#define GL_NUM_EXTENSIONS                 0x821D
+
 #endif //GL_ZERO
 
 extern GLboolean(GLAPIENTRY *qglIsBuffer) (GLuint buffer);
@@ -999,44 +1036,12 @@ extern void (GLAPIENTRY *qglViewport)(GLint x, GLint y, GLsizei width, GLsizei h
 #define qglVertexAttrib4usv glVertexAttrib4usv
 #define qglVertexAttribPointer glVertexAttribPointer
 #define qglViewport glViewport
-#endif //USE_GLES2
 
-#define GL_COLOR_ATTACHMENT0                0x8CE0
-#define GL_COLOR_ATTACHMENT1                0x8CE1
-#define GL_COLOR_ATTACHMENT2                0x8CE2
-#define GL_COLOR_ATTACHMENT3                0x8CE3
-#define GL_COLOR_ATTACHMENT4                0x8CE4
-#define GL_COLOR_ATTACHMENT5                0x8CE5
-#define GL_COLOR_ATTACHMENT6                0x8CE6
-#define GL_COLOR_ATTACHMENT7                0x8CE7
-#define GL_COLOR_ATTACHMENT8                0x8CE8
-#define GL_COLOR_ATTACHMENT9                0x8CE9
-#define GL_COLOR_ATTACHMENT10               0x8CEA
-#define GL_COLOR_ATTACHMENT11               0x8CEB
-#define GL_COLOR_ATTACHMENT12               0x8CEC
-#define GL_COLOR_ATTACHMENT13               0x8CED
-#define GL_COLOR_ATTACHMENT14               0x8CEE
-#define GL_COLOR_ATTACHMENT15               0x8CEF
-
-#define GL_RGBA32F                                       0x8814
-#define GL_RGB32F                                        0x8815
-#define GL_ALPHA32F                                      0x8816
-#define GL_INTENSITY32F                                  0x8817
-#define GL_LUMINANCE32F                                  0x8818
-#define GL_LUMINANCE_ALPHA32F                            0x8819
-#define GL_RGBA16F                                       0x881A
-#define GL_RGB16F                                        0x881B
-#define GL_ALPHA16F                                      0x881C
-#define GL_INTENSITY16F                                  0x881D
-#define GL_LUMINANCE16F                                  0x881E
-#define GL_LUMINANCE_ALPHA16F                            0x881F
-
-#define GL_TEXTURE_3D                          0x806F
+#define GL_RGBA16F GL_RGBA16F_EXT
+#define GL_RGBA32F GL_RGBA32F_EXT
+#define GL_HALF_FLOAT GL_HALF_FLOAT_OES
+#endif //USE_GLES2
 
-#define GL_HALF_FLOAT                                    0x140B
-#define GL_MAJOR_VERSION                  0x821B
-#define GL_MINOR_VERSION                  0x821C
-#define GL_NUM_EXTENSIONS                 0x821D
 
 
 //====================================================