added glfw and glew

This commit is contained in:
DaniTheSkunk 2022-12-20 03:41:03 +00:00
parent 72125fc7ab
commit 15b03529fc
1709 changed files with 254152 additions and 2 deletions

View File

@ -3,9 +3,28 @@
# #
cmake_minimum_required (VERSION 3.8) cmake_minimum_required (VERSION 3.8)
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
add_subdirectory(lib/glfw-3.3.8)
project ("glew")
add_library(glew STATIC "lib/glew-2.1.0/src/glew.c" "lib/glew-2.1.0/include/GL/glew.h")
target_link_libraries(glew opengl32)
target_include_directories(glew PRIVATE lib/glew-2.1.0/include)
set_target_properties(glew PROPERTIES C_STANDARD 11 C_STANDARD_REQUIRED YES C_EXTENSIONS YES)
set_target_properties(glew PROPERTIES COMPILE_FLAGS "-Wno-everything")
target_compile_definitions(glew PUBLIC GLEW_STATIC)
project ("skunkworks") project ("skunkworks")
add_executable (skunkworks "src/skunkworks.c" "src/skunkworks.h" "src/test.c") add_executable (skunkworks "src/skunkworks.c" "src/skunkworks.h" "src/test.c")
target_link_libraries(skunkworks glfw glew)
target_include_directories(skunkworks PRIVATE lib/glfw-3.8.8/include lib/glew-2.1.0/include)
set_target_properties(skunkworks PROPERTIES C_STANDARD 90 C_STANDARD_REQUIRED YES C_EXTENSIONS NO) set_target_properties(skunkworks PROPERTIES C_STANDARD 90 C_STANDARD_REQUIRED YES C_EXTENSIONS NO)
set(CMAKE_C_FLAGS "-Wall -Werror -pedantic") set_target_properties(skunkworks PROPERTIES COMPILE_FLAGS "-Wall -Werror -pedantic")
add_custom_command(TARGET skunkworks POST_BUILD
COMMAND $<$<CONFIG:release>:llvm-strip>
ARGS --strip-all $<TARGET_FILE:skunkworks>)

View File

@ -1,2 +1,2 @@
@ECHO OFF @ECHO OFF
cd build && ninja && skunkworks.exe cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && ninja && skunkworks.exe

View File

@ -0,0 +1,311 @@
#ifndef __khrplatform_h_
#define __khrplatform_h_
/*
** Copyright (c) 2008-2018 The Khronos Group Inc.
**
** 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
** in all copies or substantial portions of the Materials.
**
** 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.
*/
/* Khronos platform-specific types and definitions.
*
* The master copy of khrplatform.h is maintained in the Khronos EGL
* Registry repository at https://github.com/KhronosGroup/EGL-Registry
* The last semantic modification to khrplatform.h was at commit ID:
* 67a3e0864c2d75ea5287b9f3d2eb74a745936692
*
* Adopters may modify this file to suit their platform. Adopters are
* encouraged to submit platform specific modifications to the Khronos
* group so that they can be included in future versions of this file.
* Please submit changes by filing pull requests or issues on
* the EGL Registry repository linked above.
*
*
* See the Implementer's Guidelines for information about where this file
* should be located on your system and for more details of its use:
* http://www.khronos.org/registry/implementers_guide.pdf
*
* This file should be included as
* #include <KHR/khrplatform.h>
* by Khronos client API header files that use its types and defines.
*
* The types in khrplatform.h should only be used to define API-specific types.
*
* Types defined in khrplatform.h:
* khronos_int8_t signed 8 bit
* khronos_uint8_t unsigned 8 bit
* khronos_int16_t signed 16 bit
* khronos_uint16_t unsigned 16 bit
* khronos_int32_t signed 32 bit
* khronos_uint32_t unsigned 32 bit
* khronos_int64_t signed 64 bit
* khronos_uint64_t unsigned 64 bit
* khronos_intptr_t signed same number of bits as a pointer
* khronos_uintptr_t unsigned same number of bits as a pointer
* khronos_ssize_t signed size
* khronos_usize_t unsigned size
* khronos_float_t signed 32 bit floating point
* khronos_time_ns_t unsigned 64 bit time in nanoseconds
* khronos_utime_nanoseconds_t unsigned time interval or absolute time in
* nanoseconds
* khronos_stime_nanoseconds_t signed time interval in nanoseconds
* khronos_boolean_enum_t enumerated boolean type. This should
* only be used as a base type when a client API's boolean type is
* an enum. Client APIs which use an integer or other type for
* booleans cannot use this as the base type for their boolean.
*
* Tokens defined in khrplatform.h:
*
* KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
*
* KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
* KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
*
* Calling convention macros defined in this file:
* KHRONOS_APICALL
* KHRONOS_APIENTRY
* KHRONOS_APIATTRIBUTES
*
* These may be used in function prototypes as:
*
* KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
* int arg1,
* int arg2) KHRONOS_APIATTRIBUTES;
*/
#if defined(__SCITECH_SNAP__) && !defined(KHRONOS_STATIC)
# define KHRONOS_STATIC 1
#endif
/*-------------------------------------------------------------------------
* Definition of KHRONOS_APICALL
*-------------------------------------------------------------------------
* This precedes the return type of the function in the function prototype.
*/
#if defined(KHRONOS_STATIC)
/* If the preprocessor constant KHRONOS_STATIC is defined, make the
* header compatible with static linking. */
# define KHRONOS_APICALL
#elif defined(_WIN32)
# define KHRONOS_APICALL __declspec(dllimport)
#elif defined (__SYMBIAN32__)
# define KHRONOS_APICALL IMPORT_C
#elif defined(__ANDROID__)
# define KHRONOS_APICALL __attribute__((visibility("default")))
#else
# define KHRONOS_APICALL
#endif
/*-------------------------------------------------------------------------
* Definition of KHRONOS_APIENTRY
*-------------------------------------------------------------------------
* This follows the return type of the function and precedes the function
* name in the function prototype.
*/
#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
/* Win32 but not WinCE */
# define KHRONOS_APIENTRY __stdcall
#else
# define KHRONOS_APIENTRY
#endif
/*-------------------------------------------------------------------------
* Definition of KHRONOS_APIATTRIBUTES
*-------------------------------------------------------------------------
* This follows the closing parenthesis of the function prototype arguments.
*/
#if defined (__ARMCC_2__)
#define KHRONOS_APIATTRIBUTES __softfp
#else
#define KHRONOS_APIATTRIBUTES
#endif
/*-------------------------------------------------------------------------
* basic type definitions
*-----------------------------------------------------------------------*/
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
/*
* Using <stdint.h>
*/
#include <stdint.h>
typedef int32_t khronos_int32_t;
typedef uint32_t khronos_uint32_t;
typedef int64_t khronos_int64_t;
typedef uint64_t khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
/*
* To support platform where unsigned long cannot be used interchangeably with
* inptr_t (e.g. CHERI-extended ISAs), we can use the stdint.h intptr_t.
* Ideally, we could just use (u)intptr_t everywhere, but this could result in
* ABI breakage if khronos_uintptr_t is changed from unsigned long to
* unsigned long long or similar (this results in different C++ name mangling).
* To avoid changes for existing platforms, we restrict usage of intptr_t to
* platforms where the size of a pointer is larger than the size of long.
*/
#if defined(__SIZEOF_LONG__) && defined(__SIZEOF_POINTER__)
#if __SIZEOF_POINTER__ > __SIZEOF_LONG__
#define KHRONOS_USE_INTPTR_T
#endif
#endif
#elif defined(__VMS ) || defined(__sgi)
/*
* Using <inttypes.h>
*/
#include <inttypes.h>
typedef int32_t khronos_int32_t;
typedef uint32_t khronos_uint32_t;
typedef int64_t khronos_int64_t;
typedef uint64_t khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
/*
* Win32
*/
typedef __int32 khronos_int32_t;
typedef unsigned __int32 khronos_uint32_t;
typedef __int64 khronos_int64_t;
typedef unsigned __int64 khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#elif defined(__sun__) || defined(__digital__)
/*
* Sun or Digital
*/
typedef int khronos_int32_t;
typedef unsigned int khronos_uint32_t;
#if defined(__arch64__) || defined(_LP64)
typedef long int khronos_int64_t;
typedef unsigned long int khronos_uint64_t;
#else
typedef long long int khronos_int64_t;
typedef unsigned long long int khronos_uint64_t;
#endif /* __arch64__ */
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#elif 0
/*
* Hypothetical platform with no float or int64 support
*/
typedef int khronos_int32_t;
typedef unsigned int khronos_uint32_t;
#define KHRONOS_SUPPORT_INT64 0
#define KHRONOS_SUPPORT_FLOAT 0
#else
/*
* Generic fallback
*/
#include <stdint.h>
typedef int32_t khronos_int32_t;
typedef uint32_t khronos_uint32_t;
typedef int64_t khronos_int64_t;
typedef uint64_t khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#endif
/*
* Types that are (so far) the same on all platforms
*/
typedef signed char khronos_int8_t;
typedef unsigned char khronos_uint8_t;
typedef signed short int khronos_int16_t;
typedef unsigned short int khronos_uint16_t;
/*
* Types that differ between LLP64 and LP64 architectures - in LLP64,
* pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
* to be the only LLP64 architecture in current use.
*/
#ifdef KHRONOS_USE_INTPTR_T
typedef intptr_t khronos_intptr_t;
typedef uintptr_t khronos_uintptr_t;
#elif defined(_WIN64)
typedef signed long long int khronos_intptr_t;
typedef unsigned long long int khronos_uintptr_t;
#else
typedef signed long int khronos_intptr_t;
typedef unsigned long int khronos_uintptr_t;
#endif
#if defined(_WIN64)
typedef signed long long int khronos_ssize_t;
typedef unsigned long long int khronos_usize_t;
#else
typedef signed long int khronos_ssize_t;
typedef unsigned long int khronos_usize_t;
#endif
#if KHRONOS_SUPPORT_FLOAT
/*
* Float type
*/
typedef float khronos_float_t;
#endif
#if KHRONOS_SUPPORT_INT64
/* Time types
*
* These types can be used to represent a time interval in nanoseconds or
* an absolute Unadjusted System Time. Unadjusted System Time is the number
* of nanoseconds since some arbitrary system event (e.g. since the last
* time the system booted). The Unadjusted System Time is an unsigned
* 64 bit value that wraps back to 0 every 584 years. Time intervals
* may be either signed or unsigned.
*/
typedef khronos_uint64_t khronos_utime_nanoseconds_t;
typedef khronos_int64_t khronos_stime_nanoseconds_t;
#endif
/*
* Dummy value used to pad enum types to 32 bits.
*/
#ifndef KHRONOS_MAX_ENUM
#define KHRONOS_MAX_ENUM 0x7FFFFFFF
#endif
/*
* Enumerated boolean type
*
* Values other than zero should be considered to be true. Therefore
* comparisons should not be made against KHRONOS_TRUE.
*/
typedef enum {
KHRONOS_FALSE = 0,
KHRONOS_TRUE = 1,
KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
} khronos_boolean_enum_t;
#endif /* __khrplatform_h_ */

5169
lib/glad/include/glad/glad.h Normal file

File diff suppressed because it is too large Load Diff

2532
lib/glad/src/glad.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,73 @@
The OpenGL Extension Wrangler Library
Copyright (C) 2002-2007, Milan Ikits <milan ikits[]ieee org>
Copyright (C) 2002-2007, Marcelo E. Magallon <mmagallo[]debian org>
Copyright (C) 2002, Lev Povalahev
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* The name of the author may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
Mesa 3-D graphics library
Version: 7.0
Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS 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
BRIAN PAUL 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright (c) 2007 The Khronos Group Inc.
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
in all copies or substantial portions of the Materials.
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.

352
lib/glew-2.1.0/Makefile Normal file
View File

