Yage3D.net
 

yage.resource.texture

Authors:
Eric Poggel

License:
LGPL v3

struct TextureInstance ;
An instance of a Texture. This allows many options to be set per instance of a Texture instead of creating multiple copies of the Texture (and consuming valuable memory) just to change filtering, clamping, or relative scale.

int blend ;
Set how this texture is blended with others in the same pass via multi-texturing.

bool clamp ;
Property enable or disable clamping of the textures of this layer.

See Also:
The Wikipedia entry for texel

bool reflective ;
Environment map?

int filter ;
Property to set the type of filtering used for the textures of this layer.

Matrix transform ;


Texture texture ;


char[] toString ();


static TextureInstance opCall (Texture texture, bool clamp = false, int filter = 0);
Create a new TextureInstance with the parameters specified.

class Texture : yage.core.object2.IRenderTarget;
A Texture represents image data in video memory.

There's no need to be concerned about making texture dimensions a power of two, as they're automatically resized up to the next highest supported size if the non_power_of_two OpenGL extension isn't supported in hardware.

this();


this(char[] filename, Format format = (Format).AUTO, bool mipmap = true);
Create a Texture from an image. The image will be uploaded to memory when the Texture is first bound.

this(Image image, Format format = (Format).AUTO, bool mipmap = true, char[] source = "", bool padding = false);


DDSImageData* getDDSImageData ();
If the texture is loaded from a dds file instead of an image, return the unparsed dds file contents. Otherwise an empty array is returned.

Image getImage ();
Get / set the Image used by this texture.

bool hasAlpha ();
Returns true if the Texture Format includes an alpha channel.

void setImage (Image image);


void setImage (Image image, Format format, bool mipmap = true, char[] source = "", bool pad = false);
ditto ditto ditto

bool getMipmapped ();
Are mipmaps used?

Format getFormat ();
Get the format of the Texture.

int getHeight ();
int getWidth ();
Returns:
The width/height of the Texture in pixels.

Vec!(2,int) getPadding ();
Amount of padding to the top and right for non-power-of-two sized textures.

char[] getSource ();


Yage source files are copywritten by their specified authors and available under the terms of the GNU LGPL.
Documentation generated with CandyDoc on Wed Aug 11 11:14:28 2010