add glad to load OpenGL extensions

This commit is contained in:
2019-07-09 11:07:01 +02:00
parent 81b62d9a27
commit 4cbf0c47b4
20 changed files with 65 additions and 209 deletions

View File

@@ -198,7 +198,6 @@ bool RTT::create(int width, int height, int tex/* = -1*/, GLint internal_format,
void RTT::bindFramebuffer()
{
assert(App::I.is_render_thread());
#ifdef _DEBUG
if (bound)
{
@@ -217,7 +216,6 @@ void RTT::bindFramebuffer()
void RTT::unbindFramebuffer()
{
assert(App::I.is_render_thread());
if (!bound)
return;
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, oldDFboID);
@@ -229,7 +227,6 @@ void RTT::unbindFramebuffer()
void RTT::clear(glm::vec4 color)
{
assert(App::I.is_render_thread());
glClearColor(color.r, color.g, color.b, color.a);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}
@@ -295,13 +292,11 @@ float * RTT::createBufferFloat()
void RTT::bindTexture()
{
assert(App::I.is_render_thread());
glBindTexture(GL_TEXTURE_2D, texID);
}
void RTT::unbindTexture()
{
assert(App::I.is_render_thread());
glBindTexture(GL_TEXTURE_2D, 0);
}