summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2006-01-22 00:26:44 +0000
committerKenneth Russel <[email protected]>2006-01-22 00:26:44 +0000
commitae26492c30051eb7c6c883b3c6397390f91afcae (patch)
tree4160bafed956bc8572091cb5431a31df1c214dd8 /make
parent8d13e4a3fd50545def562749c2abe9f10372edaf (diff)
Cleaned up how declarations for Mac OS X window system wrapper
functions are specified. Now have their own header (which unfortunately could not be placed in the macosx stub_includes subdirectory due to build problems) in make/stub_includes/opengl/macosx-window-system.h. Deleted manual declarations for these functions from cgl-macosx.cfg. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@556 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'make')
-rw-r--r--make/build.xml2
-rw-r--r--make/cgl-macosx.cfg41
-rw-r--r--make/stub_includes/macosx/window-system.c41
-rw-r--r--make/stub_includes/opengl/macosx-window-system.h46
4 files changed, 50 insertions, 80 deletions
diff --git a/make/build.xml b/make/build.xml
index 89c515a56..ef458a537 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -799,6 +799,8 @@
<sysincludepath path="${java.includes.dir.platform}"/>
<includepath path="stub_includes/opengl"/>
<includepath path="stub_includes/cg" if="c.compiler.use-cglib"/>
+ <!-- This must come last to not override real include paths -->
+ <!-- includepath path="stub_includes/macosx" if="isOSX" / -->
</compiler>
<linker extends="${linker.cfg.id}">
diff --git a/make/cgl-macosx.cfg b/make/cgl-macosx.cfg
index ccf25e718..97a3bbeff 100644
--- a/make/cgl-macosx.cfg
+++ b/make/cgl-macosx.cfg
@@ -9,47 +9,8 @@ Include gl-common-macosx.cfg
Opaque long void *
-# FIXME: rather than put in a header file somewhere in the source tree,
-# this was the easiest way of sharing the prototypes between these files
-CustomCCode typedef int Bool;
-
CustomCCode #include </usr/include/machine/types.h>
-
-CustomCCode extern void* createContext(void* shareContext, void* nsView,
-CustomCCode int doubleBuffer,
-CustomCCode int stereo,
-CustomCCode int redBits,
-CustomCCode int greenBits,
-CustomCCode int blueBits,
-CustomCCode int alphaBits,
-CustomCCode int depthBits,
-CustomCCode int stencilBits,
-CustomCCode int accumRedBits,
-CustomCCode int accumGreenBits,
-CustomCCode int accumBlueBits,
-CustomCCode int accumAlphaBits,
-CustomCCode int sampleBuffers,
-CustomCCode int numSamples,
-CustomCCode int pbuffer,
-CustomCCode int floatingPoint,
-CustomCCode int* viewNotReady);
-CustomCCode extern Bool makeCurrentContext(void* nsContext, void* nsView);
-CustomCCode extern Bool clearCurrentContext(void* nsContext, void* nsView);
-CustomCCode extern Bool deleteContext(void* nsContext, void* nsView);
-CustomCCode extern Bool flushBuffer(void* nsContext, void* nsView);
-CustomCCode extern void updateContext(void* nsContext, void* nsView);
-
-CustomCCode extern void* updateContextRegister(void* nsContext, void* nsView);
-CustomCCode extern void updateContextUnregister(void* nsContext, void* nsView, void* updater);
-
-CustomCCode extern void* createPBuffer(int renderTarget, int internalFormat, int width, int height);
-CustomCCode extern Bool destroyPBuffer(void* nsContext, void* pBuffer);
-CustomCCode extern void setContextPBuffer(void* nsContext, void* pBuffer);
-CustomCCode extern void setContextTextureImageToPBuffer(void* nsContext, void* pBuffer, int colorBuffer);
-
-CustomCCode extern void* getProcAddress(const char *procName);
-
-CustomCCode extern void setSwapInterval(void* nsContext, int interval);
+CustomCCode #include "macosx-window-system.h"
# Implement the first argument to getProcAddress as String instead
# of byte[]
diff --git a/make/stub_includes/macosx/window-system.c b/make/stub_includes/macosx/window-system.c
index e53300830..f2738b454 100644
--- a/make/stub_includes/macosx/window-system.c
+++ b/make/stub_includes/macosx/window-system.c
@@ -1,40 +1 @@
-/* C routines encapsulating small amounts of Objective C code to allow
- nsContext creation and manipulation to occur from Java */
-
-typedef int Bool;
-
-void* createContext(void* shareContext, void* nsView,
- int doubleBuffer,
- int stereo,
- int redBits,
- int greenBits,
- int blueBits,
- int alphaBits,
- int depthBits,
- int stencilBits,
- int accumRedBits,
- int accumGreenBits,
- int accumBlueBits,
- int accumAlphaBits,
- int sampleBuffers,
- int numSamples,
- int pbuffer,
- int floatingPoint,
- int* viewNotReady);
-Bool makeCurrentContext(void* nsContext, void* nsView);
-Bool clearCurrentContext(void* nsContext, void* nsView);
-Bool deleteContext(void* nsContext, void* nsView);
-Bool flushBuffer(void* nsContext, void* nsView);
-void updateContext(void* nsContext, void* nsView);
-
-void* updateContextRegister(void* nsContext, void* nsView);
-void updateContextUnregister(void* nsContext, void* nsView, void* updater);
-
-void* createPBuffer(int renderTarget, int internalFormat, int width, int height);
-Bool destroyPBuffer(void* nsContext, void* pBuffer);
-void setContextPBuffer(void* nsContext, void* pBuffer);
-void setContextTextureImageToPBuffer(void* nsContext, void* pBuffer, int colorBuffer);
-
-void* getProcAddress(const char *procName);
-
-void setSwapInterval(void* nsContext, int interval);
+#include "macosx-window-system.h"
diff --git a/make/stub_includes/opengl/macosx-window-system.h b/make/stub_includes/opengl/macosx-window-system.h
new file mode 100644
index 000000000..46ee1c45d
--- /dev/null
+++ b/make/stub_includes/opengl/macosx-window-system.h
@@ -0,0 +1,46 @@
+/* C routines encapsulating small amounts of Objective C code to allow
+ nsContext creation and manipulation to occur from Java
+
+ It's unfortunate this couldn't be placed in the macosx
+ stub_includes directory, but due to the presence of the jni.h stub
+ headers in that directory, if that is in the include path during
+ compilation then the build fails.
+*/
+
+typedef int Bool;
+
+void* createContext(void* shareContext, void* nsView,
+ int doubleBuffer,
+ int stereo,
+ int redBits,
+ int greenBits,
+ int blueBits,
+ int alphaBits,
+ int depthBits,
+ int stencilBits,
+ int accumRedBits,
+ int accumGreenBits,
+ int accumBlueBits,
+ int accumAlphaBits,
+ int sampleBuffers,
+ int numSamples,
+ int pbuffer,
+ int floatingPoint,
+ int* viewNotReady);
+Bool makeCurrentContext(void* nsContext, void* nsView);
+Bool clearCurrentContext(void* nsContext, void* nsView);
+Bool deleteContext(void* nsContext, void* nsView);
+Bool flushBuffer(void* nsContext, void* nsView);
+void updateContext(void* nsContext, void* nsView);
+
+void* updateContextRegister(void* nsContext, void* nsView);
+void updateContextUnregister(void* nsContext, void* nsView, void* updater);
+
+void* createPBuffer(int renderTarget, int internalFormat, int width, int height);
+Bool destroyPBuffer(void* nsContext, void* pBuffer);
+void setContextPBuffer(void* nsContext, void* pBuffer);
+void setContextTextureImageToPBuffer(void* nsContext, void* pBuffer, int colorBuffer);
+
+void* getProcAddress(const char *procName);
+
+void setSwapInterval(void* nsContext, int interval);