# HG changeset patch # User Sebastien Jodogne # Date 1674917281 -3600 # Node ID e0906b7c67b95d52a014c6903a281e0e4feaee46 # Parent a72ca4959aa6ca3046db78abdea8912b9e898e3f const diff -r a72ca4959aa6 -r e0906b7c67b9 OrthancStone/Sources/OpenGL/OpenGLTexture.cpp --- a/OrthancStone/Sources/OpenGL/OpenGLTexture.cpp Sat Jan 28 13:03:14 2023 +0100 +++ b/OrthancStone/Sources/OpenGL/OpenGLTexture.cpp Sat Jan 28 15:48:01 2023 +0100 @@ -148,7 +148,7 @@ } - void OpenGLTexture::Bind(GLint location) + void OpenGLTexture::Bind(GLint location) const { glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, texture_); @@ -156,7 +156,7 @@ } - Orthanc::ImageAccessor* OpenGLTexture::Download(Orthanc::PixelFormat format) + Orthanc::ImageAccessor* OpenGLTexture::Download(Orthanc::PixelFormat format) const { if (context_.IsContextLost()) { diff -r a72ca4959aa6 -r e0906b7c67b9 OrthancStone/Sources/OpenGL/OpenGLTexture.h --- a/OrthancStone/Sources/OpenGL/OpenGLTexture.h Sat Jan 28 13:03:14 2023 +0100 +++ b/OrthancStone/Sources/OpenGL/OpenGLTexture.h Sat Jan 28 15:48:01 2023 +0100 @@ -84,9 +84,9 @@ void Load(const Orthanc::ImageAccessor& image, bool isLinearInterpolation); - void Bind(GLint location); + void Bind(GLint location) const; - Orthanc::ImageAccessor* Download(Orthanc::PixelFormat format); + Orthanc::ImageAccessor* Download(Orthanc::PixelFormat format) const; /** * By default, textures are mirrored at the borders. This