The error tells you exactly what the problem is.
Your Bitmap must have a size that is a power of two.

It's a limitation of the underlaying hardware API.
You can still create a bitmap with arbitrary size, but you need to pad
it to a power of two size and set your UVs accordingly.

On Apr 18, 6:12 pm, Georgi Gevorgyan <[email protected]>
wrote:
> hi. I'm new in away3d platform. I'm using alpha release of broomstick.
> I have  got a problem with mipmap. I'm loading external image and want
> to make a BitmapMaterial like this:
>
> class extends Plane
> and here is function when load completes
>
> private function comp(e:Event):void
> {
>         var a:BitmapData=new BitmapData(_width,_height);
>         a.draw(ldr);
>         bitMap=new BitmapMaterial(a,true,false,false);
>         this.material=bitMap;
>
> }
>
> where _width, _height >0
> but I'm getting error:
> Error: Invalid bitmapData! Must be power of 2 and not exceeding 2048
>
> so why I can't set bitmapData width and height any value I want ?
>
> please help,
> thanks.

Reply via email to