Changeset 22509 in vbox
- Timestamp:
- Aug 27, 2009 11:46:29 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 51530
- Location:
- trunk
- Files:
-
- 3 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Config.kmk
r22454 r22509 3592 3592 TEMPLATE_VBOXCROGLR3HOSTDLL_DEFS.solaris = SunOS=1 _GNU_SOURCE #GLEXT_64_TYPES_DEFINED 3593 3593 TEMPLATE_VBOXCROGLR3HOSTDLL_DEFS.darwin = DARWIN=1 GL_GLEXT_LEGACY _GNU_SOURCE 3594 ifdef VBOX_WITH_COCOA_QT 3595 TEMPLATE_VBOXCROGLR3HOSTDLL_DEFS.darwin += VBOX_WITH_COCOA_QT 3596 endif 3594 3597 TEMPLATE_VBOXCROGLR3HOSTDLL_DEFS.freebsd = FreeBSD=1 _GNU_SOURCE 3595 3598 TEMPLATE_VBOXCROGLR3HOSTDLL_INCS = $(VBOX_PATH_CROGL_INCLUDE) $(VBOX_PATH_CROGL_GENFILES) … … 3624 3627 TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS.solaris = SunOS=1 _GNU_SOURCE #GLEXT_64_TYPES_DEFINED 3625 3628 TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS.darwin = DARWIN=1 GL_GLEXT_LEGACY _GNU_SOURCE 3629 ifdef VBOX_WITH_COCOA_QT 3630 TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS.darwin += VBOX_WITH_COCOA_QT 3631 endif 3626 3632 TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS.freebsd = FreeBSD=1 _GNU_SOURCE 3627 3633 TEMPLATE_VBOXCROGLR3GUESTDLL_INCS = $(VBOX_PATH_CROGL_INCLUDE) $(VBOX_PATH_CROGL_GENFILES) -
trunk/src/VBox/GuestHost/OpenGL/include/cr_spu.h
r21954 r22509 20 20 21 21 #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 24 27 #endif 25 28 … … 150 153 /*@}*/ 151 154 #elif defined(DARWIN) 155 # ifndef VBOX_WITH_COCOA_QT 152 156 /** 153 157 * Apple/AGL … … 190 194 typedef GLboolean (*aglUpdateContextFunc_t)( AGLContext ); 191 195 typedef GLboolean (*aglUseFontFunc_t)( AGLContext, GLint, Style, GLint, GLint, GLint, GLint ); 196 # endif 192 197 193 198 typedef const GLubyte *(*glGetStringFunc_t)( GLenum ); … … 321 326 wglGetExtensionsStringEXTFunc_t wglGetExtensionsStringEXT; 322 327 #elif defined(DARWIN) 328 # ifndef VBOX_WITH_COCOA_QT 323 329 aglCreateContextFunc_t aglCreateContext; 324 330 aglDestroyContextFunc_t aglDestroyContext; … … 340 346 aglEnableFunc_t aglEnable; 341 347 aglDisableFunc_t aglDisable; 348 # endif 342 349 343 350 CGLChoosePixelFormatFunc_t CGLChoosePixelFormat; -
trunk/src/VBox/GuestHost/OpenGL/spu_loader/glloader.py
r21312 r22509 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 34 36 #elif defined(IRIX) || defined(IRIX64) || defined(Linux) || defined(FreeBSD) || defined(AIX) || defined(SunOS) || defined(OSF1) 35 37 #if defined(Linux) … … 52 54 #define SYSTEM_GL_LIB_DIR "/System/Library/Frameworks/OpenGL.framework/Libraries" 53 55 #define SYSTEM_CGL_DIR "/System/Library/Frameworks/OpenGL.framework" 54 #define SYSTEM_AGL_DIR "/System/Library/Frameworks/AGL.framework"55 56 56 static CRDLL *cglDll = NULL; 57 # ifndef VBOX_WITH_COCOA_QT 58 # define SYSTEM_AGL_DIR "/System/Library/Frameworks/AGL.framework" 57 59 static CRDLL *aglDll = NULL; 60 # endif 58 61 #endif 59 62 … … 259 262 cglDll = NULL; 260 263 264 # ifndef VBOX_WITH_COCOA_QT 261 265 crDLLClose( aglDll ); 262 266 aglDll = NULL; 267 # endif 263 268 #endif 264 269 } … … 290 295 #ifdef DARWIN 291 296 const char *env_cgl_syspath = crGetenv( "CR_SYSTEM_CGL_PATH" ); 297 # ifndef VBOX_WITH_COCOA_QT 292 298 const char *env_agl_syspath = crGetenv( "CR_SYSTEM_AGL_PATH" ); 299 # endif 293 300 #endif 294 301 … … 318 325 crDebug( "Found it in %s.", !env_cgl_syspath ? "default path" : env_cgl_syspath ); 319 326 327 # ifndef VBOX_WITH_COCOA_QT 320 328 crDebug( "Looking for the system's AGL library..." ); 321 329 aglDll = __findSystemGL( env_agl_syspath, SYSTEM_AGL_DIR, SYSTEM_AGL ); … … 327 335 328 336 crDebug( "Found it in %s.", !env_agl_syspath ? "default path" : env_agl_syspath ); 337 # endif 329 338 #endif 330 339 """ … … 454 463 455 464 print '#elif defined(DARWIN)' 465 print '# ifndef VBOX_WITH_COCOA_QT' 456 466 for fun in useful_agl_functions: 457 467 print '\tinterface->%s = (%sFunc_t) crDLLGetNoError( aglDll, "%s" );' % (fun,fun,fun) 468 print '# endif' 458 469 459 470 for fun in useful_cgl_functions: -
trunk/src/VBox/HostServices/SharedOpenGL/Makefile.kmk
r22335 r22509 234 234 VBoxOGLrenderspu_SOURCES.solaris = render/renderspu_glx.c 235 235 VBoxOGLrenderspu_SOURCES.freebsd = render/renderspu_glx.c 236 VBoxOGLrenderspu_SOURCES.darwin = render/renderspu_agl.c 236 ifdef VBOX_WITH_COCOA_QT 237 VBoxOGLrenderspu_SOURCES.darwin = \ 238 render/renderspu_cocoa.c \ 239 render/renderspu_cocoa_helper.m 240 VBoxOGLrenderspu_LDFLAGS.darwin += -framework AppKit 241 else 242 VBoxOGLrenderspu_SOURCES.darwin = render/renderspu_agl.c 243 endif 237 244 VBoxOGLrenderspu_LDFLAGS.darwin += -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxOGLrenderspu.dylib 238 245 VBoxOGLrenderspu_LIBS = \ -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.c
r20921 r22509 1015 1015 1016 1016 #if defined(DARWIN) 1017 # ifdef VBOX_WITH_COCOA_QT 1017 1018 void renderspuFlush() 1018 1019 { 1019 glFlush();1020 renderspu_SystemFlush(); 1020 1021 } 1021 1022 1022 1023 void renderspuFinish() 1023 1024 { 1024 glFinish(); 1025 } 1025 renderspu_SystemFinish(); 1026 } 1027 1028 void renderspuBindFramebufferEXT(GLenum target, GLuint framebuffer) 1029 { 1030 renderspu_SystemBindFramebufferEXT(target, framebuffer); 1031 } 1032 # endif 1026 1033 #endif 1027 1034 … … 1063 1070 FILLIN( "GetString", renderspuGetString ); 1064 1071 #if defined(DARWIN) 1072 # ifdef VBOX_WITH_COCOA_QT 1073 FILLIN( "Flush", renderspuFlush ); 1065 1074 FILLIN( "Finish", renderspuFinish ); 1066 FILLIN( "Flush", renderspuFlush ); 1075 FILLIN( "BindFramebufferEXT", renderspuBindFramebufferEXT ); 1076 # endif 1067 1077 #endif 1068 1078 return i; -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.h
r22502 r22509 13 13 #define RENDER_APIENTRY __stdcall 14 14 #elif defined(DARWIN) 15 #include <AGL/AGL.h> 15 # ifndef VBOX_WITH_COCOA_QT 16 # include <AGL/AGL.h> 17 # else 18 # include "renderspu_cocoa_helper.h" 19 # endif 16 20 #define RENDER_APIENTRY 17 21 #else … … 29 33 30 34 #ifdef RT_OS_DARWIN 35 # ifndef VBOX_WITH_COCOA_QT 31 36 enum 32 37 { … … 44 49 }; 45 50 pascal OSStatus windowEvtHndlr(EventHandlerCallRef myHandler, EventRef event, void* userData); 51 # endif 46 52 #endif /* RT_OS_DARWIN */ 47 53 … … 55 61 HDC device_context; 56 62 #elif defined(DARWIN) 63 # ifndef VBOX_WITH_COCOA_QT 57 64 WindowRef window; 65 # endif 58 66 #elif defined(GLX) 59 67 Display *dpy; … … 82 90 HDC device_context; 83 91 #elif defined(DARWIN) 92 # ifndef VBOX_WITH_COCOA_QT 84 93 WindowRef window; 85 94 WindowRef nativeWindow; /**< for render_to_app_window */ … … 90 99 RgnHandle hVisibleRegion; 91 100 /* unsigned long context_ptr; */ 101 # else 102 NativeViewRef window; 103 NativeViewRef nativeWindow; /**< for render_to_app_window */ 104 NativeGLCtxRef *currentCtx; 105 # endif 92 106 #elif defined(GLX) 93 107 Window window; … … 117 131 HGLRC hRC; 118 132 #elif defined(DARWIN) 133 # ifndef VBOX_WITH_COCOA_QT 119 134 AGLContext context; 135 # else 136 NativeGLCtxRef context; 137 # endif 120 138 #elif defined(GLX) 121 139 GLXContext context; … … 217 235 218 236 #ifdef RT_OS_DARWIN 237 # ifndef VBOX_WITH_COCOA_QT 219 238 RgnHandle hRootVisibleRegion; 220 239 RTSEMFASTMUTEX syncMutex; … … 225 244 uint64_t uiDockUpdateTS; 226 245 bool fInit; 246 # endif 227 247 #endif /* RT_OS_DARWIN */ 228 248 } RenderSPU; … … 278 298 #ifdef RT_OS_DARWIN 279 299 extern void renderspu_SystemSetRootVisibleRegion(GLint cRects, GLint *pRects); 300 # ifdef VBOX_WITH_COCOA_QT 301 extern void renderspu_SystemFlush(); 302 extern void renderspu_SystemFinish(); 303 extern void renderspu_SystemBindFramebufferEXT(GLenum target, GLuint framebuffer); 304 # endif 280 305 #endif 281 306 extern void renderspu_SystemShowWindow( WindowInfo *window, GLboolean showIt ); -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_init.c
r22502 r22509 214 214 215 215 #ifdef DARWIN 216 # ifndef __LP64__ /** @todo port to 64-bit darwin. */ 216 # ifdef VBOX_WITH_COCOA_QT 217 # else /* VBOX_WITH_COCOA_QT */ 217 218 render_spu.hRootVisibleRegion = 0; 218 219 render_spu.currentBufferName = 1; … … 240 241 NULL, NULL); 241 242 render_spu.fInit = true; 242 # endif /* !__LP64__*/243 # endif /* VBOX_WITH_COCOA_QT */ 243 244 #endif /* DARWIN */ 244 245 … … 386 387 387 388 #ifdef RT_OS_DARWIN 388 # ifndef __LP64__ /** @todo port to 64-bit darwin. */389 # ifndef VBOX_WITH_COCOA_QT 389 390 render_spu.fInit = false; 390 391 DisposeEventHandlerUPP(render_spu.hParentEventHandler); … … 399 400 render_spu.uiDockUpdateTS = 0; 400 401 RTSemFastMutexDestroy(render_spu.syncMutex); 401 # endif /* __LP64__ */ 402 # else /* VBOX_WITH_COCOA_QT */ 403 # endif /* VBOX_WITH_COCOA_QT */ 402 404 #endif /* RT_OS_DARWIN */ 403 405
Note:
See TracChangeset
for help on using the changeset viewer.