Changeset 23384 in vbox for trunk/src/VBox/Main/darwin
- Timestamp:
- Sep 28, 2009 2:11:08 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 52911
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/darwin/OpenGLTestDarwin.cpp
r20512 r23384 25 25 #include <ApplicationServices/ApplicationServices.h> 26 26 #include <OpenGL/gl.h> 27 #ifdef VBOX_WITH_COCOA_QT 28 # include <OpenGL/glu.h> 29 # include <iprt/log.h> 30 #endif /* VBOX_WITH_COCOA_QT */ 27 31 28 32 bool is3DAccelerationSupported() … … 53 57 if (cglContext) 54 58 { 59 GLboolean isSupported = GL_TRUE; 60 #ifdef VBOX_WITH_COCOA_QT 61 /* On the Cocoa port we depend on the GL_EXT_framebuffer_object & 62 * the GL_EXT_texture_rectangle extension. If they are not 63 * available, disable 3D support. */ 64 CGLSetCurrentContext(cglContext); 65 const GLubyte* strExt; 66 strExt = glGetString(GL_EXTENSIONS); 67 isSupported = gluCheckExtension((const GLubyte*)"GL_EXT_framebuffer_object", strExt); 68 if (isSupported) 69 { 70 isSupported = gluCheckExtension((const GLubyte*)"GL_EXT_texture_rectangle", strExt); 71 if (!isSupported) 72 LogRel(("OpenGL Info: GL_EXT_texture_rectangle extension not supported\n")); 73 } 74 else 75 LogRel(("OpenGL Info: GL_EXT_framebuffer_object extension not supported\n")); 76 #endif /* VBOX_WITH_COCOA_QT */ 55 77 CGLDestroyContext(cglContext); 56 return true;78 return isSupported == GL_TRUE ? true : false; 57 79 } 58 80 }
Note:
See TracChangeset
for help on using the changeset viewer.