Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/OpenGL/OpenGLTexture.cpp @ 2058:c0627145b441 deep-learning
added OpenGLTexture::IsLinearInterpolation()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 24 Apr 2023 17:09:23 +0200 |
parents | 66c130af0d3c |
children | 86e0e92a2e0d |
comparison
equal
deleted
inserted
replaced
2057:8bb8d9c0cfd0 | 2058:c0627145b441 |
---|---|
41 OpenGLTexture::OpenGLTexture(OpenGL::IOpenGLContext& context) : | 41 OpenGLTexture::OpenGLTexture(OpenGL::IOpenGLContext& context) : |
42 texture_(0), | 42 texture_(0), |
43 width_(0), | 43 width_(0), |
44 height_(0), | 44 height_(0), |
45 format_(Orthanc::PixelFormat_Grayscale8), | 45 format_(Orthanc::PixelFormat_Grayscale8), |
46 context_(context) | 46 context_(context), |
47 isLinearInterpolation_(false) | |
47 { | 48 { |
48 if (!context_.IsContextLost()) | 49 if (!context_.IsContextLost()) |
49 { | 50 { |
50 // Generate a texture object | 51 // Generate a texture object |
51 glGenTextures(1, &texture_); | 52 glGenTextures(1, &texture_); |
114 ConvertToOpenGLFormats(sourceFormat, internalFormat, pixelType, format); | 115 ConvertToOpenGLFormats(sourceFormat, internalFormat, pixelType, format); |
115 | 116 |
116 format_ = format; | 117 format_ = format; |
117 width_ = width; | 118 width_ = width; |
118 height_ = height; | 119 height_ = height; |
120 isLinearInterpolation_ = isLinearInterpolation; | |
119 | 121 |
120 GLint interpolation = (isLinearInterpolation ? GL_LINEAR : GL_NEAREST); | 122 GLint interpolation = (isLinearInterpolation ? GL_LINEAR : GL_NEAREST); |
121 | 123 |
122 // Load the texture from the image buffer | 124 // Load the texture from the image buffer |
123 | 125 |