2

I have simple vertex shader

#version 330 core
in vec4 vertexPosition;
in vec4 vertexColor;
out vec4 v_color;
uniform mat4 mvp;

void main()
{
    v_color = vertexColor;
    gl_Position =  mvp * vertexPosition;
}

and I call it using

BeginShaderMode(simpleShader);
 DrawTriangleFan(vertices, vertexNum, RED);
EndShaderMode();

Now i need one more input attribute to scale vertexColor. I can't use uniform, because it's not per-vertex. Should i use VBO somehow?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.