summaryrefslogtreecommitdiffstats
path: root/make/joal.cfg
diff options
context:
space:
mode:
authorkbr <[email protected]>2006-01-10 11:07:30 +0000
committerkbr <[email protected]>2006-01-10 11:07:30 +0000
commit1a0b7c61155813ac0bf3c6d58b4dac15f0225101 (patch)
treee3b573ca2193ae8a6aacd5bc5cb3060321308ba7 /make/joal.cfg
parent0badf374064da5c608dcb06ef2d2e9966792ddc8 (diff)
Merged gluegen-branch-1-0 on to the main JOAL trunk. JOAL is now built
using GlueGen and currently requires a built JOGL workspace as a sibling workspace of the JOAL workspace. git-svn-id: file:///home/mbien/NetBeansProjects/JOGAMP/joal-sync/git-svn/../svn-server-sync/joal/trunk@101 03bf7f67-59de-4072-a415-9a990d468a3f
Diffstat (limited to 'make/joal.cfg')
-rwxr-xr-xmake/joal.cfg67
1 files changed, 67 insertions, 0 deletions
diff --git a/make/joal.cfg b/make/joal.cfg
new file mode 100755
index 0000000..c6894d9
--- /dev/null
+++ b/make/joal.cfg
@@ -0,0 +1,67 @@
+# This .cfg file is used to generate the JOAL interface.
+Include joal-common.cfg
+
+Style InterfaceAndImpl
+JavaClass AL
+ImplPackage net.java.games.joal.impl
+ImplJavaClass ALImpl
+Extends AL ALConstants
+
+Implements ALImpl DynamicLookupHelper
+
+EmitProcAddressTable true
+ProcAddressTableClassName ALProcAddressTable
+GetProcAddressTableExpr ALProcAddressLookup.getALProcAddressTable()
+ProcAddressNameExpr LP $UPPERCASE({0})
+
+Import net.java.games.joal.*
+Import net.java.games.joal.impl.*
+Import com.sun.gluegen.runtime.*
+
+# Factor out the OpenAL constants into their own interface
+Ignore ^AL_.+
+
+# alGetProcAddress is broken for core OpenAL routines at least up
+# through OpenAL 1.1, so we have to implement our own dlsym()
+# operation in order to populate the ALProcAddressTable and
+# ALCProcAddressTable. If / when it is fixed and we don't need
+# compatibility with preexisting OpenAL 1.0 and 1.1 installations we
+# can enable the code below and delete the custom C code for
+# dynamicLookupFunction0.
+Ignore alGetProcAddress
+
+# This routine is not exposed in the public API
+# AccessControl alGetProcAddress PACKAGE_PRIVATE
+# And it's also statically linked for bootstrapping
+# (could also consider looking it up via dlsym to more fully allow
+# unloading of OpenAL, but that doesn't seem necessary and requires
+# more native code to load/unload libraries)
+# SkipProcAddressGen alGetProcAddress
+# We also have to hack its return type for now because we can't make
+# just that void* opaque
+# Opaque long ALproc
+
+# This routine doesn't seem to exist
+Ignore alHint
+
+# Mappings for data types
+Opaque boolean ALboolean
+
+# These routines use or return strings
+ReturnsString alGetString
+ArgumentIsString alIsExtensionPresent 0
+ArgumentIsString alGetEnumValue 0
+ArgumentIsString alGetProcAddress 0
+
+# Provide #includes to native code
+CustomCCode #include "al.h"
+
+CustomJavaCode ALImpl /** Provides dlsym() capabilities because alGetProcAddress is
+CustomJavaCode ALImpl broken for core OpenAL routines at least up through OpenAL 1.1. */
+CustomJavaCode ALImpl public long dynamicLookupFunction(String functionName) {
+CustomJavaCode ALImpl return dynamicLookupFunction0(functionName);
+CustomJavaCode ALImpl }
+CustomJavaCode ALImpl private native long dynamicLookupFunction0(String functionName);
+
+IncludeAs CustomCCode joal-common-CustomCCode.c
+IncludeAs CustomCCode joal-CustomCCode.c