McLeary
03-05-2011, 07:28 PM
why should one make something like this in a vertex shader?
layout (location = 0) in vec4 position;
layout (location = 1) in vec4 color;
smooth out vec4 theColor;
void main()
{
gl_Position = position;
theColor = color;
}
Does gl_vertex and gl_color are now deprecated?
I'm confusing about the new GLSL spec.
if, for example, gl_color is now deprecated, how can I read vertex colors inside a vertex shader using glColorPointer function?
Should I always use glVertexPointer to set per-vertex attributes?
layout (location = 0) in vec4 position;
layout (location = 1) in vec4 color;
smooth out vec4 theColor;
void main()
{
gl_Position = position;
theColor = color;
}
Does gl_vertex and gl_color are now deprecated?
I'm confusing about the new GLSL spec.
if, for example, gl_color is now deprecated, how can I read vertex colors inside a vertex shader using glColorPointer function?
Should I always use glVertexPointer to set per-vertex attributes?