| Scaling resolutions with Andriod SDL 1.2 |
| Scaling resolutions with Andriod SDL 1.2 |
|
Sik
|
Do you want to scale the framebuffer itself or just the coordinates of
what you draw? If the latter, you can just use SDL_RenderSetLogicalSize at the beginning:. Basically: SDL_RenderSetLogicalSize(renderer, 800, 480); In practice you'll want to take into account different aspect ratios though. 2013/4/26, Timodor:
SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
|
||||||||||||||
|
Timodor
|
I'm using SDL 1.2 I think
SDL_RenderSetLogicalSize is not included "SDL_RenderSetLogicalSize' was not declared in this scope" I should be moving on to SDL 2.0, but I have no idea how it works. |
|||||||||||
|
|
||||||||||||
| Scaling resolutions with Andriod SDL 1.2 |
|
Sik
|
Er right I missed 1.2 in the subject ^^; Yeah, it isn't present in
SDL2, sorry. You'll have to scale stuff yourself if you stick with 1.2. 2013/4/27, Timodor:
SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
|
||||||||||||||
| Scaling resolutions with Andriod SDL 1.2 |
|
Sik
|
*It's only present in SDL2, not in 1.2, gah
2013/4/27, Sik the hedgehog:
SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||||
|
|
||||||||||||||||
| Scaling |
|
Timodor
|
Issue is now resolved, I ported the entire game to OpenGL 1.1 ES using the NDK and C++
used this command : glOrthof( 0.0, 480, 800, 0.0, 0.0, 1.0 ); //STRETCHING Thing is you also need to updated the X POS and Y POS to the res your stretching to. EG if the phone is 1080X1920 and you want it on 800x480. The screen touch must be scaled down to that resolution. It works like charm, scale down and up. |
|||||||||||
|
|
||||||||||||
| Scaling resolutions with Andriod SDL 1.2 |
|
Gabriele Greco
Guest
|
Using SDL_RenderSetLogicalSize on SDL2, will do the event coordinate scaling for you, you'll be able to use the SDL_Texture API for your drawing, that is significantly simpler than using quads yourself. -- Bye, Gabry |
|||||||||||||
|
|
||||||||||||||

