pull/12/head
hayden v 2020-03-04 13:17:47 +10:00
parent 9d9fef3899
commit 991f576df6
2 changed files with 6 additions and 1 deletions

View File

@ -59,7 +59,7 @@ public class OBJFileLoader
{
float[] verticies = new float[vertexList.length * 3];
float[] textureCoords = new float[vertexList.length * 2];
//texture coords where stored in the vertices so there should be as many as there are vertices
//texture cords where stored in the vertices so there should be as many as there are vertices
int j = 0;
int i = 0;
for (Vertex vertex : vertexList)

View File

@ -166,7 +166,12 @@ public class VKModelData
long stagingBuffer = pBuffer.get(0);
long stagingBufferMemory = pBufferMemory.get(0);
PointerBuffer data = stack.mallocPointer(1);
VK12.vkMapMemory(VKRegister.device, stagingBufferMemory, 0, bufferSize, 0, data);
{
memcpy(data.getByteBuffer(0, (int) bufferSize), mesh.getVertices());
}
VK12.vkUnmapMemory(VKRegister.device, stagingBufferMemory);
createBuffer(bufferSize,