renderspu_cocoa_helper.h revision c4bfe32373c55416bf49dc29ebf45dfa560b4692
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync/** @file
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync *
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * VirtualBox OpenGL Cocoa Window System Helper definition
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync */
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync/*
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * Copyright (C) 2009 Oracle Corporation
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync *
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * available from http://www.virtualbox.org. This file is free software;
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * you can redistribute it and/or modify it under the terms of the GNU
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * General Public License (GPL) as published by the Free Software
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync */
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#ifndef __renderspu_cocoa_helper_h
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#define __renderspu_cocoa_helper_h
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#include <VBox/VBoxCocoa.h>
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#include <iprt/cdefs.h>
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#include <OpenGL/OpenGL.h>
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncRT_C_DECLS_BEGIN
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncADD_COCOA_NATIVE_REF(NSView);
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncADD_COCOA_NATIVE_REF(NSOpenGLContext);
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync/* OpenGL context management */
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncvoid cocoaGLCtxCreate(NativeNSOpenGLContextRef *ppCtx, GLbitfield fVisParams);
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncvoid cocoaGLCtxDestroy(NativeNSOpenGLContextRef pCtx);
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync/* View management */
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncvoid cocoaViewCreate(NativeNSViewRef *ppView, NativeNSViewRef pParentView, GLbitfield fVisParams);
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncvoid cocoaViewReparent(NativeNSViewRef pView, NativeNSViewRef pParentView);
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncvoid cocoaViewDestroy(NativeNSViewRef pView);
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncvoid cocoaViewDisplay(NativeNSViewRef pView);
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncvoid cocoaViewShow(NativeNSViewRef pView, GLboolean fShowIt);
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncvoid cocoaViewSetPosition(NativeNSViewRef pView, NativeNSViewRef pParentView, int x, int y);
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncvoid cocoaViewSetSize(NativeNSViewRef pView, int w, int h);
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncvoid cocoaViewGetGeometry(NativeNSViewRef pView, int *pX, int *pY, int *pW, int *pH);
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncvoid cocoaViewMakeCurrentContext(NativeNSViewRef pView, NativeNSOpenGLContextRef pCtx);
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncvoid cocoaViewSetVisibleRegion(NativeNSViewRef pView, GLint cRects, GLint* paRects);
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync/* OpenGL wrapper */
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncvoid cocoaFlush(void);
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncvoid cocoaFinish(void);
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncvoid cocoaBindFramebufferEXT(GLenum target, GLuint framebuffer);
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncRT_C_DECLS_END
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#endif /* __renderspu_cocoa_helper_h */
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync