Changeset 22509 in vbox for trunk/src/VBox/HostServices/SharedOpenGL
- Timestamp:
- Aug 27, 2009 11:46:29 AM (15 years ago)
- Location:
- trunk/src/VBox/HostServices/SharedOpenGL
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
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.