renderspu_init.c revision ce6a89800b35c74feca26a6471b84db1f67b062a
* See the file LICENSE.txt for information on redistributing this software.
#include "cr_mem.h"
#include "cr_spu.h"
#include "cr_error.h"
#include "cr_string.h"
#include "cr_url.h"
#include "renderspu.h"
#include <stdio.h>
#ifdef RT_OS_DARWIN
#ifdef CHROMIUM_THREADSAFE
static void swapsyncConnect(void)
unsigned short port;
#ifdef RT_OS_WINDOWS
bool bRet;
(void) unused;
static SPUFunctions *
(void) child;
(void) context_id;
(void) num_contexts;
#ifdef CHROMIUM_THREADSAFE
#ifdef RT_OS_WINDOWS
return NULL;
return NULL;
if (numFuncs == 0) {
return NULL;
#ifdef GLX
#ifdef USE_OSMESA
#ifdef DARWIN
# ifdef VBOX_WITH_COCOA_QT
CreateWindowGroup(kWindowGroupAttrMoveTogether | kWindowGroupAttrLayerTogether | kWindowGroupAttrSharedActivation | kWindowGroupAttrHideOnCollapse | kWindowGroupAttrFixedLevel, &render_spu.pMasterGroup);
CreateWindowGroup(kWindowGroupAttrMoveTogether | kWindowGroupAttrLayerTogether | kWindowGroupAttrSharedActivation | kWindowGroupAttrHideOnCollapse | kWindowGroupAttrFixedLevel, &render_spu.pParentGroup);
{kEventClassVBox, kEventVBoxBoundsChanged} /* Clip/Pos the OpenGL windows when the main window is changed in pos/size */
if (defaultWin != 0) {
return NULL;
#ifdef WINDOWS
_cr_render_table[numFuncs].fn = (SPUGenericFunction) render_spu.ws.wglGetProcAddress("glCopyTexSubImage3D");
++numFuncs;
_cr_render_table[numFuncs].fn = (SPUGenericFunction) render_spu.ws.wglGetProcAddress("glDrawRangeElements");
++numFuncs;
_cr_render_table[numFuncs].fn = (SPUGenericFunction) render_spu.ws.wglGetProcAddress("glTexSubImage3D");
++numFuncs;
_cr_render_table[numFuncs].fn = (SPUGenericFunction) render_spu.ws.wglGetProcAddress("glTexImage3D");
++numFuncs;
return &render_functions;
if (version>=2.f || crStrstr((const char*)render_spu.ws.glGetString(GL_EXTENSIONS), "GL_ARB_vertex_shader"))
static int renderSPUCleanup(void)
#ifdef RT_OS_DARWIN
# ifndef VBOX_WITH_COCOA_QT
#ifdef RT_OS_WINDOWS
if (!hNative)
if (hNative)
#ifdef CHROMIUM_THREADSAFE
#ifdef RT_OS_DARWIN
#ifndef RT_OS_DARWIN