renderspu_cocoa.c revision f350d4fb2d12fd22c0905fe9c7a121499da7b52d
/** @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"
#include <cr_string.h>
#include <cr_mem.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;
}
static SPUNamedFunctionTable * renderspuFindEntry(SPUNamedFunctionTable *aFunctions, const char *pcszName)
{
{
{
return pCur;
}
}
AssertFailed();
return NULL;
}
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!");
}
}
AssertCompile(sizeof (GLhandleARB) == sizeof (void*));
{
}
{
}
{
}
{
}
{
if (!hNative)
{
return;
}
}
static void SPU_APIENTRY renderspu_SystemGetAttachedObjectsARB( VBoxGLhandleARB containerObj, GLsizei maxCount, GLsizei * pCount, VBoxGLhandleARB * obj )
{
if (pCount)
*pCount = 0;
if (!hNative)
{
return;
}
if (!paAttachments)
{
crWarning("crCalloc failed");
return;
}
if (pCount)
{
crWarning("count too big");
}
for (i = 0; i < count; ++i)
{
}
}
{
if (!hNative)
{
crWarning("pfnGetHandle failed");
return 0;
}
return hVBox;
}
static void SPU_APIENTRY renderspu_SystemGetInfoLogARB( VBoxGLhandleARB obj, GLsizei maxLength, GLsizei * length, GLcharARB * infoLog )
{
if (!hNative)
{
crWarning("invalid handle!");
return;
}
}
static void SPU_APIENTRY renderspu_SystemGetObjectParameterfvARB( VBoxGLhandleARB obj, GLenum pname, GLfloat * params )
{
if (!hNative)
{
crWarning("invalid handle!");
return;
}
}
static void SPU_APIENTRY renderspu_SystemGetObjectParameterivARB( VBoxGLhandleARB obj, GLenum pname, GLint * params )
{
if (!hNative)
{
crWarning("invalid handle!");
return;
}
}
uint32_t renderspu_SystemPostprocessFunctions(SPUNamedFunctionTable *aFunctions, uint32_t cFunctions, uint32_t cTable)
{
if (pEntry)
{
}
if (pEntry)
{
}
if (pEntry)
{
}
if (pEntry)
{
}
if (pEntry)
{
}
if (pEntry)
{
}
return cFunctions;
}