Class: Raylib::RlDrawCall

Inherits:
FFI::Struct
  • Object
show all
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

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

#modeInteger

Drawing mode: LINES, TRIANGLES, QUADS

Returns:

  • (Integer)

    mode



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_idInteger

Texture id to be used on the draw -> Use to create new draw call if changes

Returns:

  • (Integer)

    textureId



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_sObject



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_alignmentInteger

Number of vertex required for index alignment (LINES, TRIANGLES)

Returns:

  • (Integer)

    vertexAlignment



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_countInteger

Number of vertex of the draw

Returns:

  • (Integer)

    vertexCount



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