Added BlackBerry support #1

Closed
wants to merge 35 commits into
from

Projects

None yet

2 participants

@rcmaniac25
Contributor

Added BlackBerry support
Fixed bug where fgPlatformSetWindow (for EGL) could be called with window being NULL.
Related, the function does nothing if the window is the current window
Updated fghPlatformCloseWindowEGL so that it mimics the Windows function:

  • If the current window is getting destroyed, then reset eglMakeCurrent to "null" values
  • Iterate through windows to make sure a EGL context isn't being shared between other windows before destroying it
rcmaniac25 added some commits Sep 2, 2013
@rcmaniac25 rcmaniac25 Initial commit of BlackBerry implementation. It compiles, but doesn't…
… have required functions implemented.
eced4d7
@rcmaniac25 rcmaniac25 Android and BlackBerry have a fair amount of overlap, for now. 04ac024
@rcmaniac25 rcmaniac25 Implemented fg_window_blackberry.c to initialize and cleanup windows
Implemented a BlackBerry specific fg_init so that bps can be started and stopped.
602edab
@rcmaniac25 rcmaniac25 Final commit before implementing main loop. All other code is impleme…
…nted to the same level as Android.
554cfca
@rcmaniac25 rcmaniac25 Implemented BlackBerry main (initial version) 1625605
@rcmaniac25 rcmaniac25 Minor change so that OpenGL ES 1.x can be used for BlackBerry 27e5b14
@rcmaniac25 rcmaniac25 Can use input devices from x11 (serial input... unlikely to ever be u…
…sed, but you never know)

Fixed bug in fg_window_egl:fgPlatformSetWindow where a NULL window may be passed and cause a segfault
Fixed bug where navigator events were never started
Take into account DisplayMode when creating window buffers
Proper fgPlatformSystemTime implementation (from fg_main_x11)
Added support for mutlitouch (from fg_main_windows)
7cb7ac8
@rcmaniac25 rcmaniac25 Made sure that windows created on BlackBerry are registered as fullsc…
…reen, for now.

