Implement GLESv2.

Added a Makefile to build libGLESv2.so. It's copied and adapted from the one
for libOpenGL.so.

The GLESv2 library currently exports all of the core functions in gl.xml for
GLES versions 2.0 through 3.2, inclusive.
This commit is contained in:
Kyle Brenneman 2015-11-13 14:24:02 -07:00
parent 41c8dc023b
commit 2e8f77c11b
5 changed files with 87 additions and 1 deletions

View file

@ -302,6 +302,7 @@ AC_CONFIG_FILES([Makefile
src/Makefile
src/GL/Makefile
src/OpenGL/Makefile
src/GLESv2/Makefile
src/GLX/Makefile
src/x11glvnd/Makefile
src/GLdispatch/Makefile

76
src/GLESv2/Makefile.am Normal file
View file

@ -0,0 +1,76 @@
# Copyright (c) 2015, 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 = libGLESv2.la
MAPI = $(top_srcdir)/$(MAPI_PREFIX)
GLAPI = $(MAPI)/glapi
include $(top_srcdir)/src/GLdispatch/vnd-glapi/entry_files.mk
libGLESv2_la_SOURCES = \
$(top_srcdir)/src/OpenGL/libopengl.c \
$(MAPI_GLDISPATCH_ENTRY_FILES) \
$(MAPI)/stub.c \
$(top_srcdir)/src/util/utils_misc.c
BUILT_SOURCES = g_glapi_mapi_glesv2_tmp.h g_glesv2_exports.sym
CLEANFILES = $(BUILT_SOURCES)
include $(top_srcdir)/src/generate/glvnd_gen.mk
g_glapi_mapi_glesv2_tmp.h : $(glapi_gen_mapi_deps)
$(call glapi_gen_mapi, glesv2)
g_glesv2_exports.sym : $(glapi_gen_libopengl_exports_deps)
$(call glapi_gen_libopengl_exports, glesv2)
libGLESv2_la_CFLAGS = \
-I$(top_srcdir)/include
if USE_DT_AUXILIARY
DT_AUX_FLAGS = -Xlinker "--auxiliary=libGLdispatch.so.0"
else
DT_AUX_FLAGS =
endif
EXTRA_libGLESv2_la_DEPENDENCIES = $(builddir)/g_glesv2_exports.sym
libGLESv2_la_LDFLAGS = -shared \
-version-info 2 \
$(LINKER_FLAG_NO_UNDEFINED) \
-export-symbols $(builddir)/g_glesv2_exports.sym \
$(DT_AUX_FLAGS)
AM_CPPFLAGS = \
-I$(top_srcdir)/src/GLdispatch/vnd-glapi/mapi \
-I$(top_srcdir)/src/GLdispatch/ \
-I$(top_srcdir)/src/util \
-I$(top_srcdir)/src/util/glvnd_pthread \
-DMAPI_ABI_HEADER=\"$(builddir)/g_glapi_mapi_glesv2_tmp.h\" \
-DSTATIC_DISPATCH_ONLY
libGLESv2_la_LIBADD = ../GLdispatch/libGLdispatch.la

View file

View file

@ -1,3 +1,9 @@
SUBDIRS = util GLdispatch x11glvnd GLX OpenGL GL
SUBDIRS = util \
GLdispatch \
x11glvnd \
GLX \
OpenGL \
GLESv2 \
GL
EXTRA_DIST = generate

View file

@ -42,6 +42,9 @@ _LIBRARY_FEATURE_NAMES = {
"GL_VERSION_3_2", "GL_VERSION_3_3", "GL_VERSION_4_0", "GL_VERSION_4_1",
"GL_VERSION_4_2", "GL_VERSION_4_3", "GL_VERSION_4_4", "GL_VERSION_4_5",
)),
"glesv2" : frozenset(("GL_ES_VERSION_2_0", "GL_ES_VERSION_3_0",
"GL_ES_VERSION_3_1" "GL_ES_VERSION_3_2",
)),
}
def getFunctions(xmlFiles):