OpenGL shader program with attached shader stages.
More...
#include <src/platform/linux/graphics.h>
|
| void | bind (const buffer_t &buffer) |
| | Bind this program and attach a uniform buffer block.
|
| |
| std::string | err_str () |
| | Read the program linker log.
|
| |
| GLuint | handle () const |
| | Return the native handle owned by the wrapper.
|
| |
| std::optional< buffer_t > | uniform (const char *block, std::pair< const char *, std::string_view > *members, std::size_t count) |
| | Query a uniform location from an OpenGL program.
|
| |
OpenGL shader program with attached shader stages.
◆ bind()
| void gl::program_t::bind |
( |
const buffer_t & | buffer | ) |
|
Bind this program and attach a uniform buffer block.
- Parameters
-
| buffer | Uniform buffer block used by the program. |
◆ err_str()
| std::string gl::program_t::err_str |
( |
| ) |
|
Read the program linker log.
- Returns
- OpenGL program link error log.
◆ handle()
| GLuint gl::program_t::handle |
( |
| ) |
const |
Return the native handle owned by the wrapper.
- Returns
- OpenGL program object name.
◆ link()
Link an OpenGL program from compiled shaders.
- Parameters
-
| vert | Compiled vertex shader object. |
| frag | Compiled fragment shader object. |
- Returns
- Linked program object, or linker log on failure.
◆ uniform()
| std::optional< buffer_t > gl::program_t::uniform |
( |
const char * | block, |
|
|
std::pair< const char *, std::string_view > * | members, |
|
|
std::size_t | count ) |
Query a uniform location from an OpenGL program.
- Parameters
-
| block | Uniform block name to bind. |
| members | Uniform members to query within the block. |
| count | Number of uniform members to resolve. |
- Returns
- Uniform buffer wrapper, or std::nullopt when lookup/allocation fails.
The documentation for this class was generated from the following files: