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

I port OpenGL from iPhone to Mac and am experiencing texture damage issues. I assume this is a memory issue.

The fact is that I have broken mac 3 times now (it happens by chance when the game starts), so it becomes difficult to debug this.

Is there a way to force software rendering?

enter image description here

+4
source share
1 answer

Select kCGLRendererGenericID as NSOpenGLPFARendererID when creating the pixelformat attribute list to initialize the context ( initWithAttributes: .

NSOpenGLPFARendererID

The value is a non-negative rendering identifier. OpenGL rendering tools that match the specified identifier are preferred. Constants for selecting specific renderers are presented in the CGLRenderers.h header of the OpenGL framework. It should be noted that kCGLRendererGenericID selects Apple's software rendering. Other constants choose renderers for specific equipment suppliers.

NOTE! I only saw that kCGLRendererGenericID out of date, and the one to use is kCGLRendererAppleSWID

Another tip is to run the application using the OpenGL Profiler. See here

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

+5
source

Source: https://habr.com/ru/post/1347377/


All Articles