http://www.glbasic.com/xmlhelp.php?lang=en&id=402&action=view (http://www.glbasic.com/xmlhelp.php?lang=en&id=402&action=view)
See attached program. Press keys 1-4 to change orientation.
Dude, was that a lot of work. I hope it's worth some.
[attachment deleted by admin]
Very Cool :booze:
:nw: :nw: :nw: :nw: :nw: :nw: :nw: :nw: :nw: :nw: :nw: :nw: :nw: :nw: :nw: :nw: :nw: :nw: :nw: :nw: :nw: :nw: :nw: :nw: :nw: :nw:
Which devices is this working at?
iOS? WebOS? Android?
When will you release GLBasic updated with this?
How many resources takes this rotated screen?
Is a rotation done by GL itself, or is GLB making internally a USESCREEN x,y;draws_on_screen x;usecreen -1;rotosprite y?
no resources. It's just a glMultMatrix and glViewport command change.
It's going to be so much easier for mobile devices now (or even desktop machines that support rotating monitors) :)
I think for the most part it is automatic - although with things like DDGui, the GETORIENTATION command would be used to check to see if orientation has changed.
The orientation is not automatic. You have to read joyx&y and decide to set the screen as rotated.
AH yes, for detecting the change, you would need code.
Kitty rocks it like a hurricane. :good:
Great stuff!!!!!!!!! :nw:
Thanks Gernot!!!!!
Cool, now I don't have to use all of this mumbo jumbo:
http://www.glbasic.com/forum/index.php?topic=5298.0 (http://www.glbasic.com/forum/index.php?topic=5298.0)
Nice, cheers Kitty :booze: :nw: :-*
If the update fails (English beta) get this patch before:
http://www.glbasic.com/beta/Update_e.exe (http://www.glbasic.com/beta/Update_e.exe). So sorry.
Quote from: Kitty Hello on 2011-Jun-06
If the update fails (English beta) get this patch before:
http://www.glbasic.com/beta/Update_e.exe (http://www.glbasic.com/beta/Update_e.exe). So sorry.
My internet update in GLB10 (9.095) says upto date so I presume you mean use this patch and then try and update. Just to clarify!
Just copied the update_e.exe into my GLBasic_beta folder ran the internet update from the editor and it says upto date although nothing was downloaded and there seems to be no SETORIENTATION commands???
I am at beta 10.040, and I think I am not updated to the latest-latest version...
Quote from: ampos on 2011-Jun-06
I am at beta 10.040, and I think I am not updated to the latest-latest version...
Errrr so where can I download the BETA ??? I did install the glbasic_beta.exe from the Android SDK Beta post and installed that to GLBasic_beta but there's nothing in that thread to indicate a new download to update???? Like I say when I try to Internet Update I get upto date when clearly I am not.
Does the Beta still come up with Invalid Binary when uploaded to iTunes Connect??
I did the update from the last beta...
Well, a quick forum search for 'beta' came up with this:
http://www.glbasic.com/forum/index.php?topic=234.msg705#msg705
They are talking about GLBasic version 3, a tad out of date!
It gives this link: http://www.glbasic.com/beta/glbasic_sdk.exe (http://www.glbasic.com/beta/glbasic_sdk.exe)
The link still works and doesn't specify a version number so it may still be valid.
(remove this topic entry if you don't want links to the beta posted for some reason)
And dont forget the proper beta here : http://www.glbasic.com/forum/index.php?topic=6163.0
Quote from: MrTAToad on 2011-Jun-06
And dont forget the proper beta here : http://www.glbasic.com/forum/index.php?topic=6163.0
It redirects to the same link as SlyDog gave and is the one I'm using. I just re-downloaded and it is indeed updated and after patching does allow Internet Update but it's not very clear. I can see Gernot's keen need to post Android BETA SDK in the topic title but it would be best if it had its own thread as GLBasic Beta and then the first post updated accordingly with version number at least.
I just feel like I've been going in circles hehe :)
OK, the beta can live-update (Web update), but the english version is broken.
So please grab this tiny update first: http://www.glbasic.com/beta/Update_e.exe (http://www.glbasic.com/beta/Update_e.exe)
The orientation is inverted for the gravity axes. Sorry. I'll put an update online, soon.
If it's online, this code is working:
FUNCTION MobileAutoOrient%: bAllowRotate90%
LOCAL cur% = GETORIENTATION()
LOCAL rot% = cur%
// allow tilting to left/right
IF bAllowRotate90%
LOCAL vx = GETJOYX(0)
IF vx < -0.9 // tilt left
rot% = MOD(cur+1, 4)
ELSEIF vx > 0.9 // tilt right
rot% = MOD(cur+3, 4)
ENDIF
ENDIF
// upside down (always possible)
IF GETJOYY(0) > 0.9
rot% = MOD(cur+2, 4)
ENDIF
// need to change?
IF rot% <> cur
SETORIENTATION rot%
RETURN TRUE
ENDIF
RETURN FALSE
ENDFUNCTION
Should that be in a separate post?