use import data
This commit is contained in:
parent
e863c68a77
commit
32b0a95afb
|
@ -103,22 +103,22 @@ void GeometryEngine::initCubeGeometry()
|
||||||
23,20,21
|
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
|
// Transfer vertex data to VBO 0
|
||||||
m_arrayBuf.bind();
|
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
|
// Transfer index data to VBO 1
|
||||||
m_indexBuf.bind();
|
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
|
// load the texture
|
||||||
initTexture();
|
initTexture();
|
||||||
|
|
Loading…
Reference in New Issue