Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/OpenGL/OpenGLTexture.cpp @ 1564:e731e62692a9
upgrading Orthanc framework
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 17 Sep 2020 15:18:21 +0200 |
parents | 244ad1e4e76a |
children | 4fb8fdf03314 |
comparison
equal
deleted
inserted
replaced
1563:e0045462a25c | 1564:e731e62692a9 |
---|---|
124 | 124 |
125 GLint interpolation = (isLinearInterpolation ? GL_LINEAR : GL_NEAREST); | 125 GLint interpolation = (isLinearInterpolation ? GL_LINEAR : GL_NEAREST); |
126 | 126 |
127 // Load the texture from the image buffer | 127 // Load the texture from the image buffer |
128 glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, image.GetWidth(), image.GetHeight(), | 128 glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, image.GetWidth(), image.GetHeight(), |
129 0, sourceFormat, GL_UNSIGNED_BYTE, image.GetBuffer()); | 129 0, sourceFormat, GL_UNSIGNED_BYTE, image.GetConstBuffer()); |
130 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, interpolation); | 130 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, interpolation); |
131 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, interpolation); | 131 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, interpolation); |
132 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); | 132 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); |
133 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); | 133 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); |
134 } | 134 } |