dynpip rearrangment

This commit is contained in:
h4570
2022-07-18 23:50:25 +02:00
parent f08fc1c8d3
commit 2fe40c8d90
35 changed files with 111 additions and 37 deletions
@@ -0,0 +1,41 @@
/*
# ______ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
#pragma once
#include <tamtypes.h>
#include "./bag/dynpip_bag.hpp"
#include "renderer/core/renderer_core.hpp"
namespace Tyra {
class DynPipCore {
public:
DynPipCore();
~DynPipCore();
void init(RendererCore* t_core);
/** Render 3D via "bags" */
void render(DynPipBag* data);
/**
* - Uploads standard VU1 programs.
* - Sends static "Tyra Renderer3D" VU1 data.
* - Sets double buffers exactly for "Tyra Renderer3D"
* Should be called if VU1 was used by your non standard programs.
*/
void reinitStandardVU1Programs();
private:
RendererCore* rendererCore;
};
} // namespace Tyra
@@ -12,7 +12,8 @@
#include <tamtypes.h>
#include "../renderer_3d_pipeline.hpp"
#include "./dynpip_options.hpp"
#include "./core/dynpip_options.hpp"
#include "./core/dynpip_core.hpp"
#include "renderer/core/renderer_core.hpp"
#include "renderer/3d/mesh/dynamic/dynamic_mesh.hpp"
@@ -23,10 +24,16 @@ class DynamicPipeline : public Renderer3DPipeline {
DynamicPipeline();
~DynamicPipeline();
DynPipCore core;
void init(RendererCore* core);
void onUse();
/**
* Render 3D via "meshes".
* This render() method is a bridge to core.render() method.
*/
void render(DynamicMesh* mesh, const DynPipOptions* options = nullptr);
};