@ -0,0 +1,352 @@
#!gmake
## The OpenGL Extension Wrangler Library
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002, Lev Povalahev
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are met:
##
## * Redistributions of source code must retain the above copyright notice,
## this list of conditions and the following disclaimer.
## * Redistributions in binary form must reproduce the above copyright notice,
## this list of conditions and the following disclaimer in the documentation
## and/or other materials provided with the distribution.
## * The name of the author may be used to endorse or promote products
## derived from this software without specific prior written permission.
##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
## AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
## ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
## LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
## SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
## INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
## THE POSSIBILITY OF SUCH DAMAGE.
include config/version
SHELL = /bin/sh
SYSTEM ?= $(shell config/config.guess | cut -d - -f 3 | sed -e 's/[0-9\.]//g;')
SYSTEM.SUPPORTED = $(shell test -f config/Makefile.$(SYSTEM) && echo 1)
ifeq ($(SYSTEM.SUPPORTED), 1)
include config/Makefile.$(SYSTEM)
else
$(error "Platform '$(SYSTEM)' not supported")
endif
GLEW_PREFIX ?= /usr
GLEW_DEST ?= /usr
BINDIR ?= $(GLEW_DEST)/bin
LIBDIR ?= $(GLEW_DEST)/lib
INCDIR ?= $(GLEW_DEST)/include/GL
PKGDIR ?= $(GLEW_DEST)/lib/pkgconfig
ifneq ($(GLEW_NO_GLU), -DGLEW_NO_GLU)
LIBGLU = glu
endif
DIST_NAME ?= glew-$(GLEW_VERSION)
DIST_SRC_ZIP ?= $(shell pwd)/$(DIST_NAME).zip
DIST_SRC_TGZ ?= $(shell pwd)/$(DIST_NAME).tgz
DIST_WIN32 ?= $(shell pwd)/$(DIST_NAME)-win32.zip
DIST_DIR := $(shell mktemp -d /tmp/glew.XXXXXX)/$(DIST_NAME)
# To disable stripping of linked binaries either:
# - use STRIP= on gmake command-line
# - edit this makefile to set STRIP to the empty string
# (Note: STRIP does not affect the strip in the install step)
#
# To disable symlinks:
# - use LN= on gmake command-line
AR ?= ar
ARFLAGS ?= cr
INSTALL ?= install
STRIP ?= strip
RM ?= rm -f
LN ?= ln -sf
UNIX2DOS ?= unix2dos -q
DOS2UNIX ?= dos2unix -q
ifneq (,$(filter debug,$(MAKECMDGOALS)))
OPT = -g
else
OPT = $(POPT)
endif
INCLUDE = -Iinclude
CFLAGS = $(OPT) $(WARN) $(INCLUDE) $(CFLAGS.EXTRA)
all debug: glew.lib glew.bin
# GLEW shared and static libraries
LIB.LDFLAGS := $(LDFLAGS.EXTRA) $(LDFLAGS.GL)
LIB.LIBS := $(GL_LDFLAGS)
LIB.SRCS := src/glew.c
LIB.SRCS.NAMES := $(notdir $(LIB.SRCS))
LIB.OBJS := $(addprefix tmp/$(SYSTEM)/default/static/,$(LIB.SRCS.NAMES))
LIB.OBJS := $(LIB.OBJS:.c=.o)
LIB.SOBJS := $(addprefix tmp/$(SYSTEM)/default/shared/,$(LIB.SRCS.NAMES))
LIB.SOBJS := $(LIB.SOBJS:.c=.o)
glew.lib: glew.lib.shared glew.lib.static
glew.lib.shared: lib lib/$(LIB.SHARED) glew.pc
glew.lib.static: lib lib/$(LIB.STATIC) glew.pc
.PHONY: glew.lib glew.lib.shared glew.lib.static
lib:
mkdir lib
lib/$(LIB.STATIC): $(LIB.OBJS)
ifneq ($(AR),)
$(AR) $(ARFLAGS) $@ $^
else ifneq ($(LIBTOOL),)
$(LIBTOOL) $@ $^
endif
ifneq ($(STRIP),)
$(STRIP) -x $@
endif
lib/$(LIB.SHARED): $(LIB.SOBJS)
$(LD) $(LDFLAGS.SO) -o $@ $^ $(LIB.LDFLAGS) $(LIB.LIBS)
ifneq ($(LN),)
$(LN) $(LIB.SHARED) lib/$(LIB.SONAME)
$(LN) $(LIB.SHARED) lib/$(LIB.DEVLNK)
endif
ifneq ($(STRIP),)
$(STRIP) -x $@
endif
tmp/$(SYSTEM)/default/static/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
@mkdir -p $(dir $@)
$(CC) -DGLEW_NO_GLU -DGLEW_STATIC $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
tmp/$(SYSTEM)/default/shared/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
@mkdir -p $(dir $@)
$(CC) -DGLEW_NO_GLU -DGLEW_BUILD $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
# Force re-write of glew.pc, GLEW_DEST can vary
.PHONY: glew.pc
glew.pc: glew.pc.in
sed \
-e "s|@prefix@|$(GLEW_PREFIX)|g" \
-e "s|@libdir@|$(LIBDIR)|g" \
-e "s|@exec_prefix@|$(BINDIR)|g" \
-e "s|@includedir@|$(INCDIR)|g" \
-e "s|@version@|$(GLEW_VERSION)|g" \
-e "s|@cflags@||g" \
-e "s|@libname@|$(NAME)|g" \
-e "s|@requireslib@|$(LIBGLU)|g" \
< $< > $@
# GLEW utility programs
BIN.LIBS = -Llib $(LDFLAGS.DYNAMIC) -l$(NAME) $(LDFLAGS.EXTRA) $(LDFLAGS.GL)
GLEWINFO.BIN := glewinfo$(BIN.SUFFIX)
GLEWINFO.BIN.SRC := src/glewinfo.c
GLEWINFO.BIN.OBJ := $(addprefix tmp/$(SYSTEM)/default/shared/,$(notdir $(GLEWINFO.BIN.SRC)))
GLEWINFO.BIN.OBJ := $(GLEWINFO.BIN.OBJ:.c=.o)
VISUALINFO.BIN := visualinfo$(BIN.SUFFIX)
VISUALINFO.BIN.SRC := src/visualinfo.c
VISUALINFO.BIN.OBJ := $(addprefix tmp/$(SYSTEM)/default/shared/,$(notdir $(VISUALINFO.BIN.SRC)))
VISUALINFO.BIN.OBJ := $(VISUALINFO.BIN.OBJ:.c=.o)
# Don't build glewinfo or visualinfo for NaCL, yet.
ifneq ($(filter nacl%,$(SYSTEM)),)
glew.bin: glew.lib bin
else
glew.bin: glew.lib bin bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN)
endif
bin:
mkdir bin
bin/$(GLEWINFO.BIN): $(GLEWINFO.BIN.OBJ) lib/$(LIB.SHARED)
$(CC) $(CFLAGS) -o $@ $(GLEWINFO.BIN.OBJ) $(BIN.LIBS)
ifneq ($(STRIP),)
$(STRIP) -x $@
endif
bin/$(VISUALINFO.BIN): $(VISUALINFO.BIN.OBJ) lib/$(LIB.SHARED)
$(CC) $(CFLAGS) -o $@ $(VISUALINFO.BIN.OBJ) $(BIN.LIBS)
ifneq ($(STRIP),)
$(STRIP) -x $@
endif
$(GLEWINFO.BIN.OBJ): $(GLEWINFO.BIN.SRC) include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
@mkdir -p $(dir $@)
$(CC) -DGLEW_NO_GLU $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
$(VISUALINFO.BIN.OBJ): $(VISUALINFO.BIN.SRC) include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
@mkdir -p $(dir $@)
$(CC) -DGLEW_NO_GLU $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
# Install targets
install.all: install install.bin
install: install.include install.lib install.pkgconfig
install.lib: glew.lib
$(INSTALL) -d -m 0755 "$(DESTDIR)$(LIBDIR)"
# runtime
ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
$(INSTALL) -d -m 0755 "$(DESTDIR)$(BINDIR)"
$(INSTALL) -m 0755 lib/$(LIB.SHARED) "$(DESTDIR)$(BINDIR)/"
else
$(INSTALL) -m 0644 lib/$(LIB.SHARED) "$(DESTDIR)$(LIBDIR)/"
endif
ifneq ($(LN),)
$(LN) $(LIB.SHARED) "$(DESTDIR)$(LIBDIR)/$(LIB.SONAME)"
endif
# development files
ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
$(INSTALL) -m 0644 lib/$(LIB.DEVLNK) "$(DESTDIR)$(LIBDIR)/"
endif
ifneq ($(LN),)
$(LN) $(LIB.SHARED) "$(DESTDIR)$(LIBDIR)/$(LIB.DEVLNK)"
endif
$(INSTALL) -m 0644 lib/$(LIB.STATIC) "$(DESTDIR)$(LIBDIR)/"
install.bin: glew.bin
$(INSTALL) -d -m 0755 "$(DESTDIR)$(BINDIR)"
$(INSTALL) -s -m 0755 bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN) "$(DESTDIR)$(BINDIR)/"
install.include:
$(INSTALL) -d -m 0755 "$(DESTDIR)$(INCDIR)"
$(INSTALL) -m 0644 include/GL/wglew.h "$(DESTDIR)$(INCDIR)/"
$(INSTALL) -m 0644 include/GL/glew.h "$(DESTDIR)$(INCDIR)/"
$(INSTALL) -m 0644 include/GL/glxew.h "$(DESTDIR)$(INCDIR)/"
install.pkgconfig: glew.pc
$(INSTALL) -d -m 0755 "$(DESTDIR)$(PKGDIR)"
$(INSTALL) -d -m 0755 "$(DESTDIR)$(PKGDIR)"
$(INSTALL) -m 0644 glew.pc "$(DESTDIR)$(PKGDIR)/"
uninstall:
$(RM) "$(DESTDIR)$(INCDIR)/wglew.h"
$(RM) "$(DESTDIR)$(INCDIR)/glew.h"
$(RM) "$(DESTDIR)$(INCDIR)/glxew.h"
$(RM) "$(DESTDIR)$(LIBDIR)/$(LIB.DEVLNK)"
ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
$(RM) "$(DESTDIR)$(BINDIR)/$(LIB.SHARED)"
else
$(RM) "$(DESTDIR)$(LIBDIR)/$(LIB.SONAME)"
$(RM) "$(DESTDIR)$(LIBDIR)/$(LIB.SHARED)"
endif
$(RM) "$(DESTDIR)$(LIBDIR)/$(LIB.STATIC)"
$(RM) "$(DESTDIR)$(BINDIR)/$(GLEWINFO.BIN)" "$(DESTDIR)$(BINDIR)/$(VISUALINFO.BIN)"
clean:
$(RM) -r tmp/
$(RM) -r lib/
$(RM) -r bin/
$(RM) glew.pc
distclean: clean
find . -name \*~ | xargs $(RM)
find . -name .\*.sw\? | xargs $(RM)
# Distributions
dist-win32:
$(RM) -r $(DIST_DIR)
mkdir -p $(DIST_DIR)
cp -a include $(DIST_DIR)
cp -a doc $(DIST_DIR)
cp -a *.txt $(DIST_DIR)
cp -a bin $(DIST_DIR)
cp -a lib $(DIST_DIR)
$(RM) -f $(DIST_DIR)/bin/*/*/*.pdb $(DIST_DIR)/bin/*/*/*.exp
$(RM) -f $(DIST_DIR)/bin/*/*/glewinfo-*.exe $(DIST_DIR)/bin/*/*/visualinfo-*.exe
$(RM) -f $(DIST_DIR)/lib/*/*/*.pdb $(DIST_DIR)/lib/*/*/*.exp
$(UNIX2DOS) $(DIST_DIR)/include/GL/*.h
$(UNIX2DOS) $(DIST_DIR)/doc/*.txt
$(UNIX2DOS) $(DIST_DIR)/doc/*.html
$(UNIX2DOS) $(DIST_DIR)/*.txt
rm -f $(DIST_WIN32)
cd $(DIST_DIR)/.. && zip -rq9 $(DIST_WIN32) $(DIST_NAME)
$(RM) -r $(DIST_DIR)
dist-src:
$(RM) -r $(DIST_DIR)
mkdir -p $(DIST_DIR)
mkdir -p $(DIST_DIR)/bin
mkdir -p $(DIST_DIR)/lib
cp -a auto $(DIST_DIR)
$(RM) -Rf $(DIST_DIR)/auto/registry
cp -a build $(DIST_DIR)
cp -a config $(DIST_DIR)
cp -a src $(DIST_DIR)
cp -a doc $(DIST_DIR)
cp -a include $(DIST_DIR)
cp -a *.md $(DIST_DIR)
cp -a *.txt $(DIST_DIR)
cp -a Makefile $(DIST_DIR)
cp -a glew.pc.in $(DIST_DIR)
find $(DIST_DIR) -name '*.o' | xargs $(RM) -r
find $(DIST_DIR) -name '*~' | xargs $(RM) -r
find $(DIST_DIR) -name CVS -o -name .cvsignore | xargs $(RM) -r
find $(DIST_DIR) -name .svn | xargs $(RM) -r
find $(DIST_DIR) -name "*.patch" | xargs $(RM) -r
$(DOS2UNIX) $(DIST_DIR)/Makefile
$(DOS2UNIX) $(DIST_DIR)/auto/Makefile
$(DOS2UNIX) $(DIST_DIR)/config/*
$(UNIX2DOS) $(DIST_DIR)/auto/core/*
$(UNIX2DOS) $(DIST_DIR)/auto/extensions/*
find $(DIST_DIR) -name '*.h' | xargs $(UNIX2DOS)
find $(DIST_DIR) -name '*.c' | xargs $(UNIX2DOS)
find $(DIST_DIR) -name '*.md' | xargs $(UNIX2DOS)
find $(DIST_DIR) -name '*.txt' | xargs $(UNIX2DOS)
find $(DIST_DIR) -name '*.html' | xargs $(UNIX2DOS)
find $(DIST_DIR) -name '*.css' | xargs $(UNIX2DOS)
find $(DIST_DIR) -name '*.sh' | xargs $(UNIX2DOS)
find $(DIST_DIR) -name '*.pl' | xargs $(UNIX2DOS)
find $(DIST_DIR) -name 'Makefile' | xargs $(UNIX2DOS)
find $(DIST_DIR) -name '*.in' | xargs $(UNIX2DOS)
find $(DIST_DIR) -name '*.pm' | xargs $(UNIX2DOS)
find $(DIST_DIR) -name '*.rc' | xargs $(UNIX2DOS)
rm -f $(DIST_SRC_ZIP)
cd $(DIST_DIR)/.. && zip -rq9 $(DIST_SRC_ZIP) $(DIST_NAME)
$(DOS2UNIX) $(DIST_DIR)/Makefile
$(DOS2UNIX) $(DIST_DIR)/auto/Makefile
$(DOS2UNIX) $(DIST_DIR)/config/*
$(DOS2UNIX) $(DIST_DIR)/auto/core/*
$(DOS2UNIX) $(DIST_DIR)/auto/extensions/*
find $(DIST_DIR) -name '*.h' | xargs $(DOS2UNIX)
find $(DIST_DIR) -name '*.c' | xargs $(DOS2UNIX)
find $(DIST_DIR) -name '*.md' | xargs $(DOS2UNIX)
find $(DIST_DIR) -name '*.txt' | xargs $(DOS2UNIX)
find $(DIST_DIR) -name '*.html' | xargs $(DOS2UNIX)
find $(DIST_DIR) -name '*.css' | xargs $(DOS2UNIX)
find $(DIST_DIR) -name '*.sh' | xargs $(DOS2UNIX)
find $(DIST_DIR) -name '*.pl' | xargs $(DOS2UNIX)
find $(DIST_DIR) -name 'Makefile' | xargs $(DOS2UNIX)
find $(DIST_DIR) -name '*.in' | xargs $(DOS2UNIX)
find $(DIST_DIR) -name '*.pm' | xargs $(DOS2UNIX)
find $(DIST_DIR) -name '*.rc' | xargs $(DOS2UNIX)
rm -f $(DIST_SRC_TGZ)
cd $(DIST_DIR)/.. && env GZIP=-9 tar czf $(DIST_SRC_TGZ) $(DIST_NAME)
$(RM) -r $(DIST_DIR)
extensions:
$(MAKE) -C auto
.PHONY: clean distclean tardist dist-win32 dist-src

190
lib/glew-2.1.0/README.md Normal file
View File

@ -0,0 +1,190 @@
# GLEW - The OpenGL Extension Wrangler Library
![](http://glew.sourceforge.net/glew.png)
http://glew.sourceforge.net/
https://github.com/nigels-com/glew
[![Build Status](https://travis-ci.org/nigels-com/glew.svg?branch=master)](https://travis-ci.org/nigels-com/glew)
[![Gitter](https://badges.gitter.im/nigels-com/glew.svg)](https://gitter.im/nigels-com/glew?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Download](https://img.shields.io/sourceforge/dm/glew.svg)](https://sourceforge.net/projects/glew/files/latest/download)
## Downloads
Current release is [2.1.0](https://sourceforge.net/projects/glew/files/glew/2.1.0/).
[(Change Log)](http://glew.sourceforge.net/log.html)
Sources available as
[ZIP](https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0.zip/download) or
[TGZ](https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0.tgz/download).
Windows binaries for [32-bit and 64-bit](https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0-win32.zip/download).
### Recent snapshots
Snapshots may contain new features, bug-fixes or new OpenGL extensions ahead of tested, official releases.
## Build
It is highly recommended to build from a tgz or zip release snapshot.
The code generation workflow is a complex brew of gnu make, perl and python, that works best on Linux or Mac.
For most end-users of GLEW the official releases are the best choice, with first class support.
### Linux and Mac
#### Using GNU Make
##### Install build tools
Debian/Ubuntu/Mint: `$ sudo apt-get install build-essential libxmu-dev libxi-dev libgl-dev libosmesa-dev`
RedHat/CentOS/Fedora: `$ sudo yum install libXmu-devel libXi-devel libGL-devel`
##### Build
$ make
$ sudo make install
$ make clean
Targets: `all, glew.lib (sub-targets: glew.lib.shared, glew.lib.static), glew.bin, clean, install, uninstall`
Variables: `SYSTEM=linux-clang, GLEW_DEST=/usr/local, STRIP=`
_Note: may need to make **auto** folder_
#### Using cmake
*CMake 2.8.12 or higher is required.*
##### Install build tools
Debian/Ubuntu/Mint: `$ sudo apt-get install build-essential libXmu-dev libXi-dev libgl-dev cmake`
RedHat/CentOS/Fedora: `$ sudo yum install libXmu-devel libXi-devel libGL-devel cmake`
##### Build
$ cd build
$ cmake ./cmake
$ make -j4
| Target | Description |
| ---------- | ----------- |
| glew | Build the glew shared library. |
| glew_s | Build the glew static library. |
| glewinfo | Build the `glewinfo` executable (requires `BUILD_UTILS` to be `ON`). |
| visualinfo | Build the `visualinfo` executable (requires `BUILD_UTILS` to be `ON`). |
| install | Install all enabled targets into `CMAKE_INSTALL_PREFIX`. |
| clean | Clean up build artifacts. |
| all | Build all enabled targets (default target). |
| Variables | Description |
| --------------- | ----------- |
| BUILD_UTILS | Build the `glewinfo` and `visualinfo` executables. |
| GLEW_REGAL | Build in Regal mode. |
| GLEW_OSMESA | Build in off-screen Mesa mode. |
| BUILD_FRAMEWORK | Build as MacOSX Framework. Setting `CMAKE_INSTALL_PREFIX` to `/Library/Frameworks` is recommended. |
### Windows
#### Visual Studio
Use the provided Visual Studio project file in build/vc12/
Projects for vc6 and vc10 are also provided
#### MSYS/Mingw
Available from [Mingw](http://www.mingw.org/)
Requirements: bash, make, gcc
$ mingw32-make
$ mingw32-make install
$ mingw32-make install.all
Alternative toolchain: `SYSTEM=mingw-win32`
#### MSYS2/Mingw-w64
Available from [Msys2](http://msys2.github.io/) and/or [Mingw-w64](http://mingw-w64.org/)
Requirements: bash, make, gcc
$ pacman -S gcc make mingw-w64-i686-gcc mingw-w64-x86_64-gcc
$ make
$ make install
$ make install.all
Alternative toolchain: `SYSTEM=msys, SYSTEM=msys-win32, SYSTEM=msys-win64`
## glewinfo
`glewinfo` is a command-line tool useful for inspecting the capabilities of an
OpenGL implementation and GLEW support for that. Please include `glewinfo.txt`
with bug reports, as appropriate.
---------------------------
GLEW Extension Info
---------------------------
GLEW version 2.0.0
Reporting capabilities of pixelformat 3
Running on a Intel(R) HD Graphics 3000 from Intel
OpenGL version 3.1.0 - Build 9.17.10.4229 is supported
GL_VERSION_1_1: OK
---------------
GL_VERSION_1_2: OK
---------------
glCopyTexSubImage3D: OK
glDrawRangeElements: OK
glTexImage3D: OK
glTexSubImage3D: OK
...
## Code Generation
A Unix or Mac environment is needed for building GLEW from scratch to
include new extensions, or customize the code generation. The extension
data is regenerated from the top level source directory with:
make extensions
An alternative to generating the GLEW sources from scratch is to
download a pre-generated (unsupported) snapshot:
https://sourceforge.net/projects/glew/files/glew/snapshots/
Travis-built snapshots are also available:
https://glew.s3.amazonaws.com/index.html
## Authors
GLEW is currently maintained by [Nigel Stewart](https://github.com/nigels-com)
with bug fixes, new OpenGL extension support and new releases.
GLEW was developed by [Milan Ikits](http://www.cs.utah.edu/~ikits/)
and [Marcelo Magallon](http://wwwvis.informatik.uni-stuttgart.de/~magallon/).
Aaron Lefohn, Joe Kniss, and Chris Wyman were the first users and also
assisted with the design and debugging process.
The acronym GLEW originates from Aaron Lefohn.
Pasi K&auml;rkk&auml;inen identified and fixed several problems with
GLX and SDL. Nate Robins created the `wglinfo` utility, to
which modifications were made by Michael Wimmer.
## Copyright and Licensing
GLEW is originally derived from the EXTGL project by Lev Povalahev.
The source code is licensed under the
[Modified BSD License](http://glew.sourceforge.net/glew.txt), the
[Mesa 3-D License](http://glew.sourceforge.net/mesa.txt) (MIT) and the
[Khronos License](http://glew.sourceforge.net/khronos.txt) (MIT).
The automatic code generation scripts are released under the
[GNU GPL](http://glew.sourceforge.net/gpl.txt).

View File

@ -0,0 +1,357 @@
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
##
## This program is distributed under the terms and conditions of the GNU
## General Public License Version 2 as published by the Free Software
## Foundation or, at your option, any later version.
include ../config/version
#GLEW_SPLIT_SOURCE = yes
SHELL = bash
PYTHON ?= python
### Use git repository for GL extension specifications
GIT_CLONE ?= git clone --branch glew https://github.com/nigels-com/glfixes.git
###
### Conventional desktop OpenGL settings
###
REGISTRY = registry/gl/specs
EXT = extensions/gl
FILTER = filter_gl_ext.sh
CORE = core/gl
REGISTRY_URL = http://www.opengl.org/registry/
###
### Experimental OpenGL ES settings
###
# REGISTRY = registry/gles
# EXT = extensions/gles
# FILTER = filter_gles_ext.sh
# CORE = core/gles
# REGISTRY_URL = http://www.khronos.org/registry/gles/
BIN = bin
SRC = src
BLACKLIST = blacklist
GL_CORE_SPEC := $(CORE)/GL_VERSION*
GLX_CORE_SPEC := $(CORE)/GLX_VERSION*
EGL_CORE_SPEC := $(CORE)/EGL_VERSION*
ifeq (custom,$(MAKECMDGOALS))
#GL_CORE_SPEC := $(shell grep GL_VERSION custom.txt | perl -pi -e "s=^=$(CORE)/=g;")
GL_EXT_SPEC := $(shell grep "^[ \t]*GL_" custom.txt | grep -v GL_VERSION | perl -pi -e "s=^=$(EXT)/=g;")
WGL_EXT_SPEC := $(shell grep "^[ \t]*WGL_" custom.txt | perl -pi -e "s=^=$(EXT)/=g;")
#GLX_CORE_SPEC := $(shell grep GLX_VERSION custom.txt | perl -pi -e "s=^=$(CORE)/=g;")
GLX_EXT_SPEC := $(shell grep "^[ \t]*GLX_" custom.txt | grep -v GLX_VERSION | perl -pi -e "s=^=$(EXT)/=g;")
EGL_EXT_SPEC := $(shell grep "^[ \t]*EGL_" custom.txt | grep -v EGL_VERSION | perl -pi -e "s=^=$(EXT)/=g;")
else
GL_EXT_SPEC := $(EXT)/GL_*
WGL_EXT_SPEC := $(EXT)/WGL_*
GLX_EXT_SPEC := $(EXT)/GLX_*
EGL_EXT_SPEC := $(EXT)/EGL_*
endif
PARSE_SPEC = parse_spec.pl
SYSTEM = $(strip $(shell uname -s))
TOP = ..
I.DEST = $(TOP)/include/GL
S.DEST = $(TOP)/src
D.DEST = $(TOP)/doc
B.DEST = $(TOP)/build
I.TARGETS = \
$(I.DEST)/glew.h \
$(I.DEST)/wglew.h \
$(I.DEST)/glxew.h \
$(I.DEST)/eglew.h
ifeq (yes,$(GLEW_SPLIT_SOURCE))
S.TARGETS = \
$(S.DEST)/glew_def.c \
$(S.DEST)/glew_init.c \
$(S.DEST)/glew_str.c \
$(S.DEST)/glewinfo.c
else
S.TARGETS = \
$(S.DEST)/glew.c \
$(S.DEST)/glewinfo.c
endif
D.TARGETS = \
$(D.DEST)/index.html \
$(D.DEST)/install.html \
$(D.DEST)/basic.html \
$(D.DEST)/advanced.html \
$(D.DEST)/build.html \
$(D.DEST)/credits.html \
$(D.DEST)/log.html \
$(D.DEST)/glew.html \
$(D.DEST)/wglew.html \
$(D.DEST)/glxew.html
B.TARGETS = \
$(B.DEST)/glew.rc \
$(B.DEST)/glewinfo.rc \
$(B.DEST)/visualinfo.rc
all custom: $(I.TARGETS) $(S.TARGETS) $(D.TARGETS) $(B.TARGETS)
registry: $(REGISTRY)/.dummy
ext: $(EXT)/.dummy
$(REGISTRY)/.dummy:
@echo "--------------------------------------------------------------------"
@echo "Downloading registry"
@echo "--------------------------------------------------------------------"
$(GIT_CLONE) registry
touch $@
$(EXT)/.dummy: $(REGISTRY)/.dummy
@echo "--------------------------------------------------------------------"
@echo "Creating descriptors"
@echo "--------------------------------------------------------------------"
rm -rf $(EXT)
$(BIN)/update_ext.sh $(EXT) $(REGISTRY) $(BLACKLIST)
$(PYTHON) $(BIN)/parse_xml.py registry/xml/egl.xml --core core/gl --extensions extensions/gl
$(BIN)/$(FILTER) $(EXT)
ifeq ($(patsubst Darwin%,Darwin,$(SYSTEM)), Darwin)
find $(CORE) -maxdepth 1 -type f | grep -v VERSION | grep -v "~" | \
xargs -J % cp % $(EXT)
else
find $(CORE) -maxdepth 1 -type f | grep -v VERSION | grep -v "~" | \
xargs cp --target-directory=$(EXT)
endif
touch $@
$(I.DEST)/glew.h: $(EXT)/.dummy
@echo "--------------------------------------------------------------------"
@echo "Creating glew.h"
@echo "--------------------------------------------------------------------"
test -d $(I.DEST) || mkdir -p $(I.DEST)
cp -f $(SRC)/glew_license.h $@
cat $(SRC)/mesa_license.h >> $@
cat $(SRC)/khronos_license.h >> $@
cat $(SRC)/glew_head.h >> $@
$(BIN)/make_header.pl GLAPIENTRY GL $(GL_CORE_SPEC) >> $@
$(BIN)/make_header.pl GLAPIENTRY GL $(GL_EXT_SPEC) >> $@
echo -e "/* ------------------------------------------------------------------------- */\n\n" >> $@
$(BIN)/make_struct_fun.pl GLEW_FUN_EXPORT $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@
$(BIN)/make_struct_var.pl GLEW_VAR_EXPORT $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@
perl -e "s/GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_1_2;/GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_1_1;\nGLEW_VAR_EXPORT GLboolean __GLEW_VERSION_1_2;/" -pi $@
cat $(SRC)/glew_tail.h >> $@
perl -e "s/GLEW_VERSION_STRING/$(GLEW_VERSION)/g" -pi $@
perl -e "s/GLEW_VERSION_MAJOR_STRING/$(GLEW_MAJOR)/g" -pi $@
perl -e "s/GLEW_VERSION_MINOR_STRING/$(GLEW_MINOR)/g" -pi $@
perl -e "s/GLEW_VERSION_MICRO_STRING/$(GLEW_MICRO)/g" -pi $@
rm -f $@.bak
$(I.DEST)/wglew.h: $(EXT)/.dummy
@echo "--------------------------------------------------------------------"
@echo "Creating wglew.h"
@echo "--------------------------------------------------------------------"
cp -f $(SRC)/glew_license.h $@
cat $(SRC)/khronos_license.h >> $@
cat $(SRC)/wglew_head.h >> $@
$(BIN)/make_header.pl WINAPI WGL $(WGL_EXT_SPEC) >> $@
cat $(SRC)/wglew_mid.h >> $@
$(BIN)/make_struct_fun.pl WGLEW_FUN_EXPORT $(WGL_EXT_SPEC) >> $@
$(BIN)/make_struct_var.pl WGLEW_VAR_EXPORT $(WGL_EXT_SPEC) >> $@
cat $(SRC)/wglew_tail.h >> $@
$(I.DEST)/glxew.h: $(EXT)/.dummy
@echo "--------------------------------------------------------------------"
@echo "Creating glxew.h"
@echo "--------------------------------------------------------------------"
cp -f $(SRC)/glew_license.h $@
cat $(SRC)/mesa_license.h >> $@
cat $(SRC)/khronos_license.h >> $@
cat $(SRC)/glxew_head.h >> $@
$(BIN)/make_header.pl "" GLX $(GLX_CORE_SPEC) >> $@
$(BIN)/make_header.pl "" GLX $(GLX_EXT_SPEC) >> $@
cat $(SRC)/glxew_mid.h >> $@
$(BIN)/make_struct_fun.pl GLXEW_FUN_EXPORT $(GLX_CORE_SPEC) $(GLX_EXT_SPEC) >> $@
$(BIN)/make_struct_var.pl GLXEW_VAR_EXPORT $(GLX_CORE_SPEC) $(GLX_EXT_SPEC) >> $@
perl -e "s/GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_2;/GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_0;\nGLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_1;\nGLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_2;/" -pi $@
cat $(SRC)/glxew_tail.h >> $@
$(I.DEST)/eglew.h: $(EXT)/.dummy
@echo "--------------------------------------------------------------------"
@echo "Creating eglew.h"
@echo "--------------------------------------------------------------------"
cp -f $(SRC)/glew_license.h $@
cat $(SRC)/mesa_license.h >> $@
cat $(SRC)/khronos_license.h >> $@
cat $(SRC)/eglew_head.h >> $@
$(BIN)/make_header.pl "" EGL $(EGL_CORE_SPEC) >> $@
$(BIN)/make_header.pl "" EGL $(EGL_EXT_SPEC) >> $@
cat $(SRC)/eglew_mid.h >> $@
$(BIN)/make_struct_fun.pl EGLEW_FUN_EXPORT $(EGL_CORE_SPEC) $(EGL_EXT_SPEC) >> $@
$(BIN)/make_struct_var.pl EGLEW_VAR_EXPORT $(EGL_CORE_SPEC) $(EGL_EXT_SPEC) >> $@
cat $(SRC)/eglew_tail.h >> $@
$(S.DEST)/glew.c: $(EXT)/.dummy
@echo "--------------------------------------------------------------------"
@echo "Creating glew.c"
@echo "--------------------------------------------------------------------"
cp -f $(SRC)/glew_license.h $@
cat $(SRC)/glew_head.c >> $@
$(BIN)/make_def_fun.pl GL $(GL_CORE_SPEC) >> $@
$(BIN)/make_def_fun.pl GL $(GL_EXT_SPEC) >> $@
echo -e "\nGLboolean __GLEW_VERSION_1_1 = GL_FALSE;" >> $@
$(BIN)/make_def_var.pl GL $(GL_CORE_SPEC) >> $@
$(BIN)/make_def_var.pl GL $(GL_EXT_SPEC) >> $@
echo -e "\nstatic const char * _glewExtensionLookup[] = {" >> $@;
$(BIN)/make_index.pl $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@
echo -e " NULL\n};\n" >> $@;
$(BIN)/make_enable_index.pl $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@
$(BIN)/make_initd.pl GL $(GL_CORE_SPEC) >> $@
$(BIN)/make_initd.pl GL $(GL_EXT_SPEC) >> $@
echo -e "" >> $@;
$(BIN)/make_init.pl GL $(GL_CORE_SPEC) >> $@
$(BIN)/make_init.pl GL $(GL_EXT_SPEC) >> $@
cat $(SRC)/glew_init_gl.c >> $@
$(BIN)/make_list.pl $(GL_CORE_SPEC) | grep -v '\"GL_VERSION' >> $@
$(BIN)/make_list.pl $(GL_EXT_SPEC) >> $@
$(BIN)/make_list2.pl $(GL_EXT_SPEC) >> $@
echo -e "\n return GLEW_OK;\n}\n" >> $@
echo -e "\n#if defined(GLEW_OSMESA)" >> $@
echo -e "\n#elif defined(GLEW_EGL)" >> $@
$(BIN)/make_def_fun.pl EGL $(EGL_CORE_SPEC) >> $@
$(BIN)/make_def_fun.pl EGL $(EGL_EXT_SPEC) >> $@
$(BIN)/make_def_var.pl EGL $(EGL_CORE_SPEC) >> $@
$(BIN)/make_def_var.pl EGL $(EGL_EXT_SPEC) >> $@
$(BIN)/make_init.pl EGL $(EGL_CORE_SPEC) >> $@
$(BIN)/make_init.pl EGL $(EGL_EXT_SPEC) >> $@
cat $(SRC)/glew_init_egl.c >> $@
$(BIN)/make_list.pl $(EGL_CORE_SPEC) >> $@
$(BIN)/make_list.pl $(EGL_EXT_SPEC) >> $@
echo -e "\n return GLEW_OK;\n}" >> $@
echo -e "\n#elif defined(_WIN32)" >> $@
$(BIN)/make_def_fun.pl WGL $(WGL_EXT_SPEC) >> $@
$(BIN)/make_def_var.pl WGL $(WGL_EXT_SPEC) >> $@
$(BIN)/make_init.pl WGL $(WGL_EXT_SPEC) >> $@
cat $(SRC)/glew_init_wgl.c >> $@
$(BIN)/make_list.pl $(WGL_EXT_SPEC) >> $@
echo -e "\n return GLEW_OK;\n}" >> $@;
echo -e "\n#elif !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))" >> $@
$(BIN)/make_def_fun.pl GLX $(GLX_CORE_SPEC) >> $@
$(BIN)/make_def_fun.pl GLX $(GLX_EXT_SPEC) >> $@
echo -e "\nGLboolean __GLXEW_VERSION_1_0 = GL_FALSE;" >> $@
echo -e "GLboolean __GLXEW_VERSION_1_1 = GL_FALSE;" >> $@
$(BIN)/make_def_var.pl GLX $(GLX_CORE_SPEC) >> $@
$(BIN)/make_def_var.pl GLX $(GLX_EXT_SPEC) >> $@
$(BIN)/make_init.pl GLX $(GLX_CORE_SPEC) >> $@
$(BIN)/make_init.pl GLX $(GLX_EXT_SPEC) >> $@
cat $(SRC)/glew_init_glx.c >> $@
$(BIN)/make_list.pl $(CORE)/GLX_VERSION_1_3 | grep -v '\"GLX_VERSION' >> $@
$(BIN)/make_list.pl $(GLX_EXT_SPEC) >> $@
echo -e "\n return GLEW_OK;\n}" >> $@
echo -e "\n#endif /* !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) */\n" >> $@;
cat $(SRC)/glew_init_tail.c >> $@
cat $(SRC)/glew_str_head.c >> $@
$(BIN)/make_str.pl $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@
cat $(SRC)/glew_str_wgl.c >> $@
$(BIN)/make_str.pl $(WGL_EXT_SPEC) >> $@
cat $(SRC)/glew_str_glx.c >> $@
$(BIN)/make_str.pl $(GLX_CORE_SPEC) $(GLX_EXT_SPEC) >> $@
cat $(SRC)/glew_str_egl.c >> $@
$(BIN)/make_str.pl $(EGL_CORE_SPEC) $(EGL_EXT_SPEC) >> $@
cat $(SRC)/glew_str_tail.c >> $@
perl -e "s/GLEW_VERSION_STRING/$(GLEW_VERSION)/g" -pi $@
perl -e "s/GLEW_VERSION_MAJOR_STRING/$(GLEW_MAJOR)/g" -pi $@
perl -e "s/GLEW_VERSION_MINOR_STRING/$(GLEW_MINOR)/g" -pi $@
perl -e "s/GLEW_VERSION_MICRO_STRING/$(GLEW_MICRO)/g" -pi $@
perl -e "s/GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader\(\);/{ GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader(); _glewInit_GL_ARB_vertex_program(); }/g" -pi $@
perl -e "s/\(\(glColorSubTable = /((glBlendEquation = (PFNGLBLENDEQUATIONPROC)glewGetProcAddress((const GLubyte*)\"glBlendEquation\")) == NULL) || r;\n r = ((glColorSubTable = /g" -pi $@
rm -f $@.bak
$(S.DEST)/glewinfo.c: $(EXT)/.dummy
@echo "--------------------------------------------------------------------"
@echo "Creating glewinfo.c"
@echo "--------------------------------------------------------------------"
cp -f $(SRC)/glew_license.h $@
cat $(SRC)/glewinfo_head.c >> $@
$(BIN)/make_info.pl $(GL_CORE_SPEC) >> $@
$(BIN)/make_info.pl $(GL_EXT_SPEC) >> $@
echo -e "#if defined(GLEW_EGL)\n" >> $@
$(BIN)/make_info.pl $(EGL_CORE_SPEC) >> $@
$(BIN)/make_info.pl $(EGL_EXT_SPEC) >> $@
echo -e "#elif _WIN32\n" >> $@
$(BIN)/make_info.pl $(WGL_EXT_SPEC) >> $@
echo -e "#else /* _UNIX */\n" >> $@
$(BIN)/make_info.pl $(GLX_CORE_SPEC) >> $@
$(BIN)/make_info.pl $(GLX_EXT_SPEC) >> $@
echo -e "#endif /* _WIN32 */\n" >> $@
cat $(SRC)/glewinfo_gl.c >> $@
$(BIN)/make_info_list.pl $(GL_CORE_SPEC) >> $@
$(BIN)/make_info_list.pl $(GL_EXT_SPEC) >> $@
cat $(SRC)/glewinfo_wgl.c >> $@
$(BIN)/make_info_list.pl $(WGL_EXT_SPEC) >> $@
cat $(SRC)/glewinfo_glx.c >> $@
$(BIN)/make_info_list.pl $(GLX_CORE_SPEC) >> $@
$(BIN)/make_info_list.pl $(GLX_EXT_SPEC) >> $@
cat $(SRC)/glewinfo_egl.c >> $@
$(BIN)/make_info_list.pl $(EGL_CORE_SPEC) >> $@
$(BIN)/make_info_list.pl $(EGL_EXT_SPEC) >> $@
cat $(SRC)/glewinfo_tail.c >> $@
perl -e 's/"glColorSubTable"/"glBlendEquation", glBlendEquation == NULL);\n glewInfoFunc("glColorSubTable"/g' -pi $@
rm -f $@.bak
# Update documentation
$(D.DEST)/%.html: doc/%.html
@echo "--------------------------------------------------------------------"
@echo "Creating $(@F)"
@echo "--------------------------------------------------------------------"
cat $(SRC)/header.html $< $(SRC)/footer.html | \
perl -pe 's#<a href="$(@F)">(.*)</a>#\1#' > $@
$(D.DEST)/glew.html: $(EXT)/.dummy
@echo "--------------------------------------------------------------------"
@echo "Creating glew.html"
@echo "--------------------------------------------------------------------"
cp -f $(SRC)/header.html $@
echo -e "<h2>Supported OpenGL Extensions</h2>\n" >> $@
$(BIN)/make_html.pl $(GL_EXT_SPEC) >> $@
cat $(SRC)/footer.html >> $@
perl -i -pe 's#<a href="$(@F)">(.*)</a>#\1#' $@
$(D.DEST)/wglew.html: $(EXT)/.dummy
@echo "--------------------------------------------------------------------"
@echo "Creating wglew.html"
@echo "--------------------------------------------------------------------"
cp -f $(SRC)/header.html $@
echo -e "<h2>Supported WGL Extensions</h2>\n" >> $@
$(BIN)/make_html.pl $(WGL_EXT_SPEC) >> $@
cat $(SRC)/footer.html >> $@
perl -i -pe 's#<a href="$(@F)">(.*)</a>#\1#' $@
$(D.DEST)/glxew.html: $(EXT)/.dummy
@echo "--------------------------------------------------------------------"
@echo "Creating glxew.html"
@echo "--------------------------------------------------------------------"
cp -f $(SRC)/header.html $@
echo -e "<h2>Supported GLX Extensions</h2>\n" >> $@
$(BIN)/make_html.pl $(GLX_EXT_SPEC) >> $@
cat $(SRC)/footer.html >> $@
perl -i -pe 's#<a href="$(@F)">(.*)</a>#\1#' $@
$(B.DEST)/%.rc: src/%.rc $(EXT)/.dummy
perl -e "s/GLEW_MAJOR/$(GLEW_MAJOR)/g;s/GLEW_MINOR/$(GLEW_MINOR)/g;s/GLEW_MICRO/$(GLEW_MICRO)/g;" -p $< > $@
clean:
rm -rf $(I.TARGETS) $(S.TARGETS) $(D.TARGETS) $(B.TARGETS)
clobber: clean
rm -rf $(EXT)
destroy: clobber
rm -rf registry

