33 lines
840 B
C++
33 lines
840 B
C++
// Copyright (c) 2023 Dominic Masters
|
|
//
|
|
// This software is released under the MIT License.
|
|
// https://opensource.org/licenses/MIT
|
|
|
|
#pragma once
|
|
#include "display/shader/IShader.hpp"
|
|
#include "dawnopengl.hpp"
|
|
|
|
namespace Dawn {
|
|
struct ShaderParameter {
|
|
std::string name;
|
|
size_t offset;
|
|
enum ShaderParameterType type;
|
|
size_t count;
|
|
GLint location = -1;
|
|
|
|
/**
|
|
* Construct a new shader parameter.
|
|
*
|
|
* @param name Name of the parameter within the shader.
|
|
* @param offset Offset, relative to the structure of the data.
|
|
* @param type Type of the parameter.
|
|
* @param count How many elements in the array (if multiple).
|
|
*/
|
|
ShaderParameter(
|
|
const std::string &name,
|
|
const void *offset,
|
|
const enum ShaderParameterType type,
|
|
const size_t count = 1
|
|
);
|
|
};
|
|
} |