use import data

This commit is contained in:
Anakin 2016-12-30 15:06:26 +01:00
parent e863c68a77
commit 32b0a95afb

View File

@ -103,22 +103,22 @@ void GeometryEngine::initCubeGeometry()
23,20,21
};
//// Transfer vertex data to VBO 0
//m_arrayBuf.bind();
//m_arrayBuf.allocate(m_models->first()->segmList.front()->vertices.data(), m_models->first()->segmList.front()->vertices.size() * sizeof(VertexData));
//// Transfer index data to VBO 1
//m_indexBuf.bind();
//m_indexBuf.allocate(m_models->first()->segmList.front()->indices.data(), m_models->first()->segmList.front()->indices.size() * sizeof(GLushort));
// Transfer vertex data to VBO 0
m_arrayBuf.bind();
m_arrayBuf.allocate(vertices.data(), vertices.size() * sizeof(VertexData));
m_arrayBuf.allocate(m_models->first()->segmList.front()->vertices.data(), m_models->first()->segmList.front()->vertices.size() * sizeof(VertexData));
// Transfer index data to VBO 1
m_indexBuf.bind();
m_indexBuf.allocate(indices.data(), indices.size() * sizeof(GLushort));
m_indexBuf.allocate(m_models->first()->segmList.front()->indices.data(), m_models->first()->segmList.front()->indices.size() * sizeof(GLushort));
//// Transfer vertex data to VBO 0
//m_arrayBuf.bind();
//m_arrayBuf.allocate(vertices.data(), vertices.size() * sizeof(VertexData));
//// Transfer index data to VBO 1
//m_indexBuf.bind();
//m_indexBuf.allocate(indices.data(), indices.size() * sizeof(GLushort));
// load the texture
initTexture();