picogl.backend.modern.core.shader.helpers
Shader Compilation
Functions
log_gl_error |
|
|
compile_shader |
|
Read shader source from a file. |
|
Module Contents
- picogl.backend.modern.core.shader.helpers.compile_shader(program: int, shader: int, shader_source_list: str)[source]
compile_shader
- Parameters:
program – int
shader – int
shader_source_list – list
- picogl.backend.modern.core.shader.helpers.read_shader_source(shader_file_name: str | pathlib.Path, glsl_dir: str | pathlib.Path | None = None) str[source]
Read shader source from a file.
- Parameters:
shader_file_name – Shader filename or already-joined path
glsl_dir – Optional directory to join with a bare filename. Ignored when
shader_file_nameis absolute or already underglsl_dir(asShaderFilesproduces).
- Returns:
Shader source as a string
- picogl.backend.modern.core.shader.helpers._path_already_under(path: pathlib.Path, base: pathlib.Path) bool[source]