OpenGL shader object that compiles GLSL source.
More...
#include <src/platform/linux/graphics.h>
|
| std::string | err_str () |
| | Read the shader compiler log.
|
| GLuint | handle () const |
| | Return the native handle owned by the wrapper.
|
|
| static util::Either< shader_t, std::string > | compile (const std::string_view &source, GLenum type) |
| | Compile an OpenGL shader and report compiler errors.
|
OpenGL shader object that compiles GLSL source.
◆ compile()
| util::Either< shader_t, std::string > gl::shader_t::compile |
( |
const std::string_view & | source, |
|
|
GLenum | type ) |
|
static |
Compile an OpenGL shader and report compiler errors.
- Parameters
-
| source | Shader source code to compile. |
| type | OpenGL shader type, such as GL_VERTEX_SHADER or GL_FRAGMENT_SHADER. |
- Returns
- Compiled shader object, or compiler log on failure.
◆ err_str()
| std::string gl::shader_t::err_str |
( |
| ) |
|
Read the shader compiler log.
- Returns
- Shader compiler error log.
◆ handle()
| GLuint gl::shader_t::handle |
( |
| ) |
const |
Return the native handle owned by the wrapper.
- Returns
- OpenGL shader object name.
The documentation for this class was generated from the following files: