Static methods
staticfromBitmapData(data:BitmapData, format:Context3DTextureFormat = Context3DTextureFormat.BGRA, mipmaps:Bool = false, ?params:{wrapMode:Null<FoxWrapMode>, mipFilter:Null<FoxMipFilter>, filter:Null<FoxTextureFilter>}):FoxTexture
staticfromImage(name:String, mipmaps:Bool = false, format:Context3DTextureFormat = Context3DTextureFormat.BGRA, ?params:{wrapMode:Null<FoxWrapMode>, mipFilter:Null<FoxMipFilter>, filter:Null<FoxTextureFilter>}):FoxTexture
Loads a FoxTexture from an image located in images/ (with .png extension)
staticfromImageRaw(name:String, mipmaps:Bool = false, format:Context3DTextureFormat = Context3DTextureFormat.BGRA, ?params:{wrapMode:Null<FoxWrapMode>, mipFilter:Null<FoxMipFilter>, filter:Null<FoxTextureFilter>}):FoxTexture
Loads a FoxTexture using a full raw asset path (including extension)
staticcreate(width:Int, height:Int, format:String = "rgba", type:String = "unsigned_byte"):FoxTexture
Creates a texture on the GPU, this texture can be used as a render target.
For a friendly list of available formats, check MDN's texImage2D() types.
It applies for standard OpenGL aswell, with the exception of WEBGL_.
staticwrap(bitmap:BitmapData):FoxTexture
Lighter version of fromBitmapData()
Note: Use this if the bitmap data already has a GPU texture attached to it.
Constructor
new(wrapMode:FoxWrapMode = FoxWrapMode.CLAMP, filter:FoxTextureFilter = FoxTextureFilter.LINEAR, mipFilter:FoxMipFilter = FoxMipFilter.MIPNONE)
Variables
Methods
resize(width:Int, height:Int):FoxTexture
Resizes this texture. Intended for framebuffer textures,
Note: This will not work with textures that have been wrapped/loaded from a file.
take(bitmap:BitmapData):Void
Instance version of FoxTexture.wrap()
Takes a BitmapData and sets it as the GPU texture
Note: This will not update any extra information of this texture, such as format or type.
takeGL(texture:TextureBase):Void
Instance version of FoxTexture.wrapGL()
Takes a Texture and sets it as the GPU texture
Note: This will not update any extra information of this texture, such as format or type.