[Papervision3D] AS3 drawing API - filled 2x slower then wireframe
Tim Knip
tim.knip at gmail.com
Sat Jan 13 11:51:08 EST 2007
Here's the good news: using ByteArray *does* seem faster then BitmapData...
what i do:
=> convert a BitmapData to ByteArray [r,g,b,r,g,b,etc]
=> while scan-converting a triangle i get pixel-color from the
ByteArray and save it to the z-buffer: col = pack( ba[idx], ba[idx+1],
ba[idx+1] )
=> when ll triangles done: use setPixels to put 'on screen'
Looks like fetching bytes from a BA using [] and packing rgb is bit
faster then getPixel() ;
Bad news: scanconverting / z-buffer is too slow... got 1 fps @ 800
faces using setPixel, 2 fps @ 800 faces using bytearray....;-)
Still..
T
More information about the Papervision3D
mailing list