added comments to draw methods

This commit is contained in:
Sandro Sobczyński
2020-11-04 22:55:55 +01:00
parent 1868b714bc
commit 3fdbda4a4a
2 changed files with 50 additions and 16 deletions
+50 -8
View File
@@ -37,22 +37,64 @@ public:
void enableVSync() { isVSyncEnabled = true; }
void disableVSync() { isVSyncEnabled = false; }
/** PATH3 Many + lighting */
/// --- Draw: PATH3
/**
* Draw many meshes with lighting information.
* Slowest way of rendering (PATH 3, using EE and GIF).
* NOTICE: Animation supported, lighting supported
*/
void drawByPath3(Mesh *t_meshes, u16 t_amount, LightBulb *t_bulbs, u16 t_bulbsCount);
/** PATH3 Single + lighting */
/**
* Draw mesh with lighting information.
* Slowest way of rendering (PATH 3, using EE and GIF).
* NOTICE: Animation supported, lighting supported
*/
void drawByPath3(Mesh &t_mesh, LightBulb *t_bulbs, u16 t_bulbsCount);
/** PATH3 Many */
/**
* Draw many meshes without lighting information.
* Slowest way of rendering (PATH 3, using EE and GIF).
* NOTICE: Animation supported, lighting supported
*/
void drawByPath3(Mesh *t_meshes, u16 t_amount);
/** PATH3 Single */
/**
* Draw mesh without lighting information.
* Slowest way of rendering (PATH 3, using EE and GIF).
* NOTICE: Animation supported, lighting supported
*/
void drawByPath3(Mesh &t_mesh);
/** PATH1 Many + lighting */
/// --- Draw: PATH1
/**
* Draw many meshes with lighting information.
* Fastest way of rendering (PATH 1, using VU1).
* NOTICE: Animation supported, lighting NOT supported (at this moment)
*/
void draw(Mesh *t_meshes, u16 t_amount, LightBulb *t_bulbs, u16 t_bulbsCount);
/** PATH1 Single + lighting */
/**
* Draw mesh with lighting information.
* Fastest way of rendering (PATH 1, using VU1).
* NOTICE: Animation supported, lighting NOT supported (at this moment)
*/
void draw(Mesh &t_mesh, LightBulb *t_bulbs, u16 t_bulbsCount);
/** PATH1 Many */
/**
* Draw many meshes without lighting information.
* Fastest way of rendering (PATH 1, using VU1).
* NOTICE: Animation supported, lighting NOT supported (at this moment)
*/
void draw(Mesh *t_meshes, u16 t_amount);
/** PATH1 Single */
/**
* Draw mesh without lighting information.
* Fastest way of rendering (PATH 1, using VU1).
* NOTICE: Animation supported, lighting NOT supported (at this moment)
*/
void draw(Mesh &t_mesh);
void setCameraDefinitions(Matrix *t_worldView, Vector3 *t_cameraPos, Plane *t_planes);
-8
View File
@@ -161,14 +161,12 @@ void Renderer::allocateBuffers(float t_screenW, float t_screenH)
/// --- Draw: PATH3
/** PATH3 Many + lighting */
void Renderer::drawByPath3(Mesh *t_meshes, u16 t_amount, LightBulb *t_bulbs, u16 t_bulbsCount)
{
for (u16 i = 0; i < t_amount; i++)
drawByPath3(t_meshes[i], t_bulbs, t_bulbsCount);
}
/** PATH3 Single + lighting */
void Renderer::drawByPath3(Mesh &t_mesh, LightBulb *t_bulbs, u16 t_bulbsCount)
{
beginFrameIfNeeded();
@@ -195,22 +193,18 @@ void Renderer::drawByPath3(Mesh &t_mesh, LightBulb *t_bulbs, u16 t_bulbsCount)
}
}
/** PATH3 Many */
void Renderer::drawByPath3(Mesh *t_meshes, u16 t_amount) { drawByPath3(t_meshes, t_amount, NULL, 0); }
/** PATH3 Single */
void Renderer::drawByPath3(Mesh &t_mesh) { drawByPath3(t_mesh, NULL, 0); }
/// --- Draw: PATH1
/** PATH1 Many + lighting */
void Renderer::draw(Mesh *t_meshes, u16 t_amount, LightBulb *t_bulbs, u16 t_bulbsCount)
{
for (u16 i = 0; i < t_amount; i++)
draw(t_meshes[i], t_bulbs, t_bulbsCount);
}
/** PATH1 Single + lighting */
void Renderer::draw(Mesh &t_mesh, LightBulb *t_bulbs, u16 t_bulbsCount)
{
beginFrameIfNeeded();
@@ -240,10 +234,8 @@ void Renderer::draw(Mesh &t_mesh, LightBulb *t_bulbs, u16 t_bulbsCount)
}
}
/** PATH1 Many */
void Renderer::draw(Mesh *t_meshes, u16 t_amount) { draw(t_meshes, t_amount, NULL, 0); }
/** PATH1 Single */
void Renderer::draw(Mesh &t_mesh) { draw(t_mesh, NULL, 0); }
/// ---