VirtualBox

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

Last change on this file since 39436 was 39206, checked in by vboxsync, 13 years ago

Made OpenGL build against the Mac OS X 10.7 SDK. Some cleanups.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 KB
Line 
1/* $Id: renderspu_cocoa_helper.h 39206 2011-11-04 15:16:16Z vboxsync $ */
2/** @file
3 * VirtualBox OpenGL Cocoa Window System Helper definition
4 */
5
6/*
7 * Copyright (C) 2009-2011 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 <iprt/cdefs.h>
22#include <VBox/VBoxCocoa.h>
23#include <OpenGL/OpenGL.h>
24
25RT_C_DECLS_BEGIN
26
27ADD_COCOA_NATIVE_REF(NSView);
28ADD_COCOA_NATIVE_REF(NSOpenGLContext);
29
30/* OpenGL context management */
31void cocoaGLCtxCreate(NativeNSOpenGLContextRef *ppCtx, GLbitfield fVisParams);
32void cocoaGLCtxDestroy(NativeNSOpenGLContextRef pCtx);
33
34/* View management */
35void cocoaViewCreate(NativeNSViewRef *ppView, NativeNSViewRef pParentView, GLbitfield fVisParams);
36void cocoaViewReparent(NativeNSViewRef pView, NativeNSViewRef pParentView);
37void cocoaViewDestroy(NativeNSViewRef pView);
38void cocoaViewDisplay(NativeNSViewRef pView);
39void cocoaViewShow(NativeNSViewRef pView, GLboolean fShowIt);
40void cocoaViewSetPosition(NativeNSViewRef pView, NativeNSViewRef pParentView, int x, int y);
41void cocoaViewSetSize(NativeNSViewRef pView, int w, int h);
42void cocoaViewGetGeometry(NativeNSViewRef pView, int *pX, int *pY, int *pW, int *pH);
43
44void cocoaViewMakeCurrentContext(NativeNSViewRef pView, NativeNSOpenGLContextRef pCtx);
45void cocoaViewSetVisibleRegion(NativeNSViewRef pView, GLint cRects, GLint* paRects);
46
47/* OpenGL wrapper */
48void cocoaFlush(void);
49void cocoaFinish(void);
50void cocoaBindFramebufferEXT(GLenum target, GLuint framebuffer);
51void cocoaCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
52void cocoaGetIntegerv(GLenum pname, GLint *params);
53void cocoaReadBuffer(GLenum mode);
54void cocoaDrawBuffer(GLenum mode);
55
56RT_C_DECLS_END
57
58#endif /* !___renderspu_cocoa_helper_h */
59
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