UPDATE: Officially support OpenGL 4.3
This commit is contained in:
parent
628e6e52f3
commit
7a16834124
13682
src/external/glad.h
vendored
13682
src/external/glad.h
vendored
File diff suppressed because it is too large
Load Diff
10
src/rlgl.h
10
src/rlgl.h
@ -146,6 +146,7 @@
|
|||||||
#if !defined(GRAPHICS_API_OPENGL_11) && \
|
#if !defined(GRAPHICS_API_OPENGL_11) && \
|
||||||
!defined(GRAPHICS_API_OPENGL_21) && \
|
!defined(GRAPHICS_API_OPENGL_21) && \
|
||||||
!defined(GRAPHICS_API_OPENGL_33) && \
|
!defined(GRAPHICS_API_OPENGL_33) && \
|
||||||
|
!defined(GRAPHICS_API_OPENGL_43) && \
|
||||||
!defined(GRAPHICS_API_OPENGL_ES2)
|
!defined(GRAPHICS_API_OPENGL_ES2)
|
||||||
#define GRAPHICS_API_OPENGL_33
|
#define GRAPHICS_API_OPENGL_33
|
||||||
#endif
|
#endif
|
||||||
@ -158,6 +159,9 @@
|
|||||||
#if defined(GRAPHICS_API_OPENGL_33)
|
#if defined(GRAPHICS_API_OPENGL_33)
|
||||||
#undef GRAPHICS_API_OPENGL_33
|
#undef GRAPHICS_API_OPENGL_33
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(GRAPHICS_API_OPENGL_43)
|
||||||
|
#undef GRAPHICS_API_OPENGL_43
|
||||||
|
#endif
|
||||||
#if defined(GRAPHICS_API_OPENGL_ES2)
|
#if defined(GRAPHICS_API_OPENGL_ES2)
|
||||||
#undef GRAPHICS_API_OPENGL_ES2
|
#undef GRAPHICS_API_OPENGL_ES2
|
||||||
#endif
|
#endif
|
||||||
@ -730,10 +734,10 @@ RLAPI void rlLoadDrawQuad(void); // Load and draw a quad
|
|||||||
#include <OpenGL/gl3.h> // OpenGL 3 library for OSX
|
#include <OpenGL/gl3.h> // OpenGL 3 library for OSX
|
||||||
#include <OpenGL/gl3ext.h> // OpenGL 3 extensions library for OSX
|
#include <OpenGL/gl3ext.h> // OpenGL 3 extensions library for OSX
|
||||||
#else
|
#else
|
||||||
#define GLAD_REALLOC RL_REALLOC
|
#define GLAD_MALLOC RL_MALLOC
|
||||||
#define GLAD_FREE RL_FREE
|
#define GLAD_FREE RL_FREE
|
||||||
|
|
||||||
#define GLAD_IMPLEMENTATION
|
#define GLAD_GL_IMPLEMENTATION
|
||||||
#include "external/glad.h" // GLAD extensions loading library, includes OpenGL headers
|
#include "external/glad.h" // GLAD extensions loading library, includes OpenGL headers
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -1892,7 +1896,7 @@ void rlLoadExtensions(void *loader)
|
|||||||
#if defined(GRAPHICS_API_OPENGL_33) // Also defined for GRAPHICS_API_OPENGL_21
|
#if defined(GRAPHICS_API_OPENGL_33) // Also defined for GRAPHICS_API_OPENGL_21
|
||||||
// NOTE: glad is generated and contains only required OpenGL 3.3 Core extensions (and lower versions)
|
// NOTE: glad is generated and contains only required OpenGL 3.3 Core extensions (and lower versions)
|
||||||
#if !defined(__APPLE__)
|
#if !defined(__APPLE__)
|
||||||
if (!gladLoadGLLoader((GLADloadproc)loader)) TRACELOG(RL_LOG_WARNING, "GLAD: Cannot load OpenGL extensions");
|
if (gladLoadGL((GLADloadfunc)loader) == 0) TRACELOG(RL_LOG_WARNING, "GLAD: Cannot load OpenGL extensions");
|
||||||
else TRACELOG(RL_LOG_INFO, "GLAD: OpenGL extensions loaded successfully");
|
else TRACELOG(RL_LOG_INFO, "GLAD: OpenGL extensions loaded successfully");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user