X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fplat%2FDarwin.cc;h=ed01572dd16211ff5d64fdc97ad1040606433bb4;hp=a35ba3ae0311a11c2b107e31fb48e82b3d5793b1;hb=297fdbde87e6db4732448a0950d1141c7265c169;hpb=76b21655a0710caf4f972c107a3ab991032d7e10 diff --git a/src/org/ibex/plat/Darwin.cc b/src/org/ibex/plat/Darwin.cc index a35ba3a..ed01572 100644 --- a/src/org/ibex/plat/Darwin.cc +++ b/src/org/ibex/plat/Darwin.cc @@ -1,7 +1,4 @@ -// Copyright 2000-2005 the Contributors, as shown in the revision logs. -// Licensed under the GNU General Public License version 2 ("the License"). -// You may not use this file except in compliance with the License. - +// Copyright 2003 Adam Megacz, see the COPYING file for licensing [LGPL] // Authors: Brian Alliet and Evan Jones #ifndef __APPLE_CC__ #define FSF_GCC @@ -21,6 +18,7 @@ #include #include +#include #include #include #include @@ -259,9 +257,9 @@ class SmartCFString { }; // CHECKME: Is just making up your own four char codes really correct? -const static UInt32 kEventClassCarbonMessage = 'ibexa'; -const static UInt32 kEventCarbonMessage = 'ibexb'; -const static UInt32 kEventParamCarbonMessage = 'ibexc'; +const static UInt32 kEventClassCarbonMessage = 'ibxa'; +const static UInt32 kEventCarbonMessage = 'ibxb'; +const static UInt32 kEventParamCarbonMessage = 'ibxc'; static OSStatus carbonMessageEventHandler(EventHandlerCallRef handler, EventRef e, void *userData); static EventHandlerUPP carbonMessageEventHandlerUPP; @@ -705,7 +703,7 @@ static OSStatus paintProc ( Darwin$CarbonSurface *surface = (Darwin$CarbonSurface*) userData; Rect rect; WC(GetRegionBounds)(inClientPaintRgn, &rect); - surface->Dirty(rect.left,rect.top,rect.right-rect.left,rect.bottom-rect.top); + surface->dirty(rect.left,rect.top,rect.right-rect.left,rect.bottom-rect.top); return noErr; } @@ -718,9 +716,9 @@ void Darwin$CarbonSurface::natInit(jboolean framed) { WindowAttributes attr = kWindowStandardHandlerAttribute| (framed ? kWindowInWindowMenuAttribute|kWindowStandardDocumentAttributes|kWindowLiveResizeAttribute : 0); OSStatus r; - rect.top = rect.left = 0; - rect.bottom = rect.right = 10; - winWidth = winHeight = 10; + rect.top = rect.left = 100; + rect.bottom = rect.right = 200; + winWidth = winHeight = 100; r = WC(CreateNewWindow)(wc, attr, &rect, &window); checkStatus(r,"CreateNewWindow"); @@ -1142,6 +1140,12 @@ void Darwin$GLCarbonPixelBuffer::activateContext() { WC(aglSetCurrentContext)(ctx); } +void Darwin$GLCarbonSurface$GLCarbonSurfacePixelBuffer::activateContext() { + // hooray for Brian's forward-thinking design abstractions, because I have no idea what the fuck this does, but it works + AGLContext ctx = (AGLContext) rawCTX; + WC(aglSetCurrentContext)(ctx); +} + void Darwin$GLCarbonPixelBuffer::natCleanup(RawData* rawWindowRef, RawData* rawCTX) { WindowRef window = (WindowRef) rawWindowRef; AGLContext ctx = (AGLContext) rawCTX;