diff Framework/OpenGL/OpenGLTexture.cpp @ 1045:6a9300ecfa13

tests for context loss are now restricted to WebAssembly
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 09 Oct 2019 17:17:56 +0200
parents 1091b2adeb5a
children 2d8ab34c8c91
line wrap: on
line diff
--- a/Framework/OpenGL/OpenGLTexture.cpp	Wed Oct 09 15:58:39 2019 +0200
+++ b/Framework/OpenGL/OpenGLTexture.cpp	Wed Oct 09 17:17:56 2019 +0200
@@ -35,8 +35,6 @@
     {
       if (!context_.IsContextLost())
       {
-        // context is made current externally. Let's check this!
-        ORTHANC_CHECK_CURRENT_CONTEXT(context_);
         // Generate a texture object
         glGenTextures(1, &texture_);
         if (texture_ == 0)
@@ -53,8 +51,6 @@
       {
         if (!context_.IsContextLost())
         {
-          // context is made current externally. Let's check this!
-          ORTHANC_CHECK_CURRENT_CONTEXT(context_);
           assert(texture_ != 0);
           ORTHANC_OPENGL_TRACE_CURRENT_CONTEXT("About to call glDeleteTextures");
           glDeleteTextures(1, &texture_);
@@ -84,8 +80,6 @@
     void OpenGLTexture::Load(const Orthanc::ImageAccessor& image,
                              bool isLinearInterpolation)
     {
-      // context is made current externally. Let's check this!
-      ORTHANC_CHECK_CURRENT_CONTEXT(context_);
       if (!context_.IsContextLost())
       {
         glPixelStorei(GL_UNPACK_ALIGNMENT, 1); // Disable byte-alignment restriction