1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| CResEffect* effect = CResEffect::Create("mon_vertex_shader.vs");
V(effect->attribute("VertexPosition", 0))
V(effect->attribute("VertexNormal", 1))
V(effect->attribute("VertexColor", 2))
V(effect->link())
_meshPing = CResMesh::Create("mon_mesh.msh");
_meshPong = _meshPing.clone();
_meshPing->attribute(0, 3,GL_FLOAT,sizeof(CParticle), 0);
_meshPing->attribute(1, 3,GL_FLOAT,sizeof(CParticle), sizeof(glm::vec3));
_meshPing->attribute(2, 3,GL_FLOAT,sizeof(CParticle), 2*sizeof(glm::vec3));
_meshPong->attribute(0, 3,GL_FLOAT,sizeof(CParticle), 0);
_meshPong->attribute(1, 3,GL_FLOAT,sizeof(CParticle), sizeof(glm::vec3));
_meshPong->attribute(2, 3,GL_FLOAT,sizeof(CParticle), 2*sizeof(glm::vec3)); |
Partager