Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#Actualfutlib

Posted 17 April 2013 - 12:55 AM

1) Don't manually scale things with OpenGL , just use the reference resolution (adjust for the aspect ratio if you don't want to squash/stretch things when going from 4:3 to 16:9 for example) when you create your orthographic projection matrix.

 

Fixed this, now it looks much nicer (but could still do with antialiasing).

 

However, this is kind of a hack I came up with to zoom in on all aspect ratios less narrow than 16:9. My reference resolution is 16:9, but I don't want black bars on 5:4, so I basically just zoom in until there are no bars anymore (that's at 2250x1800 for 5:4) Without the glScale hack, everything gets stretched. Any idea how to better solve this?

 

Edit: Came up with a better hack (I think): I'm adjusting the reference width for the aspect ratio, i.e. I end up with a reference size of 2250x1800 for 5:4, which I use for the ortographic projection matrix. Means I end up with a dynamic reference width, but that's fine since I can account for that in the UI code.

 

2) Use texture filtering and mipmaps to reduce scaling artifacts.

 

That's a topic I avoided until now, but I suppose I'll dig deeper into it. OpenGL seems to offer a ton of options, fortunately.

 

Anyway, rather relieved that the approach I sort of made up myself is apparently common smile.png Got any advice on the font issue? Should I just scale the damn fonts down or should I try to make FreeType render them in a different size based on e.g. the vertical resolution?


#2futlib

Posted 17 April 2013 - 12:55 AM

1) Don't manually scale things with OpenGL , just use the reference resolution (adjust for the aspect ratio if you don't want to squash/stretch things when going from 4:3 to 16:9 for example) when you create your orthographic projection matrix.

 

Fixed this, now it looks much nicer (but could still do with antialiasing).

 

However, this is kind of a hack I came up with to zoom in on all aspect ratios less narrow than 16:9. My reference resolution is 16:9, but I don't want black bars on 5:4, so I basically just zoom in until there are no bars anymore (that's at 2250x1800 for 5:4) Without the glScale hack, everything gets stretched. Any idea how to better solve this?

 

Edit: Came up with a better hack (I think): I'm adjusting the reference size for the aspect ratio, i.e. I end up with a reference size of 2250x1800, which I use for the ortographic projection matrix. Means I end up with a dynamic reference size (only the width in fact), but that's fine since I can account for that in the UI code.

 

2) Use texture filtering and mipmaps to reduce scaling artifacts.

 

That's a topic I avoided until now, but I suppose I'll dig deeper into it. OpenGL seems to offer a ton of options, fortunately.

 

Anyway, rather relieved that the approach I sort of made up myself is apparently common smile.png Got any advice on the font issue? Should I just scale the damn fonts down or should I try to make FreeType render them in a different size based on e.g. the vertical resolution?


#1futlib

Posted 17 April 2013 - 12:22 AM

1) Don't manually scale things with OpenGL , just use the reference resolution (adjust for the aspect ratio if you don't want to squash/stretch things when going from 4:3 to 16:9 for example) when you create your orthographic projection matrix.

 

Fixed this, now it looks much nicer (but could still do with antialiasing).

 

However, this is kind of a hack I came up with to zoom in on all aspect ratios less narrow than 16:9. My reference resolution is 16:9, but I don't want black bars on 5:4, so I basically just zoom in until there are no bars anymore (that's at 2250x1800 for 5:4) Without the glScale hack, everything gets stretched. Any idea how to better solve this?

 

2) Use texture filtering and mipmaps to reduce scaling artifacts.

 

That's a topic I avoided until now, but I suppose I'll dig deeper into it. OpenGL seems to offer a ton of options, fortunately.

 

Anyway, rather relieved that the approach I sort of made up myself is apparently common :) Got any advice on the font issue? Should I just scale the damn fonts down or should I try to make FreeType render them in a different size based on e.g. the vertical resolution?


PARTNERS