aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorJohannes Schickel2015-12-20 05:54:34 +0100
committerJohannes Schickel2016-03-16 20:29:25 +0100
commit1c61e017a0eec8eff4d5f6281c2bd4e906103773 (patch)
tree41aef2b019b8319d6d72fb2f43ef100776c26e99 /backends
parentfe88375ff376cbb0d940c96ac6ec1667be4acab0 (diff)
downloadscummvm-rg350-1c61e017a0eec8eff4d5f6281c2bd4e906103773.tar.gz
scummvm-rg350-1c61e017a0eec8eff4d5f6281c2bd4e906103773.tar.bz2
scummvm-rg350-1c61e017a0eec8eff4d5f6281c2bd4e906103773.zip
OPENGL: Reset full context structure.
Diffstat (limited to 'backends')
-rw-r--r--backends/graphics/opengl/context.cpp12
1 files changed, 6 insertions, 6 deletions
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;