You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
Bring that Whole New World to the Old Continent too
Applies the clang-format style to the 2.1 branch as done for master in
5dbf1809c6.
This commit is contained in:
@@ -31,58 +31,58 @@
|
||||
#ifdef OSX_ENABLED
|
||||
#if defined(OPENGL_ENABLED) || defined(LEGACYGL_ENABLED)
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
|
||||
#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
|
||||
#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
|
||||
#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
|
||||
|
||||
void ContextGL_OSX::release_current() {
|
||||
|
||||
aglSetCurrentContext( context );
|
||||
aglSetCurrentContext(context);
|
||||
}
|
||||
|
||||
void ContextGL_OSX::make_current() {
|
||||
|
||||
aglSetCurrentContext( NULL );
|
||||
aglSetCurrentContext(NULL);
|
||||
}
|
||||
void ContextGL_OSX::swap_buffers() {
|
||||
|
||||
aglSwapBuffers( context );
|
||||
aglSwapBuffers(context);
|
||||
}
|
||||
|
||||
Error ContextGL_OSX::initialize() {
|
||||
|
||||
if ( (Ptr) kUnresolvedCFragSymbolAddress == (Ptr) aglChoosePixelFormat )
|
||||
if ((Ptr)kUnresolvedCFragSymbolAddress == (Ptr)aglChoosePixelFormat)
|
||||
return FAILED;
|
||||
|
||||
GLint attributes[] = { AGL_RGBA,
|
||||
AGL_DOUBLEBUFFER,
|
||||
AGL_DEPTH_SIZE, 32,
|
||||
AGL_NO_RECOVERY,
|
||||
AGL_NONE,
|
||||
AGL_NONE };
|
||||
AGL_DOUBLEBUFFER,
|
||||
AGL_DEPTH_SIZE, 32,
|
||||
AGL_NO_RECOVERY,
|
||||
AGL_NONE,
|
||||
AGL_NONE };
|
||||
|
||||
AGLPixelFormat format = NULL;
|
||||
|
||||
format = aglChoosePixelFormat( NULL, 0, attributes );
|
||||
format = aglChoosePixelFormat(NULL, 0, attributes);
|
||||
|
||||
if ( !format )
|
||||
if (!format)
|
||||
return FAILED;
|
||||
|
||||
context = aglCreateContext( format, 0 );
|
||||
context = aglCreateContext(format, 0);
|
||||
|
||||
if ( !context )
|
||||
if (!context)
|
||||
return FAILED;
|
||||
|
||||
aglDestroyPixelFormat( format );
|
||||
aglDestroyPixelFormat(format);
|
||||
|
||||
aglSetWindowRef( context, window );
|
||||
aglSetWindowRef(context, window);
|
||||
|
||||
GLint swapInterval = 1;
|
||||
aglSetInteger( context, AGL_SWAP_INTERVAL, &swapInterval );
|
||||
aglSetInteger(context, AGL_SWAP_INTERVAL, &swapInterval);
|
||||
|
||||
aglSetCurrentContext( context );
|
||||
aglSetCurrentContext(context);
|
||||
|
||||
return OK;
|
||||
}
|
||||
@@ -92,13 +92,11 @@ ContextGL_OSX::ContextGL_OSX(WindowRef p_window) {
|
||||
window = p_window;
|
||||
}
|
||||
|
||||
|
||||
ContextGL_OSX::~ContextGL_OSX() {
|
||||
|
||||
if (context)
|
||||
aglDestroyContext(context);
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user