OSX available OpenGL ARB extensions - macos

from http://developer.apple.com/graphicsimaging/opengl/capabilities/GLInfo_1072_Core.html appears that current OSX 10.7.2 core OpenGL support is still limited at 3.20 with GLSL 1.50
among other data are the available ARB_ extensions.
I was wondering if these were the minimum guaranteed to be present extensions, or if you really have only these four, namely:
ARB_instanced_arrays
ARB_occlusion_query2
ARB_shader_bit_encoding
ARB_timer_query
Im currently developing a portable application that should run on OSX and uses ARB_separate_shader_objects, does it mean it will definitely not run on OSX 10.7.2?

Those, plus the extensions that are part of the legacy profile, are the only extensions currently available with Apple's drivers for the drivers/graphics cards listed on those pages.

Related

Declare Metal support requirement for MacOS application

I'm preparing my app for the Mac App Store. The app depends on Metal and I do not want it to be installed on devices which do not have GPU capable enough. How do I specify this in Info.plist? I've found that on iOS this is possible with UIRequiredDeviceCapabilities key, but this is not supported on macOS. Is there any way to declare Metal dependency? I doubt Metal requirement will be automatically deduced when I upload to the store.
This is currently not possible.
There is no macOS equivalent to iOS's device capabilities key. This is why games and other graphically-intensive apps often list additional system requirements in their descriptions.
One imperfect option is to set your deployment target to macOS 10.14 Mojave or newer, since Metal is supported on all Macs supported by Mojave (2012 and later).
When it comes to determining whether the system supports features not present in all versions of Metal, you should use the supportsFeatureSet(_:) method and related API to determine whether to use such features on a case-by-case basis.

Unable to link OpenGL compatibility profile (EXT symbols not recognized)

I decided to use GLEW for handling extensions instead of requesting core profile and having to migrate my code.
I would like to add support for FBO's through the EXT profile as a first step.
The problem is gcc will not link my code (OSX 10.10), it does not recognize any gl*EXT() functions. For instance, glBindFrameBufferEXT()
flags as undefined symbol. (glBindFrameBuffer() was also
unrecognized...)
I link against GLEW and have tried using GLEXT or GLFW with compatibility profile, but nothing works! Am I missing a library? How do I tell gcc to use the right GL profile? Am I obliged to migrate to core profile?
In MacOS X GLEW is not doing a lot, because there are not a lot of OpenGL extensions on MacOS X and due to the way OpenGL is integrated in MacOS X all functions of the OpenGL version supported by the available framework are immediately available
… or not, if you're using an extension function that's not supported by MacOS X's OpenGL implementation.
MacOS X is the weird duckling in the OpenGL family: OpenGL is used at a very low level in the OS's core graphics routines, to OpenGL is very well supported by the OS. But it's built so deep into the OS that it hardly can be updated without updating the whole OS.
Solution: Don't use that extension. FBOs have been introduced with OpenGL-3.3 so you've to create a 3.3 core profile context and can use the functions (without the …EXT) directly.

Xcode 4 & Mac OSX 10.3?

