# HG changeset patch # User Sebastien Jodogne # Date 1678096855 -3600 # Node ID 0b596428e60cd39f2c386994faba8520bb84a942 # Parent 98b44468332e6c0e3cc107dde2df612e9c765900 added OpenGLTexture::GetFormat() diff -r 98b44468332e -r 0b596428e60c OrthancStone/Sources/OpenGL/OpenGLTexture.cpp --- a/OrthancStone/Sources/OpenGL/OpenGLTexture.cpp Mon Mar 06 09:04:10 2023 +0100 +++ b/OrthancStone/Sources/OpenGL/OpenGLTexture.cpp Mon Mar 06 11:00:55 2023 +0100 @@ -36,6 +36,7 @@ texture_(0), width_(0), height_(0), + format_(Orthanc::PixelFormat_Grayscale8), context_(context) { if (!context_.IsContextLost()) @@ -106,6 +107,7 @@ GLenum sourceFormat, internalFormat, pixelType; ConvertToOpenGLFormats(sourceFormat, internalFormat, pixelType, format); + format_ = format; width_ = width; height_ = height; diff -r 98b44468332e -r 0b596428e60c OrthancStone/Sources/OpenGL/OpenGLTexture.h --- a/OrthancStone/Sources/OpenGL/OpenGLTexture.h Mon Mar 06 09:04:10 2023 +0100 +++ b/OrthancStone/Sources/OpenGL/OpenGLTexture.h Mon Mar 06 11:00:55 2023 +0100 @@ -41,6 +41,8 @@ GLuint texture_; unsigned int width_; unsigned int height_; + + Orthanc::PixelFormat format_; OpenGL::IOpenGLContext& context_; void Setup(Orthanc::PixelFormat format, @@ -63,6 +65,11 @@ return texture_; } + Orthanc::PixelFormat GetFormat() const + { + return format_; + } + unsigned int GetWidth() const { return width_;