|
From: James W. <ja...@fr...> - 2007-07-06 19:04:17
|
Is anyone using any plug-in renderers that need draw region support? If not, I'd like to get rid of draw regions and simplify some of the draw context code. Here's an excerpt from an old posting that explains what draw regions are about. On 4/27/2000, Dair Grant wrote: > OK, for the rest of the list, here's a quick overview of what a draw > region is (you typically only see them when writing a renderer): > > A "draw context" is the QD3D object associated with the native windowing > system - you've got a Mac draw context that takes a WindowPtr, a Windows > draw context that takes an HDC, etc. > > A "draw region" is a lower-level object, which was historically needed > to support RAVE. > > A draw context can span multiple monitors (since WindowPtrs can), but > since RAVE engines are attached to a single monitor you need some way to > break down a high level window spanning multiple monitors into the > monitor-specific areas that the output should be sent to. > > > So, an example: when rendering to a window that straddles an 16 bit > monitor and a 32 bit monitor, there's one draw context (that holds the > WindowPtr) and _two_ draw regions (one for the 16 bit monitor and one > for the 32 bit monitor). > > To render to this window using RAVE, the IR needs to build two RAVE data > structures - one for each monitor. > > And to create them, it needs to know the depths, row-bytes, resolution, > etc of the two monitors - as well as things like the offsets within the > frame buffer to the pixels that correspond to the exposed window area, > and any clipping mask that needs to be applied to prevent output from > overwriting other windows on the screen. > > And to get all this low-level information, it uses (we got there > eventually!) the two draw regions... > > So whenever a draw context is created/updated, a list of draw regions is > also maintained - each of these draw regions holds all the low-level > information needed to render to this draw context using something like > RAVE. > > >> Why I've to move away from draw regions? > > Their main purpose is to allow you to support multiple monitors on top > of a hardware acceleration API that drives a single monitor at a time > (e.g., RAVE). > > If you're using an API like OpenGL, there's no need - you just pass down > the WindowPtr, and let Apple take care of making OpenGL support multiple > monitors. > > So, I think we definitely want to get away from draw regions if we can. -- James W. Walker, Innoventive Software LLC <http://www.frameforge3d.com/> |