@@ -147,20 +147,20 @@ static void checkGLError (const char* file, const int line) | |||||
#define JUCE_CHECK_OPENGL_ERROR ; | #define JUCE_CHECK_OPENGL_ERROR ; | ||||
#endif | #endif | ||||
static void clearGLError() | |||||
static void clearGLError() noexcept | |||||
{ | { | ||||
while (glGetError() != GL_NO_ERROR) {} | while (glGetError() != GL_NO_ERROR) {} | ||||
} | } | ||||
struct OpenGLTargetSaver | struct OpenGLTargetSaver | ||||
{ | { | ||||
OpenGLTargetSaver (const OpenGLContext& c) | |||||
OpenGLTargetSaver (const OpenGLContext& c) noexcept | |||||
: context (c), oldFramebuffer (OpenGLFrameBuffer::getCurrentFrameBufferTarget()) | : context (c), oldFramebuffer (OpenGLFrameBuffer::getCurrentFrameBufferTarget()) | ||||
{ | { | ||||
glGetIntegerv (GL_VIEWPORT, oldViewport); | glGetIntegerv (GL_VIEWPORT, oldViewport); | ||||
} | } | ||||
~OpenGLTargetSaver() | |||||
~OpenGLTargetSaver() noexcept | |||||
{ | { | ||||
context.extensions.glBindFramebuffer (GL_FRAMEBUFFER, oldFramebuffer); | context.extensions.glBindFramebuffer (GL_FRAMEBUFFER, oldFramebuffer); | ||||
glViewport (oldViewport[0], oldViewport[1], oldViewport[2], oldViewport[3]); | glViewport (oldViewport[0], oldViewport[1], oldViewport[2], oldViewport[3]); | ||||
@@ -274,12 +274,12 @@ bool OpenGLFrameBuffer::makeCurrentRenderingTarget() | |||||
return true; | return true; | ||||
} | } | ||||
GLuint OpenGLFrameBuffer::getFrameBufferID() const | |||||
GLuint OpenGLFrameBuffer::getFrameBufferID() const noexcept | |||||
{ | { | ||||
return pimpl != nullptr ? pimpl->frameBufferID : 0; | return pimpl != nullptr ? pimpl->frameBufferID : 0; | ||||
} | } | ||||
GLuint OpenGLFrameBuffer::getCurrentFrameBufferTarget() | |||||
GLuint OpenGLFrameBuffer::getCurrentFrameBufferTarget() noexcept | |||||
{ | { | ||||
GLint fb; | GLint fb; | ||||
glGetIntegerv (GL_FRAMEBUFFER_BINDING, &fb); | glGetIntegerv (GL_FRAMEBUFFER_BINDING, &fb); | ||||
@@ -95,10 +95,10 @@ public: | |||||
void releaseAsRenderingTarget(); | void releaseAsRenderingTarget(); | ||||
/** Returns the ID of this framebuffer, or 0 if it isn't initialised. */ | /** Returns the ID of this framebuffer, or 0 if it isn't initialised. */ | ||||
GLuint getFrameBufferID() const; | |||||
GLuint getFrameBufferID() const noexcept; | |||||
/** Returns the current frame buffer ID for the current context. */ | /** Returns the current frame buffer ID for the current context. */ | ||||
static GLuint getCurrentFrameBufferTarget(); | |||||
static GLuint getCurrentFrameBufferTarget() noexcept; | |||||
/** Clears the framebuffer with the specified colour. */ | /** Clears the framebuffer with the specified colour. */ | ||||
void clear (Colour colour); | void clear (Colour colour); | ||||