This one explicitly loads GL 1.0 and 1.0 function pointers on EGL
contexts on NVidia drivers (Linux headless boxes), because somehow the
usual statically linked functions don't behave correctly.
There's much more to work around / fix, but this is a start. First we
need to create the context with a pbuffer, otherwise eglMakeCurrent()
crashes deep inside. Second, it doesn't treat EGL_CONTEXT_FLAGS_KHR as a
bitfield, so it blows up when encountering a combination of zero flags.
In that case we're simply not sending the flags there. This would also
blow up when there's more than one flag passed, but there's just one
flag for debug context at the moment, so shouldn't be a problem.
Was Magnum::GL::Extensions::GL before and the redundancy was completely
unnecessary. Potential future extensions coming from GLX, EGL or whatnot
will most probably be in the Platform namespace in a completely separate
file, so this is not a problem.
All code internal to the GL library is affected, not much the outside,
as that is handled by the compatibility alias.
At the moment just the GL library itself w/o the tests, and without
backwards compatibility aliases. The following types were left in the
root namespace, despite being in the GL/ directory, as they will get
moved back soon:
* Image, CompressedImage and their dimensional typedefs
* ImageView, CompressedImageView and their dimensional typedefs
* PixelStorage
Not PixelFormat etc., that one will stay in the GL namespace and a
completely new PixelFormat enum will be provided in the root namespace.
Minimal updates (just the include guards) so Git is hopefully able to
detect the rename and track the history properly.
Everything except Magnum::GL doesn't compile now.
SVGA3D has broken handling of glTex[ture][Sub]Image*D() for 1D arrays,
2D arrays, 3D textures and cube map textures where it uploads just the
first slice in the last dimension. This is only with copies from host
memory, not with buffer images. Seems to be fixed in Mesa 13, but I have
no such system to verify that on. Relevant commit in the Mesa sources:
2aa9ff0cda
This is one of the uglier workarounds -- I had to reintroduce multiple
code paths for glTexImage() which were removed when implementing ARB_DSA
and the workaround consists of basically a bunch of functions that are
slicing the image and calling the original implementations with each
slice.
For some reason a buffer *allocated* with this function caused
Mesh::draw() to draw nothing. I gave up on investigating the root cause
-- using non-DSA glBufferData() "just works", so in case of this driver
the "svga3d-broken-dsa-bufferdata" workaround uses the non-DSA code
path.
DetectedDriver::AMD is now DetectedDriver::Amd,
DetectedDriver::ProbablyAngle is now just DetectedDriver::Angle. The old
names are still present, but deprecated and will be removed in the
future.
Because the library still links to the old crappy opengl32.dll, we need
to load all symbols above OpenGL 1.1, not just those that are above
OpenGL ES 2.0/3.0.
On Windows NVidia drivers the glTransformFeedbackVaryings() does not
make a copy of its char* arguments so it fails at link time when the
original char arrays are not in scope anymore. Enabling *synchronous*
debug output circumvents this bug. Can be triggered by running
TransformFeedbackGLTest with GL_KHR_debug extension disabled.
Detected in WindowlessWglApplication, added it to both Sdl2Application
and WindowlessWglApplication. Renamed the workaround to reflect that it
is for all three major vendors.
103% of use cases use the returned value directly without checking, so
we might as well do the check ourselves. Added new function hasCurrent()
and added deprecated backward-compatibility conversion and -> operators.
Wow, that creeped to a lot of places.
Last dinosaur from the pointer age.
The engine can now list all driver workarounds that were used during the
initialization. Any listed workaround can then be disabled from the
command-line using `--magnum-disable-workarounds` command-line
parameter. The disabling and querying API is private and undocumented,
because the driver workarounds should be disabled only by end-users and
not application developers. The workaround list is now empty, but will
be filled up in the following commits and the workarounds will be
probably documented only privately in Implementation/driverSpecific.hpp,
as it is really something that should be used only to debug driver
problems.