VirtualBox

Changeset 22509 in vbox for trunk/src/VBox/GuestHost/OpenGL


Ignore:
Timestamp:
Aug 27, 2009 11:46:29 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
51530
Message:

crOpenGL-OSX: Initial version for the Cocoa port.

Location:
trunk/src/VBox/GuestHost/OpenGL
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/include/cr_spu.h

    r21954 r22509  
    2020
    2121#ifdef DARWIN
    22 #include <OpenGL/OpenGL.h>
    23 #include <AGL/agl.h>
     22# include <OpenGL/OpenGL.h>
     23# ifdef VBOX_WITH_COCOA_QT
     24# else
     25#  include <AGL/agl.h>
     26# endif
    2427#endif
    2528
     
    150153/*@}*/
    151154#elif defined(DARWIN)
     155# ifndef VBOX_WITH_COCOA_QT
    152156/**
    153157 * Apple/AGL
     
    190194typedef GLboolean (*aglUpdateContextFunc_t)( AGLContext );
    191195typedef GLboolean (*aglUseFontFunc_t)( AGLContext, GLint, Style, GLint, GLint, GLint, GLint );
     196# endif
    192197
    193198typedef const GLubyte *(*glGetStringFunc_t)( GLenum );
     
    321326    wglGetExtensionsStringEXTFunc_t wglGetExtensionsStringEXT;
    322327#elif defined(DARWIN)
     328# ifndef VBOX_WITH_COCOA_QT
    323329    aglCreateContextFunc_t          aglCreateContext;
    324330    aglDestroyContextFunc_t         aglDestroyContext;
     
    340346    aglEnableFunc_t                 aglEnable;
    341347    aglDisableFunc_t                aglDisable;
     348# endif
    342349
    343350    CGLChoosePixelFormatFunc_t      CGLChoosePixelFormat;
  • trunk/src/VBox/GuestHost/OpenGL/spu_loader/glloader.py

    r21312 r22509  
    3131#define SYSTEM_GL "libGL.dylib"
    3232#define SYSTEM_CGL "OpenGL"
    33 #define SYSTEM_AGL "AGL"
     33# ifndef VBOX_WITH_COCOA_QT
     34#  define SYSTEM_AGL "AGL"
     35# endif
    3436#elif defined(IRIX) || defined(IRIX64) || defined(Linux) || defined(FreeBSD) || defined(AIX) || defined(SunOS) || defined(OSF1)
    3537#if defined(Linux)
     
    5254#define SYSTEM_GL_LIB_DIR   "/System/Library/Frameworks/OpenGL.framework/Libraries"
    5355#define SYSTEM_CGL_DIR  "/System/Library/Frameworks/OpenGL.framework"
    54 #define SYSTEM_AGL_DIR  "/System/Library/Frameworks/AGL.framework"
    55 
    5656static CRDLL *cglDll = NULL;
     57# ifndef VBOX_WITH_COCOA_QT
     58#  define SYSTEM_AGL_DIR  "/System/Library/Frameworks/AGL.framework"
    5759static CRDLL *aglDll = NULL;
     60# endif
    5861#endif
    5962
     
    259262        cglDll = NULL;
    260263
     264# ifndef VBOX_WITH_COCOA_QT
    261265        crDLLClose( aglDll );
    262266        aglDll = NULL;
     267# endif
    263268#endif
    264269}
     
    290295#ifdef DARWIN
    291296        const char *env_cgl_syspath = crGetenv( "CR_SYSTEM_CGL_PATH" );
     297# ifndef VBOX_WITH_COCOA_QT
    292298        const char *env_agl_syspath = crGetenv( "CR_SYSTEM_AGL_PATH" );
     299# endif
    293300#endif
    294301       
     
    318325        crDebug( "Found it in %s.", !env_cgl_syspath ? "default path" : env_cgl_syspath );
    319326
     327# ifndef VBOX_WITH_COCOA_QT
    320328        crDebug( "Looking for the system's AGL library..." );
    321329        aglDll = __findSystemGL( env_agl_syspath, SYSTEM_AGL_DIR, SYSTEM_AGL );
     
    327335
    328336        crDebug( "Found it in %s.", !env_agl_syspath ? "default path" : env_agl_syspath );
     337# endif
    329338#endif
    330339"""
     
    454463
    455464print '#elif defined(DARWIN)'
     465print '# ifndef VBOX_WITH_COCOA_QT'
    456466for fun in useful_agl_functions:
    457467        print '\tinterface->%s = (%sFunc_t) crDLLGetNoError( aglDll, "%s" );' % (fun,fun,fun)
     468print '# endif'
    458469
    459470for fun in useful_cgl_functions:
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette