Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualKrankles

Posted 11 February 2013 - 09:28 AM

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.


#3Krankles

Posted 11 February 2013 - 09:25 AM

<p>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.</p>
<p>&nbsp;</p>
<p>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 &quot;#version 120 core&quot; instead of &quot;#version 420 core&quot; 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)</p>
<p>&nbsp;</p>
<p>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?</p>
<p>&nbsp;</p>
<p>EDIT: I changed it to &quot;#version 120&quot; instead of &quot;#version 120 core&quot; and it produces new errors.</p>
<pre class="_prettyXprint">
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
</pre>
<p>&nbsp;</p>
<p>I think the SimpleVertexShader error is referring to the &quot;layout&quot; code and the SimpleFragmentShader error is referring to the &quot;out&quot; code.</p>

#2Krankles

Posted 11 February 2013 - 08:11 AM

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?


#1Krankles

Posted 11 February 2013 - 07:59 AM

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 these exact commands 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?


PARTNERS