X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=glimports.hpp;h=773d50f4914a23c3e6a07a7e743dc01f5cd04888;hb=61840fb9f088ba86135d72db977ceb7748b41dba;hp=65b0aca1f2977e9ca534830d8eac982918080dec;hpb=e9426dd61586757d23d7dddc85b3076f477e7f07;p=apitrace diff --git a/glimports.hpp b/glimports.hpp index 65b0aca..773d50f 100644 --- a/glimports.hpp +++ b/glimports.hpp @@ -31,61 +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__) -# include // for MAC_OS_X_VERSION_10_7 -# if defined(MAC_OS_X_VERSION_10_7) -# define GLenum_int GLint -# else -# define GLenum_int GLenum -# endif -#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 @@ -134,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