std140 implementation
This commit is contained in:
@@ -7,10 +7,11 @@
|
||||
|
||||
namespace zgl
|
||||
{
|
||||
struct material_handle
|
||||
// TODO implement
|
||||
struct material_handle : resource_handle
|
||||
{
|
||||
std::optional<texture_handle> texture{ std::nullopt };
|
||||
std::optional<surface_properties_handle> surface_properties{ std::nullopt };
|
||||
std::optional<alpha_handle> alpha{ std::nullopt };
|
||||
inline void bind() const;
|
||||
inline static void unbind();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "GL/glew.h"
|
||||
#include "opengl/shader_program_variable.hpp"
|
||||
#include "opengl/shader_uniform.hpp"
|
||||
|
||||
#include "opengl/shader_program_variable.hpp"
|
||||
#include "opengl/shader_uniform.hpp"
|
||||
#include "util/uix.hpp"
|
||||
#include <span>
|
||||
|
||||
@@ -17,12 +17,12 @@ struct shader_program_handle
|
||||
inline void bind() const;
|
||||
static void unbind();
|
||||
|
||||
template<shader_program_variable::info_type VariableInfo, typename T>
|
||||
template<shader_uniform::info_type VariableInfo, typename T>
|
||||
void set_uniform(const T& value) const;
|
||||
|
||||
[[nodiscard]] attribute_support_type check_attribute_support(std::span<const shader_program_variable> attributes) const;
|
||||
[[nodiscard]] attribute_support_type check_attribute_support(std::span<const shader_uniform> attributes) const;
|
||||
|
||||
[[nodiscard]] uniform_support_type check_uniform_support(std::span<const shader_program_variable> uniforms) const;
|
||||
[[nodiscard]] uniform_support_type check_uniform_support(std::span<const shader_uniform> uniforms) const;
|
||||
|
||||
[[nodiscard]] bool valid() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user