comparison Framework/Scene2D/Internals/OpenGLFloatTextureProgram.cpp @ 611:e3f21a265be5

Added version directive to GLSL shader code + glew init function in sample code AND commented-out glew init function in StoneInitialize
author Benjamin Golinvaux <bgo@osimis.io>
date Tue, 30 Apr 2019 16:07:48 +0200
parents bbe29efd3d1c
children e6850c866469
comparison
equal deleted inserted replaced
610:0c4c0693b97c 611:e3f21a265be5
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. 18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 **/ 19 **/
20 20
21 21
22 #include "OpenGLFloatTextureProgram.h" 22 #include "OpenGLFloatTextureProgram.h"
23 #include "OpenGLShaderVersionDirective.h"
23 24
24 #include <Core/OrthancException.h> 25 #include <Core/OrthancException.h>
25 #include <Core/Images/Image.h> 26 #include <Core/Images/Image.h>
26 #include <Core/Images/ImageProcessing.h> 27 #include <Core/Images/ImageProcessing.h>
27 28
28 29
29 static const char* FRAGMENT_SHADER = 30 static const char* FRAGMENT_SHADER =
31 ORTHANC_STONE_OPENGL_SHADER_VERSION_DIRECTIVE
30 "uniform float u_offset; \n" 32 "uniform float u_offset; \n"
31 "uniform float u_slope; \n" 33 "uniform float u_slope; \n"
32 "uniform float u_windowCenter; \n" 34 "uniform float u_windowCenter; \n"
33 "uniform float u_windowWidth; \n" 35 "uniform float u_windowWidth; \n"
34 "uniform sampler2D u_texture; \n" 36 "uniform sampler2D u_texture; \n"