std pipeline rename
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
------------ Tyra's v2.0 roadmap to publish on GitHub ------------
|
------------ Tyra's v2.0 roadmap to publish on GitHub ------------
|
||||||
|
|
||||||
--- H4570
|
--- H4570
|
||||||
- [Renderer] Rename stdRenderer -> staticRenderer
|
|
||||||
- [Renderer] Mesh, StaticMesh, AnimMesh
|
- [Renderer] Mesh, StaticMesh, AnimMesh
|
||||||
- [Renderer] dynamicRenderer, dbufferring during mesh unrolling, simple clip
|
- [Renderer] dynamicRenderer, dbufferring during mesh unrolling, simple clip
|
||||||
- [Renderer] staticRenderer -> remove animation, dbufferring during mesh unrolling, full plane clip
|
- [Renderer] staticRenderer -> remove animation, dbufferring during mesh unrolling, full plane clip
|
||||||
|
|||||||
+8
-8
@@ -10,17 +10,17 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../stdpip_bag.hpp"
|
#include "../stapip_bag.hpp"
|
||||||
#include "renderer/core/3d/bbox/core_bbox_frustum.hpp"
|
#include "renderer/core/3d/bbox/core_bbox_frustum.hpp"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
class StdpipBagPackage {
|
class StapipBagPackage {
|
||||||
public:
|
public:
|
||||||
StdpipBagPackage();
|
StapipBagPackage();
|
||||||
~StdpipBagPackage();
|
~StapipBagPackage();
|
||||||
|
|
||||||
StdpipBag* bag;
|
StapipBag* bag;
|
||||||
|
|
||||||
Vec4* vertices;
|
Vec4* vertices;
|
||||||
Vec4* sts;
|
Vec4* sts;
|
||||||
@@ -32,12 +32,12 @@ class StdpipBagPackage {
|
|||||||
CoreBBoxFrustum isInFrustum;
|
CoreBBoxFrustum isInFrustum;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We are creating StdpipBagPackagesBBox which checks CoreBBoxBBox for every
|
* We are creating StapipBagPackagesBBox which checks CoreBBoxBBox for every
|
||||||
* maxVertCount / 3. So this variable is index of starting
|
* maxVertCount / 3. So this variable is index of starting
|
||||||
* StdpipBagPackagesBBox's CoreBBoxBBox. If package have <= maxVertCount / 3
|
* StapipBagPackagesBBox's CoreBBoxBBox. If package have <= maxVertCount / 3
|
||||||
* verts, we will need only single (starting) bbox. if package have
|
* verts, we will need only single (starting) bbox. if package have
|
||||||
* maxVertCount verts, we will calculate CoreBBoxBBox from 3
|
* maxVertCount verts, we will calculate CoreBBoxBBox from 3
|
||||||
* StdpipBagPackagesBBox's bboxes.
|
* StapipBagPackagesBBox's bboxes.
|
||||||
*/
|
*/
|
||||||
u32 indexOf1By3BBox;
|
u32 indexOf1By3BBox;
|
||||||
|
|
||||||
+11
-11
@@ -13,19 +13,19 @@
|
|||||||
#include "renderer/core/3d/bbox/core_bbox.hpp"
|
#include "renderer/core/3d/bbox/core_bbox.hpp"
|
||||||
#include "renderer/core/3d/renderer_3d_frustum_planes.hpp"
|
#include "renderer/core/3d/renderer_3d_frustum_planes.hpp"
|
||||||
#include "renderer/core/paths/path1/clipper/path1_ee_clip_algorithm.hpp"
|
#include "renderer/core/paths/path1/clipper/path1_ee_clip_algorithm.hpp"
|
||||||
#include "./stdpip_bag_packages_bbox.hpp"
|
#include "./stapip_bag_packages_bbox.hpp"
|
||||||
#include "./stdpip_bag_package.hpp"
|
#include "./stapip_bag_package.hpp"
|
||||||
#include "../stdpip_bag.hpp"
|
#include "../stapip_bag.hpp"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
class StdpipBagPackager {
|
class StapipBagPackager {
|
||||||
public:
|
public:
|
||||||
StdpipBagPackager();
|
StapipBagPackager();
|
||||||
~StdpipBagPackager();
|
~StapipBagPackager();
|
||||||
|
|
||||||
void init(Renderer3DFrustumPlanes* frustumPlanes);
|
void init(Renderer3DFrustumPlanes* frustumPlanes);
|
||||||
void setRenderBBox(StdpipBagPackagesBBox* bbox) { renderBBox = bbox; }
|
void setRenderBBox(StapipBagPackagesBBox* bbox) { renderBBox = bbox; }
|
||||||
void setMaxVertCount(const u32& count);
|
void setMaxVertCount(const u32& count);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -33,20 +33,20 @@ class StdpipBagPackager {
|
|||||||
*
|
*
|
||||||
* @param size Max maxVertCount verts (VU1 buffer size)
|
* @param size Max maxVertCount verts (VU1 buffer size)
|
||||||
*/
|
*/
|
||||||
StdpipBagPackage* create(u16* o_size, StdpipBag* data, u16 size);
|
StapipBagPackage* create(u16* o_size, StapipBag* data, u16 size);
|
||||||
/**
|
/**
|
||||||
* @brief Split render package to smaller packages
|
* @brief Split render package to smaller packages
|
||||||
*
|
*
|
||||||
* @param size Max maxVertCount verts (VU1 buffer size)
|
* @param size Max maxVertCount verts (VU1 buffer size)
|
||||||
*/
|
*/
|
||||||
StdpipBagPackage* create(u16* o_size, const StdpipBagPackage& pkg, u16 size);
|
StapipBagPackage* create(u16* o_size, const StapipBagPackage& pkg, u16 size);
|
||||||
|
|
||||||
CoreBBoxFrustum checkFrustum(const StdpipBagPackage& pkg);
|
CoreBBoxFrustum checkFrustum(const StapipBagPackage& pkg);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
u32 maxVertCount;
|
u32 maxVertCount;
|
||||||
Renderer3DFrustumPlanes* frustumPlanes;
|
Renderer3DFrustumPlanes* frustumPlanes;
|
||||||
StdpipBagPackagesBBox* renderBBox;
|
StapipBagPackagesBBox* renderBBox;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Tyra
|
} // namespace Tyra
|
||||||
+4
-4
@@ -18,13 +18,13 @@ namespace Tyra {
|
|||||||
* Splits all 3D input vertices into 16vert parts and creates child bboxes for
|
* Splits all 3D input vertices into 16vert parts and creates child bboxes for
|
||||||
* it
|
* it
|
||||||
*/
|
*/
|
||||||
class StdpipBagPackagesBBox {
|
class StapipBagPackagesBBox {
|
||||||
public:
|
public:
|
||||||
StdpipBagPackagesBBox(Vec4* t_vertices, u32* t_faces, const u32& t_facesCount,
|
StapipBagPackagesBBox(Vec4* t_vertices, u32* t_faces, const u32& t_facesCount,
|
||||||
const u32& t_maxVertCount);
|
const u32& t_maxVertCount);
|
||||||
StdpipBagPackagesBBox(Vec4* t_vertices, const u32& t_counts,
|
StapipBagPackagesBBox(Vec4* t_vertices, const u32& t_counts,
|
||||||
const u32& t_maxVertCount);
|
const u32& t_maxVertCount);
|
||||||
~StdpipBagPackagesBBox();
|
~StapipBagPackagesBBox();
|
||||||
|
|
||||||
void setMaxVertCount(const u32& count);
|
void setMaxVertCount(const u32& count);
|
||||||
|
|
||||||
+13
-13
@@ -11,12 +11,12 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "math/vec4.hpp"
|
#include "math/vec4.hpp"
|
||||||
#include "./stdpip_lighting_bag.hpp"
|
#include "./stapip_lighting_bag.hpp"
|
||||||
#include "./stdpip_info_bag.hpp"
|
#include "./stapip_info_bag.hpp"
|
||||||
#include "./stdpip_color_bag.hpp"
|
#include "./stapip_color_bag.hpp"
|
||||||
#include "./stdpip_texture_bag.hpp"
|
#include "./stapip_texture_bag.hpp"
|
||||||
#include "renderer/core/texture/models/texture.hpp"
|
#include "renderer/core/texture/models/texture.hpp"
|
||||||
#include "./packaging/stdpip_bag_packages_bbox.hpp"
|
#include "./packaging/stapip_bag_packages_bbox.hpp"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
@@ -25,16 +25,16 @@ namespace Tyra {
|
|||||||
* Supports frustum culling, clipping, lighting,
|
* Supports frustum culling, clipping, lighting,
|
||||||
* texture and single color / many colors.
|
* texture and single color / many colors.
|
||||||
*/
|
*/
|
||||||
class StdpipBag {
|
class StapipBag {
|
||||||
public:
|
public:
|
||||||
StdpipBag();
|
StapipBag();
|
||||||
~StdpipBag();
|
~StapipBag();
|
||||||
|
|
||||||
/** Mandatory. Object info. */
|
/** Mandatory. Object info. */
|
||||||
StdpipInfoBag* info;
|
StapipInfoBag* info;
|
||||||
|
|
||||||
/** Mandatory. Object color(s). */
|
/** Mandatory. Object color(s). */
|
||||||
StdpipColorBag* color;
|
StapipColorBag* color;
|
||||||
|
|
||||||
/** Mandatory. Vertex count. */
|
/** Mandatory. Vertex count. */
|
||||||
u32 count;
|
u32 count;
|
||||||
@@ -43,15 +43,15 @@ class StdpipBag {
|
|||||||
Vec4* vertices;
|
Vec4* vertices;
|
||||||
|
|
||||||
/** Optional. Texture coordinates and image. */
|
/** Optional. Texture coordinates and image. */
|
||||||
StdpipTextureBag* texture;
|
StapipTextureBag* texture;
|
||||||
|
|
||||||
/** Optional. Object lighting. */
|
/** Optional. Object lighting. */
|
||||||
StdpipLightingBag* lighting;
|
StapipLightingBag* lighting;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param maxVertCount This parameter is available in renderer API.
|
* @param maxVertCount This parameter is available in renderer API.
|
||||||
*/
|
*/
|
||||||
StdpipBagPackagesBBox calculateBbox(const u32& maxVertCount);
|
StapipBagPackagesBBox calculateBbox(const u32& maxVertCount);
|
||||||
|
|
||||||
void print() const;
|
void print() const;
|
||||||
void print(const char* name) const;
|
void print(const char* name) const;
|
||||||
+3
-3
@@ -17,10 +17,10 @@ namespace Tyra {
|
|||||||
/**
|
/**
|
||||||
* @brief Color data. At least one color data is required (single/many).
|
* @brief Color data. At least one color data is required (single/many).
|
||||||
*/
|
*/
|
||||||
class StdpipColorBag {
|
class StapipColorBag {
|
||||||
public:
|
public:
|
||||||
StdpipColorBag();
|
StapipColorBag();
|
||||||
~StdpipColorBag();
|
~StapipColorBag();
|
||||||
|
|
||||||
/** Optional. Single color for all vertices. */
|
/** Optional. Single color for all vertices. */
|
||||||
Color* single;
|
Color* single;
|
||||||
+5
-5
@@ -13,19 +13,19 @@
|
|||||||
#include <draw.h>
|
#include <draw.h>
|
||||||
#include "math/m4x4.hpp"
|
#include "math/m4x4.hpp"
|
||||||
#include "math/vec4.hpp"
|
#include "math/vec4.hpp"
|
||||||
#include "../../stdpip_shading_type.hpp"
|
#include "../../stapip_shading_type.hpp"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
class StdpipInfoBag {
|
class StapipInfoBag {
|
||||||
public:
|
public:
|
||||||
StdpipInfoBag();
|
StapipInfoBag();
|
||||||
~StdpipInfoBag();
|
~StapipInfoBag();
|
||||||
|
|
||||||
/** Mandatory. Model matrix */
|
/** Mandatory. Model matrix */
|
||||||
M4x4* model;
|
M4x4* model;
|
||||||
|
|
||||||
StdpipShadingType shadingType;
|
StapipShadingType shadingType;
|
||||||
bool blendingEnabled;
|
bool blendingEnabled;
|
||||||
bool antiAliasingEnabled;
|
bool antiAliasingEnabled;
|
||||||
bool noClipChecks;
|
bool noClipChecks;
|
||||||
+5
-5
@@ -16,12 +16,12 @@
|
|||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
enum StdpipLightingBagMode { Auto, Manual };
|
enum StapipLightingBagMode { Auto, Manual };
|
||||||
|
|
||||||
class StdpipLightingBag {
|
class StapipLightingBag {
|
||||||
public:
|
public:
|
||||||
explicit StdpipLightingBag(const bool& manual = false);
|
explicit StapipLightingBag(const bool& manual = false);
|
||||||
~StdpipLightingBag();
|
~StapipLightingBag();
|
||||||
|
|
||||||
Vec4* normals;
|
Vec4* normals;
|
||||||
M4x4* lightMatrix;
|
M4x4* lightMatrix;
|
||||||
@@ -47,7 +47,7 @@ class StdpipLightingBag {
|
|||||||
void deallocate();
|
void deallocate();
|
||||||
void forceDeallocate();
|
void forceDeallocate();
|
||||||
u8 isAllocated;
|
u8 isAllocated;
|
||||||
StdpipLightingBagMode mode;
|
StapipLightingBagMode mode;
|
||||||
|
|
||||||
Vec4* lightColors;
|
Vec4* lightColors;
|
||||||
Vec4* lightDirections;
|
Vec4* lightDirections;
|
||||||
+3
-3
@@ -15,10 +15,10 @@
|
|||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
class StdpipTextureBag {
|
class StapipTextureBag {
|
||||||
public:
|
public:
|
||||||
StdpipTextureBag();
|
StapipTextureBag();
|
||||||
~StdpipTextureBag();
|
~StapipTextureBag();
|
||||||
|
|
||||||
/** Mandatory. Texture coordinates per vertex. */
|
/** Mandatory. Texture coordinates per vertex. */
|
||||||
Vec4* coordinates;
|
Vec4* coordinates;
|
||||||
+5
-5
@@ -12,19 +12,19 @@
|
|||||||
|
|
||||||
#include <packet2_utils.h>
|
#include <packet2_utils.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "../../stdpip_vu1_program.hpp"
|
#include "../../stapip_vu1_program.hpp"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
class StdpipAsIsCVU1Program : public StdpipVU1Program {
|
class StapipAsIsCVU1Program : public StapipVU1Program {
|
||||||
public:
|
public:
|
||||||
StdpipAsIsCVU1Program();
|
StapipAsIsCVU1Program();
|
||||||
~StdpipAsIsCVU1Program();
|
~StapipAsIsCVU1Program();
|
||||||
|
|
||||||
std::string getStringName() const;
|
std::string getStringName() const;
|
||||||
|
|
||||||
void addProgramQBufferDataToPacket(packet2_t* packet,
|
void addProgramQBufferDataToPacket(packet2_t* packet,
|
||||||
StdpipQBuffer* qbuffer) const;
|
StapipQBuffer* qbuffer) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Tyra
|
} // namespace Tyra
|
||||||
+5
-5
@@ -12,18 +12,18 @@
|
|||||||
|
|
||||||
#include <packet2_utils.h>
|
#include <packet2_utils.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "../../stdpip_vu1_program.hpp"
|
#include "../../stapip_vu1_program.hpp"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
class StdpipAsIsDVU1Program : public StdpipVU1Program {
|
class StapipAsIsDVU1Program : public StapipVU1Program {
|
||||||
public:
|
public:
|
||||||
StdpipAsIsDVU1Program();
|
StapipAsIsDVU1Program();
|
||||||
~StdpipAsIsDVU1Program();
|
~StapipAsIsDVU1Program();
|
||||||
|
|
||||||
std::string getStringName() const;
|
std::string getStringName() const;
|
||||||
void addProgramQBufferDataToPacket(packet2_t* packet,
|
void addProgramQBufferDataToPacket(packet2_t* packet,
|
||||||
StdpipQBuffer* qbuffer) const;
|
StapipQBuffer* qbuffer) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Tyra
|
} // namespace Tyra
|
||||||
+5
-5
@@ -12,18 +12,18 @@
|
|||||||
|
|
||||||
#include <packet2_utils.h>
|
#include <packet2_utils.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "../../stdpip_vu1_program.hpp"
|
#include "../../stapip_vu1_program.hpp"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
class StdpipAsIsTCVU1Program : public StdpipVU1Program {
|
class StapipAsIsTCVU1Program : public StapipVU1Program {
|
||||||
public:
|
public:
|
||||||
StdpipAsIsTCVU1Program();
|
StapipAsIsTCVU1Program();
|
||||||
~StdpipAsIsTCVU1Program();
|
~StapipAsIsTCVU1Program();
|
||||||
|
|
||||||
std::string getStringName() const;
|
std::string getStringName() const;
|
||||||
void addProgramQBufferDataToPacket(packet2_t* packet,
|
void addProgramQBufferDataToPacket(packet2_t* packet,
|
||||||
StdpipQBuffer* qbuffer) const;
|
StapipQBuffer* qbuffer) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Tyra
|
} // namespace Tyra
|
||||||
+5
-5
@@ -12,18 +12,18 @@
|
|||||||
|
|
||||||
#include <packet2_utils.h>
|
#include <packet2_utils.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "../../stdpip_vu1_program.hpp"
|
#include "../../stapip_vu1_program.hpp"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
class StdpipAsIsTDVU1Program : public StdpipVU1Program {
|
class StapipAsIsTDVU1Program : public StapipVU1Program {
|
||||||
public:
|
public:
|
||||||
StdpipAsIsTDVU1Program();
|
StapipAsIsTDVU1Program();
|
||||||
~StdpipAsIsTDVU1Program();
|
~StapipAsIsTDVU1Program();
|
||||||
|
|
||||||
std::string getStringName() const;
|
std::string getStringName() const;
|
||||||
void addProgramQBufferDataToPacket(packet2_t* packet,
|
void addProgramQBufferDataToPacket(packet2_t* packet,
|
||||||
StdpipQBuffer* qbuffer) const;
|
StapipQBuffer* qbuffer) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Tyra
|
} // namespace Tyra
|
||||||
+5
-5
@@ -12,18 +12,18 @@
|
|||||||
|
|
||||||
#include <packet2_utils.h>
|
#include <packet2_utils.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "../../stdpip_vu1_program.hpp"
|
#include "../../stapip_vu1_program.hpp"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
class StdpipCullCVU1Program : public StdpipVU1Program {
|
class StapipCullCVU1Program : public StapipVU1Program {
|
||||||
public:
|
public:
|
||||||
StdpipCullCVU1Program();
|
StapipCullCVU1Program();
|
||||||
~StdpipCullCVU1Program();
|
~StapipCullCVU1Program();
|
||||||
|
|
||||||
std::string getStringName() const;
|
std::string getStringName() const;
|
||||||
void addProgramQBufferDataToPacket(packet2_t* packet,
|
void addProgramQBufferDataToPacket(packet2_t* packet,
|
||||||
StdpipQBuffer* qbuffer) const;
|
StapipQBuffer* qbuffer) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Tyra
|
} // namespace Tyra
|
||||||
+5
-5
@@ -12,18 +12,18 @@
|
|||||||
|
|
||||||
#include <packet2_utils.h>
|
#include <packet2_utils.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "../../stdpip_vu1_program.hpp"
|
#include "../../stapip_vu1_program.hpp"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
class StdpipCullDVU1Program : public StdpipVU1Program {
|
class StapipCullDVU1Program : public StapipVU1Program {
|
||||||
public:
|
public:
|
||||||
StdpipCullDVU1Program();
|
StapipCullDVU1Program();
|
||||||
~StdpipCullDVU1Program();
|
~StapipCullDVU1Program();
|
||||||
|
|
||||||
std::string getStringName() const;
|
std::string getStringName() const;
|
||||||
void addProgramQBufferDataToPacket(packet2_t* packet,
|
void addProgramQBufferDataToPacket(packet2_t* packet,
|
||||||
StdpipQBuffer* qbuffer) const;
|
StapipQBuffer* qbuffer) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Tyra
|
} // namespace Tyra
|
||||||
+29
@@ -0,0 +1,29 @@
|
|||||||
|
/*
|
||||||
|
# ______ ____ ___
|
||||||
|
# | \/ ____| |___|
|
||||||
|
# | | | \ | |
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
# Copyright 2022, tyra - https://github.com/h4570/tyra
|
||||||
|
# Licenced under Apache License 2.0
|
||||||
|
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <packet2_utils.h>
|
||||||
|
#include <string>
|
||||||
|
#include "../../stapip_vu1_program.hpp"
|
||||||
|
|
||||||
|
namespace Tyra {
|
||||||
|
|
||||||
|
class StapipCullTCVU1Program : public StapipVU1Program {
|
||||||
|
public:
|
||||||
|
StapipCullTCVU1Program();
|
||||||
|
~StapipCullTCVU1Program();
|
||||||
|
|
||||||
|
std::string getStringName() const;
|
||||||
|
void addProgramQBufferDataToPacket(packet2_t* packet,
|
||||||
|
StapipQBuffer* qbuffer) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace Tyra
|
||||||
+29
@@ -0,0 +1,29 @@
|
|||||||
|
/*
|
||||||
|
# ______ ____ ___
|
||||||
|
# | \/ ____| |___|
|
||||||
|
# | | | \ | |
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
# Copyright 2022, tyra - https://github.com/h4570/tyra
|
||||||
|
# Licenced under Apache License 2.0
|
||||||
|
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <packet2_utils.h>
|
||||||
|
#include <string>
|
||||||
|
#include "../../stapip_vu1_program.hpp"
|
||||||
|
|
||||||
|
namespace Tyra {
|
||||||
|
|
||||||
|
class StapipCullTDVU1Program : public StapipVU1Program {
|
||||||
|
public:
|
||||||
|
StapipCullTDVU1Program();
|
||||||
|
~StapipCullTDVU1Program();
|
||||||
|
|
||||||
|
std::string getStringName() const;
|
||||||
|
void addProgramQBufferDataToPacket(packet2_t* packet,
|
||||||
|
StapipQBuffer* qbuffer) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace Tyra
|
||||||
+6
-6
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "debug/debug.hpp"
|
#include "debug/debug.hpp"
|
||||||
#include "./stdpip_qbuffer.hpp"
|
#include "./stapip_qbuffer.hpp"
|
||||||
#include "renderer/renderer_settings.hpp"
|
#include "renderer/renderer_settings.hpp"
|
||||||
#include "renderer/core/paths/path1/clipper/path1_ee_clip_algorithm.hpp"
|
#include "renderer/core/paths/path1/clipper/path1_ee_clip_algorithm.hpp"
|
||||||
|
|
||||||
@@ -25,11 +25,11 @@ namespace Tyra {
|
|||||||
* To be honest clipping algorithm should be moved to VU1 and "AsIs" VU1 program
|
* To be honest clipping algorithm should be moved to VU1 and "AsIs" VU1 program
|
||||||
* should be renamed to "Clip" - I don't want to do it now, too much time.
|
* should be renamed to "Clip" - I don't want to do it now, too much time.
|
||||||
*/
|
*/
|
||||||
class StdpipClipper {
|
class StapipClipper {
|
||||||
public:
|
public:
|
||||||
StdpipClipper();
|
StapipClipper();
|
||||||
~StdpipClipper();
|
~StapipClipper();
|
||||||
void clip(StdpipQBuffer* buffer);
|
void clip(StapipQBuffer* buffer);
|
||||||
void init(const RendererSettings& settings);
|
void init(const RendererSettings& settings);
|
||||||
void setMaxVertCount(const u32& count);
|
void setMaxVertCount(const u32& count);
|
||||||
void setMVP(M4x4* mvp);
|
void setMVP(M4x4* mvp);
|
||||||
@@ -41,7 +41,7 @@ class StdpipClipper {
|
|||||||
|
|
||||||
void perspectiveDivide(std::vector<Path1ClipVertex>* vertices);
|
void perspectiveDivide(std::vector<Path1ClipVertex>* vertices);
|
||||||
void moveDataToBuffer(const std::vector<Path1ClipVertex>& vertices,
|
void moveDataToBuffer(const std::vector<Path1ClipVertex>& vertices,
|
||||||
StdpipQBuffer* buffer);
|
StapipQBuffer* buffer);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Tyra
|
} // namespace Tyra
|
||||||
+9
-9
@@ -12,20 +12,20 @@
|
|||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
enum StdpipProgramName {
|
enum StapipProgramName {
|
||||||
StdipUndefinedProgram,
|
StdipUndefinedProgram,
|
||||||
|
|
||||||
StdpipCullColor,
|
StapipCullColor,
|
||||||
StdpipAsIsColor,
|
StapipAsIsColor,
|
||||||
|
|
||||||
StdpipCullDirLights,
|
StapipCullDirLights,
|
||||||
StdpipAsIsDirLights,
|
StapipAsIsDirLights,
|
||||||
|
|
||||||
StdpipCullTextureDirLights,
|
StapipCullTextureDirLights,
|
||||||
StdpipAsIsTextureDirLights,
|
StapipAsIsTextureDirLights,
|
||||||
|
|
||||||
StdpipCullTextureColor,
|
StapipCullTextureColor,
|
||||||
StdpipAsIsTextureColor,
|
StapipAsIsTextureColor,
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Tyra
|
} // namespace Tyra
|
||||||
+5
-5
@@ -12,11 +12,11 @@
|
|||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
enum StdpipProgramType {
|
enum StapipProgramType {
|
||||||
StdpipVU1Color,
|
StapipVU1Color,
|
||||||
StdpipVU1DirLights,
|
StapipVU1DirLights,
|
||||||
StdpipVU1TextureDirLights,
|
StapipVU1TextureDirLights,
|
||||||
StdpipVU1TextureColor,
|
StapipVU1TextureColor,
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Tyra
|
} // namespace Tyra
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
# ______ ____ ___
|
||||||
|
# | \/ ____| |___|
|
||||||
|
# | | | \ | |
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
# Copyright 2022, tyra - https://github.com/h4570/tyra
|
||||||
|
# Licenced under Apache License 2.0
|
||||||
|
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "debug/debug.hpp"
|
||||||
|
#include "renderer/core/paths/path1/vu1_program.hpp"
|
||||||
|
|
||||||
|
#include "./programs/as_is/stapip_as_is_c_vu1_program.hpp"
|
||||||
|
#include "./programs/as_is/stapip_as_is_d_vu1_program.hpp"
|
||||||
|
#include "./programs/as_is/stapip_as_is_td_vu1_program.hpp"
|
||||||
|
#include "./programs/as_is/stapip_as_is_tc_vu1_program.hpp"
|
||||||
|
|
||||||
|
#include "./programs/cull/stapip_cull_c_vu1_program.hpp"
|
||||||
|
#include "./programs/cull/stapip_cull_d_vu1_program.hpp"
|
||||||
|
#include "./programs/cull/stapip_cull_td_vu1_program.hpp"
|
||||||
|
#include "./programs/cull/stapip_cull_tc_vu1_program.hpp"
|
||||||
|
|
||||||
|
#include "renderer/core/paths/path1/programs/draw_finish/vu1_draw_finish.hpp"
|
||||||
|
|
||||||
|
namespace Tyra {
|
||||||
|
|
||||||
|
class StapipProgramsRepository {
|
||||||
|
public:
|
||||||
|
StapipProgramsRepository();
|
||||||
|
~StapipProgramsRepository();
|
||||||
|
|
||||||
|
StapipVU1Program* getProgram(const StapipProgramName& name);
|
||||||
|
|
||||||
|
private:
|
||||||
|
StapipAsIsCVU1Program asIsColor;
|
||||||
|
StapipCullCVU1Program cullColor;
|
||||||
|
StapipAsIsDVU1Program asIsLightingColor;
|
||||||
|
StapipCullDVU1Program cullLightingColor;
|
||||||
|
StapipAsIsTDVU1Program asIsLightingTextureColor;
|
||||||
|
StapipCullTDVU1Program cullLightingTextureColor;
|
||||||
|
StapipAsIsTCVU1Program asIsTextureColor;
|
||||||
|
StapipCullTCVU1Program cullTextureColor;
|
||||||
|
VU1DrawFinish drawFinish;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace Tyra
|
||||||
+13
-13
@@ -14,15 +14,15 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include "debug/debug.hpp"
|
#include "debug/debug.hpp"
|
||||||
#include "../bag/packaging/stdpip_bag_package.hpp"
|
#include "./bag/packaging/stapip_bag_package.hpp"
|
||||||
#include "../bag/stdpip_bag.hpp"
|
#include "./bag/stapip_bag.hpp"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
class StdpipQBuffer {
|
class StapipQBuffer {
|
||||||
public:
|
public:
|
||||||
StdpipQBuffer();
|
StapipQBuffer();
|
||||||
~StdpipQBuffer();
|
~StapipQBuffer();
|
||||||
|
|
||||||
void setMaxVertCount(const u32& count);
|
void setMaxVertCount(const u32& count);
|
||||||
|
|
||||||
@@ -30,27 +30,27 @@ class StdpipQBuffer {
|
|||||||
* @brief Dont allocate any dynamic data in buffer.
|
* @brief Dont allocate any dynamic data in buffer.
|
||||||
* Just copy pointers to input data.
|
* Just copy pointers to input data.
|
||||||
*/
|
*/
|
||||||
void fillByPointer(const StdpipBagPackage& pkg);
|
void fillByPointer(const StapipBagPackage& pkg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Allocate dynamic data in buffer
|
* @brief Allocate dynamic data in buffer
|
||||||
* And copy input data to it.
|
* And copy input data to it.
|
||||||
*/
|
*/
|
||||||
void fillByCopyMax(const StdpipBagPackage& pkg1, const StdpipBagPackage& pkg2,
|
void fillByCopyMax(const StapipBagPackage& pkg1, const StapipBagPackage& pkg2,
|
||||||
const StdpipBagPackage& pkg3);
|
const StapipBagPackage& pkg3);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Allocate dynamic data in buffer
|
* @brief Allocate dynamic data in buffer
|
||||||
* And copy input data to it.
|
* And copy input data to it.
|
||||||
*/
|
*/
|
||||||
void fillByCopy1By2(const StdpipBagPackage& pkg1,
|
void fillByCopy1By2(const StapipBagPackage& pkg1,
|
||||||
const StdpipBagPackage& pkg2);
|
const StapipBagPackage& pkg2);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Allocate dynamic data in buffer
|
* @brief Allocate dynamic data in buffer
|
||||||
* And copy input data to it.
|
* And copy input data to it.
|
||||||
*/
|
*/
|
||||||
void fillByCopy1By3(const StdpipBagPackage& pkg);
|
void fillByCopy1By3(const StapipBagPackage& pkg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Deallocate dynamic data if it was allocated and allocate new data
|
* @brief Deallocate dynamic data if it was allocated and allocate new data
|
||||||
@@ -61,7 +61,7 @@ class StdpipQBuffer {
|
|||||||
|
|
||||||
bool any() const;
|
bool any() const;
|
||||||
|
|
||||||
StdpipBag* bag;
|
StapipBag* bag;
|
||||||
|
|
||||||
Vec4* vertices;
|
Vec4* vertices;
|
||||||
Vec4* sts;
|
Vec4* sts;
|
||||||
@@ -77,7 +77,7 @@ class StdpipQBuffer {
|
|||||||
private:
|
private:
|
||||||
u32 maxVertCount;
|
u32 maxVertCount;
|
||||||
void deallocateDynamicData();
|
void deallocateDynamicData();
|
||||||
void allocateDynamicData(u16 size, StdpipBag* bag);
|
void allocateDynamicData(u16 size, StapipBag* bag);
|
||||||
u8 _isDynamicallyAllocated, _stAllocated, _colorAllocated, _normalAllocated;
|
u8 _isDynamicallyAllocated, _stAllocated, _colorAllocated, _normalAllocated;
|
||||||
};
|
};
|
||||||
|
|
||||||
+25
-25
@@ -17,21 +17,21 @@
|
|||||||
#include "math/m4x4.hpp"
|
#include "math/m4x4.hpp"
|
||||||
#include "renderer/renderer_settings.hpp"
|
#include "renderer/renderer_settings.hpp"
|
||||||
#include "renderer/models/color.hpp"
|
#include "renderer/models/color.hpp"
|
||||||
#include "./stdpip_qbuffer.hpp"
|
#include "./stapip_qbuffer.hpp"
|
||||||
#include "./stdpip_program_type.hpp"
|
#include "./stapip_program_type.hpp"
|
||||||
#include "./stdpip_program_name.hpp"
|
#include "./stapip_program_name.hpp"
|
||||||
#include "./stdpip_programs_repository.hpp"
|
#include "./stapip_programs_repository.hpp"
|
||||||
#include "./stdpip_clipper.hpp"
|
#include "./stapip_clipper.hpp"
|
||||||
#include "renderer/core/paths/path1/path1.hpp"
|
#include "renderer/core/paths/path1/path1.hpp"
|
||||||
#include "renderer/core/renderer_core.hpp"
|
#include "renderer/core/renderer_core.hpp"
|
||||||
#include "renderer/core/texture/renderer_core_texture_buffers.hpp"
|
#include "renderer/core/texture/renderer_core_texture_buffers.hpp"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
class StdpipQBufferRenderer {
|
class StapipQBufferRenderer {
|
||||||
public:
|
public:
|
||||||
StdpipQBufferRenderer();
|
StapipQBufferRenderer();
|
||||||
~StdpipQBufferRenderer();
|
~StapipQBufferRenderer();
|
||||||
|
|
||||||
void init(RendererCore* t_core);
|
void init(RendererCore* t_core);
|
||||||
|
|
||||||
@@ -39,26 +39,26 @@ class StdpipQBufferRenderer {
|
|||||||
|
|
||||||
void setClipperMVP(M4x4* mvp) { clipper.setMVP(mvp); }
|
void setClipperMVP(M4x4* mvp) { clipper.setMVP(mvp); }
|
||||||
|
|
||||||
StdpipQBuffer* getBuffer();
|
StapipQBuffer* getBuffer();
|
||||||
|
|
||||||
void sendObjectData(StdpipBag* bag, M4x4* mvp,
|
void sendObjectData(StapipBag* bag, M4x4* mvp,
|
||||||
RendererCoreTextureBuffers* texBuffers) const;
|
RendererCoreTextureBuffers* texBuffers) const;
|
||||||
|
|
||||||
void setMaxVertCount(const u32& count);
|
void setMaxVertCount(const u32& count);
|
||||||
|
|
||||||
void setInfo(StdpipInfoBag* bag);
|
void setInfo(StapipInfoBag* bag);
|
||||||
|
|
||||||
/** Fast render with culling */
|
/** Fast render with culling */
|
||||||
void cull(StdpipQBuffer* buffer);
|
void cull(StapipQBuffer* buffer);
|
||||||
|
|
||||||
/** Slower render with clipping */
|
/** Slower render with clipping */
|
||||||
void clip(StdpipQBuffer* buffer);
|
void clip(StapipQBuffer* buffer);
|
||||||
|
|
||||||
void clearLastProgramName();
|
void clearLastProgramName();
|
||||||
|
|
||||||
StdpipVU1Program* getCullProgramByBag(const StdpipBag* bag);
|
StapipVU1Program* getCullProgramByBag(const StapipBag* bag);
|
||||||
|
|
||||||
StdpipVU1Program* getCullProgramByParams(const bool& isLightingEnabled,
|
StapipVU1Program* getCullProgramByParams(const bool& isLightingEnabled,
|
||||||
const bool& isTextureEnabled);
|
const bool& isTextureEnabled);
|
||||||
|
|
||||||
const u16& getBufferSize() { return bufferSize; }
|
const u16& getBufferSize() { return bufferSize; }
|
||||||
@@ -69,27 +69,27 @@ class StdpipQBufferRenderer {
|
|||||||
void uploadPrograms();
|
void uploadPrograms();
|
||||||
void setDoubleBuffer();
|
void setDoubleBuffer();
|
||||||
|
|
||||||
StdpipVU1Program* getProgramByName(const StdpipProgramName& name);
|
StapipVU1Program* getProgramByName(const StapipProgramName& name);
|
||||||
void addBufferDataToPacket(StdpipVU1Program* program, StdpipQBuffer* buffer);
|
void addBufferDataToPacket(StapipVU1Program* program, StapipQBuffer* buffer);
|
||||||
void sendPacket();
|
void sendPacket();
|
||||||
StdpipVU1Program* getAsIsProgramByBag(const StdpipBag* bag);
|
StapipVU1Program* getAsIsProgramByBag(const StapipBag* bag);
|
||||||
StdpipVU1Program* getCullProgramByType(const StdpipProgramType& programType);
|
StapipVU1Program* getCullProgramByType(const StapipProgramType& programType);
|
||||||
StdpipProgramType getDrawProgramTypeByBag(const StdpipBag* bag) const;
|
StapipProgramType getDrawProgramTypeByBag(const StapipBag* bag) const;
|
||||||
StdpipProgramType getDrawProgramTypeByParams(
|
StapipProgramType getDrawProgramTypeByParams(
|
||||||
const bool& isLightingEnabled, const bool& isTextureEnabled) const;
|
const bool& isLightingEnabled, const bool& isTextureEnabled) const;
|
||||||
packet2_t* packets[2];
|
packet2_t* packets[2];
|
||||||
packet2_t* programsPacket;
|
packet2_t* programsPacket;
|
||||||
StdpipQBuffer buffers[2];
|
StapipQBuffer buffers[2];
|
||||||
packet2_t* currentPacket;
|
packet2_t* currentPacket;
|
||||||
packet2_t* staticDataPacket;
|
packet2_t* staticDataPacket;
|
||||||
packet2_t* objectDataPacket;
|
packet2_t* objectDataPacket;
|
||||||
|
|
||||||
RendererCore* rendererCore;
|
RendererCore* rendererCore;
|
||||||
|
|
||||||
StdpipProgramName lastProgramName;
|
StapipProgramName lastProgramName;
|
||||||
Path1* path1;
|
Path1* path1;
|
||||||
StdpipClipper clipper;
|
StapipClipper clipper;
|
||||||
StdpipProgramsRepository repository;
|
StapipProgramsRepository repository;
|
||||||
|
|
||||||
u16 bufferSize;
|
u16 bufferSize;
|
||||||
u8 context;
|
u8 context;
|
||||||
+11
-11
@@ -10,40 +10,40 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "./stdpip_program_name.hpp"
|
#include "./stapip_program_name.hpp"
|
||||||
#include "renderer/core/paths/path1/vu1_program.hpp"
|
#include "renderer/core/paths/path1/vu1_program.hpp"
|
||||||
#include "./stdpip_qbuffer.hpp"
|
#include "./stapip_qbuffer.hpp"
|
||||||
#include "./programs/stdpip_vu1_shared_defines.h"
|
#include "./programs/stapip_vu1_shared_defines.h"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
class StdpipVU1Program : public VU1Program {
|
class StapipVU1Program : public VU1Program {
|
||||||
public:
|
public:
|
||||||
StdpipVU1Program(const StdpipProgramName& name, u32* start, u32* end,
|
StapipVU1Program(const StapipProgramName& name, u32* start, u32* end,
|
||||||
const u32& t_reglist, const u8& t_reglistCount,
|
const u32& t_reglist, const u8& t_reglistCount,
|
||||||
const u8& t_elementsPerVertex);
|
const u8& t_elementsPerVertex);
|
||||||
~StdpipVU1Program();
|
~StapipVU1Program();
|
||||||
|
|
||||||
u32& getReglist();
|
u32& getReglist();
|
||||||
|
|
||||||
const StdpipProgramName& getName() const;
|
const StapipProgramName& getName() const;
|
||||||
|
|
||||||
u16 getMaxVertCount(const bool& singleColorEnabled,
|
u16 getMaxVertCount(const bool& singleColorEnabled,
|
||||||
const u16& vu1DBufferSize) const;
|
const u16& vu1DBufferSize) const;
|
||||||
|
|
||||||
void addBufferDataToPacket(packet2_t* packet, StdpipQBuffer* buffer,
|
void addBufferDataToPacket(packet2_t* packet, StapipQBuffer* buffer,
|
||||||
prim_t* prim);
|
prim_t* prim);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
StdpipProgramName name;
|
StapipProgramName name;
|
||||||
u8 reglistCount, elementsPerVertex;
|
u8 reglistCount, elementsPerVertex;
|
||||||
u32 destinationAddress, reglist;
|
u32 destinationAddress, reglist;
|
||||||
|
|
||||||
virtual void addProgramQBufferDataToPacket(packet2_t* packet,
|
virtual void addProgramQBufferDataToPacket(packet2_t* packet,
|
||||||
StdpipQBuffer* qbuffer) const = 0;
|
StapipQBuffer* qbuffer) const = 0;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void addStandardBufferDataToPacket(packet2_t* packet, StdpipQBuffer* buffer,
|
void addStandardBufferDataToPacket(packet2_t* packet, StapipQBuffer* buffer,
|
||||||
prim_t* prim);
|
prim_t* prim);
|
||||||
};
|
};
|
||||||
|
|
||||||
+14
-14
@@ -11,23 +11,23 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <tamtypes.h>
|
#include <tamtypes.h>
|
||||||
#include "./bag/stdpip_bag.hpp"
|
#include "./bag/stapip_bag.hpp"
|
||||||
#include "./bag/packaging/stdpip_bag_packages_bbox.hpp"
|
#include "./bag/packaging/stapip_bag_packages_bbox.hpp"
|
||||||
#include "./bag/packaging/stdpip_bag_package.hpp"
|
#include "./bag/packaging/stapip_bag_package.hpp"
|
||||||
#include "./bag/packaging/stdpip_bag_packager.hpp"
|
#include "./bag/packaging/stapip_bag_packager.hpp"
|
||||||
#include "./path1/stdpip_qbuffer_renderer.hpp"
|
#include "./stapip_qbuffer_renderer.hpp"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
class StdPipelineCore {
|
class StapipelineCore {
|
||||||
public:
|
public:
|
||||||
StdPipelineCore();
|
StapipelineCore();
|
||||||
~StdPipelineCore();
|
~StapipelineCore();
|
||||||
|
|
||||||
void init(RendererCore* t_core);
|
void init(RendererCore* t_core);
|
||||||
|
|
||||||
/** Render 3D data via "bags" */
|
/** Render 3D data via "bags" */
|
||||||
void render(StdpipBag* data, StdpipBagPackagesBBox* bbox = nullptr);
|
void render(StapipBag* data, StapipBagPackagesBBox* bbox = nullptr);
|
||||||
|
|
||||||
/** Get max vert count of VU1 qbuffer (for optimizations) */
|
/** Get max vert count of VU1 qbuffer (for optimizations) */
|
||||||
u32 getMaxVertCountByParams(const bool& isSingleColor,
|
u32 getMaxVertCountByParams(const bool& isSingleColor,
|
||||||
@@ -35,7 +35,7 @@ class StdPipelineCore {
|
|||||||
const bool& isTextureEnabled);
|
const bool& isTextureEnabled);
|
||||||
|
|
||||||
/** Get max vert count of VU1 qbuffer (for optimizations) */
|
/** Get max vert count of VU1 qbuffer (for optimizations) */
|
||||||
u32 getMaxVertCountByBag(const StdpipBag* bag);
|
u32 getMaxVertCountByBag(const StapipBag* bag);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* - Uploads standard VU1 programs.
|
* - Uploads standard VU1 programs.
|
||||||
@@ -50,10 +50,10 @@ class StdPipelineCore {
|
|||||||
RendererCore* rendererCore;
|
RendererCore* rendererCore;
|
||||||
|
|
||||||
void setMaxVertCount(const u32& count);
|
void setMaxVertCount(const u32& count);
|
||||||
StdpipBagPackager packager;
|
StapipBagPackager packager;
|
||||||
StdpipQBufferRenderer qbufferRenderer;
|
StapipQBufferRenderer qbufferRenderer;
|
||||||
void renderPkgs(StdpipBagPackage* packages, u16 count);
|
void renderPkgs(StapipBagPackage* packages, u16 count);
|
||||||
void renderSubpkgs(StdpipBagPackage* packages, u16 count);
|
void renderSubpkgs(StapipBagPackage* packages, u16 count);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Tyra
|
} // namespace Tyra
|
||||||
+3
-3
@@ -15,10 +15,10 @@
|
|||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
class StdpipLightingOptions {
|
class StapipLightingOptions {
|
||||||
public:
|
public:
|
||||||
StdpipLightingOptions() {}
|
StapipLightingOptions() {}
|
||||||
~StdpipLightingOptions() {}
|
~StapipLightingOptions() {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mandatory.
|
* Mandatory.
|
||||||
+7
-7
@@ -10,23 +10,23 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "./stdpip_shading_type.hpp"
|
#include "./stapip_shading_type.hpp"
|
||||||
#include "./stdpip_lighting_options.hpp"
|
#include "./stapip_lighting_options.hpp"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
class StdpipOptions {
|
class StapipOptions {
|
||||||
public:
|
public:
|
||||||
StdpipOptions() {}
|
StapipOptions() {}
|
||||||
~StdpipOptions() {}
|
~StapipOptions() {}
|
||||||
|
|
||||||
StdpipShadingType shadingType;
|
StapipShadingType shadingType;
|
||||||
bool blendingEnabled;
|
bool blendingEnabled;
|
||||||
bool antiAliasingEnabled;
|
bool antiAliasingEnabled;
|
||||||
bool noClipChecks;
|
bool noClipChecks;
|
||||||
|
|
||||||
/** Optional */
|
/** Optional */
|
||||||
StdpipLightingOptions* lighting;
|
StapipLightingOptions* lighting;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Tyra
|
} // namespace Tyra
|
||||||
+3
-3
@@ -12,9 +12,9 @@
|
|||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
enum StdpipShadingType {
|
enum StapipShadingType {
|
||||||
StdpipShadingFlat,
|
StapipShadingFlat,
|
||||||
StdpipShadingGouraud,
|
StapipShadingGouraud,
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Tyra
|
} // namespace Tyra
|
||||||
+15
-15
@@ -12,17 +12,17 @@
|
|||||||
|
|
||||||
#include <tamtypes.h>
|
#include <tamtypes.h>
|
||||||
#include "../renderer_3d_pipeline.hpp"
|
#include "../renderer_3d_pipeline.hpp"
|
||||||
#include "./stdpip_options.hpp"
|
#include "./stapip_options.hpp"
|
||||||
#include "renderer/core/renderer_core.hpp"
|
#include "renderer/core/renderer_core.hpp"
|
||||||
#include "renderer/3d/mesh/mesh.hpp"
|
#include "renderer/3d/mesh/mesh.hpp"
|
||||||
#include "./core/std_pipeline_core.hpp"
|
#include "./core/static_pipeline_core.hpp"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
class StdPipeline : public Renderer3DPipeline {
|
class Stapipeline : public Renderer3DPipeline {
|
||||||
public:
|
public:
|
||||||
StdPipeline();
|
Stapipeline();
|
||||||
~StdPipeline();
|
~Stapipeline();
|
||||||
|
|
||||||
void init(RendererCore* core);
|
void init(RendererCore* core);
|
||||||
|
|
||||||
@@ -32,28 +32,28 @@ class StdPipeline : public Renderer3DPipeline {
|
|||||||
* Render 3D data via "meshes".
|
* Render 3D data via "meshes".
|
||||||
* This render() method is a bridge to core.renderer3D.render() method.
|
* This render() method is a bridge to core.renderer3D.render() method.
|
||||||
*/
|
*/
|
||||||
void render(Mesh* mesh, const StdpipOptions* options = nullptr);
|
void render(Mesh* mesh, const StapipOptions* options = nullptr);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
StdPipelineCore core;
|
StapipelineCore core;
|
||||||
RendererCore* rendererCore;
|
RendererCore* rendererCore;
|
||||||
Vec4* colorsCache;
|
Vec4* colorsCache;
|
||||||
|
|
||||||
void addVertices(Mesh* mesh, MeshMaterial* material, StdpipBag* bag,
|
void addVertices(Mesh* mesh, MeshMaterial* material, StapipBag* bag,
|
||||||
MeshFrame* frameFrom, MeshFrame* frameTo) const;
|
MeshFrame* frameFrom, MeshFrame* frameTo) const;
|
||||||
StdpipInfoBag* getInfoBag(Mesh* mesh, const StdpipOptions* options,
|
StapipInfoBag* getInfoBag(Mesh* mesh, const StapipOptions* options,
|
||||||
M4x4* model) const;
|
M4x4* model) const;
|
||||||
StdpipColorBag* getColorBag(Mesh* mesh, MeshMaterial* material,
|
StapipColorBag* getColorBag(Mesh* mesh, MeshMaterial* material,
|
||||||
MeshFrame* frameFrom, MeshFrame* frameTo) const;
|
MeshFrame* frameFrom, MeshFrame* frameTo) const;
|
||||||
StdpipTextureBag* getTextureBag(Mesh* mesh, MeshMaterial* material,
|
StapipTextureBag* getTextureBag(Mesh* mesh, MeshMaterial* material,
|
||||||
MeshFrame* frameFrom, MeshFrame* frameTo);
|
MeshFrame* frameFrom, MeshFrame* frameTo);
|
||||||
StdpipLightingBag* getLightingBag(Mesh* mesh, MeshMaterial* material,
|
StapipLightingBag* getLightingBag(Mesh* mesh, MeshMaterial* material,
|
||||||
M4x4* model, MeshFrame* frameFrom,
|
M4x4* model, MeshFrame* frameFrom,
|
||||||
MeshFrame* frameTo,
|
MeshFrame* frameTo,
|
||||||
const StdpipOptions* options) const;
|
const StapipOptions* options) const;
|
||||||
void deallocDrawBags(StdpipBag* bag, MeshMaterial* material) const;
|
void deallocDrawBags(StapipBag* bag, MeshMaterial* material) const;
|
||||||
|
|
||||||
void setLightingColorsCache(StdpipLightingOptions* lightingOptions);
|
void setLightingColorsCache(StapipLightingOptions* lightingOptions);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Tyra
|
} // namespace Tyra
|
||||||
-29
@@ -1,29 +0,0 @@
|
|||||||
/*
|
|
||||||
# ______ ____ ___
|
|
||||||
# | \/ ____| |___|
|
|
||||||
# | | | \ | |
|
|
||||||
#-----------------------------------------------------------------------
|
|
||||||
# Copyright 2022, tyra - https://github.com/h4570/tyra
|
|
||||||
# Licenced under Apache License 2.0
|
|
||||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <packet2_utils.h>
|
|
||||||
#include <string>
|
|
||||||
#include "../../stdpip_vu1_program.hpp"
|
|
||||||
|
|
||||||
namespace Tyra {
|
|
||||||
|
|
||||||
class StdpipCullTCVU1Program : public StdpipVU1Program {
|
|
||||||
public:
|
|
||||||
StdpipCullTCVU1Program();
|
|
||||||
~StdpipCullTCVU1Program();
|
|
||||||
|
|
||||||
std::string getStringName() const;
|
|
||||||
void addProgramQBufferDataToPacket(packet2_t* packet,
|
|
||||||
StdpipQBuffer* qbuffer) const;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Tyra
|
|
||||||
-29
@@ -1,29 +0,0 @@
|
|||||||
/*
|
|
||||||
# ______ ____ ___
|
|
||||||
# | \/ ____| |___|
|
|
||||||
# | | | \ | |
|
|
||||||
#-----------------------------------------------------------------------
|
|
||||||
# Copyright 2022, tyra - https://github.com/h4570/tyra
|
|
||||||
# Licenced under Apache License 2.0
|
|
||||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <packet2_utils.h>
|
|
||||||
#include <string>
|
|
||||||
#include "../../stdpip_vu1_program.hpp"
|
|
||||||
|
|
||||||
namespace Tyra {
|
|
||||||
|
|
||||||
class StdpipCullTDVU1Program : public StdpipVU1Program {
|
|
||||||
public:
|
|
||||||
StdpipCullTDVU1Program();
|
|
||||||
~StdpipCullTDVU1Program();
|
|
||||||
|
|
||||||
std::string getStringName() const;
|
|
||||||
void addProgramQBufferDataToPacket(packet2_t* packet,
|
|
||||||
StdpipQBuffer* qbuffer) const;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Tyra
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
/*
|
|
||||||
# ______ ____ ___
|
|
||||||
# | \/ ____| |___|
|
|
||||||
# | | | \ | |
|
|
||||||
#-----------------------------------------------------------------------
|
|
||||||
# Copyright 2022, tyra - https://github.com/h4570/tyra
|
|
||||||
# Licenced under Apache License 2.0
|
|
||||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "debug/debug.hpp"
|
|
||||||
#include "renderer/core/paths/path1/vu1_program.hpp"
|
|
||||||
|
|
||||||
#include "./programs/as_is/stdpip_as_is_c_vu1_program.hpp"
|
|
||||||
#include "./programs/as_is/stdpip_as_is_d_vu1_program.hpp"
|
|
||||||
#include "./programs/as_is/stdpip_as_is_td_vu1_program.hpp"
|
|
||||||
#include "./programs/as_is/stdpip_as_is_tc_vu1_program.hpp"
|
|
||||||
|
|
||||||
#include "./programs/cull/stdpip_cull_c_vu1_program.hpp"
|
|
||||||
#include "./programs/cull/stdpip_cull_d_vu1_program.hpp"
|
|
||||||
#include "./programs/cull/stdpip_cull_td_vu1_program.hpp"
|
|
||||||
#include "./programs/cull/stdpip_cull_tc_vu1_program.hpp"
|
|
||||||
|
|
||||||
#include "renderer/core/paths/path1/programs/draw_finish/vu1_draw_finish.hpp"
|
|
||||||
|
|
||||||
namespace Tyra {
|
|
||||||
|
|
||||||
class StdpipProgramsRepository {
|
|
||||||
public:
|
|
||||||
StdpipProgramsRepository();
|
|
||||||
~StdpipProgramsRepository();
|
|
||||||
|
|
||||||
StdpipVU1Program* getProgram(const StdpipProgramName& name);
|
|
||||||
|
|
||||||
private:
|
|
||||||
StdpipAsIsCVU1Program asIsColor;
|
|
||||||
StdpipCullCVU1Program cullColor;
|
|
||||||
StdpipAsIsDVU1Program asIsLightingColor;
|
|
||||||
StdpipCullDVU1Program cullLightingColor;
|
|
||||||
StdpipAsIsTDVU1Program asIsLightingTextureColor;
|
|
||||||
StdpipCullTDVU1Program cullLightingTextureColor;
|
|
||||||
StdpipAsIsTCVU1Program asIsTextureColor;
|
|
||||||
StdpipCullTCVU1Program cullTextureColor;
|
|
||||||
VU1DrawFinish drawFinish;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Tyra
|
|
||||||
+7
-7
@@ -11,11 +11,11 @@
|
|||||||
#include <tamtypes.h>
|
#include <tamtypes.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include "renderer/3d/pipeline/std/core/bag/packaging/stdpip_bag_package.hpp"
|
#include "renderer/3d/pipeline/static/core/bag/packaging/stapip_bag_package.hpp"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
StdpipBagPackage::StdpipBagPackage() {
|
StapipBagPackage::StapipBagPackage() {
|
||||||
size = 0;
|
size = 0;
|
||||||
bag = nullptr;
|
bag = nullptr;
|
||||||
vertices = nullptr;
|
vertices = nullptr;
|
||||||
@@ -23,24 +23,24 @@ StdpipBagPackage::StdpipBagPackage() {
|
|||||||
normals = nullptr;
|
normals = nullptr;
|
||||||
colors = nullptr;
|
colors = nullptr;
|
||||||
}
|
}
|
||||||
StdpipBagPackage::~StdpipBagPackage() {}
|
StapipBagPackage::~StapipBagPackage() {}
|
||||||
|
|
||||||
void StdpipBagPackage::print() const {
|
void StapipBagPackage::print() const {
|
||||||
auto text = getPrint(nullptr);
|
auto text = getPrint(nullptr);
|
||||||
printf("%s\n", text.c_str());
|
printf("%s\n", text.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipBagPackage::print(const char* name) const {
|
void StapipBagPackage::print(const char* name) const {
|
||||||
auto text = getPrint(name);
|
auto text = getPrint(name);
|
||||||
printf("%s\n", text.c_str());
|
printf("%s\n", text.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string StdpipBagPackage::getPrint(const char* name) const {
|
std::string StapipBagPackage::getPrint(const char* name) const {
|
||||||
std::stringstream res;
|
std::stringstream res;
|
||||||
if (name) {
|
if (name) {
|
||||||
res << name << "(";
|
res << name << "(";
|
||||||
} else {
|
} else {
|
||||||
res << "StdpipBagPackage(";
|
res << "StapipBagPackage(";
|
||||||
}
|
}
|
||||||
res << std::fixed << std::setprecision(2);
|
res << std::fixed << std::setprecision(2);
|
||||||
res << std::endl;
|
res << std::endl;
|
||||||
+13
-13
@@ -11,14 +11,14 @@
|
|||||||
#include <tamtypes.h>
|
#include <tamtypes.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include "debug/debug.hpp"
|
#include "debug/debug.hpp"
|
||||||
#include "renderer/3d/pipeline/std/core/bag/packaging/stdpip_bag_packager.hpp"
|
#include "renderer/3d/pipeline/static/core/bag/packaging/stapip_bag_packager.hpp"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
StdpipBagPackager::StdpipBagPackager() {}
|
StapipBagPackager::StapipBagPackager() {}
|
||||||
StdpipBagPackager::~StdpipBagPackager() {}
|
StapipBagPackager::~StapipBagPackager() {}
|
||||||
|
|
||||||
void StdpipBagPackager::init(Renderer3DFrustumPlanes* t_frustumPlanes) {
|
void StapipBagPackager::init(Renderer3DFrustumPlanes* t_frustumPlanes) {
|
||||||
frustumPlanes = t_frustumPlanes;
|
frustumPlanes = t_frustumPlanes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -27,13 +27,13 @@ void StdpipBagPackager::init(Renderer3DFrustumPlanes* t_frustumPlanes) {
|
|||||||
*
|
*
|
||||||
* @param size Max maxVertCount verts (VU1 buffer size)
|
* @param size Max maxVertCount verts (VU1 buffer size)
|
||||||
*/
|
*/
|
||||||
StdpipBagPackage* StdpipBagPackager::create(u16* o_size, StdpipBag* data,
|
StapipBagPackage* StapipBagPackager::create(u16* o_size, StapipBag* data,
|
||||||
u16 size) {
|
u16 size) {
|
||||||
TYRA_ASSERT(size <= maxVertCount, "StdpipBagPackage can have max ",
|
TYRA_ASSERT(size <= maxVertCount, "StapipBagPackage can have max ",
|
||||||
maxVertCount, " verts. Provided \"", size, "\"");
|
maxVertCount, " verts. Provided \"", size, "\"");
|
||||||
|
|
||||||
*o_size = ceil(data->count / static_cast<float>(size));
|
*o_size = ceil(data->count / static_cast<float>(size));
|
||||||
StdpipBagPackage* result = new StdpipBagPackage[*o_size];
|
StapipBagPackage* result = new StapipBagPackage[*o_size];
|
||||||
|
|
||||||
for (u16 i = 0; i < *o_size; i++) {
|
for (u16 i = 0; i < *o_size; i++) {
|
||||||
result[i].bag = data;
|
result[i].bag = data;
|
||||||
@@ -65,14 +65,14 @@ StdpipBagPackage* StdpipBagPackager::create(u16* o_size, StdpipBag* data,
|
|||||||
*
|
*
|
||||||
* @param size Max maxVertCount verts (VU1 buffer size)
|
* @param size Max maxVertCount verts (VU1 buffer size)
|
||||||
*/
|
*/
|
||||||
StdpipBagPackage* StdpipBagPackager::create(u16* o_count,
|
StapipBagPackage* StapipBagPackager::create(u16* o_count,
|
||||||
const StdpipBagPackage& pkg,
|
const StapipBagPackage& pkg,
|
||||||
u16 size) {
|
u16 size) {
|
||||||
TYRA_ASSERT(size <= maxVertCount, "StdpipBagPackage can have max ",
|
TYRA_ASSERT(size <= maxVertCount, "StapipBagPackage can have max ",
|
||||||
maxVertCount, " verts. Provided \"", size, "\"");
|
maxVertCount, " verts. Provided \"", size, "\"");
|
||||||
|
|
||||||
*o_count = ceil(pkg.size / static_cast<float>(size));
|
*o_count = ceil(pkg.size / static_cast<float>(size));
|
||||||
auto* result = new StdpipBagPackage[*o_count];
|
auto* result = new StapipBagPackage[*o_count];
|
||||||
|
|
||||||
for (u16 i = 0; i < *o_count; i++) {
|
for (u16 i = 0; i < *o_count; i++) {
|
||||||
result[i].bag = pkg.bag;
|
result[i].bag = pkg.bag;
|
||||||
@@ -99,7 +99,7 @@ StdpipBagPackage* StdpipBagPackager::create(u16* o_count,
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoreBBoxFrustum StdpipBagPackager::checkFrustum(const StdpipBagPackage& pkg) {
|
CoreBBoxFrustum StapipBagPackager::checkFrustum(const StapipBagPackage& pkg) {
|
||||||
if (pkg.size <= (maxVertCount / 3)) { // Is subpackage
|
if (pkg.size <= (maxVertCount / 3)) { // Is subpackage
|
||||||
auto& bbox = renderBBox->getChildBBox1By3(pkg.indexOf1By3BBox);
|
auto& bbox = renderBBox->getChildBBox1By3(pkg.indexOf1By3BBox);
|
||||||
return bbox.clipIsInFrustum(frustumPlanes->getAll(), *pkg.bag->info->model);
|
return bbox.clipIsInFrustum(frustumPlanes->getAll(), *pkg.bag->info->model);
|
||||||
@@ -112,7 +112,7 @@ CoreBBoxFrustum StdpipBagPackager::checkFrustum(const StdpipBagPackage& pkg) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipBagPackager::setMaxVertCount(const u32& count) {
|
void StapipBagPackager::setMaxVertCount(const u32& count) {
|
||||||
maxVertCount = count;
|
maxVertCount = count;
|
||||||
}
|
}
|
||||||
|
|
||||||
+13
-13
@@ -13,11 +13,11 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "debug/debug.hpp"
|
#include "debug/debug.hpp"
|
||||||
#include "renderer/3d/pipeline/std/core/bag/packaging/stdpip_bag_packages_bbox.hpp"
|
#include "renderer/3d/pipeline/static/core/bag/packaging/stapip_bag_packages_bbox.hpp"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
StdpipBagPackagesBBox::StdpipBagPackagesBBox(Vec4* t_vertices, u32* t_faces,
|
StapipBagPackagesBBox::StapipBagPackagesBBox(Vec4* t_vertices, u32* t_faces,
|
||||||
const u32& t_facesCount,
|
const u32& t_facesCount,
|
||||||
const u32& t_maxVertCount) {
|
const u32& t_maxVertCount) {
|
||||||
u32 splitPartSize = t_maxVertCount / 3;
|
u32 splitPartSize = t_maxVertCount / 3;
|
||||||
@@ -34,7 +34,7 @@ StdpipBagPackagesBBox::StdpipBagPackagesBBox(Vec4* t_vertices, u32* t_faces,
|
|||||||
mainBBox = new RenderBBox(*bboxParts, 0, partsCount);
|
mainBBox = new RenderBBox(*bboxParts, 0, partsCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
StdpipBagPackagesBBox::StdpipBagPackagesBBox(Vec4* t_vertices,
|
StapipBagPackagesBBox::StapipBagPackagesBBox(Vec4* t_vertices,
|
||||||
const u32& t_count,
|
const u32& t_count,
|
||||||
const u32& t_maxVertCount) {
|
const u32& t_maxVertCount) {
|
||||||
u32 splitPartSize = t_maxVertCount / 3;
|
u32 splitPartSize = t_maxVertCount / 3;
|
||||||
@@ -51,40 +51,40 @@ StdpipBagPackagesBBox::StdpipBagPackagesBBox(Vec4* t_vertices,
|
|||||||
mainBBox = new RenderBBox(*bboxParts, 0, partsCount);
|
mainBBox = new RenderBBox(*bboxParts, 0, partsCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
const RenderBBox& StdpipBagPackagesBBox::getChildBBox1By3(
|
const RenderBBox& StapipBagPackagesBBox::getChildBBox1By3(
|
||||||
const u32& index) const {
|
const u32& index) const {
|
||||||
TYRA_ASSERT(index < partsCount,
|
TYRA_ASSERT(index < partsCount,
|
||||||
"Index out of range. Provided index: ", index);
|
"Index out of range. Provided index: ", index);
|
||||||
return static_cast<RenderBBox&>(bboxParts->at(index));
|
return static_cast<RenderBBox&>(bboxParts->at(index));
|
||||||
}
|
}
|
||||||
|
|
||||||
RenderBBox* StdpipBagPackagesBBox::getMainBBox() { return mainBBox; }
|
RenderBBox* StapipBagPackagesBBox::getMainBBox() { return mainBBox; }
|
||||||
|
|
||||||
const u32& StdpipBagPackagesBBox::getPartsCount() const { return partsCount; }
|
const u32& StapipBagPackagesBBox::getPartsCount() const { return partsCount; }
|
||||||
|
|
||||||
const u32& StdpipBagPackagesBBox::getVertexCount() const { return vertexCount; }
|
const u32& StapipBagPackagesBBox::getVertexCount() const { return vertexCount; }
|
||||||
|
|
||||||
RenderBBox StdpipBagPackagesBBox::createChildBBox(const u32& index,
|
RenderBBox StapipBagPackagesBBox::createChildBBox(const u32& index,
|
||||||
const u16& partsSize) const {
|
const u16& partsSize) const {
|
||||||
return RenderBBox(*bboxParts, index, partsSize);
|
return RenderBBox(*bboxParts, index, partsSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipBagPackagesBBox::print() const {
|
void StapipBagPackagesBBox::print() const {
|
||||||
auto text = getPrint(nullptr);
|
auto text = getPrint(nullptr);
|
||||||
printf("%s\n", text.c_str());
|
printf("%s\n", text.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipBagPackagesBBox::print(const char* name) const {
|
void StapipBagPackagesBBox::print(const char* name) const {
|
||||||
auto text = getPrint(name);
|
auto text = getPrint(name);
|
||||||
printf("%s\n", text.c_str());
|
printf("%s\n", text.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string StdpipBagPackagesBBox::getPrint(const char* name) const {
|
std::string StapipBagPackagesBBox::getPrint(const char* name) const {
|
||||||
std::stringstream res;
|
std::stringstream res;
|
||||||
if (name) {
|
if (name) {
|
||||||
res << name << "(";
|
res << name << "(";
|
||||||
} else {
|
} else {
|
||||||
res << "StdpipBagPackagesBBox(";
|
res << "StapipBagPackagesBBox(";
|
||||||
}
|
}
|
||||||
res << std::fixed << std::setprecision(2);
|
res << std::fixed << std::setprecision(2);
|
||||||
res << std::endl;
|
res << std::endl;
|
||||||
@@ -105,7 +105,7 @@ std::string StdpipBagPackagesBBox::getPrint(const char* name) const {
|
|||||||
return res.str();
|
return res.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
StdpipBagPackagesBBox::~StdpipBagPackagesBBox() {
|
StapipBagPackagesBBox::~StapipBagPackagesBBox() {
|
||||||
delete bboxParts;
|
delete bboxParts;
|
||||||
delete mainBBox;
|
delete mainBBox;
|
||||||
}
|
}
|
||||||
+9
-9
@@ -9,41 +9,41 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "renderer/3d/pipeline/std/core/bag/stdpip_bag.hpp"
|
#include "renderer/3d/pipeline/static/core/bag/stapip_bag.hpp"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
StdpipBag::StdpipBag() {
|
StapipBag::StapipBag() {
|
||||||
info = nullptr;
|
info = nullptr;
|
||||||
color = nullptr;
|
color = nullptr;
|
||||||
texture = nullptr;
|
texture = nullptr;
|
||||||
lighting = nullptr;
|
lighting = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
StdpipBag::~StdpipBag() {}
|
StapipBag::~StapipBag() {}
|
||||||
|
|
||||||
StdpipBagPackagesBBox StdpipBag::calculateBbox(const u32& maxVertCount) {
|
StapipBagPackagesBBox StapipBag::calculateBbox(const u32& maxVertCount) {
|
||||||
TYRA_ASSERT(vertices != nullptr, "Vertices are required to calculate bbox");
|
TYRA_ASSERT(vertices != nullptr, "Vertices are required to calculate bbox");
|
||||||
TYRA_ASSERT(count > 0, "Count must be greater than 0 to calculate bbox");
|
TYRA_ASSERT(count > 0, "Count must be greater than 0 to calculate bbox");
|
||||||
return StdpipBagPackagesBBox(vertices, count, maxVertCount);
|
return StapipBagPackagesBBox(vertices, count, maxVertCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipBag::print() const {
|
void StapipBag::print() const {
|
||||||
auto text = getPrint(nullptr);
|
auto text = getPrint(nullptr);
|
||||||
printf("%s\n", text.c_str());
|
printf("%s\n", text.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipBag::print(const char* name) const {
|
void StapipBag::print(const char* name) const {
|
||||||
auto text = getPrint(name);
|
auto text = getPrint(name);
|
||||||
printf("%s\n", text.c_str());
|
printf("%s\n", text.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string StdpipBag::getPrint(const char* name) const {
|
std::string StapipBag::getPrint(const char* name) const {
|
||||||
std::stringstream res;
|
std::stringstream res;
|
||||||
if (name) {
|
if (name) {
|
||||||
res << name << "(";
|
res << name << "(";
|
||||||
} else {
|
} else {
|
||||||
res << "StdpipBag(";
|
res << "StapipBag(";
|
||||||
}
|
}
|
||||||
res << std::fixed << std::setprecision(4);
|
res << std::fixed << std::setprecision(4);
|
||||||
res << std::endl;
|
res << std::endl;
|
||||||
+3
-3
@@ -8,15 +8,15 @@
|
|||||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "renderer/3d/pipeline/std/core/bag/stdpip_color_bag.hpp"
|
#include "renderer/3d/pipeline/static/core/bag/stapip_color_bag.hpp"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
StdpipColorBag::StdpipColorBag() {
|
StapipColorBag::StapipColorBag() {
|
||||||
single = nullptr;
|
single = nullptr;
|
||||||
many = nullptr;
|
many = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
StdpipColorBag::~StdpipColorBag() {}
|
StapipColorBag::~StapipColorBag() {}
|
||||||
|
|
||||||
} // namespace Tyra
|
} // namespace Tyra
|
||||||
+4
-4
@@ -8,17 +8,17 @@
|
|||||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "renderer/3d/pipeline/std/core/bag/stdpip_info_bag.hpp"
|
#include "renderer/3d/pipeline/static/core/bag/stapip_info_bag.hpp"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
StdpipInfoBag::StdpipInfoBag() {
|
StapipInfoBag::StapipInfoBag() {
|
||||||
shadingType = StdpipShadingFlat;
|
shadingType = StapipShadingFlat;
|
||||||
blendingEnabled = true;
|
blendingEnabled = true;
|
||||||
antiAliasingEnabled = false;
|
antiAliasingEnabled = false;
|
||||||
model = nullptr;
|
model = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
StdpipInfoBag::~StdpipInfoBag() {}
|
StapipInfoBag::~StapipInfoBag() {}
|
||||||
|
|
||||||
} // namespace Tyra
|
} // namespace Tyra
|
||||||
+15
-15
@@ -9,11 +9,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "debug/debug.hpp"
|
#include "debug/debug.hpp"
|
||||||
#include "renderer/3d/pipeline/std/core/bag/stdpip_lighting_bag.hpp"
|
#include "renderer/3d/pipeline/static/core/bag/stapip_lighting_bag.hpp"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
StdpipLightingBag::StdpipLightingBag(const bool& manual) {
|
StapipLightingBag::StapipLightingBag(const bool& manual) {
|
||||||
isAllocated = false;
|
isAllocated = false;
|
||||||
mode = Auto;
|
mode = Auto;
|
||||||
normals = nullptr;
|
normals = nullptr;
|
||||||
@@ -27,24 +27,24 @@ StdpipLightingBag::StdpipLightingBag(const bool& manual) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StdpipLightingBag::~StdpipLightingBag() { deallocate(); }
|
StapipLightingBag::~StapipLightingBag() { deallocate(); }
|
||||||
|
|
||||||
void StdpipLightingBag::setAmbientColor(const Color& color) {
|
void StapipLightingBag::setAmbientColor(const Color& color) {
|
||||||
TYRA_ASSERT(mode != Manual, "Ambient color cannot be set in manual mode");
|
TYRA_ASSERT(mode != Manual, "Ambient color cannot be set in manual mode");
|
||||||
lightColors[3].set(reinterpret_cast<const Vec4&>(color));
|
lightColors[3].set(reinterpret_cast<const Vec4&>(color));
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipLightingBag::setDirectionalLightColors(Color* colors,
|
void StapipLightingBag::setDirectionalLightColors(Color* colors,
|
||||||
const u8& count) {
|
const u8& count) {
|
||||||
for (u8 i = 0; i < count; i++) setDirectionalLightColor(colors[i], i);
|
for (u8 i = 0; i < count; i++) setDirectionalLightColor(colors[i], i);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipLightingBag::setDirectionalLightDirections(Vec4* directions,
|
void StapipLightingBag::setDirectionalLightDirections(Vec4* directions,
|
||||||
const u8& count) {
|
const u8& count) {
|
||||||
for (u8 i = 0; i < count; i++) setDirectionalLightDirection(directions[i], i);
|
for (u8 i = 0; i < count; i++) setDirectionalLightDirection(directions[i], i);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipLightingBag::setDirectionalLightColor(const Color& color,
|
void StapipLightingBag::setDirectionalLightColor(const Color& color,
|
||||||
const u8& index) {
|
const u8& index) {
|
||||||
TYRA_ASSERT(mode != Manual,
|
TYRA_ASSERT(mode != Manual,
|
||||||
"Directional lights cannot be set in manual mode");
|
"Directional lights cannot be set in manual mode");
|
||||||
@@ -52,7 +52,7 @@ void StdpipLightingBag::setDirectionalLightColor(const Color& color,
|
|||||||
lightColors[index].set(reinterpret_cast<const Vec4&>(color));
|
lightColors[index].set(reinterpret_cast<const Vec4&>(color));
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipLightingBag::setDirectionalLightDirection(const Vec4& direction,
|
void StapipLightingBag::setDirectionalLightDirection(const Vec4& direction,
|
||||||
const u8& index) {
|
const u8& index) {
|
||||||
TYRA_ASSERT(mode != Manual,
|
TYRA_ASSERT(mode != Manual,
|
||||||
"Directional lights cannot be set in manual mode");
|
"Directional lights cannot be set in manual mode");
|
||||||
@@ -61,19 +61,19 @@ void StdpipLightingBag::setDirectionalLightDirection(const Vec4& direction,
|
|||||||
lightDirections[index].set(direction);
|
lightDirections[index].set(direction);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipLightingBag::setLightsManually(Vec4* colors, Vec4* directions) {
|
void StapipLightingBag::setLightsManually(Vec4* colors, Vec4* directions) {
|
||||||
deallocate();
|
deallocate();
|
||||||
lightColors = colors;
|
lightColors = colors;
|
||||||
lightDirections = directions;
|
lightDirections = directions;
|
||||||
mode = Manual;
|
mode = Manual;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipLightingBag::disableManualMode() {
|
void StapipLightingBag::disableManualMode() {
|
||||||
allocate();
|
allocate();
|
||||||
mode = Auto;
|
mode = Auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipLightingBag::allocate() {
|
void StapipLightingBag::allocate() {
|
||||||
if (isAllocated) return;
|
if (isAllocated) return;
|
||||||
|
|
||||||
lightColors = new Vec4[4];
|
lightColors = new Vec4[4];
|
||||||
@@ -92,27 +92,27 @@ void StdpipLightingBag::allocate() {
|
|||||||
isAllocated = true;
|
isAllocated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipLightingBag::deallocate() {
|
void StapipLightingBag::deallocate() {
|
||||||
if (!isAllocated) return;
|
if (!isAllocated) return;
|
||||||
|
|
||||||
forceDeallocate();
|
forceDeallocate();
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipLightingBag::forceDeallocate() {
|
void StapipLightingBag::forceDeallocate() {
|
||||||
forceDeallocateColors();
|
forceDeallocateColors();
|
||||||
forceDeallocateDirections();
|
forceDeallocateDirections();
|
||||||
|
|
||||||
isAllocated = false;
|
isAllocated = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipLightingBag::forceDeallocateColors() {
|
void StapipLightingBag::forceDeallocateColors() {
|
||||||
if (lightColors != nullptr) {
|
if (lightColors != nullptr) {
|
||||||
delete[] lightColors;
|
delete[] lightColors;
|
||||||
lightColors = nullptr;
|
lightColors = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipLightingBag::forceDeallocateDirections() {
|
void StapipLightingBag::forceDeallocateDirections() {
|
||||||
if (lightDirections != nullptr) {
|
if (lightDirections != nullptr) {
|
||||||
delete[] lightDirections;
|
delete[] lightDirections;
|
||||||
lightDirections = nullptr;
|
lightDirections = nullptr;
|
||||||
+3
-3
@@ -8,15 +8,15 @@
|
|||||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "renderer/3d/pipeline/std/core/bag/stdpip_texture_bag.hpp"
|
#include "renderer/3d/pipeline/static/core/bag/stapip_texture_bag.hpp"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
StdpipTextureBag::StdpipTextureBag() {
|
StapipTextureBag::StapipTextureBag() {
|
||||||
coordinates = nullptr;
|
coordinates = nullptr;
|
||||||
texture = nullptr;
|
texture = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
StdpipTextureBag::~StdpipTextureBag() {}
|
StapipTextureBag::~StapipTextureBag() {}
|
||||||
|
|
||||||
} // namespace Tyra
|
} // namespace Tyra
|
||||||
+3
-3
@@ -13,14 +13,14 @@
|
|||||||
;---------------------------------------------------------------
|
;---------------------------------------------------------------
|
||||||
|
|
||||||
.syntax new
|
.syntax new
|
||||||
.name StdpipVU1As_Is_C
|
.name StapipVU1As_Is_C
|
||||||
.vu
|
.vu
|
||||||
.init_vf_all
|
.init_vf_all
|
||||||
.init_vi_all
|
.init_vi_all
|
||||||
|
|
||||||
#include "src/renderer/core/paths/path1/programs/vcl_sml.i"
|
#include "src/renderer/core/paths/path1/programs/vcl_sml.i"
|
||||||
#include "src/renderer/core/paths/path1/programs/tyra_macros.i"
|
#include "src/renderer/core/paths/path1/programs/tyra_macros.i"
|
||||||
#include "inc/renderer/3d/pipeline/std/core/path1/programs/stdpip_vu1_shared_defines.h"
|
#include "inc/renderer/3d/pipeline/static/core/programs/stapip_vu1_shared_defines.h"
|
||||||
|
|
||||||
#define RGBA_STORE_OFFSET 0
|
#define RGBA_STORE_OFFSET 0
|
||||||
#define XYZ2_STORE_OFFSET 1
|
#define XYZ2_STORE_OFFSET 1
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
--enter
|
--enter
|
||||||
--endenter
|
--endenter
|
||||||
|
|
||||||
#vuprog StdpipVU1AsIsC
|
#vuprog StapipVU1AsIsC
|
||||||
|
|
||||||
LoadTyraStaticData{ gifSetTag }
|
LoadTyraStaticData{ gifSetTag }
|
||||||
LoadTyraSingleColor{ singleColor, singleColorEnabled, VU1_SINGLE_COLOR_ADDR, VU1_OPTIONS_ADDR }
|
LoadTyraSingleColor{ singleColor, singleColorEnabled, VU1_SINGLE_COLOR_ADDR, VU1_OPTIONS_ADDR }
|
||||||
+10
-10
@@ -9,27 +9,27 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "debug/debug.hpp"
|
#include "debug/debug.hpp"
|
||||||
#include "renderer/3d/pipeline/std/core/path1/programs/as_is/stdpip_as_is_c_vu1_program.hpp"
|
#include "renderer/3d/pipeline/static/core/programs/as_is/stapip_as_is_c_vu1_program.hpp"
|
||||||
|
|
||||||
extern u32 StdpipVU1As_Is_C_CodeStart __attribute__((section(".vudata")));
|
extern u32 StapipVU1As_Is_C_CodeStart __attribute__((section(".vudata")));
|
||||||
extern u32 StdpipVU1As_Is_C_CodeEnd __attribute__((section(".vudata")));
|
extern u32 StapipVU1As_Is_C_CodeEnd __attribute__((section(".vudata")));
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
StdpipAsIsCVU1Program::StdpipAsIsCVU1Program()
|
StapipAsIsCVU1Program::StapipAsIsCVU1Program()
|
||||||
: StdpipVU1Program(StdpipAsIsColor, &StdpipVU1As_Is_C_CodeStart,
|
: StapipVU1Program(StapipAsIsColor, &StapipVU1As_Is_C_CodeStart,
|
||||||
&StdpipVU1As_Is_C_CodeEnd,
|
&StapipVU1As_Is_C_CodeEnd,
|
||||||
((u64)GIF_REG_RGBAQ) << 0 | ((u64)GIF_REG_XYZ2) << 4, 2,
|
((u64)GIF_REG_RGBAQ) << 0 | ((u64)GIF_REG_XYZ2) << 4, 2,
|
||||||
2) {}
|
2) {}
|
||||||
|
|
||||||
StdpipAsIsCVU1Program::~StdpipAsIsCVU1Program() {}
|
StapipAsIsCVU1Program::~StapipAsIsCVU1Program() {}
|
||||||
|
|
||||||
std::string StdpipAsIsCVU1Program::getStringName() const {
|
std::string StapipAsIsCVU1Program::getStringName() const {
|
||||||
return std::string("As is - C");
|
return std::string("As is - C");
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipAsIsCVU1Program::addProgramQBufferDataToPacket(
|
void StapipAsIsCVU1Program::addProgramQBufferDataToPacket(
|
||||||
packet2_t* packet, StdpipQBuffer* qbuffer) const {
|
packet2_t* packet, StapipQBuffer* qbuffer) const {
|
||||||
u32 addr = VU1_VERT_DATA_ADDR;
|
u32 addr = VU1_VERT_DATA_ADDR;
|
||||||
|
|
||||||
// Add vertices
|
// Add vertices
|
||||||
+3
-3
@@ -13,14 +13,14 @@
|
|||||||
;---------------------------------------------------------------
|
;---------------------------------------------------------------
|
||||||
|
|
||||||
.syntax new
|
.syntax new
|
||||||
.name StdpipVU1As_Is_D
|
.name StapipVU1As_Is_D
|
||||||
.vu
|
.vu
|
||||||
.init_vf_all
|
.init_vf_all
|
||||||
.init_vi_all
|
.init_vi_all
|
||||||
|
|
||||||
#include "src/renderer/core/paths/path1/programs/vcl_sml.i"
|
#include "src/renderer/core/paths/path1/programs/vcl_sml.i"
|
||||||
#include "src/renderer/core/paths/path1/programs/tyra_macros.i"
|
#include "src/renderer/core/paths/path1/programs/tyra_macros.i"
|
||||||
#include "inc/renderer/3d/pipeline/std/core/path1/programs/stdpip_vu1_shared_defines.h"
|
#include "inc/renderer/3d/pipeline/static/core/programs/stapip_vu1_shared_defines.h"
|
||||||
|
|
||||||
#define RGBA_STORE_OFFSET 0
|
#define RGBA_STORE_OFFSET 0
|
||||||
#define XYZ2_STORE_OFFSET 1
|
#define XYZ2_STORE_OFFSET 1
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
--enter
|
--enter
|
||||||
--endenter
|
--endenter
|
||||||
|
|
||||||
#vuprog StdpipVU1AsIsD
|
#vuprog StapipVU1AsIsD
|
||||||
|
|
||||||
LoadTyraStaticData{ gifSetTag }
|
LoadTyraStaticData{ gifSetTag }
|
||||||
LoadTyraDirectionalLights{ lightMatrix, lightDirections, lightColors, ambientColor, VU1_LIGHTS_DIRS_ADDR, VU1_LIGHTS_COLORS_ADDR, VU1_LIGHTS_MATRIX_ADDR }
|
LoadTyraDirectionalLights{ lightMatrix, lightDirections, lightColors, ambientColor, VU1_LIGHTS_DIRS_ADDR, VU1_LIGHTS_COLORS_ADDR, VU1_LIGHTS_MATRIX_ADDR }
|
||||||
+10
-10
@@ -9,27 +9,27 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "debug/debug.hpp"
|
#include "debug/debug.hpp"
|
||||||
#include "renderer/3d/pipeline/std/core/path1/programs/as_is/stdpip_as_is_d_vu1_program.hpp"
|
#include "renderer/3d/pipeline/static/core/programs/as_is/stapip_as_is_d_vu1_program.hpp"
|
||||||
|
|
||||||
extern u32 StdpipVU1As_Is_D_CodeStart __attribute__((section(".vudata")));
|
extern u32 StapipVU1As_Is_D_CodeStart __attribute__((section(".vudata")));
|
||||||
extern u32 StdpipVU1As_Is_D_CodeEnd __attribute__((section(".vudata")));
|
extern u32 StapipVU1As_Is_D_CodeEnd __attribute__((section(".vudata")));
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
StdpipAsIsDVU1Program::StdpipAsIsDVU1Program()
|
StapipAsIsDVU1Program::StapipAsIsDVU1Program()
|
||||||
: StdpipVU1Program(StdpipAsIsDirLights, &StdpipVU1As_Is_D_CodeStart,
|
: StapipVU1Program(StapipAsIsDirLights, &StapipVU1As_Is_D_CodeStart,
|
||||||
&StdpipVU1As_Is_D_CodeEnd,
|
&StapipVU1As_Is_D_CodeEnd,
|
||||||
((u64)GIF_REG_RGBAQ) << 0 | ((u64)GIF_REG_XYZ2) << 4, 2,
|
((u64)GIF_REG_RGBAQ) << 0 | ((u64)GIF_REG_XYZ2) << 4, 2,
|
||||||
3) {}
|
3) {}
|
||||||
|
|
||||||
StdpipAsIsDVU1Program::~StdpipAsIsDVU1Program() {}
|
StapipAsIsDVU1Program::~StapipAsIsDVU1Program() {}
|
||||||
|
|
||||||
std::string StdpipAsIsDVU1Program::getStringName() const {
|
std::string StapipAsIsDVU1Program::getStringName() const {
|
||||||
return std::string("As is - LC");
|
return std::string("As is - LC");
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipAsIsDVU1Program::addProgramQBufferDataToPacket(
|
void StapipAsIsDVU1Program::addProgramQBufferDataToPacket(
|
||||||
packet2_t* packet, StdpipQBuffer* qbuffer) const {
|
packet2_t* packet, StapipQBuffer* qbuffer) const {
|
||||||
u32 addr = VU1_VERT_DATA_ADDR;
|
u32 addr = VU1_VERT_DATA_ADDR;
|
||||||
|
|
||||||
// Add vertices
|
// Add vertices
|
||||||
+3
-3
@@ -13,14 +13,14 @@
|
|||||||
;---------------------------------------------------------------
|
;---------------------------------------------------------------
|
||||||
|
|
||||||
.syntax new
|
.syntax new
|
||||||
.name StdpipVU1As_Is_TC
|
.name StapipVU1As_Is_TC
|
||||||
.vu
|
.vu
|
||||||
.init_vf_all
|
.init_vf_all
|
||||||
.init_vi_all
|
.init_vi_all
|
||||||
|
|
||||||
#include "src/renderer/core/paths/path1/programs/vcl_sml.i"
|
#include "src/renderer/core/paths/path1/programs/vcl_sml.i"
|
||||||
#include "src/renderer/core/paths/path1/programs/tyra_macros.i"
|
#include "src/renderer/core/paths/path1/programs/tyra_macros.i"
|
||||||
#include "inc/renderer/3d/pipeline/std/core/path1/programs/stdpip_vu1_shared_defines.h"
|
#include "inc/renderer/3d/pipeline/static/core/programs/stapip_vu1_shared_defines.h"
|
||||||
|
|
||||||
#define STQ_STORE_OFFSET 0
|
#define STQ_STORE_OFFSET 0
|
||||||
#define RGBA_STORE_OFFSET 1
|
#define RGBA_STORE_OFFSET 1
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
--enter
|
--enter
|
||||||
--endenter
|
--endenter
|
||||||
|
|
||||||
#vuprog StdpipVU1AsIsTC
|
#vuprog StapipVU1AsIsTC
|
||||||
|
|
||||||
LoadTyraStaticData{ gifSetTag }
|
LoadTyraStaticData{ gifSetTag }
|
||||||
LoadTyraSingleColor{ singleColor, singleColorEnabled, VU1_SINGLE_COLOR_ADDR, VU1_OPTIONS_ADDR }
|
LoadTyraSingleColor{ singleColor, singleColorEnabled, VU1_SINGLE_COLOR_ADDR, VU1_OPTIONS_ADDR }
|
||||||
+10
-10
@@ -9,28 +9,28 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "debug/debug.hpp"
|
#include "debug/debug.hpp"
|
||||||
#include "renderer/3d/pipeline/std/core/path1/programs/as_is/stdpip_as_is_tc_vu1_program.hpp"
|
#include "renderer/3d/pipeline/static/core/programs/as_is/stapip_as_is_tc_vu1_program.hpp"
|
||||||
|
|
||||||
extern u32 StdpipVU1As_Is_TC_CodeStart __attribute__((section(".vudata")));
|
extern u32 StapipVU1As_Is_TC_CodeStart __attribute__((section(".vudata")));
|
||||||
extern u32 StdpipVU1As_Is_TC_CodeEnd __attribute__((section(".vudata")));
|
extern u32 StapipVU1As_Is_TC_CodeEnd __attribute__((section(".vudata")));
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
StdpipAsIsTCVU1Program::StdpipAsIsTCVU1Program()
|
StapipAsIsTCVU1Program::StapipAsIsTCVU1Program()
|
||||||
: StdpipVU1Program(StdpipAsIsTextureColor, &StdpipVU1As_Is_TC_CodeStart,
|
: StapipVU1Program(StapipAsIsTextureColor, &StapipVU1As_Is_TC_CodeStart,
|
||||||
&StdpipVU1As_Is_TC_CodeEnd,
|
&StapipVU1As_Is_TC_CodeEnd,
|
||||||
((u64)GIF_REG_ST) << 0 | ((u64)GIF_REG_RGBAQ) << 4 |
|
((u64)GIF_REG_ST) << 0 | ((u64)GIF_REG_RGBAQ) << 4 |
|
||||||
((u64)GIF_REG_XYZ2) << 8,
|
((u64)GIF_REG_XYZ2) << 8,
|
||||||
3, 3) {}
|
3, 3) {}
|
||||||
|
|
||||||
StdpipAsIsTCVU1Program::~StdpipAsIsTCVU1Program() {}
|
StapipAsIsTCVU1Program::~StapipAsIsTCVU1Program() {}
|
||||||
|
|
||||||
std::string StdpipAsIsTCVU1Program::getStringName() const {
|
std::string StapipAsIsTCVU1Program::getStringName() const {
|
||||||
return std::string("As is - TC");
|
return std::string("As is - TC");
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipAsIsTCVU1Program::addProgramQBufferDataToPacket(
|
void StapipAsIsTCVU1Program::addProgramQBufferDataToPacket(
|
||||||
packet2_t* packet, StdpipQBuffer* qbuffer) const {
|
packet2_t* packet, StapipQBuffer* qbuffer) const {
|
||||||
u32 addr = VU1_VERT_DATA_ADDR;
|
u32 addr = VU1_VERT_DATA_ADDR;
|
||||||
|
|
||||||
// Add vertices
|
// Add vertices
|
||||||
+3
-3
@@ -13,14 +13,14 @@
|
|||||||
;---------------------------------------------------------------
|
;---------------------------------------------------------------
|
||||||
|
|
||||||
.syntax new
|
.syntax new
|
||||||
.name StdpipVU1As_Is_TD
|
.name StapipVU1As_Is_TD
|
||||||
.vu
|
.vu
|
||||||
.init_vf_all
|
.init_vf_all
|
||||||
.init_vi_all
|
.init_vi_all
|
||||||
|
|
||||||
#include "src/renderer/core/paths/path1/programs/vcl_sml.i"
|
#include "src/renderer/core/paths/path1/programs/vcl_sml.i"
|
||||||
#include "src/renderer/core/paths/path1/programs/tyra_macros.i"
|
#include "src/renderer/core/paths/path1/programs/tyra_macros.i"
|
||||||
#include "inc/renderer/3d/pipeline/std/core/path1/programs/stdpip_vu1_shared_defines.h"
|
#include "inc/renderer/3d/pipeline/static/core/programs/stapip_vu1_shared_defines.h"
|
||||||
|
|
||||||
#define STQ_STORE_OFFSET 0
|
#define STQ_STORE_OFFSET 0
|
||||||
#define RGBA_STORE_OFFSET 1
|
#define RGBA_STORE_OFFSET 1
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
--enter
|
--enter
|
||||||
--endenter
|
--endenter
|
||||||
|
|
||||||
#vuprog StdpipVU1AsIsTD
|
#vuprog StapipVU1AsIsTD
|
||||||
|
|
||||||
LoadTyraStaticData{ gifSetTag }
|
LoadTyraStaticData{ gifSetTag }
|
||||||
LoadTyraDirectionalLights{ lightMatrix, lightDirections, lightColors, ambientColor, VU1_LIGHTS_DIRS_ADDR, VU1_LIGHTS_COLORS_ADDR, VU1_LIGHTS_MATRIX_ADDR }
|
LoadTyraDirectionalLights{ lightMatrix, lightDirections, lightColors, ambientColor, VU1_LIGHTS_DIRS_ADDR, VU1_LIGHTS_COLORS_ADDR, VU1_LIGHTS_MATRIX_ADDR }
|
||||||
+10
-10
@@ -9,28 +9,28 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "debug/debug.hpp"
|
#include "debug/debug.hpp"
|
||||||
#include "renderer/3d/pipeline/std/core/path1/programs/as_is/stdpip_as_is_td_vu1_program.hpp"
|
#include "renderer/3d/pipeline/static/core/programs/as_is/stapip_as_is_td_vu1_program.hpp"
|
||||||
|
|
||||||
extern u32 StdpipVU1As_Is_TD_CodeStart __attribute__((section(".vudata")));
|
extern u32 StapipVU1As_Is_TD_CodeStart __attribute__((section(".vudata")));
|
||||||
extern u32 StdpipVU1As_Is_TD_CodeEnd __attribute__((section(".vudata")));
|
extern u32 StapipVU1As_Is_TD_CodeEnd __attribute__((section(".vudata")));
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
StdpipAsIsTDVU1Program::StdpipAsIsTDVU1Program()
|
StapipAsIsTDVU1Program::StapipAsIsTDVU1Program()
|
||||||
: StdpipVU1Program(StdpipAsIsTextureDirLights, &StdpipVU1As_Is_TD_CodeStart,
|
: StapipVU1Program(StapipAsIsTextureDirLights, &StapipVU1As_Is_TD_CodeStart,
|
||||||
&StdpipVU1As_Is_TD_CodeEnd,
|
&StapipVU1As_Is_TD_CodeEnd,
|
||||||
((u64)GIF_REG_ST) << 0 | ((u64)GIF_REG_RGBAQ) << 4 |
|
((u64)GIF_REG_ST) << 0 | ((u64)GIF_REG_RGBAQ) << 4 |
|
||||||
((u64)GIF_REG_XYZ2) << 8,
|
((u64)GIF_REG_XYZ2) << 8,
|
||||||
3, 4) {}
|
3, 4) {}
|
||||||
|
|
||||||
StdpipAsIsTDVU1Program::~StdpipAsIsTDVU1Program() {}
|
StapipAsIsTDVU1Program::~StapipAsIsTDVU1Program() {}
|
||||||
|
|
||||||
std::string StdpipAsIsTDVU1Program::getStringName() const {
|
std::string StapipAsIsTDVU1Program::getStringName() const {
|
||||||
return std::string("As is - LTC");
|
return std::string("As is - LTC");
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipAsIsTDVU1Program::addProgramQBufferDataToPacket(
|
void StapipAsIsTDVU1Program::addProgramQBufferDataToPacket(
|
||||||
packet2_t* packet, StdpipQBuffer* qbuffer) const {
|
packet2_t* packet, StapipQBuffer* qbuffer) const {
|
||||||
u32 addr = VU1_VERT_DATA_ADDR;
|
u32 addr = VU1_VERT_DATA_ADDR;
|
||||||
|
|
||||||
// Add vertices
|
// Add vertices
|
||||||
+3
-3
@@ -13,14 +13,14 @@
|
|||||||
;---------------------------------------------------------------
|
;---------------------------------------------------------------
|
||||||
|
|
||||||
.syntax new
|
.syntax new
|
||||||
.name StdpipVU1Cull_C
|
.name StapipVU1Cull_C
|
||||||
.vu
|
.vu
|
||||||
.init_vf_all
|
.init_vf_all
|
||||||
.init_vi_all
|
.init_vi_all
|
||||||
|
|
||||||
#include "src/renderer/core/paths/path1/programs/vcl_sml.i"
|
#include "src/renderer/core/paths/path1/programs/vcl_sml.i"
|
||||||
#include "src/renderer/core/paths/path1/programs/tyra_macros.i"
|
#include "src/renderer/core/paths/path1/programs/tyra_macros.i"
|
||||||
#include "inc/renderer/3d/pipeline/std/core/path1/programs/stdpip_vu1_shared_defines.h"
|
#include "inc/renderer/3d/pipeline/static/core/programs/stapip_vu1_shared_defines.h"
|
||||||
|
|
||||||
#define RGBA_STORE_OFFSET 0
|
#define RGBA_STORE_OFFSET 0
|
||||||
#define XYZ2_STORE_OFFSET 1
|
#define XYZ2_STORE_OFFSET 1
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
--enter
|
--enter
|
||||||
--endenter
|
--endenter
|
||||||
|
|
||||||
#vuprog StdpipVU1CullC
|
#vuprog StapipVU1CullC
|
||||||
|
|
||||||
ResetClipFlags{ }
|
ResetClipFlags{ }
|
||||||
LoadTyraStaticData{ gifSetTag }
|
LoadTyraStaticData{ gifSetTag }
|
||||||
+10
-10
@@ -9,26 +9,26 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "debug/debug.hpp"
|
#include "debug/debug.hpp"
|
||||||
#include "renderer/3d/pipeline/std/core/path1/programs/cull/stdpip_cull_c_vu1_program.hpp"
|
#include "renderer/3d/pipeline/static/core/programs/cull/stapip_cull_c_vu1_program.hpp"
|
||||||
|
|
||||||
extern u32 StdpipVU1Cull_C_CodeStart __attribute__((section(".vudata")));
|
extern u32 StapipVU1Cull_C_CodeStart __attribute__((section(".vudata")));
|
||||||
extern u32 StdpipVU1Cull_C_CodeEnd __attribute__((section(".vudata")));
|
extern u32 StapipVU1Cull_C_CodeEnd __attribute__((section(".vudata")));
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
StdpipCullCVU1Program::StdpipCullCVU1Program()
|
StapipCullCVU1Program::StapipCullCVU1Program()
|
||||||
: StdpipVU1Program(
|
: StapipVU1Program(
|
||||||
StdpipCullColor, &StdpipVU1Cull_C_CodeStart, &StdpipVU1Cull_C_CodeEnd,
|
StapipCullColor, &StapipVU1Cull_C_CodeStart, &StapipVU1Cull_C_CodeEnd,
|
||||||
((u64)GIF_REG_RGBAQ) << 0 | ((u64)GIF_REG_XYZ2) << 4, 2, 2) {}
|
((u64)GIF_REG_RGBAQ) << 0 | ((u64)GIF_REG_XYZ2) << 4, 2, 2) {}
|
||||||
|
|
||||||
StdpipCullCVU1Program::~StdpipCullCVU1Program() {}
|
StapipCullCVU1Program::~StapipCullCVU1Program() {}
|
||||||
|
|
||||||
std::string StdpipCullCVU1Program::getStringName() const {
|
std::string StapipCullCVU1Program::getStringName() const {
|
||||||
return std::string("Cull - C");
|
return std::string("Cull - C");
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipCullCVU1Program::addProgramQBufferDataToPacket(
|
void StapipCullCVU1Program::addProgramQBufferDataToPacket(
|
||||||
packet2_t* packet, StdpipQBuffer* qbuffer) const {
|
packet2_t* packet, StapipQBuffer* qbuffer) const {
|
||||||
u32 addr = VU1_VERT_DATA_ADDR;
|
u32 addr = VU1_VERT_DATA_ADDR;
|
||||||
|
|
||||||
// Add vertices
|
// Add vertices
|
||||||
+3
-3
@@ -13,14 +13,14 @@
|
|||||||
;---------------------------------------------------------------
|
;---------------------------------------------------------------
|
||||||
|
|
||||||
.syntax new
|
.syntax new
|
||||||
.name StdpipVU1Cull_D
|
.name StapipVU1Cull_D
|
||||||
.vu
|
.vu
|
||||||
.init_vf_all
|
.init_vf_all
|
||||||
.init_vi_all
|
.init_vi_all
|
||||||
|
|
||||||
#include "src/renderer/core/paths/path1/programs/vcl_sml.i"
|
#include "src/renderer/core/paths/path1/programs/vcl_sml.i"
|
||||||
#include "src/renderer/core/paths/path1/programs/tyra_macros.i"
|
#include "src/renderer/core/paths/path1/programs/tyra_macros.i"
|
||||||
#include "inc/renderer/3d/pipeline/std/core/path1/programs/stdpip_vu1_shared_defines.h"
|
#include "inc/renderer/3d/pipeline/static/core/programs/stapip_vu1_shared_defines.h"
|
||||||
|
|
||||||
#define RGBA_STORE_OFFSET 0
|
#define RGBA_STORE_OFFSET 0
|
||||||
#define XYZ2_STORE_OFFSET 1
|
#define XYZ2_STORE_OFFSET 1
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
--enter
|
--enter
|
||||||
--endenter
|
--endenter
|
||||||
|
|
||||||
#vuprog StdpipVU1CullD
|
#vuprog StapipVU1CullD
|
||||||
|
|
||||||
ResetClipFlags{ }
|
ResetClipFlags{ }
|
||||||
LoadTyraStaticData{ gifSetTag }
|
LoadTyraStaticData{ gifSetTag }
|
||||||
+10
-10
@@ -9,27 +9,27 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "debug/debug.hpp"
|
#include "debug/debug.hpp"
|
||||||
#include "renderer/3d/pipeline/std/core/path1/programs/cull/stdpip_cull_d_vu1_program.hpp"
|
#include "renderer/3d/pipeline/static/core/programs/cull/stapip_cull_d_vu1_program.hpp"
|
||||||
|
|
||||||
extern u32 StdpipVU1Cull_D_CodeStart __attribute__((section(".vudata")));
|
extern u32 StapipVU1Cull_D_CodeStart __attribute__((section(".vudata")));
|
||||||
extern u32 StdpipVU1Cull_D_CodeEnd __attribute__((section(".vudata")));
|
extern u32 StapipVU1Cull_D_CodeEnd __attribute__((section(".vudata")));
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
StdpipCullDVU1Program::StdpipCullDVU1Program()
|
StapipCullDVU1Program::StapipCullDVU1Program()
|
||||||
: StdpipVU1Program(StdpipCullDirLights, &StdpipVU1Cull_D_CodeStart,
|
: StapipVU1Program(StapipCullDirLights, &StapipVU1Cull_D_CodeStart,
|
||||||
&StdpipVU1Cull_D_CodeEnd,
|
&StapipVU1Cull_D_CodeEnd,
|
||||||
((u64)GIF_REG_RGBAQ) << 0 | ((u64)GIF_REG_XYZ2) << 4, 2,
|
((u64)GIF_REG_RGBAQ) << 0 | ((u64)GIF_REG_XYZ2) << 4, 2,
|
||||||
3) {}
|
3) {}
|
||||||
|
|
||||||
StdpipCullDVU1Program::~StdpipCullDVU1Program() {}
|
StapipCullDVU1Program::~StapipCullDVU1Program() {}
|
||||||
|
|
||||||
std::string StdpipCullDVU1Program::getStringName() const {
|
std::string StapipCullDVU1Program::getStringName() const {
|
||||||
return std::string("Cull - LC");
|
return std::string("Cull - LC");
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipCullDVU1Program::addProgramQBufferDataToPacket(
|
void StapipCullDVU1Program::addProgramQBufferDataToPacket(
|
||||||
packet2_t* packet, StdpipQBuffer* qbuffer) const {
|
packet2_t* packet, StapipQBuffer* qbuffer) const {
|
||||||
u32 addr = VU1_VERT_DATA_ADDR;
|
u32 addr = VU1_VERT_DATA_ADDR;
|
||||||
|
|
||||||
// Add vertices
|
// Add vertices
|
||||||
+3
-3
@@ -13,14 +13,14 @@
|
|||||||
;---------------------------------------------------------------
|
;---------------------------------------------------------------
|
||||||
|
|
||||||
.syntax new
|
.syntax new
|
||||||
.name StdpipVU1Cull_TC
|
.name StapipVU1Cull_TC
|
||||||
.vu
|
.vu
|
||||||
.init_vf_all
|
.init_vf_all
|
||||||
.init_vi_all
|
.init_vi_all
|
||||||
|
|
||||||
#include "src/renderer/core/paths/path1/programs/vcl_sml.i"
|
#include "src/renderer/core/paths/path1/programs/vcl_sml.i"
|
||||||
#include "src/renderer/core/paths/path1/programs/tyra_macros.i"
|
#include "src/renderer/core/paths/path1/programs/tyra_macros.i"
|
||||||
#include "inc/renderer/3d/pipeline/std/core/path1/programs/stdpip_vu1_shared_defines.h"
|
#include "inc/renderer/3d/pipeline/static/core/programs/stapip_vu1_shared_defines.h"
|
||||||
|
|
||||||
#define STQ_STORE_OFFSET 0
|
#define STQ_STORE_OFFSET 0
|
||||||
#define RGBA_STORE_OFFSET 1
|
#define RGBA_STORE_OFFSET 1
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
--enter
|
--enter
|
||||||
--endenter
|
--endenter
|
||||||
|
|
||||||
#vuprog StdpipVU1CullTC
|
#vuprog StapipVU1CullTC
|
||||||
|
|
||||||
ResetClipFlags{ }
|
ResetClipFlags{ }
|
||||||
LoadTyraStaticData{ gifSetTag }
|
LoadTyraStaticData{ gifSetTag }
|
||||||
+10
-10
@@ -9,28 +9,28 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "debug/debug.hpp"
|
#include "debug/debug.hpp"
|
||||||
#include "renderer/3d/pipeline/std/core/path1/programs/cull/stdpip_cull_tc_vu1_program.hpp"
|
#include "renderer/3d/pipeline/static/core/programs/cull/stapip_cull_tc_vu1_program.hpp"
|
||||||
|
|
||||||
extern u32 StdpipVU1Cull_TC_CodeStart __attribute__((section(".vudata")));
|
extern u32 StapipVU1Cull_TC_CodeStart __attribute__((section(".vudata")));
|
||||||
extern u32 StdpipVU1Cull_TC_CodeEnd __attribute__((section(".vudata")));
|
extern u32 StapipVU1Cull_TC_CodeEnd __attribute__((section(".vudata")));
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
StdpipCullTCVU1Program::StdpipCullTCVU1Program()
|
StapipCullTCVU1Program::StapipCullTCVU1Program()
|
||||||
: StdpipVU1Program(StdpipCullTextureColor, &StdpipVU1Cull_TC_CodeStart,
|
: StapipVU1Program(StapipCullTextureColor, &StapipVU1Cull_TC_CodeStart,
|
||||||
&StdpipVU1Cull_TC_CodeEnd,
|
&StapipVU1Cull_TC_CodeEnd,
|
||||||
((u64)GIF_REG_ST) << 0 | ((u64)GIF_REG_RGBAQ) << 4 |
|
((u64)GIF_REG_ST) << 0 | ((u64)GIF_REG_RGBAQ) << 4 |
|
||||||
((u64)GIF_REG_XYZ2) << 8,
|
((u64)GIF_REG_XYZ2) << 8,
|
||||||
3, 3) {}
|
3, 3) {}
|
||||||
|
|
||||||
StdpipCullTCVU1Program::~StdpipCullTCVU1Program() {}
|
StapipCullTCVU1Program::~StapipCullTCVU1Program() {}
|
||||||
|
|
||||||
std::string StdpipCullTCVU1Program::getStringName() const {
|
std::string StapipCullTCVU1Program::getStringName() const {
|
||||||
return std::string("Cull - TC");
|
return std::string("Cull - TC");
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipCullTCVU1Program::addProgramQBufferDataToPacket(
|
void StapipCullTCVU1Program::addProgramQBufferDataToPacket(
|
||||||
packet2_t* packet, StdpipQBuffer* qbuffer) const {
|
packet2_t* packet, StapipQBuffer* qbuffer) const {
|
||||||
u32 addr = VU1_VERT_DATA_ADDR;
|
u32 addr = VU1_VERT_DATA_ADDR;
|
||||||
|
|
||||||
// Add vertices
|
// Add vertices
|
||||||
+3
-3
@@ -13,14 +13,14 @@
|
|||||||
;---------------------------------------------------------------
|
;---------------------------------------------------------------
|
||||||
|
|
||||||
.syntax new
|
.syntax new
|
||||||
.name StdpipVU1Cull_TD
|
.name StapipVU1Cull_TD
|
||||||
.vu
|
.vu
|
||||||
.init_vf_all
|
.init_vf_all
|
||||||
.init_vi_all
|
.init_vi_all
|
||||||
|
|
||||||
#include "src/renderer/core/paths/path1/programs/vcl_sml.i"
|
#include "src/renderer/core/paths/path1/programs/vcl_sml.i"
|
||||||
#include "src/renderer/core/paths/path1/programs/tyra_macros.i"
|
#include "src/renderer/core/paths/path1/programs/tyra_macros.i"
|
||||||
#include "inc/renderer/3d/pipeline/std/core/path1/programs/stdpip_vu1_shared_defines.h"
|
#include "inc/renderer/3d/pipeline/static/core/programs/stapip_vu1_shared_defines.h"
|
||||||
|
|
||||||
#define STQ_STORE_OFFSET 0
|
#define STQ_STORE_OFFSET 0
|
||||||
#define RGBA_STORE_OFFSET 1
|
#define RGBA_STORE_OFFSET 1
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
--enter
|
--enter
|
||||||
--endenter
|
--endenter
|
||||||
|
|
||||||
#vuprog StdpipVU1CullTD
|
#vuprog StapipVU1CullTD
|
||||||
|
|
||||||
ResetClipFlags{ }
|
ResetClipFlags{ }
|
||||||
LoadTyraStaticData{ gifSetTag }
|
LoadTyraStaticData{ gifSetTag }
|
||||||
+10
-10
@@ -9,28 +9,28 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "debug/debug.hpp"
|
#include "debug/debug.hpp"
|
||||||
#include "renderer/3d/pipeline/std/core/path1/programs/cull/stdpip_cull_td_vu1_program.hpp"
|
#include "renderer/3d/pipeline/static/core/programs/cull/stapip_cull_td_vu1_program.hpp"
|
||||||
|
|
||||||
extern u32 StdpipVU1Cull_TD_CodeStart __attribute__((section(".vudata")));
|
extern u32 StapipVU1Cull_TD_CodeStart __attribute__((section(".vudata")));
|
||||||
extern u32 StdpipVU1Cull_TD_CodeEnd __attribute__((section(".vudata")));
|
extern u32 StapipVU1Cull_TD_CodeEnd __attribute__((section(".vudata")));
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
StdpipCullTDVU1Program::StdpipCullTDVU1Program()
|
StapipCullTDVU1Program::StapipCullTDVU1Program()
|
||||||
: StdpipVU1Program(StdpipCullTextureDirLights, &StdpipVU1Cull_TD_CodeStart,
|
: StapipVU1Program(StapipCullTextureDirLights, &StapipVU1Cull_TD_CodeStart,
|
||||||
&StdpipVU1Cull_TD_CodeEnd,
|
&StapipVU1Cull_TD_CodeEnd,
|
||||||
((u64)GIF_REG_ST) << 0 | ((u64)GIF_REG_RGBAQ) << 4 |
|
((u64)GIF_REG_ST) << 0 | ((u64)GIF_REG_RGBAQ) << 4 |
|
||||||
((u64)GIF_REG_XYZ2) << 8,
|
((u64)GIF_REG_XYZ2) << 8,
|
||||||
3, 4) {}
|
3, 4) {}
|
||||||
|
|
||||||
StdpipCullTDVU1Program::~StdpipCullTDVU1Program() {}
|
StapipCullTDVU1Program::~StapipCullTDVU1Program() {}
|
||||||
|
|
||||||
std::string StdpipCullTDVU1Program::getStringName() const {
|
std::string StapipCullTDVU1Program::getStringName() const {
|
||||||
return std::string("Cull - LTC");
|
return std::string("Cull - LTC");
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipCullTDVU1Program::addProgramQBufferDataToPacket(
|
void StapipCullTDVU1Program::addProgramQBufferDataToPacket(
|
||||||
packet2_t* packet, StdpipQBuffer* qbuffer) const {
|
packet2_t* packet, StapipQBuffer* qbuffer) const {
|
||||||
u32 addr = VU1_VERT_DATA_ADDR;
|
u32 addr = VU1_VERT_DATA_ADDR;
|
||||||
|
|
||||||
// Add vertices
|
// Add vertices
|
||||||
+10
-10
@@ -8,22 +8,22 @@
|
|||||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "renderer/3d/pipeline/std/core/path1/stdpip_clipper.hpp"
|
#include "renderer/3d/pipeline/static/core/stapip_clipper.hpp"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
StdpipClipper::StdpipClipper() {}
|
StapipClipper::StapipClipper() {}
|
||||||
StdpipClipper::~StdpipClipper() {}
|
StapipClipper::~StapipClipper() {}
|
||||||
|
|
||||||
void StdpipClipper::setMVP(M4x4* t_mvp) { mvp = t_mvp; }
|
void StapipClipper::setMVP(M4x4* t_mvp) { mvp = t_mvp; }
|
||||||
|
|
||||||
void StdpipClipper::init(const RendererSettings& settings) {
|
void StapipClipper::init(const RendererSettings& settings) {
|
||||||
algorithm.init(settings);
|
algorithm.init(settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipClipper::setMaxVertCount(const u32& count) { maxVertCount = count; }
|
void StapipClipper::setMaxVertCount(const u32& count) { maxVertCount = count; }
|
||||||
|
|
||||||
void StdpipClipper::clip(StdpipQBuffer* buffer) {
|
void StapipClipper::clip(StapipQBuffer* buffer) {
|
||||||
TYRA_ASSERT(buffer->size <= maxVertCount / 3, "Buffer should have max ",
|
TYRA_ASSERT(buffer->size <= maxVertCount / 3, "Buffer should have max ",
|
||||||
maxVertCount / 3, " verts if we want to clip it.");
|
maxVertCount / 3, " verts if we want to clip it.");
|
||||||
|
|
||||||
@@ -64,14 +64,14 @@ void StdpipClipper::clip(StdpipQBuffer* buffer) {
|
|||||||
moveDataToBuffer(clippedVertices, buffer);
|
moveDataToBuffer(clippedVertices, buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipClipper::perspectiveDivide(std::vector<Path1ClipVertex>* vertices) {
|
void StapipClipper::perspectiveDivide(std::vector<Path1ClipVertex>* vertices) {
|
||||||
for (u32 i = 0; i < vertices->size(); i++) {
|
for (u32 i = 0; i < vertices->size(); i++) {
|
||||||
(*vertices)[i].position /= (*vertices)[i].position.w;
|
(*vertices)[i].position /= (*vertices)[i].position.w;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipClipper::moveDataToBuffer(
|
void StapipClipper::moveDataToBuffer(
|
||||||
const std::vector<Path1ClipVertex>& vertices, StdpipQBuffer* buffer) {
|
const std::vector<Path1ClipVertex>& vertices, StapipQBuffer* buffer) {
|
||||||
buffer->reallocateManually(vertices.size());
|
buffer->reallocateManually(vertices.size());
|
||||||
|
|
||||||
for (u32 i = 0; i < vertices.size(); i++) {
|
for (u32 i = 0; i < vertices.size(); i++) {
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
# ______ ____ ___
|
||||||
|
# | \/ ____| |___|
|
||||||
|
# | | | \ | |
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
# Copyright 2022, tyra - https://github.com/h4570/tyra
|
||||||
|
# Licenced under Apache License 2.0
|
||||||
|
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "renderer/3d/pipeline/static/core/stapip_programs_repository.hpp"
|
||||||
|
|
||||||
|
namespace Tyra {
|
||||||
|
|
||||||
|
StapipProgramsRepository::StapipProgramsRepository() {}
|
||||||
|
|
||||||
|
StapipProgramsRepository::~StapipProgramsRepository() {}
|
||||||
|
|
||||||
|
StapipVU1Program* StapipProgramsRepository::getProgram(
|
||||||
|
const StapipProgramName& name) {
|
||||||
|
switch (name) {
|
||||||
|
case StapipProgramName::StapipAsIsColor:
|
||||||
|
return &asIsColor;
|
||||||
|
case StapipProgramName::StapipCullColor:
|
||||||
|
return &cullColor;
|
||||||
|
|
||||||
|
case StapipProgramName::StapipAsIsDirLights:
|
||||||
|
return &asIsLightingColor;
|
||||||
|
case StapipProgramName::StapipCullDirLights:
|
||||||
|
return &cullLightingColor;
|
||||||
|
|
||||||
|
case StapipProgramName::StapipAsIsTextureDirLights:
|
||||||
|
return &asIsLightingTextureColor;
|
||||||
|
case StapipProgramName::StapipCullTextureDirLights:
|
||||||
|
return &cullLightingTextureColor;
|
||||||
|
|
||||||
|
case StapipProgramName::StapipAsIsTextureColor:
|
||||||
|
return &asIsTextureColor;
|
||||||
|
case StapipProgramName::StapipCullTextureColor:
|
||||||
|
return &cullTextureColor;
|
||||||
|
|
||||||
|
default:
|
||||||
|
TYRA_TRAP("Unknown VU1 program name");
|
||||||
|
return &cullLightingTextureColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Tyra
|
||||||
+18
-18
@@ -8,11 +8,11 @@
|
|||||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "renderer/3d/pipeline/std/core/path1/stdpip_qbuffer.hpp"
|
#include "renderer/3d/pipeline/static/core/stapip_qbuffer.hpp"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
StdpipQBuffer::StdpipQBuffer() {
|
StapipQBuffer::StapipQBuffer() {
|
||||||
size = 0;
|
size = 0;
|
||||||
_isDynamicallyAllocated = false;
|
_isDynamicallyAllocated = false;
|
||||||
_stAllocated = false;
|
_stAllocated = false;
|
||||||
@@ -25,11 +25,11 @@ StdpipQBuffer::StdpipQBuffer() {
|
|||||||
normals = nullptr;
|
normals = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
StdpipQBuffer::~StdpipQBuffer() { deallocateDynamicData(); }
|
StapipQBuffer::~StapipQBuffer() { deallocateDynamicData(); }
|
||||||
|
|
||||||
void StdpipQBuffer::setMaxVertCount(const u32& count) { maxVertCount = count; }
|
void StapipQBuffer::setMaxVertCount(const u32& count) { maxVertCount = count; }
|
||||||
|
|
||||||
void StdpipQBuffer::fillByPointer(const StdpipBagPackage& pkg) {
|
void StapipQBuffer::fillByPointer(const StapipBagPackage& pkg) {
|
||||||
TYRA_ASSERT(pkg.size <= maxVertCount, "VU1 buffer supports only ",
|
TYRA_ASSERT(pkg.size <= maxVertCount, "VU1 buffer supports only ",
|
||||||
maxVertCount, " verts. Provided: ", pkg.size);
|
maxVertCount, " verts. Provided: ", pkg.size);
|
||||||
|
|
||||||
@@ -43,9 +43,9 @@ void StdpipQBuffer::fillByPointer(const StdpipBagPackage& pkg) {
|
|||||||
bag = pkg.bag;
|
bag = pkg.bag;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipQBuffer::fillByCopyMax(const StdpipBagPackage& pkg1,
|
void StapipQBuffer::fillByCopyMax(const StapipBagPackage& pkg1,
|
||||||
const StdpipBagPackage& pkg2,
|
const StapipBagPackage& pkg2,
|
||||||
const StdpipBagPackage& pkg3) {
|
const StapipBagPackage& pkg3) {
|
||||||
TYRA_ASSERT(pkg1.size <= maxVertCount / 3,
|
TYRA_ASSERT(pkg1.size <= maxVertCount / 3,
|
||||||
"Wrong package size (1). Provided: ", pkg1.size);
|
"Wrong package size (1). Provided: ", pkg1.size);
|
||||||
TYRA_ASSERT(pkg2.size <= maxVertCount / 3,
|
TYRA_ASSERT(pkg2.size <= maxVertCount / 3,
|
||||||
@@ -95,8 +95,8 @@ void StdpipQBuffer::fillByCopyMax(const StdpipBagPackage& pkg1,
|
|||||||
bag = pkg1.bag;
|
bag = pkg1.bag;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipQBuffer::fillByCopy1By2(const StdpipBagPackage& pkg1,
|
void StapipQBuffer::fillByCopy1By2(const StapipBagPackage& pkg1,
|
||||||
const StdpipBagPackage& pkg2) {
|
const StapipBagPackage& pkg2) {
|
||||||
TYRA_ASSERT(pkg1.size <= maxVertCount / 3,
|
TYRA_ASSERT(pkg1.size <= maxVertCount / 3,
|
||||||
"Wrong package size (1). Provided: ", pkg1.size);
|
"Wrong package size (1). Provided: ", pkg1.size);
|
||||||
TYRA_ASSERT(pkg2.size <= maxVertCount / 3,
|
TYRA_ASSERT(pkg2.size <= maxVertCount / 3,
|
||||||
@@ -131,7 +131,7 @@ void StdpipQBuffer::fillByCopy1By2(const StdpipBagPackage& pkg1,
|
|||||||
bag = pkg1.bag;
|
bag = pkg1.bag;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipQBuffer::fillByCopy1By3(const StdpipBagPackage& pkg) {
|
void StapipQBuffer::fillByCopy1By3(const StapipBagPackage& pkg) {
|
||||||
TYRA_ASSERT(pkg.size <= maxVertCount / 3,
|
TYRA_ASSERT(pkg.size <= maxVertCount / 3,
|
||||||
"Wrong package size (1). Provided: ", pkg.size);
|
"Wrong package size (1). Provided: ", pkg.size);
|
||||||
|
|
||||||
@@ -153,13 +153,13 @@ void StdpipQBuffer::fillByCopy1By3(const StdpipBagPackage& pkg) {
|
|||||||
bag = pkg.bag;
|
bag = pkg.bag;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipQBuffer::reallocateManually(const u16& t_size) {
|
void StapipQBuffer::reallocateManually(const u16& t_size) {
|
||||||
deallocateDynamicData();
|
deallocateDynamicData();
|
||||||
allocateDynamicData(t_size, bag);
|
allocateDynamicData(t_size, bag);
|
||||||
size = t_size;
|
size = t_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipQBuffer::deallocateDynamicData() {
|
void StapipQBuffer::deallocateDynamicData() {
|
||||||
if (_isDynamicallyAllocated) {
|
if (_isDynamicallyAllocated) {
|
||||||
delete[] vertices;
|
delete[] vertices;
|
||||||
|
|
||||||
@@ -184,7 +184,7 @@ void StdpipQBuffer::deallocateDynamicData() {
|
|||||||
|
|
||||||
/** When we not receive maxVertCount vertices, we must align it by ourself.
|
/** When we not receive maxVertCount vertices, we must align it by ourself.
|
||||||
* Too bad - not efficient. */
|
* Too bad - not efficient. */
|
||||||
void StdpipQBuffer::allocateDynamicData(u16 size, StdpipBag* bag) {
|
void StapipQBuffer::allocateDynamicData(u16 size, StapipBag* bag) {
|
||||||
TYRA_ASSERT(size <= maxVertCount, "Wrong size. Max buffer size in VU1 is ",
|
TYRA_ASSERT(size <= maxVertCount, "Wrong size. Max buffer size in VU1 is ",
|
||||||
maxVertCount, ". Provided: ", size);
|
maxVertCount, ". Provided: ", size);
|
||||||
TYRA_ASSERT(!_isDynamicallyAllocated, "Buffer is already allocated");
|
TYRA_ASSERT(!_isDynamicallyAllocated, "Buffer is already allocated");
|
||||||
@@ -209,19 +209,19 @@ void StdpipQBuffer::allocateDynamicData(u16 size, StdpipBag* bag) {
|
|||||||
_isDynamicallyAllocated = true;
|
_isDynamicallyAllocated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool StdpipQBuffer::any() const { return size > 0; }
|
bool StapipQBuffer::any() const { return size > 0; }
|
||||||
|
|
||||||
void StdpipQBuffer::print() const {
|
void StapipQBuffer::print() const {
|
||||||
auto text = getPrint(nullptr);
|
auto text = getPrint(nullptr);
|
||||||
printf("%s\n", text.c_str());
|
printf("%s\n", text.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipQBuffer::print(const char* name) const {
|
void StapipQBuffer::print(const char* name) const {
|
||||||
auto text = getPrint(name);
|
auto text = getPrint(name);
|
||||||
printf("%s\n", text.c_str());
|
printf("%s\n", text.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string StdpipQBuffer::getPrint(const char* name) const {
|
std::string StapipQBuffer::getPrint(const char* name) const {
|
||||||
std::stringstream res;
|
std::stringstream res;
|
||||||
if (name) {
|
if (name) {
|
||||||
res << name << "(";
|
res << name << "(";
|
||||||
+61
-61
@@ -8,8 +8,8 @@
|
|||||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "renderer/3d/pipeline/std/core/path1/stdpip_qbuffer_renderer.hpp"
|
#include "renderer/3d/pipeline/static/core/stapip_qbuffer_renderer.hpp"
|
||||||
#include "renderer/3d/pipeline/std/core/path1/programs/stdpip_vu1_shared_defines.h"
|
#include "renderer/3d/pipeline/static/core/programs/stapip_vu1_shared_defines.h"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
@@ -34,14 +34,14 @@ namespace Tyra {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
StdpipQBufferRenderer::StdpipQBufferRenderer() {
|
StapipQBufferRenderer::StapipQBufferRenderer() {
|
||||||
context = 0;
|
context = 0;
|
||||||
lastProgramName = StdipUndefinedProgram;
|
lastProgramName = StdipUndefinedProgram;
|
||||||
staticDataPacket = packet2_create(3, P2_TYPE_NORMAL, P2_MODE_CHAIN, true);
|
staticDataPacket = packet2_create(3, P2_TYPE_NORMAL, P2_MODE_CHAIN, true);
|
||||||
objectDataPacket = packet2_create(16, P2_TYPE_NORMAL, P2_MODE_CHAIN, true);
|
objectDataPacket = packet2_create(16, P2_TYPE_NORMAL, P2_MODE_CHAIN, true);
|
||||||
programsPacket = nullptr;
|
programsPacket = nullptr;
|
||||||
}
|
}
|
||||||
StdpipQBufferRenderer::~StdpipQBufferRenderer() {
|
StapipQBufferRenderer::~StapipQBufferRenderer() {
|
||||||
packet2_free(packets[0]);
|
packet2_free(packets[0]);
|
||||||
packet2_free(packets[1]);
|
packet2_free(packets[1]);
|
||||||
packet2_free(staticDataPacket);
|
packet2_free(staticDataPacket);
|
||||||
@@ -50,7 +50,7 @@ StdpipQBufferRenderer::~StdpipQBufferRenderer() {
|
|||||||
if (programsPacket) packet2_free(programsPacket);
|
if (programsPacket) packet2_free(programsPacket);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipQBufferRenderer::init(RendererCore* t_core) {
|
void StapipQBufferRenderer::init(RendererCore* t_core) {
|
||||||
path1 = t_core->getPath1();
|
path1 = t_core->getPath1();
|
||||||
clipper.init(t_core->getSettings());
|
clipper.init(t_core->getSettings());
|
||||||
rendererCore = t_core;
|
rendererCore = t_core;
|
||||||
@@ -73,16 +73,16 @@ void StdpipQBufferRenderer::init(RendererCore* t_core) {
|
|||||||
TYRA_LOG("Renderer3DQBufferRenderer initialized");
|
TYRA_LOG("Renderer3DQBufferRenderer initialized");
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipQBufferRenderer::reinitVU1() {
|
void StapipQBufferRenderer::reinitVU1() {
|
||||||
sendStaticData();
|
sendStaticData();
|
||||||
uploadPrograms();
|
uploadPrograms();
|
||||||
setDoubleBuffer();
|
setDoubleBuffer();
|
||||||
}
|
}
|
||||||
|
|
||||||
StdpipQBuffer* StdpipQBufferRenderer::getBuffer() { return &buffers[context]; }
|
StapipQBuffer* StapipQBufferRenderer::getBuffer() { return &buffers[context]; }
|
||||||
|
|
||||||
void StdpipQBufferRenderer::sendObjectData(
|
void StapipQBufferRenderer::sendObjectData(
|
||||||
StdpipBag* bag, M4x4* mvp, RendererCoreTextureBuffers* texBuffers) const {
|
StapipBag* bag, M4x4* mvp, RendererCoreTextureBuffers* texBuffers) const {
|
||||||
packet2_reset(objectDataPacket, false);
|
packet2_reset(objectDataPacket, false);
|
||||||
packet2_utils_vu_add_unpack_data(objectDataPacket, VU1_MVP_MATRIX_ADDR,
|
packet2_utils_vu_add_unpack_data(objectDataPacket, VU1_MVP_MATRIX_ADDR,
|
||||||
mvp->data, 4, false);
|
mvp->data, 4, false);
|
||||||
@@ -130,13 +130,13 @@ void StdpipQBufferRenderer::sendObjectData(
|
|||||||
dma_channel_send_packet2(objectDataPacket, DMA_CHANNEL_VIF1, true);
|
dma_channel_send_packet2(objectDataPacket, DMA_CHANNEL_VIF1, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipQBufferRenderer::setInfo(StdpipInfoBag* bag) {
|
void StapipQBufferRenderer::setInfo(StapipInfoBag* bag) {
|
||||||
rendererCore->gs.prim.antialiasing = bag->antiAliasingEnabled;
|
rendererCore->gs.prim.antialiasing = bag->antiAliasingEnabled;
|
||||||
rendererCore->gs.prim.blending = bag->blendingEnabled;
|
rendererCore->gs.prim.blending = bag->blendingEnabled;
|
||||||
rendererCore->gs.prim.shading = bag->shadingType;
|
rendererCore->gs.prim.shading = bag->shadingType;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipQBufferRenderer::sendStaticData() const {
|
void StapipQBufferRenderer::sendStaticData() const {
|
||||||
packet2_reset(staticDataPacket, false);
|
packet2_reset(staticDataPacket, false);
|
||||||
packet2_utils_vu_open_unpack(staticDataPacket, VU1_SET_GIFTAG_ADDR, false);
|
packet2_utils_vu_open_unpack(staticDataPacket, VU1_SET_GIFTAG_ADDR, false);
|
||||||
{ packet2_utils_gif_add_set(staticDataPacket, 1); }
|
{ packet2_utils_gif_add_set(staticDataPacket, 1); }
|
||||||
@@ -147,27 +147,27 @@ void StdpipQBufferRenderer::sendStaticData() const {
|
|||||||
dma_channel_send_packet2(staticDataPacket, DMA_CHANNEL_VIF1, true);
|
dma_channel_send_packet2(staticDataPacket, DMA_CHANNEL_VIF1, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipQBufferRenderer::setProgramsCache() {
|
void StapipQBufferRenderer::setProgramsCache() {
|
||||||
VU1Program** programs = new VU1Program*[8];
|
VU1Program** programs = new VU1Program*[8];
|
||||||
programs[0] = repository.getProgram(StdpipCullColor);
|
programs[0] = repository.getProgram(StapipCullColor);
|
||||||
programs[1] = repository.getProgram(StdpipAsIsColor);
|
programs[1] = repository.getProgram(StapipAsIsColor);
|
||||||
programs[2] = repository.getProgram(StdpipCullDirLights);
|
programs[2] = repository.getProgram(StapipCullDirLights);
|
||||||
programs[3] = repository.getProgram(StdpipAsIsDirLights);
|
programs[3] = repository.getProgram(StapipAsIsDirLights);
|
||||||
programs[4] = repository.getProgram(StdpipCullTextureDirLights);
|
programs[4] = repository.getProgram(StapipCullTextureDirLights);
|
||||||
programs[5] = repository.getProgram(StdpipAsIsTextureDirLights);
|
programs[5] = repository.getProgram(StapipAsIsTextureDirLights);
|
||||||
programs[6] = repository.getProgram(StdpipCullTextureColor);
|
programs[6] = repository.getProgram(StapipCullTextureColor);
|
||||||
programs[7] = repository.getProgram(StdpipAsIsTextureColor);
|
programs[7] = repository.getProgram(StapipAsIsTextureColor);
|
||||||
programsPacket = path1->createProgramsCache(programs, 8, 0);
|
programsPacket = path1->createProgramsCache(programs, 8, 0);
|
||||||
delete[] programs;
|
delete[] programs;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipQBufferRenderer::uploadPrograms() {
|
void StapipQBufferRenderer::uploadPrograms() {
|
||||||
dma_channel_wait(DMA_CHANNEL_VIF1, 0);
|
dma_channel_wait(DMA_CHANNEL_VIF1, 0);
|
||||||
dma_channel_send_packet2(programsPacket, DMA_CHANNEL_VIF1, true);
|
dma_channel_send_packet2(programsPacket, DMA_CHANNEL_VIF1, true);
|
||||||
dma_channel_wait(DMA_CHANNEL_VIF1, 0);
|
dma_channel_wait(DMA_CHANNEL_VIF1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipQBufferRenderer::setDoubleBuffer() {
|
void StapipQBufferRenderer::setDoubleBuffer() {
|
||||||
u16 startingAddr = VU1_LAST_ITEM_ADDR + 1;
|
u16 startingAddr = VU1_LAST_ITEM_ADDR + 1;
|
||||||
const u16 bufferMaxSize = 1000;
|
const u16 bufferMaxSize = 1000;
|
||||||
bufferSize = (bufferMaxSize - startingAddr) / 2;
|
bufferSize = (bufferMaxSize - startingAddr) / 2;
|
||||||
@@ -178,7 +178,7 @@ void StdpipQBufferRenderer::setDoubleBuffer() {
|
|||||||
// buffer, to first addr of second buffer
|
// buffer, to first addr of second buffer
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipQBufferRenderer::cull(StdpipQBuffer* buffer) {
|
void StapipQBufferRenderer::cull(StapipQBuffer* buffer) {
|
||||||
if (buffer->size == 0) {
|
if (buffer->size == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -188,8 +188,8 @@ void StdpipQBufferRenderer::cull(StdpipQBuffer* buffer) {
|
|||||||
sendPacket();
|
sendPacket();
|
||||||
}
|
}
|
||||||
|
|
||||||
// void StdpipQBufferRenderer::sendFinishTag() {
|
// void StapipQBufferRenderer::sendFinishTag() {
|
||||||
// StdpipQBufferRenderer way proposition
|
// StapipQBufferRenderer way proposition
|
||||||
// auto program = path1->getProgramByName(Draw_Finish);
|
// auto program = path1->getProgramByName(Draw_Finish);
|
||||||
// addBufferDataToPacket(program, nullptr);
|
// addBufferDataToPacket(program, nullptr);
|
||||||
// sendPacket();
|
// sendPacket();
|
||||||
@@ -206,7 +206,7 @@ void StdpipQBufferRenderer::cull(StdpipQBuffer* buffer) {
|
|||||||
// packet2_free(packet2);
|
// packet2_free(packet2);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
void StdpipQBufferRenderer::clip(StdpipQBuffer* buffer) {
|
void StapipQBufferRenderer::clip(StapipQBuffer* buffer) {
|
||||||
if (buffer->size == 0) {
|
if (buffer->size == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -220,12 +220,12 @@ void StdpipQBufferRenderer::clip(StdpipQBuffer* buffer) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipQBufferRenderer::clearLastProgramName() {
|
void StapipQBufferRenderer::clearLastProgramName() {
|
||||||
lastProgramName = StdipUndefinedProgram;
|
lastProgramName = StdipUndefinedProgram;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipQBufferRenderer::addBufferDataToPacket(StdpipVU1Program* program,
|
void StapipQBufferRenderer::addBufferDataToPacket(StapipVU1Program* program,
|
||||||
StdpipQBuffer* buffer) {
|
StapipQBuffer* buffer) {
|
||||||
currentPacket = packets[context];
|
currentPacket = packets[context];
|
||||||
packet2_reset(currentPacket, false);
|
packet2_reset(currentPacket, false);
|
||||||
|
|
||||||
@@ -241,7 +241,7 @@ void StdpipQBufferRenderer::addBufferDataToPacket(StdpipVU1Program* program,
|
|||||||
packet2_utils_vu_add_end_tag(currentPacket);
|
packet2_utils_vu_add_end_tag(currentPacket);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipQBufferRenderer::sendPacket() {
|
void StapipQBufferRenderer::sendPacket() {
|
||||||
dma_channel_wait(DMA_CHANNEL_VIF1, 0);
|
dma_channel_wait(DMA_CHANNEL_VIF1, 0);
|
||||||
dma_channel_send_packet2(currentPacket, DMA_CHANNEL_VIF1, true);
|
dma_channel_send_packet2(currentPacket, DMA_CHANNEL_VIF1, true);
|
||||||
|
|
||||||
@@ -249,72 +249,72 @@ void StdpipQBufferRenderer::sendPacket() {
|
|||||||
context = !context;
|
context = !context;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipQBufferRenderer::setMaxVertCount(const u32& count) {
|
void StapipQBufferRenderer::setMaxVertCount(const u32& count) {
|
||||||
buffers[0].setMaxVertCount(count);
|
buffers[0].setMaxVertCount(count);
|
||||||
buffers[1].setMaxVertCount(count);
|
buffers[1].setMaxVertCount(count);
|
||||||
clipper.setMaxVertCount(count);
|
clipper.setMaxVertCount(count);
|
||||||
}
|
}
|
||||||
|
|
||||||
StdpipVU1Program* StdpipQBufferRenderer::getAsIsProgramByBag(
|
StapipVU1Program* StapipQBufferRenderer::getAsIsProgramByBag(
|
||||||
const StdpipBag* bag) {
|
const StapipBag* bag) {
|
||||||
auto programType = getDrawProgramTypeByBag(bag);
|
auto programType = getDrawProgramTypeByBag(bag);
|
||||||
|
|
||||||
if (programType == StdpipVU1TextureDirLights)
|
if (programType == StapipVU1TextureDirLights)
|
||||||
return getProgramByName(StdpipAsIsTextureDirLights);
|
return getProgramByName(StapipAsIsTextureDirLights);
|
||||||
else if (programType == StdpipVU1DirLights)
|
else if (programType == StapipVU1DirLights)
|
||||||
return getProgramByName(StdpipAsIsDirLights);
|
return getProgramByName(StapipAsIsDirLights);
|
||||||
else if (programType == StdpipVU1TextureColor)
|
else if (programType == StapipVU1TextureColor)
|
||||||
return getProgramByName(StdpipAsIsTextureColor);
|
return getProgramByName(StapipAsIsTextureColor);
|
||||||
else
|
else
|
||||||
return getProgramByName(StdpipAsIsColor);
|
return getProgramByName(StapipAsIsColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
StdpipVU1Program* StdpipQBufferRenderer::getCullProgramByBag(
|
StapipVU1Program* StapipQBufferRenderer::getCullProgramByBag(
|
||||||
const StdpipBag* bag) {
|
const StapipBag* bag) {
|
||||||
auto programType = getDrawProgramTypeByBag(bag);
|
auto programType = getDrawProgramTypeByBag(bag);
|
||||||
return getCullProgramByType(programType);
|
return getCullProgramByType(programType);
|
||||||
}
|
}
|
||||||
|
|
||||||
StdpipVU1Program* StdpipQBufferRenderer::getProgramByName(
|
StapipVU1Program* StapipQBufferRenderer::getProgramByName(
|
||||||
const StdpipProgramName& name) {
|
const StapipProgramName& name) {
|
||||||
return repository.getProgram(name);
|
return repository.getProgram(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
StdpipVU1Program* StdpipQBufferRenderer::getCullProgramByParams(
|
StapipVU1Program* StapipQBufferRenderer::getCullProgramByParams(
|
||||||
const bool& isLightingEnabled, const bool& isTextureEnabled) {
|
const bool& isLightingEnabled, const bool& isTextureEnabled) {
|
||||||
auto type = getDrawProgramTypeByParams(isLightingEnabled, isTextureEnabled);
|
auto type = getDrawProgramTypeByParams(isLightingEnabled, isTextureEnabled);
|
||||||
return getCullProgramByType(type);
|
return getCullProgramByType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
StdpipVU1Program* StdpipQBufferRenderer::getCullProgramByType(
|
StapipVU1Program* StapipQBufferRenderer::getCullProgramByType(
|
||||||
const StdpipProgramType& programType) {
|
const StapipProgramType& programType) {
|
||||||
if (programType == StdpipVU1TextureDirLights)
|
if (programType == StapipVU1TextureDirLights)
|
||||||
return getProgramByName(StdpipCullTextureDirLights);
|
return getProgramByName(StapipCullTextureDirLights);
|
||||||
else if (programType == StdpipVU1DirLights)
|
else if (programType == StapipVU1DirLights)
|
||||||
return getProgramByName(StdpipCullDirLights);
|
return getProgramByName(StapipCullDirLights);
|
||||||
else if (programType == StdpipVU1TextureColor)
|
else if (programType == StapipVU1TextureColor)
|
||||||
return getProgramByName(StdpipCullTextureColor);
|
return getProgramByName(StapipCullTextureColor);
|
||||||
else
|
else
|
||||||
return getProgramByName(StdpipCullColor);
|
return getProgramByName(StapipCullColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
StdpipProgramType StdpipQBufferRenderer::getDrawProgramTypeByBag(
|
StapipProgramType StapipQBufferRenderer::getDrawProgramTypeByBag(
|
||||||
const StdpipBag* bag) const {
|
const StapipBag* bag) const {
|
||||||
auto isLightingEnabled = bag->lighting != nullptr;
|
auto isLightingEnabled = bag->lighting != nullptr;
|
||||||
auto isTextureEnabled = bag->texture != nullptr;
|
auto isTextureEnabled = bag->texture != nullptr;
|
||||||
return getDrawProgramTypeByParams(isLightingEnabled, isTextureEnabled);
|
return getDrawProgramTypeByParams(isLightingEnabled, isTextureEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
StdpipProgramType StdpipQBufferRenderer::getDrawProgramTypeByParams(
|
StapipProgramType StapipQBufferRenderer::getDrawProgramTypeByParams(
|
||||||
const bool& isLightingEnabled, const bool& isTextureEnabled) const {
|
const bool& isLightingEnabled, const bool& isTextureEnabled) const {
|
||||||
if (isLightingEnabled && isTextureEnabled)
|
if (isLightingEnabled && isTextureEnabled)
|
||||||
return StdpipVU1TextureDirLights;
|
return StapipVU1TextureDirLights;
|
||||||
else if (isLightingEnabled)
|
else if (isLightingEnabled)
|
||||||
return StdpipVU1DirLights;
|
return StapipVU1DirLights;
|
||||||
else if (isTextureEnabled)
|
else if (isTextureEnabled)
|
||||||
return StdpipVU1TextureColor;
|
return StapipVU1TextureColor;
|
||||||
else
|
else
|
||||||
return StdpipVU1Color;
|
return StapipVU1Color;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Tyra
|
} // namespace Tyra
|
||||||
+10
-10
@@ -8,11 +8,11 @@
|
|||||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "renderer/3d/pipeline/std/core/path1/stdpip_vu1_program.hpp"
|
#include "renderer/3d/pipeline/static/core/stapip_vu1_program.hpp"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
StdpipVU1Program::StdpipVU1Program(const StdpipProgramName& t_name,
|
StapipVU1Program::StapipVU1Program(const StapipProgramName& t_name,
|
||||||
u32* t_start, u32* t_end,
|
u32* t_start, u32* t_end,
|
||||||
const u32& t_reglist,
|
const u32& t_reglist,
|
||||||
const u8& t_reglistCount,
|
const u8& t_reglistCount,
|
||||||
@@ -26,21 +26,21 @@ StdpipVU1Program::StdpipVU1Program(const StdpipProgramName& t_name,
|
|||||||
programSize = calculateProgramSize();
|
programSize = calculateProgramSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
StdpipVU1Program::~StdpipVU1Program() {}
|
StapipVU1Program::~StapipVU1Program() {}
|
||||||
|
|
||||||
const StdpipProgramName& StdpipVU1Program::getName() const { return name; }
|
const StapipProgramName& StapipVU1Program::getName() const { return name; }
|
||||||
|
|
||||||
u32& StdpipVU1Program::getReglist() { return reglist; }
|
u32& StapipVU1Program::getReglist() { return reglist; }
|
||||||
|
|
||||||
void StdpipVU1Program::addBufferDataToPacket(packet2_t* packet,
|
void StapipVU1Program::addBufferDataToPacket(packet2_t* packet,
|
||||||
StdpipQBuffer* buffer,
|
StapipQBuffer* buffer,
|
||||||
prim_t* prim) {
|
prim_t* prim) {
|
||||||
addStandardBufferDataToPacket(packet, buffer, prim);
|
addStandardBufferDataToPacket(packet, buffer, prim);
|
||||||
addProgramQBufferDataToPacket(packet, buffer);
|
addProgramQBufferDataToPacket(packet, buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdpipVU1Program::addStandardBufferDataToPacket(packet2_t* packet,
|
void StapipVU1Program::addStandardBufferDataToPacket(packet2_t* packet,
|
||||||
StdpipQBuffer* buffer,
|
StapipQBuffer* buffer,
|
||||||
prim_t* prim) {
|
prim_t* prim) {
|
||||||
if (buffer->bag->texture)
|
if (buffer->bag->texture)
|
||||||
prim->mapping = 1;
|
prim->mapping = 1;
|
||||||
@@ -61,7 +61,7 @@ void StdpipVU1Program::addStandardBufferDataToPacket(packet2_t* packet,
|
|||||||
packet2_utils_vu_close_unpack(packet);
|
packet2_utils_vu_close_unpack(packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
u16 StdpipVU1Program::getMaxVertCount(const bool& singleColorEnabled,
|
u16 StapipVU1Program::getMaxVertCount(const bool& singleColorEnabled,
|
||||||
const u16& bufferSize) const {
|
const u16& bufferSize) const {
|
||||||
u16 res = bufferSize - 4;
|
u16 res = bufferSize - 4;
|
||||||
u8 colorElementsPerVertex =
|
u8 colorElementsPerVertex =
|
||||||
+13
-13
@@ -8,7 +8,7 @@
|
|||||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "renderer/3d/pipeline/std/core/std_pipeline_core.hpp"
|
#include "renderer/3d/pipeline/static/core/static_pipeline_core.hpp"
|
||||||
#include "renderer/core/renderer_core.hpp"
|
#include "renderer/core/renderer_core.hpp"
|
||||||
#include "thread/threading.hpp"
|
#include "thread/threading.hpp"
|
||||||
|
|
||||||
@@ -22,26 +22,26 @@
|
|||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
StdPipelineCore::StdPipelineCore() { maxVertCount = 0; }
|
StapipelineCore::StapipelineCore() { maxVertCount = 0; }
|
||||||
|
|
||||||
StdPipelineCore::~StdPipelineCore() {}
|
StapipelineCore::~StapipelineCore() {}
|
||||||
|
|
||||||
void StdPipelineCore::init(RendererCore* t_core) {
|
void StapipelineCore::init(RendererCore* t_core) {
|
||||||
rendererCore = t_core;
|
rendererCore = t_core;
|
||||||
qbufferRenderer.init(t_core);
|
qbufferRenderer.init(t_core);
|
||||||
packager.init(&rendererCore->renderer3D.frustumPlanes);
|
packager.init(&rendererCore->renderer3D.frustumPlanes);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdPipelineCore::reinitStandardVU1Programs() {
|
void StapipelineCore::reinitStandardVU1Programs() {
|
||||||
qbufferRenderer.reinitVU1();
|
qbufferRenderer.reinitVU1();
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 StdPipelineCore::getMaxVertCountByBag(const StdpipBag* bag) {
|
u32 StapipelineCore::getMaxVertCountByBag(const StapipBag* bag) {
|
||||||
return qbufferRenderer.getCullProgramByBag(bag)->getMaxVertCount(
|
return qbufferRenderer.getCullProgramByBag(bag)->getMaxVertCount(
|
||||||
bag->color->many == nullptr, qbufferRenderer.getBufferSize());
|
bag->color->many == nullptr, qbufferRenderer.getBufferSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 StdPipelineCore::getMaxVertCountByParams(const bool& isSingleColor,
|
u32 StapipelineCore::getMaxVertCountByParams(const bool& isSingleColor,
|
||||||
const bool& isLightingEnabled,
|
const bool& isLightingEnabled,
|
||||||
const bool& isTextureEnabled) {
|
const bool& isTextureEnabled) {
|
||||||
return qbufferRenderer
|
return qbufferRenderer
|
||||||
@@ -49,7 +49,7 @@ u32 StdPipelineCore::getMaxVertCountByParams(const bool& isSingleColor,
|
|||||||
->getMaxVertCount(isSingleColor, qbufferRenderer.getBufferSize());
|
->getMaxVertCount(isSingleColor, qbufferRenderer.getBufferSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdPipelineCore::render(StdpipBag* bag, StdpipBagPackagesBBox* bbox) {
|
void StapipelineCore::render(StapipBag* bag, StapipBagPackagesBBox* bbox) {
|
||||||
if (bag->count <= 0) return;
|
if (bag->count <= 0) return;
|
||||||
|
|
||||||
TYRA_ASSERT(bag->vertices != nullptr,
|
TYRA_ASSERT(bag->vertices != nullptr,
|
||||||
@@ -71,7 +71,7 @@ void StdPipelineCore::render(StdpipBag* bag, StdpipBagPackagesBBox* bbox) {
|
|||||||
!bag->texture || (bag->texture->texture && bag->texture->coordinates),
|
!bag->texture || (bag->texture->texture && bag->texture->coordinates),
|
||||||
"If you want texture, please provide texture and coordinates!");
|
"If you want texture, please provide texture and coordinates!");
|
||||||
|
|
||||||
StdpipBagPackagesBBox* renderBbox;
|
StapipBagPackagesBBox* renderBbox;
|
||||||
|
|
||||||
u32 maxVertCount = getMaxVertCountByBag(bag);
|
u32 maxVertCount = getMaxVertCountByBag(bag);
|
||||||
|
|
||||||
@@ -79,7 +79,7 @@ void StdPipelineCore::render(StdpipBag* bag, StdpipBagPackagesBBox* bbox) {
|
|||||||
|
|
||||||
if (!bbox)
|
if (!bbox)
|
||||||
renderBbox =
|
renderBbox =
|
||||||
new StdpipBagPackagesBBox(bag->vertices, bag->count, maxVertCount);
|
new StapipBagPackagesBBox(bag->vertices, bag->count, maxVertCount);
|
||||||
else
|
else
|
||||||
renderBbox = bbox;
|
renderBbox = bbox;
|
||||||
|
|
||||||
@@ -141,7 +141,7 @@ void StdPipelineCore::render(StdpipBag* bag, StdpipBagPackagesBBox* bbox) {
|
|||||||
Verbose("Render finished");
|
Verbose("Render finished");
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdPipelineCore::renderPkgs(StdpipBagPackage* packages, u16 count) {
|
void StapipelineCore::renderPkgs(StapipBagPackage* packages, u16 count) {
|
||||||
for (u16 i = 0; i < count; i++) {
|
for (u16 i = 0; i < count; i++) {
|
||||||
if (packages[i].isInFrustum == IN_FRUSTUM) {
|
if (packages[i].isInFrustum == IN_FRUSTUM) {
|
||||||
Verbose(i, " - package in frustum -> cull");
|
Verbose(i, " - package in frustum -> cull");
|
||||||
@@ -161,7 +161,7 @@ void StdPipelineCore::renderPkgs(StdpipBagPackage* packages, u16 count) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdPipelineCore::renderSubpkgs(StdpipBagPackage* subpkgs, u16 count) {
|
void StapipelineCore::renderSubpkgs(StapipBagPackage* subpkgs, u16 count) {
|
||||||
std::vector<u16> doneIndexes;
|
std::vector<u16> doneIndexes;
|
||||||
std::vector<u16> loadedIndexes;
|
std::vector<u16> loadedIndexes;
|
||||||
|
|
||||||
@@ -218,7 +218,7 @@ void StdPipelineCore::renderSubpkgs(StdpipBagPackage* subpkgs, u16 count) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdPipelineCore::setMaxVertCount(const u32& count) {
|
void StapipelineCore::setMaxVertCount(const u32& count) {
|
||||||
maxVertCount = count;
|
maxVertCount = count;
|
||||||
packager.setMaxVertCount(count);
|
packager.setMaxVertCount(count);
|
||||||
qbufferRenderer.setMaxVertCount(count);
|
qbufferRenderer.setMaxVertCount(count);
|
||||||
+22
-22
@@ -8,22 +8,22 @@
|
|||||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "renderer/3d/pipeline/std/std_pipeline.hpp"
|
#include "renderer/3d/pipeline/static/static_pipeline.hpp"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
StdPipeline::StdPipeline() { colorsCache = new Vec4[4]; }
|
Stapipeline::Stapipeline() { colorsCache = new Vec4[4]; }
|
||||||
|
|
||||||
StdPipeline::~StdPipeline() { delete[] colorsCache; }
|
Stapipeline::~Stapipeline() { delete[] colorsCache; }
|
||||||
|
|
||||||
void StdPipeline::init(RendererCore* t_core) {
|
void Stapipeline::init(RendererCore* t_core) {
|
||||||
rendererCore = t_core;
|
rendererCore = t_core;
|
||||||
core.init(t_core);
|
core.init(t_core);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdPipeline::onUse() { core.reinitStandardVU1Programs(); }
|
void Stapipeline::onUse() { core.reinitStandardVU1Programs(); }
|
||||||
|
|
||||||
void StdPipeline::render(Mesh* mesh, const StdpipOptions* options) {
|
void Stapipeline::render(Mesh* mesh, const StapipOptions* options) {
|
||||||
auto model = mesh->getModelMatrix();
|
auto model = mesh->getModelMatrix();
|
||||||
|
|
||||||
MeshFrame* frameFrom = mesh->getFramesCount() > 0
|
MeshFrame* frameFrom = mesh->getFramesCount() > 0
|
||||||
@@ -49,7 +49,7 @@ void StdPipeline::render(Mesh* mesh, const StdpipOptions* options) {
|
|||||||
// material->isSingleColorActivated(), material->getNormalFaces(),
|
// material->isSingleColorActivated(), material->getNormalFaces(),
|
||||||
// material->getTextureCoordFaces());
|
// material->getTextureCoordFaces());
|
||||||
|
|
||||||
StdpipBag bag;
|
StapipBag bag;
|
||||||
addVertices(mesh, material, &bag, frameFrom, frameTo);
|
addVertices(mesh, material, &bag, frameFrom, frameTo);
|
||||||
bag.info = infoBag;
|
bag.info = infoBag;
|
||||||
bag.color = getColorBag(mesh, material, frameFrom, frameTo);
|
bag.color = getColorBag(mesh, material, frameFrom, frameTo);
|
||||||
@@ -65,8 +65,8 @@ void StdPipeline::render(Mesh* mesh, const StdpipOptions* options) {
|
|||||||
delete infoBag;
|
delete infoBag;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdPipeline::addVertices(Mesh* mesh, MeshMaterial* material,
|
void Stapipeline::addVertices(Mesh* mesh, MeshMaterial* material,
|
||||||
StdpipBag* bag, MeshFrame* frameFrom,
|
StapipBag* bag, MeshFrame* frameFrom,
|
||||||
MeshFrame* frameTo) const {
|
MeshFrame* frameTo) const {
|
||||||
bag->count = material->getFacesCount();
|
bag->count = material->getFacesCount();
|
||||||
bag->vertices = new Vec4[bag->count];
|
bag->vertices = new Vec4[bag->count];
|
||||||
@@ -83,9 +83,9 @@ void StdPipeline::addVertices(Mesh* mesh, MeshMaterial* material,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StdpipInfoBag* StdPipeline::getInfoBag(Mesh* mesh, const StdpipOptions* options,
|
StapipInfoBag* Stapipeline::getInfoBag(Mesh* mesh, const StapipOptions* options,
|
||||||
M4x4* model) const {
|
M4x4* model) const {
|
||||||
auto* result = new StdpipInfoBag();
|
auto* result = new StapipInfoBag();
|
||||||
|
|
||||||
if (options) {
|
if (options) {
|
||||||
result->antiAliasingEnabled = options->antiAliasingEnabled;
|
result->antiAliasingEnabled = options->antiAliasingEnabled;
|
||||||
@@ -95,7 +95,7 @@ StdpipInfoBag* StdPipeline::getInfoBag(Mesh* mesh, const StdpipOptions* options,
|
|||||||
} else {
|
} else {
|
||||||
result->antiAliasingEnabled = false;
|
result->antiAliasingEnabled = false;
|
||||||
result->blendingEnabled = true;
|
result->blendingEnabled = true;
|
||||||
result->shadingType = StdpipShadingFlat;
|
result->shadingType = StapipShadingFlat;
|
||||||
result->noClipChecks = true;
|
result->noClipChecks = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,10 +104,10 @@ StdpipInfoBag* StdPipeline::getInfoBag(Mesh* mesh, const StdpipOptions* options,
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
StdpipColorBag* StdPipeline::getColorBag(Mesh* mesh, MeshMaterial* material,
|
StapipColorBag* Stapipeline::getColorBag(Mesh* mesh, MeshMaterial* material,
|
||||||
MeshFrame* frameFrom,
|
MeshFrame* frameFrom,
|
||||||
MeshFrame* frameTo) const {
|
MeshFrame* frameTo) const {
|
||||||
auto* result = new StdpipColorBag();
|
auto* result = new StapipColorBag();
|
||||||
|
|
||||||
if (material->isSingleColorActivated()) {
|
if (material->isSingleColorActivated()) {
|
||||||
result->single = &material->singleColor;
|
result->single = &material->singleColor;
|
||||||
@@ -131,12 +131,12 @@ StdpipColorBag* StdPipeline::getColorBag(Mesh* mesh, MeshMaterial* material,
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
StdpipTextureBag* StdPipeline::getTextureBag(Mesh* mesh, MeshMaterial* material,
|
StapipTextureBag* Stapipeline::getTextureBag(Mesh* mesh, MeshMaterial* material,
|
||||||
MeshFrame* frameFrom,
|
MeshFrame* frameFrom,
|
||||||
MeshFrame* frameTo) {
|
MeshFrame* frameTo) {
|
||||||
if (!material->getTextureCoordFaces()) return nullptr;
|
if (!material->getTextureCoordFaces()) return nullptr;
|
||||||
|
|
||||||
auto* result = new StdpipTextureBag();
|
auto* result = new StapipTextureBag();
|
||||||
|
|
||||||
result->texture =
|
result->texture =
|
||||||
rendererCore->texture.repository.getBySpriteOrMesh(material->getId());
|
rendererCore->texture.repository.getBySpriteOrMesh(material->getId());
|
||||||
@@ -160,14 +160,14 @@ StdpipTextureBag* StdPipeline::getTextureBag(Mesh* mesh, MeshMaterial* material,
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
StdpipLightingBag* StdPipeline::getLightingBag(
|
StapipLightingBag* Stapipeline::getLightingBag(
|
||||||
Mesh* mesh, MeshMaterial* material, M4x4* model, MeshFrame* frameFrom,
|
Mesh* mesh, MeshMaterial* material, M4x4* model, MeshFrame* frameFrom,
|
||||||
MeshFrame* frameTo, const StdpipOptions* options) const {
|
MeshFrame* frameTo, const StapipOptions* options) const {
|
||||||
if (!material->getNormalFaces() || options == nullptr ||
|
if (!material->getNormalFaces() || options == nullptr ||
|
||||||
options->lighting == nullptr)
|
options->lighting == nullptr)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
auto* result = new StdpipLightingBag(true);
|
auto* result = new StapipLightingBag(true);
|
||||||
result->lightMatrix = model;
|
result->lightMatrix = model;
|
||||||
|
|
||||||
result->setLightsManually(colorsCache,
|
result->setLightsManually(colorsCache,
|
||||||
@@ -189,8 +189,8 @@ StdpipLightingBag* StdPipeline::getLightingBag(
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdPipeline::setLightingColorsCache(
|
void Stapipeline::setLightingColorsCache(
|
||||||
StdpipLightingOptions* lightingOptions) {
|
StapipLightingOptions* lightingOptions) {
|
||||||
for (int i = 0; i < 3; i++) {
|
for (int i = 0; i < 3; i++) {
|
||||||
colorsCache[i] =
|
colorsCache[i] =
|
||||||
reinterpret_cast<Vec4&>(lightingOptions->directionalColors[i]);
|
reinterpret_cast<Vec4&>(lightingOptions->directionalColors[i]);
|
||||||
@@ -198,7 +198,7 @@ void StdPipeline::setLightingColorsCache(
|
|||||||
colorsCache[3] = reinterpret_cast<Vec4&>(*lightingOptions->ambientColor);
|
colorsCache[3] = reinterpret_cast<Vec4&>(*lightingOptions->ambientColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdPipeline::deallocDrawBags(StdpipBag* bag,
|
void Stapipeline::deallocDrawBags(StapipBag* bag,
|
||||||
MeshMaterial* material) const {
|
MeshMaterial* material) const {
|
||||||
if (bag->color->many) {
|
if (bag->color->many) {
|
||||||
delete[] bag->color->many;
|
delete[] bag->color->many;
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
/*
|
|
||||||
# ______ ____ ___
|
|
||||||
# | \/ ____| |___|
|
|
||||||
# | | | \ | |
|
|
||||||
#-----------------------------------------------------------------------
|
|
||||||
# Copyright 2022, tyra - https://github.com/h4570/tyra
|
|
||||||
# Licenced under Apache License 2.0
|
|
||||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "renderer/3d/pipeline/std/core/path1/stdpip_programs_repository.hpp"
|
|
||||||
|
|
||||||
namespace Tyra {
|
|
||||||
|
|
||||||
StdpipProgramsRepository::StdpipProgramsRepository() {}
|
|
||||||
|
|
||||||
StdpipProgramsRepository::~StdpipProgramsRepository() {}
|
|
||||||
|
|
||||||
StdpipVU1Program* StdpipProgramsRepository::getProgram(
|
|
||||||
const StdpipProgramName& name) {
|
|
||||||
switch (name) {
|
|
||||||
case StdpipProgramName::StdpipAsIsColor:
|
|
||||||
return &asIsColor;
|
|
||||||
case StdpipProgramName::StdpipCullColor:
|
|
||||||
return &cullColor;
|
|
||||||
|
|
||||||
case StdpipProgramName::StdpipAsIsDirLights:
|
|
||||||
return &asIsLightingColor;
|
|
||||||
case StdpipProgramName::StdpipCullDirLights:
|
|
||||||
return &cullLightingColor;
|
|
||||||
|
|
||||||
case StdpipProgramName::StdpipAsIsTextureDirLights:
|
|
||||||
return &asIsLightingTextureColor;
|
|
||||||
case StdpipProgramName::StdpipCullTextureDirLights:
|
|
||||||
return &cullLightingTextureColor;
|
|
||||||
|
|
||||||
case StdpipProgramName::StdpipAsIsTextureColor:
|
|
||||||
return &asIsTextureColor;
|
|
||||||
case StdpipProgramName::StdpipCullTextureColor:
|
|
||||||
return &cullTextureColor;
|
|
||||||
|
|
||||||
default:
|
|
||||||
TYRA_TRAP("Unknown VU1 program name");
|
|
||||||
return &cullLightingTextureColor;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Tyra
|
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
#include "src/renderer/core/paths/path1/programs/vcl_sml.i"
|
#include "src/renderer/core/paths/path1/programs/vcl_sml.i"
|
||||||
#include "src/renderer/core/paths/path1/programs/tyra_macros.i"
|
#include "src/renderer/core/paths/path1/programs/tyra_macros.i"
|
||||||
#include "inc/renderer/3d/pipeline/std/core/path1/programs/stdpip_vu1_shared_defines.h"
|
#include "inc/renderer/3d/pipeline/static/core/programs/stapip_vu1_shared_defines.h"
|
||||||
|
|
||||||
--enter
|
--enter
|
||||||
--endenter
|
--endenter
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
#include <engine.hpp>
|
#include <engine.hpp>
|
||||||
#include <game.hpp>
|
#include <game.hpp>
|
||||||
#include "renderer/3d/pipeline/minecraft/minecraft_pipeline.hpp"
|
#include "renderer/3d/pipeline/minecraft/minecraft_pipeline.hpp"
|
||||||
#include "renderer/3d/pipeline/std/std_pipeline.hpp"
|
#include "renderer/3d/pipeline/static/static_pipeline.hpp"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
@@ -39,8 +39,8 @@ class H4570 : public Game {
|
|||||||
Vec4 cameraPosition, cameraLookAt;
|
Vec4 cameraPosition, cameraLookAt;
|
||||||
|
|
||||||
MinecraftPipeline mcPip;
|
MinecraftPipeline mcPip;
|
||||||
StdPipeline stdPip;
|
Stapipeline stapip;
|
||||||
StdpipOptions* renderOptions;
|
StapipOptions* renderOptions;
|
||||||
Texture* blocksTex;
|
Texture* blocksTex;
|
||||||
|
|
||||||
u32 blocksCount;
|
u32 blocksCount;
|
||||||
|
|||||||
+11
-11
@@ -18,7 +18,7 @@ H4570::H4570(Engine* t_engine) { engine = t_engine; }
|
|||||||
H4570::~H4570() {}
|
H4570::~H4570() {}
|
||||||
|
|
||||||
Mesh* getWarrior(Renderer* renderer);
|
Mesh* getWarrior(Renderer* renderer);
|
||||||
StdpipOptions* getRenderingOptions();
|
StapipOptions* getRenderingOptions();
|
||||||
Sprite* get2DPicture(Renderer* renderer);
|
Sprite* get2DPicture(Renderer* renderer);
|
||||||
|
|
||||||
void H4570::init() {
|
void H4570::init() {
|
||||||
@@ -65,7 +65,7 @@ void H4570::init() {
|
|||||||
FileUtils::fromCwd("blocks.png"));
|
FileUtils::fromCwd("blocks.png"));
|
||||||
|
|
||||||
mcPip.init(&engine->renderer.core);
|
mcPip.init(&engine->renderer.core);
|
||||||
stdPip.init(&engine->renderer.core);
|
stapip.init(&engine->renderer.core);
|
||||||
|
|
||||||
picture = get2DPicture(&engine->renderer);
|
picture = get2DPicture(&engine->renderer);
|
||||||
|
|
||||||
@@ -137,12 +137,12 @@ void H4570::loop() {
|
|||||||
|
|
||||||
// engine->renderer.renderer2D.render(picture);
|
// engine->renderer.renderer2D.render(picture);
|
||||||
|
|
||||||
engine->renderer.renderer3D.usePipeline(&stdPip);
|
engine->renderer.renderer3D.usePipeline(&stapip);
|
||||||
{
|
{
|
||||||
stdPip.render(warrior, renderOptions);
|
stapip.render(warrior, renderOptions);
|
||||||
// stdPip.render(warrior2, renderOptions);
|
// stapip.render(warrior2, renderOptions);
|
||||||
// stdPip.render(warrior3, renderOptions);
|
// stapip.render(warrior3, renderOptions);
|
||||||
// stdPip.render(warrior4, renderOptions);
|
// stapip.render(warrior4, renderOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
engine->renderer.renderer3D.usePipeline(&mcPip);
|
engine->renderer.renderer3D.usePipeline(&mcPip);
|
||||||
@@ -179,8 +179,8 @@ Sprite* get2DPicture(Renderer* renderer) {
|
|||||||
return sprite;
|
return sprite;
|
||||||
}
|
}
|
||||||
|
|
||||||
StdpipOptions* getRenderingOptions() {
|
StapipOptions* getRenderingOptions() {
|
||||||
auto* options = new StdpipOptions();
|
auto* options = new StapipOptions();
|
||||||
|
|
||||||
auto* ambientColor = new Color(32.0F, 32.0F, 32.0F, 32.0F);
|
auto* ambientColor = new Color(32.0F, 32.0F, 32.0F, 32.0F);
|
||||||
auto* directionalColors = new Color[3];
|
auto* directionalColors = new Color[3];
|
||||||
@@ -189,12 +189,12 @@ StdpipOptions* getRenderingOptions() {
|
|||||||
for (int i = 0; i < 3; i++)
|
for (int i = 0; i < 3; i++)
|
||||||
directionalDirections[i].set(1.0F, 1.0F, 1.0F, 1.0F);
|
directionalDirections[i].set(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
|
||||||
auto* lightingOptions = new StdpipLightingOptions(); // Memory leak!
|
auto* lightingOptions = new StapipLightingOptions(); // Memory leak!
|
||||||
lightingOptions->ambientColor = ambientColor;
|
lightingOptions->ambientColor = ambientColor;
|
||||||
lightingOptions->directionalColors = directionalColors;
|
lightingOptions->directionalColors = directionalColors;
|
||||||
lightingOptions->directionalDirections = directionalDirections;
|
lightingOptions->directionalDirections = directionalDirections;
|
||||||
|
|
||||||
options->shadingType = Tyra::StdpipShadingGouraud;
|
options->shadingType = Tyra::StapipShadingGouraud;
|
||||||
options->blendingEnabled = true;
|
options->blendingEnabled = true;
|
||||||
options->antiAliasingEnabled = false;
|
options->antiAliasingEnabled = false;
|
||||||
options->lighting = lightingOptions;
|
options->lighting = lightingOptions;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
#include <engine.hpp>
|
#include <engine.hpp>
|
||||||
#include <game.hpp>
|
#include <game.hpp>
|
||||||
#include "renderer/3d/pipeline/minecraft/minecraft_pipeline.hpp"
|
#include "renderer/3d/pipeline/minecraft/minecraft_pipeline.hpp"
|
||||||
#include "renderer/3d/pipeline/std/std_pipeline.hpp"
|
#include "renderer/3d/pipeline/static/static_pipeline.hpp"
|
||||||
|
|
||||||
namespace Tyra {
|
namespace Tyra {
|
||||||
|
|
||||||
@@ -36,8 +36,8 @@ class Wellinator : public Game {
|
|||||||
Vec4 cameraPosition, cameraLookAt;
|
Vec4 cameraPosition, cameraLookAt;
|
||||||
|
|
||||||
MinecraftPipeline mcPip;
|
MinecraftPipeline mcPip;
|
||||||
StdPipeline stdPip;
|
Stapipeline stapip;
|
||||||
StdpipOptions* renderOptions;
|
StapipOptions* renderOptions;
|
||||||
Texture* blocksTex;
|
Texture* blocksTex;
|
||||||
|
|
||||||
u32 blocksCount;
|
u32 blocksCount;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ Wellinator::Wellinator(Engine* t_engine) { engine = t_engine; }
|
|||||||
Wellinator::~Wellinator() {}
|
Wellinator::~Wellinator() {}
|
||||||
|
|
||||||
Mesh* getWarrior(Renderer* renderer);
|
Mesh* getWarrior(Renderer* renderer);
|
||||||
StdpipOptions* getRenderingOptions();
|
StapipOptions* getRenderingOptions();
|
||||||
Sprite* get2DPicture(Renderer* renderer);
|
Sprite* get2DPicture(Renderer* renderer);
|
||||||
|
|
||||||
void Wellinator::init() {
|
void Wellinator::init() {
|
||||||
@@ -42,7 +42,7 @@ void Wellinator::init() {
|
|||||||
FileUtils::fromCwd("blocks.png"));
|
FileUtils::fromCwd("blocks.png"));
|
||||||
|
|
||||||
mcPip.init(&engine->renderer.core);
|
mcPip.init(&engine->renderer.core);
|
||||||
stdPip.init(&engine->renderer.core);
|
stapip.init(&engine->renderer.core);
|
||||||
|
|
||||||
picture = get2DPicture(&engine->renderer);
|
picture = get2DPicture(&engine->renderer);
|
||||||
|
|
||||||
@@ -116,8 +116,8 @@ void Wellinator::loop() {
|
|||||||
|
|
||||||
// warrior->setPosition(*nextPos);
|
// warrior->setPosition(*nextPos);
|
||||||
|
|
||||||
engine->renderer.renderer3D.usePipeline(&stdPip);
|
engine->renderer.renderer3D.usePipeline(&stapip);
|
||||||
{ stdPip.render(warrior, renderOptions); }
|
{ stapip.render(warrior, renderOptions); }
|
||||||
|
|
||||||
engine->renderer.renderer3D.usePipeline(&mcPip);
|
engine->renderer.renderer3D.usePipeline(&mcPip);
|
||||||
{ mcPip.render(blocks, blocksCount, blocksTex, false); }
|
{ mcPip.render(blocks, blocksCount, blocksTex, false); }
|
||||||
@@ -150,8 +150,8 @@ Sprite* get2DPicture(Renderer* renderer) {
|
|||||||
return sprite;
|
return sprite;
|
||||||
}
|
}
|
||||||
|
|
||||||
StdpipOptions* getRenderingOptions() {
|
StapipOptions* getRenderingOptions() {
|
||||||
auto* options = new StdpipOptions();
|
auto* options = new StapipOptions();
|
||||||
|
|
||||||
auto* ambientColor = new Color(32.0F, 32.0F, 32.0F, 128.0F);
|
auto* ambientColor = new Color(32.0F, 32.0F, 32.0F, 128.0F);
|
||||||
auto* directionalColors = new Color[3];
|
auto* directionalColors = new Color[3];
|
||||||
@@ -160,12 +160,12 @@ StdpipOptions* getRenderingOptions() {
|
|||||||
for (int i = 0; i < 3; i++)
|
for (int i = 0; i < 3; i++)
|
||||||
directionalDirections[i].set(1.0F, 1.0F, 1.0F, 1.0F);
|
directionalDirections[i].set(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
|
||||||
auto* lightingOptions = new StdpipLightingOptions(); // Memory leak!
|
auto* lightingOptions = new StapipLightingOptions(); // Memory leak!
|
||||||
lightingOptions->ambientColor = ambientColor;
|
lightingOptions->ambientColor = ambientColor;
|
||||||
lightingOptions->directionalColors = directionalColors;
|
lightingOptions->directionalColors = directionalColors;
|
||||||
lightingOptions->directionalDirections = directionalDirections;
|
lightingOptions->directionalDirections = directionalDirections;
|
||||||
|
|
||||||
options->shadingType = Tyra::StdpipShadingGouraud;
|
options->shadingType = Tyra::StapipShadingGouraud;
|
||||||
options->blendingEnabled = true;
|
options->blendingEnabled = true;
|
||||||
options->antiAliasingEnabled = false;
|
options->antiAliasingEnabled = false;
|
||||||
options->lighting = lightingOptions;
|
options->lighting = lightingOptions;
|
||||||
|
|||||||
Reference in New Issue
Block a user