Hi.
So is there any way to use textures that are not power of 2 in width or height in Away3D 4? Could anyone please help me do that?
Thanks in advance,
Gio
Invalid bitmapData: Width and height must be power of 2 and cannot exceed 2048Software: Away3D 4.x |
||
Gio, Newbie
Posted: 03 July 2012 03:33 PM Total Posts: 5 |
||
Richard Olsson, Administrator
Posted: 03 July 2012 07:30 PM Total Posts: 1192 [ # 1 ] The short answer is no. You can’t use a texture that is power of 2 in width and height. Additionally, if you want to use mipmapping (on by default) the texture also has to be square. However, you can of course change your textures at runtime to match these restrictions. To do this, you can use for example the TextureUtils class to figure out the most suitable new dimensions, and then just resize your BitmapData by creating a new one and drawing the old one onto the new one with a matrix to scale it up to match. |
||
|