Scalers

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Threepwood
Posts: 18
Joined: Tue May 30, 2006 1:16 pm

Scalers

Post by Threepwood »

hi,

as everybody knows, there are different scalers with different abilities - but especially with tft displays it would be nice to select a scaler and a screen resolution, so that scummvm calculates a magnification and aspect ration corresponding to the existing resolution and selected scaler
User avatar
Vinterstum
ScummVM Developer
Posts: 580
Joined: Sun Oct 16, 2005 6:59 am

Post by Vinterstum »

That's something that would only be useful with, say, an OpenGL scaler (see past discussions). The current scalers need to scale to 2x or 3x, they can't do arbitrary resolutions.
Threepwood
Posts: 18
Joined: Tue May 30, 2006 1:16 pm

Post by Threepwood »

I don`t understand, what this has to do wiht opengl
User avatar
Vinterstum
ScummVM Developer
Posts: 580
Joined: Sun Oct 16, 2005 6:59 am

Post by Vinterstum »

Just that arbitrary scaling is something we'd use an OpenGL backend for, to take advantage of hardware acceleration etc.
User avatar
gord
Posts: 25
Joined: Tue Feb 21, 2006 10:48 pm

Post by gord »

to put it simply, scaling increases the size of a window by 2x or 3x. opengl can make a window any size you want.
rented mule
Posts: 70
Joined: Wed Jan 25, 2006 5:27 pm

Post by rented mule »

It's entirely possible to combine both.  Richard Bannister has a shell that does this for his emulator ports to Mac OS X.  You can resize a window or resize to fullscreen with any scaler...and it all looks top notch.

Ideally you'd use an HQ, SuperSaI, whatever scaler to get the most reasonable detail level for your monitor...then use OpenGL to scale that image to fill the screen.  

Like I said...Bannister does this and allows you to get fullscreen on any scaler...
fingolfin
Retired
Posts: 1452
Joined: Wed Sep 21, 2005 4:12 pm

Post by fingolfin »

Sure. Of course it is possible to do that, nobody denied that. Virtually everything is possible in IT, as long as you put enough talent and other resources at solving the problem.

The question just is, does one want to do it, and does the required effort warrant the result.
rented mule
Posts: 70
Joined: Wed Jan 25, 2006 5:27 pm

Post by rented mule »

fingolfin wrote:...and does the required effort warrant the result.
IMO...yes.  :)  But that's just me.
User avatar
gord
Posts: 25
Joined: Tue Feb 21, 2006 10:48 pm

Post by gord »

its not really hard to do, iv impimented an opengl version of the mega-drive emulator gens from an sdl only version. its just as simple as sending the display data to a texture and rendering that as a quad on the screen.

scummvm seems to be more of a 'use sdl or lump it' dealy though
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3561
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

gord wrote:its just as simple as sending the display data to a texture and rendering that as a quad on the screen.
Wouldn't that risk running afoul of the texture size limit? Or is that solved by "rendering that as a quad"? I'm afraid I don't know much about OpelGL or its terminology.
gord wrote:scummvm seems to be more of a 'use sdl or lump it' dealy though
Not really. There are other backends than the SDL one. There even used to be an OpenGL renderer, but all it offered was one more 2x scaler (and a pretty mediocre one at that, if you ask me). No one wanted to maintain it, so it fell into disrepair and was removed.
User avatar
Vinterstum
ScummVM Developer
Posts: 580
Joined: Sun Oct 16, 2005 6:59 am

Post by Vinterstum »

Really, it's just an issue of a dev dedicating enough time to implement it, and most importantly -maintain- it. Personally I considered it at one time, but decided to use whatever little free time I have these days to other things (kyra/kyra2). Most of us are in a similar position, I suspect :).
User avatar
gord
Posts: 25
Joined: Tue Feb 21, 2006 10:48 pm

Post by gord »

most graphics cards these days have a fairly high texture limit, even if they don't a large texture can be cut up into smaller textures nice and quickly by using glPixelStorei. i had to do that because my graphics card doesn't support non power of two textures and the mega-drive runs at 320x240.

a quad is just a polygon by the way, nothing epecial, its just easyer to handle than two triangles ;)
fingolfin
Retired
Posts: 1452
Joined: Wed Sep 21, 2005 4:12 pm

Post by fingolfin »

Splitting the data up into multiple quads was exactly what the old OpenGL scaler did, and it caused a visible cut between the two parts of the pixel data. Given the way interpolation works, that's not really a surprise either.

Anyway: If somebody was to write a proper OpenGL based backend, and was definitely going to maintain it, and if it was written in a clean and not-so-buggy fashion -- we'd consider it for inclusion.
Note that it would possibly be based on the current SDL backend -- code sharing is easily possible, as demonstrated by the WinCE and Symbian backends which both are based on the SDL one).
However, since we have had bad experiences with this, we'll be picky. In particular, forget about any "Hey I've whipped this OpenGL hack up in 20 minutes and it works quite OK in the 2 cases I tested it in" patches, they'll be rejected :)
clem
Posts: 2159
Joined: Mon Oct 31, 2005 11:14 am

Post by clem »

fingolfin wrote:Splitting the data up into multiple quads was exactly what the old OpenGL scaler did, and it caused a visible cut between the two parts of the pixel data. Given the way interpolation works, that's not really a surprise either.
I guess you could try to "cut" the parts on a per-game basis where a natural boundary occurs, like between inventory/verb area and game area? would still be visible during fullscreen events and when the mouse passes over it though
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3561
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

clem wrote:I guess you could try to "cut" the parts on a per-game basis where a natural boundary occurs, like between inventory/verb area and game area? would still be visible during fullscreen events and when the mouse passes over it though
That doesn't sound like a very good idea to me. Anyway, I'm fairly sure I've seen examples of programs that do the texture cutting trick without any visible seams. (I even thought someone fixed that bug in the ScummVM OpenGL renderer before it was removed, but I could very well be mistaken about that.)
Post Reply