Commit 32b0a95a authored by Anakin's avatar Anakin

use import data

parent e863c68a
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment