[Scummvm-devel] Bitdepth/pixel format API concerns
Johannes Schickel
lordhoto at gmail.com
Sun Jun 14 19:52:37 CEST 2009
Marcus Comstedt wrote:
> Johannes Schickel <lordhoto at gmail.com> writes:
>
>
>> We did made that decision btw. here's how the final API should look
>> like:
>> http://scummvmupthorn09.wordpress.com/2009/06/14/how-this-is-going-to-work/
>>
>
> One thing I'm missing here is how OSystem::initFormat() will
> relate to OSystem::initSize(). In order to allocate a screen
> buffer, both the screen size and the number of bytes per pixel
> needs to be known. Will these two methods be called in a particular
> order? Can the format be changed without re-initing the size?
> In that case, is the contents of the screen buffer supposed to be
> retained?
>
>
Actually that's why we have GFX transaction support, any screen setup
changes can only be done between a "beginGFXTransaction" and
"endGFXTranscation" call. The SDL backend does for example apply all
changes only in "endGFXTransaction", all other functions just change the
configuration, which will be applied there.
There's no defined order of the calls. I think on call of initFormat and
initSize no screen data has to be retained.
// Johannes
More information about the Scummvm-devel
mailing list