module charge.gfx.texture
Graphics

Source file for Texture(s).

Code Map

//! Source file for Texture(s).
module charge.gfx.texture;


//! Base texture class.
class Texture : sys.Resource
{
public:
	enum uri;


public:
	target: GLuint;
	id: GLuint;
	width: u32;
	height: u32;
	depth: u32;


public:
	fn bind() { }
	fn unbind() { }
}

class Texture2D : Texture
{
public:
	static fn makeRGBA8(name: string, width: u32, height: u32, levels: u32) Texture2D { }
	static fn makeDepth24(name: string, width: u32, height: u32, levels: u32) Texture2D { }
	static fn makeAlpha(name: string, width: u32, height: u32, levels: u32) Texture2D { }
	static fn makeRGBA8MSAA(name: string, width: u32, height: u32, numSamples: u32) Texture2D { }
	static fn makeDepth24MSAA(name: string, width: u32, height: u32, numSamples: u32) Texture2D { }
	static fn makeInternalMSAA(name: string, width: u32, height: u32, numSamples: u32, internal: GLuint) Texture2D { }
	static fn makeInternal(name: string, width: u32, height: u32, levels: u32, internal: GLuint) Texture2D { }
	static fn makeId(name: string, target: GLuint, id: GLuint, width: u32, height: u32) Texture2D { }
	static fn load(filename: string) Texture2D { }
	static fn load(file: sys.File) Texture2D { }
}

class Texture2DArray : Texture
{
public:
	fn loadImageIntoLayer(file: sys.File, layer: GLint) { }


public:
	static fn makeRGBA8(name: string, width: u32, height: u32, layers: u32, levels: u32) Texture2DArray { }
	static fn makeInternal(name: string, width: u32, height: u32, layers: u32, levels: u32, internal: GLuint) Texture2DArray { }
	static fn makeId(name: string, target: GLuint, id: GLuint, width: u32, height: u32, layers: u32) Texture2DArray { }
}

//! Dereference and reference helper function.
fn reference(dec: Texture, inc: Texture) { }
//! Dereference and reference helper function.
fn reference(dec: Texture2D, inc: Texture2D) { }
fn reference(dec: Texture, inc: Texture)

Dereference and reference helper function.

Parameters

dec

Object to dereference passed by reference, set to inc.

inc

Object to reference.

class Texture : sys.Resource

Base texture class.