Mercurial > hg > orthanc-stone
changeset 2047:0b596428e60c deep-learning
added OpenGLTexture::GetFormat()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 06 Mar 2023 11:00:55 +0100 |
parents | 98b44468332e |
children | a05b03f45289 |
files | OrthancStone/Sources/OpenGL/OpenGLTexture.cpp OrthancStone/Sources/OpenGL/OpenGLTexture.h |
diffstat | 2 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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;
--- 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_;