GLBasic forum

Main forum => GLBasic - en => Topic started by: Kitty Hello on 2013-Jan-14

Title: SDL2 screen offset
Post by: Kitty Hello on 2013-Jan-14
Howdy,

I've ported to SDL2 now, but in portrait, the opengl window on android is shifted towards the bottom. The touches are proper coords. Any ideas?
Title: Re: SDL2 screen offset
Post by: belial on 2013-Jan-15
could it be something about the system app bar? I had a problem like this in wince a long time ago.
Title: Re: SDL2 screen offset
Post by: bigsofty on 2013-Jan-15
Sounds like the width and height are the wrong way around?
Title: SDL2 screen offset
Post by: Kitty Hello on 2013-Jan-15
Oh. Hot guess. Because the offset is quite someting. I guess 100 px. On a 768x1024 device that would be (1024-768)/2. I have to try later.
Title: Re: SDL2 screen offset
Post by: Kitty Hello on 2013-Jan-15
No.
Also, the right side is too small - like 500 instead of 768 pixels. Very strange.
Title: Re: SDL2 screen offset
Post by: bigsofty on 2013-Jan-15
Try a glGetIntegerv(GL_VIEWPORT, viewport), after init, to see what the render context has been set up as?
Title: SDL2 screen offset
Post by: Kitty Hello on 2013-Jan-17
The screen size wasn't passed to the core. I had 640x480 in project settings.
For android I ignore these completely now.
Title: Re: SDL2 screen offset
Post by: MrTAToad on 2013-Jan-18
Is SDL 2 going to be used for all platforms ?
Title: SDL2 screen offset
Post by: Kitty Hello on 2013-Jan-20
That's a plan. I hope to be able to statically link it so we don't need dlls. That way we have full sdl_mixer support and can have wave transformation callbacks ( pitch)...
Title: Re: SDL2 screen offset
Post by: mentalthink on 2013-Jan-20
Very very interesting this about sounds.... :nw: :nw:  I have a lot of hype about this Release... the Html5, can be simple awesome...
Title: Re: SDL2 screen offset
Post by: MrTAToad on 2013-Jan-21
That would be good!
Title: Re: SDL2 screen offset
Post by: bigsofty on 2013-Jan-21
Quote from: Kitty Hello on 2013-Jan-20
That's a plan. I hope to be able to statically link it so we don't need dlls. That way we have full sdl_mixer support and can have wave transformation callbacks ( pitch)...
Ah, being able to change pitch on the fly will make a lot of new app designs possible! :D
Title: Re: SDL2 screen offset
Post by: MrTAToad on 2013-Jan-21
Especially if it can handle OGG files too :)
Title: Re: SDL2 screen offset
Post by: bigsofty on 2013-Jan-21
Yes, SDL Buffers too (Synthesised waveforms for soft synths)!  :good: