start shader
This commit is contained in:
@ -10,4 +10,5 @@ target_sources(${DAWN_TARGET_NAME}
|
||||
)
|
||||
|
||||
# Subdirs
|
||||
add_subdirectory(mesh)
|
||||
add_subdirectory(mesh)
|
||||
add_subdirectory(shader)
|
11
src/dawnopengl/display/shader/CMakeLists.txt
Normal file
11
src/dawnopengl/display/shader/CMakeLists.txt
Normal 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
|
||||
)
|
6
src/dawnopengl/display/shader/Shader.cpp
Normal file
6
src/dawnopengl/display/shader/Shader.cpp
Normal 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"
|
16
src/dawnopengl/display/shader/Shader.hpp
Normal file
16
src/dawnopengl/display/shader/Shader.hpp
Normal 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:
|
||||
|
||||
};
|
||||
}
|
17
src/dawnopengl/display/shader/ShaderStage.cpp
Normal file
17
src/dawnopengl/display/shader/ShaderStage.cpp
Normal 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() {
|
||||
}
|
36
src/dawnopengl/display/shader/ShaderStage.hpp
Normal file
36
src/dawnopengl/display/shader/ShaderStage.hpp
Normal 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();
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user