adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Adonthell-devel] Re: Scaling


From: Kai Sterker
Subject: [Adonthell-devel] Re: Scaling
Date: Sun, 31 Oct 2010 21:27:10 +0100

On Sun, Oct 31, 2010 at 11:34 AM, Kai Sterker <address@hidden> wrote:

> The great thing is how this will make the implementation almost
> trivial. We update the screen class to return a shadow surface when
> the scaling isn't 1:1. This is always the size of the internal
> resolution. In the blit function, this is then scaled onto the actual
> screen surface. That limits all the changes to the screen class and
> leaves the rest of the engine untouched. It will probably also mean
> that a true SDL 1.3 backend could do the scaling on the GPU.

Implemented for the SDL 1.2 and 1.3 backends, but not heavily tested
yet. Works well on my Linux box with the 1280x1024 screen though. Will
test with different screens later.

So what do we get: I've added a new screen init function
set_native_mode which will basically use the current desktop
resolution and determine the internal view size and matching (integer)
scaling factor. So far I've only updated worldtest to init the screen
that way (and it will only do so in fullscreen mode). To keep the
engine generic, the desired view size range can be specified, but
defaults to our settings. If things fail, view size and scaling factor
can be set in the configuration file. Setting width and height in the
configuration will disable sizing to the desktop resolution. Setting
the scale to > 1 will work in addition and also enable scaling in
window mode.

Tools are probably broken right now. Need to implement the newly added
method in the GTK+ backend.

Anyway, we now officially support most aspect ratios and resolutions
out there. Additional testing and code changes may be required for
cases where there is more than one screen.

Kai



reply via email to

[Prev in Thread] Current Thread [Next in Thread]