View File

@ -0,0 +1,570 @@
#!/bin/bash
##
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
##
## This program is distributed under the terms and conditions of the GNU
## General Public License Version 2 as published by the Free Software
## Foundation or, at your option, any later version.
##
## Parameters:
##
## $1: Extensions directory
set -e
# fix GL_NV_texture_compression_vtc
grep -v EXT $1/GL_NV_texture_compression_vtc > tmp
mv tmp $1/GL_NV_texture_compression_vtc
# remove duplicates from GL_ARB_vertex_program and GL_ARB_fragment_program
tail -n +5 $1/GL_ARB_vertex_program > patterns
grep -v -F -f patterns $1/GL_ARB_fragment_program > tmp
mv tmp $1/GL_ARB_fragment_program
# remove duplicates from GLX_EXT_visual_rating and GLX_EXT_visual_info
tail -n +5 $1/GLX_EXT_visual_info > patterns
grep -v -F -f patterns $1/GLX_EXT_visual_rating > tmp
mv tmp $1/GLX_EXT_visual_rating
# GL_EXT_draw_buffers2 and GL_EXT_transform_feedback both define glGetBooleanIndexedvEXT but with different parameter names
grep -v glGetBooleanIndexedvEXT $1/GL_EXT_transform_feedback > tmp
mv tmp $1/GL_EXT_transform_feedback
# GL_EXT_draw_buffers2 and GL_EXT_transform_feedback both define glGetIntegerIndexedvEXT but with different parameter names
grep -v glGetIntegerIndexedvEXT $1/GL_EXT_transform_feedback > tmp
mv tmp $1/GL_EXT_transform_feedback
# remove duplicates from GL_NV_video_capture and GLX_NV_video_capture
grep -v glX $1/GL_NV_video_capture > tmp
mv tmp $1/GL_NV_video_capture
# add missing functions to GL_NV_video_capture
cat >> $1/GL_NV_video_capture <<EOT
void glGetVideoCaptureStreamivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint* params)
void glGetVideoCaptureStreamfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat* params)
void glGetVideoCaptureStreamdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble* params)
void glVideoCaptureStreamParameterivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint* params)
void glVideoCaptureStreamParameterfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat* params)
void glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble* params)
EOT
# fix WGL_NV_video_capture
cat >> $1/WGL_NV_video_capture <<EOT
DECLARE_HANDLE(HVIDEOINPUTDEVICENV);
EOT
# fix GLX_NV_video_capture
cat >> $1/GLX_NV_video_capture <<EOT
typedef XID GLXVideoCaptureDeviceNV
EOT
# remove duplicates from GL_NV_present_video and GLX_NV_present_video
tail -n +5 $1/GLX_NV_present_video > patterns
grep -v -F -f patterns $1/GL_NV_present_video > tmp
mv tmp $1/GL_NV_present_video
# fix WGL_NV_present_video
cat >> $1/WGL_NV_present_video <<EOT
DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV);
EOT
# fix WGL_NV_video_output
cat >> $1/WGL_NV_video_output <<EOT
DECLARE_HANDLE(HPVIDEODEV);
EOT
# fix GL_NV_occlusion_query and GL_HP_occlusion_test
grep -v '_HP' $1/GL_NV_occlusion_query > tmp
mv tmp $1/GL_NV_occlusion_query
perl -e's/OCCLUSION_TEST_HP.*/OCCLUSION_TEST_HP 0x8165/' -pi \
$1/GL_HP_occlusion_test
perl -e's/OCCLUSION_TEST_RESULT_HP.*/OCCLUSION_TEST_RESULT_HP 0x8166/' -pi \
$1/GL_HP_occlusion_test
# add deprecated constants to GL_ATI_fragment_shader
cat >> $1/GL_ATI_fragment_shader <<EOT
GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E
GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F
GL_NUM_PASSES_ATI 0x8970
GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971
GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972
GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973
GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974
GL_COLOR_ALPHA_PAIRING_ATI 0x8975
GL_SWIZZLE_STRQ_ATI 0x897A
GL_SWIZZLE_STRQ_DQ_ATI 0x897B
EOT
# add deprecated constants to GL_NV_texture_shader
cat >> $1/GL_NV_texture_shader <<EOT
GL_OFFSET_TEXTURE_2D_MATRIX_NV 0x86E1
GL_OFFSET_TEXTURE_2D_BIAS_NV 0x86E3
GL_OFFSET_TEXTURE_2D_SCALE_NV 0x86E2
EOT
# fix WGL_ATI_pixel_format_float
cat >> $1/WGL_ATI_pixel_format_float <<EOT
GL_RGBA_FLOAT_MODE_ATI 0x8820
GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
EOT
# fix WGL_ARB_make_current_read
cat >> $1/WGL_ARB_make_current_read <<EOT
ERROR_INVALID_PIXEL_TYPE_ARB 0x2043
ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
EOT
# fix WGL_EXT_make_current_read
cat >> $1/WGL_EXT_make_current_read <<EOT
ERROR_INVALID_PIXEL_TYPE_EXT 0x2043
EOT
# add typedefs to GL_ARB_vertex_buffer_object; (from personal communication
# with Marco Fabbricatore).
#
# Rationale. The spec says:
#
# "Both types are defined as signed integers large enough to contain
# any pointer value [...] The idea of making these types unsigned was
# considered, but was ultimately rejected ..."
cat >> $1/GL_ARB_vertex_buffer_object <<EOT
typedef ptrdiff_t GLsizeiptrARB
typedef ptrdiff_t GLintptrARB
EOT
# add typedefs to GLX_EXT_import_context
cat >> $1/GLX_EXT_import_context <<EOT
typedef XID GLXContextID
EOT
# add tokens to GLX_OML_swap_method
cat >> $1/GLX_OML_swap_method <<EOT
GLX_SWAP_EXCHANGE_OML 0x8061
GLX_SWAP_COPY_OML 0x8062
GLX_SWAP_UNDEFINED_OML 0x8063
EOT
# add typedefs to GLX_SGIX_fbconfig
cat >> $1/GLX_SGIX_fbconfig <<EOT
typedef XID GLXFBConfigIDSGIX
typedef struct __GLXFBConfigRec *GLXFBConfigSGIX
EOT
# add typedefs to GLX_SGIX_pbuffer
cat >> $1/GLX_SGIX_pbuffer <<EOT
typedef XID GLXPbufferSGIX
typedef struct { int type; unsigned long serial; Bool send_event; Display *display; GLXDrawable drawable; int event_type; int draw_type; unsigned int mask; int x, y; int width, height; int count; } GLXBufferClobberEventSGIX
EOT
# add typedef to GL_NV_half_float
cat >> $1/GL_NV_half_float <<EOT
typedef unsigned short GLhalf
EOT
# add handle to WGL_ARB_pbuffer
cat >> $1/WGL_ARB_pbuffer <<EOT
DECLARE_HANDLE(HPBUFFERARB);
EOT
# add handle to WGL_EXT_pbuffer
cat >> $1/WGL_EXT_pbuffer <<EOT
DECLARE_HANDLE(HPBUFFEREXT);
EOT
# get rid of GL_SUN_multi_draw_arrays
rm -f $1/GL_SUN_multi_draw_arrays
# change variable names in GL_ARB_vertex_shader
perl -e 's/v0/x/g' -pi $1/GL_ARB_vertex_shader
perl -e 's/v1/y/g' -pi $1/GL_ARB_vertex_shader
perl -e 's/v2/z/g' -pi $1/GL_ARB_vertex_shader
perl -e 's/v3/w/g' -pi $1/GL_ARB_vertex_shader
# remove triplicates in GL_ARB_shader_objects, GL_ARB_fragment_shader,
# and GL_ARB_vertex_shader
tail -n +5 $1/GL_ARB_shader_objects > patterns
grep -v -F -f patterns $1/GL_ARB_fragment_shader > tmp
mv tmp $1/GL_ARB_fragment_shader
grep -v -F -f patterns $1/GL_ARB_vertex_shader > tmp
mv tmp $1/GL_ARB_vertex_shader
# remove duplicates in GL_ARB_vertex_program and GL_ARB_vertex_shader
tail -n +5 $1/GL_ARB_vertex_program > patterns
grep -v -F -f patterns $1/GL_ARB_vertex_shader > tmp
mv tmp $1/GL_ARB_vertex_shader
# remove triplicates in GL_ARB_fragment_program, GL_ARB_fragment_shader,
# and GL_ARB_vertex_shader
tail -n +5 $1/GL_ARB_fragment_program > patterns
grep -v -F -f patterns $1/GL_ARB_fragment_shader > tmp
mv tmp $1/GL_ARB_fragment_shader
grep -v -F -f patterns $1/GL_ARB_vertex_shader > tmp
mv tmp $1/GL_ARB_vertex_shader
# remove duplicates in GL_EXT_direct_state_access
grep -v "glGetBooleanIndexedvEXT" $1/GL_EXT_direct_state_access > tmp
mv tmp $1/GL_EXT_direct_state_access
grep -v "glGetIntegerIndexedvEXT" $1/GL_EXT_direct_state_access > tmp
mv tmp $1/GL_EXT_direct_state_access
grep -v "glDisableIndexedEXT" $1/GL_EXT_direct_state_access > tmp
mv tmp $1/GL_EXT_direct_state_access
grep -v "glEnableIndexedEXT" $1/GL_EXT_direct_state_access > tmp
mv tmp $1/GL_EXT_direct_state_access
grep -v "glIsEnabledIndexedEXT" $1/GL_EXT_direct_state_access > tmp
mv tmp $1/GL_EXT_direct_state_access
# remove duplicates in GL_NV_explicit_multisample
grep -v "glGetBooleanIndexedvEXT" $1/GL_NV_explicit_multisample > tmp
mv tmp $1/GL_NV_explicit_multisample
grep -v "glGetIntegerIndexedvEXT" $1/GL_NV_explicit_multisample > tmp
mv tmp $1/GL_NV_explicit_multisample
# fix bugs in GL_ARB_vertex_shader
grep -v "GL_FLOAT" $1/GL_ARB_vertex_shader > tmp
mv tmp $1/GL_ARB_vertex_shader
perl -e 's/handle /GLhandleARB /g' -pi $1/GL_ARB_vertex_shader
# fix bugs in GL_ARB_shader_objects
grep -v "GL_FLOAT " $1/GL_ARB_shader_objects > tmp
mv tmp $1/GL_ARB_shader_objects
grep -v "GL_INT " $1/GL_ARB_shader_objects > tmp
mv tmp $1/GL_ARB_shader_objects
# add typedefs to GL_ARB_shader_objects
cat >> $1/GL_ARB_shader_objects <<EOT
typedef char GLcharARB
typedef unsigned int GLhandleARB
EOT
# add missing functions to GL_ARB_transpose_matrix
cat >> $1/GL_ARB_transpose_matrix <<EOT
void glLoadTransposeMatrixfARB (GLfloat m[16])
void glLoadTransposeMatrixdARB (GLdouble m[16])
void glMultTransposeMatrixfARB (GLfloat m[16])
void glMultTransposeMatrixdARB (GLdouble m[16])
EOT
# add missing tokens to GL_EXT_framebuffer_multisample
cat >> $1/GL_EXT_framebuffer_multisample <<EOT
GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
GL_MAX_SAMPLES_EXT 0x8D57
EOT
# Filter out GL_NV_gpu_program_fp64 enums and functions
head -n4 $1/GL_NV_gpu_program_fp64 > tmp
mv tmp $1/GL_NV_gpu_program_fp64
# Filter glGetUniformui64vNV from GL_NV_shader_buffer_load
grep -v "glGetUniformui64vNV" $1/GL_NV_shader_buffer_load > tmp
mv tmp $1/GL_NV_shader_buffer_load
# Filter out profile enumerations from GLX_ARB_create_context
grep -v "_PROFILE_" $1/GLX_ARB_create_context > tmp
mv tmp $1/GLX_ARB_create_context
# Filter only profile related enumerations for GLX_ARB_create_context_profile
head -n4 $1/GLX_ARB_create_context_profile > tmp
grep "_PROFILE_" $1/GLX_ARB_create_context_profile >> tmp
mv tmp $1/GLX_ARB_create_context_profile
# Filter out profile enumerations from WGL_ARB_create_context
grep -v "_PROFILE_" $1/WGL_ARB_create_context > tmp
mv tmp $1/WGL_ARB_create_context
# Filter only profile related enumerations for WGL_ARB_create_context_profile
head -n4 $1/WGL_ARB_create_context_profile > tmp
grep "_PROFILE_" $1/WGL_ARB_create_context_profile >> tmp
mv tmp $1/WGL_ARB_create_context_profile
# add missing function to GLX_NV_copy_image
cat >> $1/GLX_NV_copy_image <<EOT
void glXCopyImageSubDataNV (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth)
EOT
# add missing function to WGL_NV_copy_image
cat >> $1/WGL_NV_copy_image <<EOT
BOOL wglCopyImageSubDataNV (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth)
EOT
# Filter glProgramParameteri from GL_ARB_separate_shader_objects
# grep -v "glProgramParameteri" $1/GL_ARB_separate_shader_objects > tmp
# mv tmp $1/GL_ARB_separate_shader_objects
# Filter out EXT functions from GL_ARB_viewport_array
grep -v "EXT" $1/GL_ARB_viewport_array > tmp
mv tmp $1/GL_ARB_viewport_array
# Additional enumerations for GL_NV_vertex_buffer_unified_memory
# These are mentioned in GL_ARB_draw_indirect.txt
cat >> $1/GL_NV_vertex_buffer_unified_memory <<EOT
GL_DRAW_INDIRECT_UNIFIED_NV 0x8F40
GL_DRAW_INDIRECT_ADDRESS_NV 0x8F41
GL_DRAW_INDIRECT_LENGTH_NV 0x8F42
EOT
# Filter glGetPointerv from GL_ARB_debug_output
# It's part of OpenGL 1.1, after all
grep -v "glGetPointerv" $1/GL_ARB_debug_output > tmp
mv tmp $1/GL_ARB_debug_output
# Filter glGetPointerv from GL_EXT_vertex_array
# It's part of OpenGL 1.1, after all
grep -v "glGetPointerv" $1/GL_EXT_vertex_array > tmp
mv tmp $1/GL_EXT_vertex_array
# add typedef to GL_AMD_debug_output
# parse_spec.pl can't parse typedefs from New Types section, but ought to
cat >> $1/GL_AMD_debug_output <<EOT
typedef void (GLAPIENTRY *GLDEBUGPROCAMD)(GLuint id, GLenum category, GLenum severity, GLsizei length, const GLchar* message, void* userParam)
EOT
# add typedef to GL_ARB_debug_output
# parse_spec.pl can't parse typedefs from New Types section, but ought to
cat >> $1/GL_ARB_debug_output <<EOT
typedef void (GLAPIENTRY *GLDEBUGPROCARB)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam)
EOT
# add typedef to GL_KHR_debug
# parse_spec.pl can't parse typedefs from New Types section, but ought to
cat >> $1/GL_KHR_debug <<EOT
typedef void (GLAPIENTRY *GLDEBUGPROC)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam)
EOT
# Remove glGetPointerv from GL_KHR_debug
grep -v "glGetPointerv" $1/GL_KHR_debug > tmp
mv tmp $1/GL_KHR_debug
# Remove GL_ARB_debug_group, GL_ARB_debug_label and GL_ARB_debug_output2, for now
rm -f $1/GL_ARB_debug_group
rm -f $1/GL_ARB_debug_label
rm -f $1/GL_ARB_debug_output2
# add typedefs to GL_ARB_cl_event
# parse_spec.pl can't parse typedefs from New Types section, but ought to
cat >> $1/GL_ARB_cl_event <<EOT
typedef struct _cl_context *cl_context
typedef struct _cl_event *cl_event
EOT
# Filter out EXT functions from GL_ARB_gpu_shader_fp64
grep -v 'EXT ' $1/GL_ARB_gpu_shader_fp64 > tmp
mv tmp $1/GL_ARB_gpu_shader_fp64
# add missing functions to GL_EXT_direct_state_access (GL_ARB_gpu_shader_fp64 related)
cat >> $1/GL_EXT_direct_state_access <<EOT
void glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x)
void glProgramUniform2dEXT (GLuint program, GLint location, GLdouble x, GLdouble y)
void glProgramUniform3dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z)
void glProgramUniform4dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
void glProgramUniform1dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value)
void glProgramUniform2dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value)
void glProgramUniform3dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value)
void glProgramUniform4dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value)
void glProgramUniformMatrix2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
void glProgramUniformMatrix3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
void glProgramUniformMatrix4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
void glProgramUniformMatrix2x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
void glProgramUniformMatrix2x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
void glProgramUniformMatrix3x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
void glProgramUniformMatrix3x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
void glProgramUniformMatrix4x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
void glProgramUniformMatrix4x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
EOT
# add missing functions to GL_EXT_direct_state_access (GL_ARB_instanced_arrays related)
# https://sourceforge.net/p/glew/bugs/242/
cat >> $1/GL_EXT_direct_state_access <<EOT
void glVertexArrayVertexAttribDivisorEXT (GLuint vaobj, GLuint index, GLuint divisor)
EOT
# Filter out GL_UNSIGNED_INT and GL_FLOAT from GL_AMD_performance_monitor
grep -v 'GL_UNSIGNED_INT ' $1/GL_AMD_performance_monitor > tmp
mv tmp $1/GL_AMD_performance_monitor
grep -v 'GL_FLOAT ' $1/GL_AMD_performance_monitor > tmp
mv tmp $1/GL_AMD_performance_monitor
# Filter out GL_STORAGE_CACHED_APPLE and GL_STORAGE_SHARED_APPLE from GL_APPLE_texture_range
grep -v 'GL_STORAGE_CACHED_APPLE ' $1/GL_APPLE_texture_range > tmp
mv tmp $1/GL_APPLE_texture_range
grep -v 'GL_STORAGE_SHARED_APPLE ' $1/GL_APPLE_texture_range > tmp
mv tmp $1/GL_APPLE_texture_range
# Filter out GL_RED from GL_ARB_texture_rg
grep -v 'GL_RED ' $1/GL_ARB_texture_rg > tmp
mv tmp $1/GL_ARB_texture_rg
# Filter out _EXT enums from GL_ARB_texture_storage
grep -v '_EXT ' $1/GL_ARB_texture_storage > tmp
mv tmp $1/GL_ARB_texture_storage
# Filter out TEXTURE_3D enums from GL_EXT_paletted_texture
grep -v 'TEXTURE_3D' $1/GL_EXT_paletted_texture > tmp
mv tmp $1/GL_EXT_paletted_texture
# Filter out GL_VERSION_1_1 enums from GL_AMD_stencil_operation_extended
grep -v '0x150' $1/GL_AMD_stencil_operation_extended > tmp
mv tmp $1/GL_AMD_stencil_operation_extended
# Filter out from GL_APPLE_ycbcr_422
grep -v 'GL_UNSIGNED_SHORT_8_8_APPLE' $1/GL_APPLE_ycbcr_422 > tmp
mv tmp $1/GL_APPLE_ycbcr_422
grep -v 'GL_UNSIGNED_SHORT_8_8_REV_APPLE' $1/GL_APPLE_ycbcr_422 > tmp
mv tmp $1/GL_APPLE_ycbcr_422
# Filter out GL_FRAGMENT_DEPTH_EXT from GL_EXT_light_texture
grep -v 'GL_FRAGMENT_DEPTH_EXT' $1/GL_EXT_light_texture > tmp
mv tmp $1/GL_EXT_light_texture
# Filter out GL_MULTISAMPLE_BIT_EXT from GL_SGIS_multisample
grep -v 'GL_MULTISAMPLE_BIT_EXT' $1/GL_SGIS_multisample > tmp
mv tmp $1/GL_SGIS_multisample
# Filter out GL_COMPRESSED_RGB_S3TC_DXT1_EXT from GL_EXT_texture_compression_dxt1
grep -v 'GL_COMPRESSED_RGB_S3TC_DXT1_EXT' $1/GL_EXT_texture_compression_dxt1 > tmp
mv tmp $1/GL_EXT_texture_compression_dxt1
# Filter out GL_COMPRESSED_RGBA_S3TC_DXT1_EXT from GL_EXT_texture_compression_dxt1
grep -v 'GL_COMPRESSED_RGBA_S3TC_DXT1_EXT' $1/GL_EXT_texture_compression_dxt1 > tmp
mv tmp $1/GL_EXT_texture_compression_dxt1
# Append GLfixed to GL_ARB_ES2_compatibility
# Probably ought to be explicitly mentioned in the spec language
cat >> $1/GL_ARB_ES2_compatibility <<EOT
typedef int GLfixed
EOT
# Append GLclampx to GL_REGAL_ES1_0_compatibility
# Probably ought to be explicitly mentioned in the spec language
cat >> $1/GL_REGAL_ES1_0_compatibility <<EOT
typedef int GLclampx
EOT
# Append GLLOGPROCREGAL to GL_REGAL_log
# Probably ought to be explicitly mentioned in the spec language
cat >> $1/GL_REGAL_log <<EOT
typedef void (APIENTRY *LOGPROCREGAL)(GLenum stream, GLsizei length, const GLchar *message, void *context)
EOT
# Fixup LOGPROCREGAL -> GLLOGPROCREGAL
perl -e 's/LOGPROCREGAL/GLLOGPROCREGAL/g' -pi $1/GL_REGAL_log
# Filter out GL_BYTE from GL_OES_byte_coordinates
grep -v 'GL_BYTE' $1/GL_OES_byte_coordinates > tmp
mv tmp $1/GL_OES_byte_coordinates
# Filter out fp64 (not widely supported) from GL_EXT_direct_state_access
egrep -v 'glProgramUniform.*[1234]d[v]?EXT' $1/GL_EXT_direct_state_access > tmp
mv tmp $1/GL_EXT_direct_state_access
# Filter out all enums from GL_ANGLE_depth_texture
grep -v '0x' $1/GL_ANGLE_depth_texture > tmp
mv tmp $1/GL_ANGLE_depth_texture
# Filter out GL_NONE enum from GL_ANGLE_depth_texture
grep -v 'GL_NONE' $1/GL_ANGLE_texture_usage > tmp
mv tmp $1/GL_ANGLE_texture_usage
# Fixup REGAL and ANGLE urls
for i in $1/GL_REGAL_*; do perl -e 's#http://www.opengl.org/registry/specs/REGAL/.*#https://github.com/p3/regal/tree/master/doc/extensions#g' -pi $i; done
for i in $1/GL_ANGLE_*; do perl -e 's#http://www.opengl.org/registry/specs/ANGLE/.*#https://code.google.com/p/angleproject/source/browse/\#git%2Fextensions#g' -pi $i; done
# Filter out GL_NV_blend_equation_advanced_coherent enums and functions
head -n4 $1/GL_NV_blend_equation_advanced_coherent > tmp
mv tmp $1/GL_NV_blend_equation_advanced_coherent
# Filter out GL_AMD_gpu_shader_int64 enums and functions
head -n4 $1/GL_AMD_gpu_shader_int64 > tmp
mv tmp $1/GL_AMD_gpu_shader_int64
# Filter out GL_NO_ERROR enum from GL_KHR_robustness
grep -v 'GL_NO_ERROR' $1/GL_KHR_robustness > tmp
mv tmp $1/GL_KHR_robustness
# Filter out all enums from GL_KHR_blend_equation_advanced_coherent
grep -v '0x' $1/GL_KHR_blend_equation_advanced_coherent > tmp
mv tmp $1/GL_KHR_blend_equation_advanced_coherent
# Filter out glBlendBarrierKHR enum from GL_KHR_blend_equation_advanced_coherent
grep -v 'glBlendBarrierKHR' $1/GL_KHR_blend_equation_advanced_coherent > tmp
mv tmp $1/GL_KHR_blend_equation_advanced_coherent
# Filter out GL_NONE enum from GL_KHR_context_flush_control
grep -v 'GL_NONE' $1/GL_KHR_context_flush_control > tmp
mv tmp $1/GL_KHR_context_flush_control
# Filter out GL_NONE enum from GL_EGL_KHR_context_flush_control
grep -v 'GL_NONE' $1/GL_EGL_KHR_context_flush_control > tmp
mv tmp $1/GL_EGL_KHR_context_flush_control
# Filter out CoverageModulation from NV_framebuffer_mixed_samples
# Superset of EXT_raster_multisample
grep -v "CoverageModulation" $1/GL_NV_framebuffer_mixed_samples > tmp
mv tmp $1/GL_NV_framebuffer_mixed_samples
# Filter out glRasterSamplesEXT from NV_framebuffer_mixed_samples
# Superset of EXT_raster_multisample
grep -v "RasterSamplesEXT" $1/GL_NV_framebuffer_mixed_samples > tmp
mv tmp $1/GL_NV_framebuffer_mixed_samples
# Filter out glNamedBufferStorageEXT from GL_ARB_buffer_storage
grep -v "glNamedBufferStorageEXT" $1/GL_ARB_buffer_storage > tmp
mv tmp $1/GL_ARB_buffer_storage
# Filter out glFramebufferTextureEXT from GL_EXT_geometry_point_size
# and GL_EXT_geometry_shader
grep -v "glFramebufferTextureEXT" $1/GL_EXT_geometry_point_size > tmp
mv tmp $1/GL_EXT_geometry_point_size
grep -v "glFramebufferTextureEXT" $1/GL_EXT_geometry_shader > tmp
mv tmp $1/GL_EXT_geometry_shader
# Filter out glBindFragDataLocationEXT from GL_EXT_blend_func_extended
grep -v "glBindFragDataLocationEXT" $1/GL_EXT_blend_func_extended > tmp
mv tmp $1/GL_EXT_blend_func_extended
# Filter out glDrawArraysInstancedEXT and glDrawElementsInstancedEXT from GL_EXT_blend_func_extended
grep -v "glDrawArraysInstancedEXT" $1/GL_EXT_instanced_arrays > tmp
mv tmp $1/GL_EXT_instanced_arrays
grep -v "glDrawElementsInstancedEXT" $1/GL_EXT_instanced_arrays > tmp
mv tmp $1/GL_EXT_instanced_arrays
# Filter out glRenderbufferStorageMultisampleEXT from GL_EXT_multisampled_render_to_texture
grep -v "glRenderbufferStorageMultisampleEXT" $1/GL_EXT_multisampled_render_to_texture > tmp
mv tmp $1/GL_EXT_multisampled_render_to_texture
# Filter out glTexturePageCommitmentEXT from GL_ARB_sparse_texture
grep -v "glTexturePageCommitmentEXT" $1/GL_ARB_sparse_texture > tmp
mv tmp $1/GL_ARB_sparse_texture
# Filter out TextureStorage* from GL_ARB_texture_storage
grep -v "TextureStorage" $1/GL_ARB_texture_storage > tmp
mv tmp $1/GL_ARB_texture_storage
# Append GLVULKANPROCNV to GL_NV_draw_vulkan_image
# Probably ought to be explicitly mentioned in the spec language
cat >> $1/GL_NV_draw_vulkan_image <<EOT
typedef void (APIENTRY *GLVULKANPROCNV)(void)
EOT
# clean up
rm -f patterns $1/*.bak

View File

@ -0,0 +1,19 @@
#!/bin/bash
##
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
##
## This program is distributed under the terms and conditions of the GNU
## General Public License Version 2 as published by the Free Software
## Foundation or, at your option, any later version.
##
## Parameters:
##
## $1: Extensions directory
## $2: Registry directory
## $3: The black list
set -e
# clean up
rm -f $1/*.bak

View File

@ -0,0 +1,38 @@
#!/usr/bin/python
import re
section = re.compile('^(Name|Name Strings?|Contact|Notice|Number|Dependencies|Overview|Issues|IP Status|Status|Version|New Procedures and Functions|New Tokens|Additions to .*|Changes to .*|Modifications to .*|Add new Section .*)\s*$')
token = re.compile('^\s+(([A-Z0-9][A-Z0-9_x]*):?\s+((?:0x)?[0-9A-F]+)([^\?]*))?\s*$')
match = [ 'Name', 'Name String', 'Contact', 'Notice', 'Name Strings', 'Version', 'Number', 'Dependencies', 'New Procedures and Functions', 'New Tokens']
if __name__ == '__main__':
from optparse import OptionParser
import os
parser = OptionParser('usage: %prog [options] [SOURCES...]')
(options, args) = parser.parse_args()
for i in args:
lines = open(i).readlines()
f = open(i,'w')
# Keep track of the current section as we iterate over the input
current = ''
for j in lines:
# Detect the start of a new section
m = section.match(j)
if m:
current = m.group(1).strip()
if current in match:
print >>f, j,
continue
if current=='New Tokens':
if token.match(j):
print >>f, j,
elif current in match:
print >>f, j,

View File

@ -0,0 +1,223 @@
##
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
##
## This program is distributed under the terms and conditions of the GNU
## General Public License Version 2 as published by the Free Software
## Foundation or, at your option, any later version.
my %regex = (
extname => qr/^[A-Z][A-Za-z0-9_]+$/,
exturl => qr/^http.+$/,
function => qr/^(.+) ([a-z][a-z0-9_]*) \((.+)\)$/i,
token => qr/^([A-Z][A-Z0-9_x]*)\s+((?:0x)?[0-9A-Fa-f]+(u(ll)?)?|[A-Z][A-Z0-9_]*)$/,
type => qr/^typedef\s+(.+)$/,
exact => qr/.*;$/,
);
# prefix function name with glew
sub prefixname($)
{
my $name = $_[0];
$name =~ s/^(.*?)gl/__$1glew/;
return $name;
}
# prefix function name with glew
sub prefix_varname($)
{
my $name = $_[0];
$name =~ s/^(.*?)GL(X*?)EW/__$1GL$2EW/;
return $name;
}
#---------------------------------------------------------------------------------------
sub make_exact($)
{
my $exact = $_[0];
$exact =~ s/(; |{)/$1\n/g;
return $exact;
}
sub make_separator($)
{
my $extname = $_[0];
my $l = length $extname;
my $s = (71 - $l)/2;
print "/* ";
my $j = 3;
for (my $i = 0; $i < $s; $i++)
{
print "-";
$j++;
}
print " $_[0] ";
$j += $l + 2;
while ($j < 76)
{
print "-";
$j++;
}
print " */\n\n";
}
#---------------------------------------------------------------------------------------
sub parse_ext($)
{
my $filename = shift;
my %functions = ();
my %tokens = ();
my @reuse = (); # Extensions to reuse
my @types = ();
my @exacts = ();
my $extname = ""; # Full extension name GL_FOO_extension
my $exturl = ""; # Info URL
my $extstring = ""; # Relevant extension string
open EXT, "<$filename" or return;
# As of GLEW 1.14.0 the first four lines _must_ be
# the extension name, the URL and the GL extension
# string (which might be different to the name),
# and the reused extensions
#
# For example GL_NV_geometry_program4 is available
# iff GL_NV_gpu_program4 appears in the extension
# string.
#
# For core OpenGL versions, the third line should
# be blank.
#
# If the URL is unknown, the second line should be
# blank.
$extname = readline(*EXT);
$exturl = readline(*EXT);
$extstring = readline(*EXT);
@reuse = split(" ", readline(*EXT));
chomp($extname);
chomp($exturl);
chomp($extstring);
while(<EXT>)
{
chomp;
if (s/^\s+//)
{
if (/$regex{exact}/)
{
push @exacts, $_;
}
elsif (/$regex{type}/)
{
push @types, $_;
}
elsif (/$regex{token}/)
{
my ($name, $value) = ($1, $2);
$tokens{$name} = $value;
}
elsif (/$regex{function}/)
{
my ($return, $name, $parms) = ($1, $2, $3);
$functions{$name} = {
rtype => $return,
parms => $parms,
};
} else {
print STDERR "'$_' matched no regex.\n";
}
}
}
close EXT;
return ($extname, $exturl, $extstring, \@reuse, \@types, \%tokens, \%functions, \@exacts);
}
sub output_tokens($$)
{
my ($tbl, $fnc) = @_;
if (keys %{$tbl})
{
local $, = "\n";
print "\n";
print map { &{$fnc}($_, $tbl->{$_}) } sort {
if (${$tbl}{$a} eq ${$tbl}{$b}) {
$a cmp $b
} else {
if (${$tbl}{$a} =~ /_/) {
if (${$tbl}{$b} =~ /_/) {
$a cmp $b
} else {
-1
}
} else {
if (${$tbl}{$b} =~ /_/) {
1
} else {
if (hex ${$tbl}{$a} eq hex ${$tbl}{$b}) {
$a cmp $b
} else {
hex ${$tbl}{$a} <=> hex ${$tbl}{$b}
}
}
}
}
} keys %{$tbl};
print "\n";
} else {
print STDERR "no keys in table!\n";
}
}
sub output_types($$)
{
my ($tbl, $fnc) = @_;
if (scalar @{$tbl})
{
local $, = "\n";
print "\n";
print map { &{$fnc}($_) } sort @{$tbl};
print "\n";
}
}
sub output_decls($$)
{
my ($tbl, $fnc) = @_;
if (keys %{$tbl})
{
local $, = "\n";
print "\n";
print map { &{$fnc}($_, $tbl->{$_}) } sort keys %{$tbl};
print "\n";
}
}
sub output_exacts($$)
{
my ($tbl, $fnc) = @_;
if (scalar @{$tbl})
{
local $, = "\n";
print "\n";
print map { &{$fnc}($_) } sort @{$tbl};
print "\n";
}
}
sub output_reuse($$)
{
my ($tbl, $fnc) = @_;
if (scalar @{$tbl})
{
local $, = "\n";
print "\n";
print map { &{$fnc}($_) } sort @{$tbl};
print "\n";
}
}

View File

@ -0,0 +1,36 @@
#!/usr/bin/perl
##
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
##
## This program is distributed under the terms and conditions of the GNU
## General Public License Version 2 as published by the Free Software
## Foundation or, at your option, any later version.
use strict;
use warnings;
use lib '.';
do 'bin/make.pl';
# function pointer declaration
sub make_pfn_decl($%)
{
return "PFN" . (uc $_[0]) . "PROC " . prefixname($_[0]) . " = NULL;";
}
my @extlist = ();
my %extensions = ();
our $type = shift;
if (@ARGV)
{
@extlist = @ARGV;
foreach my $ext (sort @extlist)
{
my ($extname, $exturl, $extstring, $reuse, $types, $tokens, $functions, $exacts) = parse_ext($ext);
output_decls($functions, \&make_pfn_decl);
}
}

View File

@ -0,0 +1,32 @@
#!/usr/bin/perl
##
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
##
## This program is distributed under the terms and conditions of the GNU
## General Public License Version 2 as published by the Free Software
## Foundation or, at your option, any later version.
use strict;
use warnings;
use lib '.';
do 'bin/make.pl';
my @extlist = ();
my %extensions = ();
our $type = shift;
if (@ARGV)
{
@extlist = @ARGV;
foreach my $ext (sort @extlist)
{
my ($extname, $exturl, $extstring, $reuse, $types, $tokens, $functions, $exacts) = parse_ext($ext);
my $extvar = $extname;
$extvar =~ s/GL(X*)_/GL$1EW_/;
print "GLboolean " . prefix_varname($extvar) . " = GL_FALSE;\n";
}
}

View File

@ -0,0 +1,46 @@
#!/usr/bin/perl
##
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
##
## This program is distributed under the terms and conditions of the GNU
## General Public License Version 2 as published by the Free Software
## Foundation or, at your option, any later version.
use strict;
use warnings;
use lib '.';
do 'bin/make.pl';
##
## Make Extension-enabled Index
##
my @extlist = ();
if (@ARGV)
{
@extlist = @ARGV;
print "/* Detected in the extension string or strings */\n";
print "static GLboolean _glewExtensionString[" . scalar @extlist . "];\n";
print "/* Detected via extension string or experimental mode */\n";
print "static GLboolean* _glewExtensionEnabled[] = {\n";;
foreach my $ext (sort @extlist)
{
my ($extname, $exturl, $extstring, $reuse, $types, $tokens, $functions, $exacts) =
parse_ext($ext);
my $extvar = $extname;
$extvar =~ s/GL(X*)_/GL$1EW_/;
print "#ifdef $extname\n";
print " &__$extvar,\n";
print "#endif\n";
}
print " NULL\n};\n";
}

View File

@ -0,0 +1,72 @@
#!/usr/bin/perl
##
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
##
## This program is distributed under the terms and conditions of the GNU
## General Public License Version 2 as published by the Free Software
## Foundation or, at your option, any later version.
use strict;
use warnings;
use lib '.';
do 'bin/make.pl';
# token
sub make_define($$)
{
return "#define $_[0] $_[1]"
}
# type declaration
sub make_type($$)
{
return "@_;"
}
# function pointer type declaration
sub make_pfn_type($%)
{
our $api;
return join(' ', "typedef", $_[1]->{rtype},
"($api * PFN" . (uc $_[0]) . "PROC)",
"(" . $_[1]->{parms} . ")") . ";";
}
# function name alias
sub make_pfn_alias($%)
{
our $type;
return join(" ", "#define", $_[0], $type . "EW_GET_FUN(" . prefixname($_[0]) . ")")
}
my @extlist = ();
my %extensions = ();
our $api = shift;
our $type = shift;
if (@ARGV)
{
@extlist = @ARGV;
foreach my $ext (sort @extlist)
{
my ($extname, $exturl, $extstring, $reuse, $types, $tokens, $functions, $exacts) = parse_ext($ext);
make_separator($extname);
print "#ifndef $extname\n#define $extname 1\n";
output_tokens($tokens, \&make_define);
output_types($types, \&make_type);
output_exacts($exacts, \&make_exact);
output_decls($functions, \&make_pfn_type);
output_decls($functions, \&make_pfn_alias);
my $extvar = $extname;
$extvar =~ s/GL(X*)_/GL$1EW_/;
print "\n#define $extvar " . $type . "EW_GET_VAR(" . prefix_varname($extvar) . ")\n";
print "\n#endif /* $extname */\n\n";
}
}

View File

@ -0,0 +1,56 @@
#!/usr/bin/perl
##
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
##
## This program is distributed under the terms and conditions of the GNU
## General Public License Version 2 as published by the Free Software
## Foundation or, at your option, any later version.
use strict;
use warnings;
use lib '.';
do 'bin/make.pl';
#---------------------------------------------------------------------------------------
my @extlist = ();
my %extensions = ();
my $group = "";
my $cur_group = "";
if (@ARGV)
{
@extlist = @ARGV;
my $n = 1;
print "<table border=\"0\" width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" align=\"center\">\n";
foreach my $ext (sort @extlist)
{
my ($extname, $exturl, $extstring, $reuse, $types, $tokens, $functions, $exacts) = parse_ext($ext);
$cur_group = $extname;
$cur_group =~ s/^(?:W?)GL(?:X?)_([A-Z0-9]+?)_.*$/$1/;
$extname =~ s/^(?:W?)GL(?:X?)_(.*)$/$1/;
if ($cur_group ne $group)
{
if ($group ne "")
{
print "<tr><td><br></td><td></td><td></td></tr>\n";
}
$group = $cur_group;
}
{
if ($exturl)
{
print "<tr><td class=\"num\">$n</td><td>&nbsp;</td><td><a href=\"$exturl\">$extname</a></td></tr>\n";
}
else
{
print "<tr><td class=\"num\">$n</td><td>&nbsp;</td><td>$extname</td></tr>\n";
}
$n++;
}
}
print "</table>\n"
}

View File

@ -0,0 +1,39 @@
#!/usr/bin/perl
##
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
##
## This program is distributed under the terms and conditions of the GNU
## General Public License Version 2 as published by the Free Software
## Foundation or, at your option, any later version.
use strict;
use warnings;
use lib '.';
do 'bin/make.pl';
##
## Make Index
##
## Output sorted array of extension strings for indexing into extension
## enable/disable flags. This provides a way to convert an extension string
## into an integer index.
##
my @extlist = ();
if (@ARGV)
{
@extlist = @ARGV;
foreach my $ext (sort @extlist)
{
my ($extname, $exturl, $extstring, $reuse, $types, $tokens, $functions, $exacts) =
parse_ext($ext);
print "#ifdef $extname\n";
print " \"$extname\",\n";
print "#endif\n";
}
}

View File

@ -0,0 +1,60 @@
#!/usr/bin/perl
##
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
##
## This program is distributed under the terms and conditions of the GNU
## General Public License Version 2 as published by the Free Software
## Foundation or, at your option, any later version.
use strict;
use warnings;
use lib '.';
do 'bin/make.pl';
#---------------------------------------------------------------------------------------
# function pointer definition
sub make_pfn_info($%)
{
my $name = $_[0];
return " glewInfoFunc(\"$_[0]\", $name == NULL);";
}
#---------------------------------------------------------------------------------------
my @extlist = ();
my %extensions = ();
if (@ARGV)
{
@extlist = @ARGV;
foreach my $ext (sort @extlist)
{
my ($extname, $exturl, $extstring, $reuse, $types, $tokens, $functions, $exacts) = parse_ext($ext);
my $extvar = $extname;
$extvar =~ s/GL(X*)_/GL$1EW_/;
my $extpre = $extname;
$extpre =~ s/(GLX|GLW|GL).*/$1/;
$extpre = lc $extpre;
#make_separator($extname);
print "#ifdef $extname\n\n";
print "static void _glewInfo_$extname (void)\n{\n";
if ($extvar =~ /VERSION/)
{
print " glewPrintExt(\"$extname\", $extvar, $extvar, $extvar);\n";
}
else
{
print " glewPrintExt(\"$extname\", $extvar, $extpre" .
"ewIsSupported(\"$extname\"), $extpre" .
"ewGetExtension(\"$extstring\"));\n";
}
output_decls($functions, \&make_pfn_info);
print "}\n\n";
print "#endif /* $extname */\n\n";
}
}

View File

@ -0,0 +1,48 @@
#!/usr/bin/perl
##
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
##
## This program is distributed under the terms and conditions of the GNU
## General Public License Version 2 as published by the Free Software
## Foundation or, at your option, any later version.
use strict;
use warnings;
use lib '.';
do 'bin/make.pl';
#---------------------------------------------------------------------------------------
# function pointer definition
sub make_pfn_def($%)
{
return "PFN" . (uc $_[0]) . "PROC " . prefixname($_[0]) . " = NULL;";
}
# function pointer definition
sub make_init_call($%)
{
my $name = prefixname($_[0]);
return " r = r || (" . $name . " = (PFN" . (uc $_[0]) . "PROC)glewGetProcAddress((const GLubyte*)\"" . $name . "\")) == NULL;";
}
#---------------------------------------------------------------------------------------
my @extlist = ();
my %extensions = ();
if (@ARGV)
{
@extlist = @ARGV;
foreach my $ext (sort @extlist)
{
my ($extname, $exturl, $extstring, $reuse, $types, $tokens, $functions, $exacts) = parse_ext($ext);
print "#ifdef $extname\n";
print " _glewInfo_$extname();\n";
print "#endif /* $extname */\n";
}
}

View File

@ -0,0 +1,60 @@
#!/usr/bin/perl
##
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
##
## This program is distributed under the terms and conditions of the GNU
## General Public License Version 2 as published by the Free Software
## Foundation or, at your option, any later version.
use strict;
use warnings;
use lib '.';
do 'bin/make.pl';
#-------------------------------------------------------------------------------
# function pointer definition
sub make_pfn_def_init($%)
{
#my $name = prefixname($_[0]);
return " r = ((" . $_[0] . " = (PFN" . (uc $_[0]) . "PROC)glewGetProcAddress((const GLubyte*)\"" . $_[0] . "\")) == NULL) || r;";
}
sub make_reuse_call($%)
{
return " r = _glewInit_" . $_[0] . "() || r;";
}
#-------------------------------------------------------------------------------
my @extlist = ();
my %extensions = ();
our $type = shift;
if (@ARGV)
{
@extlist = @ARGV;
foreach my $ext (sort @extlist)
{
my ($extname, $exturl, $extstring, $reuse, $types, $tokens, $functions, $exacts) =
parse_ext($ext);
#make_separator($extname);
my $extvar = $extname;
my $extvardef = $extname;
$extvar =~ s/GL(X*)_/GL$1EW_/;
if (keys %$functions or keys @$reuse)
{
print "#ifdef $extname\n\n";
print "static GLboolean _glewInit_$extname ()\n{\n GLboolean r = GL_FALSE;\n";
output_reuse($reuse, \&make_reuse_call);
output_decls($functions, \&make_pfn_def_init);
print "\n return r;\n}\n\n";
print "#endif /* $extname */\n\n";
}
}
}

View File

@ -0,0 +1,44 @@
#!/usr/bin/perl
##
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
##
## This program is distributed under the terms and conditions of the GNU
## General Public License Version 2 as published by the Free Software
## Foundation or, at your option, any later version.
use strict;
use warnings;
use lib '.';
do 'bin/make.pl';
## Output declarations for the _glewInit_[extension] functions defined
## by make_init.pl script. These are necessary for for initializers to
## call each other, such as a core GL 3 context that depends on certain
## extensions.
#-------------------------------------------------------------------------------
my @extlist = ();
my %extensions = ();
our $type = shift;
if (@ARGV)
{
@extlist = @ARGV;
foreach my $ext (sort @extlist)
{
my ($extname, $exturl, $extstring, $reuse, $types, $tokens, $functions, $exacts) =
parse_ext($ext);
#print "#ifdef $extname\n\n";
if (keys %$functions)
{
print "static GLboolean _glewInit_$extname ();\n";
}
#print "#endif /* $extname */\n\n";
}
}

View File

@ -0,0 +1,74 @@
#!/usr/bin/perl
##
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
##
## This program is distributed under the terms and conditions of the GNU
## General Public License Version 2 as published by the Free Software
## Foundation or, at your option, any later version.
use strict;
use warnings;
use lib '.';
do 'bin/make.pl';
#---------------------------------------------------------------------------------------
# function pointer definition
sub make_init_call($%)
{
my $name = prefixname($_[0]);
return " r = r || (" . $_[0] . " = (PFN" . (uc $_[0]) . "PROC)glewGetProcAddress(\"" . $name . "\")) == NULL;";
}
#---------------------------------------------------------------------------------------
my @extlist = ();
my %extensions = ();
if (@ARGV)
{
@extlist = @ARGV;
foreach my $ext (sort @extlist)
{
my ($extname, $exturl, $extstring, $reuse, $types, $tokens, $functions, $exacts) = parse_ext($ext);
my $extvar = $extname;
$extvar =~ s/GL(X*)_/GL$1EW_/;
my $extpre = $extname;
$extpre =~ s/^(W?E?)GL(X?).*$/\l$1gl\l$2ew/;
#my $pextvar = prefix_varname($extvar);
if (length($extstring) && $extstring !~ /^GL_/ || keys %$functions)
{
print "#ifdef $extname\n";
}
if (length($extstring) && $extstring !~ /^GL_/)
{
print " " . $extvar . " = _glewSearchExtension(\"$extstring\", extStart, extEnd);\n";
}
if (keys %$functions)
{
if ($extname =~ /WGL_.*/)
{
print " if (glewExperimental || " . $extvar . "|| crippled) " . $extvar . "= !_glewInit_$extname();\n";
}
else
{
print " if (glewExperimental || " . $extvar . ") " . $extvar . " = !_glewInit_$extname();\n";
}
}
if (length($extstring) && $extstring !~ /^GL_/ || keys %$functions)
{
print "#endif /* $extname */\n";
}
}
}

View File

@ -0,0 +1,45 @@
#!/usr/bin/perl
##
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
##
## This program is distributed under the terms and conditions of the GNU
## General Public License Version 2 as published by the Free Software
## Foundation or, at your option, any later version.
use strict;
use warnings;
use lib '.';
do 'bin/make.pl';
#---------------------------------------------------------------------------------------
# Extensions that depend on others can be enabled once we know
# if the one it depends on, is enabled.
my @extlist = ();
my %extensions = ();
if (@ARGV)
{
@extlist = @ARGV;
foreach my $ext (sort @extlist)
{
my ($extname, $exturl, $extstring, $reuse, $types, $tokens, $functions, $exacts) = parse_ext($ext);
if ($extname ne $extstring && length($extstring))
{
my $extvar = $extname;
$extvar =~ s/GL(X*)_/GL$1EW_/;
my $parent = $extstring;
$parent =~ s/GL(X*)_/GL$1EW_/;
print "#ifdef $extname\n";
print " $extvar = $parent;\n";
print "#endif /* $extname */\n";
}
}
}

View File

@ -0,0 +1,54 @@
#!/usr/bin/perl
##
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
##
## This program is distributed under the terms and conditions of the GNU
## General Public License Version 2 as published by the Free Software
## Foundation or, at your option, any later version.
use strict;
use warnings;
use lib '.';
do 'bin/make.pl';
my @extlist = ();
my %extensions = ();
if (@ARGV)
{
@extlist = @ARGV;
my $curexttype = "";
foreach my $ext (sort @extlist)
{
my ($extname, $exturl, $extstring, $reuse, $types, $tokens, $functions, $exacts) = parse_ext($ext);
my $exttype = $extname;
$exttype =~ s/(W?E?)GL(X?)_(.*?_)(.*)/$3/;
my $extrem = $extname;
$extrem =~ s/(W?E?)GL(X?)_(.*?_)(.*)/$4/;
my $extvar = $extname;
$extvar =~ s/(W?E?)GL(X?)_/$1GL$2EW_/;
if(!($exttype =~ $curexttype))
{
if(length($curexttype) > 0)
{
print " }\n";
}
print " if (_glewStrSame2(&pos, &len, (const GLubyte*)\"$exttype\", " . length($exttype) . "))\n";
print " {\n";
$curexttype = $exttype;
}
print "#ifdef $extname\n";
print " if (_glewStrSame3(&pos, &len, (const GLubyte*)\"$extrem\", ". length($extrem) . "))\n";
#print " return $extvar;\n";
print " {\n";
print " ret = $extvar;\n";
print " continue;\n";
print " }\n";
print "#endif\n";
}
print " }\n";
}

View File

@ -0,0 +1,37 @@
#!/usr/bin/perl
##
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
##
## This program is distributed under the terms and conditions of the GNU
## General Public License Version 2 as published by the Free Software
## Foundation or, at your option, any later version.
use strict;
use warnings;
use lib '.';
do 'bin/make.pl';
# function pointer declaration
sub make_pfn_decl($%)
{
our $export;
return $export . " PFN" . (uc $_[0]) . "PROC " . prefixname($_[0]) . ";";
}
my @extlist = ();
my %extensions = ();
our $export = shift;
if (@ARGV)
{
@extlist = @ARGV;
foreach my $ext (sort @extlist)
{
my ($extname, $exturl, $extstring, $reuse, $types, $tokens, $functions, $exacts) = parse_ext($ext);
output_decls($functions, \&make_pfn_decl);
}
}

View File

@ -0,0 +1,32 @@
#!/usr/bin/perl
##
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
##
## This program is distributed under the terms and conditions of the GNU
## General Public License Version 2 as published by the Free Software
## Foundation or, at your option, any later version.
use strict;
use warnings;
use lib '.';
do 'bin/make.pl';
my @extlist = ();
my %extensions = ();
our $export = shift;
if (@ARGV)
{
@extlist = @ARGV;
foreach my $ext (sort @extlist)
{
my ($extname, $exturl, $extstring, $reuse, $types, $tokens, $functions, $exacts) = parse_ext($ext);
my $extvar = $extname;
$extvar =~ s/GL(X*)_/GL$1EW_/;
print $export . " GLboolean " . prefix_varname($extvar) . ";\n";
}
}

View File

@ -0,0 +1,393 @@
#!/usr/bin/perl
##
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
##
## This program is distributed under the terms and conditions of the GNU
## General Public License Version 2 as published by the Free Software
## Foundation or, at your option, any later version.
use strict;
use warnings;
sub compile_regex
{
my $regex = join('', @_);
return qr/$regex/
}
my @sections = (
"Name",
"Name Strings?",
"New Procedures and Functions",
"New Tokens.*", # Optional (GL/WGL/GLX/...) suffix
"Additions to Chapter.*",
);
my %typemap = (
bitfield => "GLbitfield",
boolean => "GLboolean",
# fsck up in EXT_vertex_array
Boolean => "GLboolean",
byte => "GLbyte",
clampd => "GLclampd",
clampf => "GLclampf",
double => "GLdouble",
enum => "GLenum",
# Intel fsck up
Glenum => "GLenum",
float => "GLfloat",
half => "GLhalf",
int => "GLint",
short => "GLshort",
sizei => "GLsizei",
ubyte => "GLubyte",
uint => "GLuint",
ushort => "GLushort",
DMbuffer => "void *",
# Nvidia video output fsck up
int64EXT => "GLint64EXT",
uint64EXT=> "GLuint64EXT",
# ARB VBO introduces these.
sizeiptr => "GLsizeiptr",
intptr => "GLintptr",
sizeiptrARB => "GLsizeiptrARB",
intptrARB => "GLintptrARB",
# ARB shader objects introduces these, charARB is at least 8 bits,
# handleARB is at least 32 bits
charARB => "GLcharARB",
handleARB => "GLhandleARB",
char => "GLchar",
# OpenGL 3.2 and GL_ARB_sync
int64 => "GLint64",
uint64 => "GLuint64",
sync => "GLsync",
# AMD_debug_output
DEBUGPROCAMD => "GLDEBUGPROCAMD",
# ARB_debug_output
DEBUGPROCARB => "GLDEBUGPROCARB",
# KHR_debug
DEBUGPROC => "GLDEBUGPROC",
VULKANPROCNV => "GLVULKANPROCNV",
vdpauSurfaceNV => "GLvdpauSurfaceNV",
# GLX 1.3 defines new types which might not be available at compile time
#GLXFBConfig => "void*",
#GLXFBConfigID => "XID",
#GLXContextID => "XID",
#GLXWindow => "XID",
#GLXPbuffer => "XID",
# Weird stuff to some SGIX extension
#GLXFBConfigSGIX => "void*",
#GLXFBConfigIDSGIX => "XID",
);
my %voidtypemap = (
void => "GLvoid",
);
my %taboo_tokens = (
GL_ZERO => 1,
);
# list of function definitions to be ignored, unless they are being defined in
# the given spec. This is an ugly hack arround the fact that people writing
# spec files seem to shut down all brain activity while they are at this task.
#
# This will be moved to its own file eventually.
#
# (mem, 2003-03-19)
my %fnc_ignore_list = (
"BindProgramARB" => "ARB_vertex_program",
"ColorSubTableEXT" => "EXT_color_subtable",
"DeleteProgramsARB" => "ARB_vertex_program",
"GenProgramsARB" => "ARB_vertex_program",
"GetProgramEnvParameterdvARB" => "ARB_vertex_program",
"GetProgramEnvParameterfvARB" => "ARB_vertex_program",
"GetProgramLocalParameterdvARB" => "ARB_vertex_program",
"GetProgramLocalParameterfvARB" => "ARB_vertex_program",
"GetProgramStringARB" => "ARB_vertex_program",
"GetProgramivARB" => "ARB_vertex_program",
"IsProgramARB" => "ARB_vertex_program",
"ProgramEnvParameter4dARB" => "ARB_vertex_program",
"ProgramEnvParameter4dvARB" => "ARB_vertex_program",
"ProgramEnvParameter4fARB" => "ARB_vertex_program",
"ProgramEnvParameter4fvARB" => "ARB_vertex_program",
"ProgramLocalParameter4dARB" => "ARB_vertex_program",
"ProgramLocalParameter4dvARB" => "ARB_vertex_program",
"ProgramLocalParameter4fARB" => "ARB_vertex_program",
"ProgramLocalParameter4fvARB" => "ARB_vertex_program",
"ProgramStringARB" => "ARB_vertex_program",
"glXCreateContextAttribsARB" => "ARB_create_context_profile",
"wglCreateContextAttribsARB" => "WGL_ARB_create_context_profile",
);
my %regex = (
eofnc => qr/(?:\);?$|^$)/, # )$ | );$ | ^$
extname => qr/^[A-Z][A-Za-z0-9_]+$/,
none => qr/^\(none\)$/,
function => qr/^(.+) ([a-z][a-z0-9_]*) \((.+)\)$/i,
prefix => qr/^(?:[aw]?gl|glX)/, # gl | agl | wgl | glX
tprefix => qr/^(?:[AW]?GL|GLX)_/, # GL_ | AGL_ | WGL_ | GLX_
section => compile_regex('^(', join('|', @sections), ')$'), # sections in spec
token => qr/^([A-Z0-9][A-Z0-9_x]*):?\s+((?:0x)?[0-9A-Fa-f]+(u(ll)?)?)(|\s[^\?]*)$/, # define tokens
types => compile_regex('\b(', join('|', keys %typemap), ')\b'), # var types
voidtype => compile_regex('\b(', keys %voidtypemap, ')\b '), # void type
);
# reshapes the the function declaration from multiline to single line form
sub normalize_prototype
{
local $_ = join(" ", @_);
s/\s+/ /g; # multiple whitespace -> single space
s/\<.*\>//g; # remove <comments> from direct state access extension
s/\<.*$//g; # remove incomplete <comments> from direct state access extension
s#/\*.*\*/##g; # remove /* ... */ comments
s/\s*\(\s*/ \(/; # exactly one space before ( and none after
s/\s*\)\s*/\)/; # no space before or after )
s/\s*\*([a-zA-Z])/\* $1/; # "* identifier"
s/\*wgl/\* wgl/; # "* wgl"
s/\*glX/\* glX/; # "* glX"
s/\.\.\./void/; # ... -> void
s/;$//; # remove ; at the end of the line
return $_;
}
# Ugly hack to work arround the fact that functions are declared in more
# than one spec file.
sub ignore_function($$)
{
return exists($fnc_ignore_list{$_[0]}) && $fnc_ignore_list{$_[0]} ne $_[1]
}
sub parse_spec($)
{
my $filename = shift;
my $extname = "";
my $vendortag = "";
my @extnames = ();
my %functions = ();
my %tokens = ();
my $section = "";
my @fnc = ();
my %proc = (
"Name" => sub {
if (/^([a-z0-9]+)_([a-z0-9_]+)/i)
{
$extname = "$1_$2";
$vendortag = $1;
}
},
"Name Strings" => sub {
# Add extension name to extension list
# Initially use $extname if (none) specified
if (/$regex{none}/)
{
$_ = $extname;
}
if (/$regex{extname}/)
{
# prefix with "GL_" if prefix not present
s/^/GL_/ unless /$regex{tprefix}/o;
# Add extension name to extension list
push @extnames, $_;
}
},
"New Procedures and Functions" => sub {
# if line matches end of function
if (/$regex{eofnc}/)
{
# add line to function declaration
push @fnc, $_;
# if normalized version of function looks like a function
if (normalize_prototype(@fnc) =~ /$regex{function}/)
{
# get return type, name, and arguments from regex
my ($return, $name, $parms) = ($1, $2, $3);
if (!ignore_function($name, $extname))
{
# prefix with "gl" if prefix not present
$name =~ s/^/gl/ unless $name =~ /$regex{prefix}/;
# is this a pure GL function?
if ($name =~ /^gl/ && $name !~ /^glX/)
{
# apply typemaps
$return =~ s/$regex{types}/$typemap{$1}/og;
$return =~ s/GLvoid/void/og;
$return =~ s/void\*/void */og;
$parms =~ s/$regex{types}/$typemap{$1}/og;
$parms =~ s/$regex{voidtype}/$voidtypemap{$1}/og;
$parms =~ s/GLvoid/void/og;
$parms =~ s/ void\* / void */og;
}
# add to functions hash
$functions{$name} = {
rtype => $return,
parms => $parms,
};
}
}
# reset function declaration
@fnc = ();
} elsif ($_ ne "" and $_ ne "None") {
# if not eof, add line to function declaration
push @fnc, $_
}
},
"New Tokens" => sub {
if (/$regex{token}/)
{
my ($name, $value) = ($1, $2);
# prefix with "GL_" if prefix not present
$name =~ s/^/GL_/ unless $name =~ /$regex{tprefix}/;
# Add (name, value) pair to tokens hash, unless it's taboo
$tokens{$name} = $value unless exists $taboo_tokens{$name};
}
},
);
# Some people can't read, the template clearly says "Name String_s_"
$proc{"Name String"} = $proc{"Name Strings"};
# Open spec file
open SPEC, "<$filename" or return;
# For each line of SPEC
while(<SPEC>)
{
# Delete trailing newline character
chomp;
# Remove trailing white spaces
s/\s+$//;
# If starts with a capital letter, it must be a new section
if (/^[A-Z]/)
{
# Match section name with one of the predefined names
$section = /$regex{section}/o ? $1 : "default";
} else {
# Line is internal to a section
# Remove leading whitespace
s/^\s+//;
# Call appropriate section processing function if it exists
&{$proc{$section}} if exists $proc{$section};
}
}
close SPEC;
return ($extname, \@extnames, \%tokens, \%functions);
}
#----------------------------------------------------------------------------------------
my @speclist = ();
my %extensions = ();
my $ext_dir = shift;
my $reg_http = "http://www.opengl.org/registry/specs/";
# Take command line arguments or read list from file
if (@ARGV)
{
@speclist = @ARGV;
} else {
local $/; #???
@speclist = split "\n", (<>);
}
foreach my $spec (sort @speclist)
{
my ($extname, $extnames, $tokens, $functions) = parse_spec($spec);
foreach my $ext (@{$extnames})
{
my $info = "$ext_dir/" . $ext;
open EXT, ">$info";
print EXT $ext . "\n"; # Extension name
my $specname = $spec;
$specname =~ s/registry\/gl\/specs\///;
print EXT $reg_http . $specname . "\n"; # Extension info URL
print EXT $ext . "\n"; # Extension string
print EXT "\n"; # Resuses nothing by default
my $prefix = $ext;
$prefix =~ s/^(.+?)(_.+)$/$1/;
foreach my $token (sort {
if (${$tokens}{$a} eq ${$tokens}{$b}) {
$a cmp $b
} else {
if (${$tokens}{$a} =~ /_/) {
if (${$tokens}{$b} =~ /_/) {
$a cmp $b
} else {
-1
}
} else {
if (${$tokens}{$b} =~ /_/) {
1
} else {
if (${$tokens}{$a} =~ /u(ll)?$/) {
if (${$tokens}{$b} =~ /u(ll)?$/) {
$a cmp $b
} else {
-1
}
} else {
if (${$tokens}{$b} =~ /u(ll)?$/) {
1
} else {
if (hex ${$tokens}{$a} eq hex ${$tokens}{$b})
{
$a cmp $b
} else {
hex ${$tokens}{$a} <=> hex ${$tokens}{$b}
}
}
}
}
}
}
} keys %{$tokens})
{
if ($token =~ /^$prefix\_.*/i)
{
print EXT "\t" . $token . " " . ${\%{$tokens}}{$token} . "\n";
}
}
foreach my $function (sort keys %{$functions})
{
if ($function =~ /^$prefix.*/i)
{
print EXT "\t" . ${$functions}{$function}{rtype} . " " . $function . " (" . ${$functions}{$function}{parms} . ")" . "\n";
}
}
close EXT;
}
}

View File

@ -0,0 +1,131 @@
#!/usr/bin/python
import re
import sys
from xml.dom.minidom import parse, Node
def findChildren(node, path):
result = []
if len(path)==1:
for i in node.childNodes:
if i.nodeType==Node.ELEMENT_NODE:
if i.tagName==path[0]:
result.append(i)
else:
for i in node.childNodes:
if i.nodeType==Node.ELEMENT_NODE:
if i.tagName==path[0]:
result.extend(findChildren(i, path[1:]))
return result
def findData(node, path):
return [ i.firstChild.data for i in findChildren(node, path) ]
def findParams(node):
n = findData(node, ['name'])[0]
t = ''
for i in node.childNodes:
if i.nodeType==Node.TEXT_NODE:
t += i.data
if i.nodeType==Node.ELEMENT_NODE and i.tagName=='ptype':
t += i.firstChild.data
return ( t, n)
def findEnums(dom):
ret = {}
for i in findChildren(dom, [ 'registry', 'enums', 'enum' ]):
n = i.getAttribute('name')
v = i.getAttribute('value')
ret[n] = v
return ret
def findCommands(dom):
ret = {}
for i in findChildren(dom, [ 'registry', 'commands', 'command' ]):
r,n = findParams(findChildren(i, ['proto'])[0])
p = [ findParams(j) for j in findChildren(i, ['param'])]
ret[n] = (r, p)
return ret
def findFeatures(dom):
ret = {}
for i in findChildren(dom, [ 'registry', 'feature' ]):
n = i.getAttribute('name')
e = []
c = []
for j in findChildren(i, [ 'require', 'enum' ]):
e.append(j.getAttribute("name"))
for j in findChildren(i, [ 'require', 'command' ]):
c.append(j.getAttribute("name"))
ret[n] = (e,c)
return ret
def findExtensions(dom):
ret = {}
for i in findChildren(dom, [ 'registry', 'extensions', 'extension' ]):
n = i.getAttribute('name')
e = []
c = []
for j in findChildren(i, [ 'require', 'enum' ]):
e.append(j.getAttribute("name"))
for j in findChildren(i, [ 'require', 'command' ]):
c.append(j.getAttribute("name"))
ret[n] = (e,c)
return ret
def findApi(dom, name):
enums = findEnums(dom)
commands = findCommands(dom)
features = findFeatures(dom)
extensions = findExtensions(dom)
return (enums, commands, features, extensions)
def writeExtension(f, name, extension, enums, commands):
f.write('%s\n'%name)
f.write('%s\n'%'https://www.khronos.org/registry/egl/specs/eglspec.1.5.pdf')
if name.find('_VERSION_')==-1:
f.write('%s\n'%name)
else:
f.write('\n')
f.write('\n')
enums = [ (j, enums[j]) for j in extension[0] ]
for e in sorted(enums, key=lambda i: i[1]):
f.write('\t%s %s\n'%(e[0], e[1]))
commands = [ (j, commands[j]) for j in extension[1] ]
for c in sorted(commands):
params = ', '.join( [ '%s %s'%(j[0], j[1]) for j in c[1][1] ] )
if len(params)==0:
params = ' void '
f.write('\t%s %s (%s)\n'%(c[1][0], c[0], params))
if __name__ == '__main__':
from optparse import OptionParser
import os
parser = OptionParser('usage: %prog [options] [XML specs...]')
parser.add_option("--core", dest="core", help="location for core outputs", default='')
parser.add_option("--extensions", dest="extensions", help="location for extensions outputs", default='')
(options, args) = parser.parse_args()
for i in args:
dom = parse(i)
api = findApi(dom, 'egl')
print('Found {} enums, {} commands, {} features and {} extensions.'.format(
len(api[0]), len(api[1]), len(api[2]), len(api[3])))
if len(options.core):
for i in api[2].keys():
f = open('%s/%s'%(options.core, i), 'w')
writeExtension(f, i, api[2][i], api[0], api[1])
f.close()
if len(options.extensions):
for i in api[3].keys():
f = open('%s/%s'%(options.extensions, i), 'w')
writeExtension(f, i, api[3][i], api[0], api[1])
f.close()

