Class: Raylib::RlRenderBatch

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/raylib/rlgl/structs/rl_render_batch.rb

Overview

rlRenderBatch type

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create(buffer_count, current_buffer, vertex_buffer, draws, draw_counter, current_depth) ⇒ Object



13
14
15
16
17
18
19
20
21
22
# File 'lib/raylib/rlgl/structs/rl_render_batch.rb', line 13

def self.create(buffer_count, current_buffer, vertex_buffer, draws, draw_counter, current_depth)
  new.tap do |instance|
    instance[:bufferCount] = buffer_count
    instance[:currentBuffer] = current_buffer
    instance[:vertexBuffer] = vertex_buffer
    instance[:draws] = draws
    instance[:drawCounter] = draw_counter
    instance[:currentDepth] = current_depth
  end
end

Instance Method Details

#buffer_countInteger

Number of vertex buffers (multi-buffering support)

Returns:

  • (Integer)

    bufferCount



30
# File 'lib/raylib/rlgl/structs/rl_render_batch.rb', line 30

def buffer_count = self[:bufferCount]

#buffer_count=(new_buffer_count) ⇒ Object

Sets Number of vertex buffers (multi-buffering support)



33
34
35
# File 'lib/raylib/rlgl/structs/rl_render_batch.rb', line 33

def buffer_count=(new_buffer_count)
  self[:bufferCount] = new_buffer_count
end

#current_bufferInteger

Current buffer tracking in case of multi-buffering

Returns:

  • (Integer)

    currentBuffer



39
# File 'lib/raylib/rlgl/structs/rl_render_batch.rb', line 39

def current_buffer = self[:currentBuffer]

#current_buffer=(new_current_buffer) ⇒ Object

Sets Current buffer tracking in case of multi-buffering



42
43
44
# File 'lib/raylib/rlgl/structs/rl_render_batch.rb', line 42

def current_buffer=(new_current_buffer)
  self[:currentBuffer] = new_current_buffer
end

#current_depthFloat

Current depth value for next draw

Returns:

  • (Float)

    currentDepth



75
# File 'lib/raylib/rlgl/structs/rl_render_batch.rb', line 75

def current_depth = self[:currentDepth]

#current_depth=(new_current_depth) ⇒ Object

Sets Current depth value for next draw



78
79
80
# File 'lib/raylib/rlgl/structs/rl_render_batch.rb', line 78

def current_depth=(new_current_depth)
  self[:currentDepth] = new_current_depth
end

#draw_counterInteger

Draw calls counter

Returns:

  • (Integer)

    drawCounter



66
# File 'lib/raylib/rlgl/structs/rl_render_batch.rb', line 66

def draw_counter = self[:drawCounter]

#draw_counter=(new_draw_counter) ⇒ Object

Sets Draw calls counter



69
70
71
# File 'lib/raylib/rlgl/structs/rl_render_batch.rb', line 69

def draw_counter=(new_draw_counter)
  self[:drawCounter] = new_draw_counter
end

#drawsrlDrawCall *

Draw calls array, depends on textureId

Returns:

  • (rlDrawCall *)

    draws



57
# File 'lib/raylib/rlgl/structs/rl_render_batch.rb', line 57

def draws = self[:draws]

#draws=(new_draws) ⇒ Object

Sets Draw calls array, depends on textureId



60
61
62
# File 'lib/raylib/rlgl/structs/rl_render_batch.rb', line 60

def draws=(new_draws)
  self[:draws] = new_draws
end

#to_sObject



24
25
26
# File 'lib/raylib/rlgl/structs/rl_render_batch.rb', line 24

def to_s
  "Raylib::RlRenderBatch##{object_id} buffer_count=#{buffer_count} current_buffer=#{current_buffer} vertex_buffer=#{vertex_buffer} draws=#{draws} draw_counter=#{draw_counter} current_depth=#{current_depth}"
end

#vertex_bufferrlVertexBuffer *

Dynamic buffer(s) for vertex data

Returns:

  • (rlVertexBuffer *)

    vertexBuffer



48
# File 'lib/raylib/rlgl/structs/rl_render_batch.rb', line 48

def vertex_buffer = self[:vertexBuffer]

#vertex_buffer=(new_vertex_buffer) ⇒ Object

Sets Dynamic buffer(s) for vertex data



51
52
53
# File 'lib/raylib/rlgl/structs/rl_render_batch.rb', line 51

def vertex_buffer=(new_vertex_buffer)
  self[:vertexBuffer] = new_vertex_buffer
end