VirtualBox

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

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

Automated rebranding to Oracle copyright/license strings via filemuncher

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
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#ifdef __OBJC__
22# import <Cocoa/Cocoa.h>
23typedef NSView *NativeViewRef;
24typedef NSOpenGLContext *NativeGLCtxRef;
25#else /* __OBJC__ */
26typedef void *NativeViewRef;
27typedef void *NativeGLCtxRef;
28#endif /* __OBJC__ */
29
30#include <iprt/cdefs.h>
31#include <OpenGL/OpenGL.h>
32
33RT_C_DECLS_BEGIN
34
35/* OpenGL context management */
36void cocoaGLCtxCreate(NativeGLCtxRef *ppCtx, GLbitfield fVisParams);
37void cocoaGLCtxDestroy(NativeGLCtxRef pCtx);
38
39/* View management */
40void cocoaViewCreate(NativeViewRef *ppView, NativeViewRef pParentView, GLbitfield fVisParams);
41void cocoaViewReparent(NativeViewRef pView, NativeViewRef pParentView);
42void cocoaViewDestroy(NativeViewRef pView);
43void cocoaViewDisplay(NativeViewRef pView);
44void cocoaViewShow(NativeViewRef pView, GLboolean fShowIt);
45void cocoaViewSetPosition(NativeViewRef pView, NativeViewRef pParentView, int x, int y);
46void cocoaViewSetSize(NativeViewRef pView, int w, int h);
47void cocoaViewGetGeometry(NativeViewRef pView, int *pX, int *pY, int *pW, int *pH);
48
49void cocoaViewMakeCurrentContext(NativeViewRef pView, NativeGLCtxRef pCtx);
50void cocoaViewSetVisibleRegion(NativeViewRef pView, GLint cRects, GLint* paRects);
51
52/* OpenGL wrapper */
53void cocoaFlush();
54void cocoaFinish();
55void cocoaBindFramebufferEXT(GLenum target, GLuint framebuffer);
56
57RT_C_DECLS_END
58
59#endif /* __renderspu_cocoa_helper_h */
60
Note: See TracBrowser for help on using the repository browser.

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