OpenGLTestDarwin.cpp revision 258b733eff83eef487cf6e0840281fe0569f4b48
/* $Id$ */
/** @file
* VBox host opengl support test
*/
/*
* 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 <ApplicationServices/ApplicationServices.h>
#ifdef VBOX_WITH_COCOA_QT
#endif /* VBOX_WITH_COCOA_QT */
#include <VBox/VBoxOGLTest.h>
{
if (RTEnvExist("VBOX_CROGL_FORCE_SUPPORTED"))
{
LogRel(("VBOX_CROGL_FORCE_SUPPORTED is specified, skipping 3D test, and treating as supported\n"));
return true;
}
GLint numPixelFormats = 0;
};
display = CGMainDisplayID();
if (pixelFormat)
{
CGLContextObj cglContext = 0;
if (cglContext)
{
#ifdef VBOX_WITH_COCOA_QT
/* On the Cocoa port we depend on the GL_EXT_framebuffer_object &
* the GL_EXT_texture_rectangle extension. If they are not
* available, disable 3D support. */
if (isSupported)
{
if (!isSupported)
LogRel(("OpenGL Info: GL_EXT_texture_rectangle extension not supported\n"));
}
else
LogRel(("OpenGL Info: GL_EXT_framebuffer_object extension not supported\n"));
#endif /* VBOX_WITH_COCOA_QT */
return isSupported == GL_TRUE ? true : false;
}
}
return false;
}