mirror of
https://github.com/brl/mutter.git
synced 2025-02-09 01:54:10 +00:00
osx: Fixed bug with creating context twice.
We should assign context and pixel_format vars to null to avoid multiple context creation.
This commit is contained in:
parent
50793eac51
commit
8c69a639cb
@ -80,7 +80,8 @@ clutter_backend_osx_create_context (ClutterBackend *backend,
|
||||
{
|
||||
ClutterBackendOSX *backend_osx = CLUTTER_BACKEND_OSX (backend);
|
||||
CLUTTER_OSX_POOL_ALLOC();
|
||||
|
||||
if ( backend_osx->context == nil)
|
||||
{
|
||||
/* Allocate ourselves a GL context. Since we're supposed to have only one per
|
||||
* backend we can just as well create it now.
|
||||
*/
|
||||
@ -102,9 +103,9 @@ clutter_backend_osx_create_context (ClutterBackend *backend,
|
||||
const long sw = 1;
|
||||
#endif
|
||||
[backend_osx->context setValues:&sw forParameter: NSOpenGLCPSwapInterval];
|
||||
}
|
||||
[backend_osx->context makeCurrentContext];
|
||||
CLUTTER_NOTE (BACKEND, "Context was created");
|
||||
|
||||
CLUTTER_OSX_POOL_RELEASE();
|
||||
|
||||
return TRUE;
|
||||
@ -156,8 +157,10 @@ clutter_backend_osx_redraw (ClutterBackend *backend, ClutterStage *wrapper)
|
||||
/*************************************************************************/
|
||||
|
||||
static void
|
||||
clutter_backend_osx_init (ClutterBackendOSX *self)
|
||||
clutter_backend_osx_init (ClutterBackendOSX *backend_osx)
|
||||
{
|
||||
backend_osx->context = nil;
|
||||
backend_osx->pixel_format = nil;
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
x
Reference in New Issue
Block a user