comparison Framework/Scene2D/Internals/OpenGLColorTextureProgram.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 b66ced2c43d4
children 1091b2adeb5a
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 "OpenGLColorTextureProgram.h" 22 #include "OpenGLColorTextureProgram.h"
23 23 #include "OpenGLShaderVersionDirective.h"
24 24
25 static const char* FRAGMENT_SHADER = 25 static const char* FRAGMENT_SHADER =
26 ORTHANC_STONE_OPENGL_SHADER_VERSION_DIRECTIVE
26 "uniform sampler2D u_texture; \n" 27 "uniform sampler2D u_texture; \n"
27 "varying vec2 v_texcoord; \n" 28 "varying vec2 v_texcoord; \n"
28 "void main() \n" 29 "void main() \n"
29 "{ \n" 30 "{ \n"
30 " gl_FragColor = texture2D(u_texture, v_texcoord); \n" 31 " gl_FragColor = texture2D(u_texture, v_texcoord); \n"