Class: RLSL::RuntimeShader
- Inherits:
-
Object
- Object
- RLSL::RuntimeShader
- Defined in:
- lib/rlsl/runtime_shader.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#uniform_names ⇒ Object
readonly
Returns the value of attribute uniform_names.
-
#uniform_types ⇒ Object
readonly
Returns the value of attribute uniform_types.
Instance Method Summary collapse
-
#initialize(name, uniforms) ⇒ RuntimeShader
constructor
A new instance of RuntimeShader.
- #metal? ⇒ Boolean
- #render ⇒ Object
Constructor Details
#initialize(name, uniforms) ⇒ RuntimeShader
Returns a new instance of RuntimeShader.
7 8 9 10 11 |
# File 'lib/rlsl/runtime_shader.rb', line 7 def initialize(name, uniforms) @name = name @uniform_types = normalize_uniform_types(uniforms) @uniform_names = @uniform_types.keys end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/rlsl/runtime_shader.rb', line 5 def name @name end |
#uniform_names ⇒ Object (readonly)
Returns the value of attribute uniform_names.
5 6 7 |
# File 'lib/rlsl/runtime_shader.rb', line 5 def uniform_names @uniform_names end |
#uniform_types ⇒ Object (readonly)
Returns the value of attribute uniform_types.
5 6 7 |
# File 'lib/rlsl/runtime_shader.rb', line 5 def uniform_types @uniform_types end |
Instance Method Details
#metal? ⇒ Boolean
13 14 15 |
# File 'lib/rlsl/runtime_shader.rb', line 13 def false end |
#render ⇒ Object
17 18 19 |
# File 'lib/rlsl/runtime_shader.rb', line 17 def render(*) raise NotImplementedError, "Subclasses must implement render" end |