[updates] 7 for 3.1 alpha

Joshua Channing Gargus schwa at cc.gatech.edu
Fri May 18 00:19:01 UTC 2001


On Thu, May 17, 2001 at 04:37:05PM -0700, Raab, Andreas wrote:
> 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) 

Or accelerating 2d Balloon stuff!

> 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.

A-ha!  I hadn't thought through it deeply enough to see this.

> 
> 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).

I think it must have to do more with the hardware than the software.  Some
people in my graphics class found that glReadPixels happens way faster on an
SGI Visual Workstation than on a PC with a GeForce2, even though the PC beats
the pants of it in terms of raw rendering speed.

Thanks for the insight,
Joshua


> Cheers,
>   - Andreas





More information about the Squeak-dev mailing list