Fixed issue with quad buffer.
This commit is contained in:
@ -27,8 +27,13 @@ void quadBuffer(primitive_t *primitive,
|
|||||||
vertices[3].x = x1, vertices[3].y = y1, vertices[3].z = 0;
|
vertices[3].x = x1, vertices[3].y = y1, vertices[3].z = 0;
|
||||||
vertices[3].u = u1, vertices[3].v = v1;
|
vertices[3].u = u1, vertices[3].v = v1;
|
||||||
|
|
||||||
indices[0] = (indice_t)0, indices[1] = (indice_t)1, indices[2] = (indice_t)2;
|
indices[0] = (indice_t)verticeStart + 0;
|
||||||
indices[3] = (indice_t)1, indices[4] = (indice_t)2, indices[5] = (indice_t)3;
|
indices[1] = (indice_t)verticeStart + 1;
|
||||||
|
indices[2] = (indice_t)verticeStart + 2;
|
||||||
|
|
||||||
|
indices[3] = (indice_t)verticeStart + 1;
|
||||||
|
indices[4] = (indice_t)verticeStart + 2;
|
||||||
|
indices[5] = (indice_t)verticeStart + 3;
|
||||||
|
|
||||||
primitiveBufferVertices(primitive, verticeStart, 4, vertices);
|
primitiveBufferVertices(primitive, verticeStart, 4, vertices);
|
||||||
primitiveBufferIndices(primitive, indiceStart, 6, indices);
|
primitiveBufferIndices(primitive, indiceStart, 6, indices);
|
||||||
|
@ -79,5 +79,8 @@ shader_t * assetShaderLoad(char *fileVertex, char *fileFragment);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Load a texture from a PNG file.
|
* Load a texture from a PNG file.
|
||||||
|
*
|
||||||
|
* @param fileName The fike path of the PNG image.
|
||||||
|
* @return The loaded texture object.
|
||||||
*/
|
*/
|
||||||
texture_t * assetTextureLoad(char *fileName);
|
texture_t * assetTextureLoad(char *fileName);
|
Reference in New Issue
Block a user