i guess this will work for now, i really only need it updated when i hit apply changes so the speed issue doesnt bug me too much.
Function Copyb3dtopix:TPixmap(view:TGadget)
Local pix:TPixmap = CreatePixmap( ClientWidth(view),ClientHeight(view),PF_RGBA8888 )
bbRenderWorld()
bbLockBuffer()
For i = 0 To ClientHeight(view)-1
For ii = 0 To ClientWidth(view)-1
WritePixel( pix,ii,i,bbReadPixelFast(ii,i))
'Print bbReadPixelFast(ii,i)
Next
Next
bbUnlockBuffer()
'Print "sizes: "+ClientWidth(view)+" "+ClientHeight(view)
'SavePixmapPNG( pix,"showme.png" )
Return pix
End Function
unless someone knows a faster way to transfer a b3d image to bmax
|