SDL2 screen offset

Previous topic - Next topic

Kitty Hello

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?

belial

could it be something about the system app bar? I had a problem like this in wince a long time ago.

bigsofty

Sounds like the width and height are the wrong way around?
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Kitty Hello

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.

Kitty Hello

No.
Also, the right side is too small - like 500 instead of 768 pixels. Very strange.

bigsofty

Try a glGetIntegerv(GL_VIEWPORT, viewport), after init, to see what the render context has been set up as?
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Kitty Hello

The screen size wasn't passed to the core. I had 640x480 in project settings.
For android I ignore these completely now.

MrTAToad

Is SDL 2 going to be used for all platforms ?

Kitty Hello

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)...

mentalthink

Very very interesting this about sounds.... :nw: :nw:  I have a lot of hype about this Release... the Html5, can be simple awesome...

MrTAToad

That would be good!

bigsofty

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
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

MrTAToad

Especially if it can handle OGG files too :)

bigsofty

Yes, SDL Buffers too (Synthesised waveforms for soft synths)!  :good:
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)