Class: Raylib::RenderTexture

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

Overview

RenderTexture, fbo for texture rendering

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create(id, texture, depth) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/raylib/core/structs/render_texture.rb', line 10

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

Instance Method Details

#depthTexture

Depth buffer attachment texture

Returns:



42
# File 'lib/raylib/core/structs/render_texture.rb', line 42

def depth = self[:depth]

#depth=(new_depth) ⇒ Object

Sets Depth buffer attachment texture



45
46
47
# File 'lib/raylib/core/structs/render_texture.rb', line 45

def depth=(new_depth)
  self[:depth] = new_depth
end

#idInteger

OpenGL framebuffer object id

Returns:

  • (Integer)

    id



24
# File 'lib/raylib/core/structs/render_texture.rb', line 24

def id = self[:id]

#id=(new_id) ⇒ Object

Sets OpenGL framebuffer object id



27
28
29
# File 'lib/raylib/core/structs/render_texture.rb', line 27

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

#textureTexture

Color buffer attachment texture

Returns:



33
# File 'lib/raylib/core/structs/render_texture.rb', line 33

def texture = self[:texture]

#texture=(new_texture) ⇒ Object

Sets Color buffer attachment texture



36
37
38
# File 'lib/raylib/core/structs/render_texture.rb', line 36

def texture=(new_texture)
  self[:texture] = new_texture
end

#to_sObject



18
19
20
# File 'lib/raylib/core/structs/render_texture.rb', line 18

def to_s
  "Raylib::RenderTexture##{object_id} id=#{id} texture=#{texture} depth=#{depth}"
end