fix some incompatibilities between google3/third_party/GL,EGL, glad

This commit is contained in:
Erwin Coumans
2018-05-03 09:06:30 -07:00
parent 4a8ad1a54e
commit 0c706eb08a
5 changed files with 21 additions and 7 deletions

View File

@@ -38,7 +38,7 @@
#include "OpenGLInclude.h"
#include "third_party/GL/EGL/egl.h"
#include "third_party/GL/gl/include/EGL/egl.h"
#include "third_party/GL/gl/include/EGL/eglext.h"
#include "third_party/GL/gl/include/GL/gl.h"

View File

@@ -17,12 +17,20 @@ subject to the following restrictions:
#ifndef __OPENGL_INCLUDE_H
#define __OPENGL_INCLUDE_H
#ifdef BT_NO_GLAD
#include "third_party/GL/gl/include/EGL/egl.h"
#include "third_party/GL/gl/include/EGL/eglext.h"
#include "third_party/GL/gl/include/GL/gl.h"
#else
#ifdef B3_USE_GLFW
#include "glad/glad.h"
#include <GLFW/glfw3.h>
#else
#include "glad/glad.h"
#endif //B3_USE_GLFW
#endif //BT_NO_GLAD
//disable glGetError
//#undef glGetError
//#define glGetError MyGetError

View File

@@ -17,12 +17,17 @@ subject to the following restrictions:
#ifndef __OPENGL_INCLUDE_H
#define __OPENGL_INCLUDE_H
#ifdef BT_NO_GLAD
#include "third_party/GL/gl/include/EGL/egl.h"
#include "third_party/GL/gl/include/EGL/eglext.h"
#include "third_party/GL/gl/include/GL/gl.h"
#else
#ifdef B3_USE_GLFW
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#else
#include "glad/glad.h"
#endif //B3_USE_GLFW
#endif //BT_NO_GLAD
#endif //__OPENGL_INCLUDE_H

View File

@@ -6,11 +6,6 @@
#include<stdio.h>
#include<stdlib.h>
#ifdef GLEW_STATIC
#include "glad/glad.h"
#else
#include <GL/glew.h>
#endif//GLEW_STATIC
#ifdef GLEW_DYNAMIC_LOAD_ALL_GLX_FUNCTIONS
#include "glad/glad_glx.h"