Mercurial > hg > orthanc-stone
comparison Framework/Scene2D/Internals/OpenGLFloatTextureProgram.h @ 947:1091b2adeb5a toa2019081001
Fixed animation frame stopping when returning false + big work on the OpenGL
objects to make them lost context-safe + debug code to forcefully tag a
context as lost + debug macros
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Sat, 10 Aug 2019 13:07:31 +0200 |
parents | 4d1f57773b5b |
children | 2d8ab34c8c91 |
comparison
equal
deleted
inserted
replaced
946:dbe3e1e47019 | 947:1091b2adeb5a |
---|---|
36 OpenGL::OpenGLTexture texture_; | 36 OpenGL::OpenGLTexture texture_; |
37 float offset_; | 37 float offset_; |
38 float slope_; | 38 float slope_; |
39 | 39 |
40 public: | 40 public: |
41 Data(const Orthanc::ImageAccessor& texture, | 41 Data(OpenGL::IOpenGLContext& context, const Orthanc::ImageAccessor& texture, |
42 bool isLinearInterpolation); | 42 bool isLinearInterpolation); |
43 | 43 |
44 float GetOffset() const | 44 float GetOffset() const |
45 { | 45 { |
46 return offset_; | 46 return offset_; |
55 { | 55 { |
56 return texture_; | 56 return texture_; |
57 } | 57 } |
58 }; | 58 }; |
59 | 59 |
60 private: | |
61 OpenGLTextureProgram program_; | |
62 | |
63 public: | 60 public: |
64 OpenGLFloatTextureProgram(OpenGL::IOpenGLContext& context); | 61 OpenGLFloatTextureProgram(OpenGL::IOpenGLContext& context); |
65 | 62 |
66 void Apply(Data& data, | 63 void Apply(Data& data, |
67 const AffineTransform2D& transform, | 64 const AffineTransform2D& transform, |
68 float windowCenter, | 65 float windowCenter, |
69 float windowWidth, | 66 float windowWidth, |
70 bool invert); | 67 bool invert); |
68 private: | |
69 OpenGLTextureProgram program_; | |
70 OpenGL::IOpenGLContext& context_; | |
71 }; | 71 }; |
72 } | 72 } |
73 } | 73 } |