properly include gl includes
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
#ifndef LLMR_RENDERER_GL
|
||||
#define LLMR_RENDERER_GL
|
||||
|
||||
#if __APPLE__
|
||||
#ifdef NVIDIA
|
||||
#include <GLES2/gl2.h>
|
||||
#include <GLES2/gl2ext.h>
|
||||
// #include <EGL/egl.h>
|
||||
#elif __APPLE__
|
||||
#include "TargetConditionals.h"
|
||||
#if TARGET_OS_IPHONE
|
||||
#include <OpenGLES/ES2/gl.h>
|
||||
@@ -9,7 +13,6 @@
|
||||
#define glGenVertexArrays glGenVertexArraysOES
|
||||
#define glBindVertexArray glBindVertexArrayOES
|
||||
#define glDeleteVertexArrays glDeleteVertexArraysOES
|
||||
#define glClearDepth glClearDepthf
|
||||
#elif TARGET_IPHONE_SIMULATOR
|
||||
#include <OpenGLES/ES2/gl.h>
|
||||
#include <OpenGLES/ES2/glext.h>
|
||||
@@ -29,4 +32,16 @@
|
||||
#include <GL/glext.h>
|
||||
#endif
|
||||
|
||||
#ifdef GL_ES_VERSION_2_0
|
||||
#define glClearDepth glClearDepthf
|
||||
#endif
|
||||
|
||||
void _CHECK_GL_ERROR(const char *cmd, const char *file, int line);
|
||||
|
||||
#define _CHECK_ERROR(cmd, file, line) \
|
||||
cmd; \
|
||||
do { _CHECK_GL_ERROR(#cmd, file, line); } while (false);
|
||||
|
||||
#define CHECK_ERROR(cmd) _CHECK_ERROR(cmd, __FILE__, __LINE__)
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user