OpenGLTestApp.cpp revision 5f79d7b33f1fd754c9127a3a849fad6f090f3025
/* $Id$ */
/** @file
* VBox host opengl support test application.
*/
/*
* Copyright (C) 2009 Sun Microsystems, Inc.
*
* 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.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
* Clara, CA 95054 USA or visit http://www.sun.com if you need
* additional information or have any questions.
*/
#include <iprt/initterm.h>
#ifdef RT_OS_WINDOWS
#include <Windows.h>
#endif
#ifdef VBOX_WITH_CROGL
extern "C" {
extern void * crSPULoad(void *, int, char *, char *, void *);
extern void crSPUUnloadChain(void *);
}
static int vboxCheck3DAccelerationSupported()
{
if (spu)
{
return 0;
}
return 1;
}
#endif
#ifdef VBOX_WITH_VIDEOHWACCEL
#include <QGLWidget>
#include <QApplication>
#include <VBox/VBoxGL2D.h>
static int vboxCheck2DVideoAccelerationSupported()
{
static int dummyArgc = 1;
static char * dummyArgv = "GlTest";
if(pContext)
{
if(supportInfo.isVHWASupported())
return 0;
}
return 1;
}
#endif
{
int rc=0;
RTR3Init();
if(argc < 3)
{
#ifdef VBOX_WITH_CROGL
/* backwards compatibility: check 3D */
#endif
}
else
{
static const RTGETOPTDEF s_aOptionDefs[] =
{
};
for (;;)
{
if (!rc)
break;
switch (rc)
{
case 't':
#ifdef VBOX_WITH_CROGL
{
break;
}
#endif
#ifdef VBOX_WITH_VIDEOHWACCEL
{
break;
}
#endif
rc = 1;
break;
case VINF_GETOPT_NOT_OPTION:
rc = 1;
default:
break;
}
if(rc)
break;
}
}
/*RTR3Term();*/
return rc;
}
#ifdef RT_OS_WINDOWS
{
}
#endif