Class: Raylib::Shader

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

Overview

Shader

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create(id, locs) ⇒ Object



9
10
11
12
13
14
# File 'lib/raylib/core/structs/shader.rb', line 9

def self.create(id, locs)
  new.tap do |instance|
    instance[:id] = id
    instance[:locs] = locs
  end
end

Instance Method Details

#idInteger

Shader program id

Returns:

  • (Integer)

    id



22
# File 'lib/raylib/core/structs/shader.rb', line 22

def id = self[:id]

#id=(new_id) ⇒ Object

Sets Shader program id



25
26
27
# File 'lib/raylib/core/structs/shader.rb', line 25

def id=(new_id)
  self[:id] = new_id
end

#locsint *

Shader locations array (RL_MAX_SHADER_LOCATIONS)

Returns:

  • (int *)

    locs



31
# File 'lib/raylib/core/structs/shader.rb', line 31

def locs = self[:locs]

#locs=(new_locs) ⇒ Object

Sets Shader locations array (RL_MAX_SHADER_LOCATIONS)



34
35
36
# File 'lib/raylib/core/structs/shader.rb', line 34

def locs=(new_locs)
  self[:locs] = new_locs
end

#to_sObject



16
17
18
# File 'lib/raylib/core/structs/shader.rb', line 16

def to_s
  "Raylib::Shader##{object_id} id=#{id} locs=#{locs}"
end