renderspu_cocoa.c revision d171c6e83ee2cdae7d630182ee101efbf0f8c0e8
/** @file
* VirtualBox OpenGL Cocoa Window System implementation
*/
/*
* Copyright (C) 2009-2012 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#include "renderspu.h"
{
/* cocoaGLVisualCreate(&pCtxInfo->context);*/
return GL_TRUE;
}
GLboolean renderspu_SystemCreateContext(VisualInfo *pVisInfo, ContextInfo *pCtxInfo, ContextInfo *pSharedCtxInfo)
{
cocoaGLCtxCreate(&pCtxInfo->context, pVisInfo->visAttribs, pSharedCtxInfo ? pSharedCtxInfo->context : NULL);
return GL_TRUE;
}
{
if(!pCtxInfo)
return;
{
}
}
{
/* Real fullscreen isn't supported by VirtualBox */
}
GLboolean renderspu_SystemVBoxCreateWindow(VisualInfo *pVisInfo, GLboolean fShowIt, WindowInfo *pWinInfo)
{
/* VirtualBox is the only frontend which support 3D right now. */
char pszName[256];
/* Check for VirtualBox and VirtualBoxVM */
return GL_FALSE;
#ifdef __LP64__
#else /* __LP64__ */
#endif /* __LP64__ */
if (fShowIt)
return GL_TRUE;
}
{
#ifdef __LP64__
#else /* __LP64__ */
#endif /* __LP64__ */
}
{
}
{
#ifdef __LP64__
#else /* __LP64__ */
#endif /* __LP64__ */
/*pParentWin is unused in the call, otherwise it might hold incorrect value if for ex. last reparent call was for
a different screen*/
}
{
}
void renderspu_SystemGetWindowGeometry(WindowInfo *pWinInfo, GLint *pX, GLint *pY, GLint *pW, GLint *pH)
{
}
{
*pW = 10000;
*pH = 10000;
}
{
}
void renderspu_SystemVBoxPresentComposition( WindowInfo *window, struct VBOXVR_SCR_COMPOSITOR_ENTRY *pChangedEntry )
{
}
{
/* if(pWinInfo->visual != pCtxInfo->visual)*/
/* printf ("visual mismatch .....................\n");*/
nativeWindow = 0;
else
}
{
}
{
}
{
}
int renderspu_SystemInit()
{
return VINF_SUCCESS;
}
int renderspu_SystemTerm()
{
return VINF_SUCCESS;
}
typedef struct CR_RENDER_CTX_INFO
{
{
}
{
return;
}
{
WindowInfo * window;
return GL_TRUE;
if (!window)
{
if (!window)
{
crWarning("renderspuGetDummyWindow failed");
return GL_FALSE;
}
}
return GL_TRUE;
}
{
{
}
if (fromContext)
{
{
{
}
else
crWarning("renderspuCtxSetCurrentWithAnyWindow failed!");
}
}
else
{
}
if (toContext)
{
{
if (!RT_SUCCESS(rc))
}
else
crWarning("renderspuCtxSetCurrentWithAnyWindow failed!");
}
}