I want to know if there is any if syntax that can be used to run opengl c++ code on both mac and windows. More specifically, at the starting of the code can I put an if condition that determines whether the code is running on mac (generally xcode) or windows (generally visual c++) and accordingly include the header files.
Share
You can use preprocessor
#ifdef.