OpenGLTestDarwin.cpp revision ccaa684759e6cdb707fe6f4b134fc77a7483a99b
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * VBox host opengl support test
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Copyright (C) 2009 Sun Microsystems, Inc.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * available from http://www.virtualbox.org. This file is free software;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * you can redistribute it and/or modify it under the terms of the GNU
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * General Public License (GPL) as published by the Free Software
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * additional information or have any questions.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#include <ApplicationServices/ApplicationServices.h>
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif /* VBOX_WITH_COCOA_QT */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync CGOpenGLDisplayMask cglDisplayMask = CGDisplayIDToOpenGLDisplayMask (display);
1e29d016a09a61485fda74f7fca39e171ff5dda8vboxsync cglDisplayMask = CGDisplayIDToOpenGLDisplayMask(display);
1e29d016a09a61485fda74f7fca39e171ff5dda8vboxsync CGLChoosePixelFormat(attribs, &pixelFormat, &numPixelFormats);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /* On the Cocoa port we depend on the GL_EXT_framebuffer_object &
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * the GL_EXT_texture_rectangle extension. If they are not
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * available, disable 3D support. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync isSupported = gluCheckExtension((const GLubyte*)"GL_EXT_framebuffer_object", strExt);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync isSupported = gluCheckExtension((const GLubyte*)"GL_EXT_texture_rectangle", strExt);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync LogRel(("OpenGL Info: GL_EXT_texture_rectangle extension not supported\n"));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync LogRel(("OpenGL Info: GL_EXT_framebuffer_object extension not supported\n"));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif /* VBOX_WITH_COCOA_QT */
1e29d016a09a61485fda74f7fca39e171ff5dda8vboxsync return false;