start shader

This commit is contained in:
2023-11-16 15:58:57 -06:00
parent 04dbead9a2
commit 55f629c7b5
15 changed files with 238 additions and 2 deletions

View File

@ -10,4 +10,5 @@ target_sources(${DAWN_TARGET_NAME}
)
# Subdirs
add_subdirectory(mesh)
add_subdirectory(mesh)
add_subdirectory(shader)

View File

@ -0,0 +1,11 @@
# Copyright (c) 2023 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DAWN_TARGET_NAME}
PRIVATE
Shader.cpp
ShaderStage.cpp
)

View File

@ -0,0 +1,6 @@
// Copyright (c) 2023 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#include "Shader.hpp"

View File

@ -0,0 +1,16 @@
// Copyright (c) 2023 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#pragma once
#include "display/ShaderStage.hpp"
#include "display/IShader.hpp"
namespace Dawn {
template<struct T>
class Shader : public IShader<T> {
public:
};
}

View File

@ -0,0 +1,17 @@
// Copyright (c) 2023 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#include "ShaderStage.hpp"
using namespace Dawn;
ShaderStage::ShaderStage(const enum ShaderType type) : type(type) {
}
void ShaderStage::compile(const std::string source) {
}
ShaderStage::~ShaderStage() {
}

View File

@ -0,0 +1,36 @@
// Copyright (c) 2023 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#pragma once
#include "dawnopengl.hpp"
#include "dawnlibs.hpp"
#include "display/shader/IShaderStage.hpp"
namespace Dawn {
class ShaderStage {
public:
GLuint id = -1;
const enum ShaderType type;
/**
* Constructs a new ShaderStage.
*
* @param type The type of shader this is.
*/
ShaderStage(const enum ShaderType type);
/**
* Compiles the shader stage.
*
* @param source The source code to compile.
*/
void compile(const std::string source);
/**
* Disposes of the shader stage.
*/
virtual ~ShaderStage();
};
}