Changeset 53546 in vbox for trunk/src/VBox
- Timestamp:
- Dec 16, 2014 11:54:40 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/OpenGLTest/OpenGLTestDarwin.cpp
r52626 r53546 122 122 CGLPixelFormatObj pixelFormat = NULL; 123 123 GLint numPixelFormats = 0; 124 CGLError rcCgl; 124 125 125 126 CGLPixelFormatAttribute attribs[] = { … … 135 136 display = CGMainDisplayID(); 136 137 cglDisplayMask = CGDisplayIDToOpenGLDisplayMask(display); 137 CGLChoosePixelFormat(attribs, &pixelFormat, &numPixelFormats); 138 rcCgl = CGLChoosePixelFormat(attribs, &pixelFormat, &numPixelFormats); 139 if (rcCgl != kCGLNoError) 140 { 141 LogRel(("OpenGL Info: 3D test unable to choose pixel format (rcCgl=0x%X)\n", rcCgl)); 142 return false; 143 } 138 144 139 145 if (pixelFormat) 140 146 { 141 147 CGLContextObj cglContext = 0; 142 CGLCreateContext(pixelFormat, NULL, &cglContext);148 rcCgl = CGLCreateContext(pixelFormat, NULL, &cglContext); 143 149 CGLDestroyPixelFormat(pixelFormat); 150 151 if (rcCgl != kCGLNoError) 152 { 153 LogRel(("OpenGL Info: 3D test unable to create context (rcCgl=0x%X)\n", rcCgl)); 154 return false; 155 } 156 144 157 if (cglContext) 145 158 { … … 157 170 isSupported = gluCheckExtension((const GLubyte*)"GL_EXT_texture_rectangle", strExt); 158 171 if (!isSupported) 159 LogRel(("OpenGL Info: GL_EXT_texture_rectangle extension not supported\n"));172 LogRel(("OpenGL Info: 3D test found that GL_EXT_texture_rectangle extension not supported\n")); 160 173 } 161 174 else 162 LogRel(("OpenGL Info: GL_EXT_framebuffer_object extension not supported\n"));175 LogRel(("OpenGL Info: 3D test found that GL_EXT_framebuffer_object extension not supported\n")); 163 176 #endif /* VBOX_WITH_COCOA_QT */ 164 177 CGLDestroyContext(cglContext); 178 LogRel(("OpenGL Info: 3D test %spassed\n", isSupported == GL_TRUE ? "" : "not ")); 165 179 return isSupported == GL_TRUE ? true : false; 166 180 } 181 else 182 LogRel(("OpenGL Info: 3D test unable to create context (internal error)\n")); 167 183 } 184 else 185 LogRel(("OpenGL Info: 3D test unable to choose pixel format (internal error)\n")); 168 186 169 187 return false;
Note:
See TracChangeset
for help on using the changeset viewer.