1 | /** @file
|
---|
2 | *
|
---|
3 | * VirtualBox OpenGL Cocoa Window System Helper definition
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2009 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 | #ifndef __renderspu_cocoa_helper_h
|
---|
19 | #define __renderspu_cocoa_helper_h
|
---|
20 |
|
---|
21 | #include <VBox/VBoxCocoa.h>
|
---|
22 | #include <iprt/cdefs.h>
|
---|
23 | #include <OpenGL/OpenGL.h>
|
---|
24 |
|
---|
25 | RT_C_DECLS_BEGIN
|
---|
26 |
|
---|
27 | ADD_COCOA_NATIVE_REF(NSView);
|
---|
28 | ADD_COCOA_NATIVE_REF(NSOpenGLContext);
|
---|
29 |
|
---|
30 | /* OpenGL context management */
|
---|
31 | void cocoaGLCtxCreate(NativeNSOpenGLContextRef *ppCtx, GLbitfield fVisParams);
|
---|
32 | void cocoaGLCtxDestroy(NativeNSOpenGLContextRef pCtx);
|
---|
33 |
|
---|
34 | /* View management */
|
---|
35 | void cocoaViewCreate(NativeNSViewRef *ppView, NativeNSViewRef pParentView, GLbitfield fVisParams);
|
---|
36 | void cocoaViewReparent(NativeNSViewRef pView, NativeNSViewRef pParentView);
|
---|
37 | void cocoaViewDestroy(NativeNSViewRef pView);
|
---|
38 | void cocoaViewDisplay(NativeNSViewRef pView);
|
---|
39 | void cocoaViewShow(NativeNSViewRef pView, GLboolean fShowIt);
|
---|
40 | void cocoaViewSetPosition(NativeNSViewRef pView, NativeNSViewRef pParentView, int x, int y);
|
---|
41 | void cocoaViewSetSize(NativeNSViewRef pView, int w, int h);
|
---|
42 | void cocoaViewGetGeometry(NativeNSViewRef pView, int *pX, int *pY, int *pW, int *pH);
|
---|
43 |
|
---|
44 | void cocoaViewMakeCurrentContext(NativeNSViewRef pView, NativeNSOpenGLContextRef pCtx);
|
---|
45 | void cocoaViewSetVisibleRegion(NativeNSViewRef pView, GLint cRects, GLint* paRects);
|
---|
46 |
|
---|
47 | /* OpenGL wrapper */
|
---|
48 | void cocoaFlush(void);
|
---|
49 | void cocoaFinish(void);
|
---|
50 | void cocoaBindFramebufferEXT(GLenum target, GLuint framebuffer);
|
---|
51 |
|
---|
52 | RT_C_DECLS_END
|
---|
53 |
|
---|
54 | #endif /* __renderspu_cocoa_helper_h */
|
---|
55 |
|
---|