[AD] [ alleg-Bugs-3125976 ] independent backbuffer resolution

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Bugs item #3125976, was opened at 2010-12-03 09:24
Message generated for change (Comment added) made by tjaden
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=3125976&group_id=5665

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: 4.9
Status: Open
Resolution: None
Priority: 3
Private: No
Submitted By: Peter Wang (tjaden)
Assigned to: Nobody/Anonymous (nobody)
Summary: independent backbuffer resolution

Initial Comment:
5.2: It would be nice to be able to decouple the backbuffer resolution from the display resolution, so you could render at a lower resolution for performance, without making the window too small or changing the monitor resolution. This would be especially useful in combination with the fullscreen-window flag.

----------------------------------------------------------------------

>Comment By: Peter Wang (tjaden)
Date: 2010-12-03 10:55

Message:
I was thinking of having OpenGL to render to a texture with a lower
resolution, then scaling that up when it gets shown on screen. So if you
have a lowly integrated video card, the game could render at 640x480 but
still fill the whole screen without adjusting the monitor resolution. At
least, I imagine it would be faster.

I think we could do it better than from user code, e.g. for OS X:
http://bit.ly/h9WC5f


----------------------------------------------------------------------

Comment By: Elias Pschernig (elias)
Date: 2010-12-03 09:42

Message:
I'd like that as well,

With the transformations API, this already is rather simple, but still
would be nice to have it builtin. For example assume you are drawing all
your graphics assuming the width of the window is 640, you could do
something like this:

on_resize() {
    scale = al_get_display_width() / 640.0
    height = al_get_display_height() / scale
    al_scale_transform(trans, scale, scale)
    al_use_transform(trans)
}

Now you can draw pictures, primitives and text as if the screen was 640 x
height units big, but it will scale to the current size. If height should
be fixed, could introduce black bars as needed.

For mouse input, all coordinates need to be divided by scale.

In the IPhone port I actually have some experimental code doing something
like this behind the scenes when you don't use the native resolution
(scaling both output as well as input). It even does more, it can also
rotate the screen 90°. I mainly added that so all the examples would
"work" out of the box, as none uses the native resolution. Keyboard input
is still missing from the ones requiring it of course :P

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=3125976&group_id=5665




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/