8#ifndef META_OCEAN_PLATFORM_GL_CONTEXT_H
9#define META_OCEAN_PLATFORM_GL_CONTEXT_H
virtual bool createOpenGLContext(const bool initializeOpenGL33=true, const unsigned int multisamples=1u)
Creates the OpenGL context for this object.
glGenVertexArraysFunction glGenVertexArrays
The glGenVertexArrays function.
Definition platform/gl/Context.h:553
glFramebufferTexture2DFunction glFramebufferTexture2D
The glFramebufferTexture2D function.
Definition platform/gl/Context.h:550
void(*)(GLsizei, const GLuint *) glDeleteRenderbuffersFunction
Definition of the glDeleteRenderbuffers function pointer type.
Definition platform/gl/Context.h:65
void(*)(GLsizei, GLuint *) glGenVertexArraysFunction
Definition of the glGenVertexArrays function pointer type.
Definition platform/gl/Context.h:285
void(*)(GLenum) glActiveTextureFunction
Definition of the glActiveTexture function pointer type.
Definition platform/gl/Context.h:255
glBindVertexArrayFunction glBindVertexArray
glBindVertexArray function.
Definition platform/gl/Context.h:559
GLint(*)(GLuint, const GLchar *) glGetUniformLocationFunction
Definition of the glGetUniformLocation function pointer type.
Definition platform/gl/Context.h:200
void(*)(GLuint, GLuint) glAttachShaderFunction
Definition of the glAttachShader function pointer type.
Definition platform/gl/Context.h:135
virtual ~Context()
Releases the context.
void(*)(GLuint) glLinkProgramFunction
Definition of the glLinkProgram function pointer type.
Definition platform/gl/Context.h:145
void(*)(GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLboolean) glTexImage2DMultisampleFunction
Definition of the glTexImage2DMultisample function pointer type.
Definition platform/gl/Context.h:270
bool isExtensionSupported(const std::string &extension) const
Returns whether a specific extension is supported.
Definition platform/gl/Context.h:607
void(*)(GLenum, GLsizei, GLenum, GLsizei, GLsizei) glRenderbufferStorageMultisampleFunction
Definition of the glRenderbufferStorageMultisample function pointer type.
Definition platform/gl/Context.h:80
void(*)(GLsizei, const GLuint *) glDeleteBuffersFunction
Definition of the glDeleteBuffers function pointer type.
Definition platform/gl/Context.h:105
glVertexAttribPointerFunction glVertexAttribPointer
The glVertexAttribPointer function.
Definition platform/gl/Context.h:535
void(*)(GLuint, GLsizei, const GLchar **, const GLint *) glShaderSourceFunction
Definition of the glShaderSource function pointer type.
Definition platform/gl/Context.h:170
glDeleteBuffersFunction glDeleteBuffers
The glDeleteBuffers function.
Definition platform/gl/Context.h:448
void(*)(GLint, GLsizei, GLboolean, const GLfloat *) glUniformMatrix3fvFunction
Definition of the glUniformMatrix3fv function pointer type.
Definition platform/gl/Context.h:230
void(*)(GLenum) glGenerateMipmapFunction
Definition of the glGenerateMipmap function pointer type.
Definition platform/gl/Context.h:260
void(*)(GLuint, GLsizei, GLsizei *, GLchar *) glGetShaderInfoLogFunction
Definition of the glGetShaderInfoLog function pointer type.
Definition platform/gl/Context.h:190
glUniform1fvFunction glUniform1fv
The glUniform1fv function.
Definition platform/gl/Context.h:511
std::set< std::string > StringSet
Definition of a set holding strings.
Definition platform/gl/Context.h:35
glRenderbufferStorageFunction glRenderbufferStorage
The glRenderbufferStorage function.
Definition platform/gl/Context.h:430
void(*)(GLenum, GLsizeiptr, const GLvoid *, GLenum) glBufferDataFunction
Definition of the glBufferData function pointer type.
Definition platform/gl/Context.h:115
void(*)(GLsizei, GLuint *) glGenFramebuffersFunction
Definition of the glGenFramebuffers function pointer type.
Definition platform/gl/Context.h:45
unsigned int minorVersion_
The minor version of this OpenGL context.
Definition platform/gl/Context.h:570
virtual bool isValid() const
Returns whether this context is valid.
GLuint(*)() glCreateProgramFunction
Definition of the glCreateProgram function pointer type.
Definition platform/gl/Context.h:120
void(*)(GLuint) glBindVertexArrayFunction
Definition of the glBindVertexArray function pointer type.
Definition platform/gl/Context.h:295
void(*)(GLsizei, GLuint *) glGenBuffersFunction
Definition of the glGenBuffers function pointer type.
Definition platform/gl/Context.h:100
glUniform4fvFunction glUniform4fv
The glUniform4fv function.
Definition platform/gl/Context.h:520
glDeleteVertexArraysFunction glDeleteVertexArrays
The glDeleteVertexArrays function.
Definition platform/gl/Context.h:556
void(*)(GLenum, GLenum, GLenum, GLenum) glBlendFuncSeparateFunction
Definition of the glBlendFuncSeparate function pointer type.
Definition platform/gl/Context.h:265
void(*)(GLenum, GLenum, GLsizei, GLsizei) glRenderbufferStorageFunction
Definition of the glRenderbufferStorage function pointer type.
Definition platform/gl/Context.h:75
unsigned int multisamples() const
Returns the number of multi samples that this context supports.
Definition platform/gl/Context.h:612
unsigned int minorVersion() const
Returns the minor OpenGL version of this context.
Definition platform/gl/Context.h:592
void(*)(GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum) glBlitFramebufferFunction
Definition of the glBlitFramebuffer function pointer type.
Definition platform/gl/Context.h:90
void(*)(GLint, GLsizei, const GLfloat *) glUniform2fvFunction
Definition of the glUniform2fv function pointer type.
Definition platform/gl/Context.h:215
glGetAttribLocationFunction glGetAttribLocation
The glGetAttribLocation function.
Definition platform/gl/Context.h:502
glDeleteFramebuffersFunction glDeleteFramebuffers
The glDeleteFramebuffer function.
Definition platform/gl/Context.h:415
glDeleteRenderbuffersFunction glDeleteRenderbuffers
The glDeleteRenderbuffers function.
Definition platform/gl/Context.h:424
void(*)(GLuint, GLenum, GLint *) glGetProgramivFunction
Definition of the glGetProgramiv function pointer type.
Definition platform/gl/Context.h:175
void(*)(GLenum, GLenum, GLenum, GLuint, GLint) glFramebufferTexture2DFunction
Definition of the glFramebufferTexture2D function pointer type.
Definition platform/gl/Context.h:275
glGenBuffersFunction glGenBuffers
The glGenBuffers function.
Definition platform/gl/Context.h:445
void(*)(GLenum, GLenum, GLenum, GLuint) glFramebufferRenderbufferFunction
Definition of the glFramebufferRenderbuffer function pointer type.
Definition platform/gl/Context.h:85
glGetStringiFunction glGetStringi
The glGetStringi function.
Definition platform/gl/Context.h:409
glBindFramebufferFunction glBindFramebuffer
The glBindFramebuffer function.
Definition platform/gl/Context.h:418
void(*)(GLuint) glUseProgramFunction
Definition of the glUseProgram function pointer type.
Definition platform/gl/Context.h:150
void(*)(GLenum, GLuint) glBindFramebufferFunction
Definition of the glBindFramebuffer function pointer type.
Definition platform/gl/Context.h:55
glFramebufferRenderbufferFunction glFramebufferRenderbuffer
The glFramebufferRenderbuffer function.
Definition platform/gl/Context.h:436
glGetUniformLocationFunction glGetUniformLocation
The glGetUniformLocation function.
Definition platform/gl/Context.h:505
void(*)(GLint, GLint) glUniform1iFunction
Definition of the glUniform1i function pointer type.
Definition platform/gl/Context.h:205
const StringSet & supportedExtensions() const
Returns the set of supported extensions.
Definition platform/gl/Context.h:602
glGetShaderInfoLogFunction glGetShaderInfoLog
The glGetShaderInfoLog function.
Definition platform/gl/Context.h:499
glCreateShaderFunction glCreateShader
The glCreateShader function.
Definition platform/gl/Context.h:478
unsigned int majorVersion() const
Returns the major OpenGL version of this context.
Definition platform/gl/Context.h:587
glGenerateMipmapFunction glGenerateMipmap
The glGenerateMipmap function.
Definition platform/gl/Context.h:541
glCheckFramebufferStatusFunction glCheckFramebufferStatus
The glCheckFramebufferStatus function.
Definition platform/gl/Context.h:442
void(*)(GLint, GLsizei, const GLfloat *) glUniform1fvFunction
Definition of the glUniform1fv function pointer type.
Definition platform/gl/Context.h:210
glBindBufferFunction glBindBuffer
The glBindBuffer function.
Definition platform/gl/Context.h:451
void(*)(GLsizei, const GLuint *) glDeleteFramebuffersFunction
Definition of the glDeleteFramebuffers function pointer type.
Definition platform/gl/Context.h:50
void(*)(GLsizei, const GLuint *) glDeleteVertexArraysFunction
Definition of the glDeleteVertexArrays function pointer type.
Definition platform/gl/Context.h:290
glGenRenderbuffersFunction glGenRenderbuffers
The glGenRenderbuffers functions.
Definition platform/gl/Context.h:421
glActiveTextureFunction glActiveTexture
The glActiveTexture function.
Definition platform/gl/Context.h:538
virtual void release()
Releases the context explicitly.
GLuint(*)(GLenum) glCreateShaderFunction
Definition of the glCreateShader function pointer type.
Definition platform/gl/Context.h:155
void(*)(GLuint) glEnableVertexAttribArrayFunction
Definition of the glEnableVertexAttribArray function pointer type.
Definition platform/gl/Context.h:240
glShaderSourceFunction glShaderSource
The glShaderSource function.
Definition platform/gl/Context.h:487
glBlitFramebufferFunction glBlitFramebuffer
The glBlitFramebuffer function;.
Definition platform/gl/Context.h:439
glUseProgramFunction glUseProgram
The glUseProgram function.
Definition platform/gl/Context.h:475
void(*)(GLsizei, GLuint *) glGenRenderbuffersFunction
Definition of the glGenRenderbuffers function pointer type.
Definition platform/gl/Context.h:60
glCompileShaderFunction glCompileShader
The glCompileShader function.
Definition platform/gl/Context.h:484
glGetProgramInfoLogFunction glGetProgramInfoLog
The glGetProgramInfoLog function.
Definition platform/gl/Context.h:496
const GLubyte *(*)(GLenum, GLuint) glGetStringiFunction
Definition of the glGetStringi function pointer type.
Definition platform/gl/Context.h:40
glBufferDataFunction glBufferData
The glBufferData function.
Definition platform/gl/Context.h:454
virtual void makeCurrent(const bool state=true)=0
Makes the OpenGL rendering context of this framebuffer the calling thread's current rendering context...
glUniformMatrix4fvFunction glUniformMatrix4fv
The glUniformMatrix4fv function.
Definition platform/gl/Context.h:526
bool compatibilityProfile_
True, if this context provides the compatibility profile.
Definition platform/gl/Context.h:573
void(*)(GLuint) glDisableVertexAttribArrayFunction
Definition of the glDisableVertexAttribArray function pointer type.
Definition platform/gl/Context.h:245
void(*)(GLuint) glDeleteProgramFunction
Definition of the glDeleteProgram function pointer type.
Definition platform/gl/Context.h:125
glDisableVertexAttribArrayFunction glDisableVertexAttribArray
The glEnableVertexAttribArray function.
Definition platform/gl/Context.h:532
glTexImage2DMultisampleFunction glTexImage2DMultisample
The glTexImage2DMultisample function.
Definition platform/gl/Context.h:547
void(*)(GLenum, GLuint) glBindRenderbufferFunction
Definition of the glBindRenderbuffer function pointer type.
Definition platform/gl/Context.h:70
void * handle_
The OpenGL context handle.
Definition platform/gl/Context.h:564
void(*)(GLuint, GLuint, const char *) glBindFragDataLocationFunction
Definition of the glBindFragDataLocation function pointer type.
Definition platform/gl/Context.h:280
void(*)(GLint, GLsizei, const GLfloat *) glUniform3fvFunction
Definition of the glUniform3fv function pointer type.
Definition platform/gl/Context.h:220
bool compatibilityProfile() const
Returns whether this context provides the compatibility profile or the core profile.
Definition platform/gl/Context.h:597
void(*)(GLint, GLsizei, const GLfloat *) glUniform4fvFunction
Definition of the glUniform4fv function pointer type.
Definition platform/gl/Context.h:225
void(*)(GLuint, GLenum, GLint *) glGetShaderivFunction
Definition of the glGetShaderiv function pointer type.
Definition platform/gl/Context.h:180
void(*)(GLuint, GLuint) glDetachShaderFunction
Definition of the glDetachShader function pointer type.
Definition platform/gl/Context.h:140
GLenum(*)(GLenum) glCheckFramebufferStatusFunction
Definition of the glCheckFramebufferStatus function pointer type.
Definition platform/gl/Context.h:95
glLinkProgramFunction glLinkProgram
The glLinkProgram function.
Definition platform/gl/Context.h:472
StringSet extensions_
The set of supported extensions.
Definition platform/gl/Context.h:576
Thread::ThreadId threadId_
Definition platform/gl/Context.h:583
glBindRenderbufferFunction glBindRenderbuffer
The glBindRenderbuffer function.
Definition platform/gl/Context.h:427
unsigned int majorVersion_
The major version of this OpenGL context.
Definition platform/gl/Context.h:567
glAttachShaderFunction glAttachShader
The glAttachShader function.
Definition platform/gl/Context.h:466
glBlendFuncSeparateFunction glBlendFuncSeparate
The glBlendFuncSeparate function.
Definition platform/gl/Context.h:544
void(*)(GLuint, GLsizei, GLsizei *, GLchar *) glGetProgramInfoLogFunction
Definition of the glGetProgramInfoLog function pointer type.
Definition platform/gl/Context.h:185
glRenderbufferStorageMultisampleFunction glRenderbufferStorageMultisample
The glRenderbufferStorageMultisample function.
Definition platform/gl/Context.h:433
static HGLRC windowsCreateOpenGLContextHandle(HDC dc, const bool initializeOpenGL33, unsigned int &multisamples)
Creates a the OpennGL context handle on Windows platforms.
virtual bool releaseOpenGLContext()
Releases the OpenGL context of this framebuffer.
void(*)(GLint, GLsizei, GLboolean, const GLfloat *) glUniformMatrix4fvFunction
Definition of the glUniformMatrix4fv function pointer type.
Definition platform/gl/Context.h:235
unsigned int multisamples_
The number of multi samples of this context.
Definition platform/gl/Context.h:579
glEnableVertexAttribArrayFunction glEnableVertexAttribArray
The glEnableVertexAttribArray function.
Definition platform/gl/Context.h:529
glGetProgramivFunction glGetProgramiv
The glGetProgramiv function.
Definition platform/gl/Context.h:490
glUniform2fvFunction glUniform2fv
The glUniform2fv function.
Definition platform/gl/Context.h:514
void(*)(GLuint) glCompileShaderFunction
Definition of the glCompileShader function pointer type.
Definition platform/gl/Context.h:165
virtual bool swapBuffers()
Swaps the foreground and background buffer if this context has two buffers.
void(*)(GLuint) glDeleteShaderFunction
Definition of the glDeleteShader function pointer type.
Definition platform/gl/Context.h:160
void(*)(GLenum, GLuint) glBindBufferFunction
Definition of the glBindBuffer function pointer type.
Definition platform/gl/Context.h:110
HGLRC(*)(HDC, HGLRC, const int *) wglCreateContextAttribsARBFunction
Definition platform/gl/Context.h:299
GLint(*)(GLuint, const GLchar *) glGetAttribLocationFunction
Definition of the glGetAttribLocation function pointer type.
Definition platform/gl/Context.h:195
glGenFramebuffersFunction glGenFramebuffers
The glGenFramebuffers function.
Definition platform/gl/Context.h:412
glUniformMatrix3fvFunction glUniformMatrix3fv
The glUniformMatrix3fv function.
Definition platform/gl/Context.h:523
Context()=default
Creates a new context.
void(*)(GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *) glVertexAttribPointerFunction
Definition of the glVertexAttribPointer function pointer type.
Definition platform/gl/Context.h:250
GLboolean(*)(GLuint) glIsProgramFunction
Definition of the glIsProgram function pointer type.
Definition platform/gl/Context.h:130
glCreateProgramFunction glCreateProgram
The glCreateProgram function.
Definition platform/gl/Context.h:457
glUniform1iFunction glUniform1i
The glUniform1i function.
Definition platform/gl/Context.h:508
glDetachShaderFunction glDetachShader
The glDetachShader function.
Definition platform/gl/Context.h:469
glIsProgramFunction glIsProgram
The glIsProgram function.
Definition platform/gl/Context.h:463
glUniform3fvFunction glUniform3fv
The glUniform3fv function.
Definition platform/gl/Context.h:517
glDeleteShaderFunction glDeleteShader
The glDeleteShader function.
Definition platform/gl/Context.h:481
glGetShaderivFunction glGetShaderiv
The glGetShaderiv function.
Definition platform/gl/Context.h:493
glDeleteProgramFunction glDeleteProgram
The glDeleteProgram function.
Definition platform/gl/Context.h:460
This class implements a platform independent wrapper for thread ids.
Definition Thread.h:122
The namespace covering the entire Ocean framework.
Definition Accessor.h:15