Commits

yotis  committed 5193355

Now with #include comes a using statement, added config.h,
added missing extensions, removed unnecessary functions & namespaces,
fixed headers formatting

  • Participants
  • Parent commits d53be90

Comments (0)

Files changed (534)

File generator/generator.py

     print(os.getcwd())
     if not os.path.exists('specs'):
         os.mkdir('specs')
-    
+
+## Uncomment to get new specs
 #    download_specs()
 
     if os.path.exists('../include'): shutil.rmtree('../include')

File generator/glXxx.py

         cpp.write(' */\n')
         
         cpp.write('''
-// Comment the following line to disable thread local storage
-#define GLXX_TLS 
+#include "config.h"
+
 
 #ifdef __linux__
 

File generator/glxx.py

     #define APIENTRY
 #endif
 
-    typedef size_t GLXXloader;
+typedef size_t GLXXloader;
 
 ''')
         h_out.write('\n' + gl_spec_header_passthru + '\n')
         h_out.write(gl_spec_header + '\n')
         h_out.write('''
-
 bool glxxIsVersionSupported(int major, int minor);
 bool glxxIsExtensionSupported(const char* extension);
 
+GLXXloader glxxGenLoader();
+void glxxBindLoader(GLXXloader loader);
+void glxxDeleteLoader(GLuint loader);
+
+
 #endif // GL_XX
 ''')        
         h_out.close()
         cpp_out.write(' */\n')
         
         cpp_out.write('''
-// Comment the following line to disable thread local storage
-#define GLXX_TLS
+#include "config.h"
 
 
 #if defined(_WIN32) || defined(WIN32)
 bool load_gl_4_1_compatibility() { return load_gl_4_0_compatibility() && load_gl_version_4_1(); }
 bool load_gl_4_2_compatibility() { return load_gl_4_1_compatibility() && load_gl_version_4_2(); }
 bool load_gl_3_1_core() { return load_gl_version_1_1() && load_gl_version_1_2() && load_gl_version_1_3() &&
-                                 load_gl_version_1_4() && load_gl_version_1_5() &&
-                                 load_gl_version_2_0() && load_gl_version_2_1() &&
-                                 load_gl_version_3_0() && load_gl_version_3_1(); }
+                                 load_gl_version_1_4() && load_gl_version_1_5() && load_gl_version_2_0() &&
+                                 load_gl_version_2_1() && load_gl_version_3_0() && load_gl_version_3_1(); }
 bool load_gl_3_2_core() { return load_gl_3_1_core() && load_gl_version_3_2(); }
 bool load_gl_3_3_core() { return load_gl_3_2_core() && load_gl_version_3_3(); }
 bool load_gl_4_0_core() { return load_gl_3_3_core() && load_gl_version_4_0(); }
 bool load_gl_4_1_core() { return load_gl_4_0_core() && load_gl_version_4_1(); }
 bool load_gl_4_2_core() { return load_gl_4_1_core() && load_gl_version_4_2(); }
 
+bool has_gl_arb_framebuffer_object_compatibility() { return has_gl_arb_framebuffer_object(); }
+bool has_gl_arb_framebuffer_object_core() { return has_gl_arb_framebuffer_object(); }
+bool load_gl_arb_framebuffer_object_compatibility() { return load_gl_arb_framebuffer_object(); }
+bool load_gl_arb_framebuffer_object_core() { return load_gl_arb_framebuffer_object(); }
+
+bool has_gl_arb_imaging_compatibility() { return glxxIsExtensionSupported("GL_ARB_imaging"); }
+bool has_gl_arb_imaging_core() { return glxxIsExtensionSupported("GL_ARB_imaging"); }
 
 #if defined(_WIN32) || defined(WIN32)
 #pragma pop_macro("MemoryBarrier")

File generator/include_proto/glxx/gl_arb_framebuffer_object_combatibility.h

+#ifndef GL_ARB_FRAMEBUFFER_OBJECT_COMBATIBILITY
+#define GL_ARB_FRAMEBUFFER_OBJECT_COMBATIBILITY
+
+#include "private/gl_arb_framebuffer_object.h"
+#include "private/gl_arb_framebuffer_object_deprecated.h"
+
+namespace gl_arb_framebuffer_combatibility
+{
+    using namespace gl_arb_framebuffer_object;
+    using namespace gl_arb_framebuffer_object_deprecated;
+}
+
+bool has_gl_arb_framebuffer_object_combatibility();
+bool load_gl_arb_framebuffer_object_combatibility();
+
+#endif

File generator/include_proto/glxx/gl_arb_framebuffer_object_core.h

+#ifndef GL_ARB_FRAMEBUFFER_OBJECT_CORE
+#define GL_ARB_FRAMEBUFFER_OBJECT_CORE
+
+#include "private/gl_arb_framebuffer_object.h"
+
+namespace gl_arb_framebuffer_core
+{
+    using namespace gl_arb_framebuffer_object;
+}
+
+bool has_gl_arb_framebuffer_object_core();
+bool load_gl_arb_framebuffer_object_core();
+
+#endif

File generator/include_proto/glxx/gl_arb_imaging_combatibility.h

+#ifndef GL_ARB_IMAGING_COMPATIBILITY
+#define GL_ARB_IMAGING_COMPATIBILITY
+
+#include "private/gl_arb_imaging"
+#include "private/gl_arb_imaging_deprecated"
+
+bool has_gl_arb_imaging_compatibility();
+
+#endif

File generator/include_proto/glxx/gl_arb_imaging_core.h

+#ifndef GL_ARB_IMAGING_CORE
+#define GL_ARB_IMAGING_CORE
+
+#include "private/gl_arb_imaging"
+
+bool has_gl_arb_imaging_core();
+
+#endif

File generator/parse.py

         with open(block_filename, 'w') as bf:
             bf.write('#ifndef %s%s\n' % (prefix, block_name))
             bf.write('#define %s%s\n\n' % (prefix, block_name))
-            if priv: bf.write('#include "%s.h"\n\n' % include_directory)
-            else: bf.write('#include "private/%s.h"\n\n' % include_directory)
+            if priv: bf.write('#include "%s.h"\n' % include_directory)
+            else: bf.write('#include "private/%s.h"\n' % include_directory)
+            if blocks[block_name].defines or blocks[block_name].reuses:
+                bf.write('\n')
             for (name, value) in blocks[block_name].defines:
                 bf.write('#define %s%s %s\n' % (prefix, name, value))
             for (section, name) in blocks[block_name].reuses:
                 cf.write('#define %s_%s\n' % (prefix.upper(), category))
             #append to ..all.h
             with open('../include/%sxx/%sxx_all.h' % (prefix, prefix), 'a') as include_all_header:
-                include_all_header.write('#include <%s>\n' % category_filename)
+                include_all_header.write('#include <%s>\n' % category_filename.lstrip('../include/'))
 
 
         # Write in the header.
         with open(category_filename, 'a') as cf:
-            if category_functions:
+            if passes:
                 cf.write('\n')
-            if passes:
                 cf.write('\n'.join(passes))
                 cf.write('\n')
-            cf.write('\nnamespace %s_%s \n{\n' % (prefix.lower(), category.lower()))
-            for f in category_functions:
-                cf.write('    %s %s%s(%s);\n' % (tm[f.returns], prefix, f.name, ', '.join(f.make_param_list(tm))))
-            cf.write('}\n')
-            if category not in versions:
-                cf.write('bool has_%s_%s();\n' % (prefix.lower(), category.lower()))
             if category_functions:
-                cf.write('bool load_%s_%s();\n' % (prefix.lower(), category.lower()))
+                cf.write('\nnamespace %s_%s\n{\n' % (prefix.lower(), category.lower()))
+                for f in category_functions:
+                    cf.write('    %s %s%s(%s);\n' % (tm[f.returns], prefix, f.name, ', '.join(f.make_param_list(tm))))
+                cf.write('}\n')
+                cf.write('\n#ifndef GLXX_NO_NAMESPACE_INJECTION')
+                cf.write('\nusing namespace %s_%s;' % (prefix.lower(), category.lower()))
+                cf.write('\n#endif\n')
+            if '/private/' not in category_filename:
+                cf.write('\nbool has_%s_%s();\n' % (prefix.lower(), category.lower()))
+                if category_functions:
+                    cf.write('bool load_%s_%s();\n' % (prefix.lower(), category.lower()))
             if passes_end:
                 cf.write('\n'.join(passes_end))
             cf.write('\n#endif\n')
     for (c, f) in categ_file_dict.items():
         print('Completing header ' + c + ': ' + f)
         with open(f, 'a') as cf:
-            cf.write('\nbool has_%s_%s();\n' % (prefix.lower(), c.lower()))
+            if '/private/' not in f:
+                cf.write('\nbool has_%s_%s();\n' % (prefix.lower(), c.lower()))
             cf.write('\n#endif\n')
 
     # End ..all.h header
     with open('../include/%sxx/%sxx_all.h' % (prefix, prefix), 'a') as include_all_header:
-        include_all_header.write('\n#endif')
+        include_all_header.write('\n#endif\n')
 
     out_cpp_typedefs = filter(None, out_cpp_typedefs)
+
     # End the Loader struct
     out_cpp_loader = filter(None, out_cpp_loader)
     out_cpp_loader.append('''
     %sxxLoader() { memset(this, 0, sizeof(%sxxLoader)); }
 };''' % (prefix.lower(), prefix.lower()))
 
-
-
-    # Multiple contexts logic
+    ## Multiple contexts logic
     out_cpp_loader.append('''
 #ifdef GLXX_TLS
     #if defined(_WIN32) || defined(WIN32)

