mesh -> dynamicmesh

This commit is contained in:
h4570
2022-07-18 19:53:28 +02:00
parent bb02a3d9bf
commit ecfaef1b85
17 changed files with 148 additions and 130 deletions
@@ -14,7 +14,7 @@
#include "../renderer_3d_pipeline.hpp"
#include "./stapip_options.hpp"
#include "renderer/core/renderer_core.hpp"
#include "renderer/3d/mesh/mesh.hpp"
#include "renderer/3d/mesh/dynamic/dynamic_mesh.hpp"
#include "./core/static_pipeline_core.hpp"
namespace Tyra {
@@ -32,26 +32,31 @@ class Stapipeline : public Renderer3DPipeline {
* Render 3D data via "meshes".
* This render() method is a bridge to core.renderer3D.render() method.
*/
void render(Mesh* mesh, const StapipOptions* options = nullptr);
void render(DynamicMesh* mesh, const StapipOptions* options = nullptr);
private:
StapipelineCore core;
RendererCore* rendererCore;
Vec4* colorsCache;
void addVertices(Mesh* mesh, MeshMaterial* material, StapipBag* bag,
MeshFrame* frameFrom, MeshFrame* frameTo) const;
StapipInfoBag* getInfoBag(Mesh* mesh, const StapipOptions* options,
void addVertices(DynamicMesh* mesh, DynamicMeshMaterial* material,
StapipBag* bag, DynamicMeshFrame* frameFrom,
DynamicMeshFrame* frameTo) const;
StapipInfoBag* getInfoBag(DynamicMesh* mesh, const StapipOptions* options,
M4x4* model) const;
StapipColorBag* getColorBag(Mesh* mesh, MeshMaterial* material,
MeshFrame* frameFrom, MeshFrame* frameTo) const;
StapipTextureBag* getTextureBag(Mesh* mesh, MeshMaterial* material,
MeshFrame* frameFrom, MeshFrame* frameTo);
StapipLightingBag* getLightingBag(Mesh* mesh, MeshMaterial* material,
M4x4* model, MeshFrame* frameFrom,
MeshFrame* frameTo,
StapipColorBag* getColorBag(DynamicMesh* mesh, DynamicMeshMaterial* material,
DynamicMeshFrame* frameFrom,
DynamicMeshFrame* frameTo) const;
StapipTextureBag* getTextureBag(DynamicMesh* mesh,
DynamicMeshMaterial* material,
DynamicMeshFrame* frameFrom,
DynamicMeshFrame* frameTo);
StapipLightingBag* getLightingBag(DynamicMesh* mesh,
DynamicMeshMaterial* material, M4x4* model,
DynamicMeshFrame* frameFrom,
DynamicMeshFrame* frameTo,
const StapipOptions* options) const;
void deallocDrawBags(StapipBag* bag, MeshMaterial* material) const;
void deallocDrawBags(StapipBag* bag, DynamicMeshMaterial* material) const;
void setLightingColorsCache(StapipLightingOptions* lightingOptions);
};