Add libGL and libOpenGL filter libraries
libOpenGL is a filter library on libGLdispatch which only exports the core GL 1.x-4.x entrypoints. libGL is a filter library on libGLX and libGLdispatch which only exports the core GL 1.x-4.x entrypoints and GLX 1.4 entrypoints. This is a backwards compatibility layer for legacy apps which link against the old libGL.so ABI.
This commit is contained in:
parent
2b810fcefe
commit
e6da529d16
|
@ -162,6 +162,8 @@ CFLAGS="$CFLAGS -Wall -Werror -std=gnu99 -include config.h -fvisibility=hidden $
|
|||
|
||||
AC_CONFIG_FILES([Makefile
|
||||
src/Makefile
|
||||
src/GL/Makefile
|
||||
src/OpenGL/Makefile
|
||||
src/GLX/Makefile
|
||||
src/x11glvnd/Makefile
|
||||
src/GLdispatch/Makefile
|
||||
|
|
39
src/GL/GL.c
Normal file
39
src/GL/GL.c
Normal file
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* Copyright (c) 2013, NVIDIA CORPORATION.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* unaltered in all copies or substantial portions of the Materials.
|
||||
* Any additions, deletions, or changes to the original source files
|
||||
* must be clearly indicated in accompanying documentation.
|
||||
*
|
||||
* If only executable code is distributed, then the accompanying
|
||||
* documentation must state that "this software is based in part on the
|
||||
* work of the Khronos Group."
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
#include "compiler.h"
|
||||
|
||||
// Define GLX functions
|
||||
#define GLXNOOP PUBLIC
|
||||
#define NOOP_FUNC(func) glX ## func
|
||||
#include "../GLX/libglxnoopdefs.h"
|
||||
|
||||
// Define OpenGL core functions TODO
|
38
src/GL/Makefile.am
Normal file
38
src/GL/Makefile.am
Normal file
|
@ -0,0 +1,38 @@
|
|||
# Copyright (c) 2013, NVIDIA CORPORATION.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
# copy of this software and/or associated documentation files (the
|
||||
# "Materials"), to deal in the Materials without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
# permit persons to whom the Materials are furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# unaltered in all copies or substantial portions of the Materials.
|
||||
# Any additions, deletions, or changes to the original source files
|
||||
# must be clearly indicated in accompanying documentation.
|
||||
#
|
||||
# If only executable code is distributed, then the accompanying
|
||||
# documentation must state that "this software is based in part on the
|
||||
# work of the Khronos Group."
|
||||
#
|
||||
# THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
# MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
|
||||
lib_LTLIBRARIES = libGL.la
|
||||
|
||||
libGL_la_SOURCES = \
|
||||
GL.c
|
||||
|
||||
libGL_la_CFLAGS = \
|
||||
-I$(top_builddir)/include
|
||||
|
||||
libGL_la_LDFLAGS = -shared -Wl,--auxiliary=libGLdispatch.so.0 -Wl,--auxiliary=libGLX.so.0
|
||||
|
||||
libGL_la_LIBADD = ../GLX/libGLX.la ../GLdispatch/libGLdispatch.la
|
|
@ -1 +0,0 @@
|
|||
This will be a filter library on GLdispatch and GLX
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
/*
|
||||
* Header with templates for generating noop functions. This is sourced by
|
||||
* libglxnoop.c.
|
||||
* libglxnoop.c and the libGL filter library code.
|
||||
*/
|
||||
|
||||
#include "libglxabipriv.h"
|
||||
|
|
|
@ -1 +1 @@
|
|||
SUBDIRS = GLX
|
||||
SUBDIRS = GLX OpenGL GL
|
||||
|
|
37
src/OpenGL/Makefile.am
Normal file
37
src/OpenGL/Makefile.am
Normal file
|
@ -0,0 +1,37 @@
|
|||
# Copyright (c) 2013, NVIDIA CORPORATION.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
# copy of this software and/or associated documentation files (the
|
||||
# "Materials"), to deal in the Materials without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
# permit persons to whom the Materials are furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# unaltered in all copies or substantial portions of the Materials.
|
||||
# Any additions, deletions, or changes to the original source files
|
||||
# must be clearly indicated in accompanying documentation.
|
||||
#
|
||||
# If only executable code is distributed, then the accompanying
|
||||
# documentation must state that "this software is based in part on the
|
||||
# work of the Khronos Group."
|
||||
#
|
||||
# THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
# MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
|
||||
lib_LTLIBRARIES = libOpenGL.la
|
||||
|
||||
libOpenGL_la_SOURCES = \
|
||||
OpenGL.c
|
||||
|
||||
libOpenGL_la_CFLAGS = \
|
||||
-I$(top_builddir)/include
|
||||
|
||||
libOpenGL_la_LDFLAGS = -shared -Wl,--auxiliary=libGLdispatch.so.0
|
||||
|
34
src/OpenGL/OpenGL.c
Normal file
34
src/OpenGL/OpenGL.c
Normal file
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Copyright (c) 2013, NVIDIA CORPORATION.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* unaltered in all copies or substantial portions of the Materials.
|
||||
* Any additions, deletions, or changes to the original source files
|
||||
* must be clearly indicated in accompanying documentation.
|
||||
*
|
||||
* If only executable code is distributed, then the accompanying
|
||||
* documentation must state that "this software is based in part on the
|
||||
* work of the Khronos Group."
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glext.h>
|
||||
|
||||
// TODO: define GL stubs here
|
|
@ -1 +0,0 @@
|
|||
This will be a filter library on GLdispatch
|
Loading…
Reference in a new issue