mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-26 20:28:49 -05:00
Removed unused bits of glad.
This commit is contained in:
parent
6e0015f022
commit
fc92c5cc73
38
deps/glad.c
vendored
38
deps/glad.c
vendored
|
@ -1,44 +1,6 @@
|
|||
#include <string.h>
|
||||
#include <glad/glad.h>
|
||||
|
||||
static int has_ext(const char *ext) {
|
||||
if(GLVersion.major < 3) {
|
||||
const char *extensions;
|
||||
const char *loc;
|
||||
const char *terminator;
|
||||
extensions = (const char *)glGetString(GL_EXTENSIONS);
|
||||
if(extensions == NULL || ext == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
while(1) {
|
||||
loc = strstr(extensions, ext);
|
||||
if(loc == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
terminator = loc + strlen(ext);
|
||||
if((loc == extensions || *(loc - 1) == ' ') &&
|
||||
(*terminator == ' ' || *terminator == '\0')) {
|
||||
return 1;
|
||||
}
|
||||
extensions = terminator;
|
||||
}
|
||||
} else {
|
||||
int num;
|
||||
glGetIntegerv(GL_NUM_EXTENSIONS, &num);
|
||||
|
||||
unsigned int index;
|
||||
for(index = 0; index < num; index++) {
|
||||
const char *e = (const char*)glGetStringi(GL_EXTENSIONS, index);
|
||||
if(strcmp(e, ext) == 0) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
int GLAD_GL_VERSION_1_0;
|
||||
int GLAD_GL_VERSION_1_1;
|
||||
int GLAD_GL_VERSION_1_2;
|
||||
|
|
3
deps/glad/glad.h
vendored
3
deps/glad/glad.h
vendored
|
@ -21,9 +21,6 @@
|
|||
#ifndef APIENTRYP
|
||||
#define APIENTRYP APIENTRY *
|
||||
#endif
|
||||
#ifndef GLAPI
|
||||
#define GLAPI extern
|
||||
#endif
|
||||
|
||||
struct {
|
||||
int major;
|
||||
|
|
Loading…
Reference in New Issue
Block a user