www.jpct.net

General => Feedback => Topic started by: paulscode on September 26, 2010, 05:20:02 am

Title: Suggestion: Method for creating empty texture of specified size, with alpha
Post by: paulscode on September 26, 2010, 05:20:02 am
Currently, there is no method for creating an empty/black texture of a specified size with alpha, something like this:

Code: [Select]
myTexture = new Texture( width, height, true );
This would be useful for cases where a texture's contents are generated entirely through an ITextureEffect implementation where alpha is used (i.e. if there is no "initial" frame to use when instantiating the Texture).  This is not high-priority for me, though.  I came up with a workaround that seems to function the same way:

Code: [Select]
BufferedImage image = new BufferedImage( width, height, BufferedImage.TYPE_4BYTE_ABGR );
myTexture = new Texture( image, true );
Title: Re: Suggestion: Method for creating empty texture of specified size, with alpha
Post by: EgonOlsen on September 26, 2010, 11:31:51 pm
Sounds reasonable. I'll look into it...