1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Added a few noexcepts to some GL functions

This commit is contained in:
jules 2015-12-01 17:25:14 +00:00
parent 26ff85ae94
commit c06db136bd
3 changed files with 7 additions and 7 deletions

View file

@ -147,20 +147,20 @@ static void checkGLError (const char* file, const int line)
#define JUCE_CHECK_OPENGL_ERROR ;
#endif
static void clearGLError()
static void clearGLError() noexcept
{
while (glGetError() != GL_NO_ERROR) {}
}
struct OpenGLTargetSaver
{
OpenGLTargetSaver (const OpenGLContext& c)
OpenGLTargetSaver (const OpenGLContext& c) noexcept
: context (c), oldFramebuffer (OpenGLFrameBuffer::getCurrentFrameBufferTarget())
{
glGetIntegerv (GL_VIEWPORT, oldViewport);
}
~OpenGLTargetSaver()
~OpenGLTargetSaver() noexcept
{
context.extensions.glBindFramebuffer (GL_FRAMEBUFFER, oldFramebuffer);
glViewport (oldViewport[0], oldViewport[1], oldViewport[2], oldViewport[3]);