Hi folks,
I’ve got the following code regarding a draw and a custom shader:
// a bunch of uniforms are set here, they work fine
// I've tried things like this:
glBindBuffer(GL_ARRAY_BUFFER,My_VBO[i].first[1]);
glEnableVertexAttribArray(0);
glVertexAttribPointer(0,3,GL_FLOAT,GL_FALSE,sizeof(float)*3,0);
// and this:
int loc = glGetAttribLocation(Shader_id,"Colour_In");
glEnableVertexAttribArray(loc);
glVertexAttribPointer(loc,3,GL_FLOAT,GL_FALSE,0,0);
// and other variations, including some argument variations
and the stripped down shader (non-colour related objects/code removed):
#version 440
layout(location = 0) in vec3 Colour_In;
out vec4 Colour;
void main()
{
Colour = vec4(Colour_In,1.0);
}
The short of it is I only get a black rendered plane. I’m confident the colour data is good, I can print some of it’s values before making it a VBO. I think it drew fine under the fixed pipeline before trying to make my own shader as well. Other than that, no errors are reported anywhere that I can find. Where am/could I be going wrong here?
Kind regards,
WP.