Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/OpenGL/OpenGLTexture.cpp @ 2035:a73a8415780f deep-learning
added OpenGLTexture::SetClampingToZero()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 27 Jan 2023 19:03:47 +0100 |
parents | 4b24b7533346 |
children | 444527d34647 |
comparison
equal
deleted
inserted
replaced
2034:4b24b7533346 | 2035:a73a8415780f |
---|---|
209 throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); | 209 throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); |
210 } | 210 } |
211 | 211 |
212 return target.release(); | 212 return target.release(); |
213 } | 213 } |
214 | |
215 | |
216 void OpenGLTexture::SetClampingToZero() | |
217 { | |
218 glBindTexture(GL_TEXTURE_2D, texture_); | |
219 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER); | |
220 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER); | |
221 | |
222 GLfloat colorfv[4] = { 0, 0, 0, 0 }; | |
223 glTextureParameterfv(texture_, GL_TEXTURE_BORDER_COLOR, colorfv); | |
224 } | |
214 } | 225 } |
215 } | 226 } |