Added more logging in fgPlatformProcessSingleEvent on BlackBerry.
Better handling of key repeats on BlackBerry by taking into account global and window settings.
123bd0f
@rcmaniac25 rcmaniac25 Removed fg_main_blackberry.h. It wasn't needed d44959b
@rcmaniac25 rcmaniac25 Added a couple event cases for BlackBerry that are common to prevent …
…them being listed as unknown events.
d4f8277
@rcmaniac25 rcmaniac25 Minor order change in Android/BlackBerry CMake, one comment for Black…
…Berry window
4b20468
@rcmaniac25 rcmaniac25 Converted the odd double spaces into 4 space tabs 2976c50
@rcmaniac25 rcmaniac25 Prevented case where no window was set when waiting for events. 6a6f08f
@rcmaniac25 rcmaniac25 Added two more navigator states (that might be implemented) for Black…
…Berry
65483e4
@rcmaniac25 rcmaniac25 Added keyboard states for BlackBerry b229287
@rcmaniac25 rcmaniac25 Restructuring of when screen context and events are started stopped, …
…created and destroyed
056b825
@rcmaniac25 rcmaniac25 Added ability to get screen size of display 07f9260
@rcmaniac25 rcmaniac25 Added ability to get mouse button count or touch ID count. 800c1f0
@rcmaniac25 rcmaniac25 Added support for key modifiers e9d920c
@rcmaniac25 rcmaniac25 Forgot to reset modifiers once done with modifiers. 0120423
@rcmaniac25 rcmaniac25 Added support for the scroll wheel when using the simulator 65a3c0d
@rcmaniac25 rcmaniac25 Implemented a small work around for no current window being set while…
… executing the event handler
2d1e703
@rcmaniac25 rcmaniac25 Fixed bug where if statement didn't have parenthesis, causing it to j…
…ust exit
5c0bad9
@rcmaniac25 rcmaniac25 Added full support for WindowStatus
App status is now based on actual app status instead of window visibility
93118d3
@rcmaniac25 rcmaniac25 Placeholder for window sizes
Prevent navigator event 0x0 to show as unknown (though it is unknown... it's not defined in navigator.h)
798bfda
@rcmaniac25 rcmaniac25 Added (though commented out) support for setting window position 39b72b6
@rcmaniac25 rcmaniac25 Added support for rotation so an app can be rotated and FG will resiz…
…e and manage the window in the background

Additional documentation explaining why certain functions are implemented in the manner they are
Changed QNX macro to a non deprecated one
ee1780f
@rcmaniac25 rcmaniac25 Made glutGet, for window width and height, return width and height de…
…termined by device rotation

Now handles keyboard open/close (along wit device rotation while the keyboard is open) and resize
The "back" operation now returns an ESCAPE key
e62d8cb
@rcmaniac25 rcmaniac25 Hardcoded the RGB bitdepths for EGL surface creation. bf5e15c
@rcmaniac25 rcmaniac25 Info logging only shows in debug compilation
Added support for UseCurrentContext flag
Updated fghPlatformCloseWindowEGL for performance so that eglMakeCurrent isn't invoked unless it's the current window and that the EGL context isn't destroyed unless no other windows uses
5e5b6ce
@rcmaniac25 rcmaniac25 Added BlackBerry PlayBook support
Bug memleak when getting the number of mouse buttons on a non-PlayBook where an appropriate device is found and the value is returned
ce1a7d8
@rcmaniac25 rcmaniac25 Updated toolchain so that it does a more exact check if this is for P…
…layBook or BlackBerry 10

Fixed bug with keyboard on PlayBook where keyboard heights only occurred on rotation, and resize would occur twice because of it and resize wouldn't happen for keyboard
291bdb2
@rcmaniac25 rcmaniac25 Merge branch 'svn_master' of https://github.com/dcnieho/FreeGLUT into…
… blackberry
4b93698
@rcmaniac25 rcmaniac25 BlackBerry and Android
-Added ability for developer to choose OpenGL ES version (2.0 or 3.0) via glutInitContextVersion (only the major version is used)

BlackBerry specific
-Added better documentation on required window bit depth for BlackBerry.
-Modified screen format picking so it will choose either RGBA8888 or RGB565 instead of always using RGBA8888
2fcae25
@rcmaniac25
Contributor

Any updates on this?

@dcnieho dcnieho commented on the diff Jan 2, 2014
freeglut/src/egl/fg_window_egl.c
@@ -67,7 +76,7 @@ EGLContext fghCreateNewContextEGL( SFG_Window* window ) {
EGLConfig eglConfig = window->Window.pContext.egl.Config;
/* Ensure OpenGLES 2.0 context */
- static const EGLint ctx_attribs[] = {
+ static EGLint ctx_attribs[] = {
#ifdef GL_ES_VERSION_2_0
EGL_CONTEXT_CLIENT_VERSION, 2,
@dcnieho
dcnieho Jan 2, 2014 Owner

just want to make sure: this should remain 2 even if user wants GLES 3? Similarly, line 33 of this file should remain EGL_OPENGL_ES2_BIT?

If so, can you add some comments to this part of the code to discuss GLES3 selection, and to each of the lines that seem counterintuitive, add a little note that it is valid for GLES3 as well?

@dcnieho
Owner
dcnieho commented Jan 2, 2014

Sorry for the delay, things are looking good! I just have that one comment and then things should be okay to merge.

@dcnieho
Owner
dcnieho commented Jan 2, 2014

Hmm, I have some worries about keeping the sourceforge svn and the github
git synced. After merging your request and pushing it to svn, i'll probably
have to push back the result to github, overwriting what is there. some
reading on stackoverflow seems to confirm this worry.

I'll be reading into http://subgit.com/book-remote/index.html which appears
to be the solution to this. It'll take a bit of time, but rest assured it
is high on the priority list. Reading right now

On Wed, Jan 1, 2014 at 3:22 AM, rcmaniac25 notifications@github.com wrote:

Any updates on this?


Reply to this email directly or view it on GitHubhttps://github.com/dcnieho/FreeGLUT/pull/1#issuecomment-31407688
.

@rcmaniac25
Contributor

Fun. That's been one of the worries about mirrored repos. I'll work on the comment you had and update (If you don't know, I can continue to add more updates to this pull request without making new ones)

@dcnieho
Owner
dcnieho commented Jan 2, 2014

Hi Vinnie,

Yeah, please keep updating the current pull request ;)

Hope to get this sorted soon. I'm posting to stackoverflow right now to
verify I understood things right.

Best,
Dee

On Thu, Jan 2, 2014 at 1:37 PM, rcmaniac25 notifications@github.com wrote:

Fun. That's been one of the worries about mirrored repos. I'll work on the
comment you had and update (If you don't know, I can continue to add more
updates to this pull request without making new ones)


Reply to this email directly or view it on GitHubhttps://github.com/dcnieho/FreeGLUT/pull/1#issuecomment-31438471
.

@rcmaniac25
Contributor

Added comments. Does that look better?

@dcnieho
Owner
dcnieho commented Jan 2, 2014

that should do the trick, thanks!

Urgh, my hole seems to be getting slightly deeper. I am not using git-svn exactly, but the git-svn bridge that is built in smartgit. I'll be emailing their support. And if they can't do it, i'll have to investigate different tools such as subgit. Getting there, soon. no worries!

@rcmaniac25
Contributor

Sweet! I'm not in a rush. You more or less gave the thumbs up to it, so I'm happy. I don't usually mix VCs so I don't know how to help, otherwise I would.

@dcnieho
Owner
dcnieho commented Jan 2, 2014

No worries man!

Any plans for further extending your work? Will you be using your work in
actual apps?

On Thu, Jan 2, 2014 at 2:25 PM, rcmaniac25 notifications@github.com wrote:

Sweet! I'm not in a rush. You more or less gave the thumbs up to it, so
I'm happy. I don't usually mix VCs so I don't know how to help, otherwise I
would.


Reply to this email directly or view it on GitHubhttps://github.com/dcnieho/FreeGLUT/pull/1#issuecomment-31439207
.

@rcmaniac25
Contributor

I know a couple people who will, and will mention that it's officially supported to BlackBerry who will probably mention it to all their followers.

I have a list of things I want to add support for (I'll probably make a set of tickets in my own repo so it's easier to manage).

I was waiting for this to be merged in so I didn't have to worry about potential breaking changes that may be desired if it wasn't good.

Examples of things I'm interested in getting working: menus, fonts, multiwindow support, joystick support (AKA, Gamepads). If I could get the full API working on mobile, that would be very cool. Otherwise, for now, I'm working on a bunch of side projects that are unrelated.

@rcmaniac25
Contributor

I told another dev about the issue you're having. He was pessimistic on being able to resolve it, but pointed out the following resources:

@dcnieho
Owner
dcnieho commented Jan 2, 2014

Thanks for the help and ideas! People on the smartgit mailing list (Sébastian is also on the FreeGLUT list) provided the simplest way of doing things. As per their suggestions, I'm closing this pull request. Could you make a new one on the master branch instead?

@dcnieho dcnieho closed this Jan 2, 2014
@rcmaniac25
Contributor

Sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment