~ubuntu-branches/ubuntu/raring/virtualbox-ose/raring

« back to all changes in this revision

Viewing changes to src/VBox/GuestHost/OpenGL/spu_loader/glloader.py

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-12-18 16:44:29 UTC
  • mfrom: (0.3.3 upstream) (0.4.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091218164429-jd34ccexpv5na11a
Tags: 3.1.2-dfsg-1ubuntu1
* Merge from Debian unstable (LP: #498219), remaining changes:
  - Disable update action
    - debian/patches/u01-disable-update-action.dpatch
  - VirtualBox should go in Accessories, not in System tools (LP: #288590)
    - debian/virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add Apport hook
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Add Launchpad integration
    - debian/control
    - debian/lpi-bug.xpm
    - debian/patches/u02-lp-integration.dpatch
* Fixes the following bugs:
  - Kernel module fails to build with Linux >= 2.6.32 (LP: #474625)
  - X.Org drivers need to be rebuilt against X-Server 1.7 (LP: #495935)
  - The *-source packages try to build the kernel modules even though the
    kernel headers aren't available (LP: #473334)
* Replace *-source packages with transitional packages for *-dkms.
* Adapt u01-disable-update-action.dpatch and u02-lp-integration.dpatch for
  new upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
#elif defined (DARWIN)
31
31
#define SYSTEM_GL "libGL.dylib"
32
32
#define SYSTEM_CGL "OpenGL"
33
 
#define SYSTEM_AGL "AGL"
 
33
# ifndef VBOX_WITH_COCOA_QT
 
34
#  define SYSTEM_AGL "AGL"
 
35
# endif
 
36
#include <string.h> /* VBOX */
34
37
#elif defined(IRIX) || defined(IRIX64) || defined(Linux) || defined(FreeBSD) || defined(AIX) || defined(SunOS) || defined(OSF1)
35
38
#if defined(Linux)
36
39
#include <string.h>
51
54
#ifdef DARWIN
52
55
#define SYSTEM_GL_LIB_DIR   "/System/Library/Frameworks/OpenGL.framework/Libraries"
53
56
#define SYSTEM_CGL_DIR  "/System/Library/Frameworks/OpenGL.framework"
54
 
#define SYSTEM_AGL_DIR  "/System/Library/Frameworks/AGL.framework"
55
 
 
56
57
static CRDLL *cglDll = NULL;
 
58
# ifndef VBOX_WITH_COCOA_QT
 
59
#  define SYSTEM_AGL_DIR  "/System/Library/Frameworks/AGL.framework"
57
60
static CRDLL *aglDll = NULL;
 
61
# endif
58
62
#endif
59
63
 
60
64
#if defined(WINDOWS)
258
262
        crDLLClose( cglDll );
259
263
        cglDll = NULL;
260
264
 
 
265
# ifndef VBOX_WITH_COCOA_QT
261
266
        crDLLClose( aglDll );
262
267
        aglDll = NULL;
 
268
# endif
263
269
#endif
264
270
}
265
271
 
289
295
        const char *env_syspath = crGetenv( "CR_SYSTEM_GL_PATH" );
290
296
#ifdef DARWIN
291
297
        const char *env_cgl_syspath = crGetenv( "CR_SYSTEM_CGL_PATH" );
 
298
# ifndef VBOX_WITH_COCOA_QT
292
299
        const char *env_agl_syspath = crGetenv( "CR_SYSTEM_AGL_PATH" );
 
300
# endif
293
301
#endif
294
302
        
295
303
        crDebug( "Looking for the system's OpenGL library..." );
317
325
 
318
326
        crDebug( "Found it in %s.", !env_cgl_syspath ? "default path" : env_cgl_syspath );
319
327
 
 
328
# ifndef VBOX_WITH_COCOA_QT
320
329
        crDebug( "Looking for the system's AGL library..." );
321
330
        aglDll = __findSystemGL( env_agl_syspath, SYSTEM_AGL_DIR, SYSTEM_AGL );
322
331
        if (!aglDll)
326
335
        }
327
336
 
328
337
        crDebug( "Found it in %s.", !env_agl_syspath ? "default path" : env_agl_syspath );
 
338
# endif
329
339
#endif
330
340
"""
331
341
 
453
463
        print '\tinterface->%s = (%sFunc_t) crDLLGetNoError( glDll, "%s" );' % (fun,fun,fun)
454
464
 
455
465
print '#elif defined(DARWIN)'
 
466
print '# ifndef VBOX_WITH_COCOA_QT'
456
467
for fun in useful_agl_functions:
457
468
        print '\tinterface->%s = (%sFunc_t) crDLLGetNoError( aglDll, "%s" );' % (fun,fun,fun)
 
469
print '# endif'
458
470
 
459
471
for fun in useful_cgl_functions:
460
472
        print '\tinterface->%s = (%sFunc_t) crDLLGetNoError( cglDll, "%s" );' % (fun, fun,fun)