comparison dmglrender.cpp @ 96:50a69d327b4f

Remove support for GL_GLEXT_PROTOTYPES.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 25 May 2021 02:35:14 +0300
parents 28dd29f3a65f
children
comparison
equal deleted inserted replaced
95:59195e95c080 96:50a69d327b4f
8 // 8 //
9 #include "dmglrender.h" 9 #include "dmglrender.h"
10 #include <GL/glu.h> 10 #include <GL/glu.h>
11 11
12 12
13 #ifdef GL_GLEXT_PROTOTYPES
14 #define DM_GLEXT_INIT(extproctype, extprocname) /* stub */
15 #else
16 #define DM_GLEXT_INIT(extproctype, extprocname) extproctype extprocname = NULL; 13 #define DM_GLEXT_INIT(extproctype, extprocname) extproctype extprocname = NULL;
17 #include "dmglexts.h" 14 #include "dmglexts.h"
18 #undef DM_GLEXT_INIT 15 #undef DM_GLEXT_INIT
19 16
20 17
51 if (!ok) 48 if (!ok)
52 status = false; 49 status = false;
53 50
54 return ptr; 51 return ptr;
55 } 52 }
56 #endif
57 53
58 54
59 static bool dmCompileShader(const GLenum stype, const std::string &src, GLuint &shader) 55 static bool dmCompileShader(const GLenum stype, const std::string &src, GLuint &shader)
60 { 56 {
61 GLint status; 57 GLint status;
143 return true; 139 return true;
144 140
145 bool status = true; 141 bool status = true;
146 dmMsg("Checking for required OpenGL extensions ..\n"); 142 dmMsg("Checking for required OpenGL extensions ..\n");
147 143
148 #ifndef GL_GLEXT_PROTOTYPES
149 dmGLCheckExtension("GL_ARB_shader_objects", status); 144 dmGLCheckExtension("GL_ARB_shader_objects", status);
150 dmGLCheckExtension("GL_ARB_shading_language_100", status); 145 dmGLCheckExtension("GL_ARB_shading_language_100", status);
151 dmGLCheckExtension("GL_ARB_vertex_shader", status); 146 dmGLCheckExtension("GL_ARB_vertex_shader", status);
152 dmGLCheckExtension("GL_ARB_fragment_shader", status); 147 dmGLCheckExtension("GL_ARB_fragment_shader", status);
153 if (!status) 148 if (!status)
157 } 152 }
158 153
159 #define DM_GLEXT_INIT(extproctype, extprocname) \ 154 #define DM_GLEXT_INIT(extproctype, extprocname) \
160 extprocname = (extproctype) dmGLExtInit(#extprocname, status); 155 extprocname = (extproctype) dmGLExtInit(#extprocname, status);
161 #include "dmglexts.h" 156 #include "dmglexts.h"
162 #endif 157 #undef DM_GLEXT_INIT
163 158
164 return status; 159 return status;
165 } 160 }
166 161
167 162