diff OrthancStone/Sources/OpenGL/OpenGLTexture.h @ 2060:86e0e92a2e0d deep-learning

added OpenGLTextureArray and OpenGLFramebuffer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 03 May 2023 16:15:50 +0200
parents c0627145b441
children fdb012c86a75
line wrap: on
line diff
--- a/OrthancStone/Sources/OpenGL/OpenGLTexture.h	Mon Apr 24 17:10:41 2023 +0200
+++ b/OrthancStone/Sources/OpenGL/OpenGLTexture.h	Wed May 03 16:15:50 2023 +0200
@@ -37,13 +37,14 @@
   {
     class OpenGLTexture : public boost::noncopyable
     {
+      friend class OpenGLFramebuffer;
+
     private:
-      GLuint        texture_;
-      unsigned int  width_;
-      unsigned int  height_;
-
+      OpenGL::IOpenGLContext& context_;
+      GLuint                  texture_;
+      unsigned int            width_;
+      unsigned int            height_;
       Orthanc::PixelFormat    format_;
-      OpenGL::IOpenGLContext& context_;
       bool                    isLinearInterpolation_;
 
       void Setup(Orthanc::PixelFormat format,
@@ -52,11 +53,6 @@
                  bool isLinearInterpolation,
                  const void* data);
 
-    public:
-      explicit OpenGLTexture(OpenGL::IOpenGLContext& context);
-
-      ~OpenGLTexture();
-
       /**
        * Returns the low-level OpenGL handle of the texture. Beware to
        * never change the size of the texture using this handle!
@@ -66,6 +62,11 @@
         return texture_;
       }
 
+    public:
+      explicit OpenGLTexture(OpenGL::IOpenGLContext& context);
+
+      ~OpenGLTexture();
+
       Orthanc::PixelFormat GetFormat() const
       {
         return format_;