#ifndef BBGE_RENDERBASE_H #define BBGE_RENDERBASE_H #include "SDL.h" // Define this before including GL headers to avoid pulling in windows.h #if defined(_WIN32) && !defined(APIENTRY) # define APIENTRY __stdcall #endif #define GL_GLEXT_LEGACY 1 #include "gl.h" #include "glext.h" #ifdef _WINDOWS_ #error windows.h was included! euuugh! #endif #ifdef APIENTRY #undef APIENTRY #endif #ifdef WINGDIAPI #undef WINGDIAPI #endif extern PFNGLGENERATEMIPMAPEXTPROC glGenerateMipmapEXT; #ifdef BBGE_BUILD_SHADERS // GL_ARB_shader_objects extern PFNGLCREATEPROGRAMOBJECTARBPROC glCreateProgramObjectARB; extern PFNGLDELETEOBJECTARBPROC glDeleteObjectARB; extern PFNGLUSEPROGRAMOBJECTARBPROC glUseProgramObjectARB; extern PFNGLCREATESHADEROBJECTARBPROC glCreateShaderObjectARB; extern PFNGLSHADERSOURCEARBPROC glShaderSourceARB; extern PFNGLCOMPILESHADERARBPROC glCompileShaderARB; extern PFNGLGETOBJECTPARAMETERIVARBPROC glGetObjectParameterivARB; extern PFNGLATTACHOBJECTARBPROC glAttachObjectARB; extern PFNGLGETINFOLOGARBPROC glGetInfoLogARB; extern PFNGLLINKPROGRAMARBPROC glLinkProgramARB; extern PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocationARB; extern PFNGLGETACTIVEUNIFORMARBPROC glGetActiveUniformARB; extern PFNGLUNIFORM1FVARBPROC glUniform1fvARB ; extern PFNGLUNIFORM2FVARBPROC glUniform2fvARB; extern PFNGLUNIFORM3FVARBPROC glUniform3fvARB; extern PFNGLUNIFORM4FVARBPROC glUniform4fvARB; extern PFNGLUNIFORM1IVARBPROC glUniform1ivARB; extern PFNGLUNIFORM2IVARBPROC glUniform2ivARB; extern PFNGLUNIFORM3IVARBPROC glUniform3ivARB; extern PFNGLUNIFORM4IVARBPROC glUniform4ivARB; #endif #ifdef BBGE_BUILD_FRAMEBUFFER extern PFNGLISRENDERBUFFEREXTPROC glIsRenderbufferEXT; extern PFNGLBINDRENDERBUFFEREXTPROC glBindRenderbufferEXT; extern PFNGLDELETERENDERBUFFERSEXTPROC glDeleteRenderbuffersEXT; extern PFNGLGENRENDERBUFFERSEXTPROC glGenRenderbuffersEXT; extern PFNGLRENDERBUFFERSTORAGEEXTPROC glRenderbufferStorageEXT; extern PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC glGetRenderbufferParameterivEXT; extern PFNGLISFRAMEBUFFEREXTPROC glIsFramebufferEXT; extern PFNGLBINDFRAMEBUFFEREXTPROC glBindFramebufferEXT; extern PFNGLDELETEFRAMEBUFFERSEXTPROC glDeleteFramebuffersEXT; extern PFNGLGENFRAMEBUFFERSEXTPROC glGenFramebuffersEXT; extern PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC glCheckFramebufferStatusEXT; extern PFNGLFRAMEBUFFERTEXTURE1DEXTPROC glFramebufferTexture1DEXT; extern PFNGLFRAMEBUFFERTEXTURE2DEXTPROC glFramebufferTexture2DEXT; extern PFNGLFRAMEBUFFERTEXTURE3DEXTPROC glFramebufferTexture3DEXT; extern PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC glFramebufferRenderbufferEXT; extern PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC glGetFramebufferAttachmentParameterivEXT; #endif #endif