From e9981f0c150840448d519d4a978199424bb51708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Wed, 5 Mar 2014 16:50:30 +0100 Subject: [PATCH] properly include gl includes --- include/llmr/platform/gl.hpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/include/llmr/platform/gl.hpp b/include/llmr/platform/gl.hpp index b180d5e21..3fc332d0e 100644 --- a/include/llmr/platform/gl.hpp +++ b/include/llmr/platform/gl.hpp @@ -1,7 +1,11 @@ #ifndef LLMR_RENDERER_GL #define LLMR_RENDERER_GL -#if __APPLE__ +#ifdef NVIDIA + #include + #include + // #include +#elif __APPLE__ #include "TargetConditionals.h" #if TARGET_OS_IPHONE #include @@ -9,7 +13,6 @@ #define glGenVertexArrays glGenVertexArraysOES #define glBindVertexArray glBindVertexArrayOES #define glDeleteVertexArrays glDeleteVertexArraysOES - #define glClearDepth glClearDepthf #elif TARGET_IPHONE_SIMULATOR #include #include @@ -29,4 +32,16 @@ #include #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