std pipeline rename
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
#include <engine.hpp>
|
||||
#include <game.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 {
|
||||
|
||||
@@ -39,8 +39,8 @@ class H4570 : public Game {
|
||||
Vec4 cameraPosition, cameraLookAt;
|
||||
|
||||
MinecraftPipeline mcPip;
|
||||
StdPipeline stdPip;
|
||||
StdpipOptions* renderOptions;
|
||||
Stapipeline stapip;
|
||||
StapipOptions* renderOptions;
|
||||
Texture* blocksTex;
|
||||
|
||||
u32 blocksCount;
|
||||
|
||||
+11
-11
@@ -18,7 +18,7 @@ H4570::H4570(Engine* t_engine) { engine = t_engine; }
|
||||
H4570::~H4570() {}
|
||||
|
||||
Mesh* getWarrior(Renderer* renderer);
|
||||
StdpipOptions* getRenderingOptions();
|
||||
StapipOptions* getRenderingOptions();
|
||||
Sprite* get2DPicture(Renderer* renderer);
|
||||
|
||||
void H4570::init() {
|
||||
@@ -65,7 +65,7 @@ void H4570::init() {
|
||||
FileUtils::fromCwd("blocks.png"));
|
||||
|
||||
mcPip.init(&engine->renderer.core);
|
||||
stdPip.init(&engine->renderer.core);
|
||||
stapip.init(&engine->renderer.core);
|
||||
|
||||
picture = get2DPicture(&engine->renderer);
|
||||
|
||||
@@ -137,12 +137,12 @@ void H4570::loop() {
|
||||
|
||||
// engine->renderer.renderer2D.render(picture);
|
||||
|
||||
engine->renderer.renderer3D.usePipeline(&stdPip);
|
||||
engine->renderer.renderer3D.usePipeline(&stapip);
|
||||
{
|
||||
stdPip.render(warrior, renderOptions);
|
||||
// stdPip.render(warrior2, renderOptions);
|
||||
// stdPip.render(warrior3, renderOptions);
|
||||
// stdPip.render(warrior4, renderOptions);
|
||||
stapip.render(warrior, renderOptions);
|
||||
// stapip.render(warrior2, renderOptions);
|
||||
// stapip.render(warrior3, renderOptions);
|
||||
// stapip.render(warrior4, renderOptions);
|
||||
}
|
||||
|
||||
engine->renderer.renderer3D.usePipeline(&mcPip);
|
||||
@@ -179,8 +179,8 @@ Sprite* get2DPicture(Renderer* renderer) {
|
||||
return sprite;
|
||||
}
|
||||
|
||||
StdpipOptions* getRenderingOptions() {
|
||||
auto* options = new StdpipOptions();
|
||||
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 @@ StdpipOptions* getRenderingOptions() {
|
||||
for (int i = 0; i < 3; i++)
|
||||
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->directionalColors = directionalColors;
|
||||
lightingOptions->directionalDirections = directionalDirections;
|
||||
|
||||
options->shadingType = Tyra::StdpipShadingGouraud;
|
||||
options->shadingType = Tyra::StapipShadingGouraud;
|
||||
options->blendingEnabled = true;
|
||||
options->antiAliasingEnabled = false;
|
||||
options->lighting = lightingOptions;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <engine.hpp>
|
||||
#include <game.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 {
|
||||
|
||||
@@ -36,8 +36,8 @@ class Wellinator : public Game {
|
||||
Vec4 cameraPosition, cameraLookAt;
|
||||
|
||||
MinecraftPipeline mcPip;
|
||||
StdPipeline stdPip;
|
||||
StdpipOptions* renderOptions;
|
||||
Stapipeline stapip;
|
||||
StapipOptions* renderOptions;
|
||||
Texture* blocksTex;
|
||||
|
||||
u32 blocksCount;
|
||||
|
||||
@@ -18,7 +18,7 @@ Wellinator::Wellinator(Engine* t_engine) { engine = t_engine; }
|
||||
Wellinator::~Wellinator() {}
|
||||
|
||||
Mesh* getWarrior(Renderer* renderer);
|
||||
StdpipOptions* getRenderingOptions();
|
||||
StapipOptions* getRenderingOptions();
|
||||
Sprite* get2DPicture(Renderer* renderer);
|
||||
|
||||
void Wellinator::init() {
|
||||
@@ -42,7 +42,7 @@ void Wellinator::init() {
|
||||
FileUtils::fromCwd("blocks.png"));
|
||||
|
||||
mcPip.init(&engine->renderer.core);
|
||||
stdPip.init(&engine->renderer.core);
|
||||
stapip.init(&engine->renderer.core);
|
||||
|
||||
picture = get2DPicture(&engine->renderer);
|
||||
|
||||
@@ -116,8 +116,8 @@ void Wellinator::loop() {
|
||||
|
||||
// warrior->setPosition(*nextPos);
|
||||
|
||||
engine->renderer.renderer3D.usePipeline(&stdPip);
|
||||
{ stdPip.render(warrior, renderOptions); }
|
||||
engine->renderer.renderer3D.usePipeline(&stapip);
|
||||
{ stapip.render(warrior, renderOptions); }
|
||||
|
||||
engine->renderer.renderer3D.usePipeline(&mcPip);
|
||||
{ mcPip.render(blocks, blocksCount, blocksTex, false); }
|
||||
@@ -150,8 +150,8 @@ Sprite* get2DPicture(Renderer* renderer) {
|
||||
return sprite;
|
||||
}
|
||||
|
||||
StdpipOptions* getRenderingOptions() {
|
||||
auto* options = new StdpipOptions();
|
||||
StapipOptions* getRenderingOptions() {
|
||||
auto* options = new StapipOptions();
|
||||
|
||||
auto* ambientColor = new Color(32.0F, 32.0F, 32.0F, 128.0F);
|
||||
auto* directionalColors = new Color[3];
|
||||
@@ -160,12 +160,12 @@ StdpipOptions* getRenderingOptions() {
|
||||
for (int i = 0; i < 3; i++)
|
||||
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->directionalColors = directionalColors;
|
||||
lightingOptions->directionalDirections = directionalDirections;
|
||||
|
||||
options->shadingType = Tyra::StdpipShadingGouraud;
|
||||
options->shadingType = Tyra::StapipShadingGouraud;
|
||||
options->blendingEnabled = true;
|
||||
options->antiAliasingEnabled = false;
|
||||
options->lighting = lightingOptions;
|
||||
|
||||
Reference in New Issue
Block a user