Content

MovieMaterial updateBitmap Bug In Papervision3D 2.0 GreatWhite

Monday 18 August 2008 - Filed under Others

In latest PV3D 2.0 (GreatWhite) revision, MovieMateiral and MovieAssetMateiral’s updateBitmap function is broken. The problem is that updateBitmap function is actually an empty function. The class hierarchy goes like this: MovieAssetMaterial -> MovieMateiral -> BitmapMaterial -> TriangleMaterial -> MaterialObject3D. updateBitmap is defined in MaterialObject3D as an empty function and it was never overridden along the path.

If you are not patient to wait for their next release, the problem can be solved by putting PV3D1.7 updateBitmap function back into the MovieMaterial class.

public override function updateBitmap():void
{
	// using int is much faster than using Math.floor. And casting the variable saves in speed from having the avm decide what to cast it as
	var mWidth:int = int(movie.width);
	var mHeight:int = int(movie.height);    

	if( allowAutoResize && ( mWidth != bitmap.width || mHeight != bitmap.height ) )
	{
		// Init new bitmap size
		initBitmap( movie );
	}

	drawBitmap();
 }

2008-08-18  »  5566

Talkback x 4

  1. sonicoliver
    3 November 2008 @ 12:10 am

    another way is to simply enable the animated property, then disable it again… that’s what I’m doing, I don’t know if updateBitmap() is depreciated. It would be better, I don’t know why it’s not included…

  2. Michael
    4 November 2008 @ 9:37 pm

    thanks for this – you saved me considerable time today… not to mention hair and fingernails :)

  3. oliver
    14 November 2008 @ 9:24 pm

    you rock, thank-you!

  4. iwantjelly
    31 August 2009 @ 10:44 am

    You saved my day ! Thanks a lot, it now works like a charm.

Share your thoughts

Re: MovieMaterial updateBitmap Bug In Papervision3D 2.0 GreatWhite







Tags you can use (optional):
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

For spam filtering purposes, please copy the number 9179 to the field below: