diff options
author | Kenneth Russel <[email protected]> | 2005-07-27 00:30:06 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2005-07-27 00:30:06 +0000 |
commit | 7c1f2cde56438a979ddaab5fecc09f663427be91 (patch) | |
tree | 65098e75762b3e0f6a7b1a484792f9a48ca3b247 /make/glxext.cfg | |
parent | ebd2c94e33c643ad6102e76f22d1624e9b986737 (diff) |
Refactored platform extensions out of the GL interface and
implementation and into their own objects according to the JSR-231
expert group's resolutions. Moved the interfaces declaring these
extensions into the platform-specific implementation directories and
added a loosely-specified GL.getPlatformGLExtensions(). This will
shrink the size of the platform-independent jar file considerably as
the implementing class for the public GL interface is now no longer
replicated for each platform. The build process is also simplified a
fair bit; more simplifications are possible.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JSR-231@337 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'make/glxext.cfg')
-rwxr-xr-x | make/glxext.cfg | 137 |
1 files changed, 137 insertions, 0 deletions
diff --git a/make/glxext.cfg b/make/glxext.cfg new file mode 100755 index 000000000..06363c56c --- /dev/null +++ b/make/glxext.cfg @@ -0,0 +1,137 @@ +# This .cfg file is used to generate the interface and implementing +# class for the GLX extensions. +Package net.java.games.jogl.impl.x11 +Style InterfaceAndImpl +JavaClass GLXExt +ImplPackage net.java.games.jogl.impl.x11 +ImplJavaClass GLXExtImpl +Include gl-common-x11.cfg + +EmitProcAddressTable true +ProcAddressTableClassName GLXExtProcAddressTable +ContextVariableName _context + +# Ignore everything that doesn't start with glX or GLX +IgnoreNot ^(glX|GLX).+ + +CustomCCode #include <inttypes.h> +CustomCCode #include <stdlib.h> +CustomCCode #include <X11/Xlib.h> + +CustomCCode /* Define GL_GLEXT_PROTOTYPES so that the OpenGL extension prototypes in +CustomCCode "glext.h" are parsed. */ +CustomCCode #define GL_GLEXT_PROTOTYPES + +CustomCCode /* Define GLX_GLXEXT_PROTOTYPES so that the OpenGL extension prototypes in +CustomCCode "glxext.h" are parsed. */ +CustomCCode #define GLX_GLXEXT_PROTOTYPES + +CustomCCode /* Include the OpenGL headers */ +CustomCCode #include <GL/gl.h> +CustomCCode #include <GL/glx.h> +CustomCCode #include <GL/glxext.h> + +CustomCCode /* Provide Windows typedefs */ +CustomCCode typedef void* LPVOID; +CustomCCode typedef unsigned int* PUINT; + +CustomJavaCode GLXExt public boolean isFunctionAvailable(String glFunctionName); +CustomJavaCode GLXExt public boolean isExtensionAvailable(String glExtensionName); + +CustomJavaCode GLXExtImpl public GLXExtImpl(X11GLContext context) { +CustomJavaCode GLXExtImpl this._context = context; +CustomJavaCode GLXExtImpl } + +CustomJavaCode GLXExtImpl public boolean isFunctionAvailable(String glFunctionName) +CustomJavaCode GLXExtImpl { +CustomJavaCode GLXExtImpl return _context.isFunctionAvailable(glFunctionName); +CustomJavaCode GLXExtImpl } + +CustomJavaCode GLXExtImpl public boolean isExtensionAvailable(String glExtensionName) +CustomJavaCode GLXExtImpl { +CustomJavaCode GLXExtImpl return _context.isExtensionAvailable(glExtensionName); +CustomJavaCode GLXExtImpl } + +CustomJavaCode GLXExtImpl private X11GLContext _context; + + +# These Ignores cause the core GLX routines to be ignored from the +# GLXExt interface and GLXExtImpl implementing class. +Ignore glXChooseVisual +Ignore glXCreateContext +Ignore glXDestroyContext +Ignore glXMakeCurrent +Ignore glXCopyContext +Ignore glXSwapBuffers +Ignore glXCreateGLXPixmap +Ignore glXDestroyGLXPixmap +Ignore glXQueryExtension +Ignore glXQueryVersion +Ignore glXIsDirect +Ignore glXGetConfig +Ignore glXGetCurrentContext +Ignore glXGetCurrentDrawable +Ignore glXWaitGL +Ignore glXWaitX +Ignore glXUseXFont +Ignore glXQueryExtensionsString +Ignore glXQueryServerString +Ignore glXGetClientString +Ignore glXGetCurrentDisplay +Ignore glXChooseFBConfig +Ignore glXGetFBConfigAttrib +Ignore glXGetFBConfigs +Ignore glXGetVisualFromFBConfig +Ignore glXCreateWindow +Ignore glXDestroyWindow +Ignore glXCreatePixmap +Ignore glXDestroyPixmap +Ignore glXCreatePbuffer +Ignore glXDestroyPbuffer +Ignore glXQueryDrawable +Ignore glXCreateNewContext +Ignore glXMakeContextCurrent +Ignore glXGetCurrentReadDrawable +Ignore glXQueryContext +Ignore glXSelectEvent +Ignore glXGetSelectedEvent +Ignore glXGetProcAddress + +# Ignore a few extensions that bring in data types we don't want to +# expose in the public API (and that are useless anyway without +# exposing more of the implementation) +Ignore glXGetFBConfigAttribSGIX +Ignore glXChooseFBConfigSGIX +Ignore glXCreateGLXPixmapWithConfigSGIX +Ignore glXCreateContextWithConfigSGIX +Ignore glXGetVisualFromFBConfigSGIX +Ignore glXGetFBConfigFromVisualSGIX +Ignore glXCreateGLXPbufferSGIX +Ignore glXDestroyGLXPbufferSGIX +Ignore glXQueryGLXPbufferSGIX +Ignore glXSelectEventSGIX +Ignore glXGetSelectedEventSGIX +Ignore glXCreateGLXPixmapMESA + +# Now we can ignore the GLXFBConfig and XVisualInfo data types +Ignore GLXFBConfig +Ignore XVisualInfo + +# Ignore the SGI hyperpipe extension, which will require more GlueGen +# work to expose the pipeName fields in the various structs +Ignore glXQueryHyperpipeNetworkSGIX +Ignore glXHyperpipeConfigSGIX +Ignore glXQueryHyperpipeConfigSGIX +Ignore glXDestroyHyperpipeConfigSGIX +Ignore glXBindHyperpipeSGIX +Ignore glXQueryHyperpipeBestAttribSGIX +Ignore glXHyperpipeAttribSGIX +Ignore glXQueryHyperpipeAttribSGIX +Ignore GLXHyperpipeNetworkSGIX +Ignore GLXHyperpipeConfigSGIX +Ignore GLXPipeRect +Ignore GLXPipeRectLimits + +# XID shows up in the public API (and shouldn't -- will be removed in +# the JSR 231/239 APIs) and needs to be treated as a long for now +Opaque long XID |