mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-24 01:54:22 +00:00
Added a few noexcepts to some GL functions
This commit is contained in:
parent
26ff85ae94
commit
c06db136bd
3 changed files with 7 additions and 7 deletions
|
|
@ -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]);
|
||||
|
|
|
|||
|
|
@ -274,12 +274,12 @@ bool OpenGLFrameBuffer::makeCurrentRenderingTarget()
|
|||
return true;
|
||||
}
|
||||
|
||||
GLuint OpenGLFrameBuffer::getFrameBufferID() const
|
||||
GLuint OpenGLFrameBuffer::getFrameBufferID() const noexcept
|
||||
{
|
||||
return pimpl != nullptr ? pimpl->frameBufferID : 0;
|
||||
}
|
||||
|
||||
GLuint OpenGLFrameBuffer::getCurrentFrameBufferTarget()
|
||||
GLuint OpenGLFrameBuffer::getCurrentFrameBufferTarget() noexcept
|
||||
{
|
||||
GLint fb;
|
||||
glGetIntegerv (GL_FRAMEBUFFER_BINDING, &fb);
|
||||
|
|
|
|||
|
|
@ -95,10 +95,10 @@ public:
|
|||
void releaseAsRenderingTarget();
|
||||
|
||||
/** 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. */
|
||||
static GLuint getCurrentFrameBufferTarget();
|
||||
static GLuint getCurrentFrameBufferTarget() noexcept;
|
||||
|
||||
/** Clears the framebuffer with the specified colour. */
|
||||
void clear (Colour colour);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue