-// 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
#include <org/ibex/plat/Darwin.h>
#include <org/ibex/plat/Darwin$CarbonSurface.h>
+#include <org/ibex/plat/Darwin$GLCarbonSurface$GLCarbonSurfacePixelBuffer.h>
#include <org/ibex/plat/Darwin$GLCarbonSurface.h>
#include <org/ibex/plat/Darwin$GLCarbonPixelBuffer.h>
#include <org/ibex/plat/Darwin$CarbonMessage.h>
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;
}
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");
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;