dynamic pipeline base

This commit is contained in:
h4570
2022-07-18 21:49:38 +02:00
parent 34c553af04
commit 95c01afa01
66 changed files with 571 additions and 488 deletions
+2 -2
View File
@@ -39,8 +39,8 @@ class H4570 : public Game {
Vec4 cameraPosition, cameraLookAt;
MinecraftPipeline mcPip;
Stapipeline stapip;
StapipOptions* renderOptions;
StaticPipeline stapip;
StaPipOptions* renderOptions;
Texture* blocksTex;
u32 blocksCount;
+5 -5
View File
@@ -18,7 +18,7 @@ H4570::H4570(Engine* t_engine) { engine = t_engine; }
H4570::~H4570() {}
DynamicMesh* getWarrior(Renderer* renderer);
StapipOptions* getRenderingOptions();
StaPipOptions* getRenderingOptions();
Sprite* get2DPicture(Renderer* renderer);
void H4570::init() {
@@ -179,8 +179,8 @@ Sprite* get2DPicture(Renderer* renderer) {
return sprite;
}
StapipOptions* getRenderingOptions() {
auto* options = new StapipOptions();
StaPipOptions* getRenderingOptions() {
auto* options = new StaPipOptions();
auto* ambientColor = new Color(32.0F, 32.0F, 32.0F, 32.0F);
auto* directionalColors = new Color[3];
@@ -189,12 +189,12 @@ StapipOptions* getRenderingOptions() {
for (int i = 0; i < 3; i++)
directionalDirections[i].set(1.0F, 1.0F, 1.0F, 1.0F);
auto* lightingOptions = new StapipLightingOptions(); // Memory leak!
auto* lightingOptions = new StaPipLightingOptions(); // Memory leak!
lightingOptions->ambientColor = ambientColor;
lightingOptions->directionalColors = directionalColors;
lightingOptions->directionalDirections = directionalDirections;
options->shadingType = Tyra::StapipShadingGouraud;
options->shadingType = Tyra::StaPipShadingGouraud;
options->blendingEnabled = true;
options->antiAliasingEnabled = false;
options->lighting = lightingOptions;