Open kirbyszeto opened 5 years ago
That shader needs to be updated to GLSL version 150 or greater to work in your project.
Thanks! is that something updated through the device driver?
My bad, there is support for OpenGL 4.0 in the source code. Try using this code to create your window in main.cpp
ofGLWindowSettings settings;
settings.setGLVersion(4,0);
settings.width = 1200;
settings.height = 700;
ofCreateWindow(settings);
When I do that, I now get this error:
[ error ] ofShader: setupShaderFromSource(): GL_FRAGMENT_SHADER shader failed to compile [ error ] ofShader: GL_FRAGMENT_SHADER shader reports: ERROR: 0:2: 'texture2D' : function is removed in Forward Compatibile context ERROR: 0:2: 'texture2D' : function is removed in Forward Compatibile context ERROR: 0:2: '=' : cannot convert from 'const float' to '4-component vector of float'
[ error ] ofShader: GL_FRAGMENT_SHADER, offending line 2 : 1 #version 400 2 uniform sampler2D src_tex0; in vec2 v_texcoord; out vec4 v_fragColor; uniform float width; uniform float height; const vec4 offsets = vec4(-0.50196078431373, -0.50196078431373, 0.0, 0.0); void main() { vec4 CoCgSY = texture2D(src_tex0, v_texcoord); CoCgSY += offsets; float scale = ( CoCgSY.z * ( 255.0 / 8.0 ) ) + 1.0; float Co = CoCgSY.x / scale; float Cg = CoCgSY.y / scale; float Y = CoCgSY.w; vec4 rgba = vec4(Y + Co - Cg, Y + Cg, Y - Co - Cg, 1.0); v_fragColor = rgba; }
[ error ] ofxDSHapVideoPlayer: Failed to setup shader
I have been writing/compiling my app from Windows 7, VS 2017. Running the app locally works fine.
If I try to run the compiled app from a Windows 10 machine, I get a series of ofShader warnings, then the app stops rendering. I can see notices running in the debug window, so I know it is still running. just not rendering anything.
warnings look like: