print '{'
print ' __GLXcontext * const gc = __glXGetCurrentContext();'
print ''
- print '#ifdef GLX_DIRECT_RENDERING'
+ print '#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)'
print ' if (gc->driContext) {'
print ' %sCALL_%s(GET_DISPATCH(), (%s));' % (ret_string, func.name, func.get_called_parameter_string())
print ' } else'
self.printVisibility( "INTERNAL", "internal" )
print ''
print ''
- print '#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__)'
+ print '#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(GLX_USE_APPLEGL)'
print '# undef HAVE_ALIAS'
print '#endif'
print '#ifdef HAVE_ALIAS'