abstract class Nya::Render::Backend

Overview

Interface for graphics backend

Direct Known Subclasses

Defined in:

nya/render/backend.cr

Class Method Summary

Instance Method Summary

Class Method Detail

def self.backends #

[View source]
def self.backends=(backends : Hash(String, ::Nya::Render::Backend.class)) #

[View source]

Instance Method Detail

abstract def apply_shader_vars(prog : ShaderProgram) #

[View source]
abstract def compile_shaders(program : ShaderProgram) #

[View source]
abstract def create_object(objtype : Symbol) : Metadata #

[View source]
abstract def current_camera : Camera #

[View source]
abstract def delete_object(m : Metadata) #

[View source]
abstract def delete_shaders(shp : ShaderProgram) #

[View source]
abstract def draw_camera(camera : Camera, &) #

Wraps the execution of a block with calls required to render a camera


[View source]
abstract def draw_game_object(object : Nya::GameObject, &) #

Draws a game object


[View source]
abstract def draw_mesh(mesh : Mesh) #

Draws a mesh


[View source]
abstract def draw_texture(texture : Texture, x, y, w, h) #

Draws a texture at specified position


[View source]
abstract def draw_texture(texture : Metadata, x, y, w, h) #

Draws a texture specified by low-level texture id at specified position


[View source]
abstract def draw_texture(texture : Texture, pts : Array(CrystalEdge::Vector3)) #

Draws a 3D texture


[View source]
abstract def draw_texture(texture : Metadata, pts : Array(CrystalEdge::Vector3)) #

ditto


[View source]
abstract def draw_texture(texture : Texture2D) #

Draws a texture


[View source]
abstract def draw_texture(texture : Texture3D) #

Draws a texture


[View source]
abstract def has_title? : Bool #

[View source]
abstract def load_texture(m : Metadata, w, h, texture : Bytes) #

[View source]
abstract def max_textures : Int32 #

[View source]
abstract def project(camera : Camera, point : CrystalEdge::Vector3) : CrystalEdge::Vector3 #

[View source]
abstract def project(point : CrystalEdge::Vector3) : CrystalEdge::Vector3 #

[View source]
abstract def quit #

[View source]
abstract def relink_program(prog : ShaderProgram) #

[View source]
abstract def render(&) #

[View source]
abstract def resizeable? : Bool #

[View source]
abstract def shader_extensions : Array(String) #

[View source]
abstract def shader_formats : Array(String) #

[View source]
abstract def size : CrystalEdge::Vector2 #

[View source]
abstract def size=(size : CrystalEdge::Vector2) #

[View source]
abstract def supports_shaders? : Bool #

[View source]
abstract def title : String #

[View source]
abstract def title=(title : String) #

[View source]
abstract def unproject(camera : Camera, point : CrystalEdge::Vector3) : CrystalEdge::Vector3 #

[View source]
abstract def unproject(point : CrystalEdge::Vector3) : CrystalEdge::Vector3 #

[View source]
abstract def unuse_shader_program #

[View source]
abstract def update #

[View source]
abstract def use_shader_program(prog : ShaderProgram) #

[View source]
abstract def with_shader_program(shp : ShaderProgram | Nil, &) #

[View source]