From 3fdbda4a4a7fd2b2ed61da933a37ac3cfcc62db6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20Sobczy=C5=84ski?= Date: Wed, 4 Nov 2020 22:55:55 +0100 Subject: [PATCH] added comments to draw methods --- src/engine/include/modules/renderer.hpp | 58 +++++++++++++++++++++---- src/engine/modules/renderer.cpp | 8 ---- 2 files changed, 50 insertions(+), 16 deletions(-) diff --git a/src/engine/include/modules/renderer.hpp b/src/engine/include/modules/renderer.hpp index fdbe3b2..cdeee7c 100644 --- a/src/engine/include/modules/renderer.hpp +++ b/src/engine/include/modules/renderer.hpp @@ -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); diff --git a/src/engine/modules/renderer.cpp b/src/engine/modules/renderer.cpp index 5b55032..8cac591 100644 --- a/src/engine/modules/renderer.cpp +++ b/src/engine/modules/renderer.cpp @@ -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); } /// ---