Class: Raylib::RlVertexBuffer
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Raylib::RlVertexBuffer
- Defined in:
- lib/raylib/rlgl/structs/rl_vertex_buffer.rb
Overview
Dynamic vertex buffers (position + texcoords + colors + indices arrays)
Class Method Summary collapse
Instance Method Summary collapse
-
#colors ⇒ unsigned char *
Vertex colors (RGBA - 4 components per vertex) (shader-location = 3).
-
#colors=(new_colors) ⇒ Object
Sets Vertex colors (RGBA - 4 components per vertex) (shader-location = 3).
-
#element_count ⇒ Integer
Number of elements in the buffer (QUADS).
-
#element_count=(new_element_count) ⇒ Object
Sets Number of elements in the buffer (QUADS).
-
#indices ⇒ unsigned int *
Vertex indices (in case vertex data comes indexed) (6 indices per quad).
-
#indices=(new_indices) ⇒ Object
Sets Vertex indices (in case vertex data comes indexed) (6 indices per quad).
-
#texcoords ⇒ float *
Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1).
-
#texcoords=(new_texcoords) ⇒ Object
Sets Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1).
- #to_s ⇒ Object
-
#vao_id ⇒ Integer
OpenGL Vertex Array Object id.
-
#vao_id=(new_vao_id) ⇒ Object
Sets OpenGL Vertex Array Object id.
-
#vbo_id ⇒ unsigned int[4]
OpenGL Vertex Buffer Objects id (4 types of vertex data).
-
#vbo_id=(new_vbo_id) ⇒ Object
Sets OpenGL Vertex Buffer Objects id (4 types of vertex data).
-
#vertices ⇒ float *
Vertex position (XYZ - 3 components per vertex) (shader-location = 0).
-
#vertices=(new_vertices) ⇒ Object
Sets Vertex position (XYZ - 3 components per vertex) (shader-location = 0).
Class Method Details
.create(element_count, vertices, texcoords, colors, indices, vao_id, vbo_id) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/raylib/rlgl/structs/rl_vertex_buffer.rb', line 14 def self.create(element_count, vertices, texcoords, colors, indices, vao_id, vbo_id) new.tap do |instance| instance[:elementCount] = element_count instance[:vertices] = vertices instance[:texcoords] = texcoords instance[:colors] = colors instance[:indices] = indices instance[:vaoId] = vao_id instance[:vboId] = vbo_id end end |
Instance Method Details
#colors ⇒ unsigned char *
Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)
59 |
# File 'lib/raylib/rlgl/structs/rl_vertex_buffer.rb', line 59 def colors = self[:colors] |
#colors=(new_colors) ⇒ Object
Sets Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)
62 63 64 |
# File 'lib/raylib/rlgl/structs/rl_vertex_buffer.rb', line 62 def colors=(new_colors) self[:colors] = new_colors end |
#element_count ⇒ Integer
Number of elements in the buffer (QUADS)
32 |
# File 'lib/raylib/rlgl/structs/rl_vertex_buffer.rb', line 32 def element_count = self[:elementCount] |
#element_count=(new_element_count) ⇒ Object
Sets Number of elements in the buffer (QUADS)
35 36 37 |
# File 'lib/raylib/rlgl/structs/rl_vertex_buffer.rb', line 35 def element_count=(new_element_count) self[:elementCount] = new_element_count end |
#indices ⇒ unsigned int *
Vertex indices (in case vertex data comes indexed) (6 indices per quad)
68 |
# File 'lib/raylib/rlgl/structs/rl_vertex_buffer.rb', line 68 def indices = self[:indices] |
#indices=(new_indices) ⇒ Object
Sets Vertex indices (in case vertex data comes indexed) (6 indices per quad)
71 72 73 |
# File 'lib/raylib/rlgl/structs/rl_vertex_buffer.rb', line 71 def indices=(new_indices) self[:indices] = new_indices end |
#texcoords ⇒ float *
Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)
50 |
# File 'lib/raylib/rlgl/structs/rl_vertex_buffer.rb', line 50 def texcoords = self[:texcoords] |
#texcoords=(new_texcoords) ⇒ Object
Sets Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)
53 54 55 |
# File 'lib/raylib/rlgl/structs/rl_vertex_buffer.rb', line 53 def texcoords=(new_texcoords) self[:texcoords] = new_texcoords end |
#to_s ⇒ Object
26 27 28 |
# File 'lib/raylib/rlgl/structs/rl_vertex_buffer.rb', line 26 def to_s "Raylib::RlVertexBuffer##{object_id} element_count=#{element_count} vertices=#{vertices} texcoords=#{texcoords} colors=#{colors} indices=#{indices} vao_id=#{vao_id} vbo_id=#{vbo_id}" end |
#vao_id ⇒ Integer
OpenGL Vertex Array Object id
77 |
# File 'lib/raylib/rlgl/structs/rl_vertex_buffer.rb', line 77 def vao_id = self[:vaoId] |
#vao_id=(new_vao_id) ⇒ Object
Sets OpenGL Vertex Array Object id
80 81 82 |
# File 'lib/raylib/rlgl/structs/rl_vertex_buffer.rb', line 80 def vao_id=(new_vao_id) self[:vaoId] = new_vao_id end |
#vbo_id ⇒ unsigned int[4]
OpenGL Vertex Buffer Objects id (4 types of vertex data)
86 |
# File 'lib/raylib/rlgl/structs/rl_vertex_buffer.rb', line 86 def vbo_id = self[:vboId] |
#vbo_id=(new_vbo_id) ⇒ Object
Sets OpenGL Vertex Buffer Objects id (4 types of vertex data)
89 90 91 |
# File 'lib/raylib/rlgl/structs/rl_vertex_buffer.rb', line 89 def vbo_id=(new_vbo_id) self[:vboId] = new_vbo_id end |
#vertices ⇒ float *
Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
41 |
# File 'lib/raylib/rlgl/structs/rl_vertex_buffer.rb', line 41 def vertices = self[:vertices] |
#vertices=(new_vertices) ⇒ Object
Sets Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
44 45 46 |
# File 'lib/raylib/rlgl/structs/rl_vertex_buffer.rb', line 44 def vertices=(new_vertices) self[:vertices] = new_vertices end |