It works! Using glEnableClientState and glVertexPointer draws a triangle on both OS's. But how come using glEnableVertexAttribArray and glVertexAttribPointer works on Windows but not Linux? And the tutorial even uses this code without shaders and it still draws the triangle.
Also, I tried changing GLSL version to 1.20 (even tried 1.30) but it still gives me that error. What I did was do "#version 120 core" instead of "#version 420 core" in both fragment and vertex shader files. How can I fix this? (Am I even changing the GLSL version by doing this? Sorry, new to this)
Also, wouldn't it be preferable to use glEnableVertexAttribArray and glVertexAttribPointer? Also, going a bit off-topic, but is the tutorial teaching fixed-function pipeline? Or is it programmable?
EDIT: I changed it to "#version 120" instead of "#version 120 core" and it now produces new errors.
Compiling shader: SimpleVertexShader.vertexshader 0:4(1): error: syntax error, unexpected IDENTIFIER Compiling shader: SimpleFragmentShader.fragmentshader 0:4(15): error: `out' qualifier in declaration of ` Linking program error: linking with uncompiled shadererror: linking with uncompiled shader
I think the SimpleVertexShader error is referring to the "layout" code and the SimpleFragmentShader error is referring to the "out" code.