我正在尝试将 OSX OpenGL 项目更新为 OpenGL 4.1。我的着色器使用 #version 410
并且一切正常并且非常活泼。今天我注意到 4.1 有一个新的 NSOpenGLPFAOpenGLProfile
值,所以我将像素格式配置文件从 NSOpenGLProfileVersion3_2Core
更新为 NSOpenGLProfileVersion4_1Core
,现在渲染是 < em>疯狂慢。我的像素格式初始化代码如下所示:
NSOpenGLPixelFormatAttribute attrs[] =
{
NSOpenGLPFADoubleBuffer,
NSOpenGLPFADepthSize, 24,
NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion4_1Core,
0
};
NSOpenGLPixelFormat *pf =
[[NSOpenGLPixelFormat alloc] initWithAttributes:attrs];
任何人都知道为什么这会慢得多 - 还有什么我需要更新的吗?
最佳答案
在 Mavericks 上使用 NSOpenGLProfileVersion4_1Core
会导致完整的软件回退。这不是优胜美地的问题。
关于macos - 在 OSX 上将项目升级到 OpenGL 4.1 - 使用 NSOpenGLProfileVersion4_1Core 会使渲染变慢,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27783932/