24 #ifndef __OGLINCLUDE_INCLUDE__
25 #define __OGLINCLUDE_INCLUDE__
33 #define WINDOWS_LEAN_AND_MEAN
38 #ifdef __GLIP_USE_GLES__
45 #if defined(linux) || defined(__linux) || defined(__linux__)
48 #ifdef __GLIP_USE_GLES__
60 #define NEED_EXTENSION(ext) if(!ext) \
61 throw Exception("OpenGL Extension " #ext " is required but not available on Hardware or Driver (updating the driver might help).",__FILE__,__LINE__,Exception::GLException);
63 #define FIX_MISSING_GLEW_CALL(call, replacement) if(call==NULL) \
65 std::cerr << "OpenGL Function " #call " is required but GLEW failed to load it, the library will (try to) use " #replacement " instead." << std::endl; \
66 if(replacement==NULL) \
67 throw Exception("OpenGL Functions " #call " and " #replacement " aren't available according to GLEW (updating the driver might help).", __FILE__, __LINE__,Exception::GLException); \
71 #define GLIP_NUM_SHADER_TYPES (6)
95 static const unsigned int numShaderTypes = GLIP_NUM_SHADER_TYPES;
97 static const GLenum shaderTypes[GLIP_NUM_SHADER_TYPES];
101 struct GLIP_API KeywordPair
104 const std::string name;
108 static SupportedVendor vendor;
109 static const KeywordPair glKeywords[];
115 static void init(
void);
116 static void deinit(
void);
117 static bool isInitialized(
void);
118 static SupportedVendor getVendorID(
void);
119 static std::string getVendorName(
void);
120 static std::string getRendererName(
void);
121 static std::string getVersion(
void);
122 static void getVersion(
int& major,
int& minor);
123 static std::string getGLSLVersion(
void);
124 static std::vector<std::string> getAvailableGLSLVersions(
void);
125 static unsigned int getShaderTypeIndex(GLenum shaderType);
128 GLIP_API
friend std::string getGLEnumName(
const GLenum& p);
129 GLIP_API
friend std::string getGLEnumNameSafe(
const GLenum& p)
throw();
130 GLIP_API
friend GLenum getGLEnum(
const std::string& s);
134 GLIP_API_FUNC std::string getGLErrorDescription(
const GLenum& e);
135 GLIP_API_FUNC
void debugGL(
void);
136 GLIP_API_FUNC std::string getGLEnumName(
const GLenum& p);
137 GLIP_API_FUNC std::string getGLEnumNameSafe(
const GLenum& p)
throw();
138 GLIP_API_FUNC GLenum getGLEnum(
const std::string& s);
139 GLIP_API_FUNC
bool belongsToGLEnums(
const GLenum& p,
const GLenum* list,
const size_t s);
156 bool belongsToGLEnums(
const GLenum& p,
const GLenum (&list) [N])
158 return (std::find(list, list+N, p)!=(list+N));
Main OpenGL Handle.
Definition: OglInclude.hpp:78
For NVIDIA.
Definition: OglInclude.hpp:85
Definition: Component.hpp:32
SupportedVendor
ID of the supported hardware vendors.
Definition: OglInclude.hpp:82
For AMD/ATI.
Definition: OglInclude.hpp:87
For INTEL.
Definition: OglInclude.hpp:89