small documentation
This commit is contained in:
@@ -19,6 +19,12 @@
|
||||
|
||||
namespace Tyra {
|
||||
|
||||
/**
|
||||
* Pipeline for animated models (DynamicMesh).
|
||||
* Supports:
|
||||
* - Simple PS2 clipping (culling)
|
||||
* - Modes: color, texture+color, dir lights, texture + dir lights
|
||||
*/
|
||||
class DynamicPipeline : public Renderer3DPipeline {
|
||||
public:
|
||||
DynamicPipeline();
|
||||
@@ -33,7 +39,7 @@ class DynamicPipeline : public Renderer3DPipeline {
|
||||
void onUse();
|
||||
|
||||
/**
|
||||
* Render 3D via "meshes".
|
||||
* Render dynamic model.
|
||||
* This render() method is a bridge to core.render() method.
|
||||
*/
|
||||
void render(DynamicMesh* mesh, const DynPipOptions* options = nullptr);
|
||||
|
||||
@@ -18,6 +18,10 @@
|
||||
|
||||
namespace Tyra {
|
||||
|
||||
/**
|
||||
* Pipeline specialized in fast rendering of voxels
|
||||
* Supports full "against each plane" clipping
|
||||
*/
|
||||
class MinecraftPipeline : public Renderer3DPipeline {
|
||||
public:
|
||||
MinecraftPipeline();
|
||||
@@ -27,8 +31,18 @@ class MinecraftPipeline : public Renderer3DPipeline {
|
||||
|
||||
void onUse();
|
||||
|
||||
/**
|
||||
* @brief Render voxels
|
||||
*
|
||||
* @param blocks blocks to render
|
||||
* @param count number of blocks to render
|
||||
* @param t_tex texture to use
|
||||
* @param isMulti is this a 6 texture voxel?
|
||||
* @param noFullClipChecks true = faster, simple PS2 clipping. False = slower
|
||||
* "against each plane" clipping.
|
||||
*/
|
||||
void render(McpipBlock* blocks, const u32& count, Texture* t_tex,
|
||||
const bool& isMulti = false, const bool& noClipChecks = true);
|
||||
const bool& isMulti = false, const bool& noFullClipChecks = true);
|
||||
|
||||
inline const float& getTextureOffset() const {
|
||||
return manager.getTextureOffset();
|
||||
|
||||
@@ -20,6 +20,12 @@
|
||||
|
||||
namespace Tyra {
|
||||
|
||||
/**
|
||||
* Pipeline for static models (StaticMesh).
|
||||
* Supports:
|
||||
* - Full "against each plane" clipping,
|
||||
* - Modes: color(s), texture+color(s), dir lights, texture + dir lights
|
||||
*/
|
||||
class StaticPipeline : public Renderer3DPipeline {
|
||||
public:
|
||||
StaticPipeline();
|
||||
@@ -32,7 +38,7 @@ class StaticPipeline : public Renderer3DPipeline {
|
||||
void onUse();
|
||||
|
||||
/**
|
||||
* Render 3D via "meshes".
|
||||
* Render static model
|
||||
* This render() method is a bridge to core.render() method.
|
||||
*/
|
||||
void render(DynamicMesh* mesh, const StaPipOptions* options = nullptr);
|
||||
|
||||
@@ -42,14 +42,14 @@ void MinecraftPipeline::initBBox() {
|
||||
|
||||
void MinecraftPipeline::render(McpipBlock* blocks, const u32& count,
|
||||
Texture* t_tex, const bool& isMulti,
|
||||
const bool& noClipChecks) {
|
||||
const bool& noFullClipChecks) {
|
||||
auto texBuffers = rendererCore->texture.useTexture(t_tex);
|
||||
rendererCore->gs.prim.mapping = 1;
|
||||
|
||||
manager.clearLastProgram();
|
||||
std::vector<u32> cullIndexes;
|
||||
|
||||
if (noClipChecks) {
|
||||
if (noFullClipChecks) {
|
||||
for (u32 i = 0; i < count; i++) cullIndexes.push_back(i);
|
||||
cull(blocks, cullIndexes, &texBuffers, isMulti);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user