27 #ifndef _CEGUIOpenGL3Shader_h_
28 #define _CEGUIOpenGL3Shader_h_
30 #include "CEGUI/Exceptions.h"
31 #include "RendererBase.h"
35 # pragma warning(push)
36 # pragma warning(disable : 4251)
53 const std::string& fragment_shader_source);
88 bool isCreatedSuccessfully();
93 GLuint compile(GLuint type,
const std::string &source);
95 void outputShaderLog(GLuint shader);
96 void outputProgramLog(GLuint program);
98 std::string d_shaderName;
99 bool d_createdSucessfully;
101 GLuint d_vertexShader;
102 GLuint d_fragmentShader;
103 GLuint d_geometryShader;
107 #define STRINGIFY(x) #x
108 #define TOSTRING(x) STRINGIFY(x)
109 #define AT __FILE__ ":" TOSTRING(__LINE__)
110 #define checkGLErrors() getGLErrors(AT)
Definition: MemoryAllocatedObject.h:110
void bindFragDataLocation(const std::string &name)
Defines the name of the variable inside the shader which represents the final color for each fragment...
void bind() const
Bind the shader to the OGL state-machine.
void unbind() const
Unbind the shader.
OpenGL3Shader(const std::string &vertex_shader_source, const std::string &fragment_shader_source)
Creates and loads shader programs from the two strings supplied to it.
GLuint getAttribLocation(const std::string &name) const
Query the location of a vertex attribute inside the shader.
GLuint getUniformLocation(const std::string &name) const
Query the location of a uniform variable inside the shader.
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
void getGLErrors(const char *location)
Query OpenGL errors and process them in CEGUI.