Is GLX_ARB_multisample supported by OSX - macos

I'm trying to use glfw3 with OpenGL 3.3 (core profile) on OSX with full screen anti-alisiang via glfwWindowHint(GLFW_SAMPLES,4). My extension loader glad tells me that GLX_ARB_multisample is not supported, which is required for GLFW_SAMPLES to work.
My question is very basic: Am I doing something wrong or is multi-sampling currently not supported by glfw on OSX?

No, GLX_ARB_multisample is not supported by OSX's native GL API.
My extension loader glad tells me that GLX_ARB_multisample is not supported, which is required for GLFW_SAMPLES to work.
You are totally wrong here. GLX_ARB_multisample is an GLX extension, which is relevant for the X11 Window System, not for OSX's Cocoa/NSOpenGL APIs. OSX does support multisampling, and it is controlled via the NSOpenGLPFASamples attribute, and GLFW is using it.
If you even try to load GLX extensions on that platform, you are doing something wrong (and this is not glad's fault).

Related

How can I install libEGL.dylib on MacOS?

I'm trying to use EGL via LWJGL on MacOS to use offscreen rendering.
It seems to throw an exception of the missing library libEGL.dylib.
I couldn't find this library on package distribution service like brew.
However, I could find several minor repositories on Github containing libEGL.dylib. I don't think this is safe to use.
How can I find the binary officially, or find the source to build?
There isn't any canonical libEGL implementation. The header files are part of the standard, but the implementation isn't.
MoltenGL has a binary download available (the second one, "OpenGL ES 2 for macOS").
If you prefer an open-source implementation, Google's ANGLE also implements EGL and supposedly supports macOS. And for what it's worth, it appears that Apple is using this in WebKit for iOS as well.

Can I use pre-"profiles" OpenGL versions on Macs?

I want to use a deprecated GL function - glPushAttrib. Ideally, I'd do that by using the Compatibility profile of a recent GL version, but Macs don't support that. So I'm happy to settle for using an old GL version, from before GL profiles existed. My question, though, is: does Mac support that?
Note: Don't tell me that I shouldn't use glPushAttrib unless you're able to link to a good library that replaces it. I don't want to write my own, and using a full-blown engine would be much more trouble than it's worth for my usecase ;)
I found the answer in the OpenGL wiki:
MacOSX gives you a choice: core profile for versions 3.2 or higher, or just version 2.1

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.

Is Xlib Still Used?

Is xlib still used? The helpful documentation I can find is http://tronche.com/ which looks, to me, very outdated. Who uses Xlib? Is GTK+ and QT built on it? thanks in advance, ell.
Yes, toolkits like GTK+ and Qt are still built on Xlib. Migration to xcb is in progress, but far from complete or universal. Applications though really should be writing to the toolkit API's, not Xlib.
BTW, you can also find Xlib docs directly from the source at X.Org: http://www.x.org/releases/current/doc/
These days, libxcb is used. There is also an xlib compatibility layer still available (xlib-xcb).
Well if you want hardware acceleration, according to freedesktop.org:
an OpenGL application on the X Windows must use Xlib and thus can’t be done using only XCB.
You have to have xlib even if you're only using xcb if you want opengl.

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