Commit graph

13 commits

Author SHA1 Message Date
Kyle Brenneman a7bb6f4d19 Remove extra paragraph from license text.
Remove the "If only executable code is distributed..." paragraph from
the license text. Everything now uses a normal MIT license.

The only code from Khronos that's included in libglvnd is the EGL/GL
header and XML files, which do not contain that paragraph.

Fixes https://gitlab.freedesktop.org/glvnd/libglvnd/-/issues/221
2021-09-30 09:21:34 -06:00
Kyle Brenneman c5bcda3b84 GLX: Fix the version number macros.
Fix the reversed GLX_VENDOR_ABI_GET_MAJOR_VERSION and
GLX_VENDOR_ABI_GET_MINOR_VERSION macros.

Add individual #defines for libglvnd's major and minor version for better
readability.
2016-03-30 17:35:31 -06:00
Kyle Brenneman 86585e3bb0 GLX: A few more ABI fixes.
Fix the return type in the __GLX_MAIN_PROTO macro.

In GLX_dummy.c, check the major and minor version numbers like a real vendor
library might. In addition, GLX_dummy.c now keeps a pointer to the
__GLXapiExports struct instead of a copy of it.
2016-03-28 17:26:32 -06:00
Kyle Brenneman 3a84276f63 GLX: Add the patch callbacks directly to __GLXapiImports.
Added the function pointers for entrypoint rewriting as members of
__GLXapiImports, instead of using a separate __GLdispatchPatchCallbacks
pointer.

Moved the __GLdispatchPatchCallbacks struct to GLdispatch.h.
2016-03-10 16:57:34 -07:00
Kyle Brenneman da7ae346e3 GLX: Change __glx_Main to use the libGLX-allocated __GLXapiImports table.
__glx_Main now takes a pointer to the __GLXapiImports struct and fills it in.

The __GLXapiImports struct is now allocated and zeroed by libGLX. This makes it
possible to add an optional element to the end of the struct without breaking
backward compatibility.
2016-03-10 16:11:47 -07:00
Kyle Brenneman 58d8dcaeb0 GLX: Change the __glx_Main function prototype.
Removed the vendorID and vendorName parameters from the __glx_Main function,
since neither one is useful to a vendor.

Instead, __glx_Main now takes the __GLXvendorInfo pointer as a parameter. We
can use that to look up any additional per-vendor information that might be
added in the future.
2016-03-03 11:11:11 -07:00
Kyle Brenneman 74f7b27b77 GLX: Change the ABI version number to a (major, minor) pair.
The version number for the libGLX vendor library interface now uses a major and
minor version number in the high- and low-order 16 bits.

The major version is used for changes that break existing vendor libraries, and
the minor version is for changes where existing vendor libraries will still
work.
2016-03-02 12:46:39 -07:00
Kyle Brenneman ba1c58a558 Rename a couple of functions in the ABI's.
Renamed __GLdispatchPatchCallbacks::checkPatchSupported to isPatchSupported,
and renamed __GLXapiImports::checkSupportsScreen to isScreenSupported.
2016-02-29 13:50:39 -07:00
Kyle Brenneman 88807b95b9 GLX: Change the mapping functions to return a vendor directly.
Changed vendorFromContext, vendorFromFBConfig, and vendorFromDrawable to return
the vendor pointer as its return value instead of using a pointer.

Returning by pointer was necessary when the functions would also return a
screen number. But, GLX objects are now associated directly with a vendor,
not with any particular screen or display.
2016-02-29 13:50:38 -07:00
Kyle Brenneman e59233a1a9 GLX: Remove the XVisualInfo to vendor mapping.
Removed addScreenVisualMapping, removeScreenVisualMapping, and vendorFromVisual
from __GLXapiExports.

The XVisualInfo to vendor mapping is a no-op, since it just uses the screen number
to select a vendor.

It might be useful in the future at some point to provide a mechanism for
selecting between multiple vendors on a single X screen, but such an option
would more likely be used with the GLXFBConfig-based functions, not with the
XVisualInfo-based ones.
2016-02-29 13:50:36 -07:00
Kyle Brenneman b8e2cec4b4 GLX: Return failures from the addVendor*Mapping functions.
The addVendorContextMapping, addVendorFBConfigMapping, and
addVendorDrawableMapping functions in __GLXapiExports now return an int to
indicate success or failure.

Updated the various GLX functions so that they will deal with those failures.
In the case of context and drawable creations functions, it will call back into
the vendor library to destroy the object before returning.
2016-02-29 13:50:35 -07:00
Kyle Brenneman 233b274be1 Add a threadAttach callback for entrypoint patching.
The threadAttach callback is used so that a vendor library can go through any
thread initialization it needs to in order to deal with any later OpenGL calls.

This allows a vendor library to work around broken applications that try to
call OpenGL functions without a current context.
2016-02-29 13:50:34 -07:00
Kyle Brenneman ec97db7746 Install the public header files.
Two header files (libglxabi.h and GLdispatchABI.h) are public -- intended to be
used by vendor libraries, while the other headers are all internal to libglvnd.

Move the public header files to a new directory, include/glvnd.

Add a makefile so that the public headers are installed by make install.
2016-01-13 16:04:40 -07:00
Renamed from src/GLX/libglxabi.h (Browse further)