First pass of new shader manager

This commit is contained in:
2023-04-04 21:49:20 -07:00
parent a52f54b3e6
commit 095a60e5dc
26 changed files with 302 additions and 31 deletions

View File

@ -6,7 +6,6 @@
#pragma once
#include "scene/SceneItemComponent.hpp"
#include "UICanvas.hpp"
#include "display/shader/Shader.hpp"
#include "util/mathutils.hpp"
namespace Dawn {

View File

@ -29,7 +29,7 @@ std::vector<struct ShaderPassItem> UIImage::getPassItems(
glm::mat4 proj, glm::mat4 view
) {
struct ShaderPassItem item;
auto shader = &getGame()->renderManager.uiShaderProgram;
auto shader = &getGame()->renderManager.uiShader->program;
item.shaderProgram = shader;
item.colorValues[shader->paramColor] = this->color;
item.matrixValues[shader->paramProjection] = proj;

View File

@ -63,7 +63,7 @@ std::vector<struct ShaderPassItem> UILabel::getPassItems(
this->updateMesh();
struct ShaderPassItem item;
auto shader = &getGame()->renderManager.uiShaderProgram;
auto shader = &getGame()->renderManager.uiShader->program;
item.shaderProgram = shader;
item.colorValues[shader->paramColor] = textColor;
item.matrixValues[shader->paramProjection] = proj;