std pipeline rename
This commit is contained in:
+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;
|
||||
|
||||
Reference in New Issue
Block a user