View File

@ -0,0 +1,25 @@
#!/bin/bash
##
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
##
## This program is distributed under the terms and conditions of the GNU
## General Public License Version 2 as published by the Free Software
## Foundation or, at your option, any later version.
##
## Parameters:
##
## $1: Extensions directory
## $2: Registry directory
## $3: The black list
set -e
if [ ! -d $1 ] ; then
mkdir -p $1
# Parse each of the extensions in the registry
find $2 -name doc -type d -prune -o -name "*.txt" -print | \
grep -v -f $3 | sort | bin/parse_spec.pl $1
fi

View File

@ -0,0 +1,14 @@
EXT/draw_range_elements.txt
EXT/static_vertex_array.txt
EXT/vertex_array_set.alt.txt
EXT/vertex_array_set.txt
EXT/nurbs_tessellator.txt
EXT/object_space_tess.txt
SGI/filter4_parameters.txt
SGIS/texture_color_mask.txt
SGIX/dmbuffer.txt
SGIX/instruments.txt
SGIX/video_source.txt
SGIX/hyperpipe_group.txt
OES/OES_fixed_point.txt
OES/OES_query_matrix.txt

View File

@ -0,0 +1,86 @@
EGL_VERSION_1_0
https://www.khronos.org/registry/egl/specs/eglspec.1.5.pdf
EGL_NO_CONTEXT ((EGLContext)0)
EGL_NO_DISPLAY ((EGLDisplay)0)
EGL_NO_SURFACE ((EGLSurface)0)
EGL_DONT_CARE ((EGLint)-1)
EGL_FALSE 0
EGL_PBUFFER_BIT 0x0001
EGL_PIXMAP_BIT 0x0002
EGL_WINDOW_BIT 0x0004
EGL_SUCCESS 0x3000
EGL_NOT_INITIALIZED 0x3001
EGL_BAD_ACCESS 0x3002
EGL_BAD_ALLOC 0x3003
EGL_BAD_ATTRIBUTE 0x3004
EGL_BAD_CONFIG 0x3005
EGL_BAD_CONTEXT 0x3006
EGL_BAD_CURRENT_SURFACE 0x3007
EGL_BAD_DISPLAY 0x3008
EGL_BAD_MATCH 0x3009
EGL_BAD_NATIVE_PIXMAP 0x300A
EGL_BAD_NATIVE_WINDOW 0x300B
EGL_BAD_PARAMETER 0x300C
EGL_BAD_SURFACE 0x300D
EGL_BUFFER_SIZE 0x3020
EGL_ALPHA_SIZE 0x3021
EGL_BLUE_SIZE 0x3022
EGL_GREEN_SIZE 0x3023
EGL_RED_SIZE 0x3024
EGL_DEPTH_SIZE 0x3025
EGL_STENCIL_SIZE 0x3026
EGL_CONFIG_CAVEAT 0x3027
EGL_CONFIG_ID 0x3028
EGL_LEVEL 0x3029
EGL_MAX_PBUFFER_HEIGHT 0x302A
EGL_MAX_PBUFFER_PIXELS 0x302B
EGL_MAX_PBUFFER_WIDTH 0x302C
EGL_NATIVE_RENDERABLE 0x302D
EGL_NATIVE_VISUAL_ID 0x302E
EGL_NATIVE_VISUAL_TYPE 0x302F
EGL_SAMPLES 0x3031
EGL_SAMPLE_BUFFERS 0x3032
EGL_SURFACE_TYPE 0x3033
EGL_TRANSPARENT_TYPE 0x3034
EGL_TRANSPARENT_BLUE_VALUE 0x3035
EGL_TRANSPARENT_GREEN_VALUE 0x3036
EGL_TRANSPARENT_RED_VALUE 0x3037
EGL_NONE 0x3038
EGL_SLOW_CONFIG 0x3050
EGL_NON_CONFORMANT_CONFIG 0x3051
EGL_TRANSPARENT_RGB 0x3052
EGL_VENDOR 0x3053
EGL_VERSION 0x3054
EGL_EXTENSIONS 0x3055
EGL_HEIGHT 0x3056
EGL_WIDTH 0x3057
EGL_LARGEST_PBUFFER 0x3058
EGL_DRAW 0x3059
EGL_READ 0x305A
EGL_CORE_NATIVE_ENGINE 0x305B
EGL_TRUE 1
EGLBoolean eglChooseConfig (EGLDisplay dpy, const EGLint * attrib_list, EGLConfig * configs, EGLint config_size, EGLint * num_config)
EGLBoolean eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target)
EGLContext eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint * attrib_list)
EGLSurface eglCreatePbufferSurface (EGLDisplay dpy, EGLConfig config, const EGLint * attrib_list)
EGLSurface eglCreatePixmapSurface (EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint * attrib_list)
EGLSurface eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint * attrib_list)
EGLBoolean eglDestroyContext (EGLDisplay dpy, EGLContext ctx)
EGLBoolean eglDestroySurface (EGLDisplay dpy, EGLSurface surface)
EGLBoolean eglGetConfigAttrib (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint * value)
EGLBoolean eglGetConfigs (EGLDisplay dpy, EGLConfig * configs, EGLint config_size, EGLint * num_config)
EGLDisplay eglGetCurrentDisplay ( void )
EGLSurface eglGetCurrentSurface (EGLint readdraw)
EGLDisplay eglGetDisplay (EGLNativeDisplayType display_id)
EGLint eglGetError ( void )
EGLBoolean eglInitialize (EGLDisplay dpy, EGLint * major, EGLint * minor)
EGLBoolean eglMakeCurrent (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx)
EGLBoolean eglQueryContext (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint * value)
const char * eglQueryString (EGLDisplay dpy, EGLint name)
EGLBoolean eglQuerySurface (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint * value)
EGLBoolean eglSwapBuffers (EGLDisplay dpy, EGLSurface surface)
EGLBoolean eglTerminate (EGLDisplay dpy)
EGLBoolean eglWaitGL ( void )
EGLBoolean eglWaitNative (EGLint engine)

