

There are no errors before this function, (I removed the error checking code for clarity).Īlso the screen goes from normal desktop to a blank black screen, then repeats until I quit the app.

However when I compile the exact same source on Ubuntu Gnome 17.04 圆4 on the same laptop (dual booting Win and Linux) with gcc and glew 2.0.0, I get a GL_INVALID_OPERATION 1282 error at glUseProgram(shaderProgram).Ĭompiler runs with no warnings: g++ main.cpp -Wall -I/usr/include/SDL2 -lGL -lGLEW -lSDL2 -lSDL2_image -lSDL2_mixer -o game I am using SDL2.0.5 and glew 2.0.0 with VS2015 community and it works perfectly on my i5 skylake HD4000 laptop running Win7 pro 圆4. I'm trying to learn openGL 3.0 by following the example on (It just draws a coloured rectangle on the screen).
