开发者

OpenGL development for mac in Xcode. Can I force software render?

I'm porting an OpenGL game from iPhone to Mac, and having problems with textures getting corrupted.开发者_如何转开发 I guess it's a memory problem.

The thing is I've crashed the mac 3 times now (happens random when the game launches), so it's getting difficult to debug this.

Is there any way I can force software render?

OpenGL development for mac in Xcode. Can I force software render?


Select kCGLRendererGenericID as NSOpenGLPFARendererID when you create the pixelformat attribute list for initing the context (initWithAttributes:).

NSOpenGLPFARendererID

Value is a nonnegative renderer ID number. OpenGL renderers that match the specified ID are preferred. Constants to select specific renderers are provided in the CGLRenderers.h header of the OpenGL framework. Of note is kCGLRendererGenericID which selects the Apple software renderer. The other constants select renderers for specific hardware vendors.

NOTE! I just saw that kCGLRendererGenericID has been deprecated and the one to use is kCGLRendererAppleSWID

Another tip is to start the app with the OpenGL Profiler. See here

http://lists.apple.com/archives/quartzcomposer-dev/2010/Jun/msg00090.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