abstract class Prism::DefaultShader

Overview

A light shader wrapper that loads shader programs from the code. This is used for creating shaders in the stdlib. If you want to create your own shader you should inherit from Shader::Program instead. It would be nice if we had the backed file system built into this shader so that subclasses can manualy bake their own shaders. Keeping all the shaders in this single directory is messy.

TODO allow shaders to bind their own shader files instead of using the defaults. This will allow grouping features together. e.g. all the skybox logic can go into a skybox folder.

Direct Known Subclasses

Defined in:

prism/stdlib/shaders/default_shader.cr

Instance methods inherited from class Prism::Shader::Program

finalize finalize, set_uniform(name : String, value : Array(Shader::UniformStruct))
set_uniform(name : String, value : Shader::UniformStruct)
set_uniform(name : String, value : LibGL::Int)
set_uniform(name : String, value : LibGL::Float)
set_uniform(name : String, value : Vector3f)
set_uniform(name : String, value : Vector2f)
set_uniform(name : String, value : Matrix4f)
set_uniform(name : String, value : Bool)
set_uniform(name : String, value : Prism::Texture)
set_uniform
, start start, stop stop

Constructor methods inherited from class Prism::Shader::Program

new(file_name : String, &shader_reader : String -> String) new

Class methods inherited from class Prism::Shader::Program

pool pool