im trying to draw something but its not working
i checked that these functions are getting called
void myscreen_render(void* elem, float delta)
{
struct f3_screen* s = elem;
Gfx_SetVertexFormat(VERTEX_FORMAT_COLOURED);
Gfx_BindDynamicVb(s -> vb);
Gfx_DrawVb_IndexedTris(3);
}
void myscreen_build_mesh(void* elem)
{
struct f3_screen* s = elem;
struct VertexColoured vb[3];
vb[0].x = 0.0f; vb[0].y = 0.0f; vb[0].z = 1.0f;
vb[1].x = 1.0f; vb[1].y = 0.0f; vb[1].z = 1.0f;
vb[2].x = 0.0f; vb[2].y = 1.0f; vb[2].z = 1.0f;
vb[0].Col = PackedCol_Make(255, 0, 0, 255);
vb[1].Col = PackedCol_Make(0, 255, 0, 255);
vb[2].Col = PackedCol_Make(0, 0, 255, 255);
Gfx_SetVertexFormat(VERTEX_FORMAT_COLOURED);
Gfx_SetDynamicVbData(s -> vb, vb, 3);
}
void myscreen_on_context_lost(void* elem)
{
struct f3_screen* s = elem;
Gfx_DeleteDynamicVb(&s -> vb);
}
void myscreen_on_context_recreated(void* elem)
{
struct f3_screen* s = elem;
s -> vb = Gfx_CreateDynamicVb(VERTEX_FORMAT_COLOURED, 3);
s -> maxVertices = 3;
}