Shaders not working after reinstalling OF!

Hi!

Today I was forced to reinstall OF. I have tried both the newest version and the one I was working with before (v20191002 reads in the download).

I have many apps with a basic kaleido.vert and kaleido.frag (#version 120). These old apps are able to compile my shaders. However, if I create a new project and add these shaders, I get this:


**[ error ] ofMesh: load(): 1:wrong format, expecting 'ply'**

**[ error ] ofMesh: load(): ""**

**[ error ] ofShader: setupShaderFromFile(): couldn't load GL_VERTEX_SHADER shader from "/Users/myname/OF/apps/myApps/optical_21_4/bin/data/kaleido.vert"**

**[ error ] ofShader: setupShaderFromFile(): couldn't load GL_FRAGMENT_SHADER shader from "/Users/myname/OF/apps/myApps/optical_21_4/bin/data/kaleido.frag"**

**[ error ] ofShader: linkProgram(): trying to link GLSL program, but no shaders created yet**

As you can see, it also seems to complain about meshes that worked fine as well before the installation. Any advice is really really welcome, my uni deadlines are approaching :frowning:

Hello! Did you try editing the main.cpp, like this?

Minute 3:12, he edits the main.cpp, and sets the GL version. Maybe, you could replace with your settings setGLversion(3,1);

You could also try to modify the shader to match the GL version 2, and put setGLversion(3,2);

I hope it helps!

1 Like

Hi @uaralab thank you so much for your help! Main.cpp editing has been really useful in the past; however this time it was only my silly mistake of assuming I have shaders in data/bin when they were not. Need to be more careful when copying many project folders. Thanks for your time!

1 Like

hahahaha! No problem, those kinds of things happen very often to me. Im glad you solved it!