Class: Raylib::RlDrawCall
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Raylib::RlDrawCall
- Defined in:
- lib/raylib/rlgl/structs/rl_draw_call.rb
Overview
of those state-change happens (this is done in core module)
Class Method Summary collapse
Instance Method Summary collapse
-
#mode ⇒ Integer
Drawing mode: LINES, TRIANGLES, QUADS.
-
#mode=(new_mode) ⇒ Object
Sets Drawing mode: LINES, TRIANGLES, QUADS.
-
#texture_id ⇒ Integer
Texture id to be used on the draw -> Use to create new draw call if changes.
-
#texture_id=(new_texture_id) ⇒ Object
Sets Texture id to be used on the draw -> Use to create new draw call if changes.
- #to_s ⇒ Object
-
#vertex_alignment ⇒ Integer
Number of vertex required for index alignment (LINES, TRIANGLES).
-
#vertex_alignment=(new_vertex_alignment) ⇒ Object
Sets Number of vertex required for index alignment (LINES, TRIANGLES).
-
#vertex_count ⇒ Integer
Number of vertex of the draw.
-
#vertex_count=(new_vertex_count) ⇒ Object
Sets Number of vertex of the draw.
Class Method Details
.create(mode, vertex_count, vertex_alignment, texture_id) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/raylib/rlgl/structs/rl_draw_call.rb', line 11 def self.create(mode, vertex_count, vertex_alignment, texture_id) new.tap do |instance| instance[:mode] = mode instance[:vertexCount] = vertex_count instance[:vertexAlignment] = vertex_alignment instance[:textureId] = texture_id end end |
Instance Method Details
#mode ⇒ Integer
Drawing mode: LINES, TRIANGLES, QUADS
26 |
# File 'lib/raylib/rlgl/structs/rl_draw_call.rb', line 26 def mode = self[:mode] |
#mode=(new_mode) ⇒ Object
Sets Drawing mode: LINES, TRIANGLES, QUADS
29 30 31 |
# File 'lib/raylib/rlgl/structs/rl_draw_call.rb', line 29 def mode=(new_mode) self[:mode] = new_mode end |
#texture_id ⇒ Integer
Texture id to be used on the draw -> Use to create new draw call if changes
53 |
# File 'lib/raylib/rlgl/structs/rl_draw_call.rb', line 53 def texture_id = self[:textureId] |
#texture_id=(new_texture_id) ⇒ Object
Sets Texture id to be used on the draw -> Use to create new draw call if changes
56 57 58 |
# File 'lib/raylib/rlgl/structs/rl_draw_call.rb', line 56 def texture_id=(new_texture_id) self[:textureId] = new_texture_id end |
#to_s ⇒ Object
20 21 22 |
# File 'lib/raylib/rlgl/structs/rl_draw_call.rb', line 20 def to_s "Raylib::RlDrawCall##{object_id} mode=#{mode} vertex_count=#{vertex_count} vertex_alignment=#{vertex_alignment} texture_id=#{texture_id}" end |
#vertex_alignment ⇒ Integer
Number of vertex required for index alignment (LINES, TRIANGLES)
44 |
# File 'lib/raylib/rlgl/structs/rl_draw_call.rb', line 44 def vertex_alignment = self[:vertexAlignment] |
#vertex_alignment=(new_vertex_alignment) ⇒ Object
Sets Number of vertex required for index alignment (LINES, TRIANGLES)
47 48 49 |
# File 'lib/raylib/rlgl/structs/rl_draw_call.rb', line 47 def vertex_alignment=(new_vertex_alignment) self[:vertexAlignment] = new_vertex_alignment end |
#vertex_count ⇒ Integer
Number of vertex of the draw
35 |
# File 'lib/raylib/rlgl/structs/rl_draw_call.rb', line 35 def vertex_count = self[:vertexCount] |
#vertex_count=(new_vertex_count) ⇒ Object
Sets Number of vertex of the draw
38 39 40 |
# File 'lib/raylib/rlgl/structs/rl_draw_call.rb', line 38 def vertex_count=(new_vertex_count) self[:vertexCount] = new_vertex_count end |