|
JNGL
Easy to use cross-platform 2D game library
|
A ShaderProgram's GLSL compiled at build time by jngl-shaderc, for the Vulkan (SPIR-V), the Direct3D 12 (DXBC) or the Metal (MSL, which it compiles when it loads it) renderer. More...
#include <jngl/ShaderBytecode.hpp>
Classes | |
| struct | Uniform |
| One of the program's uniforms, see ShaderProgram::getUniformLocation. More... | |
Public Attributes | |
| std::span< const uint32_t > | vertex |
| As 32-bit words. | |
| std::span< const uint32_t > | fragment |
| std::span< const Uniform > | uniforms |
| uint32_t | uniformBlockSize |
| bool | pushConstants |
| Whether the uniforms are push constants rather than a uniform buffer. | |
A ShaderProgram's GLSL compiled at build time by jngl-shaderc, for the Vulkan (SPIR-V), the Direct3D 12 (DXBC) or the Metal (MSL, which it compiles when it loads it) renderer.
Direct3D 12, Metal and Vulkan on Android can't compile GLSL at runtime, so they only support ShaderPrograms created from these, see JNGL_PRECOMPILED_SHADERS. jngl-shaderc generates a header with one for each program, see jngl_compile_shaders() in JNGL's CMakeLists.txt:
Definition at line 25 of file ShaderBytecode.hpp.
| std::span<const uint32_t> vertex |
As 32-bit words.
Definition at line 34 of file ShaderBytecode.hpp.
| std::span<const uint32_t> fragment |
Definition at line 35 of file ShaderBytecode.hpp.
Definition at line 36 of file ShaderBytecode.hpp.
| uint32_t uniformBlockSize |
Definition at line 37 of file ShaderBytecode.hpp.
| bool pushConstants |
Whether the uniforms are push constants rather than a uniform buffer.
Definition at line 39 of file ShaderBytecode.hpp.