[updates] 7 for 3.1 alpha

Raab, Andreas Andreas.Raab at disney.com
Thu May 17 23:37:05 UTC 2001


Josh,

> How difficult will it be to move from one to the other?  How 
> much of the work will transfer?

Almost all of it.

> How does this work?  My understanding is that a pbuffer is a chunk of
> framebuffer memory that applications can reference directly.  

Yes.

> So, Squeak could treat it as the memory for a ExternalForm,
> and access it using the regular Form protocol.  It is approximately
> correct, or completely off-base?

It is 100% correct. If you look at the B3DHardwareEngine's #initializeTarget
method then you'll see that if we have direct frame buffer access, we're in
fact setting up an external form directly to those bits. The big advantage
is that when it comes to compositing (e.g., when having to draw morphs below
or on top of the 3D area) we can just blit directly to the frame buffer
rather than having to first draw the morphs offscreen, then upload the
texture, then composite the texture (possibly using alpha blending) and do
so repeatedly because we don't want to blow the entire VRAM of the graphics
card with one huge (power of two) backing texture.

The only reason the latter works reasonably well is that even this repeated
procedure is at least ten to twenty times faster than trying to achieve the
same through glReadPixels/glWritePixels. For some strange reason it seems
like there is simply no efficient path to the bits of the hardware even in
those cases where the requested format matches *exactly* the hardware format
(don't ask me why; ask Apple or ATI). On the other hand, texture uploads
appear to be *really* fast (at least on those machines where I tested it).

Cheers,
  - Andreas





More information about the Squeak-dev mailing list