MCPcopy Create free account
hub / github.com/Hopson97/HopsonCraft / addData

Method addData

Source/Model.cpp:51–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51void Model::addData(const std::vector<GLfloat>& vertexPositions,
52 const std::vector<GLfloat>& textureCoordinates,
53 const std::vector<GLuint>& indices)
54{
55 deleteData();
56
57 m_indicesCount = indices.size();
58 glGenVertexArrays(1, &m_vao);
59 glBindVertexArray(m_vao);
60
61 addVBO(3, vertexPositions);
62 addVBO(2, textureCoordinates);
63 addEBO(indices);
64}
65
66void Model::deleteData()
67{

Callers 3

bufferMethod · 0.80
RHit_BoxMethod · 0.80
RSimpleMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected