Class: Raylib::Material
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Raylib::Material
- Defined in:
- lib/raylib/core/structs/material.rb
Overview
Material, includes shader and maps
Class Method Summary collapse
Instance Method Summary collapse
-
#maps ⇒ MaterialMap *
Material maps array (MAX_MATERIAL_MAPS).
-
#maps=(new_maps) ⇒ Object
Sets Material maps array (MAX_MATERIAL_MAPS).
-
#params ⇒ float[4]
Material generic parameters (if required).
-
#params=(new_params) ⇒ Object
Sets Material generic parameters (if required).
-
#shader ⇒ Shader
Material shader.
-
#shader=(new_shader) ⇒ Object
Sets Material shader.
- #to_s ⇒ Object
Class Method Details
.create(shader, maps, params) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/raylib/core/structs/material.rb', line 10 def self.create(shader, maps, params) new.tap do |instance| instance[:shader] = shader instance[:maps] = maps instance[:params] = params end end |
Instance Method Details
#maps ⇒ MaterialMap *
Material maps array (MAX_MATERIAL_MAPS)
33 |
# File 'lib/raylib/core/structs/material.rb', line 33 def maps = self[:maps] |
#maps=(new_maps) ⇒ Object
Sets Material maps array (MAX_MATERIAL_MAPS)
36 37 38 |
# File 'lib/raylib/core/structs/material.rb', line 36 def maps=(new_maps) self[:maps] = new_maps end |
#params ⇒ float[4]
Material generic parameters (if required)
42 |
# File 'lib/raylib/core/structs/material.rb', line 42 def params = self[:params] |
#params=(new_params) ⇒ Object
Sets Material generic parameters (if required)
45 46 47 |
# File 'lib/raylib/core/structs/material.rb', line 45 def params=(new_params) self[:params] = new_params end |
#shader ⇒ Shader
Material shader
24 |
# File 'lib/raylib/core/structs/material.rb', line 24 def shader = self[:shader] |
#shader=(new_shader) ⇒ Object
Sets Material shader
27 28 29 |
# File 'lib/raylib/core/structs/material.rb', line 27 def shader=(new_shader) self[:shader] = new_shader end |
#to_s ⇒ Object
18 19 20 |
# File 'lib/raylib/core/structs/material.rb', line 18 def to_s "Raylib::Material##{object_id} shader=#{shader} maps=#{maps} params=#{params}" end |