소스 검색

Fix mac compilation

TothBenoit 1 년 전
부모
커밋
31cee2a1eb
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      libs/sdl/gl.c

+ 5 - 1
libs/sdl/gl.c

@@ -52,8 +52,12 @@
 #include "GLImports.h"
 #undef GL_IMPORT
 #define GL_IMPORT(fun,t)	fun = (PFNGL##t##PROC)SDL_GL_GetProcAddress(#fun); if( fun == NULL ) return 1
+#ifndef __APPLE__
 #define GL_IMPORT_OPT(fun, t) PFNGL##t##PROC fun = NULL; if ( !fun ) { fun = (PFNGL##t##PROC)SDL_GL_GetProcAddress(#fun); if( fun == NULL ) hl_error("function not resolved"); }
-#else
+#endif
+#endif
+
+#if !defined GL_IMPORT_OPT
 #define GL_IMPORT_OPT(fun, t)
 #define glMultiDrawElementsIndirectCountARB(...) hl_error("function not resolved");
 #endif