From 1c61e017a0eec8eff4d5f6281c2bd4e906103773 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 20 Dec 2015 05:54:34 +0100 Subject: OPENGL: Reset full context structure. --- backends/graphics/opengl/context.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'backends') diff --git a/backends/graphics/opengl/context.cpp b/backends/graphics/opengl/context.cpp index 0944e05f7c..764cabcbde 100644 --- a/backends/graphics/opengl/context.cpp +++ b/backends/graphics/opengl/context.cpp @@ -28,13 +28,13 @@ namespace OpenGL { void Context::reset(bool full) { - if (full) { - // GLES supports least features, thus we initialize the context type - // to this on full reset. - type = kContextGLES; - } + // GLES supports least features, thus we initialize the context type + // to this on full reset. + const ContextType savedType = full ? kContextGLES : type; + + memset(this, 0, sizeof(Context)); - NPOTSupported = false; + type = savedType; } Context g_context; -- cgit v1.2.3