View File

@ -0,0 +1,22 @@
EGL_VERSION_1_1
https://www.khronos.org/registry/egl/specs/eglspec.1.5.pdf
EGL_CONTEXT_LOST 0x300E
EGL_BIND_TO_TEXTURE_RGB 0x3039
EGL_BIND_TO_TEXTURE_RGBA 0x303A
EGL_MIN_SWAP_INTERVAL 0x303B
EGL_MAX_SWAP_INTERVAL 0x303C
EGL_NO_TEXTURE 0x305C
EGL_TEXTURE_RGB 0x305D
EGL_TEXTURE_RGBA 0x305E
EGL_TEXTURE_2D 0x305F
EGL_TEXTURE_FORMAT 0x3080
EGL_TEXTURE_TARGET 0x3081
EGL_MIPMAP_TEXTURE 0x3082
EGL_MIPMAP_LEVEL 0x3083
EGL_BACK_BUFFER 0x3084
EGLBoolean eglBindTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer)
EGLBoolean eglReleaseTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer)
EGLBoolean eglSurfaceAttrib (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value)
EGLBoolean eglSwapInterval (EGLDisplay dpy, EGLint interval)

View File

@ -0,0 +1,38 @@
EGL_VERSION_1_2
https://www.khronos.org/registry/egl/specs/eglspec.1.5.pdf
EGL_UNKNOWN ((EGLint)-1)
EGL_OPENGL_ES_BIT 0x0001
EGL_OPENVG_BIT 0x0002
EGL_LUMINANCE_SIZE 0x303D
EGL_ALPHA_MASK_SIZE 0x303E
EGL_COLOR_BUFFER_TYPE 0x303F
EGL_RENDERABLE_TYPE 0x3040
EGL_SINGLE_BUFFER 0x3085
EGL_RENDER_BUFFER 0x3086
EGL_COLORSPACE 0x3087
EGL_ALPHA_FORMAT 0x3088
EGL_COLORSPACE_sRGB 0x3089
EGL_COLORSPACE_LINEAR 0x308A
EGL_ALPHA_FORMAT_NONPRE 0x308B
EGL_ALPHA_FORMAT_PRE 0x308C
EGL_CLIENT_APIS 0x308D
EGL_RGB_BUFFER 0x308E
EGL_LUMINANCE_BUFFER 0x308F
EGL_HORIZONTAL_RESOLUTION 0x3090
EGL_VERTICAL_RESOLUTION 0x3091
EGL_PIXEL_ASPECT_RATIO 0x3092
EGL_SWAP_BEHAVIOR 0x3093
EGL_BUFFER_PRESERVED 0x3094
EGL_BUFFER_DESTROYED 0x3095
EGL_OPENVG_IMAGE 0x3096
EGL_CONTEXT_CLIENT_TYPE 0x3097
EGL_OPENGL_ES_API 0x30A0
EGL_OPENVG_API 0x30A1
EGL_DISPLAY_SCALING 10000
EGLBoolean eglBindAPI (EGLenum api)
EGLSurface eglCreatePbufferFromClientBuffer (EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint * attrib_list)
EGLenum eglQueryAPI ( void )
EGLBoolean eglReleaseThread ( void )
EGLBoolean eglWaitClient ( void )

View File

@ -0,0 +1,16 @@
EGL_VERSION_1_3
https://www.khronos.org/registry/egl/specs/eglspec.1.5.pdf
EGL_OPENGL_ES2_BIT 0x0004
EGL_VG_COLORSPACE_LINEAR_BIT 0x0020
EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040
EGL_MATCH_NATIVE_PIXMAP 0x3041
EGL_CONFORMANT 0x3042
EGL_VG_COLORSPACE 0x3087
EGL_VG_ALPHA_FORMAT 0x3088
EGL_VG_COLORSPACE_sRGB 0x3089
EGL_VG_COLORSPACE_LINEAR 0x308A
EGL_VG_ALPHA_FORMAT_NONPRE 0x308B
EGL_VG_ALPHA_FORMAT_PRE 0x308C
EGL_CONTEXT_CLIENT_VERSION 0x3098

View File

@ -0,0 +1,13 @@
EGL_VERSION_1_4
https://www.khronos.org/registry/egl/specs/eglspec.1.5.pdf
EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0)
EGL_OPENGL_BIT 0x0008
EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200
EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400
EGL_MULTISAMPLE_RESOLVE 0x3099
EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A
EGL_MULTISAMPLE_RESOLVE_BOX 0x309B
EGL_OPENGL_API 0x30A2
EGLContext eglGetCurrentContext ( void )

View File

@ -0,0 +1,59 @@
EGL_VERSION_1_5
https://www.khronos.org/registry/egl/specs/eglspec.1.5.pdf
EGL_NO_IMAGE ((EGLImage)0)
EGL_NO_SYNC ((EGLSync)0)
EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT 0x00000001
EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT 0x00000002
EGL_OPENGL_ES3_BIT 0x00000040
EGL_SYNC_FLUSH_COMMANDS_BIT 0x0001
EGL_GL_COLORSPACE_SRGB 0x3089
EGL_GL_COLORSPACE_LINEAR 0x308A
EGL_CONTEXT_MAJOR_VERSION 0x3098
EGL_CL_EVENT_HANDLE 0x309C
EGL_GL_COLORSPACE 0x309D
EGL_GL_TEXTURE_2D 0x30B1
EGL_GL_TEXTURE_3D 0x30B2
EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x30B3
EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x30B4
EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x30B5
EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x30B6
EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x30B7
EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8
EGL_GL_RENDERBUFFER 0x30B9
EGL_GL_TEXTURE_LEVEL 0x30BC
EGL_GL_TEXTURE_ZOFFSET 0x30BD
EGL_IMAGE_PRESERVED 0x30D2
EGL_SYNC_PRIOR_COMMANDS_COMPLETE 0x30F0
EGL_SYNC_STATUS 0x30F1
EGL_SIGNALED 0x30F2
EGL_UNSIGNALED 0x30F3
EGL_TIMEOUT_EXPIRED 0x30F5
EGL_CONDITION_SATISFIED 0x30F6
EGL_SYNC_TYPE 0x30F7
EGL_SYNC_CONDITION 0x30F8
EGL_SYNC_FENCE 0x30F9
EGL_CONTEXT_MINOR_VERSION 0x30FB
EGL_CONTEXT_OPENGL_PROFILE_MASK 0x30FD
EGL_SYNC_CL_EVENT 0x30FE
EGL_SYNC_CL_EVENT_COMPLETE 0x30FF
EGL_CONTEXT_OPENGL_DEBUG 0x31B0
EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE 0x31B1
EGL_CONTEXT_OPENGL_ROBUST_ACCESS 0x31B2
EGL_CONTEXT_OPENGL_ROBUST_ACCESS 0x31B2
EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY 0x31BD
EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY 0x31BD
EGL_NO_RESET_NOTIFICATION 0x31BE
EGL_LOSE_CONTEXT_ON_RESET 0x31BF
EGL_FOREVER 0xFFFFFFFFFFFFFFFF
EGLint eglClientWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout)
EGLImage eglCreateImage (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib * attrib_list)
EGLSurface eglCreatePlatformPixmapSurface (EGLDisplay dpy, EGLConfig config, void * native_pixmap, const EGLAttrib * attrib_list)
EGLSurface eglCreatePlatformWindowSurface (EGLDisplay dpy, EGLConfig config, void * native_window, const EGLAttrib * attrib_list)
EGLSync eglCreateSync (EGLDisplay dpy, EGLenum type, const EGLAttrib * attrib_list)
EGLBoolean eglDestroyImage (EGLDisplay dpy, EGLImage image)
EGLBoolean eglDestroySync (EGLDisplay dpy, EGLSync sync)
EGLDisplay eglGetPlatformDisplay (EGLenum platform, void * native_display, const EGLAttrib * attrib_list)
EGLBoolean eglGetSyncAttrib (EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib * value)
EGLBoolean eglWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags)

View File

@ -0,0 +1,23 @@
GLX_AMD_gpu_association
http://www.opengl.org/registry/specs/AMD/glx_gpu_association.txt
GLX_AMD_gpu_association
GLX_GPU_VENDOR_AMD 0x1F00
GLX_GPU_RENDERER_STRING_AMD 0x1F01
GLX_GPU_OPENGL_VERSION_STRING_AMD 0x1F02
GLX_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2
GLX_GPU_RAM_AMD 0x21A3
GLX_GPU_CLOCK_AMD 0x21A4
GLX_GPU_NUM_PIPES_AMD 0x21A5
GLX_GPU_NUM_SIMD_AMD 0x21A6
GLX_GPU_NUM_RB_AMD 0x21A7
GLX_GPU_NUM_SPI_AMD 0x21A8
void glXBlitContextFramebufferAMD (GLXContext dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
GLXContext glXCreateAssociatedContextAMD (unsigned int id, GLXContext share_list)
GLXContext glXCreateAssociatedContextAttribsAMD (unsigned int id, GLXContext share_context, const int* attribList)
Bool glXDeleteAssociatedContextAMD (GLXContext ctx)
unsigned int glXGetContextGPUIDAMD (GLXContext ctx)
GLXContext glXGetCurrentAssociatedContextAMD (void)
unsigned int glXGetGPUIDsAMD (unsigned int maxCount, unsigned int* ids)
int glXGetGPUInfoAMD (unsigned int id, int property, GLenum dataType, unsigned int size, void* data)
Bool glXMakeAssociatedContextCurrentAMD (GLXContext ctx)

View File

@ -0,0 +1,5 @@
GLX_ARB_get_proc_address
http://oss.sgi.com/projects/ogl-sample/registry/ARB/get_proc_address.txt
GLX_ARB_get_proc_address
extern void ( * glXGetProcAddressARB (const GLubyte *procName)) (void);

View File

@ -0,0 +1,5 @@
GLX_ATI_pixel_format_float
GLX_ATI_pixel_format_float
GLX_RGBA_FLOAT_ATI_BIT 0x00000100

View File

@ -0,0 +1,42 @@
GLX_ATI_render_texture
GLX_ATI_render_texture
GLX_BIND_TO_TEXTURE_RGB_ATI 0x9800
GLX_BIND_TO_TEXTURE_RGBA_ATI 0x9801
GLX_TEXTURE_FORMAT_ATI 0x9802
GLX_TEXTURE_TARGET_ATI 0x9803
GLX_MIPMAP_TEXTURE_ATI 0x9804
GLX_TEXTURE_RGB_ATI 0x9805
GLX_TEXTURE_RGBA_ATI 0x9806
GLX_NO_TEXTURE_ATI 0x9807
GLX_TEXTURE_CUBE_MAP_ATI 0x9808
GLX_TEXTURE_1D_ATI 0x9809
GLX_TEXTURE_2D_ATI 0x980A
GLX_MIPMAP_LEVEL_ATI 0x980B
GLX_CUBE_MAP_FACE_ATI 0x980C
GLX_TEXTURE_CUBE_MAP_POSITIVE_X_ATI 0x980D
GLX_TEXTURE_CUBE_MAP_NEGATIVE_X_ATI 0x980E
GLX_TEXTURE_CUBE_MAP_POSITIVE_Y_ATI 0x980F
GLX_TEXTURE_CUBE_MAP_NEGATIVE_Y_ATI 0x9810
GLX_TEXTURE_CUBE_MAP_POSITIVE_Z_ATI 0x9811
GLX_TEXTURE_CUBE_MAP_NEGATIVE_Z_ATI 0x9812
GLX_FRONT_LEFT_ATI 0x9813
GLX_FRONT_RIGHT_ATI 0x9814
GLX_BACK_LEFT_ATI 0x9815
GLX_BACK_RIGHT_ATI 0x9816
GLX_AUX0_ATI 0x9817
GLX_AUX1_ATI 0x9818
GLX_AUX2_ATI 0x9819
GLX_AUX3_ATI 0x981A
GLX_AUX4_ATI 0x981B
GLX_AUX5_ATI 0x981C
GLX_AUX6_ATI 0x981D
GLX_AUX7_ATI 0x981E
GLX_AUX8_ATI 0x981F
GLX_AUX9_ATI 0x9820
GLX_BIND_TO_TEXTURE_LUMINANCE_ATI 0x9821
GLX_BIND_TO_TEXTURE_INTENSITY_ATI 0x9822
void glXBindTexImageATI (Display *dpy, GLXPbuffer pbuf, int buffer)
void glXReleaseTexImageATI (Display *dpy, GLXPbuffer pbuf, int buffer)
void glXDrawableAttribATI (Display *dpy, GLXDrawable draw, const int *attrib_list)

View File

@ -0,0 +1,5 @@
GLX_EXT_create_context_es2_profile
http://www.opengl.org/registry/specs/EXT/glx_create_context_es2_profile.txt
GLX_EXT_create_context_es2_profile
GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004

View File

@ -0,0 +1,5 @@
GLX_EXT_create_context_es_profile
http://www.opengl.org/registry/specs/EXT/glx_create_context_es_profile.txt
GLX_EXT_create_context_es_profile
GLX_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004

View File

@ -0,0 +1,6 @@
GLX_EXT_fbconfig_packed_float
http://developer.download.nvidia.com/opengl/specs/GL_EXT_packed_float.txt
GLX_EXT_fbconfig_packed_float
GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008

View File

@ -0,0 +1,5 @@
GLX_EXT_framebuffer_sRGB
http://developer.download.nvidia.com/opengl/specs/GL_EXT_framebuffer_sRGB.txt
GLX_EXT_framebuffer_sRGB
GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2

View File

@ -0,0 +1,6 @@
GLX_MESA_swap_control
http://cgit.freedesktop.org/mesa/mesa/plain/docs/MESA_swap_control.spec
GLX_MESA_swap_control
int glXGetSwapIntervalMESA (void)
int glXSwapIntervalMESA (unsigned int interval)

View File

@ -0,0 +1,5 @@
GLX_NV_float_buffer
http://cvs1.nvidia.com/inc/GL/glxtokens.h
GLX_NV_float_buffer
GLX_FLOAT_COMPONENTS_NV 0x20B0

View File

@ -0,0 +1,6 @@
GLX_NV_vertex_array_range
http://oss.sgi.com/projects/ogl-sample/registry/NV/vertex_array_range.txt
GLX_NV_vertex_array_range
void * glXAllocateMemoryNV (GLsizei size, GLfloat readFrequency, GLfloat writeFrequency, GLfloat priority)
void glXFreeMemoryNV (void *pointer)

View File

@ -0,0 +1,6 @@
GLX_SGIS_shared_multisample
GLX_SGIS_shared_multisample
GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027

View File

@ -0,0 +1,26 @@
GLX_SGIX_hyperpipe
http://oss.sgi.com/projects/ogl-sample/registry/SGIX/hyperpipe_group.txt
GLX_SGIX_hyperpipe
GLX_HYPERPIPE_ID_SGIX 0x8030
GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001
GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002
GLX_PIPE_RECT_SGIX 0x00000001
GLX_PIPE_RECT_LIMITS_SGIX 0x00000002
GLX_HYPERPIPE_STEREO_SGIX 0x00000003
GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004
GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
GLX_BAD_HYPERPIPE_SGIX 92
typedef struct { char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; int networkId; } GLXHyperpipeNetworkSGIX;
typedef struct { char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; int channel; unsigned int participationType; int timeSlice; } GLXHyperpipeConfigSGIX;
typedef struct { char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; int srcXOrigin; int srcYOrigin; int srcWidth; int srcHeight; int destXOrigin; int destYOrigin; int destWidth; int destHeight; } GLXPipeRect;
typedef struct { char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; int XOrigin; int YOrigin; int maxHeight; int maxWidth; } GLXPipeRectLimits;
GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *dpy, int *npipes)
int glXHyperpipeConfigSGIX (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId)
GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *dpy, int hpId, int *npipes)
int glXDestroyHyperpipeConfigSGIX (Display *dpy, int hpId)
int glXBindHyperpipeSGIX (Display *dpy, int hpId)
int glXQueryHyperpipeBestAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList)
int glXHyperpipeAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *attribList)
int glXQueryHyperpipeAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList)

View File

@ -0,0 +1,6 @@
GLX_SGIX_swap_barrier
http://oss.sgi.com/projects/ogl-sample/registry/SGIX/swap_barrier.txt
GLX_SGIX_swap_barrier
void glXBindSwapBarrierSGIX (Display *dpy, GLXDrawable drawable, int barrier)
Bool glXQueryMaxSwapBarriersSGIX (Display *dpy, int screen, int *max)

View File

@ -0,0 +1,5 @@
GLX_SGIX_swap_group
http://oss.sgi.com/projects/ogl-sample/registry/SGIX/swap_group.txt
GLX_SGIX_swap_group
void glXJoinSwapGroupSGIX (Display *dpy, GLXDrawable drawable, GLXDrawable member)

View File

@ -0,0 +1,6 @@
GLX_SGI_video_sync
http://www.opengl.org/registry/specs/SGI/video_sync.txt
GLX_SGI_video_sync
int glXGetVideoSyncSGI (unsigned int* count)
int glXWaitVideoSyncSGI (int divisor, int remainder, unsigned int* count)

View File

@ -0,0 +1,8 @@
GLX_SUN_video_resize
http://wwws.sun.com/software/graphics/opengl/extensions/glx_sun_video_resize.txt
GLX_SUN_video_resize
GL_VIDEO_RESIZE_COMPENSATION_SUN 0x85CD
GLX_VIDEO_RESIZE_SUN 0x8171
int glXVideoResizeSUN (Display* display, GLXDrawable window, float factor)
int glXGetVideoResizeSUN (Display* display, GLXDrawable window, float* factor)

View File

@ -0,0 +1,5 @@
GLX_VERSION_1_2
http://www.opengl.org/documentation/specs/glx/glx1.2.ps
GLX_VERSION_1_2
Display* glXGetCurrentDisplay (void)

View File

@ -0,0 +1,83 @@
GLX_VERSION_1_3
http://www.opengl.org/documentation/specs/glx/glx1.3.pdf
GLX_VERSION_1_3
GLX_WINDOW_BIT 0x00000001
GLX_PIXMAP_BIT 0x00000002
GLX_PBUFFER_BIT 0x00000004
GLX_RGBA_BIT 0x00000001
GLX_COLOR_INDEX_BIT 0x00000002
GLX_PBUFFER_CLOBBER_MASK 0x08000000
GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
GLX_BACK_LEFT_BUFFER_BIT 0x00000004
GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
GLX_AUX_BUFFERS_BIT 0x00000010
GLX_DEPTH_BUFFER_BIT 0x00000020
GLX_STENCIL_BUFFER_BIT 0x00000040
GLX_ACCUM_BUFFER_BIT 0x00000080
GLX_CONFIG_CAVEAT 0x20
GLX_X_VISUAL_TYPE 0x22
GLX_TRANSPARENT_TYPE 0x23
GLX_TRANSPARENT_INDEX_VALUE 0x24
GLX_TRANSPARENT_RED_VALUE 0x25
GLX_TRANSPARENT_GREEN_VALUE 0x26
GLX_TRANSPARENT_BLUE_VALUE 0x27
GLX_TRANSPARENT_ALPHA_VALUE 0x28
GLX_DONT_CARE 0xFFFFFFFF
GLX_NONE 0x8000
GLX_SLOW_CONFIG 0x8001
GLX_TRUE_COLOR 0x8002
GLX_DIRECT_COLOR 0x8003
GLX_PSEUDO_COLOR 0x8004
GLX_STATIC_COLOR 0x8005
GLX_GRAY_SCALE 0x8006
GLX_STATIC_GRAY 0x8007
GLX_TRANSPARENT_RGB 0x8008
GLX_TRANSPARENT_INDEX 0x8009
GLX_VISUAL_ID 0x800B
GLX_SCREEN 0x800C
GLX_NON_CONFORMANT_CONFIG 0x800D
GLX_DRAWABLE_TYPE 0x8010
GLX_RENDER_TYPE 0x8011
GLX_X_RENDERABLE 0x8012
GLX_FBCONFIG_ID 0x8013
GLX_RGBA_TYPE 0x8014
GLX_COLOR_INDEX_TYPE 0x8015
GLX_MAX_PBUFFER_WIDTH 0x8016
GLX_MAX_PBUFFER_HEIGHT 0x8017
GLX_MAX_PBUFFER_PIXELS 0x8018
GLX_PRESERVED_CONTENTS 0x801B
GLX_LARGEST_PBUFFER 0x801C
GLX_WIDTH 0x801D
GLX_HEIGHT 0x801E
GLX_EVENT_MASK 0x801F
GLX_DAMAGED 0x8020
GLX_SAVED 0x8021
GLX_WINDOW 0x8022
GLX_PBUFFER 0x8023
GLX_PBUFFER_HEIGHT 0x8040
GLX_PBUFFER_WIDTH 0x8041
GLXFBConfig* glXChooseFBConfig (Display *dpy, int screen, const int *attrib_list, int *nelements)
GLXFBConfig* glXGetFBConfigs (Display *dpy, int screen, int *nelements)
XVisualInfo* glXGetVisualFromFBConfig (Display *dpy, GLXFBConfig config)
int glXGetFBConfigAttrib (Display *dpy, GLXFBConfig config, int attribute, int *value)
GLXWindow glXCreateWindow (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list)
void glXDestroyWindow (Display *dpy, GLXWindow win)
GLXPixmap glXCreatePixmap (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list)
void glXDestroyPixmap (Display *dpy, GLXPixmap pixmap)
GLXPbuffer glXCreatePbuffer (Display *dpy, GLXFBConfig config, const int *attrib_list)
void glXDestroyPbuffer (Display *dpy, GLXPbuffer pbuf)
void glXQueryDrawable (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value)
GLXContext glXCreateNewContext (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct)
Bool glXMakeContextCurrent (Display *display, GLXDrawable draw, GLXDrawable read, GLXContext ctx)
GLXDrawable glXGetCurrentReadDrawable (void)
int glXQueryContext (Display *dpy, GLXContext ctx, int attribute, int *value)
void glXSelectEvent (Display *dpy, GLXDrawable draw, unsigned long event_mask)
void glXGetSelectedEvent (Display *dpy, GLXDrawable draw, unsigned long *event_mask)
typedef XID GLXWindow
typedef XID GLXPbuffer
typedef XID GLXFBConfigID
typedef struct __GLXFBConfigRec *GLXFBConfig
typedef struct { int event_type; int draw_type; unsigned long serial; Bool send_event; Display *display; GLXDrawable drawable; unsigned int buffer_mask; unsigned int aux_buffer; int x, y; int width, height; int count; } GLXPbufferClobberEvent;
typedef union __GLXEvent { GLXPbufferClobberEvent glxpbufferclobber; long pad[24]; } GLXEvent;

View File

@ -0,0 +1,7 @@
GLX_VERSION_1_4
http://www.opengl.org/documentation/specs/glx/glx1.4.pdf
GLX_VERSION_1_4
GLX_SAMPLE_BUFFERS 100000
GLX_SAMPLES 100001
extern void ( * glXGetProcAddress (const GLubyte *procName)) (void);

View File

@ -0,0 +1,18 @@
GL_APPLE_float_pixels
http://www.opengl.org/registry/specs/APPLE/float_pixels.txt
GL_APPLE_float_pixels
GL_HALF_APPLE 0x140B
GL_COLOR_FLOAT_APPLE 0x8A0F
GL_RGBA_FLOAT32_APPLE 0x8814
GL_RGB_FLOAT32_APPLE 0x8815
GL_ALPHA_FLOAT32_APPLE 0x8816
GL_INTENSITY_FLOAT32_APPLE 0x8817
GL_LUMINANCE_FLOAT32_APPLE 0x8818
GL_LUMINANCE_ALPHA_FLOAT32_APPLE 0x8819
GL_RGBA_FLOAT16_APPLE 0x881A
GL_RGB_FLOAT16_APPLE 0x881B
GL_ALPHA_FLOAT16_APPLE 0x881C
GL_INTENSITY_FLOAT16_APPLE 0x881D
GL_LUMINANCE_FLOAT16_APPLE 0x881E
GL_LUMINANCE_ALPHA_FLOAT16_APPLE 0x881F

