Unable to load 1.50 shaders (OpenGL 3.2) with a compatible mac

Hey,

I’ trying to load some shaders that are written in 1.50 version. I’ve got an 9,1 mac, with a nvidia 650M graphic card, which support OpenGL 3.2 and 4.1 and so, 1.50.

But my ofAppRunner runs the 2.1 version of my shader…

And I get this error when I try to load a 1.5 shader :

Any Ideas ?

Thanks,
Cyril

What version of OF are you using and in your main.cpp, how do you setup your GL context? With OF-0.8.4, I tried the glintExample and had to manually use the programmable renderer to get GL 4.1:

#include "ofMain.h"
#include "ofApp.h"

//========================================================================
int main( ){
	ofSetCurrentRenderer(ofGLProgrammableRenderer::TYPE); // ⭐️⭐️

	ofSetupOpenGL(700,400, OF_WINDOW);			// <-------- setup the GL context

	// this kicks off the running of my app
	// can be OF_WINDOW or OF_FULLSCREEN
	// pass in width and height too:
	ofRunApp( new ofApp());
}

I’m using the 0.8.4 version, here is my main.cpp :

 int main(){
   ofAppGLFWWindow window;
   ofSetCurrentRenderer(ofGLProgrammableRenderer::TYPE);
   ofSetupOpenGL(&window, 1024,768, OF_WINDOW);
   ofRunApp( new xApp());
   }  

Someone told me to use ofGLProgrammableRenderer, but if I understand, it just let me use different shaders depending on my system ? (like if my system is 2.1, it will use 1.20 shaders, and if my system is 3.2 it will use 1.50 shaders, no ?)

I’m trying to use this :
ExplosionMesh by Kashim Astro
I’ve got a mid 2012 Macbook pro.

Cyril

Okay, so, by downloading the latest version of OF on Github (not the release), I can set : ofSetOpenGLVersion(3,2); which let me load the shader.
But I get this error :

Cyril

Ok, so I’ve rewrote the program for mac, the error report has slightly changed, here is a .cpp :

ShaderReport.cpp (28.0 Ko)

Kashim Astro told me to setup the shader from source, but something strange happen :
Xcode let me write only 2 arguments, even if in shader.cpp there are 3 :

Here is the project if someone wants to try it :

https://drive.google.com/file/d/0BzHRsYzWILc9M2w5cmR2aFJENzA/view?usp=sharing

Thanks ! :slight_smile:

Cyril