comparison Framework/Scene2D/Internals/OpenGLFloatTextureProgram.cpp @ 592:bbe29efd3d1c

OpenGLLinesProgram
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 26 Apr 2019 12:55:43 +0200
parents b66ced2c43d4
children e3f21a265be5
comparison
equal deleted inserted replaced
591:b66ced2c43d4 592:bbe29efd3d1c
54 54
55 namespace OrthancStone 55 namespace OrthancStone
56 { 56 {
57 namespace Internals 57 namespace Internals
58 { 58 {
59 OpenGLFloatTextureProgram::OpenGLFloatTextureProgram(OpenGL::IOpenGLContext& context) :
60 program_(context, FRAGMENT_SHADER)
61 {
62 }
63
64
65 OpenGLFloatTextureProgram::Data::Data(const Orthanc::ImageAccessor& texture, 59 OpenGLFloatTextureProgram::Data::Data(const Orthanc::ImageAccessor& texture,
66 bool isLinearInterpolation) 60 bool isLinearInterpolation)
67 { 61 {
68 if (texture.GetFormat() != Orthanc::PixelFormat_Float32) 62 if (texture.GetFormat() != Orthanc::PixelFormat_Float32)
69 { 63 {
126 120
127 texture_.Load(converted, isLinearInterpolation); 121 texture_.Load(converted, isLinearInterpolation);
128 } 122 }
129 123
130 124
125 OpenGLFloatTextureProgram::OpenGLFloatTextureProgram(OpenGL::IOpenGLContext& context) :
126 program_(context, FRAGMENT_SHADER)
127 {
128 }
129
130
131 void OpenGLFloatTextureProgram::Apply(Data& data, 131 void OpenGLFloatTextureProgram::Apply(Data& data,
132 const AffineTransform2D& transform, 132 const AffineTransform2D& transform,
133 float windowCenter, 133 float windowCenter,
134 float windowWidth) 134 float windowWidth)
135 { 135 {