comparison OrthancStone/Sources/OpenGL/OpenGLTexture.h @ 2034:4b24b7533346 deep-learning

cont
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 27 Jan 2023 15:43:24 +0100
parents d10bab7cc396
children a73a8415780f
comparison
equal deleted inserted replaced
2033:23b0a42eea85 2034:4b24b7533346
41 GLuint texture_; 41 GLuint texture_;
42 unsigned int width_; 42 unsigned int width_;
43 unsigned int height_; 43 unsigned int height_;
44 OpenGL::IOpenGLContext& context_; 44 OpenGL::IOpenGLContext& context_;
45 45
46 void Setup(Orthanc::PixelFormat format,
47 unsigned int width,
48 unsigned int height,
49 bool isLinearInterpolation,
50 const void* data);
51
46 public: 52 public:
47 explicit OpenGLTexture(OpenGL::IOpenGLContext& context); 53 explicit OpenGLTexture(OpenGL::IOpenGLContext& context);
48 54
49 ~OpenGLTexture(); 55 ~OpenGLTexture();
56
57 GLuint GetId() const
58 {
59 return texture_;
60 }
50 61
51 unsigned int GetWidth() const 62 unsigned int GetWidth() const
52 { 63 {
53 return width_; 64 return width_;
54 } 65 }
56 unsigned int GetHeight() const 67 unsigned int GetHeight() const
57 { 68 {
58 return height_; 69 return height_;
59 } 70 }
60 71
72 void Setup(Orthanc::PixelFormat format,
73 unsigned int width,
74 unsigned int height,
75 bool isLinearInterpolation)
76 {
77 Setup(format, width, height, isLinearInterpolation, NULL);
78 }
79
61 void Load(const Orthanc::ImageAccessor& image, 80 void Load(const Orthanc::ImageAccessor& image,
62 bool isLinearInterpolation); 81 bool isLinearInterpolation);
63 82
64 void Bind(GLint location); 83 void Bind(GLint location);
65 84