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:
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]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue