3#include <mgdl/mgdl-opengl.h>
38 sizetype Mesh_Init(
Mesh* mesh, sizetype vertexCount, sizetype indexCount, u32 creationFlags);
40 V3f Mesh_GetPosition(
Mesh* mesh, GLushort index);
41 V3f Mesh_GetNormal(
Mesh* mesh, GLushort index);
42 V3f Mesh_GetPositionFromArray(
Mesh* mesh, sizetype index);
43 V3f Mesh_GetNormalFromArray(
Mesh* mesh, sizetype index);
45 void Mesh_SetDrawingIndex(
Mesh* mesh,sizetype index, GLushort drawIndex);
46 void Mesh_SetPositionToArray(
Mesh* mesh,sizetype index, V3f position);
47 void Mesh_SetNormalToArray(
Mesh* mesh,sizetype index, V3f normal);
48 void Mesh_SetUVToArray(
Mesh* mesh,sizetype index, vec2 uv);
49 bool Mesh_GetTriangleIndices(
Mesh* mesh,GLsizei triangleIndex, GLushort* outA, GLushort* outB, GLushort* outC);
51 void Mesh_DebugPrint(
Mesh* mesh);
54 void Mesh_SetupVertexArrays(
Mesh* mesh);
55 void Mesh_DrawElements(
Mesh* mesh);
57 void Mesh_DrawPoints(
Mesh* mesh);
58 void Mesh_DrawLines(
Mesh* mesh);
59 void Mesh_DrawNormals(
Mesh* mesh);
60 void Mesh_CalculateMatcapUVs(
Mesh* mesh, MTX4x4 modelViewMatrix, MTX4x4 normalMatrix);
65 GLushort Mesh_AddPosition(
Mesh* mesh, V3f vertex);
66 void Mesh_AddNormal(
Mesh* mesh, V3f normal);
67 void Mesh_AddUV(
Mesh* mesh, vec2 normal);
68 void Mesh_AddColor(
Mesh* mesh, V3f color);
69 u32 Mesh_AddTriangle(
Mesh* mesh, GLushort indexA, GLushort indexB, GLushort indexC, u32 index);
72 Mesh* Mesh_CreateIcosahedron(u32 creationFlags);
73 Mesh* Mesh_CreateQuad(u32 creationFlags);
74 Mesh* Mesh_CreateStar(
float centerThickness,
float pointRadius,
float sharpness,
int pointAmount,
bool bothSides, u32 creationFlags);
77 void Mesh_DrawStarBorder(
float thickness,
float pointRadius,
float sharpness,
int pointAmount);
78 Mesh* Mesh_CreateStarBorder(
float borderThickness,
float pointRadius,
float sharpness,
int pointAmount, u32 creationFlags);
Library types, macros, defines and enums header.
Definition mgdl-mesh.h:11
GLushort indexCounter
Definition mgdl-mesh.h:15