File generator/wglxx.py

         cpp.write(' */\n')
 
         cpp.write('''
-// Comment the following line to disable thread local storage
-#define GLXX_TLS            
+#include "config.h"
+
             
 #if defined(_WIN32) || defined(WIN32)
 #define WIN32_LEAN_AND_MEAN 1

File include/glXxx/glXxx_all.h

 #include <glXxx/glx_amd_gpu_association.h>
 #include <glXxx/glx_ext_create_context_es2_profile.h>
 
-#endif
+#endif

File include/glXxx/glx_arb_create_context.h

 #define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
 #define GLX_CONTEXT_FLAGS_ARB 0x2094
 
-
-namespace glx_arb_create_context 
+namespace glx_arb_create_context
 {
     GLXContext glXCreateContextAttribsARB(Display* dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int* attrib_list);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_arb_create_context;
+#endif
+
 bool has_glx_arb_create_context();
 bool load_glx_arb_create_context();
 

File include/glXxx/glx_arb_create_context_profile.h

 #define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
 #define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126
 
-namespace glx_arb_create_context_profile 
-{
-}
 bool has_glx_arb_create_context_profile();
 
 #endif

File include/glXxx/glx_arb_create_context_robustness.h

 #define GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
 #define GLX_NO_RESET_NOTIFICATION_ARB 0x8261
 
-namespace glx_arb_create_context_robustness 
-{
-}
 bool has_glx_arb_create_context_robustness();
 
 #endif

File include/glXxx/glx_arb_fbconfig_float.h

 #define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9
 #define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
 
-namespace glx_arb_fbconfig_float 
-{
-}
 bool has_glx_arb_fbconfig_float();
 
 #endif

File include/glXxx/glx_arb_framebuffer_srgb.h

 
 #define GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20B2
 
-namespace glx_arb_framebuffer_srgb 
-{
-}
 bool has_glx_arb_framebuffer_srgb();
 
 #endif

File include/glXxx/glx_arb_get_proc_address.h

 
 #include "private/glXxx.h"
 
-
-
-namespace glx_arb_get_proc_address 
+namespace glx_arb_get_proc_address
 {
     __GLXextFuncPtr glXGetProcAddressARB(const GLubyte* procName);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_arb_get_proc_address;
+#endif
+
 bool has_glx_arb_get_proc_address();
 bool load_glx_arb_get_proc_address();
 

File include/glXxx/glx_arb_multisample.h

 #define GLX_SAMPLE_BUFFERS_ARB 100000
 #define GLX_SAMPLES_ARB 100001
 
-namespace glx_arb_multisample 
-{
-}
 bool has_glx_arb_multisample();
 
 #endif

File include/glXxx/glx_ext_fbconfig_packed_float.h

 #define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
 #define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008
 
-namespace glx_ext_fbconfig_packed_float 
-{
-}
 bool has_glx_ext_fbconfig_packed_float();
 
 #endif

File include/glXxx/glx_ext_framebuffer_srgb.h

 
 #define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
 
-namespace glx_ext_framebuffer_srgb 
-{
-}
 bool has_glx_ext_framebuffer_srgb();
 
 #endif

File include/glXxx/glx_ext_import_context.h

 #define GLX_VISUAL_ID_EXT 0x800B
 #define GLX_SCREEN_EXT 0x800C
 
-
-namespace glx_ext_import_context 
+namespace glx_ext_import_context
 {
     Display * glXGetCurrentDisplayEXT();
     int glXQueryContextInfoEXT(Display* dpy, GLXContext context, int attribute, int* value);
     GLXContext glXImportContextEXT(Display* dpy, GLXContextID contextID);
     void glXFreeContextEXT(Display* dpy, GLXContext context);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_ext_import_context;
+#endif
+
 bool has_glx_ext_import_context();
 bool load_glx_ext_import_context();
 

File include/glXxx/glx_ext_swap_control.h

 #define GLX_SWAP_INTERVAL_EXT 0x20F1
 #define GLX_MAX_SWAP_INTERVAL_EXT 0x20F2
 
-
-namespace glx_ext_swap_control 
+namespace glx_ext_swap_control
 {
     int glXSwapIntervalEXT(Display* dpy, GLXDrawable drawable, int interval);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_ext_swap_control;
+#endif
+
 bool has_glx_ext_swap_control();
 bool load_glx_ext_swap_control();
 

File include/glXxx/glx_ext_texture_from_pixmap.h

 #define GLX_AUX8_EXT 0x20EA
 #define GLX_AUX9_EXT 0x20EB
 
-
-namespace glx_ext_texture_from_pixmap 
+namespace glx_ext_texture_from_pixmap
 {
     void glXBindTexImageEXT(Display* dpy, GLXDrawable drawable, int buffer, const int* attrib_list);
     void glXReleaseTexImageEXT(Display* dpy, GLXDrawable drawable, int buffer);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_ext_texture_from_pixmap;
+#endif
+
 bool has_glx_ext_texture_from_pixmap();
 bool load_glx_ext_texture_from_pixmap();
 

File include/glXxx/glx_ext_visual_info.h

 #define GLX_TRANSPARENT_RGB_EXT 0x8008
 #define GLX_TRANSPARENT_INDEX_EXT 0x8009
 
-namespace glx_ext_visual_info 
-{
-}
 bool has_glx_ext_visual_info();
 
 #endif

File include/glXxx/glx_ext_visual_rating.h

 #define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
 #define GLX_NONE_EXT 0x8000
 
-namespace glx_ext_visual_rating 
-{
-}
 bool has_glx_ext_visual_rating();
 
 #endif

File include/glXxx/glx_intel_swap_event.h

 #define GLX_COPY_COMPLETE_INTEL 0x8181
 #define GLX_FLIP_COMPLETE_INTEL 0x8182
 
-namespace glx_intel_swap_event 
-{
-}
 bool has_glx_intel_swap_event();
 
 #endif

File include/glXxx/glx_mesa_agp_offset.h

 
 #include "private/glXxx.h"
 
-
-
-namespace glx_mesa_agp_offset 
+namespace glx_mesa_agp_offset
 {
     unsigned int glXGetAGPOffsetMESA(const void* pointer);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_mesa_agp_offset;
+#endif
+
 bool has_glx_mesa_agp_offset();
 bool load_glx_mesa_agp_offset();
 

File include/glXxx/glx_mesa_copy_sub_buffer.h

 
 #include "private/glXxx.h"
 
-
-
-namespace glx_mesa_copy_sub_buffer 
+namespace glx_mesa_copy_sub_buffer
 {
     void glXCopySubBufferMESA(Display* dpy, GLXDrawable drawable, int x, int y, int width, int height);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_mesa_copy_sub_buffer;
+#endif
+
 bool has_glx_mesa_copy_sub_buffer();
 bool load_glx_mesa_copy_sub_buffer();
 

File include/glXxx/glx_mesa_pixmap_colormap.h

 
 #include "private/glXxx.h"
 
-
-
-namespace glx_mesa_pixmap_colormap 
+namespace glx_mesa_pixmap_colormap
 {
     GLXPixmap glXCreateGLXPixmapMESA(Display* dpy, XVisualInfo* visual, Pixmap pixmap, Colormap cmap);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_mesa_pixmap_colormap;
+#endif
+
 bool has_glx_mesa_pixmap_colormap();
 bool load_glx_mesa_pixmap_colormap();
 

File include/glXxx/glx_mesa_release_buffers.h

 
 #include "private/glXxx.h"
 
-
-
-namespace glx_mesa_release_buffers 
+namespace glx_mesa_release_buffers
 {
     Bool glXReleaseBuffersMESA(Display* dpy, GLXDrawable drawable);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_mesa_release_buffers;
+#endif
+
 bool has_glx_mesa_release_buffers();
 bool load_glx_mesa_release_buffers();
 

File include/glXxx/glx_mesa_set_3dfx_mode.h

 #define GLX_3DFX_WINDOW_MODE_MESA 0x1
 #define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
 
-
-namespace glx_mesa_set_3dfx_mode 
+namespace glx_mesa_set_3dfx_mode
 {
     Bool glXSet3DfxModeMESA(int mode);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_mesa_set_3dfx_mode;
+#endif
+
 bool has_glx_mesa_set_3dfx_mode();
 bool load_glx_mesa_set_3dfx_mode();
 

File include/glXxx/glx_nv_copy_image.h

 
 #include "private/glXxx.h"
 
-
-
-namespace glx_nv_copy_image 
+namespace glx_nv_copy_image
 {
     void glXCopyImageSubDataNV(Display* dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_nv_copy_image;
+#endif
+
 bool has_glx_nv_copy_image();
 bool load_glx_nv_copy_image();
 

File include/glXxx/glx_nv_float_buffer.h

 
 #define GLX_FLOAT_COMPONENTS_NV 0x20B0
 
-namespace glx_nv_float_buffer 
-{
-}
 bool has_glx_nv_float_buffer();
 
 #endif

File include/glXxx/glx_nv_multisample_coverage.h

 #define GLX_COVERAGE_SAMPLES_NV 100001
 #define GLX_COLOR_SAMPLES_NV 0x20B3
 
-namespace glx_nv_multisample_coverage 
-{
-}
 bool has_glx_nv_multisample_coverage();
 
 #endif

File include/glXxx/glx_nv_present_video.h

 
 #define GLX_NUM_VIDEO_SLOTS_NV 0x20F0
 
-
-namespace glx_nv_present_video 
+namespace glx_nv_present_video
 {
     unsigned int * glXEnumerateVideoDevicesNV(Display* dpy, int screen, int* nelements);
     int glXBindVideoDeviceNV(Display* dpy, unsigned int video_slot, unsigned int video_device, const int* attrib_list);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_nv_present_video;
+#endif
+
 bool has_glx_nv_present_video();
 bool load_glx_nv_present_video();
 

File include/glXxx/glx_nv_swap_group.h

 
 #include "private/glXxx.h"
 
-
-
-namespace glx_nv_swap_group 
+namespace glx_nv_swap_group
 {
     Bool glXJoinSwapGroupNV(Display* dpy, GLXDrawable drawable, GLuint group);
     Bool glXBindSwapBarrierNV(Display* dpy, GLuint group, GLuint barrier);
     Bool glXQueryFrameCountNV(Display* dpy, int screen, GLuint* count);
     Bool glXResetFrameCountNV(Display* dpy, int screen);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_nv_swap_group;
+#endif
+
 bool has_glx_nv_swap_group();
 bool load_glx_nv_swap_group();
 

File include/glXxx/glx_nv_video_capture.h

 #define GLX_UNIQUE_ID_NV 0x20CE
 #define GLX_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
 
-
-namespace glx_nv_video_capture 
+namespace glx_nv_video_capture
 {
     int glXBindVideoCaptureDeviceNV(Display* dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device);
     GLXVideoCaptureDeviceNV * glXEnumerateVideoCaptureDevicesNV(Display* dpy, int screen, int* nelements);
     int glXQueryVideoCaptureDeviceNV(Display* dpy, GLXVideoCaptureDeviceNV device, int attribute, int* value);
     void glXReleaseVideoCaptureDeviceNV(Display* dpy, GLXVideoCaptureDeviceNV device);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_nv_video_capture;
+#endif
+
 bool has_glx_nv_video_capture();
 bool load_glx_nv_video_capture();
 

File include/glXxx/glx_nv_video_output.h

 #define GLX_VIDEO_OUT_STACKED_FIELDS_1_2_NV 0x20CB
 #define GLX_VIDEO_OUT_STACKED_FIELDS_2_1_NV 0x20CC
 
-
-namespace glx_nv_video_output 
+namespace glx_nv_video_output
 {
     int glXGetVideoDeviceNV(Display* dpy, int screen, int numVideoDevices, GLXVideoDeviceNV* pVideoDevice);
     int glXReleaseVideoDeviceNV(Display* dpy, int screen, GLXVideoDeviceNV VideoDevice);
     int glXSendPbufferToVideoNV(Display* dpy, GLXPbuffer pbuf, int iBufferType, unsigned long* pulCounterPbuffer, GLboolean bBlock);
     int glXGetVideoInfoNV(Display* dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long* pulCounterOutputPbuffer, unsigned long* pulCounterOutputVideo);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_nv_video_output;
+#endif
+
 bool has_glx_nv_video_output();
 bool load_glx_nv_video_output();
 

File include/glXxx/glx_oml_swap_method.h

 #define GLX_SWAP_COPY_OML 0x8062
 #define GLX_SWAP_UNDEFINED_OML 0x8063
 
-namespace glx_oml_swap_method 
-{
-}
 bool has_glx_oml_swap_method();
 
 #endif

File include/glXxx/glx_oml_sync_control.h

 
 #include "private/glXxx.h"
 
-
-
-namespace glx_oml_sync_control 
+namespace glx_oml_sync_control
 {
     Bool glXGetSyncValuesOML(Display* dpy, GLXDrawable drawable, int64_t* ust, int64_t* msc, int64_t* sbc);
     Bool glXGetMscRateOML(Display* dpy, GLXDrawable drawable, int32_t* numerator, int32_t* denominator);
     Bool glXWaitForMscOML(Display* dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t* ust, int64_t* msc, int64_t* sbc);
     Bool glXWaitForSbcOML(Display* dpy, GLXDrawable drawable, int64_t target_sbc, int64_t* ust, int64_t* msc, int64_t* sbc);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_oml_sync_control;
+#endif
+
 bool has_glx_oml_sync_control();
 bool load_glx_oml_sync_control();
 

File include/glXxx/glx_sgi_cushion.h

 
 #include "private/glXxx.h"
 
-
-
-namespace glx_sgi_cushion 
+namespace glx_sgi_cushion
 {
     void glXCushionSGI(Display* dpy, Window window, float cushion);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_sgi_cushion;
+#endif
+
 bool has_glx_sgi_cushion();
 bool load_glx_sgi_cushion();
 

File include/glXxx/glx_sgi_make_current_read.h

 
 #include "private/glXxx.h"
 
-
-
-namespace glx_sgi_make_current_read 
+namespace glx_sgi_make_current_read
 {
     Bool glXMakeCurrentReadSGI(Display* dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
     GLXDrawable glXGetCurrentReadDrawableSGI();
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_sgi_make_current_read;
+#endif
+
 bool has_glx_sgi_make_current_read();
 bool load_glx_sgi_make_current_read();
 

File include/glXxx/glx_sgi_swap_control.h

 
 #include "private/glXxx.h"
 
-
-
-namespace glx_sgi_swap_control 
+namespace glx_sgi_swap_control
 {
     int glXSwapIntervalSGI(int interval);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_sgi_swap_control;
+#endif
+
 bool has_glx_sgi_swap_control();
 bool load_glx_sgi_swap_control();
 

File include/glXxx/glx_sgi_video_sync.h

 
 #include "private/glXxx.h"
 
-
-
-namespace glx_sgi_video_sync 
+namespace glx_sgi_video_sync
 {
     int glXGetVideoSyncSGI(unsigned int* count);
     int glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int* count);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_sgi_video_sync;
+#endif
+
 bool has_glx_sgi_video_sync();
 bool load_glx_sgi_video_sync();
 

File include/glXxx/glx_sgis_multisample.h

 #define GLX_SAMPLE_BUFFERS_SGIS 100000
 #define GLX_SAMPLES_SGIS 100001
 
-namespace glx_sgis_multisample 
-{
-}
 bool has_glx_sgis_multisample();
 
 #endif

File include/glXxx/glx_sgix_dmbuffer.h

 
 #ifdef _DM_BUFFER_H_
 
-namespace glx_sgix_dmbuffer 
+namespace glx_sgix_dmbuffer
 {
     Bool glXAssociateDMPbufferSGIX(Display* dpy, GLXPbufferSGIX pbuffer, DMparams* params, DMbuffer dmbuffer);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_sgix_dmbuffer;
+#endif
+
 bool has_glx_sgix_dmbuffer();
 bool load_glx_sgix_dmbuffer();
 #endif /* _DM_BUFFER_H_ */

File include/glXxx/glx_sgix_fbconfig.h

 #define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
 #define GLX_SCREEN_EXT 0x800C
 
-
-namespace glx_sgix_fbconfig 
+namespace glx_sgix_fbconfig
 {
     int glXGetFBConfigAttribSGIX(Display* dpy, GLXFBConfigSGIX config, int attribute, int* value);
     GLXFBConfigSGIX * glXChooseFBConfigSGIX(Display* dpy, int screen, int* attrib_list, int* nelements);
     XVisualInfo * glXGetVisualFromFBConfigSGIX(Display* dpy, GLXFBConfigSGIX config);
     GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX(Display* dpy, XVisualInfo* vis);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_sgix_fbconfig;
+#endif
+
 bool has_glx_sgix_fbconfig();
 bool load_glx_sgix_fbconfig();
 

File include/glXxx/glx_sgix_hyperpipe.h

 int XOrigin, YOrigin, maxHeight, maxWidth;
 } GLXPipeRectLimits;
 
-namespace glx_sgix_hyperpipe 
+namespace glx_sgix_hyperpipe
 {
     GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX(Display* dpy, int* npipes);
     int glXHyperpipeConfigSGIX(Display* dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX* cfg, int* hpId);
     int glXHyperpipeAttribSGIX(Display* dpy, int timeSlice, int attrib, int size, void* attribList);
     int glXQueryHyperpipeAttribSGIX(Display* dpy, int timeSlice, int attrib, int size, void* returnAttribList);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_sgix_hyperpipe;
+#endif
+
 bool has_glx_sgix_hyperpipe();
 bool load_glx_sgix_hyperpipe();
 

File include/glXxx/glx_sgix_pbuffer.h

 #define GLX_WINDOW_SGIX 0x8022
 #define GLX_PBUFFER_SGIX 0x8023
 
-
-namespace glx_sgix_pbuffer 
+namespace glx_sgix_pbuffer
 {
     GLXPbufferSGIX glXCreateGLXPbufferSGIX(Display* dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int* attrib_list);
     void glXDestroyGLXPbufferSGIX(Display* dpy, GLXPbufferSGIX pbuf);
     void glXSelectEventSGIX(Display* dpy, GLXDrawable drawable, unsigned long mask);
     void glXGetSelectedEventSGIX(Display* dpy, GLXDrawable drawable, unsigned long* mask);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_sgix_pbuffer;
+#endif
+
 bool has_glx_sgix_pbuffer();
 bool load_glx_sgix_pbuffer();
 

File include/glXxx/glx_sgix_swap_barrier.h

 
 #include "private/glXxx.h"
 
-
-
-namespace glx_sgix_swap_barrier 
+namespace glx_sgix_swap_barrier
 {
     void glXBindSwapBarrierSGIX(Display* dpy, GLXDrawable drawable, int barrier);
     Bool glXQueryMaxSwapBarriersSGIX(Display* dpy, int screen, int* max);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_sgix_swap_barrier;
+#endif
+
 bool has_glx_sgix_swap_barrier();
 bool load_glx_sgix_swap_barrier();
 

File include/glXxx/glx_sgix_swap_group.h

 
 #include "private/glXxx.h"
 
-
-
-namespace glx_sgix_swap_group 
+namespace glx_sgix_swap_group
 {
     void glXJoinSwapGroupSGIX(Display* dpy, GLXDrawable drawable, GLXDrawable member);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_sgix_swap_group;
+#endif
+
 bool has_glx_sgix_swap_group();
 bool load_glx_sgix_swap_group();
 

File include/glXxx/glx_sgix_video_resize.h

 #define GLX_SYNC_FRAME_SGIX 0x00000000
 #define GLX_SYNC_SWAP_SGIX 0x00000001
 
-
-namespace glx_sgix_video_resize 
+namespace glx_sgix_video_resize
 {
     int glXBindChannelToWindowSGIX(Display* display, int screen, int channel, Window window);
     int glXChannelRectSGIX(Display* display, int screen, int channel, int x, int y, int w, int h);
     int glXQueryChannelDeltasSGIX(Display* display, int screen, int channel, int* x, int* y, int* w, int* h);
     int glXChannelRectSyncSGIX(Display* display, int screen, int channel, GLenum synctype);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_sgix_video_resize;
+#endif
+
 bool has_glx_sgix_video_resize();
 bool load_glx_sgix_video_resize();
 

File include/glXxx/glx_sgix_video_source.h

 
 #include "private/glXxx.h"
 
-
 #ifdef _VL_H
 
-namespace glx_sgix_video_source 
+namespace glx_sgix_video_source
 {
     GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX(Display* display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
     void glXDestroyGLXVideoSourceSGIX(Display* dpy, GLXVideoSourceSGIX glxvideosource);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_sgix_video_source;
+#endif
+
 bool has_glx_sgix_video_source();
 bool load_glx_sgix_video_source();
 #endif /* _VL_H */

File include/glXxx/glx_sgix_visual_select_group.h

 
 #define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028
 
-namespace glx_sgix_visual_select_group 
-{
-}
 bool has_glx_sgix_visual_select_group();
 
 #endif

File include/glXxx/glx_sun_get_transparent_index.h

 
 #include "private/glXxx.h"
 
-
-
-namespace glx_sun_get_transparent_index 
+namespace glx_sun_get_transparent_index
 {
     Status glXGetTransparentIndexSUN(Display* dpy, Window overlay, Window underlay, long* pTransparentIndex);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_sun_get_transparent_index;
+#endif
+
 bool has_glx_sun_get_transparent_index();
 bool load_glx_sun_get_transparent_index();
 

File include/glXxx/private/glx_version_1_3.h

 #define GLX_PBUFFER_HEIGHT 0x8040
 #define GLX_PBUFFER_WIDTH 0x8041
 
-
-namespace glx_version_1_3 
+namespace glx_version_1_3
 {
     GLXFBConfig * glXGetFBConfigs(Display* dpy, int screen, int* nelements);
     GLXFBConfig * glXChooseFBConfig(Display* dpy, int screen, const int* attrib_list, int* nelements);
     void glXSelectEvent(Display* dpy, GLXDrawable draw, unsigned long event_mask);
     void glXGetSelectedEvent(Display* dpy, GLXDrawable draw, unsigned long* event_mask);
 }
-bool load_glx_version_1_3();
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_version_1_3;
+#endif
 
 #endif

File include/glXxx/private/glx_version_1_4.h

 #define GLX_SAMPLE_BUFFERS 100000
 #define GLX_SAMPLES 100001
 
-
-namespace glx_version_1_4 
+namespace glx_version_1_4
 {
     __GLXextFuncPtr glXGetProcAddress(const GLubyte* procName);
 }
-bool load_glx_version_1_4();
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace glx_version_1_4;
+#endif
 
 #endif

File include/glxx/gl_3dfx_multisample.h

 #define GL_SAMPLES_3DFX 0x86B4
 #define GL_MULTISAMPLE_BIT_3DFX 0x20000000
 
-namespace gl_3dfx_multisample 
-{
-}
 bool has_gl_3dfx_multisample();
 
 #endif

File include/glxx/gl_3dfx_tbuffer.h

 
 #include "private/glxx.h"
 
-
-
-namespace gl_3dfx_tbuffer 
+namespace gl_3dfx_tbuffer
 {
     void glTbufferMask3DFX(GLuint mask);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace gl_3dfx_tbuffer;
+#endif
+
 bool has_gl_3dfx_tbuffer();
 bool load_gl_3dfx_tbuffer();
 

File include/glxx/gl_3dfx_texture_compression_fxt1.h

 #define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0
 #define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1
 
-namespace gl_3dfx_texture_compression_fxt1 
-{
-}
 bool has_gl_3dfx_texture_compression_fxt1();
 
 #endif

File include/glxx/gl_amd_blend_minmax_factor.h

 #define GL_FACTOR_MIN_AMD 0x901C
 #define GL_FACTOR_MAX_AMD 0x901D
 
-namespace gl_amd_blend_minmax_factor 
-{
-}
 bool has_gl_amd_blend_minmax_factor();
 
 #endif

File include/glxx/gl_amd_conservative_depth.h

 
 #include "private/glxx.h"
 
-
-namespace gl_amd_conservative_depth 
-{
-}
 bool has_gl_amd_conservative_depth();
 
 #endif

File include/glxx/gl_amd_debug_output.h

 #define GL_DEBUG_CATEGORY_APPLICATION_AMD 0x914F
 #define GL_DEBUG_CATEGORY_OTHER_AMD 0x9150
 
-
-namespace gl_amd_debug_output 
+namespace gl_amd_debug_output
 {
     void glDebugMessageEnableAMD(GLenum category, GLenum severity, GLsizei count, const GLuint* ids, GLboolean enabled);
     void glDebugMessageInsertAMD(GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar* buf);
     void glDebugMessageCallbackAMD(GLDEBUGPROCAMD callback, GLvoid* userParam);
     GLuint glGetDebugMessageLogAMD(GLuint count, GLsizei bufsize, GLenum* categories, GLuint* severities, GLuint* ids, GLsizei* lengths, GLchar* message);
 }
+
+#ifndef GLXX_NO_NAMESPACE_INJECTION
+using namespace gl_amd_debug_output;
+#endif
+
 bool has_gl_amd_debug_output();
 bool load_gl_amd_debug_output();
 

File include/glxx/gl_amd_depth_clamp_separate.h

 #define GL_DEPTH_CLAMP_NEAR_AMD 0x901E
 #define GL_DEPTH_CLAMP_FAR_AMD 0x901F
 
-namespace gl_amd_depth_clamp_separate 
-{
-}
 bool has_gl_amd_depth_clamp_separate();
 
 #endif

File include/glxx/gl_amd_draw_buffers_blend.h

 
 #include "private/glxx.h"