I'm new at programming on the Mac. I've got me a brand new copy of XCode 4.0. I've got people asking me what versions of MacOSX we'll be able to support but I'm not sure what to tell them.
I see options for selecting an "SDK" and other options for selecting a target version. It seems the lowest I can go is 10.4 though -- even though we'd like to support 10.3, if possible without a lot of pain.
My question is, could anyone give me a quick rundown of how sdk versions and target versions fit into this? As I'm coding, what kind of things do I need to watch out for to make sure I can still support the smallest version of MacOSX? Likewise, how do I figure the G4/G5 (PowerPC) versions of MacOSX into all this? For example, on Windows, if I write an app in c#, I know that all I need to do is make sure an appropriate version of .net framework is installed, regardless of the OS. Does something similar hold true for the MacOSX?
Thanks in advance.
I believe Apple has dropped PowerPC support completely, including Rosetta, in Mac OS X so 10.3 is out of the question.
If you want to support PowerPC, see this related question. It looks like a lot of work.
How can we restore ppc/ppc64 as well as full 10.4/10.5 SDK support to Xcode 4?
With the analogy to the .NET Framework, there isn't anything like that for Mac OS X built-in.
It is true for Mac OS X. If your program targets 10.3 SDK, it will be able to run on 10.3 or greater. I.e. the Base SDK project setting specifies minimum target OS version.
However, supporting 10.3 IS a lot of pain. Even 10.4 is not that easy, for example Objective-C 2.0 (most important, #property, garbage collection) is only available with 10.5 SDK or above.
The common solution in existing projects is to keep an old version of software available for 10.1-10.4 users, while the new versions will require 10.5 or greater (and also usually are Intel-only).
If you're starting a new project, you will probably want to distribute it via Mac AppStore, which only works on 10.6+, which means you can safely pick 10.6 SDK as the lowest target version.
Apple is way more harsh about upgrades than Microsoft. Mac users don't walk around with 10-years old systems on their laptops. The only reasons I can think of to still use 10.3 are using 10-year old mac, not having Internet connection and not knowing what “to update a software” means. So, I wouldn't care even about 10.4, not to say 10.3.

How to do OpenGL 3 programming on OS X with a GeForce 9400

I have a MacBook Pro with a GeForce 9400 graphics card. Wikipedia said this card supports OpenGL 3.
But the header and library shipped with OS X 10.6 seems to be OpenGL 2 only (I checked the files in /usr/X11/include/).
I need to do some OpenGL 3 programming. Can I do it with my current hardware and OS? What do I need to get and install?
Sadly, I don't think you can yet, as detailed here.
I believe Lion will upgrade OpenGL to 3.2 for OS X though (which is still short of the more useful 3.3 unfortunately).
NB: I do not own a Mac, this is purely from trying to learn modern OpenGL on the windows side and digging around to understand how portable it would be.
Edit: this thread on the official OpenGL forums has more detail. Although (see comments below this answer) it may not be completely clear why vendors cannot provide OpenGL 3+ compliant drivers, it seems pretty clear that there is no way to use fully OpenGL 3.3 compliant code and shaders in OS X. Some workarounds are provided in that thread however, as well as in my first link.
The best place to check OpenGL support on the various OSX and Mac combinations is:
http://developer.apple.com/graphicsimaging/opengl/capabilities/
See the "Core" subpage for 10.7+
OpenGL 3.2 with GLSL 1.5 on 10.7.2 isn't too bad.
Your current hardware can support OpenGL 3, but not the OS. Mac OS X 10.7 (Lion) should support OpenGL 3, which is a solution only if you can wait many months.
Your only option right now is to switch to a different OS such as Windows or Linux. You'll have to boot from this other operating system, because the virtual machine systems present a virtual video card to the guest operating systems, and none have OpenGL 3 compatible virtual video cards.
(Disclaimer: This information is based on taking Windows OpenGL and replacing wgl with glX. But I did verify that the corresponding extensions exist in GLX land)
You won't find OpenGL 3 support in any header files. Rather you need the GLX_ARB_create_context extension.
The other answers are probably correct about missing support in OSX, but even when support comes, you'll have to use glXGetProcAddress and load the extension. (Can't video card manufacturers add support for these extensions through their driver? Why does it require "OS support"?)
Windows OpenGL developer here. On Windows 7 only OpenGL 1.4 is officially supported, but everyone gets around this limitation by querying which functions are available at run-time.
On OSX I expect you can do the same thing. The easiest way to do this is with The OpenGL Extension Wrangler Library: http://www.opengl.org/sdk/libs/GLEW/

Update OpenGL libraries on windows

I'm using a 3rd party DLL which uses OpenGL. Right now that 3rd party does not work correctly as the display does not refresh correctly. I came to suspect that the OpenGL library isn't correctly installed or may be outdated.
Is there a way to update the OpenGL library on windows? Is there like an official site which will hold the correct opengl.dll file or something like that?
I believe the OpenGL libraries are just part of the drivers that ship with your graphics card. Upgrading your graphics drivers should upgrade your OpenGL stuff to the latest your card supports.
OpenGL should be up to date on Windows.
However, if you are getting display/refresh problems, and they're only occuring on windows, this is most likely an issue with your graphics driver.
Try updating to your latest OpenGL graphics driver. This fixes many OpenGL issues on Windows.
opengl.dll is part of your display card driver. Windows comes with a default opengl.dll that offers very little acceleration. Re installing the graphics card driver or upgrading to the latest version should take care of your problem.
OpenGL is implemented in the graphics driver. If you want to use the latest OpenGL version as a developer you download and use GLEW (http://glew.sourceforge.net/) as a normal library. This will give you access to cross platform OpenGL 4.1 or whatever version your card supports.

Resources