JNGL
Easy to use cross-platform 2D game library
Loading...
Searching...
No Matches
jngl
ShaderBytecode.hpp
Go to the documentation of this file.
1
// Copyright 2026 Jan Niklas Hasse <jhasse@bixense.com>
2
// For conditions of distribution and use, see copyright notice in LICENSE.txt
5
#pragma once
6
7
#include <
cstdint
>
8
#include <
span
>
9
#include <
string_view
>
10
11
namespace
jngl
{
12
25
struct
ShaderBytecode
{
27
struct
Uniform
{
28
std::string_view
name;
29
uint32_t offset;
30
uint32_t size;
31
};
32
34
std::span<const uint32_t>
vertex
;
35
std::span<const uint32_t>
fragment;
36
std::span<const Uniform>
uniforms;
37
uint32_t uniformBlockSize;
39
bool
pushConstants
;
40
};
41
42
}
// namespace jngl
std::string_view
cstdint
jngl
JNGL's main namespace.
Definition
Achievement.hpp:10
span
string_view
jngl::ShaderBytecode::Uniform
One of the program's uniforms, see ShaderProgram::getUniformLocation.
Definition
ShaderBytecode.hpp:27
jngl::ShaderBytecode
A ShaderProgram's GLSL compiled at build time by jngl-shaderc, for the Vulkan (SPIR-V),...
Definition
ShaderBytecode.hpp:25
jngl::ShaderBytecode::vertex
std::span< const uint32_t > vertex
As 32-bit words.
Definition
ShaderBytecode.hpp:34
jngl::ShaderBytecode::pushConstants
bool pushConstants
Whether the uniforms are push constants rather than a uniform buffer.
Definition
ShaderBytecode.hpp:39