This commit is contained in:
2024-12-23 16:14:50 -06:00
parent c87f13b063
commit 698aeb2afc
4 changed files with 54 additions and 11 deletions

View File

@@ -0,0 +1,23 @@
// Copyright (c) 2024 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#pragma once
#include "dawn.hpp"
namespace Dawn {
class IShaderEntry {
};
class IShaderProgram2 {
private:
std::vector<IShaderEntry> entries;
protected:
public:
};
}

View File

@@ -12,6 +12,7 @@
#include "component/RPGMap.hpp"
#include "asset/loader/ShaderLoader.hpp"
#include <fstream>
using namespace Dawn;
@@ -32,8 +33,16 @@ void Game::initManagers() {
auto sl = assetManager->get<ShaderLoader>("shaders/hello-world.slang");
sl->loadImmediately();
auto code1 = sl->getEntryPointCode("vertexMain");
std::fstream file("vertexMain.glsl", std::ios::out);
file << code1;
file.close();
auto code2 = sl->getEntryPointCode("fragmentMain");
std::fstream file2("fragmentMain.glsl", std::ios::out);
file2 << code2;
file2.close();
}
Game::~Game() {