View File

@ -0,0 +1,5 @@
GL_APPLE_pixel_buffer
GL_APPLE_pixel_buffer
GL_MIN_PBUFFER_VIEWPORT_DIMS_APPLE 0x8A10

View File

@ -0,0 +1,13 @@
GL_APPLE_texture_range
http://www.opengl.org/registry/specs/APPLE/texture_range.txt
GL_APPLE_texture_range
GL_TEXTURE_STORAGE_HINT_APPLE 0x85BC
GL_STORAGE_PRIVATE_APPLE 0x85BD
GL_STORAGE_CACHED_APPLE 0x85BE
GL_STORAGE_SHARED_APPLE 0x85BF
GL_TEXTURE_RANGE_LENGTH_APPLE 0x85B7
GL_TEXTURE_RANGE_POINTER_APPLE 0x85B8
void glTextureRangeAPPLE (GLenum target, GLsizei length, void *pointer)
void glGetTexParameterPointervAPPLE (GLenum target, GLenum pname, void **params)

View File

@ -0,0 +1,4 @@
GL_ARB_draw_instanced
http://www.opengl.org/registry/specs/ARB/draw_instanced.txt
GL_ARB_draw_instanced

View File

@ -0,0 +1,113 @@
GL_ARB_imaging
GL_ARB_imaging
GL_CONSTANT_COLOR 0x8001
GL_ONE_MINUS_CONSTANT_COLOR 0x8002
GL_CONSTANT_ALPHA 0x8003
GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
GL_BLEND_COLOR 0x8005
GL_FUNC_ADD 0x8006
GL_MIN 0x8007
GL_MAX 0x8008
GL_BLEND_EQUATION 0x8009
GL_FUNC_SUBTRACT 0x800A
GL_FUNC_REVERSE_SUBTRACT 0x800B
GL_CONVOLUTION_1D 0x8010
GL_CONVOLUTION_2D 0x8011
GL_SEPARABLE_2D 0x8012
GL_CONVOLUTION_BORDER_MODE 0x8013
GL_CONVOLUTION_FILTER_SCALE 0x8014
GL_CONVOLUTION_FILTER_BIAS 0x8015
GL_REDUCE 0x8016
GL_CONVOLUTION_FORMAT 0x8017
GL_CONVOLUTION_WIDTH 0x8018
GL_CONVOLUTION_HEIGHT 0x8019
GL_MAX_CONVOLUTION_WIDTH 0x801A
GL_MAX_CONVOLUTION_HEIGHT 0x801B
GL_POST_CONVOLUTION_RED_SCALE 0x801C
GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
GL_POST_CONVOLUTION_RED_BIAS 0x8020
GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
GL_HISTOGRAM 0x8024
GL_PROXY_HISTOGRAM 0x8025
GL_HISTOGRAM_WIDTH 0x8026
GL_HISTOGRAM_FORMAT 0x8027
GL_HISTOGRAM_RED_SIZE 0x8028
GL_HISTOGRAM_GREEN_SIZE 0x8029
GL_HISTOGRAM_BLUE_SIZE 0x802A
GL_HISTOGRAM_ALPHA_SIZE 0x802B
GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
GL_HISTOGRAM_SINK 0x802D
GL_MINMAX 0x802E
GL_MINMAX_FORMAT 0x802F
GL_MINMAX_SINK 0x8030
GL_TABLE_TOO_LARGE 0x8031
GL_COLOR_MATRIX 0x80B1
GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
GL_COLOR_TABLE 0x80D0
GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
GL_PROXY_COLOR_TABLE 0x80D3
GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
GL_COLOR_TABLE_SCALE 0x80D6
GL_COLOR_TABLE_BIAS 0x80D7
GL_COLOR_TABLE_FORMAT 0x80D8
GL_COLOR_TABLE_WIDTH 0x80D9
GL_COLOR_TABLE_RED_SIZE 0x80DA
GL_COLOR_TABLE_GREEN_SIZE 0x80DB
GL_COLOR_TABLE_BLUE_SIZE 0x80DC
GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
GL_IGNORE_BORDER 0x8150
GL_CONSTANT_BORDER 0x8151
GL_WRAP_BORDER 0x8152
GL_REPLICATE_BORDER 0x8153
GL_CONVOLUTION_BORDER_COLOR 0x8154
void glColorTable (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table)
void glColorSubTable (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data)
void glColorTableParameteriv (GLenum target, GLenum pname, const GLint *params)
void glColorTableParameterfv (GLenum target, GLenum pname, const GLfloat *params)
void glCopyColorSubTable (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width)
void glCopyColorTable (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
void glGetColorTable (GLenum target, GLenum format, GLenum type, void *table)
void glGetColorTableParameterfv (GLenum target, GLenum pname, GLfloat *params)
void glGetColorTableParameteriv (GLenum target, GLenum pname, GLint *params)
void glHistogram (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink)
void glResetHistogram (GLenum target)
void glGetHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values)
void glGetHistogramParameterfv (GLenum target, GLenum pname, GLfloat *params)
void glGetHistogramParameteriv (GLenum target, GLenum pname, GLint *params)
void glMinmax (GLenum target, GLenum internalformat, GLboolean sink)
void glResetMinmax (GLenum target)
void glGetMinmaxParameterfv (GLenum target, GLenum pname, GLfloat *params)
void glGetMinmaxParameteriv (GLenum target, GLenum pname, GLint *params)
void glConvolutionFilter1D (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image)
void glConvolutionFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image)
void glConvolutionParameterf (GLenum target, GLenum pname, GLfloat params)
void glConvolutionParameterfv (GLenum target, GLenum pname, const GLfloat *params)
void glConvolutionParameteri (GLenum target, GLenum pname, GLint params)
void glConvolutionParameteriv (GLenum target, GLenum pname, const GLint *params)
void glCopyConvolutionFilter1D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
void glCopyConvolutionFilter2D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height)
void glGetConvolutionFilter (GLenum target, GLenum format, GLenum type, void *image)
void glGetConvolutionParameterfv (GLenum target, GLenum pname, GLfloat *params)
void glGetConvolutionParameteriv (GLenum target, GLenum pname, GLint *params)
void glSeparableFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column)
void glGetSeparableFilter (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span)
void glGetMinmax (GLenum target, GLboolean reset, GLenum format, GLenum types, void *values)

View File

@ -0,0 +1,8 @@
GL_ARB_instanced_arrays
http://www.opengl.org/registry/specs/ARB/instanced_arrays.txt
GL_ARB_instanced_arrays
GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE
void glVertexAttribDivisorARB (GLuint index, GLuint divisor)
void glDrawArraysInstancedARB (GLenum mode, GLint first, GLsizei count, GLsizei primcount)
void glDrawElementsInstancedARB (GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei primcount)

View File

@ -0,0 +1,104 @@
GL_ARB_internalformat_query2
http://www.opengl.org/registry/specs/ARB/internalformat_query2.txt
GL_ARB_internalformat_query2
GL_INTERNALFORMAT_SUPPORTED 0x826F
GL_INTERNALFORMAT_PREFERRED 0x8270
GL_INTERNALFORMAT_RED_SIZE 0x8271
GL_INTERNALFORMAT_GREEN_SIZE 0x8272
GL_INTERNALFORMAT_BLUE_SIZE 0x8273
GL_INTERNALFORMAT_ALPHA_SIZE 0x8274
GL_INTERNALFORMAT_DEPTH_SIZE 0x8275
GL_INTERNALFORMAT_STENCIL_SIZE 0x8276
GL_INTERNALFORMAT_SHARED_SIZE 0x8277
GL_INTERNALFORMAT_RED_TYPE 0x8278
GL_INTERNALFORMAT_GREEN_TYPE 0x8279
GL_INTERNALFORMAT_BLUE_TYPE 0x827A
GL_INTERNALFORMAT_ALPHA_TYPE 0x827B
GL_INTERNALFORMAT_DEPTH_TYPE 0x827C
GL_INTERNALFORMAT_STENCIL_TYPE 0x827D
GL_MAX_WIDTH 0x827E
GL_MAX_HEIGHT 0x827F
GL_MAX_DEPTH 0x8280
GL_MAX_LAYERS 0x8281
GL_MAX_COMBINED_DIMENSIONS 0x8282
GL_COLOR_COMPONENTS 0x8283
GL_DEPTH_COMPONENTS 0x8284
GL_STENCIL_COMPONENTS 0x8285
GL_COLOR_RENDERABLE 0x8286
GL_DEPTH_RENDERABLE 0x8287
GL_STENCIL_RENDERABLE 0x8288
GL_FRAMEBUFFER_RENDERABLE 0x8289
GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A
GL_FRAMEBUFFER_BLEND 0x828B
GL_READ_PIXELS 0x828C
GL_READ_PIXELS_FORMAT 0x828D
GL_READ_PIXELS_TYPE 0x828E
GL_TEXTURE_IMAGE_FORMAT 0x828F
GL_TEXTURE_IMAGE_TYPE 0x8290
GL_GET_TEXTURE_IMAGE_FORMAT 0x8291
GL_GET_TEXTURE_IMAGE_TYPE 0x8292
GL_MIPMAP 0x8293
GL_MANUAL_GENERATE_MIPMAP 0x8294
GL_AUTO_GENERATE_MIPMAP 0x8295
GL_COLOR_ENCODING 0x8296
GL_SRGB_READ 0x8297
GL_SRGB_WRITE 0x8298
GL_SRGB_DECODE_ARB 0x8299
GL_FILTER 0x829A
GL_VERTEX_TEXTURE 0x829B
GL_TESS_CONTROL_TEXTURE 0x829C
GL_TESS_EVALUATION_TEXTURE 0x829D
GL_GEOMETRY_TEXTURE 0x829E
GL_FRAGMENT_TEXTURE 0x829F
GL_COMPUTE_TEXTURE 0x82A0
GL_TEXTURE_SHADOW 0x82A1
GL_TEXTURE_GATHER 0x82A2
GL_TEXTURE_GATHER_SHADOW 0x82A3
GL_SHADER_IMAGE_LOAD 0x82A4
GL_SHADER_IMAGE_STORE 0x82A5
GL_SHADER_IMAGE_ATOMIC 0x82A6
GL_IMAGE_TEXEL_SIZE 0x82A7
GL_IMAGE_COMPATIBILITY_CLASS 0x82A8
GL_IMAGE_PIXEL_FORMAT 0x82A9
GL_IMAGE_PIXEL_TYPE 0x82AA
GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC
GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD
GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE
GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF
GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1
GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2
GL_TEXTURE_COMPRESSED_BLOCK_SIZE 0x82B3
GL_CLEAR_BUFFER 0x82B4
GL_TEXTURE_VIEW 0x82B5
GL_VIEW_COMPATIBILITY_CLASS 0x82B6
GL_FULL_SUPPORT 0x82B7
GL_CAVEAT_SUPPORT 0x82B8
GL_IMAGE_CLASS_4_X_32 0x82B9
GL_IMAGE_CLASS_2_X_32 0x82BA
GL_IMAGE_CLASS_1_X_32 0x82BB
GL_IMAGE_CLASS_4_X_16 0x82BC
GL_IMAGE_CLASS_2_X_16 0x82BD
GL_IMAGE_CLASS_1_X_16 0x82BE
GL_IMAGE_CLASS_4_X_8 0x82BF
GL_IMAGE_CLASS_2_X_8 0x82C0
GL_IMAGE_CLASS_1_X_8 0x82C1
GL_IMAGE_CLASS_11_11_10 0x82C2
GL_IMAGE_CLASS_10_10_10_2 0x82C3
GL_VIEW_CLASS_128_BITS 0x82C4
GL_VIEW_CLASS_96_BITS 0x82C5
GL_VIEW_CLASS_64_BITS 0x82C6
GL_VIEW_CLASS_48_BITS 0x82C7
GL_VIEW_CLASS_32_BITS 0x82C8
GL_VIEW_CLASS_24_BITS 0x82C9
GL_VIEW_CLASS_16_BITS 0x82CA
GL_VIEW_CLASS_8_BITS 0x82CB
GL_VIEW_CLASS_S3TC_DXT1_RGB 0x82CC
GL_VIEW_CLASS_S3TC_DXT1_RGBA 0x82CD
GL_VIEW_CLASS_S3TC_DXT3_RGBA 0x82CE
GL_VIEW_CLASS_S3TC_DXT5_RGBA 0x82CF
GL_VIEW_CLASS_RGTC1_RED 0x82D0
GL_VIEW_CLASS_RGTC2_RG 0x82D1
GL_VIEW_CLASS_BPTC_UNORM 0x82D2
GL_VIEW_CLASS_BPTC_FLOAT 0x82D3
void glGetInternalformati64v (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64* params)

View File

@ -0,0 +1,19 @@
GL_ARB_matrix_palette
http://oss.sgi.com/projects/ogl-sample/registry/ARB/matrix_palette.txt
GL_ARB_matrix_palette
GL_MATRIX_PALETTE_ARB 0x8840
GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841
GL_MAX_PALETTE_MATRICES_ARB 0x8842
GL_CURRENT_PALETTE_MATRIX_ARB 0x8843
GL_MATRIX_INDEX_ARRAY_ARB 0x8844
GL_CURRENT_MATRIX_INDEX_ARB 0x8845
GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846
GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847
GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848
GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849
void glCurrentPaletteMatrixARB (GLint index)
void glMatrixIndexPointerARB (GLint size, GLenum type, GLsizei stride, void *pointer)
void glMatrixIndexubvARB (GLint size, GLubyte *indices)
void glMatrixIndexusvARB (GLint size, GLushort *indices)
void glMatrixIndexuivARB (GLint size, GLuint *indices)

View File

@ -0,0 +1,73 @@
GL_ARB_multitexture
http://oss.sgi.com/projects/ogl-sample/registry/ARB/multitexture.txt
GL_ARB_multitexture
GL_TEXTURE0_ARB 0x84C0
GL_TEXTURE1_ARB 0x84C1
GL_TEXTURE2_ARB 0x84C2
GL_TEXTURE3_ARB 0x84C3
GL_TEXTURE4_ARB 0x84C4
GL_TEXTURE5_ARB 0x84C5
GL_TEXTURE6_ARB 0x84C6
GL_TEXTURE7_ARB 0x84C7
GL_TEXTURE8_ARB 0x84C8
GL_TEXTURE9_ARB 0x84C9
GL_TEXTURE10_ARB 0x84CA
GL_TEXTURE11_ARB 0x84CB
GL_TEXTURE12_ARB 0x84CC
GL_TEXTURE13_ARB 0x84CD
GL_TEXTURE14_ARB 0x84CE
GL_TEXTURE15_ARB 0x84CF
GL_TEXTURE16_ARB 0x84D0
GL_TEXTURE17_ARB 0x84D1
GL_TEXTURE18_ARB 0x84D2
GL_TEXTURE19_ARB 0x84D3
GL_TEXTURE20_ARB 0x84D4
GL_TEXTURE21_ARB 0x84D5
GL_TEXTURE22_ARB 0x84D6
GL_TEXTURE23_ARB 0x84D7
GL_TEXTURE24_ARB 0x84D8
GL_TEXTURE25_ARB 0x84D9
GL_TEXTURE26_ARB 0x84DA
GL_TEXTURE27_ARB 0x84DB
GL_TEXTURE28_ARB 0x84DC
GL_TEXTURE29_ARB 0x84DD
GL_TEXTURE30_ARB 0x84DE
GL_TEXTURE31_ARB 0x84DF
GL_ACTIVE_TEXTURE_ARB 0x84E0
GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
GL_MAX_TEXTURE_UNITS_ARB 0x84E2
void glActiveTextureARB (GLenum texture)
void glClientActiveTextureARB (GLenum texture)
void glMultiTexCoord1dARB (GLenum target, GLdouble s)
void glMultiTexCoord1dvARB (GLenum target, const GLdouble *v)
void glMultiTexCoord1fARB (GLenum target, GLfloat s)
void glMultiTexCoord1fvARB (GLenum target, const GLfloat *v)
void glMultiTexCoord1iARB (GLenum target, GLint s)
void glMultiTexCoord1ivARB (GLenum target, const GLint *v)
void glMultiTexCoord1sARB (GLenum target, GLshort s)
void glMultiTexCoord1svARB (GLenum target, const GLshort *v)
void glMultiTexCoord2dARB (GLenum target, GLdouble s, GLdouble t)
void glMultiTexCoord2dvARB (GLenum target, const GLdouble *v)
void glMultiTexCoord2fARB (GLenum target, GLfloat s, GLfloat t)
void glMultiTexCoord2fvARB (GLenum target, const GLfloat *v)
void glMultiTexCoord2iARB (GLenum target, GLint s, GLint t)
void glMultiTexCoord2ivARB (GLenum target, const GLint *v)
void glMultiTexCoord2sARB (GLenum target, GLshort s, GLshort t)
void glMultiTexCoord2svARB (GLenum target, const GLshort *v)
void glMultiTexCoord3dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r)
void glMultiTexCoord3dvARB (GLenum target, const GLdouble *v)
void glMultiTexCoord3fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r)
void glMultiTexCoord3fvARB (GLenum target, const GLfloat *v)
void glMultiTexCoord3iARB (GLenum target, GLint s, GLint t, GLint r)
void glMultiTexCoord3ivARB (GLenum target, const GLint *v)
void glMultiTexCoord3sARB (GLenum target, GLshort s, GLshort t, GLshort r)
void glMultiTexCoord3svARB (GLenum target, const GLshort *v)
void glMultiTexCoord4dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
void glMultiTexCoord4dvARB (GLenum target, const GLdouble *v)
void glMultiTexCoord4fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
void glMultiTexCoord4fvARB (GLenum target, const GLfloat *v)
void glMultiTexCoord4iARB (GLenum target, GLint s, GLint t, GLint r, GLint q)
void glMultiTexCoord4ivARB (GLenum target, const GLint *v)
void glMultiTexCoord4sARB (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
void glMultiTexCoord4svARB (GLenum target, const GLshort *v)

View File

@ -0,0 +1,31 @@
GL_ARB_robustness
http://www.opengl.org/registry/specs/ARB/robustness.txt
GL_ARB_robustness
GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004
GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
GL_GUILTY_CONTEXT_RESET_ARB 0x8253
GL_INNOCENT_CONTEXT_RESET_ARB 0x8254
GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255
GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
GL_NO_RESET_NOTIFICATION_ARB 0x8261
GLenum glGetGraphicsResetStatusARB (void)
void glGetnColorTableARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void* table)
void glGetnCompressedTexImageARB (GLenum target, GLint lod, GLsizei bufSize, void* img)
void glGetnConvolutionFilterARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void* image)
void glGetnHistogramARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void* values)
void glGetnMapdvARB (GLenum target, GLenum query, GLsizei bufSize, GLdouble* v)
void glGetnMapfvARB (GLenum target, GLenum query, GLsizei bufSize, GLfloat* v)
void glGetnMapivARB (GLenum target, GLenum query, GLsizei bufSize, GLint* v)
void glGetnMinmaxARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void* values)
void glGetnPixelMapfvARB (GLenum map, GLsizei bufSize, GLfloat* values)
void glGetnPixelMapuivARB (GLenum map, GLsizei bufSize, GLuint* values)
void glGetnPixelMapusvARB (GLenum map, GLsizei bufSize, GLushort* values)
void glGetnPolygonStippleARB (GLsizei bufSize, GLubyte* pattern)
void glGetnSeparableFilterARB (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void* row, GLsizei columnBufSize, void*column, void*span)
void glGetnTexImageARB (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void* img)
void glGetnUniformdvARB (GLuint program, GLint location, GLsizei bufSize, GLdouble* params)
void glGetnUniformfvARB (GLuint program, GLint location, GLsizei bufSize, GLfloat* params)
void glGetnUniformivARB (GLuint program, GLint location, GLsizei bufSize, GLint* params)
void glGetnUniformuivARB (GLuint program, GLint location, GLsizei bufSize, GLuint* params)
void glReadnPixelsARB (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void* data)

View File

@ -0,0 +1,73 @@
GL_ARB_separate_shader_objects
http://www.opengl.org/registry/specs/ARB/separate_shader_objects.txt
GL_ARB_separate_shader_objects
GL_VERTEX_SHADER_BIT 0x00000001
GL_FRAGMENT_SHADER_BIT 0x00000002
GL_GEOMETRY_SHADER_BIT 0x00000004
GL_TESS_CONTROL_SHADER_BIT 0x00000008
GL_TESS_EVALUATION_SHADER_BIT 0x00000010
GL_PROGRAM_SEPARABLE 0x8258
GL_ACTIVE_PROGRAM 0x8259
GL_PROGRAM_PIPELINE_BINDING 0x825A
GL_ALL_SHADER_BITS 0xFFFFFFFF
void glActiveShaderProgram (GLuint pipeline, GLuint program)
void glBindProgramPipeline (GLuint pipeline)
GLuint glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar * const * strings)
void glDeleteProgramPipelines (GLsizei n, const GLuint* pipelines)
void glGenProgramPipelines (GLsizei n, GLuint* pipelines)
void glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei* length, GLchar *infoLog)
void glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint* params)
GLboolean glIsProgramPipeline (GLuint pipeline)
void glProgramUniform1d (GLuint program, GLint location, GLdouble x)
void glProgramUniform1dv (GLuint program, GLint location, GLsizei count, const GLdouble* value)
void glProgramUniform1f (GLuint program, GLint location, GLfloat x)
void glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat* value)
void glProgramUniform1i (GLuint program, GLint location, GLint x)
void glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint* value)
void glProgramUniform1ui (GLuint program, GLint location, GLuint x)
void glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint* value)
void glProgramUniform2d (GLuint program, GLint location, GLdouble x, GLdouble y)
void glProgramUniform2dv (GLuint program, GLint location, GLsizei count, const GLdouble* value)
void glProgramUniform2f (GLuint program, GLint location, GLfloat x, GLfloat y)
void glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat* value)
void glProgramUniform2i (GLuint program, GLint location, GLint x, GLint y)
void glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint* value)
void glProgramUniform2ui (GLuint program, GLint location, GLuint x, GLuint y)
void glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint* value)
void glProgramUniform3d (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z)
void glProgramUniform3dv (GLuint program, GLint location, GLsizei count, const GLdouble* value)
void glProgramUniform3f (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z)
void glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat* value)
void glProgramUniform3i (GLuint program, GLint location, GLint x, GLint y, GLint z)
void glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint* value)
void glProgramUniform3ui (GLuint program, GLint location, GLuint x, GLuint y, GLuint z)
void glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint* value)
void glProgramUniform4d (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
void glProgramUniform4dv (GLuint program, GLint location, GLsizei count, const GLdouble* value)
void glProgramUniform4f (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
void glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat* value)
void glProgramUniform4i (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w)
void glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint* value)
void glProgramUniform4ui (GLuint program, GLint location, GLuint x, GLuint y, GLuint z, GLuint w)
void glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint* value)
void glProgramUniformMatrix2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value)
void glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
void glProgramUniformMatrix2x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value)
void glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
void glProgramUniformMatrix2x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value)
void glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
void glProgramUniformMatrix3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value)
void glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
void glProgramUniformMatrix3x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value)
void glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
void glProgramUniformMatrix3x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value)
void glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
void glProgramUniformMatrix4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value)
void glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
void glProgramUniformMatrix4x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value)
void glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
void glProgramUniformMatrix4x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value)
void glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
void glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program)
void glValidateProgramPipeline (GLuint pipeline)

View File

@ -0,0 +1,14 @@
GL_ARB_vertex_attrib_64bit
http://www.opengl.org/registry/specs/ARB/vertex_attrib_64bit.txt
GL_ARB_vertex_attrib_64bit
void glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble* params)
void glVertexAttribL1d (GLuint index, GLdouble x)
void glVertexAttribL1dv (GLuint index, const GLdouble* v)
void glVertexAttribL2d (GLuint index, GLdouble x, GLdouble y)
void glVertexAttribL2dv (GLuint index, const GLdouble* v)
void glVertexAttribL3d (GLuint index, GLdouble x, GLdouble y, GLdouble z)
void glVertexAttribL3dv (GLuint index, const GLdouble* v)
void glVertexAttribL4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
void glVertexAttribL4dv (GLuint index, const GLdouble* v)
void glVertexAttribLPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void* pointer)

View File

