Libraries.Game.Graphics.FileTextureData Documentation

The FileTextureData class holds texture information for PixelMaps retrieved from most supported image file types. This is used internally by the game engine, and most users will never interact directly with this clas

Inherits from: Libraries.Language.Object, Libraries.Game.Graphics.TextureData

Summary

Actions Summary Table

ActionsDescription
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns an integer.
ConsumePixelMap()This action returns the PixelMap stored in this FileTextureData, then removes the reference to it in the FileTextureDat
CopyImagesToPowerOfTwo(boolean bool)This action sets whether or not images should be copied to a power of tw
DisposePixelMap()Returns whether or not the PixelMap should be disposed when done.
Equals(Libraries.Language.Object object)This action determines if two objects are equal based on their hash code values.
GetFile()Returns the file used to load this FileTextureDat
GetFormat()Returns the Format of the PixelMap stored by this FileTextureDat
GetHashCode()This action gets the hash code for an object.
GetHeight()Returns the height of the PixelMap stored by this FileTextureDat
GetWidth()Returns the width of the PixelMap stored by this FileTextureDat
InitializeFileTextureData(Libraries.System.File newFile, Libraries.Game.Graphics.PixelMap preloadedPixelMap, Libraries.Game.Graphics.Format newFormat, boolean newMipMaps)This action initializes the FileTextureData so that it may be used.
IsCustomData()Returns whether or not this is a custom defined user type of TextureData.
IsManaged()Returns whether or not the information stored by this FileTextureData can automatically handle a loss of OpenGL context.
IsPrepared()This action returns true if the FileTextureData has already had a call to Prepare(), and returns false otherwis
Prepare()This action prepares the FileTextureData for use, ensuring that the PixelMap is loade
SetDisposalState(boolean state)Sets whether or not the PixelMap in the FileTextureData should be disposed of after us
TestForCopyToPowerOfTwo()This action is used to determine if it is necessary for all images to be a power of two in each dimensio
UseMipMaps()Returns whether the data stored in this FileTextureData should be used to generate mip maps for the textur

Actions Documentation

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.

Example Code

Object o
        Object t
        integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smalle

Parameters

Return

integer: The Compare result, Smaller, Equal, or Larger.

ConsumePixelMap()

This action returns the PixelMap stored in this FileTextureData, then removes the reference to it in the FileTextureDat

Return

Libraries.Game.Graphics.PixelMap:

CopyImagesToPowerOfTwo(boolean bool)

This action sets whether or not images should be copied to a power of tw

Parameters

DisposePixelMap()

Returns whether or not the PixelMap should be disposed when done. Defaults to tru

Return

boolean:

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Example Code

use Libraries.Language.Object
        use Libraries.Language.Types.Text
        Object o
        Text t
        boolean result = o:Equals(

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

GetFile()

Returns the file used to load this FileTextureDat

Return

Libraries.System.File:

GetFormat()

Returns the Format of the PixelMap stored by this FileTextureDat

Return

Libraries.Game.Graphics.Format:

GetHashCode()

This action gets the hash code for an object.

Example Code

Object o
        integer hash = o:GetHashCode

Return

integer: The integer hash code of the object.

GetHeight()

Returns the height of the PixelMap stored by this FileTextureDat

Return

integer:

GetWidth()

Returns the width of the PixelMap stored by this FileTextureDat

Return

integer:

InitializeFileTextureData(Libraries.System.File newFile, Libraries.Game.Graphics.PixelMap preloadedPixelMap, Libraries.Game.Graphics.Format newFormat, boolean newMipMaps)

This action initializes the FileTextureData so that it may be used. It takes a file to read information from, a PixelMap if one has already been loaded from a file, the Format that should be used for the PixelMap, and a boolean indicating whether this TextureData should be used to create mip map

Parameters

IsCustomData()

Returns whether or not this is a custom defined user type of TextureData. Always returns fals

Return

boolean:

IsManaged()

Returns whether or not the information stored by this FileTextureData can automatically handle a loss of OpenGL context. Always returns tru

Return

boolean:

IsPrepared()

This action returns true if the FileTextureData has already had a call to Prepare(), and returns false otherwis

Return

boolean:

Prepare()

This action prepares the FileTextureData for use, ensuring that the PixelMap is loade

SetDisposalState(boolean state)

Sets whether or not the PixelMap in the FileTextureData should be disposed of after us

Parameters

TestForCopyToPowerOfTwo()

This action is used to determine if it is necessary for all images to be a power of two in each dimensio

Return

boolean:

UseMipMaps()

Returns whether the data stored in this FileTextureData should be used to generate mip maps for the textur

Return

boolean: