X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=glimports.hpp;h=773d50f4914a23c3e6a07a7e743dc01f5cd04888;hb=61840fb9f088ba86135d72db977ceb7748b41dba;hp=b5cdb4b279e6b80c0f94683b5aa4e4619195fc0a;hpb=b4a3d1495a5e92ba23bf463bcea34a6e75b55294;p=apitrace diff --git a/glimports.hpp b/glimports.hpp index b5cdb4b..773d50f 100644 --- a/glimports.hpp +++ b/glimports.hpp @@ -31,55 +31,32 @@ #define _GLIMPORTS_HPP_ -// Prevent including system's glext.h -#define __glext_h_ - -// Some functions take GLenum disguised as GLint. Apple noticed and fixed it -// in the Mac OS X 10.6.x gl.h headers. Regardless, C++ typechecking rules -// force the wrappers to match the prototype precisely. -#if defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_7) -#define GLenum_int GLenum -#else -#define GLenum_int GLint -#endif - - #if defined(_WIN32) - -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN 1 -#endif - -#include -#include - +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN 1 +# endif +# include #elif defined(__APPLE__) - -#include - -#else - -#include -#include - +#elif defined(HAVE_X11) +# include #endif /* !_WIN32 */ -// Include our own glext.h -#undef __glext_h_ -#include "glext/glext.h" +#include +#include -#ifndef GL_TEXTURE_INDEX_SIZE_EXT -#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED -#endif +// GL_NVX_gpu_memory_info +#define GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX 0x9047 +#define GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX 0x9048 +#define GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX 0x9049 +#define GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX 0x904A +#define GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX 0x904B #if defined(_WIN32) -#include "glext/wglext.h" - -#define GLAPIENTRY __stdcall +#include #ifndef PFD_SUPPORT_DIRECTDRAW #define PFD_SUPPORT_DIRECTDRAW 0x00002000 @@ -128,8 +105,10 @@ CGLError CGLUpdateContext(CGLContextObj ctx); #else +#ifdef HAVE_X11 #include -#include "glext/glxext.h" +#include +#endif /* Prevent collision with trace::Bool */ #undef Bool @@ -137,4 +116,7 @@ CGLError CGLUpdateContext(CGLContextObj ctx); #endif +#include "eglimports.hpp" + + #endif /* _GLIMPORTS_HPP_ */