Class: Texture

Inherits:
LiteRGSS::Bitmap show all
Defined in:
docs/0_Dependencies.rb

Overview

Class that stores an image loaded from file or memory into the VRAM

Constant Summary collapse

SUPPORTED_EXTS =

List of supported extensions

['.png', '.PNG', '.jpg']

Instance Attribute Summary

Attributes inherited from LiteRGSS::Bitmap

#height, #rect, #width

Instance Method Summary collapse

Methods inherited from LiteRGSS::Bitmap

new, #to_png, #to_png_file, #update

Methods inherited from LiteRGSS::Disposable

#dispose, #disposed?

Constructor Details

#initialize(filename, from_mem = nil) ⇒ Texture

Initialize the texture, add automatically the extension to the filename

Parameters:

  • filename (String)

    Filename or FileData

  • from_mem (Boolean) (defaults to: nil)

    load the file from memory (then filename is FileData)



614
615
# File 'docs/0_Dependencies.rb', line 614

def initialize(filename, from_mem = nil)
end