VirtualBox

source: vbox/trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa_helper.h@ 22509

Last change on this file since 22509 was 22509, checked in by vboxsync, 15 years ago

crOpenGL-OSX: Initial version for the Cocoa port.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 KB
Line 
1/** @file
2 *
3 * VirtualBox OpenGL Cocoa Window System Helper definition
4 */
5
6/*
7 * Copyright (C) 2009 Sun Microsystems, Inc.
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 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18 * Clara, CA 95054 USA or visit http://www.sun.com if you need
19 * additional information or have any questions.
20 */
21
22#ifndef __renderspu_cocoa_helper_h
23#define __renderspu_cocoa_helper_h
24
25#ifdef __OBJC__
26# import <Cocoa/Cocoa.h>
27typedef NSView *NativeViewRef;
28typedef NSOpenGLContext *NativeGLCtxRef;
29#else /* __OBJC__ */
30typedef void *NativeViewRef;
31typedef void *NativeGLCtxRef;
32#endif /* __OBJC__ */
33
34#include <iprt/cdefs.h>
35#include <OpenGl/OpenGl.h>
36
37RT_C_DECLS_BEGIN
38
39/* OpenGL context management */
40void cocoaGLCtxCreate(NativeGLCtxRef *ppCtx, GLbitfield fVisParams);
41void cocoaGLCtxDestroy(NativeGLCtxRef pCtx);
42
43/* View management */
44void cocoaViewCreate(NativeViewRef *ppView, NativeViewRef pParentView, GLbitfield fVisParams);
45void cocoaViewDestroy(NativeViewRef pView);
46void cocoaViewDisplay(NativeViewRef pView);
47void cocoaViewShow(NativeViewRef pView, GLboolean fShowIt);
48void cocoaViewSetPosition(NativeViewRef pView, NativeViewRef pParentView, int x, int y);
49void cocoaViewSetSize(NativeViewRef pView, int w, int h);
50void cocoaViewGetGeometry(NativeViewRef pView, int *pX, int *pY, int *pW, int *pH);
51
52void cocoaViewMakeCurrentContext(NativeViewRef pView, NativeGLCtxRef pCtx);
53void cocoaViewSetVisibleRegion(NativeViewRef pView, GLint cRects, GLint* paRects);
54
55/* OpenGL wrapper */
56void cocoaFlush();
57void cocoaFinish();
58void cocoaBindFramebufferEXT(GLenum target, GLuint framebuffer);
59
60RT_C_DECLS_END
61
62#endif /* __renderspu_cocoa_helper_h */
63
Note: See TracBrowser for help on using the repository browser.

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