projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added BlackBerry PlayBook support Bug memleak when getting the number of mouse button...
[freeglut]
/
src
/
blackberry
/
fg_window_blackberry.c
diff --git
a/src/blackberry/fg_window_blackberry.c
b/src/blackberry/fg_window_blackberry.c
index
5689394
..
e88653c
100644
(file)
--- a/
src/blackberry/fg_window_blackberry.c
+++ b/
src/blackberry/fg_window_blackberry.c
@@
-32,7
+32,6
@@
#include "fg_internal.h"
#include "egl/fg_window_egl.h"
#include <screen/screen.h>
#include "fg_internal.h"
#include "egl/fg_window_egl.h"
#include <screen/screen.h>
-#include <bps/screen.h>
/*
* Opens a window. Requires a SFG_Window object created and attached
/*
* Opens a window. Requires a SFG_Window object created and attached
@@
-65,7
+64,7
@@
void fgPlatformOpenWindow( SFG_Window* window, const char* title,
#elif GL_VERSION_ES_CM_1_0 || GL_VERSION_ES_CL_1_0 || GL_VERSION_ES_CM_1_1 || GL_VERSION_ES_CL_1_1
int screenUsage = SCREEN_USAGE_OPENGL_ES1 | SCREEN_USAGE_ROTATION;
#endif
#elif GL_VERSION_ES_CM_1_0 || GL_VERSION_ES_CL_1_0 || GL_VERSION_ES_CM_1_1 || GL_VERSION_ES_CL_1_1
int screenUsage = SCREEN_USAGE_OPENGL_ES1 | SCREEN_USAGE_ROTATION;
#endif
-#ifndef __X86__
+#if !defined(__X86__) && !defined(__PLAYBOOK__)
screenUsage |= SCREEN_USAGE_DISPLAY; // Physical device copy directly into physical display
#endif
if (screen_set_window_property_iv(sWindow, SCREEN_PROPERTY_FORMAT, &screenFormat)) {
screenUsage |= SCREEN_USAGE_DISPLAY; // Physical device copy directly into physical display
#endif
if (screen_set_window_property_iv(sWindow, SCREEN_PROPERTY_FORMAT, &screenFormat)) {
@@
-182,7
+181,11
@@
void fgPlatformOpenWindow( SFG_Window* window, const char* title,
/* Create context */
fghChooseConfig(&window->Window.pContext.egl.Config);
/* Create context */
fghChooseConfig(&window->Window.pContext.egl.Config);
- window->Window.Context = fghCreateNewContextEGL(window);
+ window->Window.Context = EGL_NO_CONTEXT;
+ if( fgState.UseCurrentContext == GL_TRUE )
+ window->Window.Context = eglGetCurrentContext();
+ if( window->Window.Context == EGL_NO_CONTEXT )
+ window->Window.Context = fghCreateNewContextEGL(window);
/* Create EGL window */
fghPlatformOpenWindowEGL(window);
/* Create EGL window */
fghPlatformOpenWindowEGL(window);