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,6 +6,7 @@
#pragma once
#include "event/Event.hpp"
#include "asset/Asset.hpp"
#include "display/shader/ShaderManager.hpp"
#include "scene/debug/SceneDebugLine.hpp"
#include "physics/ScenePhysicsManager.hpp"
#include "state/StateEvent.hpp"

View File

@ -5,7 +5,7 @@
#pragma once
#include "scene/SceneItemComponent.hpp"
#include "display/shader/Shader.hpp"
#include "display/shader/ShaderManager.hpp"
namespace Dawn {
class Material : public SceneItemComponent {

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;

View File

@ -6,7 +6,7 @@
#pragma once
#include "display/Color.hpp"
#include "display/mesh/Mesh.hpp"
#include "display/shader/Shader.hpp"
#include "display/shader/ShaderManager.hpp"
#define SCENE_DEBUG_LINE_VERTICE_COUNT 2
#define SCENE_DEBUG_LINE_INDICE_COUNT 2