renderspu_cocoa.c revision ee357d0503e525172eab0eeb8f5befc2993c7ea5
3866cadb3f1ae37967daf8a36d85417480e90c88vboxsync * VirtualBox OpenGL Cocoa Window System implementation
e2a742da3fbd4b04860305ed39b001a0140a65a3vboxsync * Copyright (C) 2009-2012 Oracle Corporation
* available from http://www.virtualbox.org. This file is free software;
#include "renderspu.h"
#include <cr_string.h>
#include <cr_mem.h>
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)
GLboolean renderspu_SystemVBoxCreateWindow(VisualInfo *pVisInfo, GLboolean fShowIt, WindowInfo *pWinInfo)
return GL_FALSE;
#ifdef __LP64__
if (fShowIt)
return GL_TRUE;
#ifdef __LP64__
#ifdef __LP64__
/*pParentWin is unused in the call, otherwise it might hold incorrect value if for ex. last reparent call was for
void renderspu_SystemGetWindowGeometry(WindowInfo *pWinInfo, GLint *pX, GLint *pY, GLint *pW, GLint *pH)
void renderspu_SystemVBoxPresentComposition( WindowInfo *window, const struct VBOXVR_SCR_COMPOSITOR_ENTRY *pChangedEntry )
nativeWindow = 0;
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 GL_TRUE;
if (!window)
if (!window)
return GL_FALSE;
return GL_TRUE;
if (fromContext)
if (toContext)
if (!hNative)
static void SPU_APIENTRY renderspu_SystemGetAttachedObjectsARB( VBoxGLhandleARB containerObj, GLsizei maxCount, GLsizei * pCount, VBoxGLhandleARB * obj )
if (pCount)
*pCount = 0;
if (!hNative)
if (!paAttachments)
if (pCount)
for (i = 0; i < count; ++i)
if (!hNative)
return hVBox;
static void SPU_APIENTRY renderspu_SystemGetInfoLogARB( VBoxGLhandleARB obj, GLsizei maxLength, GLsizei * length, GLcharARB * infoLog )
if (!hNative)
static void SPU_APIENTRY renderspu_SystemGetObjectParameterfvARB( VBoxGLhandleARB obj, GLenum pname, GLfloat * params )
if (!hNative)
static void SPU_APIENTRY renderspu_SystemGetObjectParameterivARB( VBoxGLhandleARB obj, GLenum pname, GLint * params )
if (!hNative)
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;