@ -0,0 +1,56 @@
GL_ARB_vertex_blend
http://oss.sgi.com/projects/ogl-sample/registry/ARB/vertex_blend.txt
GL_ARB_vertex_blend
GL_MAX_VERTEX_UNITS_ARB 0x86A4
GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5
GL_WEIGHT_SUM_UNITY_ARB 0x86A6
GL_VERTEX_BLEND_ARB 0x86A7
GL_CURRENT_WEIGHT_ARB 0x86A8
GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9
GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA
GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB
GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC
GL_WEIGHT_ARRAY_ARB 0x86AD
GL_MODELVIEW0_ARB 0x1700
GL_MODELVIEW1_ARB 0x850A
GL_MODELVIEW2_ARB 0x8722
GL_MODELVIEW3_ARB 0x8723
GL_MODELVIEW4_ARB 0x8724
GL_MODELVIEW5_ARB 0x8725
GL_MODELVIEW6_ARB 0x8726
GL_MODELVIEW7_ARB 0x8727
GL_MODELVIEW8_ARB 0x8728
GL_MODELVIEW9_ARB 0x8729
GL_MODELVIEW10_ARB 0x872A
GL_MODELVIEW11_ARB 0x872B
GL_MODELVIEW12_ARB 0x872C
GL_MODELVIEW13_ARB 0x872D
GL_MODELVIEW14_ARB 0x872E
GL_MODELVIEW15_ARB 0x872F
GL_MODELVIEW16_ARB 0x8730
GL_MODELVIEW17_ARB 0x8731
GL_MODELVIEW18_ARB 0x8732
GL_MODELVIEW19_ARB 0x8733
GL_MODELVIEW20_ARB 0x8734
GL_MODELVIEW21_ARB 0x8735
GL_MODELVIEW22_ARB 0x8736
GL_MODELVIEW23_ARB 0x8737
GL_MODELVIEW24_ARB 0x8738
GL_MODELVIEW25_ARB 0x8739
GL_MODELVIEW26_ARB 0x873A
GL_MODELVIEW27_ARB 0x873B
GL_MODELVIEW28_ARB 0x873C
GL_MODELVIEW29_ARB 0x873D
GL_MODELVIEW30_ARB 0x873E
GL_MODELVIEW31_ARB 0x873F
void glWeightbvARB (GLint size, GLbyte *weights)
void glWeightsvARB (GLint size, GLshort *weights)
void glWeightivARB (GLint size, GLint *weights)
void glWeightfvARB (GLint size, GLfloat *weights)
void glWeightdvARB (GLint size, GLdouble *weights)
void glWeightubvARB (GLint size, GLubyte *weights)
void glWeightusvARB (GLint size, GLushort *weights)
void glWeightuivARB (GLint size, GLuint *weights)
void glWeightPointerARB (GLint size, GLenum type, GLsizei stride, void *pointer)
void glVertexBlendARB (GLint count)

View File

@ -0,0 +1,10 @@
GL_ATIX_point_sprites
http://www.ati.com/developer/atiopengl.pdf
GL_ATIX_point_sprites
GL_TEXTURE_POINT_MODE_ATIX 0x60B0
GL_TEXTURE_POINT_ONE_COORD_ATIX 0x60B1
GL_TEXTURE_POINT_SPRITE_ATIX 0x60B2
GL_POINT_SPRITE_CULL_MODE_ATIX 0x60B3
GL_POINT_SPRITE_CULL_CENTER_ATIX 0x60B4
GL_POINT_SPRITE_CULL_CLIP_ATIX 0x60B5

View File

@ -0,0 +1,7 @@
GL_ATIX_texture_env_combine3
http://www.ati.com/developer/atiopengl.pdf
GL_ATIX_texture_env_combine3
GL_MODULATE_ADD_ATIX 0x8744
GL_MODULATE_SIGNED_ADD_ATIX 0x8745
GL_MODULATE_SUBTRACT_ATIX 0x8746

View File

@ -0,0 +1,7 @@
GL_ATIX_texture_env_route
http://www.ati.com/developer/sdk/RadeonSDK/Html/Info/ATIX_texture_env_route.txt
GL_ATIX_texture_env_route
GL_SECONDARY_COLOR_ATIX 0x8747
GL_TEXTURE_OUTPUT_RGB_ATIX 0x8748
GL_TEXTURE_OUTPUT_ALPHA_ATIX 0x8749

View File

@ -0,0 +1,5 @@
GL_ATIX_vertex_shader_output_point_size
http://www.ati.com/developer/atiopengl.pdf
GL_ATIX_vertex_shader_output_point_size
GL_OUTPUT_POINT_SIZE_ATIX 0x610E

View File

@ -0,0 +1,16 @@
GL_ATI_envmap_bumpmap
http://oss.sgi.com/projects/ogl-sample/registry/ATI/envmap_bumpmap.txt
GL_ATI_envmap_bumpmap
GL_BUMP_ROT_MATRIX_ATI 0x8775
GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776
GL_BUMP_NUM_TEX_UNITS_ATI 0x8777
GL_BUMP_TEX_UNITS_ATI 0x8778
GL_DUDV_ATI 0x8779
GL_DU8DV8_ATI 0x877A
GL_BUMP_ENVMAP_ATI 0x877B
GL_BUMP_TARGET_ATI 0x877C
void glTexBumpParameterivATI (GLenum pname, GLint *param)
void glTexBumpParameterfvATI (GLenum pname, GLfloat *param)
void glGetTexBumpParameterivATI (GLenum pname, GLint *param)
void glGetTexBumpParameterfvATI (GLenum pname, GLfloat *param)

View File

@ -0,0 +1,6 @@
GL_ATI_map_object_buffer
http://www.opengl.org/registry/specs/ATI/map_object_buffer.txt
GL_ATI_map_object_buffer
void * glMapObjectBufferATI (GLuint buffer)
void glUnmapObjectBufferATI (GLuint buffer)

View File

@ -0,0 +1,15 @@
GL_ATI_pn_triangles
http://www.opengl.org/registry/specs/ATI/pn_triangles.txt
GL_ATI_pn_triangles
GL_PN_TRIANGLES_ATI 0x87F0
GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1
GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2
GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3
GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4
GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5
GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6
GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7
GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8
void glPNTrianglesiATI (GLenum pname, GLint param)
void glPNTrianglesfATI (GLenum pname, GLfloat param)

View File

@ -0,0 +1,10 @@
GL_ATI_separate_stencil
http://www.opengl.org/registry/specs/ATI/separate_stencil.txt
GL_ATI_separate_stencil
GL_STENCIL_BACK_FUNC_ATI 0x8800
GL_STENCIL_BACK_FAIL_ATI 0x8801
GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802
GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803
void glStencilOpSeparateATI (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass)
void glStencilFuncSeparateATI (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask)

View File

@ -0,0 +1,4 @@
GL_ATI_shader_texture_lod
GL_ATI_shader_texture_lod

View File

@ -0,0 +1,5 @@
GL_ATI_texture_compression_3dc
GL_ATI_texture_compression_3dc
GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI 0x8837

View File

@ -0,0 +1,59 @@
GL_ATI_vertex_streams
http://www.opengl.org/registry/specs/ATI/vertex_streams.txt
GL_ATI_vertex_streams
GL_MAX_VERTEX_STREAMS_ATI 0x876B
GL_VERTEX_SOURCE_ATI 0x876C
GL_VERTEX_STREAM0_ATI 0x876D
GL_VERTEX_STREAM1_ATI 0x876E
GL_VERTEX_STREAM2_ATI 0x876F
GL_VERTEX_STREAM3_ATI 0x8770
GL_VERTEX_STREAM4_ATI 0x8771
GL_VERTEX_STREAM5_ATI 0x8772
GL_VERTEX_STREAM6_ATI 0x8773
GL_VERTEX_STREAM7_ATI 0x8774
void glClientActiveVertexStreamATI (GLenum stream)
void glVertexBlendEnviATI (GLenum pname, GLint param)
void glVertexBlendEnvfATI (GLenum pname, GLfloat param)
void glVertexStream1sATI (GLenum stream, GLshort x)
void glVertexStream1svATI (GLenum stream, const GLshort *coords)
void glVertexStream1iATI (GLenum stream, GLint x)
void glVertexStream1ivATI (GLenum stream, const GLint *coords)
void glVertexStream1fATI (GLenum stream, GLfloat x)
void glVertexStream1fvATI (GLenum stream, const GLfloat *coords)
void glVertexStream1dATI (GLenum stream, GLdouble x)
void glVertexStream1dvATI (GLenum stream, const GLdouble *coords)
void glVertexStream2sATI (GLenum stream, GLshort x, GLshort y)
void glVertexStream2svATI (GLenum stream, const GLshort *coords)
void glVertexStream2iATI (GLenum stream, GLint x, GLint y)
void glVertexStream2ivATI (GLenum stream, const GLint *coords)
void glVertexStream2fATI (GLenum stream, GLfloat x, GLfloat y)
void glVertexStream2fvATI (GLenum stream, const GLfloat *coords)
void glVertexStream2dATI (GLenum stream, GLdouble x, GLdouble y)
void glVertexStream2dvATI (GLenum stream, const GLdouble *coords)
void glVertexStream3sATI (GLenum stream, GLshort x, GLshort y, GLshort z)
void glVertexStream3svATI (GLenum stream, const GLshort *coords)
void glVertexStream3iATI (GLenum stream, GLint x, GLint y, GLint z)
void glVertexStream3ivATI (GLenum stream, const GLint *coords)
void glVertexStream3fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z)
void glVertexStream3fvATI (GLenum stream, const GLfloat *coords)
void glVertexStream3dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z)
void glVertexStream3dvATI (GLenum stream, const GLdouble *coords)
void glVertexStream4sATI (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w)
void glVertexStream4svATI (GLenum stream, const GLshort *coords)
void glVertexStream4iATI (GLenum stream, GLint x, GLint y, GLint z, GLint w)
void glVertexStream4ivATI (GLenum stream, const GLint *coords)
void glVertexStream4fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
void glVertexStream4fvATI (GLenum stream, const GLfloat *coords)
void glVertexStream4dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
void glVertexStream4dvATI (GLenum stream, const GLdouble *coords)
void glNormalStream3bATI (GLenum stream, GLbyte x, GLbyte y, GLbyte z)
void glNormalStream3bvATI (GLenum stream, const GLbyte *coords)
void glNormalStream3sATI (GLenum stream, GLshort x, GLshort y, GLshort z)
void glNormalStream3svATI (GLenum stream, const GLshort *coords)
void glNormalStream3iATI (GLenum stream, GLint x, GLint y, GLint z)
void glNormalStream3ivATI (GLenum stream, const GLint *coords)
void glNormalStream3fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z)
void glNormalStream3fvATI (GLenum stream, const GLfloat *coords)
void glNormalStream3dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z)
void glNormalStream3dvATI (GLenum stream, const GLdouble *coords)

View File

@ -0,0 +1,6 @@
GL_EXT_Cg_shader
http://download.nvidia.com/developer/GLSL/GLSL%20Release%20Notes%20for%20Release%2060.pdf
GL_EXT_Cg_shader
GL_CG_VERTEX_SHADER_EXT 0x890E
GL_CG_FRAGMENT_SHADER_EXT 0x890F

View File

@ -0,0 +1,13 @@
GL_EXT_bindable_uniform
http://developer.download.nvidia.com/opengl/specs/GL_EXT_bindable_uniform.txt
GL_EXT_bindable_uniform
GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2
GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3
GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4
GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED
GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF
GL_UNIFORM_BUFFER_EXT 0x8DEE
void glUniformBufferEXT (GLuint program, GLint location, GLuint buffer)
GLint glGetUniformBufferSizeEXT (GLuint program, GLint location)
GLintptr glGetUniformOffsetEXT (GLuint program, GLint location)

View File

@ -0,0 +1,7 @@
GL_EXT_debug_marker
http://www.khronos.org/registry/gles/extensions/EXT/EXT_debug_marker.txt
GL_EXT_debug_marker
void glInsertEventMarkerEXT (GLsizei length, const GLchar* marker)
void glPushGroupMarkerEXT (GLsizei length, const GLchar* marker)
void glPopGroupMarkerEXT (void)

View File

@ -0,0 +1,7 @@
GL_EXT_depth_bounds_test
http://www.nvidia.com/dev_content/nvopenglspecs/GL_EXT_depth_bounds_test.txt
GL_EXT_depth_bounds_test
GL_DEPTH_BOUNDS_TEST_EXT 0x8890
GL_DEPTH_BOUNDS_EXT 0x8891
void glDepthBoundsEXT (GLclampd zmin, GLclampd zmax)

View File

@ -0,0 +1,6 @@
GL_EXT_draw_instanced
http://developer.download.nvidia.com/opengl/specs/GL_EXT_draw_instanced.txt
GL_EXT_draw_instanced
void glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount)
void glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount)

View File

@ -0,0 +1,7 @@
GL_EXT_draw_range_elements
http://oss.sgi.com/projects/ogl-sample/registry/EXT/draw_range_elements.txt
GL_EXT_draw_range_elements
GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8
GL_MAX_ELEMENTS_INDICES_EXT 0x80E9
void glDrawRangeElementsEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices)

View File

@ -0,0 +1,7 @@
GL_EXT_external_buffer
http://www.opengl.org/registry/specs/EXT/external_buffer.txt
GL_EXT_external_buffer
void glBufferStorageExternalEXT (GLenum target, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, GLbitfield flags)
void glNamedBufferStorageExternalEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, GLbitfield flags)
typedef void* GLeglClientBufferEXT

View File

@ -0,0 +1,17 @@
GL_EXT_fog_coord
http://oss.sgi.com/projects/ogl-sample/registry/EXT/fog_coord.txt
GL_EXT_fog_coord
GL_FOG_COORDINATE_SOURCE_EXT 0x8450
GL_FOG_COORDINATE_EXT 0x8451
GL_FRAGMENT_DEPTH_EXT 0x8452
GL_CURRENT_FOG_COORDINATE_EXT 0x8453
GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454
GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455
GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456
GL_FOG_COORDINATE_ARRAY_EXT 0x8457
void glFogCoordfEXT (GLfloat coord)
void glFogCoordfvEXT (const GLfloat *coord)
void glFogCoorddEXT (GLdouble coord)
void glFogCoorddvEXT (const GLdouble *coord)
void glFogCoordPointerEXT (GLenum type, GLsizei stride, const void *pointer)

View File

@ -0,0 +1,6 @@
GL_EXT_framebuffer_sRGB
http://developer.download.nvidia.com/opengl/specs/GL_EXT_framebuffer_sRGB.txt
GL_EXT_framebuffer_sRGB
GL_FRAMEBUFFER_SRGB_EXT 0x8DB9
GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA

View File

@ -0,0 +1,27 @@
GL_EXT_geometry_shader4
http://developer.download.nvidia.com/opengl/specs/GL_EXT_geometry_shader4.txt
GL_EXT_geometry_shader4
GL_GEOMETRY_SHADER_EXT 0x8DD9
GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD
GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE
GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B
GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA
GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB
GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC
GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
GL_LINES_ADJACENCY_EXT 0xA
GL_LINE_STRIP_ADJACENCY_EXT 0xB
GL_TRIANGLES_ADJACENCY_EXT 0xC
GL_TRIANGLE_STRIP_ADJACENCY_EXT 0xD
GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9
GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
GL_PROGRAM_POINT_SIZE_EXT 0x8642
void glProgramParameteriEXT (GLuint program, GLenum pname, GLint value)
void glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level)
void glFramebufferTextureFaceEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face)

View File

@ -0,0 +1,6 @@
GL_EXT_gpu_program_parameters
http://developer.download.nvidia.com/opengl/specs/GL_EXT_gpu_program_parameters.txt
GL_EXT_gpu_program_parameters
void glProgramEnvParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat* params)
void glProgramLocalParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat* params)

View File

@ -0,0 +1,64 @@
GL_EXT_gpu_shader4
http://developer.download.nvidia.com/opengl/specs/GL_EXT_gpu_shader4.txt
GL_EXT_gpu_shader4
GL_SAMPLER_1D_ARRAY_EXT 0x8DC0
GL_SAMPLER_2D_ARRAY_EXT 0x8DC1
GL_SAMPLER_BUFFER_EXT 0x8DC2
GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3
GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4
GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5
GL_UNSIGNED_INT_VEC2_EXT 0x8DC6
GL_UNSIGNED_INT_VEC3_EXT 0x8DC7
GL_UNSIGNED_INT_VEC4_EXT 0x8DC8
GL_INT_SAMPLER_1D_EXT 0x8DC9
GL_INT_SAMPLER_2D_EXT 0x8DCA
GL_INT_SAMPLER_3D_EXT 0x8DCB
GL_INT_SAMPLER_CUBE_EXT 0x8DCC
GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD
GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE
GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF
GL_INT_SAMPLER_BUFFER_EXT 0x8DD0
GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1
GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2
GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3
GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4
GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5
GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6
GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7
GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8
GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT 0x88FD
void glGetUniformuivEXT (GLuint program, GLint location, GLuint *params)
void glBindFragDataLocationEXT (GLuint program, GLuint color, const GLchar *name)
GLint glGetFragDataLocationEXT (GLuint program, const GLchar *name)
void glUniform1uiEXT (GLint location, GLuint v0)
void glUniform2uiEXT (GLint location, GLuint v0, GLuint v1)
void glUniform3uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2)
void glUniform4uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
void glUniform1uivEXT (GLint location, GLsizei count, const GLuint *value)
void glUniform2uivEXT (GLint location, GLsizei count, const GLuint *value)
void glUniform3uivEXT (GLint location, GLsizei count, const GLuint *value)
void glUniform4uivEXT (GLint location, GLsizei count, const GLuint *value)
void glVertexAttribI1iEXT (GLuint index, GLint x)
void glVertexAttribI2iEXT (GLuint index, GLint x, GLint y)
void glVertexAttribI3iEXT (GLuint index, GLint x, GLint y, GLint z)
void glVertexAttribI4iEXT (GLuint index, GLint x, GLint y, GLint z, GLint w)
void glVertexAttribI1uiEXT (GLuint index, GLuint x)
void glVertexAttribI2uiEXT (GLuint index, GLuint x, GLuint y)
void glVertexAttribI3uiEXT (GLuint index, GLuint x, GLuint y, GLuint z)
void glVertexAttribI4uiEXT (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
void glVertexAttribI1ivEXT (GLuint index, const GLint *v)
void glVertexAttribI2ivEXT (GLuint index, const GLint *v)
void glVertexAttribI3ivEXT (GLuint index, const GLint *v)
void glVertexAttribI4ivEXT (GLuint index, const GLint *v)
void glVertexAttribI1uivEXT (GLuint index, const GLuint *v)
void glVertexAttribI2uivEXT (GLuint index, const GLuint *v)
void glVertexAttribI3uivEXT (GLuint index, const GLuint *v)
void glVertexAttribI4uivEXT (GLuint index, const GLuint *v)
void glVertexAttribI4bvEXT (GLuint index, const GLbyte *v)
void glVertexAttribI4svEXT (GLuint index, const GLshort *v)
void glVertexAttribI4ubvEXT (GLuint index, const GLubyte *v)
void glVertexAttribI4usvEXT (GLuint index, const GLushort *v)
void glVertexAttribIPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer)
void glGetVertexAttribIivEXT (GLuint index, GLenum pname, GLint *params)
void glGetVertexAttribIuivEXT (GLuint index, GLenum pname, GLuint *params)

View File

@ -0,0 +1,41 @@
GL_EXT_memory_object
http://www.opengl.org/registry/specs/EXT/external_objects.txt
GL_EXT_memory_object
GL_UUID_SIZE_EXT 16
GL_TEXTURE_TILING_EXT 0x9580
GL_DEDICATED_MEMORY_OBJECT_EXT 0x9581
GL_NUM_TILING_TYPES_EXT 0x9582
GL_TILING_TYPES_EXT 0x9583
GL_OPTIMAL_TILING_EXT 0x9584
GL_LINEAR_TILING_EXT 0x9585
GL_LAYOUT_GENERAL_EXT 0x958D
GL_LAYOUT_COLOR_ATTACHMENT_EXT 0x958E
GL_LAYOUT_DEPTH_STENCIL_ATTACHMENT_EXT 0x958F
GL_LAYOUT_DEPTH_STENCIL_READ_ONLY_EXT 0x9590
GL_LAYOUT_SHADER_READ_ONLY_EXT 0x9591
GL_LAYOUT_TRANSFER_SRC_EXT 0x9592
GL_LAYOUT_TRANSFER_DST_EXT 0x9593
GL_NUM_DEVICE_UUIDS_EXT 0x9596
GL_DEVICE_UUID_EXT 0x9597
GL_DRIVER_UUID_EXT 0x9598
GL_PROTECTED_MEMORY_OBJECT_EXT 0x959B
void glBufferStorageMemEXT (GLenum target, GLsizeiptr size, GLuint memory, GLuint64 offset)
void glCreateMemoryObjectsEXT (GLsizei n, GLuint* memoryObjects)
void glDeleteMemoryObjectsEXT (GLsizei n, const GLuint* memoryObjects)
void glGetMemoryObjectParameterivEXT (GLuint memoryObject, GLenum pname, GLint* params)
void glGetUnsignedBytei_vEXT (GLenum target, GLuint index, GLubyte* data)
void glGetUnsignedBytevEXT (GLenum pname, GLubyte* data)
GLboolean glIsMemoryObjectEXT (GLuint memoryObject)
void glMemoryObjectParameterivEXT (GLuint memoryObject, GLenum pname, const GLint* params)
void glNamedBufferStorageMemEXT (GLuint buffer, GLsizeiptr size, GLuint memory, GLuint64 offset)
void glTexStorageMem1DEXT (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLuint memory, GLuint64 offset)
void glTexStorageMem2DEXT (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset)
void glTexStorageMem2DMultisampleEXT (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset)
void glTexStorageMem3DEXT (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset)
void glTexStorageMem3DMultisampleEXT (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset)
void glTextureStorageMem1DEXT (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLuint memory, GLuint64 offset)
void glTextureStorageMem2DEXT (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset)
void glTextureStorageMem2DMultisampleEXT (GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset)
void glTextureStorageMem3DEXT (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset)
void glTextureStorageMem3DMultisampleEXT (GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset)

View File

@ -0,0 +1,6 @@
GL_EXT_memory_object_fd
http://www.opengl.org/registry/specs/EXT/external_objects_fd.txt
GL_EXT_memory_object_fd
GL_HANDLE_TYPE_OPAQUE_FD_EXT 0x9586
void glImportMemoryFdEXT (GLuint memory, GLuint64 size, GLenum handleType, GLint fd)

View File

@ -0,0 +1,17 @@
GL_EXT_memory_object_win32
http://www.opengl.org/registry/specs/EXT/external_objects_win32.txt
GL_EXT_memory_object_win32
GL_LUID_SIZE_EXT 8
GL_HANDLE_TYPE_OPAQUE_WIN32_EXT 0x9587
GL_HANDLE_TYPE_OPAQUE_WIN32_KMT_EXT 0x9588
GL_HANDLE_TYPE_D3D12_TILEPOOL_EXT 0x9589
GL_HANDLE_TYPE_D3D12_RESOURCE_EXT 0x958A
GL_HANDLE_TYPE_D3D11_IMAGE_EXT 0x958B
GL_HANDLE_TYPE_D3D11_IMAGE_KMT_EXT 0x958C
GL_HANDLE_TYPE_D3D12_FENCE_EXT 0x9594
GL_D3D12_FENCE_VALUE_EXT 0x9595
GL_DEVICE_LUID_EXT 0x9599
GL_DEVICE_NODE_MASK_EXT 0x959A
void glImportMemoryWin32HandleEXT (GLuint memory, GLuint64 size, GLenum handleType, void *handle)
void glImportMemoryWin32NameEXT (GLuint memory, GLuint64 size, GLenum handleType, const void *name)

View File

@ -0,0 +1,7 @@
GL_EXT_packed_float
http://developer.download.nvidia.com/opengl/specs/GL_EXT_packed_float.txt
GL_EXT_packed_float
GL_R11F_G11F_B10F_EXT 0x8C3A
GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B
GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C

View File

@ -0,0 +1,8 @@
GL_EXT_pixel_buffer_object
http://www.nvidia.com/dev_content/nvopenglspecs/GL_EXT_pixel_buffer_object.txt
GL_EXT_pixel_buffer_object
GL_PIXEL_PACK_BUFFER_EXT 0x88EB
GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC
GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED
GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF

View File

@ -0,0 +1,28 @@
GL_EXT_secondary_color
http://oss.sgi.com/projects/ogl-sample/registry/EXT/secondary_color.txt
GL_EXT_secondary_color
GL_COLOR_SUM_EXT 0x8458
GL_CURRENT_SECONDARY_COLOR_EXT 0x8459
GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A
GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B
GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C
GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D
GL_SECONDARY_COLOR_ARRAY_EXT 0x845E
void glSecondaryColor3bEXT (GLbyte red, GLbyte green, GLbyte blue)
void glSecondaryColor3bvEXT (const GLbyte *v)
void glSecondaryColor3dEXT (GLdouble red, GLdouble green, GLdouble blue)
void glSecondaryColor3dvEXT (const GLdouble *v)
void glSecondaryColor3fEXT (GLfloat red, GLfloat green, GLfloat blue)
void glSecondaryColor3fvEXT (const GLfloat *v)
void glSecondaryColor3iEXT (GLint red, GLint green, GLint blue)
void glSecondaryColor3ivEXT (const GLint *v)
void glSecondaryColor3sEXT (GLshort red, GLshort green, GLshort blue)
void glSecondaryColor3svEXT (const GLshort *v)
void glSecondaryColor3ubEXT (GLubyte red, GLubyte green, GLubyte blue)
void glSecondaryColor3ubvEXT (const GLubyte *v)
void glSecondaryColor3uiEXT (GLuint red, GLuint green, GLuint blue)
void glSecondaryColor3uivEXT (const GLuint *v)
void glSecondaryColor3usEXT (GLushort red, GLushort green, GLushort blue)
void glSecondaryColor3usvEXT (const GLushort *v)
void glSecondaryColorPointerEXT (GLint size, GLenum type, GLsizei stride, const void *pointer)

Some files were not shown because too many files have changed in this diff Show More