Re: [Alephmodular-devel] Brainstorming on bitmaps
Status: Pre-Alpha
Brought to you by:
brefin
From: Mark L. <hav...@ma...> - 2003-02-24 06:20:08
|
> Typical usage would be: > Request current buffer from display system > (it is limited as in dimensions, display system knows this) > Lock down the buffer > Get a bitmap from the buffer > Render operations on the bitmap > Release the bitmap > Perform drawing operations on the buffer (access to platform native > elements available?) > Unlock the buffer > Ask display system to swap buffers Add "Obtain the dimensions of the buffer" (oh, you got to that later). What do you think about the ability to move the origin of a context? Aleph One does the main screen layout with this; it makes the game view size and screen size essentially independent, but I personally find it very confusing to do layout in this fashion. Perhaps it would be better to do some complex calculations and rebuilding of buffers when the screen is resized instead of a large number of simple (but annoying) calculations every frame. > Locking pixels. Are you talking about the original MacOS LockPixels() concept (which IIRC was meant to protect pixmaps from memory manager housekeeping) or some sort of mutex for multithreaded drawing? The former is probably obsolete on everything except OS9. > Ponder... Setting the drawing context should occur seperately Maybe this should be changed to a stack-based mechanism (like Quartz) instead of requiring the program itself to cache and restore the previous state. > world_pixels is used as the offscreen buffer for saved game preview > pictures :/ With proper abstraction it should be trivial to temporarily point the renderer at an offscreen buffer instead. Rectangle representation: Do we use OS9-style absolute boundaries (left/top/right/bottom) or "relative" rectangles (x/y/width/height)? Is the origin at the physical top or bottom of a buffer? (Carbon and OpenGL disagree on this last bit, which has caused me its share of confusion too. How do Windows and SDL work?) --Mark "Notice the fine lines, the attention to detail, the overall craftsmanship... You just don't see that in giant evil robot planes any more." Random acts of programming: http://homepage.mac.com/haveblue |