renderer cleanup, demo changes
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "math/vec4.hpp"
|
||||
|
||||
#include "renderer/3d/pipeline/shared/bag/pipeline_info_bag.hpp"
|
||||
#include "./dynpip_info_bag.hpp"
|
||||
#include "./dynpip_color_bag.hpp"
|
||||
#include "./dynpip_lighting_bag.hpp"
|
||||
#include "./dynpip_texture_bag.hpp"
|
||||
@@ -31,7 +31,7 @@ class DynPipBag {
|
||||
~DynPipBag();
|
||||
|
||||
/** Mandatory. Object info. */
|
||||
PipelineInfoBag* info;
|
||||
DynPipInfoBag* info;
|
||||
|
||||
/** Mandatory. Object color(s). */
|
||||
DynPipColorBag* color;
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
# ______ ____ ___
|
||||
# | \/ ____| |___|
|
||||
# | | | \ | |
|
||||
#-----------------------------------------------------------------------
|
||||
# Copyright 2022, tyra - https://github.com/h4570/tyra
|
||||
# Licenced under Apache License 2.0
|
||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "renderer/3d/pipeline/shared/bag/pipeline_info_bag.hpp"
|
||||
|
||||
namespace Tyra {
|
||||
|
||||
class DynPipInfoBag : public PipelineInfoBag {
|
||||
public:
|
||||
DynPipInfoBag() {}
|
||||
~DynPipInfoBag() {}
|
||||
};
|
||||
|
||||
} // namespace Tyra
|
||||
@@ -28,18 +28,16 @@ class DynPipCore {
|
||||
void init(RendererCore* t_core);
|
||||
|
||||
/** Force starting VU1 program instead of continueing */
|
||||
void clear() { qbufferRenderer.clearLastProgramName(); }
|
||||
void updatePrimLod(PipelineInfoBag* bag);
|
||||
void begin(PipelineInfoBag* bag);
|
||||
|
||||
/**
|
||||
* Send model matrix, lighting data and other
|
||||
* repetitve stuff to VU1
|
||||
*/
|
||||
void initParts(DynPipBag* data);
|
||||
void sendObjectDataToVU1(DynPipBag* data);
|
||||
|
||||
/** Render 3D via "bags" */
|
||||
void renderPart(DynPipBag** bags, const u32& count,
|
||||
const bool& frustumCull = true);
|
||||
void render(DynPipBag** bags, const u32& count);
|
||||
|
||||
/** Get max vert count of VU1 qbuffer (for optimizations) */
|
||||
u32 getMaxVertCountByParams(const bool& isLightingEnabled,
|
||||
|
||||
@@ -53,18 +53,16 @@ class DynamicPipeline : public Renderer3DPipeline {
|
||||
DynPipBag* buffers;
|
||||
static const u32 halfBuffersCount;
|
||||
|
||||
void setBuffer(DynPipBag* buffers, DynPipBag* buffer, u16* bufferIndex,
|
||||
const PipelineFrustumCulling& frustumCulling);
|
||||
void setBuffer(DynPipBag* buffers, DynPipBag* buffer, u16* bufferIndex);
|
||||
|
||||
void sendRestOfBuffers(DynPipBag* buffers, u16* bufferIndex,
|
||||
const PipelineFrustumCulling& frustumCulling);
|
||||
void sendRestOfBuffers(DynPipBag* buffers, u16* bufferIndex);
|
||||
|
||||
void addVertices(MeshMaterialFrame* materialFrameFrom,
|
||||
MeshMaterialFrame* materialFrameTo, DynPipBag* bag,
|
||||
const u32& startIndex) const;
|
||||
|
||||
PipelineInfoBag* getInfoBag(DynamicMesh* mesh, const DynPipOptions* options,
|
||||
M4x4* model) const;
|
||||
DynPipInfoBag* getInfoBag(DynamicMesh* mesh, const DynPipOptions* options,
|
||||
M4x4* model) const;
|
||||
|
||||
DynPipColorBag* getColorBag(MeshMaterial* material) const;
|
||||
|
||||
@@ -82,7 +80,7 @@ class DynamicPipeline : public Renderer3DPipeline {
|
||||
void setLightingColorsCache(PipelineLightingOptions* lightingOptions);
|
||||
void freeBuffer(DynPipBag* bag);
|
||||
void setBuffersDefaultVars(DynPipBag* buffers, DynamicMesh* mesh,
|
||||
PipelineInfoBag* infoBag);
|
||||
DynPipInfoBag* infoBag);
|
||||
void setBuffersColorBag(DynPipBag* buffers, DynPipColorBag* colorBag);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user