From 49ad935a99dfe121b47b145ea9a3ec1c007cb024 Mon Sep 17 00:00:00 2001
From: Gabriel Studer <gabriel.studer@unibas.ch>
Date: Thu, 16 May 2019 00:05:14 +0200
Subject: [PATCH] mark offscreen buffers as deprecated

---
 modules/gfx/src/CMakeLists.txt        | 21 ---------------------
 modules/gfx/src/impl/map_iso_gen_s.cc |  1 -
 modules/gfx/src/offscreen_buffer.hh   | 11 +++++++++++
 3 files changed, 11 insertions(+), 22 deletions(-)

diff --git a/modules/gfx/src/CMakeLists.txt b/modules/gfx/src/CMakeLists.txt
index bb60b35f1..fd1c54ebf 100644
--- a/modules/gfx/src/CMakeLists.txt
+++ b/modules/gfx/src/CMakeLists.txt
@@ -27,7 +27,6 @@ texture.hh
 vertex_array.hh
 vertex_array_helper.hh
 scene_observer.hh
-offscreen_buffer.hh
 gl_include.hh
 glext_include.hh
 render_mode.hh
@@ -182,26 +181,6 @@ else()
   set(OST_GFX_MAP_SOURCES "")  
 endif()
 
-if (UNIX AND NOT APPLE)
-  if(USE_MESA)
-    list(APPEND OST_GFX_SOURCES impl/mesa_offscreen_buffer.cc)
-    list(APPEND OST_GFX_IMPL_HEADERS mesa_offscreen_buffer.hh)
-  else()
-    list(APPEND OST_GFX_SOURCES impl/glx_offscreen_buffer.cc)
-    list(APPEND OST_GFX_IMPL_HEADERS glx_offscreen_buffer.hh)
-  endif()
-endif()
-
-if (APPLE)
-  list(APPEND OST_GFX_SOURCES impl/cgl_offscreen_buffer.cc)
-  list(APPEND OST_GFX_IMPL_HEADERS cgl_offscreen_buffer.hh)
-endif()
-
-if(WIN32)
-  list(APPEND OST_GFX_SOURCES impl/wgl_offscreen_buffer.cc)
-  list(APPEND OST_GFX_IMPL_HEADERS wgl_offscreen_buffer.hh)
-endif()
-
 if (USE_SHADER)
   list(APPEND OST_GFX_SOURCES shader.cc)
   list(APPEND OST_GFX_HEADERS shader.hh)
diff --git a/modules/gfx/src/impl/map_iso_gen_s.cc b/modules/gfx/src/impl/map_iso_gen_s.cc
index e1fe9818a..c16461c69 100644
--- a/modules/gfx/src/impl/map_iso_gen_s.cc
+++ b/modules/gfx/src/impl/map_iso_gen_s.cc
@@ -30,7 +30,6 @@
 #if OST_SHADER_SUPPORT_ENABLED
 # define MAP_ISO_USE_SHADER 0
 # include <ost/gfx/shader.hh>
-# include <ost/gfx/offscreen_buffer.hh>
 # include <ost/gfx/scene.hh>
 #endif
 
diff --git a/modules/gfx/src/offscreen_buffer.hh b/modules/gfx/src/offscreen_buffer.hh
index 7b716c2f6..f62319062 100644
--- a/modules/gfx/src/offscreen_buffer.hh
+++ b/modules/gfx/src/offscreen_buffer.hh
@@ -19,6 +19,17 @@
 #ifndef OST_GFX_OFFSCREEN_BUFFER_HH
 #define OST_GFX_OFFSCREEN_BUFFER_HH
 
+
+
+/*
+ THE OFFSCREEN BUFFER IS DEPRECATED AND CURRENTLY NOT USED
+ Offscreen rendering for image export is now performed in a QT managed
+ offscreen buffer (e.g. gui/src/gl_canvas.hh). Reason for that is maintenance,
+ as there are platform dependent buffer implementations.   
+*/
+
+
+
 /*
   Wraps GL offscreen rendering per platform
 
-- 
GitLab