Problems Running Linux GLSL code on Mac

Hi All,

I’m trying to get some code I’ve written for linux working for Mac. However, if I can get a specific example from the Lazyfoo tutorials working then I can apply to to my code.

http://lazyfoo.net/tutorials/SDL/51_SDL_and_modern_opengl/index.php

I have gotten SDL2 and GLEW off of brew. I can compile the example by changing the #include<GL/glu.h> to #include <OpenGL/glu.h> and running

g++ 51_SDL_and_modern_opengl.cpp -framework OpenGL -lSDL2 -lGLEW

The program compiles but I get a black screen. No other code has been changed. I am able to compile the SDL/OpenGL 2 example from Lazyfoo and see the square, but this modern one doesn’t seem to work.

Do I have to use the compatibility profile? Not really sure.

output from glGetString(GL_VERSION) and glGetString(GL_SHADING_LANGUAGE_VERSION):

GL version: 3.3 NVIDIA-8.24.16 310.90.9.05f01
GLSL version: 3.30

Edit: Is this true?

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.