修正BindVBO2VAO中的bug,并在windows平台测试完成
This commit is contained in:
parent
8ae387a224
commit
d87c339a08
@ -70,13 +70,13 @@ void BindVBO2VAO(const int vao,const int binding_index,const int shader_location
|
||||
glVertexArrayAttribBinding(vao,shader_location,binding_index);
|
||||
glVertexArrayAttribFormat(vao,shader_location,vb->GetComponent(),vb->GetDataType(),GL_FALSE,0);
|
||||
glEnableVertexArrayAttrib(vao,shader_location);
|
||||
glVertexArrayVertexBuffer(vao,shader_location,vb->GetBufferIndex(),0,vb->GetStride());
|
||||
glVertexArrayVertexBuffer(vao,binding_index,vb->GetBufferIndex(),0,vb->GetStride());
|
||||
}
|
||||
|
||||
void InitVertexBuffer()
|
||||
{
|
||||
vb_vertex=new VB2f(4,vertex_data);
|
||||
vb_color=new VB3f(4,color_data);
|
||||
vb_vertex=new VB2f(3,vertex_data);
|
||||
vb_color=new VB3f(3,color_data);
|
||||
|
||||
va=new VertexArray(GL_TRIANGLES, //画三角形
|
||||
2); //两个属性
|
||||
|
Loading…
x
Reference in New Issue
Block a user