2
$\begingroup$

I am porting some code from Metal to OpenGL since we want to run our app on Windows too. Xcode is my preferred IDE, but the newer versions of Xcode do not support any OpenGL debugging.

Question: What do people usually use as a debugger for OpenGL? Eg: Frame capture on Metal is great and allows you to do shader debugging etc and nicely view the call hierarchy. Is there any thing similar for OpenGL?

If there are some good solutions on Windows, i can consider switching to Visual Studio.

$\endgroup$
3
$\begingroup$

There's nothing like frame capture for OpenGL on macOS, unfortunately. But there are 2 other tools that are useful for GL debugging: OpenGL Profiler and OpenGL Driver Monitor. You can read about them here. (Warning the images in the article are really old. They look like normal apps today without all the brushed metal, etc.) To download them, you need to log in to your developer account on developer.apple.com, click on "Downloads" on the left side. On the downloads page in the upper right is a tiny "more" link. If you click on that, you'll get the search tool. Enter "OpenGL Profiler" for your search and you'll be presented with a number of packages for different versions of Xcode. Choose the one that matches whichever version of Xcode you have. It's in the "Graphics Tools" section of the download.

OpenGL Profiler can show you the resources currently in use by a program. You can set breakpoints on any OpenGL call and when it breaks you can see all textures, shaders, FBOs, etc. and see what their contents are as well as all OpenGL state.

OpenGL Driver Monitor will graph over time how many textures are in use, or how much texture memory, etc. It can tell you the frequency of page-ons and page-offs for the GPU and other useful statistics.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.