• Create Account

### #Actualtanzanite7

Posted 09 September 2012 - 03:22 PM

I would advise to stick with one glsl version - less confusing. Start with 3.2 or something, where all shader stages get their input from "in" and send out with "out" instead of "attribute", "varying".

Also, one can use layout location for vertex shader input too, so this is not needed:
GLint position_id = glGetAttribLocation(shader_program,"position");
as you can do that in glsl source:
layout(location = 0) in vec3 position

Can not say for sure about the buffer numbering, too sleepy, so i wont.

### #1tanzanite7

Posted 09 September 2012 - 03:21 PM

I would advise to stick with one glsl version - less confusing. Start with 3.2 or something, where all shader stages get their input from "in" and send out with "out" instead of "attribute", "varying".

Also, one can use layout location for vertex shader input too, so this is not needed:
GLint position_id = glGetAttribLocation(shader_program,"position");
glEnableVertexAttribArray(position_id);
as you can do that in glsl source:
layout(location = 0) in vec3 position

Can not say for sure about the buffer numbering, too sleepy, so i wont.

PARTNERS