Stuff I've fixed so far.

This commit is contained in:
2023-01-19 20:24:43 -08:00
parent e60002b8dc
commit 97fd59f28d
12 changed files with 72 additions and 43 deletions

View File

@ -6,6 +6,7 @@
#pragma once
#include "scene/Scene.hpp"
#include "game/DawnGame.hpp"
#include "scene/components/display/material/SimpleTexturedMaterial.hpp"
namespace Dawn {
template<class T>
@ -35,9 +36,9 @@ namespace Dawn {
this->sceneItem = this->createSceneItem();
auto host = this->sceneItem->addComponent<MeshHost>();
auto renderer = this->sceneItem->addComponent<MeshRenderer>();
auto material = this->sceneItem->addComponent<Material>();
material->textureValues[material->getShader()->getParameterByName("u_Text")] = this->subScene.renderTarget.getTexture();
auto material = this->sceneItem->addComponent<SimpleTexturedMaterial>();
material->texture = this->subScene.renderTarget.getTexture();
auto renderTargetQuad = this->sceneItem->addComponent<SimpleRenderTargetQuad>();
renderTargetQuad->setRenderTarget(&this->subScene.renderTarget);