View Source Exray.Textures.Texture.Loading (Exray v0.6.0)

Texture loading functionality

Summary

Functions

Load texture for rendering (framebuffer)

Load texture from file into GPU memory (VRAM)

Load cubemap from image, multiple image cubemap layouts supported

Load texture from image data

Check if a render texture is valid (loaded in GPU)

Check if a texture is valid (loaded in GPU)

Unload render texture from GPU memory (VRAM)

Unload texture from GPU memory (VRAM)

Functions

Link to this function

load_render_texture(width, height)

View Source
@spec load_render_texture(width :: integer(), height :: integer()) ::
  texture :: Exray.Structs.RenderTexture.t()

Load texture for rendering (framebuffer)

@spec load_texture(file_name :: binary()) :: texture :: Exray.Structs.Texture.t()

Load texture from file into GPU memory (VRAM)

Link to this function

load_texture_cubemap(image, layout)

View Source
@spec load_texture_cubemap(image :: Exray.Structs.Image.t(), layout :: integer()) ::
  texture :: Exray.Structs.Texture.t()

Load cubemap from image, multiple image cubemap layouts supported

Link to this function

load_texture_from_image(image)

View Source
@spec load_texture_from_image(image :: Exray.Structs.Image.t()) ::
  texture :: Exray.Structs.Texture.t()

Load texture from image data

Link to this function

render_texture_is_ready?(target)

View Source
@spec render_texture_is_ready?(target :: Exray.Structs.RenderTexture.t()) ::
  is_valid :: boolean()

Check if a render texture is valid (loaded in GPU)

Link to this function

texture_is_ready?(texture)

View Source
@spec texture_is_ready?(texture :: Exray.Structs.Texture.t()) :: is_valid :: boolean()

Check if a texture is valid (loaded in GPU)

Link to this function

unload_render_texture(target)

View Source
@spec unload_render_texture(target :: Exray.Structs.RenderTexture.t()) :: :ok

Unload render texture from GPU memory (VRAM)

@spec unload_texture(texture :: Exray.Structs.Texture.t()) :: :ok

Unload texture from GPU memory (VRAM)