remove boost_current_function
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include <opengl/scoped.hpp>
|
||||
#include <opengl/shader.hpp>
|
||||
#include <external/tracy/Tracy.hpp>
|
||||
#include <util/CurrentFunction.hpp>
|
||||
|
||||
|
||||
#include <QtCore/QSettings>
|
||||
@@ -427,7 +428,7 @@ void MapTile::draw (OpenGL::Scoped::use_program& mcnk_shader
|
||||
, bool is_selected
|
||||
)
|
||||
{
|
||||
ZoneScopedN(BOOST_CURRENT_FUNCTION);
|
||||
ZoneScopedN(NOGGIT_CURRENT_FUNCTION);
|
||||
|
||||
static constexpr unsigned NUM_SAMPLERS = 11;
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <opengl/shader.hpp>
|
||||
#include <external/tracy/Tracy.hpp>
|
||||
#include <noggit/application/NoggitApplication.hpp>
|
||||
#include <util/CurrentFunction.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
@@ -1563,7 +1564,7 @@ void Model::draw (glm::mat4x4 const& model_view
|
||||
, bool no_cull
|
||||
)
|
||||
{
|
||||
ZoneScopedN(BOOST_CURRENT_FUNCTION);
|
||||
ZoneScopedN(NOGGIT_CURRENT_FUNCTION);
|
||||
|
||||
{
|
||||
ZoneScopedN("Model::draw() : uploads")
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <glm/vec2.hpp>
|
||||
#include <QtOpenGLExtensions/QOpenGLExtensions>
|
||||
#include <QtGui/QOpenGLFunctions>
|
||||
#include <boost/current_function.hpp>
|
||||
#include <util/CurrentFunction.hpp>
|
||||
#include <memory>
|
||||
|
||||
|
||||
@@ -130,49 +130,49 @@ namespace
|
||||
void OpenGL::context::enable (GLenum target)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glEnable (target);
|
||||
}
|
||||
void OpenGL::context::disable (GLenum target)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glDisable (target);
|
||||
}
|
||||
GLboolean OpenGL::context::isEnabled (GLenum target)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glIsEnabled (target);
|
||||
}
|
||||
void OpenGL::context::viewport (GLint x, GLint y, GLsizei width, GLsizei height)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glViewport (x, y, width, height);
|
||||
}
|
||||
void OpenGL::context::depthFunc (GLenum target)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glDepthFunc (target);
|
||||
}
|
||||
void OpenGL::context::depthMask (GLboolean mask)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glDepthMask (mask);
|
||||
}
|
||||
void OpenGL::context::blendFunc (GLenum sfactor, GLenum dfactor)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glBlendFunc (sfactor, dfactor);
|
||||
}
|
||||
@@ -180,14 +180,14 @@ void OpenGL::context::blendFunc (GLenum sfactor, GLenum dfactor)
|
||||
void OpenGL::context::clear (GLenum target)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glClear (target);
|
||||
}
|
||||
void OpenGL::context::clearColor (GLfloat r, GLfloat g, GLfloat b, GLfloat a)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glClearColor (r, g, b, a);
|
||||
}
|
||||
@@ -195,14 +195,14 @@ void OpenGL::context::clearColor (GLfloat r, GLfloat g, GLfloat b, GLfloat a)
|
||||
void OpenGL::context::readBuffer (GLenum target)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _4_1_core_func->glReadBuffer (target);
|
||||
}
|
||||
void OpenGL::context::readPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* data)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glReadPixels (x, y, width, height, format, type, data);
|
||||
}
|
||||
@@ -210,7 +210,7 @@ void OpenGL::context::readPixels (GLint x, GLint y, GLsizei width, GLsizei heigh
|
||||
void OpenGL::context::lineWidth (GLfloat width)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glLineWidth (width);
|
||||
}
|
||||
@@ -218,35 +218,35 @@ void OpenGL::context::lineWidth (GLfloat width)
|
||||
void OpenGL::context::pointParameterf (GLenum pname, GLfloat param)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _4_1_core_func->glPointParameterf (pname, param);
|
||||
}
|
||||
void OpenGL::context::pointParameteri (GLenum pname, GLint param)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _4_1_core_func->glPointParameteri (pname, param);
|
||||
}
|
||||
void OpenGL::context::pointParameterfv (GLenum pname, GLfloat const* param)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _4_1_core_func->glPointParameterfv (pname, param);
|
||||
}
|
||||
void OpenGL::context::pointParameteriv (GLenum pname, GLint const* param)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _4_1_core_func->glPointParameteriv (pname, param);
|
||||
}
|
||||
void OpenGL::context::pointSize (GLfloat size)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _4_1_core_func->glPointSize (size);
|
||||
}
|
||||
@@ -254,14 +254,14 @@ void OpenGL::context::pointSize (GLfloat size)
|
||||
void OpenGL::context::hint (GLenum target, GLenum mode)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glHint (target, mode);
|
||||
}
|
||||
void OpenGL::context::polygonMode (GLenum face, GLenum mode)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _4_1_core_func->glPolygonMode (face, mode);
|
||||
}
|
||||
@@ -269,28 +269,28 @@ void OpenGL::context::polygonMode (GLenum face, GLenum mode)
|
||||
void OpenGL::context::genTextures (GLuint count, GLuint* textures)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glGenTextures (count, textures);
|
||||
}
|
||||
void OpenGL::context::deleteTextures (GLuint count, GLuint* textures)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glDeleteTextures (count, textures);
|
||||
}
|
||||
void OpenGL::context::bindTexture (GLenum target, GLuint texture)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glBindTexture (target, texture);
|
||||
}
|
||||
void OpenGL::context::texImage2D (GLenum target, GLint level, GLint internal_format, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLvoid const* data)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glTexImage2D (target, level, internal_format, width, height, border, format, type, data);
|
||||
}
|
||||
@@ -305,7 +305,7 @@ void OpenGL::context::texSubImage2D(GLenum target,
|
||||
const void * pixels)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
|
||||
}
|
||||
@@ -321,14 +321,14 @@ void OpenGL::context::compressedTexSubImage2D(
|
||||
const void * data)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
|
||||
}
|
||||
void OpenGL::context::texImage3D (GLenum target, GLint level, GLint internal_format, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLvoid const* data)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _4_1_core_func->glTexImage3D (target, level, internal_format, width, height, depth, border, format, type, data);
|
||||
}
|
||||
@@ -345,7 +345,7 @@ void OpenGL::context::texSubImage3D (GLenum target,
|
||||
const void * pixels)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _4_1_core_func->glTexSubImage3D (target, level, xoffset,yoffset ,zoffset, width, height, depth, format, type, pixels);
|
||||
}
|
||||
@@ -362,35 +362,35 @@ void OpenGL::context::compressedTexSubImage3D (GLenum target,
|
||||
const void * data)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _4_1_core_func->glCompressedTexSubImage3D (target, level, xoffset,yoffset ,zoffset, width, height, depth, format, imageSize, data);
|
||||
}
|
||||
void OpenGL::context::compressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, GLvoid const* data)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glCompressedTexImage2D (target, level, internalformat, width, height, border, imageSize, data);
|
||||
}
|
||||
void OpenGL::context::compressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLvoid const* data)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _4_1_core_func->glCompressedTexImage3D (target, level, internalformat, width, height, depth, border, imageSize, data);
|
||||
}
|
||||
void OpenGL::context::generateMipmap (GLenum target)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glGenerateMipmap (target);
|
||||
}
|
||||
void OpenGL::context::activeTexture (GLenum target)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glActiveTexture (target);
|
||||
}
|
||||
@@ -398,28 +398,28 @@ void OpenGL::context::activeTexture (GLenum target)
|
||||
void OpenGL::context::texParameteri (GLenum target, GLenum pname, GLint param)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glTexParameteri (target, pname, param);
|
||||
}
|
||||
void OpenGL::context::texParameterf (GLenum target, GLenum pname, GLfloat param)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glTexParameterf (target, pname, param);
|
||||
}
|
||||
void OpenGL::context::texParameteriv (GLenum target, GLenum pname, GLint const* params)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glTexParameteriv (target, pname, params);
|
||||
}
|
||||
void OpenGL::context::texParameterfv (GLenum target, GLenum pname, GLfloat const* params)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glTexParameterfv (target, pname, params);
|
||||
}
|
||||
@@ -427,108 +427,108 @@ void OpenGL::context::texParameterfv (GLenum target, GLenum pname, GLfloat const
|
||||
void OpenGL::context::genVertexArrays (GLuint count, GLuint* arrays)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _4_1_core_func->glGenVertexArrays(count, arrays);
|
||||
}
|
||||
void OpenGL::context::deleteVertexArray (GLuint count, GLuint* arrays)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _4_1_core_func->glDeleteVertexArrays(count, arrays);
|
||||
}
|
||||
void OpenGL::context::bindVertexArray (GLenum array)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _4_1_core_func->glBindVertexArray(array);
|
||||
}
|
||||
void OpenGL::context::genBuffers (GLuint count, GLuint* buffers)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glGenBuffers (count, buffers);
|
||||
}
|
||||
void OpenGL::context::deleteBuffers (GLuint count, GLuint* buffers)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glDeleteBuffers (count, buffers);
|
||||
}
|
||||
void OpenGL::context::bindBuffer (GLenum target, GLuint buffer)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glBindBuffer (target, buffer);
|
||||
}
|
||||
void OpenGL::context::bindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _4_1_core_func->glBindBufferRange (target, index, buffer, offset, size);
|
||||
}
|
||||
GLvoid* OpenGL::context::mapBuffer (GLenum target, GLenum access)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _4_1_core_func->glMapBuffer (target, access);
|
||||
}
|
||||
GLboolean OpenGL::context::unmapBuffer (GLenum target)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _4_1_core_func->glUnmapBuffer (target);
|
||||
}
|
||||
void OpenGL::context::drawElements (GLenum mode, GLsizei count, GLenum type, GLvoid const* indices)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glDrawElements (mode, count, type, indices);
|
||||
}
|
||||
void OpenGL::context::drawElementsInstanced (GLenum mode, GLsizei count, GLenum type, GLvoid const* indices, GLsizei instancecount)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _4_1_core_func->glDrawElementsInstanced (mode, count, type, indices, instancecount);
|
||||
}
|
||||
void OpenGL::context::drawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLvoid const* indices)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _4_1_core_func->glDrawRangeElements (mode, start, end, count, type, indices);
|
||||
}
|
||||
|
||||
void OpenGL::context::genPrograms (GLsizei count, GLuint* programs)
|
||||
{
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
return _.extension_functions<QOpenGLExtension_ARB_vertex_program>()->glGenProgramsARB (count, programs);
|
||||
}
|
||||
void OpenGL::context::deletePrograms (GLsizei count, GLuint* programs)
|
||||
{
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
return _.extension_functions<QOpenGLExtension_ARB_vertex_program>()->glDeleteProgramsARB (count, programs);
|
||||
}
|
||||
void OpenGL::context::bindProgram (GLenum target, GLuint program)
|
||||
{
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
return _.extension_functions<QOpenGLExtension_ARB_vertex_program>()->glBindProgramARB (target, program);
|
||||
}
|
||||
void OpenGL::context::programString (GLenum target, GLenum format, GLsizei len, GLvoid const* pointer)
|
||||
{
|
||||
verify_context_and_check_for_gl_errors const _
|
||||
( _current_context
|
||||
, BOOST_CURRENT_FUNCTION
|
||||
, NOGGIT_CURRENT_FUNCTION
|
||||
, [this]
|
||||
{
|
||||
GLint error_position;
|
||||
@@ -541,41 +541,41 @@ void OpenGL::context::programString (GLenum target, GLenum format, GLsizei len,
|
||||
void OpenGL::context::getProgramiv (GLuint program, GLenum pname, GLint* params)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glGetProgramiv (program, pname, params);
|
||||
}
|
||||
void OpenGL::context::programLocalParameter4f (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
|
||||
{
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
return _.extension_functions<QOpenGLExtension_ARB_vertex_program>()->glProgramLocalParameter4fARB (target, index, x, y, z, w);
|
||||
}
|
||||
|
||||
void OpenGL::context::getBooleanv (GLenum target, GLboolean* value)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glGetBooleanv (target, value);
|
||||
}
|
||||
void OpenGL::context::getDoublev (GLenum target, GLdouble* value)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _4_1_core_func->glGetDoublev (target, value);
|
||||
}
|
||||
void OpenGL::context::getFloatv (GLenum target, GLfloat* value)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glGetFloatv (target, value);
|
||||
}
|
||||
void OpenGL::context::getIntegerv (GLenum target, GLint* value)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glGetIntegerv (target, value);
|
||||
}
|
||||
@@ -583,7 +583,7 @@ void OpenGL::context::getIntegerv (GLenum target, GLint* value)
|
||||
GLubyte const* OpenGL::context::getString (GLenum target)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glGetString (target);
|
||||
}
|
||||
@@ -591,21 +591,21 @@ GLubyte const* OpenGL::context::getString (GLenum target)
|
||||
GLuint OpenGL::context::createShader (GLenum shader_type)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glCreateShader (shader_type);
|
||||
}
|
||||
void OpenGL::context::deleteShader (GLuint shader)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glDeleteShader (shader);
|
||||
}
|
||||
void OpenGL::context::shaderSource (GLuint shader, GLsizei count, GLchar const** string, GLint const* length)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glShaderSource (shader, count, string, length);
|
||||
}
|
||||
@@ -613,7 +613,7 @@ void OpenGL::context::compile_shader (GLuint shader)
|
||||
{
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
_current_context->functions()->glCompileShader (shader);
|
||||
}
|
||||
@@ -628,7 +628,7 @@ void OpenGL::context::compile_shader (GLuint shader)
|
||||
GLint OpenGL::context::get_shader (GLuint shader, GLenum pname)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
GLint params;
|
||||
_current_context->functions()->glGetShaderiv (shader, pname, ¶ms);
|
||||
@@ -638,28 +638,28 @@ GLint OpenGL::context::get_shader (GLuint shader, GLenum pname)
|
||||
GLuint OpenGL::context::createProgram()
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glCreateProgram();
|
||||
}
|
||||
void OpenGL::context::deleteProgram (GLuint program)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glDeleteProgram (program);
|
||||
}
|
||||
void OpenGL::context::attachShader (GLuint program, GLuint shader)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glAttachShader (program, shader);
|
||||
}
|
||||
void OpenGL::context::detachShader (GLuint program, GLuint shader)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glDetachShader (program, shader);
|
||||
}
|
||||
@@ -667,7 +667,7 @@ void OpenGL::context::link_program (GLuint program)
|
||||
{
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
_current_context->functions()->glLinkProgram (program);
|
||||
}
|
||||
@@ -681,7 +681,7 @@ void OpenGL::context::link_program (GLuint program)
|
||||
void OpenGL::context::useProgram (GLuint program)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glUseProgram (program);
|
||||
}
|
||||
@@ -699,7 +699,7 @@ void OpenGL::context::validate_program (GLuint program)
|
||||
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
_current_context->functions()->glValidateProgram (program);
|
||||
}
|
||||
@@ -713,7 +713,7 @@ void OpenGL::context::validate_program (GLuint program)
|
||||
GLint OpenGL::context::get_program (GLuint program, GLenum pname)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
GLint params;
|
||||
_current_context->functions()->glGetProgramiv (program, pname, ¶ms);
|
||||
@@ -721,7 +721,7 @@ GLint OpenGL::context::get_program (GLuint program, GLenum pname)
|
||||
}
|
||||
std::string OpenGL::context::get_program_info_log(GLuint program)
|
||||
{
|
||||
verify_context_and_check_for_gl_errors const _(_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _(_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
std::vector<char> log(get_program(program, GL_INFO_LOG_LENGTH));
|
||||
|
||||
if (log.empty())
|
||||
@@ -737,14 +737,14 @@ std::string OpenGL::context::get_program_info_log(GLuint program)
|
||||
GLint OpenGL::context::getAttribLocation (GLuint program, GLchar const* name)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glGetAttribLocation (program, name);
|
||||
}
|
||||
void OpenGL::context::vertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLvoid const* pointer)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glVertexAttribPointer (index, size, type, normalized, stride, pointer);
|
||||
}
|
||||
@@ -755,28 +755,28 @@ void OpenGL::context::vertexAttribIPointer (GLuint index,
|
||||
const void* pointer)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _4_1_core_func->glVertexAttribIPointer (index, size, type, stride, pointer);
|
||||
}
|
||||
void OpenGL::context::vertexAttribDivisor (GLuint index, GLuint divisor)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _4_1_core_func->glVertexAttribDivisor(index, divisor);
|
||||
}
|
||||
void OpenGL::context::enableVertexAttribArray (GLuint index)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glEnableVertexAttribArray (index);
|
||||
}
|
||||
void OpenGL::context::disableVertexAttribArray (GLuint index)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glDisableVertexAttribArray (index);
|
||||
}
|
||||
@@ -784,7 +784,7 @@ void OpenGL::context::disableVertexAttribArray (GLuint index)
|
||||
GLint OpenGL::context::getUniformLocation (GLuint program, GLchar const* name)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return (_current_context->functions()->glGetUniformLocation (program, name));
|
||||
}
|
||||
@@ -792,7 +792,7 @@ GLint OpenGL::context::getUniformLocation (GLuint program, GLchar const* name)
|
||||
GLint OpenGL::context::getUniformBlockIndex (GLuint program, GLchar const* name)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
|
||||
auto val (_4_1_core_func->glGetUniformBlockIndex(program, name));
|
||||
@@ -806,7 +806,7 @@ GLint OpenGL::context::getUniformBlockIndex (GLuint program, GLchar const* name)
|
||||
void OpenGL::context::uniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _4_1_core_func->glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding);
|
||||
}
|
||||
@@ -814,55 +814,55 @@ void OpenGL::context::uniformBlockBinding (GLuint program, GLuint uniformBlockIn
|
||||
void OpenGL::context::uniform1i (GLint location, GLint value)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glUniform1i (location, value);
|
||||
}
|
||||
void OpenGL::context::uniform1f (GLint location, GLfloat value)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glUniform1f (location, value);
|
||||
}
|
||||
|
||||
void OpenGL::context::uniform1iv (GLint location, GLsizei count, GLint const* value)
|
||||
{
|
||||
verify_context_and_check_for_gl_errors const _(_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _(_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
return _current_context->functions()->glUniform1iv(location, count, value);
|
||||
}
|
||||
|
||||
void OpenGL::context::uniform2iv (GLint location, GLsizei count, GLint const* value)
|
||||
{
|
||||
verify_context_and_check_for_gl_errors const _(_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _(_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
return _current_context->functions()->glUniform2iv(location, count, value);
|
||||
}
|
||||
|
||||
void OpenGL::context::uniform2fv (GLint location, GLsizei count, GLfloat const* value)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glUniform2fv (location, count, value);
|
||||
}
|
||||
void OpenGL::context::uniform3fv (GLint location, GLsizei count, GLfloat const* value)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glUniform3fv (location, count, value);
|
||||
}
|
||||
void OpenGL::context::uniform4fv (GLint location, GLsizei count, GLfloat const* value)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glUniform4fv (location, count, value);
|
||||
}
|
||||
void OpenGL::context::uniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, GLfloat const* value)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glUniformMatrix4fv (location, count, transpose, value);
|
||||
}
|
||||
@@ -870,28 +870,28 @@ void OpenGL::context::uniformMatrix4fv (GLint location, GLsizei count, GLboolean
|
||||
void OpenGL::context::clearStencil (GLint s)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glClearStencil (s);
|
||||
}
|
||||
void OpenGL::context::stencilFunc (GLenum func, GLint ref, GLuint mask)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glStencilFunc (func, ref, mask);
|
||||
}
|
||||
void OpenGL::context::stencilOp (GLenum sfail, GLenum dpfail, GLenum dppass)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glStencilOp (sfail, dpfail, dppass);
|
||||
}
|
||||
void OpenGL::context::colorMask (GLboolean r, GLboolean g, GLboolean b, GLboolean a)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glColorMask (r, g, b, a);
|
||||
}
|
||||
@@ -899,7 +899,7 @@ void OpenGL::context::colorMask (GLboolean r, GLboolean g, GLboolean b, GLboolea
|
||||
void OpenGL::context::polygonOffset (GLfloat factor, GLfloat units)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glPolygonOffset (factor, units);
|
||||
}
|
||||
@@ -907,21 +907,21 @@ void OpenGL::context::polygonOffset (GLfloat factor, GLfloat units)
|
||||
void OpenGL::context::genFramebuffers (GLsizei n, GLuint *ids)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glGenFramebuffers (n, ids);
|
||||
}
|
||||
void OpenGL::context::bindFramebuffer (GLenum target, GLuint framebuffer)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glBindFramebuffer (target, framebuffer);
|
||||
}
|
||||
void OpenGL::context::framebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glFramebufferTexture2D (target, attachment, textarget, texture, level);
|
||||
}
|
||||
@@ -929,28 +929,28 @@ void OpenGL::context::framebufferTexture2D (GLenum target, GLenum attachment, GL
|
||||
void OpenGL::context::genRenderbuffers (GLsizei n, GLuint *ids)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glGenRenderbuffers (n, ids);
|
||||
}
|
||||
void OpenGL::context::bindRenderbuffer (GLenum target, GLuint renderbuffer)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glBindRenderbuffer (target, renderbuffer);
|
||||
}
|
||||
void OpenGL::context::renderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glRenderbufferStorage (target, internalformat, width, height);
|
||||
}
|
||||
void OpenGL::context::framebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glFramebufferRenderbuffer (target, attachment, renderbuffertarget, renderbuffer);
|
||||
}
|
||||
@@ -958,7 +958,7 @@ void OpenGL::context::framebufferRenderbuffer (GLenum target, GLenum attachment,
|
||||
void OpenGL::context::texBuffer(GLenum target, GLenum internalformat, GLuint buffer)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _4_1_core_func->glTexBuffer(target, internalformat, buffer);
|
||||
}
|
||||
@@ -1019,14 +1019,14 @@ void OpenGL::context::bufferData(GLuint buffer, std::vector<T> const& data, GLen
|
||||
void OpenGL::context::bufferData (GLenum target, GLsizeiptr size, GLvoid const* data, GLenum usage)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glBufferData (target, size, data, usage);
|
||||
}
|
||||
void OpenGL::context::bufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid const* data)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _current_context->functions()->glBufferSubData (target, offset, size, data);
|
||||
}
|
||||
@@ -1107,7 +1107,7 @@ void OpenGL::context::drawElements (GLenum mode, GLuint index_buffer, GLsizei co
|
||||
void OpenGL::context::drawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instancecount)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
|
||||
return _4_1_core_func->glDrawArraysInstanced (mode, first, count, instancecount);
|
||||
@@ -1116,7 +1116,7 @@ void OpenGL::context::drawArraysInstanced(GLenum mode, GLint first, GLsizei coun
|
||||
void OpenGL::context::genQueries(GLsizei n, GLuint* ids)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _4_1_core_func->glGenQueries(n, ids);
|
||||
}
|
||||
@@ -1124,7 +1124,7 @@ void OpenGL::context::genQueries(GLsizei n, GLuint* ids)
|
||||
void OpenGL::context::deleteQueries(GLsizei n, GLuint* ids)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _4_1_core_func->glDeleteQueries(n, ids);
|
||||
}
|
||||
@@ -1132,7 +1132,7 @@ void OpenGL::context::deleteQueries(GLsizei n, GLuint* ids)
|
||||
void OpenGL::context::beginQuery(GLenum target, GLuint id)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _4_1_core_func->glBeginQuery(target, id);
|
||||
}
|
||||
@@ -1140,7 +1140,7 @@ void OpenGL::context::beginQuery(GLenum target, GLuint id)
|
||||
void OpenGL::context::endQuery(GLenum target)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _4_1_core_func->glEndQuery(target);
|
||||
}
|
||||
@@ -1148,7 +1148,7 @@ void OpenGL::context::endQuery(GLenum target)
|
||||
void OpenGL::context::getQueryObjectiv(GLuint id, GLenum pname, GLint* params)
|
||||
{
|
||||
#ifndef NOGGIT_DO_NOT_CHECK_FOR_OPENGL_ERRORS
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, BOOST_CURRENT_FUNCTION);
|
||||
verify_context_and_check_for_gl_errors const _ (_current_context, NOGGIT_CURRENT_FUNCTION);
|
||||
#endif
|
||||
return _4_1_core_func->glGetQueryObjectiv(id, pname, params);
|
||||
}
|
||||
|
||||
45
src/util/CurrentFunction.hpp
Normal file
45
src/util/CurrentFunction.hpp
Normal file
@@ -0,0 +1,45 @@
|
||||
// This file is part of Noggit3, licensed under GNU General Public License (version 3).
|
||||
|
||||
#ifndef NOGGIT_CURRENTFUNCTION_HPP
|
||||
#define NOGGIT_CURRENTFUNCTION_HPP
|
||||
|
||||
#if defined( NOGGIT_DISABLE_CURRENT_FUNCTION )
|
||||
|
||||
#define NOGGIT_CURRENT_FUNCTION "(unknown)"
|
||||
|
||||
#elif defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) || (defined(__ICC) && (__ICC >= 600)) || defined(__ghs__) || defined(__clang__)
|
||||
|
||||
#define NOGGIT_CURRENT_FUNCTION __PRETTY_FUNCTION__
|
||||
|
||||
#elif defined(__DMC__) && (__DMC__ >= 0x810)
|
||||
|
||||
#define NOGGIT_CURRENT_FUNCTION __PRETTY_FUNCTION__
|
||||
|
||||
#elif defined(__FUNCSIG__)
|
||||
|
||||
#define NOGGIT_CURRENT_FUNCTION __FUNCSIG__
|
||||
|
||||
#elif (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 600)) || (defined(__IBMCPP__) && (__IBMCPP__ >= 500))
|
||||
|
||||
#define NOGGIT_CURRENT_FUNCTION __FUNCTION__
|
||||
|
||||
#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x550)
|
||||
|
||||
#define NOGGIT_CURRENT_FUNCTION __FUNC__
|
||||
|
||||
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
|
||||
|
||||
#define NOGGIT_CURRENT_FUNCTION __func__
|
||||
|
||||
#elif defined(__cplusplus) && (__cplusplus >= 201103)
|
||||
|
||||
#define NOGGIT_CURRENT_FUNCTION __func__
|
||||
|
||||
#else
|
||||
|
||||
# define NOGGIT_CURRENT_FUNCTION "(unknown)"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif //NOGGIT_CURRENTFUNCTION_HPP
|
||||
Reference in New Issue
Block a user