Compare commits
36 Commits
intel_2009
...
mesa_7_2_r
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
419353dc2f | ||
|
|
38d3b2262b | ||
|
|
4db2a7f36c | ||
|
|
1145042fd2 | ||
|
|
772131280a | ||
|
|
ee913c0fcc | ||
|
|
cd1804c43a | ||
|
|
253784d45e | ||
|
|
463d19d477 | ||
|
|
6e4fd90ca5 | ||
|
|
06188c0c5c | ||
|
|
dec9097647 | ||
|
|
e234339dba | ||
|
|
bb09d23e92 | ||
|
|
1ffbcddb6f | ||
|
|
33cf8f5c06 | ||
|
|
7b8d878bed | ||
|
|
86ae34fbb4 | ||
|
|
16f3461fd6 | ||
|
|
0ac8886b51 | ||
|
|
1729d37223 | ||
|
|
81edef6f9f | ||
|
|
e040e18c7b | ||
|
|
14d186644b | ||
|
|
e4535e4d5e | ||
|
|
a008813890 | ||
|
|
da50dc7bb3 | ||
|
|
7f628d9cbc | ||
|
|
b2ffd0be03 | ||
|
|
912b16c689 | ||
|
|
6d9b25e522 | ||
|
|
31bad23f0f | ||
|
|
29b9b25e72 | ||
|
|
e794f496c6 | ||
|
|
68067c66d3 | ||
|
|
ad5474e995 |
29
Makefile
29
Makefile
@@ -174,10 +174,10 @@ ultrix-gcc:
|
|||||||
|
|
||||||
# Rules for making release tarballs
|
# Rules for making release tarballs
|
||||||
|
|
||||||
DIRECTORY = Mesa-7.4
|
DIRECTORY = Mesa-7.2-rc1
|
||||||
LIB_NAME = MesaLib-7.4
|
LIB_NAME = MesaLib-7.2-rc1
|
||||||
DEMO_NAME = MesaDemos-7.4
|
DEMO_NAME = MesaDemos-7.2-rc1
|
||||||
GLUT_NAME = MesaGLUT-7.4
|
GLUT_NAME = MesaGLUT-7.2-rc1
|
||||||
|
|
||||||
MAIN_FILES = \
|
MAIN_FILES = \
|
||||||
$(DIRECTORY)/Makefile* \
|
$(DIRECTORY)/Makefile* \
|
||||||
@@ -200,7 +200,9 @@ MAIN_FILES = \
|
|||||||
$(DIRECTORY)/docs/RELNOTES* \
|
$(DIRECTORY)/docs/RELNOTES* \
|
||||||
$(DIRECTORY)/docs/*.spec \
|
$(DIRECTORY)/docs/*.spec \
|
||||||
$(DIRECTORY)/include/GL/internal/glcore.h \
|
$(DIRECTORY)/include/GL/internal/glcore.h \
|
||||||
|
$(DIRECTORY)/include/GL/amesa.h \
|
||||||
$(DIRECTORY)/include/GL/dmesa.h \
|
$(DIRECTORY)/include/GL/dmesa.h \
|
||||||
|
$(DIRECTORY)/include/GL/fxmesa.h \
|
||||||
$(DIRECTORY)/include/GL/ggimesa.h \
|
$(DIRECTORY)/include/GL/ggimesa.h \
|
||||||
$(DIRECTORY)/include/GL/gl.h \
|
$(DIRECTORY)/include/GL/gl.h \
|
||||||
$(DIRECTORY)/include/GL/glext.h \
|
$(DIRECTORY)/include/GL/glext.h \
|
||||||
@@ -215,15 +217,19 @@ MAIN_FILES = \
|
|||||||
$(DIRECTORY)/include/GL/mglmesa.h \
|
$(DIRECTORY)/include/GL/mglmesa.h \
|
||||||
$(DIRECTORY)/include/GL/osmesa.h \
|
$(DIRECTORY)/include/GL/osmesa.h \
|
||||||
$(DIRECTORY)/include/GL/svgamesa.h \
|
$(DIRECTORY)/include/GL/svgamesa.h \
|
||||||
|
$(DIRECTORY)/include/GL/ugl*.h \
|
||||||
$(DIRECTORY)/include/GL/vms_x_fix.h \
|
$(DIRECTORY)/include/GL/vms_x_fix.h \
|
||||||
$(DIRECTORY)/include/GL/wmesa.h \
|
$(DIRECTORY)/include/GL/wmesa.h \
|
||||||
|
$(DIRECTORY)/include/GL/xmesa.h \
|
||||||
|
$(DIRECTORY)/include/GL/xmesa_x.h \
|
||||||
|
$(DIRECTORY)/include/GL/xmesa_xf86.h \
|
||||||
|
$(DIRECTORY)/include/GLView.h \
|
||||||
$(DIRECTORY)/src/Makefile \
|
$(DIRECTORY)/src/Makefile \
|
||||||
$(DIRECTORY)/src/descrip.mms \
|
$(DIRECTORY)/src/descrip.mms \
|
||||||
$(DIRECTORY)/src/mesa/Makefile* \
|
$(DIRECTORY)/src/mesa/Makefile* \
|
||||||
$(DIRECTORY)/src/mesa/sources \
|
$(DIRECTORY)/src/mesa/sources \
|
||||||
$(DIRECTORY)/src/mesa/descrip.mms \
|
$(DIRECTORY)/src/mesa/descrip.mms \
|
||||||
$(DIRECTORY)/src/mesa/gl.pc.in \
|
$(DIRECTORY)/src/mesa/gl.pc.in \
|
||||||
$(DIRECTORY)/src/mesa/osmesa.pc.in \
|
|
||||||
$(DIRECTORY)/src/mesa/depend \
|
$(DIRECTORY)/src/mesa/depend \
|
||||||
$(DIRECTORY)/src/mesa/main/*.[chS] \
|
$(DIRECTORY)/src/mesa/main/*.[chS] \
|
||||||
$(DIRECTORY)/src/mesa/main/descrip.mms \
|
$(DIRECTORY)/src/mesa/main/descrip.mms \
|
||||||
@@ -281,8 +287,6 @@ MAIN_FILES = \
|
|||||||
$(DIRECTORY)/src/mesa/drivers/x11/Makefile \
|
$(DIRECTORY)/src/mesa/drivers/x11/Makefile \
|
||||||
$(DIRECTORY)/src/mesa/drivers/x11/descrip.mms \
|
$(DIRECTORY)/src/mesa/drivers/x11/descrip.mms \
|
||||||
$(DIRECTORY)/src/mesa/drivers/x11/*.[ch] \
|
$(DIRECTORY)/src/mesa/drivers/x11/*.[ch] \
|
||||||
$(DIRECTORY)/src/mesa/drivers/glslcompiler/Makefile \
|
|
||||||
$(DIRECTORY)/src/mesa/drivers/glslcompiler/glslcompiler.c \
|
|
||||||
$(DIRECTORY)/src/mesa/ppc/*.[ch] \
|
$(DIRECTORY)/src/mesa/ppc/*.[ch] \
|
||||||
$(DIRECTORY)/src/mesa/sparc/*.[chS] \
|
$(DIRECTORY)/src/mesa/sparc/*.[chS] \
|
||||||
$(DIRECTORY)/src/mesa/x86/Makefile \
|
$(DIRECTORY)/src/mesa/x86/Makefile \
|
||||||
@@ -298,12 +302,19 @@ MAIN_FILES = \
|
|||||||
$(DIRECTORY)/vms/analyze_map.com \
|
$(DIRECTORY)/vms/analyze_map.com \
|
||||||
$(DIRECTORY)/vms/xlib.opt \
|
$(DIRECTORY)/vms/xlib.opt \
|
||||||
$(DIRECTORY)/vms/xlib_share.opt \
|
$(DIRECTORY)/vms/xlib_share.opt \
|
||||||
$(DIRECTORY)/windows/VC8/
|
$(DIRECTORY)/windows/VC8/mesa/mesa.sln \
|
||||||
|
$(DIRECTORY)/windows/VC8/mesa/gdi/gdi.vcproj \
|
||||||
|
$(DIRECTORY)/windows/VC8/mesa/glu/glu.vcproj \
|
||||||
|
$(DIRECTORY)/windows/VC8/mesa/mesa/mesa.vcproj \
|
||||||
|
$(DIRECTORY)/windows/VC8/mesa/osmesa/osmesa.vcproj \
|
||||||
|
$(DIRECTORY)/windows/VC8/progs/progs.sln \
|
||||||
|
$(DIRECTORY)/windows/VC8/progs/demos/gears.vcproj \
|
||||||
|
$(DIRECTORY)/windows/VC8/progs/glut/glut.vcproj
|
||||||
|
|
||||||
|
|
||||||
DRI_FILES = \
|
DRI_FILES = \
|
||||||
$(DIRECTORY)/include/GL/internal/dri_interface.h \
|
$(DIRECTORY)/include/GL/internal/dri_interface.h \
|
||||||
$(DIRECTORY)/include/GL/internal/glcore.h \
|
$(DIRECTORY)/include/GL/internal/dri_sarea.h \
|
||||||
$(DIRECTORY)/include/GL/internal/sarea.h \
|
$(DIRECTORY)/include/GL/internal/sarea.h \
|
||||||
$(DIRECTORY)/src/glx/Makefile \
|
$(DIRECTORY)/src/glx/Makefile \
|
||||||
$(DIRECTORY)/src/glx/x11/Makefile \
|
$(DIRECTORY)/src/glx/x11/Makefile \
|
||||||
|
|||||||
24
bin/mklib
24
bin/mklib
@@ -260,31 +260,9 @@ case $ARCH in
|
|||||||
OPTS=${ALTOPTS}
|
OPTS=${ALTOPTS}
|
||||||
fi
|
fi
|
||||||
rm -f ${LIBNAME}
|
rm -f ${LIBNAME}
|
||||||
|
|
||||||
# expand any .a objects into constituent .o files.
|
|
||||||
NEWOBJECTS=""
|
|
||||||
DELETIA=""
|
|
||||||
for OBJ in ${OBJECTS} ; do
|
|
||||||
if [ `expr match $OBJ '.*\.a'` -gt 0 ] ; then
|
|
||||||
# extract the .o files from this .a archive
|
|
||||||
FILES=`ar t $OBJ`
|
|
||||||
ar x $OBJ
|
|
||||||
NEWOBJECTS="$NEWOBJECTS $FILES"
|
|
||||||
# keep track of temporary .o files and delete them below
|
|
||||||
DELETIA="$DELETIA $FILES"
|
|
||||||
else
|
|
||||||
# ordinary .o file
|
|
||||||
NEWOBJECTS="$NEWOBJECTS $OBJ"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# make lib
|
# make lib
|
||||||
${LINK} ${OPTS} ${LIBNAME} ${NEWOBJECTS}
|
${LINK} ${OPTS} ${LIBNAME} ${OBJECTS}
|
||||||
ranlib ${LIBNAME}
|
ranlib ${LIBNAME}
|
||||||
|
|
||||||
# remove temporary extracted .o files
|
|
||||||
rm -f ${DELETIA}
|
|
||||||
|
|
||||||
# finish up
|
# finish up
|
||||||
FINAL_LIBS=${LIBNAME}
|
FINAL_LIBS=${LIBNAME}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -86,7 +86,6 @@ APP_LIB_DEPS = $(EXTRA_LIB_PATH) @APP_LIB_DEPS@
|
|||||||
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) @DRI_LIB_DEPS@
|
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) @DRI_LIB_DEPS@
|
||||||
LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
|
LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
|
||||||
LIBDRM_LIB = @LIBDRM_LIBS@
|
LIBDRM_LIB = @LIBDRM_LIBS@
|
||||||
DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
|
|
||||||
EXPAT_INCLUDES = @EXPAT_INCLUDES@
|
EXPAT_INCLUDES = @EXPAT_INCLUDES@
|
||||||
|
|
||||||
# Autoconf directories
|
# Autoconf directories
|
||||||
@@ -105,21 +104,3 @@ DRI_DRIVER_INSTALL_DIR = @DRI_DRIVER_INSTALL_DIR@
|
|||||||
|
|
||||||
# Where libGL will look for DRI hardware drivers
|
# Where libGL will look for DRI hardware drivers
|
||||||
DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
|
DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
|
||||||
|
|
||||||
# pkg-config substitutions
|
|
||||||
GL_PC_REQ_PRIV = @GL_PC_REQ_PRIV@
|
|
||||||
GL_PC_LIB_PRIV = @GL_PC_LIB_PRIV@
|
|
||||||
GL_PC_CFLAGS = @GL_PC_CFLAGS@
|
|
||||||
DRI_PC_REQ_PRIV = @DRI_PC_REQ_PRIV@
|
|
||||||
GLU_PC_REQ = @GLU_PC_REQ@
|
|
||||||
GLU_PC_REQ_PRIV = @GLU_PC_REQ_PRIV@
|
|
||||||
GLU_PC_LIB_PRIV = @GLU_PC_LIB_PRIV@
|
|
||||||
GLU_PC_CFLAGS = @GLU_PC_CFLAGS@
|
|
||||||
GLUT_PC_REQ_PRIV = @GLUT_PC_REQ_PRIV@
|
|
||||||
GLUT_PC_LIB_PRIV = @GLUT_PC_LIB_PRIV@
|
|
||||||
GLUT_PC_CFLAGS = @GLUT_PC_CFLAGS@
|
|
||||||
GLW_PC_REQ_PRIV = @GLW_PC_REQ_PRIV@
|
|
||||||
GLW_PC_LIB_PRIV = @GLW_PC_LIB_PRIV@
|
|
||||||
GLW_PC_CFLAGS = @GLW_PC_CFLAGS@
|
|
||||||
OSMESA_PC_REQ = @OSMESA_PC_REQ@
|
|
||||||
OSMESA_PC_LIB_PRIV = @OSMESA_PC_LIB_PRIV@
|
|
||||||
|
|||||||
@@ -12,17 +12,17 @@ CXX = gcc
|
|||||||
PIC_FLAGS = -fPIC
|
PIC_FLAGS = -fPIC
|
||||||
DEFINES = -D_DARWIN_C_SOURCE -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L \
|
DEFINES = -D_DARWIN_C_SOURCE -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L \
|
||||||
-D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -DPTHREADS \
|
-D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -DPTHREADS \
|
||||||
-DGLX_ALIAS_UNSUPPORTED -DGLX_INDIRECT_RENDERING
|
-DGLX_INDIRECT_RENDERING \
|
||||||
|
-DGLX_ALIAS_UNSUPPORTED
|
||||||
|
|
||||||
# -DGLX_DIRECT_RENDERING - pulls in libdrm stuff in glx/x11
|
# -DGLX_DIRECT_RENDERING - pulls in libdrm stuff in glx/x11
|
||||||
# -DGLX_USE_APPLEGL - supposed to be used with GLX_DIRECT_RENDERING to use AGL rather than DRM, but doesn't compile
|
|
||||||
# -DIN_DRI_DRIVER
|
# -DIN_DRI_DRIVER
|
||||||
|
|
||||||
ARCH_FLAGS += $(RC_CFLAGS)
|
ARCH_FLAGS += $(RC_CFLAGS)
|
||||||
|
|
||||||
CFLAGS = -ggdb3 -Os -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing \
|
CFLAGS = -g -O2 -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing \
|
||||||
-I$(INSTALL_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
|
-I$(INSTALL_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
|
||||||
CXXFLAGS = -ggdb3 -Os -Wall -fno-strict-aliasing \
|
CXXFLAGS = -g -O2 -Wall -fno-strict-aliasing \
|
||||||
-I$(INSTALL_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
|
-I$(INSTALL_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
|
||||||
|
|
||||||
# Library names (actual file names)
|
# Library names (actual file names)
|
||||||
@@ -47,7 +47,7 @@ GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -lX11
|
|||||||
APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -lX11 -lXmu -lXt -lXi -lm
|
APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -lX11 -lXmu -lXt -lXi -lm
|
||||||
|
|
||||||
# omit glw lib for now:
|
# omit glw lib for now:
|
||||||
SRC_DIRS = glx/x11 mesa glu glut/glx
|
SRC_DIRS = glx/x11 mesa glu glw glut/glx
|
||||||
GLU_DIRS = sgi
|
GLU_DIRS = sgi
|
||||||
DRIVER_DIRS = osmesa
|
DRIVER_DIRS = osmesa
|
||||||
#DRIVER_DIRS = dri
|
#DRIVER_DIRS = dri
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ CONFIG_NAME = default
|
|||||||
|
|
||||||
# Version info
|
# Version info
|
||||||
MESA_MAJOR=7
|
MESA_MAJOR=7
|
||||||
MESA_MINOR=3
|
MESA_MINOR=2
|
||||||
MESA_TINY=0
|
MESA_TINY=0
|
||||||
MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
|
MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
|
||||||
|
|
||||||
@@ -100,20 +100,3 @@ DRI_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/dri
|
|||||||
# Where libGL will look for DRI hardware drivers
|
# Where libGL will look for DRI hardware drivers
|
||||||
DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
|
DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
|
||||||
|
|
||||||
# pkg-config substitutions
|
|
||||||
GL_PC_REQ_PRIV =
|
|
||||||
GL_PC_LIB_PRIV =
|
|
||||||
GL_PC_CFLAGS =
|
|
||||||
DRI_PC_REQ_PRIV =
|
|
||||||
GLU_PC_REQ = gl
|
|
||||||
GLU_PC_REQ_PRIV =
|
|
||||||
GLU_PC_LIB_PRIV =
|
|
||||||
GLU_PC_CFLAGS =
|
|
||||||
GLUT_PC_REQ_PRIV =
|
|
||||||
GLUT_PC_LIB_PRIV =
|
|
||||||
GLUT_PC_CFLAGS =
|
|
||||||
GLW_PC_REQ_PRIV =
|
|
||||||
GLW_PC_LIB_PRIV =
|
|
||||||
GLW_PC_CFLAGS =
|
|
||||||
OSMESA_PC_REQ =
|
|
||||||
OSMESA_PC_LIB_PRIV =
|
|
||||||
|
|||||||
95
configure.ac
95
configure.ac
@@ -22,8 +22,7 @@ AC_CONFIG_AUX_DIR([bin])
|
|||||||
AC_CANONICAL_HOST
|
AC_CANONICAL_HOST
|
||||||
|
|
||||||
dnl Versions for external dependencies
|
dnl Versions for external dependencies
|
||||||
LIBDRM_REQUIRED=2.4.3
|
LIBDRM_REQUIRED=2.3.1
|
||||||
DRI2PROTO_REQUIRED=1.99.3
|
|
||||||
|
|
||||||
dnl Check for progs
|
dnl Check for progs
|
||||||
AC_PROG_CPP
|
AC_PROG_CPP
|
||||||
@@ -46,14 +45,10 @@ esac
|
|||||||
MKDEP_OPTIONS=-fdepend
|
MKDEP_OPTIONS=-fdepend
|
||||||
dnl Ask gcc where it's keeping its secret headers
|
dnl Ask gcc where it's keeping its secret headers
|
||||||
if test "x$GCC" = xyes; then
|
if test "x$GCC" = xyes; then
|
||||||
for dir in include include-fixed; do
|
GCC_INCLUDES=`$CC -print-file-name=include`
|
||||||
GCC_INCLUDES=`$CC -print-file-name=$dir`
|
if test "x$GCC_INCLUDES" != x; then
|
||||||
if test "x$GCC_INCLUDES" != x && \
|
MKDEP_OPTIONS="$MKDEP_OPTIONS -I$GCC_INCLUDES"
|
||||||
test "$GCC_INCLUDES" != "$dir" && \
|
fi
|
||||||
test -d "$GCC_INCLUDES"; then
|
|
||||||
MKDEP_OPTIONS="$MKDEP_OPTIONS -I$GCC_INCLUDES"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
AC_SUBST([MKDEP_OPTIONS])
|
AC_SUBST([MKDEP_OPTIONS])
|
||||||
|
|
||||||
@@ -87,8 +82,11 @@ dnl Compiler macros
|
|||||||
DEFINES=""
|
DEFINES=""
|
||||||
AC_SUBST([DEFINES])
|
AC_SUBST([DEFINES])
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
linux*|*-gnu*)
|
linux*)
|
||||||
DEFINES="$DEFINES -D_GNU_SOURCE -DPTHREADS"
|
if test "x$GCC" = xyes; then
|
||||||
|
DEFINES="$DEFINES -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE"
|
||||||
|
fi
|
||||||
|
DEFINES="$DEFINES -D_SVID_SOURCE -D_GNU_SOURCE -DPTHREADS"
|
||||||
;;
|
;;
|
||||||
solaris*)
|
solaris*)
|
||||||
DEFINES="$DEFINES -DPTHREADS -DSVR4"
|
DEFINES="$DEFINES -DPTHREADS -DSVR4"
|
||||||
@@ -272,14 +270,14 @@ if test "x$enable_asm" = xyes; then
|
|||||||
case "$host_cpu" in
|
case "$host_cpu" in
|
||||||
i?86)
|
i?86)
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
linux* | *freebsd* | dragonfly*)
|
linux* | freebsd* | dragonfly*)
|
||||||
test "x$enable_64bit" = xyes && asm_arch=x86_64 || asm_arch=x86
|
test "x$enable_64bit" = xyes && asm_arch=x86_64 || asm_arch=x86
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
x86_64)
|
x86_64)
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
linux* | *freebsd* | dragonfly*)
|
linux* | freebsd* | dragonfly*)
|
||||||
test "x$enable_32bit" = xyes && asm_arch=x86 || asm_arch=x86_64
|
test "x$enable_32bit" = xyes && asm_arch=x86 || asm_arch=x86_64
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -366,10 +364,10 @@ default_driver="xlib"
|
|||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
linux*)
|
linux*)
|
||||||
case "$host_cpu" in
|
case "$host_cpu" in
|
||||||
i*86|x86_64|powerpc*|sparc*) default_driver="dri";;
|
i*86|x86_64|powerpc*) default_driver="dri";;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
*freebsd* | dragonfly*)
|
freebsd* | dragonfly*)
|
||||||
case "$host_cpu" in
|
case "$host_cpu" in
|
||||||
i*86|x86_64) default_driver="dri";;
|
i*86|x86_64) default_driver="dri";;
|
||||||
esac
|
esac
|
||||||
@@ -508,18 +506,14 @@ case "$mesa_driver" in
|
|||||||
xlib)
|
xlib)
|
||||||
if test "$x11_pkgconfig" = yes; then
|
if test "$x11_pkgconfig" = yes; then
|
||||||
PKG_CHECK_MODULES([XLIBGL], [x11 xext])
|
PKG_CHECK_MODULES([XLIBGL], [x11 xext])
|
||||||
GL_PC_REQ_PRIV="x11 xext"
|
|
||||||
X11_INCLUDES="$X11_INCLUDES $XLIBGL_CFLAGS"
|
X11_INCLUDES="$X11_INCLUDES $XLIBGL_CFLAGS"
|
||||||
GL_LIB_DEPS="$XLIBGL_LIBS"
|
GL_LIB_DEPS="$XLIBGL_LIBS"
|
||||||
else
|
else
|
||||||
# should check these...
|
# should check these...
|
||||||
X11_INCLUDES="$X11_INCLUDES $X_CFLAGS"
|
X11_INCLUDES="$X11_INCLUDES $X_CFLAGS"
|
||||||
GL_LIB_DEPS="$X_LIBS -lX11 -lXext"
|
GL_LIB_DEPS="$X_LIBS -lX11 -lXext"
|
||||||
GL_PC_LIB_PRIV="$GL_LIB_DEPS"
|
|
||||||
GL_PC_CFLAGS="$X11_INCLUDES"
|
|
||||||
fi
|
fi
|
||||||
GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread $OS_LIBS"
|
GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread $OS_LIBS"
|
||||||
GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $SELINUX_LIBS -lm -lpthread $OS_LIBS"
|
|
||||||
|
|
||||||
# if static, move the external libraries to the programs
|
# if static, move the external libraries to the programs
|
||||||
# and empty the libraries for libGL
|
# and empty the libraries for libGL
|
||||||
@@ -536,9 +530,6 @@ dri)
|
|||||||
|
|
||||||
# Check for libdrm
|
# Check for libdrm
|
||||||
PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED])
|
PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED])
|
||||||
PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED])
|
|
||||||
GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED"
|
|
||||||
DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED"
|
|
||||||
|
|
||||||
# find the DRI deps for libGL
|
# find the DRI deps for libGL
|
||||||
if test "$x11_pkgconfig" = yes; then
|
if test "$x11_pkgconfig" = yes; then
|
||||||
@@ -549,20 +540,16 @@ dri)
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
PKG_CHECK_MODULES([DRIGL], [$dri_modules])
|
PKG_CHECK_MODULES([DRIGL], [$dri_modules])
|
||||||
GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV $dri_modules"
|
|
||||||
X11_INCLUDES="$X11_INCLUDES $DRIGL_CFLAGS"
|
X11_INCLUDES="$X11_INCLUDES $DRIGL_CFLAGS"
|
||||||
GL_LIB_DEPS="$DRIGL_LIBS"
|
GL_LIB_DEPS="$DRIGL_LIBS"
|
||||||
else
|
else
|
||||||
# should check these...
|
# should check these...
|
||||||
X11_INCLUDES="$X11_INCLUDES $X_CFLAGS"
|
X11_INCLUDES="$X11_INCLUDES $X_CFLAGS"
|
||||||
GL_LIB_DEPS="$X_LIBS -lX11 -lXext -lXxf86vm -lXdamage -lXfixes"
|
GL_LIB_DEPS="$X_LIBS -lX11 -lXext -lXxf86vm -lXdamage -lXfixes"
|
||||||
GL_PC_LIB_PRIV="$GL_LIB_DEPS"
|
|
||||||
GL_PC_CFLAGS="$X11_INCLUDES"
|
|
||||||
|
|
||||||
# XCB can only be used from pkg-config
|
# XCB can only be used from pkg-config
|
||||||
if test "$enable_xcb" = yes; then
|
if test "$enable_xcb" = yes; then
|
||||||
PKG_CHECK_MODULES([XCB],[x11-xcb xcb-glx])
|
PKG_CHECK_MODULES([XCB],[x11-xcb xcb-glx])
|
||||||
GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV x11-xcb xcb-glx"
|
|
||||||
X11_INCLUDES="$X11_INCLUDES $XCB_CFLAGS"
|
X11_INCLUDES="$X11_INCLUDES $XCB_CFLAGS"
|
||||||
GL_LIB_DEPS="$GL_LIB_DEPS $XCB_LIBS"
|
GL_LIB_DEPS="$GL_LIB_DEPS $XCB_LIBS"
|
||||||
fi
|
fi
|
||||||
@@ -570,7 +557,6 @@ dri)
|
|||||||
|
|
||||||
# need DRM libs, -lpthread, etc.
|
# need DRM libs, -lpthread, etc.
|
||||||
GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS $OS_LIBS"
|
GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS $OS_LIBS"
|
||||||
GL_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS $OS_LIBS"
|
|
||||||
;;
|
;;
|
||||||
osmesa)
|
osmesa)
|
||||||
# No libGL for osmesa
|
# No libGL for osmesa
|
||||||
@@ -578,10 +564,6 @@ osmesa)
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
AC_SUBST([GL_LIB_DEPS])
|
AC_SUBST([GL_LIB_DEPS])
|
||||||
AC_SUBST([GL_PC_REQ_PRIV])
|
|
||||||
AC_SUBST([GL_PC_LIB_PRIV])
|
|
||||||
AC_SUBST([GL_PC_CFLAGS])
|
|
||||||
AC_SUBST([DRI_PC_REQ_PRIV])
|
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl More X11 setup
|
dnl More X11 setup
|
||||||
@@ -611,6 +593,20 @@ AC_ARG_ENABLE([driglx-direct],
|
|||||||
[enable direct rendering in GLX for DRI @<:@default=enabled@:>@])],
|
[enable direct rendering in GLX for DRI @<:@default=enabled@:>@])],
|
||||||
[driglx_direct="$enableval"],
|
[driglx_direct="$enableval"],
|
||||||
[driglx_direct="yes"])
|
[driglx_direct="yes"])
|
||||||
|
dnl ttm support
|
||||||
|
AC_ARG_ENABLE([ttm-api],
|
||||||
|
[AS_HELP_STRING([--enable-ttm-api],
|
||||||
|
[enable TTM API users @<:@default=disabled@:>@])],
|
||||||
|
[ttmapi="$enableval"],
|
||||||
|
[ttmapi="no"])
|
||||||
|
|
||||||
|
if test "x$ttmapi" = "xyes"; then
|
||||||
|
save_CFLAGS=$CFLAGS
|
||||||
|
CFLAGS=$LIBDRM_CFLAGS
|
||||||
|
AC_CHECK_HEADERS([xf86mm.h],[],[AC_MSG_ERROR([xf86mm.h required for TTM.])],[#include "stdint.h"\n#include "drm.h"])
|
||||||
|
CFLAGS=$save_CFLAGS
|
||||||
|
fi
|
||||||
|
|
||||||
dnl Which drivers to build - default is chosen by platform
|
dnl Which drivers to build - default is chosen by platform
|
||||||
AC_ARG_WITH([dri-drivers],
|
AC_ARG_WITH([dri-drivers],
|
||||||
[AS_HELP_STRING([--with-dri-drivers@<:@=DIRS...@:>@],
|
[AS_HELP_STRING([--with-dri-drivers@<:@=DIRS...@:>@],
|
||||||
@@ -652,6 +648,10 @@ if test "$mesa_driver" = dri; then
|
|||||||
DEFINES="$DEFINES -DGLX_USE_TLS -DPTHREADS"
|
DEFINES="$DEFINES -DGLX_USE_TLS -DPTHREADS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "x$ttmapi" = xyes; then
|
||||||
|
DEFINES="$DEFINES -DTTM_API"
|
||||||
|
fi
|
||||||
|
|
||||||
if test "x$USING_EGL" = x1; then
|
if test "x$USING_EGL" = x1; then
|
||||||
PROGRAM_DIRS="egl"
|
PROGRAM_DIRS="egl"
|
||||||
fi
|
fi
|
||||||
@@ -802,7 +802,6 @@ osmesa)
|
|||||||
OSMESA_LIB_DEPS=""
|
OSMESA_LIB_DEPS=""
|
||||||
fi
|
fi
|
||||||
OSMESA_MESA_DEPS=""
|
OSMESA_MESA_DEPS=""
|
||||||
OSMESA_PC_LIB_PRIV="-lm -lpthread $SELINUX_LIBS"
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# Link OSMesa to libGL otherwise
|
# Link OSMesa to libGL otherwise
|
||||||
@@ -813,17 +812,13 @@ osmesa)
|
|||||||
else
|
else
|
||||||
OSMESA_MESA_DEPS=""
|
OSMESA_MESA_DEPS=""
|
||||||
fi
|
fi
|
||||||
OSMESA_PC_REQ="gl"
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
if test "$enable_static" = no; then
|
if test "$enable_static" = no; then
|
||||||
OSMESA_LIB_DEPS="$OSMESA_LIB_DEPS $OS_LIBS"
|
OSMESA_LIB_DEPS="$OSMESA_LIB_DEPS $OS_LIBS"
|
||||||
fi
|
fi
|
||||||
OSMESA_PC_LIB_PRIV="$OSMESA_PC_LIB_PRIV $OS_LIBS"
|
|
||||||
AC_SUBST([OSMESA_LIB_DEPS])
|
AC_SUBST([OSMESA_LIB_DEPS])
|
||||||
AC_SUBST([OSMESA_MESA_DEPS])
|
AC_SUBST([OSMESA_MESA_DEPS])
|
||||||
AC_SUBST([OSMESA_PC_REQ])
|
|
||||||
AC_SUBST([OSMESA_PC_LIB_PRIV])
|
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl GLU configuration
|
dnl GLU configuration
|
||||||
@@ -846,7 +841,6 @@ if test "x$enable_glu" = xyes; then
|
|||||||
|
|
||||||
# Link libGLU to libOSMesa instead of libGL
|
# Link libGLU to libOSMesa instead of libGL
|
||||||
GLU_LIB_DEPS=""
|
GLU_LIB_DEPS=""
|
||||||
GLU_PC_REQ="osmesa"
|
|
||||||
if test "$enable_static" = no; then
|
if test "$enable_static" = no; then
|
||||||
GLU_MESA_DEPS='-l$(OSMESA_LIB)'
|
GLU_MESA_DEPS='-l$(OSMESA_LIB)'
|
||||||
else
|
else
|
||||||
@@ -855,8 +849,6 @@ if test "x$enable_glu" = xyes; then
|
|||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# If static, empty GLU_LIB_DEPS and add libs for programs to link
|
# If static, empty GLU_LIB_DEPS and add libs for programs to link
|
||||||
GLU_PC_REQ="gl"
|
|
||||||
GLU_PC_LIB_PRIV="-lm"
|
|
||||||
if test "$enable_static" = no; then
|
if test "$enable_static" = no; then
|
||||||
GLU_LIB_DEPS="-lm"
|
GLU_LIB_DEPS="-lm"
|
||||||
GLU_MESA_DEPS='-l$(GL_LIB)'
|
GLU_MESA_DEPS='-l$(GL_LIB)'
|
||||||
@@ -871,13 +863,8 @@ fi
|
|||||||
if test "$enable_static" = no; then
|
if test "$enable_static" = no; then
|
||||||
GLU_LIB_DEPS="$GLU_LIB_DEPS $OS_CPLUSPLUS_LIBS"
|
GLU_LIB_DEPS="$GLU_LIB_DEPS $OS_CPLUSPLUS_LIBS"
|
||||||
fi
|
fi
|
||||||
GLU_PC_LIB_PRIV="$GLU_PC_LIB_PRIV $OS_CPLUSPLUS_LIBS"
|
|
||||||
AC_SUBST([GLU_LIB_DEPS])
|
AC_SUBST([GLU_LIB_DEPS])
|
||||||
AC_SUBST([GLU_MESA_DEPS])
|
AC_SUBST([GLU_MESA_DEPS])
|
||||||
AC_SUBST([GLU_PC_REQ])
|
|
||||||
AC_SUBST([GLU_PC_REQ_PRIV])
|
|
||||||
AC_SUBST([GLU_PC_LIB_PRIV])
|
|
||||||
AC_SUBST([GLU_PC_CFLAGS])
|
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl GLw configuration
|
dnl GLw configuration
|
||||||
@@ -902,13 +889,10 @@ if test "x$enable_glw" = xyes; then
|
|||||||
SRC_DIRS="$SRC_DIRS glw"
|
SRC_DIRS="$SRC_DIRS glw"
|
||||||
if test "$x11_pkgconfig" = yes; then
|
if test "$x11_pkgconfig" = yes; then
|
||||||
PKG_CHECK_MODULES([GLW],[x11 xt])
|
PKG_CHECK_MODULES([GLW],[x11 xt])
|
||||||
GLW_PC_REQ_PRIV="x11 xt"
|
|
||||||
GLW_LIB_DEPS="$GLW_LIBS"
|
GLW_LIB_DEPS="$GLW_LIBS"
|
||||||
else
|
else
|
||||||
# should check these...
|
# should check these...
|
||||||
GLW_LIB_DEPS="$X_LIBS -lXt -lX11"
|
GLW_LIB_DEPS="$X_LIBS -lXt -lX11"
|
||||||
GLW_PC_LIB_PRIV="$GLW_LIB_DEPS"
|
|
||||||
GLW_PC_CFLAGS="$X11_INCLUDES"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
GLW_SOURCES="GLwDrawA.c"
|
GLW_SOURCES="GLwDrawA.c"
|
||||||
@@ -927,12 +911,9 @@ if test "x$enable_glw" = xyes; then
|
|||||||
fi
|
fi
|
||||||
# MOTIF_LIBS is prepended to GLW_LIB_DEPS since Xm needs Xt/X11
|
# MOTIF_LIBS is prepended to GLW_LIB_DEPS since Xm needs Xt/X11
|
||||||
GLW_LIB_DEPS="$MOTIF_LIBS $GLW_LIB_DEPS"
|
GLW_LIB_DEPS="$MOTIF_LIBS $GLW_LIB_DEPS"
|
||||||
GLW_PC_LIB_PRIV="$MOTIF_LIBS $GLW_PC_LIB_PRIV"
|
|
||||||
GLW_PC_CFLAGS="$MOTIF_CFLAGS $GLW_PC_CFLAGS"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If static, empty GLW_LIB_DEPS and add libs for programs to link
|
# If static, empty GLW_LIB_DEPS and add libs for programs to link
|
||||||
GLW_PC_LIB_PRIV="$GLW_PC_LIB_PRIV $OS_LIBS"
|
|
||||||
if test "$enable_static" = no; then
|
if test "$enable_static" = no; then
|
||||||
GLW_MESA_DEPS='-l$(GL_LIB)'
|
GLW_MESA_DEPS='-l$(GL_LIB)'
|
||||||
GLW_LIB_DEPS="$GLW_LIB_DEPS $OS_LIBS"
|
GLW_LIB_DEPS="$GLW_LIB_DEPS $OS_LIBS"
|
||||||
@@ -946,9 +927,6 @@ AC_SUBST([GLW_LIB_DEPS])
|
|||||||
AC_SUBST([GLW_MESA_DEPS])
|
AC_SUBST([GLW_MESA_DEPS])
|
||||||
AC_SUBST([GLW_SOURCES])
|
AC_SUBST([GLW_SOURCES])
|
||||||
AC_SUBST([MOTIF_CFLAGS])
|
AC_SUBST([MOTIF_CFLAGS])
|
||||||
AC_SUBST([GLW_PC_REQ_PRIV])
|
|
||||||
AC_SUBST([GLW_PC_LIB_PRIV])
|
|
||||||
AC_SUBST([GLW_PC_CFLAGS])
|
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl GLUT configuration
|
dnl GLUT configuration
|
||||||
@@ -983,16 +961,12 @@ if test "x$enable_glut" = xyes; then
|
|||||||
fi
|
fi
|
||||||
if test "$x11_pkgconfig" = yes; then
|
if test "$x11_pkgconfig" = yes; then
|
||||||
PKG_CHECK_MODULES([GLUT],[x11 xmu xi])
|
PKG_CHECK_MODULES([GLUT],[x11 xmu xi])
|
||||||
GLUT_PC_REQ_PRIV="x11 xmu xi"
|
|
||||||
GLUT_LIB_DEPS="$GLUT_LIBS"
|
GLUT_LIB_DEPS="$GLUT_LIBS"
|
||||||
else
|
else
|
||||||
# should check these...
|
# should check these...
|
||||||
GLUT_LIB_DEPS="$X_LIBS -lX11 -lXmu -lXi"
|
GLUT_LIB_DEPS="$X_LIBS -lX11 -lXmu -lXi"
|
||||||
GLUT_PC_LIB_PRIV="$GLUT_LIB_DEPS"
|
|
||||||
GLUT_PC_CFLAGS="$X11_INCLUDES"
|
|
||||||
fi
|
fi
|
||||||
GLUT_LIB_DEPS="$GLUT_LIB_DEPS -lm $OS_LIBS"
|
GLUT_LIB_DEPS="$GLUT_LIB_DEPS -lm $OS_LIBS"
|
||||||
GLUT_PC_LIB_PRIV="$GLUT_PC_LIB_PRIV -lm $OS_LIBS"
|
|
||||||
|
|
||||||
# If glut is available, we can build most programs
|
# If glut is available, we can build most programs
|
||||||
if test "$with_demos" = yes; then
|
if test "$with_demos" = yes; then
|
||||||
@@ -1011,9 +985,6 @@ fi
|
|||||||
AC_SUBST([GLUT_LIB_DEPS])
|
AC_SUBST([GLUT_LIB_DEPS])
|
||||||
AC_SUBST([GLUT_MESA_DEPS])
|
AC_SUBST([GLUT_MESA_DEPS])
|
||||||
AC_SUBST([GLUT_CFLAGS])
|
AC_SUBST([GLUT_CFLAGS])
|
||||||
AC_SUBST([GLUT_PC_REQ_PRIV])
|
|
||||||
AC_SUBST([GLUT_PC_LIB_PRIV])
|
|
||||||
AC_SUBST([GLUT_PC_CFLAGS])
|
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl Program library dependencies
|
dnl Program library dependencies
|
||||||
@@ -1077,8 +1048,8 @@ else
|
|||||||
echo " DRI drivers: $dri_dirs"
|
echo " DRI drivers: $dri_dirs"
|
||||||
fi
|
fi
|
||||||
echo " DRI driver dir: $DRI_DRIVER_INSTALL_DIR"
|
echo " DRI driver dir: $DRI_DRIVER_INSTALL_DIR"
|
||||||
|
echo " TTM API support: $ttmapi"
|
||||||
fi
|
fi
|
||||||
echo " Use XCB: $enable_xcb"
|
|
||||||
|
|
||||||
dnl Libraries
|
dnl Libraries
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ Status
|
|||||||
|
|
||||||
Version
|
Version
|
||||||
|
|
||||||
Last Modified Date: 12 January 2009
|
Last Modified Date: 8 June 2000
|
||||||
|
|
||||||
Number
|
Number
|
||||||
|
|
||||||
@@ -69,12 +69,6 @@ Additions to Chapter 3 of the GLX 1.3 Specification (Functions and Errors)
|
|||||||
<width> and <height> indicate the size in pixels. Coordinate (0,0)
|
<width> and <height> indicate the size in pixels. Coordinate (0,0)
|
||||||
corresponds to the lower-left pixel of the window, like glReadPixels.
|
corresponds to the lower-left pixel of the window, like glReadPixels.
|
||||||
|
|
||||||
If dpy and drawable are the display and drawable for the calling
|
|
||||||
thread's current context, glXCopySubBufferMESA performs an
|
|
||||||
implicit glFlush before it returns. Subsequent OpenGL commands
|
|
||||||
may be issued immediately after calling glXCopySubBufferMESA, but
|
|
||||||
are not executed until the copy is completed.
|
|
||||||
|
|
||||||
GLX Protocol
|
GLX Protocol
|
||||||
|
|
||||||
None at this time. The extension is implemented in terms of ordinary
|
None at this time. The extension is implemented in terms of ordinary
|
||||||
@@ -90,7 +84,5 @@ New State
|
|||||||
|
|
||||||
Revision History
|
Revision History
|
||||||
|
|
||||||
12 January 2009 Ian Romanick - Added language about implicit flush
|
8 June 2000 - initial specification
|
||||||
and command completion.
|
|
||||||
8 June 2000 Brian Paul - initial specification
|
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ Status
|
|||||||
|
|
||||||
Version
|
Version
|
||||||
|
|
||||||
|
$Id: MESA_resize_buffers.spec,v 1.3 2004/03/25 01:42:42 brianp Exp $
|
||||||
|
|
||||||
Number
|
Number
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ Version
|
|||||||
|
|
||||||
Last Modified Date: July 30, 2006
|
Last Modified Date: July 30, 2006
|
||||||
Author Revision: 0.2
|
Author Revision: 0.2
|
||||||
|
$Date: 2006/07/30 14:28:38 $ $Revision: 1.2 $
|
||||||
|
|
||||||
Number
|
Number
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ Status
|
|||||||
|
|
||||||
Version
|
Version
|
||||||
|
|
||||||
|
$Date: 2007/05/16$ $Revision: 0.4$
|
||||||
|
|
||||||
Number
|
Number
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ Status
|
|||||||
|
|
||||||
Version
|
Version
|
||||||
|
|
||||||
|
$Id: MESA_window_pos.spec,v 1.4 2004/03/25 01:42:42 brianp Exp $
|
||||||
|
|
||||||
Number
|
Number
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ Status
|
|||||||
|
|
||||||
Version
|
Version
|
||||||
|
|
||||||
|
$Id: MESA_packed_depth_stencil.spec,v 1.2 2003/09/19 14:58:21 brianp Exp $
|
||||||
|
|
||||||
Number
|
Number
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ Version
|
|||||||
|
|
||||||
Last Modified Date: July 20, 2003
|
Last Modified Date: July 20, 2003
|
||||||
Author Revision: 1.0
|
Author Revision: 1.0
|
||||||
|
$Date: 2004/03/25 01:42:41 $ $Revision: 1.4 $
|
||||||
|
|
||||||
Number
|
Number
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ Status
|
|||||||
|
|
||||||
Version
|
Version
|
||||||
|
|
||||||
|
$Id: MESA_sprite_point.spec,v 1.2 2003/09/19 14:58:21 brianp Exp $
|
||||||
|
|
||||||
Number
|
Number
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ Status
|
|||||||
|
|
||||||
Version
|
Version
|
||||||
|
|
||||||
|
$Id: MESA_trace.spec,v 1.4 2004/03/25 01:42:42 brianp Exp $
|
||||||
|
|
||||||
Number
|
Number
|
||||||
|
|
||||||
|
|||||||
@@ -134,3 +134,4 @@ as of February, 1999.
|
|||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
$Id: README.BEOS,v 1.12 2004/10/13 00:35:55 phoudoin Exp $
|
||||||
|
|||||||
@@ -205,3 +205,4 @@ http://www.linuxgames.com/quake2/
|
|||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
$Id: README.QUAKE,v 1.3 1998/08/23 15:26:26 brianp Exp $
|
||||||
|
|||||||
@@ -143,3 +143,4 @@ code). Anyone want to help?
|
|||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
$Id: RELNOTES-3.1,v 1.2 2000/04/07 17:08:06 brianp Exp $
|
||||||
|
|||||||
@@ -9,3 +9,4 @@ have been added. For a list of bug fixes please read the VERSIONS file.
|
|||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
$Id: RELNOTES-3.2,v 1.2 2000/04/07 17:08:06 brianp Exp $
|
||||||
|
|||||||
@@ -29,3 +29,4 @@ GLU library.
|
|||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
$Id: RELNOTES-3.2.1,v 1.2 2000/07/21 16:32:33 brianp Exp $
|
||||||
|
|||||||
@@ -268,3 +268,4 @@ image convolution. This will (hopefully) be done for Mesa 3.5/3.6.
|
|||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
$Id: RELNOTES-3.3,v 1.8 2000/07/21 16:26:41 brianp Exp $
|
||||||
|
|||||||
@@ -19,3 +19,4 @@ see the VERSIONS file.
|
|||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
$Id: RELNOTES-3.4,v 1.2 2002/03/23 02:37:17 brianp Exp $
|
||||||
|
|||||||
@@ -19,3 +19,4 @@ the Mesa 3.4 release. For details, see the VERSIONS file.
|
|||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
$Id: RELNOTES-3.4.1,v 1.2 2001/05/23 14:45:01 brianp Exp $
|
||||||
|
|||||||
@@ -19,3 +19,4 @@ the Mesa 3.4.1 release. For details, see the VERSIONS file.
|
|||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
$Id: RELNOTES-3.4.2,v 1.2 2001/05/23 14:45:01 brianp Exp $
|
||||||
|
|||||||
@@ -225,3 +225,4 @@ In the future I hope to implement support for 32-bit, floating point
|
|||||||
color channels.
|
color channels.
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
$Id: RELNOTES-3.5,v 1.14 2001/06/20 19:02:48 brianp Exp $
|
||||||
|
|||||||
@@ -160,3 +160,4 @@ See the VERSIONS file for more details about bug fixes, etc. in Mesa 4.0.
|
|||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
$Id: RELNOTES-4.0,v 3.2 2001/10/17 14:59:21 brianp Exp $
|
||||||
|
|||||||
@@ -19,3 +19,4 @@ Mesa 4.0.1 only contains bug fixes since version 4.0.
|
|||||||
See the docs/VERSIONS file for the list of bug fixes.
|
See the docs/VERSIONS file for the list of bug fixes.
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
$Id: RELNOTES-4.0.1,v 1.2 2001/12/18 14:08:23 brianp Exp $
|
||||||
|
|||||||
@@ -47,3 +47,4 @@ D3D needs updating
|
|||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
$Id: RELNOTES-4.0.2,v 1.2 2002/03/23 02:38:39 brianp Exp $
|
||||||
|
|||||||
@@ -49,3 +49,4 @@ D3D needs updating
|
|||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
$Id: RELNOTES-4.0.3,v 1.2 2002/06/26 02:36:34 brianp Exp $
|
||||||
|
|||||||
@@ -305,3 +305,4 @@ are some things to change:
|
|||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
$Id: RELNOTES-4.1,v 1.22 2002/10/29 15:06:37 brianp Exp $
|
||||||
|
|||||||
@@ -82,3 +82,4 @@ driver call the _mesa_enable_1_4_extensions() function.
|
|||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
$Id: RELNOTES-5.0,v 3.2 2002/11/13 15:33:51 brianp Exp $
|
||||||
|
|||||||
@@ -43,3 +43,4 @@ driver call the _mesa_enable_1_4_extensions() function.
|
|||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
$Id: RELNOTES-5.0.1,v 3.1 2003/03/30 16:17:54 brianp Exp $
|
||||||
|
|||||||
@@ -43,3 +43,4 @@ driver call the _mesa_enable_1_4_extensions() function.
|
|||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
$Id: RELNOTES-5.0.2,v 1.1 2003/09/04 23:10:38 brianp Exp $
|
||||||
|
|||||||
@@ -84,3 +84,4 @@ See the VERSIONS file for more details about bug fixes, etc. in Mesa 6.0.
|
|||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
$Id: RELNOTES-6.0,v 1.3 2004/01/15 15:47:57 brianp Exp $
|
||||||
|
|||||||
@@ -47,3 +47,4 @@ D3D needs updating
|
|||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
$Id: RELNOTES-6.0.1,v 3.1 2004/04/02 23:37:02 brianp Exp $
|
||||||
|
|||||||
@@ -109,3 +109,4 @@ See the VERSIONS file for more details about bug fixes, etc. in Mesa 6.1.
|
|||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
$Id: RELNOTES-6.1,v 3.5 2004/08/17 22:58:23 brianp Exp $
|
||||||
|
|||||||
@@ -49,3 +49,4 @@ D3D needs updating
|
|||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
$Id: RELNOTES-6.2,v 3.4 2004/10/02 15:43:14 brianp Exp $
|
||||||
|
|||||||
@@ -47,3 +47,4 @@ D3D needs updating
|
|||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
$Id: RELNOTES-6.2.1,v 3.1 2004/12/09 23:21:36 brianp Exp $
|
||||||
|
|||||||
@@ -112,3 +112,4 @@ D3D needs updating
|
|||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
$Id: RELNOTES-6.3,v 3.13 2005/07/21 15:57:29 brianp Exp $
|
||||||
|
|||||||
@@ -46,3 +46,4 @@ D3D needs updating
|
|||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
$Id: RELNOTES-6.3.1,v 3.1 2005/07/21 18:45:54 brianp Exp $
|
||||||
|
|||||||
@@ -34,3 +34,4 @@ D3D needs updating
|
|||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
$Id: RELNOTES-6.3.2,v 3.2 2005/08/19 16:57:50 brianp Exp $
|
||||||
|
|||||||
@@ -47,3 +47,4 @@ in Mesa 6.3.
|
|||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
$Id: RELNOTES-6.4,v 3.1 2005/10/24 23:33:27 brianp Exp $
|
||||||
|
|||||||
@@ -83,23 +83,23 @@ Similarly, textures are tiled and brought into local store as needed.
|
|||||||
<H2>Status</H2>
|
<H2>Status</H2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
As of October 2008, the driver runs quite a few OpenGL demos.
|
As of September 2008, the driver supports smooth/flat shaded triangle rendering
|
||||||
Features that work include:
|
with Z testing and simple texture mapping.
|
||||||
</p>
|
Simple demos like gears run successfully.
|
||||||
<ul>
|
To test texture mapping, try progs/demos/texcyl (press right mouse button for
|
||||||
<li>Point/line/triangle rendering, glDrawPixels
|
rendering options).
|
||||||
<li>2D, NPOT and cube texture maps with nearest/linear/mipmap filtering
|
|
||||||
<li>Dynamic SPU code generation for fragment shaders, but not complete
|
|
||||||
<li>Dynamic SPU code generation for fragment ops (blend, Z-test, etc), but not complete
|
|
||||||
<li>Dynamic PPU/PPC code generation for vertex shaders, but not complete
|
|
||||||
</ul>
|
|
||||||
<p>
|
|
||||||
Performance has recently improved with the addition of PPC code generation
|
|
||||||
for vertex shaders, but the code quality isn't too great yet.
|
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Another bottleneck is SwapBuffers. It may be the limiting factor for
|
Runtime/dynamic code generation is being done for per-fragment
|
||||||
many simple GL tests.
|
operations (Z test, blend, etc) and for fragment programs (though only a
|
||||||
|
few opcodes are implemented now).
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
In general, however, the driver is rather slow because all vertex
|
||||||
|
transformation is being done by an interpreter running on the PPU.
|
||||||
|
Programs with many vertices or complex vertex shaders will run especially
|
||||||
|
slow.
|
||||||
|
This will be addressed in the future.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
@@ -114,20 +114,8 @@ more of the following debug options:
|
|||||||
<li><b>checker</b> - use a different background clear color for each SPU.
|
<li><b>checker</b> - use a different background clear color for each SPU.
|
||||||
This lets you see which SPU is rendering which screen tiles.
|
This lets you see which SPU is rendering which screen tiles.
|
||||||
<li><b>sync</b> - wait/synchronize after each DMA transfer
|
<li><b>sync</b> - wait/synchronize after each DMA transfer
|
||||||
<li><b>asm</b> - print generated SPU assembly code to stdout
|
|
||||||
<li><b>fragops</b> - emit fragment ops debug messages
|
|
||||||
<li><b>fragopfallback</b> - don't use codegen for fragment ops
|
|
||||||
<li><b>cmd</b> - print SPU commands as their received
|
|
||||||
<li><b>cache</b> - print texture cache statistics when program exits
|
|
||||||
</ul>
|
</ul>
|
||||||
<p>
|
|
||||||
Note that some of these options may only work for linux-cell-debug builds.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
If the GALLIUM_NOPPC env var is set, PPC code generation will not be used
|
|
||||||
and vertex shaders will be run with the TGSI interpreter.
|
|
||||||
</p>
|
|
||||||
<p>
|
<p>
|
||||||
If the GALLIUM_NOCELL env var is set, the softpipe driver will be used
|
If the GALLIUM_NOCELL env var is set, the softpipe driver will be used
|
||||||
intead of the Cell driver.
|
intead of the Cell driver.
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ a:visited {
|
|||||||
|
|
||||||
<b>Download / Install</b>
|
<b>Download / Install</b>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="download.html" target="MainFrame">Downloading / Unpacking</a>
|
<li><a href="download.html" target="MainFrame">Downloading/Unpacking</a>
|
||||||
<li><a href="install.html" target="MainFrame">Compiling / Installing</a>
|
<li><a href="install.html" target="MainFrame">Compilation/Installation</a>
|
||||||
<li><a href="glu.html" target="MainFrame">SGI's GLU</a>
|
<li><a href="glu.html" target="MainFrame">SGI's GLU</a>
|
||||||
<li><a href="precompiled.html" target="MainFrame">Precompiled Libraries</a>
|
<li><a href="precompiled.html" target="MainFrame">Precompiled Libraries</a>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -48,7 +48,7 @@ a:visited {
|
|||||||
<li><a href="lists.html" target="MainFrame">Mailing Lists</a>
|
<li><a href="lists.html" target="MainFrame">Mailing Lists</a>
|
||||||
<li><a href="bugs.html" target="MainFrame">Bug Database</a>
|
<li><a href="bugs.html" target="MainFrame">Bug Database</a>
|
||||||
<li><a href="webmaster.html" target="MainFrame">Webmaster</a>
|
<li><a href="webmaster.html" target="MainFrame">Webmaster</a>
|
||||||
<li><a href="http://dri.freedesktop.org/" target="_parent">Mesa/DRI Wiki</a>
|
<li><a href="http://dri.freedesktop.org/" target="MainFrame">Wiki</a>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<b>User Topics</b>
|
<b>User Topics</b>
|
||||||
|
|||||||
@@ -9,9 +9,9 @@
|
|||||||
<H1>Downloading</H1>
|
<H1>Downloading</H1>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Current development release: <b>7.3</b>
|
Current stable release: <b>7.2</b>
|
||||||
<br>
|
<br>
|
||||||
Last stable release: <b>7.2</b>
|
Current development: Mesa git/master
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ Setting this variable automatically sets the MESA_TEX_PROG variable as well.
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
The following are only applicable to the Xlib software driver.
|
The following are only applicable to the Xlib software driver.
|
||||||
See the <A HREF="xlibdriver.html">Xlib software driver page</A> for details.
|
See <A HREF="README.X11">README.X11</A> for details.
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>MESA_RGB_VISUAL - specifies the X visual and depth for RGB mode
|
<li>MESA_RGB_VISUAL - specifies the X visual and depth for RGB mode
|
||||||
|
|||||||
@@ -15,40 +15,17 @@ Here are some specific ideas and areas where help would be appreciated:
|
|||||||
|
|
||||||
<ol>
|
<ol>
|
||||||
<li>
|
<li>
|
||||||
<b>Driver patching and testing.</b>
|
Enable -Wstrict-aliasing=2 -fstrict-aliasing and track down aliasing
|
||||||
Patches are often posted to the mesa3d-dev mailing list, but aren't
|
|
||||||
immediately checked into git because not enough people are testing them.
|
|
||||||
Just applying patches, testing and reporting back is helpful.
|
|
||||||
<li>
|
|
||||||
<b>Driver debugging.</b>
|
|
||||||
There are plenty of open bugs in the bug database.
|
|
||||||
<li>
|
|
||||||
<b>Remove aliasing warnings.</b>
|
|
||||||
Enable gcc -Wstrict-aliasing=2 -fstrict-aliasing and track down aliasing
|
|
||||||
issues in the code.
|
issues in the code.
|
||||||
<li>
|
<li>
|
||||||
<b>Windows driver building, testing and maintenance.</b>
|
Windows 98/NT driver building, maintenance and testing
|
||||||
The Visual Studio project files aren't always updated in a timely manner
|
|
||||||
when new source files are added or old ones are removed.
|
|
||||||
Fixing these tends to delay new Mesa releases.
|
|
||||||
<li>
|
<li>
|
||||||
<b>Maintenance and testing of lesser-used drivers.</b>
|
Maintenance and testing of lesser-used drivers, such as DOS/DJGPP, GGI, etc.
|
||||||
Drivers such as DOS/DJGPP, GGI, etc that aren't being maintained are being
|
|
||||||
deprecated starting in Mesa 7.3.
|
|
||||||
<li>
|
|
||||||
<b>Contribute more tests to
|
|
||||||
<a href="http://glean.sourceforge.net/" target="_parent">glean</a>.</b>
|
|
||||||
<li>
|
|
||||||
<b>Automatic testing.
|
|
||||||
</b>
|
|
||||||
It would be great if someone would set up an automated system for grabbing
|
|
||||||
the latest Mesa code and run tests (such as glean) then report issues to
|
|
||||||
the mailing list.
|
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
If you want to do something new in Mesa, first join the Mesa developer's
|
If you want to help with Mesa, first join the Mesa developer's
|
||||||
mailing list.
|
mailing list.
|
||||||
Then post a message to propose what you want to do, just to make sure
|
Then post a message to propose what you want to do, just to make sure
|
||||||
there's no issues.
|
there's no issues.
|
||||||
|
|||||||
@@ -1,73 +1,58 @@
|
|||||||
<HTML>
|
<HTML>
|
||||||
|
|
||||||
<TITLE>Compiling and Installing</TITLE>
|
<TITLE>Compilation and Installation</TITLE>
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||||
|
|
||||||
<BODY>
|
<BODY>
|
||||||
|
|
||||||
|
|
||||||
<H1>Compiling and Installing</H1>
|
<H1>Compilation and Installation</H1>
|
||||||
|
|
||||||
<ol>
|
<ol>
|
||||||
<li><a href="#unix-x11">Unix / X11</a>
|
<li><a href="#unix-x11">Unix / X11</a>
|
||||||
<ul>
|
|
||||||
<li><a href="#prereq">Prerequisites for DRI and hardware acceleration</a>
|
|
||||||
<li><a href="#autoconf">Building with autoconf</a>
|
|
||||||
<li><a href="#traditional">Building with traditional Makefiles</a>
|
|
||||||
<li><a href="#libs">The Libraries</a>
|
|
||||||
<li><a href="#demos">Running the demos
|
|
||||||
<li><a href="#install">Installing the header and library files
|
|
||||||
<li><a href="#pkg-config">Building OpenGL programs with pkg-config
|
|
||||||
</ul>
|
|
||||||
<li><a href="#windows">Windows</a>
|
<li><a href="#windows">Windows</a>
|
||||||
|
<li><a href="#vms">VMS</a>
|
||||||
<li><a href="#other">Other</a>
|
<li><a href="#other">Other</a>
|
||||||
</ol>
|
</ol>
|
||||||
<br>
|
|
||||||
|
|
||||||
|
|
||||||
<a name="unix-x11">
|
<a name="unix-x11">
|
||||||
<H2>1. Unix/X11 Compilation and Installation</H1>
|
<H2>1. Unix/X11 Compilation and Installation</H1>
|
||||||
|
|
||||||
|
|
||||||
<a name="prereq">
|
<h3>1.1 Prerequisites for DRI and Hardware Acceleration</h3>
|
||||||
<h3>1.1 Prerequisites for DRI and hardware acceleration</h3>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The following are required for DRI-based hardware acceleration with Mesa 7.3:
|
To build Mesa 7.1 with DRI-based hardware acceleration you must first have
|
||||||
|
the <a href="http://dri.freedesktop.org/libdrm/" target="_parent">DRM version 2.3.1</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<ul>
|
<p>
|
||||||
<li><a href="http://xorg.freedesktop.org/releases/individual/proto/">dri2proto</a> version 1.99.3 or later
|
You should also be using the Xorg server version 1.4 or 1.5.
|
||||||
<li>Linux 2.6.28
|
|
||||||
<li><a href="http://dri.freedesktop.org/libdrm/" target="_parent">libDRM</a>
|
|
||||||
version 2.4.3 or later
|
|
||||||
<li>Xorg server version 1.5 or later
|
|
||||||
</ul>
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<a name="autoconf">
|
|
||||||
<h3>1.2 Building with Autoconf</h3>
|
<h3>1.2 Autoconf Compilation</h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Mesa may be <a href="autoconf.html">built using autoconf</a>.
|
Mesa may be <a href="autoconf.html">built using autoconf</a>.
|
||||||
This should work well on most GNU-based systems.
|
This should work well on most GNU-based systems.
|
||||||
If that fails the traditional Mesa build system is available.
|
When that fails, the traditional Mesa build system is available.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="traditional">
|
<h3>1.3 Traditional Compilation</h3>
|
||||||
<h3>1.3 Building with traditional Makefiles</h3>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The traditional Mesa build system is based on a collection of pre-defined
|
The traditional Mesa build system is based on a collection of pre-defined
|
||||||
system configurations.
|
system configurations.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
To see the list of configurations, just type <code>make</code>.
|
To see the list of configurations, type <b>make</b> alone.
|
||||||
Then choose a configuration from the list and type <code>make</code>
|
Then choose a configuration from the list and type <b>make configname</b>.
|
||||||
<em>configname</em>.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -81,7 +66,7 @@ allow you to run OpenGL/GLX applications on any X server (regardless of
|
|||||||
whether it supports the GLX X server extension).
|
whether it supports the GLX X server extension).
|
||||||
You will <em>not</em> be able to use hardware 3D acceleration.
|
You will <em>not</em> be able to use hardware 3D acceleration.
|
||||||
<p>
|
<p>
|
||||||
To compile stand-alone Mesa type <code>make</code> in the top-level directory.
|
To compile stand-alone Mesa type <b>make</b> in the top-level directory.
|
||||||
You'll see a list of supported system configurations.
|
You'll see a list of supported system configurations.
|
||||||
Choose one from the list (such as linux-x86), and type:
|
Choose one from the list (such as linux-x86), and type:
|
||||||
</p>
|
</p>
|
||||||
@@ -124,7 +109,6 @@ Later, if you want to rebuild for a different configuration run
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<a name="libs">
|
|
||||||
<h3>1.4 The libraries</h3>
|
<h3>1.4 The libraries</h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -185,7 +169,6 @@ If you built the DRI hardware drivers, you'll also see the DRI drivers:
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
<a name="demos">
|
|
||||||
<h3>1.5 Running the demos</h3>
|
<h3>1.5 Running the demos</h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -261,7 +244,6 @@ Retrace your steps if this doesn't look right.
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<a name="install">
|
|
||||||
<H3>1.6 Installing the header and library files</H3>
|
<H3>1.6 Installing the header and library files</H3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -302,8 +284,7 @@ This is a handy way to compare multiple OpenGL implementations.
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<a name="pkg-config">
|
<H3>1.7 Building OpenGL Programs With pkg-config</H3>
|
||||||
<H3>1.7 Building OpenGL programs with pkg-config</H3>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Running <code>make install</code> will install package configuration files
|
Running <code>make install</code> will install package configuration files
|
||||||
@@ -333,15 +314,25 @@ Please see the <a href="README.WIN32">README.WIN32</a> file.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="vms">
|
||||||
|
<H2>3. VMS Compilation and Installation</H1>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Please see the <a href="README.VMS">README.VMS</a> file.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="other">
|
<a name="other">
|
||||||
<H2>3. Other systems</H1>
|
<H2>4. Other systems</H1>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Documentation for other environments (some may be very out of date):
|
Documentation for other environments (some may be very out of date):
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<UL>
|
<UL>
|
||||||
<li><A HREF="README.VMS">README.VMS</A> - VMS
|
|
||||||
<LI><A HREF="README.GGI">README.GGI</A> - GGI
|
<LI><A HREF="README.GGI">README.GGI</A> - GGI
|
||||||
<LI><A HREF="README.3DFX">README.3DFX</A> - 3Dfx/Glide driver
|
<LI><A HREF="README.3DFX">README.3DFX</A> - 3Dfx/Glide driver
|
||||||
<LI><A HREF="README.AMIWIN">README.AMIWIN</A> - Amiga Amiwin
|
<LI><A HREF="README.AMIWIN">README.AMIWIN</A> - Amiga Amiwin
|
||||||
|
|||||||
@@ -11,18 +11,10 @@
|
|||||||
<H1>News</H1>
|
<H1>News</H1>
|
||||||
|
|
||||||
|
|
||||||
<h2>January 22, 2009</h2>
|
<h2>September 15, 2008</h2>
|
||||||
<p>
|
|
||||||
<a href="relnotes-7.3.html">Mesa 7.3</a> is released.
|
|
||||||
This is a new development release.
|
|
||||||
Mesa 7.4 will follow and will have bug fixes relative to 7.3.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
<h2>September 20, 2008</h2>
|
|
||||||
<p>
|
<p>
|
||||||
<a href="relnotes-7.2.html">Mesa 7.2</a> is released.
|
<a href="relnotes-7.2.html">Mesa 7.2</a> is released.
|
||||||
This is a stable, bug-fix release.
|
This is stable, bug-fix release.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
@@ -1195,5 +1187,6 @@ source code</a>.</p>
|
|||||||
|
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
$Id: news.html,v 3.33 2006/12/02 18:18:41 brianp Exp $
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<body bgcolor="#eeeeee">
|
<body bgcolor="#eeeeee">
|
||||||
|
|
||||||
<H1>Mesa 7.2 Release Notes / 20 September 2008</H1>
|
<H1>Mesa 7.2 Release Notes / (date tbd)</H1>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Mesa 7.2 is a stable release fixing bugs found in 7.1, which was a
|
Mesa 7.2 is a stable release fixing bugs found in 7.1, which was a
|
||||||
@@ -31,15 +31,7 @@ DRM version 2.3.1 should be used with Mesa 7.2
|
|||||||
|
|
||||||
<h2>MD5 checksums</h2>
|
<h2>MD5 checksums</h2>
|
||||||
<pre>
|
<pre>
|
||||||
81a2a4b7cbfce7553f7ad8d924edbe2f MesaLib-7.2.tar.gz
|
tbd
|
||||||
04d379292e023df0b0266825cb0dbde5 MesaLib-7.2.tar.bz2
|
|
||||||
8bc497a37977a55e987a4d1fabc3d882 MesaLib-7.2.zip
|
|
||||||
10c762e39486df395838af1d7b57e69c MesaDemos-7.2.tar.gz
|
|
||||||
22e03dc4038cd63f32c21eb60994892b MesaDemos-7.2.tar.bz2
|
|
||||||
1197bc4eb3bf44e291c14d4eb2e19381 MesaDemos-7.2.zip
|
|
||||||
42e3c6c6d156cd9dc545dbef72407354 MesaGLUT-7.2.tar.gz
|
|
||||||
f67daf93e12c4a459703bbf3e4004e31 MesaGLUT-7.2.tar.bz2
|
|
||||||
0390567eb2c2d12fbf82e8523fd77e2b MesaGLUT-7.2.zip
|
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
@@ -51,23 +43,13 @@ f67daf93e12c4a459703bbf3e4004e31 MesaGLUT-7.2.tar.bz2
|
|||||||
|
|
||||||
<h2>Bug fixes</h2>
|
<h2>Bug fixes</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Fixed display list bug involving primitives split across lists (bug 17564)
|
|
||||||
<li>Fixed some issues with glBindAttribLocation()
|
|
||||||
<li>Fixed crash in _tnl_InvalidateState() found with Amira (bug 15834)
|
|
||||||
<li>Assorted bug fixes for Ming build
|
<li>Assorted bug fixes for Ming build
|
||||||
<li>Fixed some vertex/pixel buffer object reference counting bugs
|
<li>Fixed some vertex/pixel buffer object reference counting bugs
|
||||||
<li>Fixed depth/stencil bug in i915/945 driver
|
<li>Fixed depth/stencil bug in i915/945 driver
|
||||||
<li>Fixed some shader flow control bugs in i965 driver
|
<li>Fixed some shader flow control bugs in i965 driver
|
||||||
<li>Fixed a few tdfx driver bugs which prevented driver from working
|
<li>Fixed a few tdfx driver bugs which prevented driver from working
|
||||||
<li>Fixed multisample enable/disable bug
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2>Changes</h2>
|
|
||||||
<ul>
|
|
||||||
<li>Updated SGI header files with new license terms.
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h2>To Do (someday) items</h2>
|
<h2>To Do (someday) items</h2>
|
||||||
<ul>
|
<ul>
|
||||||
|
|||||||
@@ -1,93 +0,0 @@
|
|||||||
<HTML>
|
|
||||||
|
|
||||||
<TITLE>Mesa Release Notes</TITLE>
|
|
||||||
|
|
||||||
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
|
||||||
|
|
||||||
<BODY>
|
|
||||||
|
|
||||||
<body bgcolor="#eeeeee">
|
|
||||||
|
|
||||||
<H1>Mesa 7.3 Release Notes / 22 January 2009</H1>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Mesa 7.3 is a new development release.
|
|
||||||
Users especially concerned with stability should stick with latest
|
|
||||||
stable release: version 7.2.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Mesa 7.3 implements the OpenGL 2.1 API, but the version reported by
|
|
||||||
glGetString(GL_VERSION) depends on the particular driver being used.
|
|
||||||
Some drivers don't support all the features required in OpenGL 2.1.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
|
|
||||||
for DRI hardware acceleration.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
<h2>MD5 checksums</h2>
|
|
||||||
<pre>
|
|
||||||
8ed03191432b22d118d88d6db497f304 MesaLib-7.3.tar.gz
|
|
||||||
781e7811a6ed5c97b2b8defefc8ffbc9 MesaLib-7.3.tar.bz2
|
|
||||||
3ccba9a1734ed6d4b3389e1535d90fbf MesaLib-7.3.zip
|
|
||||||
d312e974b31043b13b61bac5fbf00b87 MesaDemos-7.3.tar.gz
|
|
||||||
3f0741394069bdf2329565a387396cda MesaDemos-7.3.tar.bz2
|
|
||||||
4d0887fd4c66a824295cdd619f6d34cb MesaDemos-7.3.zip
|
|
||||||
2d7661b66022bcb8878728f3d5bd33ab MesaGLUT-7.3.tar.gz
|
|
||||||
abe8036a724c1a483bdad6b5a55ddc1a MesaGLUT-7.3.tar.bz2
|
|
||||||
5f247819b47e2a7c62d07a6afe5262fb MesaGLUT-7.3.zip
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
|
|
||||||
<h2>New features</h2>
|
|
||||||
<ul>
|
|
||||||
<li>Support for GLSL 1.20
|
|
||||||
<li>Intel DRI drivers now use GEM and DRI2
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h2>Bug fixes</h2>
|
|
||||||
<ul>
|
|
||||||
<li>Assorted GLSL bug fixes
|
|
||||||
<li>Assorted i965 driver fixes
|
|
||||||
<li>Fix for wglCreateLayerContext() in WGL/Windows driver
|
|
||||||
<li>Build fixes for OpenBSD and gcc 2.95
|
|
||||||
<li>GLSL preprocessor handles #pragma now
|
|
||||||
<li>Fix incorrect transformation of GL_SPOT_DIRECTION
|
|
||||||
<li>Fixed several bugs (#18367 and #19625) in glXMakeContextCurrent()
|
|
||||||
<li>Assorted Windows build fixes
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h2>Changes</h2>
|
|
||||||
<ul>
|
|
||||||
<li>Deprecated the "XMesa" interface (include/GL/xmesa*.h files)
|
|
||||||
<li>Deprecated the "FXMesa" interface (include/GL/fxmesa.h file)
|
|
||||||
<li>Deprecated the "Allegro" interface (include/GL/amesa.h file)
|
|
||||||
<li>Removed include/GL/uglmesa.h header
|
|
||||||
<li>Removed include/GLView.h header for BeOS
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h2>Driver Status</h2>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
Driver Status
|
|
||||||
---------------------- ----------------------
|
|
||||||
DRI drivers varies with the driver
|
|
||||||
XMesa/GLX (on Xlib) implements OpenGL 2.1
|
|
||||||
OSMesa (off-screen) implements OpenGL 2.1
|
|
||||||
Windows/Win32 implements OpenGL 2.1
|
|
||||||
Glide (3dfx Voodoo1/2) implements OpenGL 1.3
|
|
||||||
SVGA unsupported
|
|
||||||
Wind River UGL unsupported
|
|
||||||
DJGPP unsupported
|
|
||||||
GGI unsupported
|
|
||||||
BeOS unsupported
|
|
||||||
Allegro unsupported
|
|
||||||
D3D unsupported
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,80 +0,0 @@
|
|||||||
<HTML>
|
|
||||||
|
|
||||||
<TITLE>Mesa Release Notes</TITLE>
|
|
||||||
|
|
||||||
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
|
||||||
|
|
||||||
<BODY>
|
|
||||||
|
|
||||||
<body bgcolor="#eeeeee">
|
|
||||||
|
|
||||||
<H1>Mesa 7.4 Release Notes / date TBD</H1>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Mesa 7.4 is a stable development release fixing bugs since the 7.3 release.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Mesa 7.4 implements the OpenGL 2.1 API, but the version reported by
|
|
||||||
glGetString(GL_VERSION) depends on the particular driver being used.
|
|
||||||
Some drivers don't support all the features required in OpenGL 2.1.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
|
|
||||||
for DRI ardware acceleration.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
<h2>MD5 checksums</h2>
|
|
||||||
<pre>
|
|
||||||
tbd
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
|
|
||||||
<h2>New features</h2>
|
|
||||||
<ul>
|
|
||||||
<li>Added MESA_GLX_FORCE_DIRECT env var for Xlib/software driver
|
|
||||||
<li>GLSL version 1.20 is returnd by the GL_SHADING_LANGUAGE_VERSION query
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<h2>Bug fixes</h2>
|
|
||||||
<ul>
|
|
||||||
<li>glGetActiveUniform() returned wrong size for some array types
|
|
||||||
<li>Fixed some error checking in glUniform()
|
|
||||||
<li>Fixed a potential glTexImage('proxy target') segfault
|
|
||||||
<li>Fixed bad reference counting for 1D/2D texture arrays
|
|
||||||
<li>Fixed VBO + glPush/PopClientAttrib() bug #19835
|
|
||||||
<li>Assorted i965 driver bug fixes
|
|
||||||
<li>Fixed a Windows compilation failure in s_triangle.c
|
|
||||||
<li>Fixed a GLSL array indexing bug
|
|
||||||
<li>Fixes for building on Haiku
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h2>Changes</h2>
|
|
||||||
<ul>
|
|
||||||
<li>Updated GL/glxext.h to version 46
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h2>Driver Status</h2>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
Driver Status
|
|
||||||
---------------------- ----------------------
|
|
||||||
DRI drivers varies with the driver
|
|
||||||
XMesa/GLX (on Xlib) implements OpenGL 2.1
|
|
||||||
OSMesa (off-screen) implements OpenGL 2.1
|
|
||||||
Windows/Win32 implements OpenGL 2.1
|
|
||||||
Glide (3dfx Voodoo1/2) implements OpenGL 1.3
|
|
||||||
SVGA unsupported
|
|
||||||
Wind River UGL unsupported
|
|
||||||
DJGPP unsupported
|
|
||||||
GGI unsupported
|
|
||||||
BeOS unsupported
|
|
||||||
Allegro unsupported
|
|
||||||
D3D unsupported
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -20,8 +20,6 @@ The release notes summarize what's new or changed in each Mesa release.
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A HREF="relnotes-7.4.html">7.4 release notes</A>
|
|
||||||
<LI><A HREF="relnotes-7.3.html">7.3 release notes</A>
|
|
||||||
<LI><A HREF="relnotes-7.2.html">7.2 release notes</A>
|
<LI><A HREF="relnotes-7.2.html">7.2 release notes</A>
|
||||||
<LI><A HREF="relnotes-7.1.html">7.1 release notes</A>
|
<LI><A HREF="relnotes-7.1.html">7.1 release notes</A>
|
||||||
<LI><A HREF="relnotes-7.0.4.html">7.0.4 release notes</A>
|
<LI><A HREF="relnotes-7.0.4.html">7.0.4 release notes</A>
|
||||||
|
|||||||
@@ -15,46 +15,23 @@ OpenGL Shading Language</a>.
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Last updated on 15 December 2008.
|
Last updated on 28 March 2007.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Contents
|
Contents
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#120">GLSL 1.20 support</a>
|
|
||||||
<li><a href="#unsup">Unsupported Features</a>
|
<li><a href="#unsup">Unsupported Features</a>
|
||||||
<li><a href="#notes">Implementation Notes</a>
|
<li><a href="#notes">Implementation Notes</a>
|
||||||
<li><a href="#hints">Programming Hints</a>
|
<li><a href="#hints">Programming Hints</a>
|
||||||
<li><a href="#standalone">Stand-alone GLSL Compiler</a>
|
<li><a href="#standalone">Stand-alone GLSL Compiler</a>
|
||||||
<li><a href="#implementation">Compiler Implementation</a>
|
<li><a href="#implementation">Compiler Implementation</a>
|
||||||
<li><a href="#validation">Compiler Validation</a>
|
<li><a href="#validation">Compiler Validation</a>
|
||||||
|
<li><a href="#120">GLSL 1.20 support</a>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="120">
|
|
||||||
<h2>GLSL 1.20 support</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
GLSL version 1.20 is supported in Mesa 7.3.
|
|
||||||
Among the features/differences of GLSL 1.20 are:
|
|
||||||
<ul>
|
|
||||||
<li><code>mat2x3, mat2x4</code>, etc. types and functions
|
|
||||||
<li><code>transpose(), outerProduct(), matrixCompMult()</code> functions
|
|
||||||
(but untested)
|
|
||||||
<li>precision qualifiers (lowp, mediump, highp)
|
|
||||||
<li><code>invariant</code> qualifier
|
|
||||||
<li><code>array.length()</code> method
|
|
||||||
<li><code>float[5] a;</code> array syntax
|
|
||||||
<li><code>centroid</code> qualifier
|
|
||||||
<li>unsized array constructors
|
|
||||||
<li>initializers for uniforms
|
|
||||||
<li>const initializers calling built-in functions
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="unsup">
|
<a name="unsup">
|
||||||
<h2>Unsupported Features</h2>
|
<h2>Unsupported Features</h2>
|
||||||
|
|
||||||
@@ -64,10 +41,15 @@ in Mesa:
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>Dereferencing arrays with non-constant indexes
|
||||||
|
<li>Comparison of user-defined structs
|
||||||
<li>Linking of multiple shaders is not supported
|
<li>Linking of multiple shaders is not supported
|
||||||
<li>gl_ClipVertex
|
<li>gl_ClipVertex
|
||||||
|
<li>The derivative functions such as dFdx() are not implemented
|
||||||
|
<li>The inverse trig functions asin(), acos(), and atan() are not implemented
|
||||||
<li>The gl_Color and gl_SecondaryColor varying vars are interpolated
|
<li>The gl_Color and gl_SecondaryColor varying vars are interpolated
|
||||||
without perspective correction
|
without perspective correction
|
||||||
|
<li>Floating point literal suffixes 'f' and 'F' aren't allowed.
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -322,11 +304,11 @@ Extra NOP instructions will also be inserted.
|
|||||||
<h2>Compiler Validation</h2>
|
<h2>Compiler Validation</h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
A <a href="http://glean.sf.net" target="_parent">Glean</a> test has
|
A new <a href="http://glean.sf.net" target="_parent">Glean</a> test has
|
||||||
been create to exercise the GLSL compiler.
|
been create to exercise the GLSL compiler.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
The <em>glsl1</em> test runs over 170 sub-tests to check that the language
|
The <em>glsl1</em> test runs over 150 sub-tests to check that the language
|
||||||
features and built-in functions work properly.
|
features and built-in functions work properly.
|
||||||
This test should be run frequently while working on the compiler to catch
|
This test should be run frequently while working on the compiler to catch
|
||||||
regressions.
|
regressions.
|
||||||
@@ -337,5 +319,39 @@ should be added.
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="120">
|
||||||
|
<h2>GLSL 1.20 support</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Support for GLSL version 1.20 is underway. Status as follows.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>Supported</h3>
|
||||||
|
<ul>
|
||||||
|
<li><code>mat2x3, mat2x4</code>, etc. types and functions
|
||||||
|
<li><code>transpose(), outerProduct(), matrixCompMult()</code> functions
|
||||||
|
(but untested)
|
||||||
|
<li>precision qualifiers (lowp, mediump, highp)
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3>Partially Complete</h3>
|
||||||
|
<ul>
|
||||||
|
<li><code>invariant</code> qualifier
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3>Not Completed</h3>
|
||||||
|
<ul>
|
||||||
|
<li><code>array.length()</code> method
|
||||||
|
<li><code>float[5] a;</code> array syntax
|
||||||
|
<li><code>centroid</code> qualifier
|
||||||
|
<li>unsized array constructors
|
||||||
|
<li>initializers for uniforms
|
||||||
|
<li>const initializers calling built-in functions
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</BODY>
|
</BODY>
|
||||||
</HTML>
|
</HTML>
|
||||||
|
|||||||
@@ -27,27 +27,16 @@ the Amiga, Apple Macintosh, BeOS, NeXT, OS/2, MS-DOS, VMS, Windows
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Details about particular drivers follows:
|
Details about particular drivers follows.
|
||||||
|
Be warned that some drivers may be out of date and no longer function.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<UL>
|
<UL>
|
||||||
<li><a href="http://dri.freedesktop.org/" target="_parent"> DRI hardware
|
<LI><a href="xlibdriver.html">Xlib driver</a> for the X Window System
|
||||||
drivers</a> for the X Window System
|
<li><a href="http://dri.freedesktop.org/" target="_parent">
|
||||||
<LI><a href="xlibdriver.html">Xlib software driver</a> for the X Window System
|
DRI hardware drivers</a> for the X window system
|
||||||
and Unix-like operating systems
|
|
||||||
<LI>Microsoft Windows <A HREF="README.WIN32">(README.WIN32)</A>
|
<LI>Microsoft Windows <A HREF="README.WIN32">(README.WIN32)</A>
|
||||||
<LI>DEC VMS <A HREF="README.VMS">(README.VMS)</A>
|
<LI>DEC VMS <A HREF="README.VMS">(README.VMS)</A>
|
||||||
</UL>
|
|
||||||
|
|
||||||
|
|
||||||
<h2>Deprecated Systems</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
These drivers have not been maintained and are being deprecated.
|
|
||||||
They can be saved if someone steps up to help.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<UL>
|
|
||||||
<LI>3dfx/Glide <A HREF="README.3DFX">(README.3DFX)</A>
|
<LI>3dfx/Glide <A HREF="README.3DFX">(README.3DFX)</A>
|
||||||
<LI>GGI <A HREF="README.GGI">(README.GGI)</A>
|
<LI>GGI <A HREF="README.GGI">(README.GGI)</A>
|
||||||
<LI>Amiga Amiwin <A HREF="README.AMIWIN">(README.AMIWIN)</A>
|
<LI>Amiga Amiwin <A HREF="README.AMIWIN">(README.AMIWIN)</A>
|
||||||
@@ -60,10 +49,6 @@ They can be saved if someone steps up to help.
|
|||||||
<LI>OpenStep <A HREF="README.OpenStep">(README.OpenStep)</A>
|
<LI>OpenStep <A HREF="README.OpenStep">(README.OpenStep)</A>
|
||||||
<LI>OS/2 <A HREF="README.OS2">(README.OS2)</A>
|
<LI>OS/2 <A HREF="README.OS2">(README.OS2)</A>
|
||||||
<LI>WindML <A HREF="README.WINDML">(README.WINDML)</A>
|
<LI>WindML <A HREF="README.WINDML">(README.WINDML)</A>
|
||||||
</UL>
|
|
||||||
|
|
||||||
And for historical reference:
|
|
||||||
<UL>
|
|
||||||
<LI><a href="http://utah-glx.sourceforge.net/" target="_parent">Utah GLX drivers</a>
|
<LI><a href="http://utah-glx.sourceforge.net/" target="_parent">Utah GLX drivers</a>
|
||||||
</UL>
|
</UL>
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<p>
|
<p>
|
||||||
If you have problems, edits or additions for this website send them
|
If you have problems, edits or additions for this website send them
|
||||||
to Brian
|
to Brian
|
||||||
(<em>b</em><em>r</em><em>i</em><em>a</em><em>n</em><em>.</em><em>e</em><em>.</em><em>p</em><em>a</em><em>u</em><em>l</em><em> </em><em>g</em><em>m</em><em>a</em><em>i</em><em>l</em><em>.</em><em>c</em><em>o</em><em>m</em>)</a>.
|
(<em>b</em><em>r</em><em>i</em><em>a</em><em>n</em><em>_</em><em>e</em><em>_</em><em>p</em><em>a</em><em>u</em><em>l</em><em>@</em><em>y</em><em>a</em><em>h</em><em>o</em><em>o</em><em>.</em><em>c</em><em>o</em><em>m</em>)</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -21,4 +21,4 @@ Brian's modified it a lot since then.
|
|||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -169,20 +169,6 @@ the Gamma FAQ</a>
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<H2>Direct Rendering Flag</H2>
|
|
||||||
<p>
|
|
||||||
Some applications won't run with indirect rendering contexts (which is
|
|
||||||
what the Xlib driver supports).
|
|
||||||
To force the glXIsDirect() query to return True, set the MESA_GLX_FORCE_DIRECT
|
|
||||||
environment variable.
|
|
||||||
For example:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
$ export MESA_GLX_FORCE_DIRECT=1
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<H2>Overlay Planes</H2>
|
<H2>Overlay Planes</H2>
|
||||||
<p>
|
<p>
|
||||||
Hardware overlay planes are supported by the Xlib driver. To
|
Hardware overlay planes are supported by the Xlib driver. To
|
||||||
@@ -282,8 +268,6 @@ This extension was added in Mesa 2.6
|
|||||||
MESA_BACK_BUFFER - specifies how to implement the back color buffer (X only)
|
MESA_BACK_BUFFER - specifies how to implement the back color buffer (X only)
|
||||||
MESA_PRIVATE_CMAP - force aux/tk libraries to use private colormaps (X only)
|
MESA_PRIVATE_CMAP - force aux/tk libraries to use private colormaps (X only)
|
||||||
MESA_GAMMA - gamma correction coefficients (X only)
|
MESA_GAMMA - gamma correction coefficients (X only)
|
||||||
MESA_GLX_FORCE_DIRECT - report that the driver is direct rendering, even
|
|
||||||
though it's not.
|
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,12 +2,17 @@
|
|||||||
|
|
||||||
GLincludedir = $(includedir)/GL
|
GLincludedir = $(includedir)/GL
|
||||||
|
|
||||||
|
INC_FX = fxmesa.h
|
||||||
INC_GGI = ggimesa.h
|
INC_GGI = ggimesa.h
|
||||||
INC_OSMESA = osmesa.h
|
INC_OSMESA = osmesa.h
|
||||||
INC_SVGA = svgamesa.h
|
INC_SVGA = svgamesa.h
|
||||||
INC_X11 = glx.h glxext.h glx_mangle.h
|
INC_X11 = glx.h glxext.h glx_mangle.h xmesa.h xmesa_x.h xmesa_xf86.h
|
||||||
INC_GLUT = glut.h glutf90.h
|
INC_GLUT = glut.h glutf90.h
|
||||||
|
|
||||||
|
if HAVE_FX
|
||||||
|
sel_inc_fx = $(INC_FX)
|
||||||
|
endif
|
||||||
|
|
||||||
if HAVE_GGI
|
if HAVE_GGI
|
||||||
sel_inc_ggi = $(INC_GGI)
|
sel_inc_ggi = $(INC_GGI)
|
||||||
endif
|
endif
|
||||||
@@ -30,9 +35,9 @@ endif
|
|||||||
|
|
||||||
EXTRA_HEADERS = amesa.h dosmesa.h foomesa.h glut_h.dja mesa_wgl.h mglmesa.h \
|
EXTRA_HEADERS = amesa.h dosmesa.h foomesa.h glut_h.dja mesa_wgl.h mglmesa.h \
|
||||||
vms_x_fix.h wmesa.h \
|
vms_x_fix.h wmesa.h \
|
||||||
$(INC_GGI) $(INC_OSMESA) $(INC_SVGA) $(INC_X11) $(INC_GLUT)
|
$(INC_FX) $(INC_GGI) $(INC_OSMESA) $(INC_SVGA) $(INC_X11) $(INC_GLUT)
|
||||||
|
|
||||||
GLinclude_HEADERS = gl.h glext.h gl_mangle.h glu.h glu_mangle.h \
|
GLinclude_HEADERS = gl.h glext.h gl_mangle.h glu.h glu_mangle.h \
|
||||||
$(sel_inc_ggi) $(sel_inc_osmesa) $(sel_inc_svga) \
|
$(sel_inc_fx) $(sel_inc_ggi) $(sel_inc_osmesa) $(sel_inc_svga) \
|
||||||
$(sel_inc_x11) $(sel_inc_glut)
|
$(sel_inc_x11) $(sel_inc_glut)
|
||||||
include $(top_srcdir)/common_rules.make
|
include $(top_srcdir)/common_rules.make
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
* Version: 7.4
|
* Version: 6.5.1
|
||||||
*
|
*
|
||||||
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
|
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -46,9 +46,9 @@ extern "C" {
|
|||||||
/*************************************************************/
|
/*************************************************************/
|
||||||
|
|
||||||
/* Header file version number, required by OpenGL ABI for Linux */
|
/* Header file version number, required by OpenGL ABI for Linux */
|
||||||
/* glext.h last updated 2009/03/04 */
|
/* glext.h last updated 2008/08/10 */
|
||||||
/* Current version at http://www.opengl.org/registry/ */
|
/* Current version at http://www.opengl.org/registry/ */
|
||||||
#define GL_GLEXT_VERSION 46
|
#define GL_GLEXT_VERSION 41
|
||||||
|
|
||||||
#ifndef GL_VERSION_1_2
|
#ifndef GL_VERSION_1_2
|
||||||
#define GL_UNSIGNED_BYTE_3_3_2 0x8032
|
#define GL_UNSIGNED_BYTE_3_3_2 0x8032
|
||||||
@@ -588,132 +588,6 @@ extern "C" {
|
|||||||
#define GL_QUERY_NO_WAIT 0x8E14
|
#define GL_QUERY_NO_WAIT 0x8E14
|
||||||
#define GL_QUERY_BY_REGION_WAIT 0x8E15
|
#define GL_QUERY_BY_REGION_WAIT 0x8E15
|
||||||
#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16
|
#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16
|
||||||
/* Reuse tokens from ARB_depth_buffer_float */
|
|
||||||
/* reuse GL_DEPTH_COMPONENT32F */
|
|
||||||
/* reuse GL_DEPTH32F_STENCIL8 */
|
|
||||||
/* reuse GL_FLOAT_32_UNSIGNED_INT_24_8_REV */
|
|
||||||
/* Reuse tokens from ARB_framebuffer_object */
|
|
||||||
/* reuse GL_INVALID_FRAMEBUFFER_OPERATION */
|
|
||||||
/* reuse GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
|
|
||||||
/* reuse GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
|
|
||||||
/* reuse GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
|
|
||||||
/* reuse GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
|
|
||||||
/* reuse GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
|
|
||||||
/* reuse GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
|
|
||||||
/* reuse GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
|
|
||||||
/* reuse GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
|
|
||||||
/* reuse GL_FRAMEBUFFER_DEFAULT */
|
|
||||||
/* reuse GL_FRAMEBUFFER_UNDEFINED */
|
|
||||||
/* reuse GL_DEPTH_STENCIL_ATTACHMENT */
|
|
||||||
/* reuse GL_INDEX */
|
|
||||||
/* reuse GL_MAX_RENDERBUFFER_SIZE */
|
|
||||||
/* reuse GL_DEPTH_STENCIL */
|
|
||||||
/* reuse GL_UNSIGNED_INT_24_8 */
|
|
||||||
/* reuse GL_DEPTH24_STENCIL8 */
|
|
||||||
/* reuse GL_TEXTURE_STENCIL_SIZE */
|
|
||||||
/* reuse GL_TEXTURE_RED_TYPE */
|
|
||||||
/* reuse GL_TEXTURE_GREEN_TYPE */
|
|
||||||
/* reuse GL_TEXTURE_BLUE_TYPE */
|
|
||||||
/* reuse GL_TEXTURE_ALPHA_TYPE */
|
|
||||||
/* reuse GL_TEXTURE_LUMINANCE_TYPE */
|
|
||||||
/* reuse GL_TEXTURE_INTENSITY_TYPE */
|
|
||||||
/* reuse GL_TEXTURE_DEPTH_TYPE */
|
|
||||||
/* reuse GL_UNSIGNED_NORMALIZED */
|
|
||||||
/* reuse GL_FRAMEBUFFER_BINDING */
|
|
||||||
/* reuse GL_DRAW_FRAMEBUFFER_BINDING */
|
|
||||||
/* reuse GL_RENDERBUFFER_BINDING */
|
|
||||||
/* reuse GL_READ_FRAMEBUFFER */
|
|
||||||
/* reuse GL_DRAW_FRAMEBUFFER */
|
|
||||||
/* reuse GL_READ_FRAMEBUFFER_BINDING */
|
|
||||||
/* reuse GL_RENDERBUFFER_SAMPLES */
|
|
||||||
/* reuse GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
|
|
||||||
/* reuse GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
|
|
||||||
/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
|
|
||||||
/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
|
|
||||||
/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
|
|
||||||
/* reuse GL_FRAMEBUFFER_COMPLETE */
|
|
||||||
/* reuse GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
|
|
||||||
/* reuse GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
|
|
||||||
/* reuse GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */
|
|
||||||
/* reuse GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */
|
|
||||||
/* reuse GL_FRAMEBUFFER_UNSUPPORTED */
|
|
||||||
/* reuse GL_MAX_COLOR_ATTACHMENTS */
|
|
||||||
/* reuse GL_COLOR_ATTACHMENT0 */
|
|
||||||
/* reuse GL_COLOR_ATTACHMENT1 */
|
|
||||||
/* reuse GL_COLOR_ATTACHMENT2 */
|
|
||||||
/* reuse GL_COLOR_ATTACHMENT3 */
|
|
||||||
/* reuse GL_COLOR_ATTACHMENT4 */
|
|
||||||
/* reuse GL_COLOR_ATTACHMENT5 */
|
|
||||||
/* reuse GL_COLOR_ATTACHMENT6 */
|
|
||||||
/* reuse GL_COLOR_ATTACHMENT7 */
|
|
||||||
/* reuse GL_COLOR_ATTACHMENT8 */
|
|
||||||
/* reuse GL_COLOR_ATTACHMENT9 */
|
|
||||||
/* reuse GL_COLOR_ATTACHMENT10 */
|
|
||||||
/* reuse GL_COLOR_ATTACHMENT11 */
|
|
||||||
/* reuse GL_COLOR_ATTACHMENT12 */
|
|
||||||
/* reuse GL_COLOR_ATTACHMENT13 */
|
|
||||||
/* reuse GL_COLOR_ATTACHMENT14 */
|
|
||||||
/* reuse GL_COLOR_ATTACHMENT15 */
|
|
||||||
/* reuse GL_DEPTH_ATTACHMENT */
|
|
||||||
/* reuse GL_STENCIL_ATTACHMENT */
|
|
||||||
/* reuse GL_FRAMEBUFFER */
|
|
||||||
/* reuse GL_RENDERBUFFER */
|
|
||||||
/* reuse GL_RENDERBUFFER_WIDTH */
|
|
||||||
/* reuse GL_RENDERBUFFER_HEIGHT */
|
|
||||||
/* reuse GL_RENDERBUFFER_INTERNAL_FORMAT */
|
|
||||||
/* reuse GL_STENCIL_INDEX1 */
|
|
||||||
/* reuse GL_STENCIL_INDEX4 */
|
|
||||||
/* reuse GL_STENCIL_INDEX8 */
|
|
||||||
/* reuse GL_STENCIL_INDEX16 */
|
|
||||||
/* reuse GL_RENDERBUFFER_RED_SIZE */
|
|
||||||
/* reuse GL_RENDERBUFFER_GREEN_SIZE */
|
|
||||||
/* reuse GL_RENDERBUFFER_BLUE_SIZE */
|
|
||||||
/* reuse GL_RENDERBUFFER_ALPHA_SIZE */
|
|
||||||
/* reuse GL_RENDERBUFFER_DEPTH_SIZE */
|
|
||||||
/* reuse GL_RENDERBUFFER_STENCIL_SIZE */
|
|
||||||
/* reuse GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
|
|
||||||
/* reuse GL_MAX_SAMPLES */
|
|
||||||
/* Reuse tokens from ARB_framebuffer_sRGB */
|
|
||||||
/* reuse GL_FRAMEBUFFER_SRGB */
|
|
||||||
/* Reuse tokens from ARB_half_float_vertex */
|
|
||||||
/* reuse GL_HALF_FLOAT */
|
|
||||||
/* Reuse tokens from ARB_map_buffer_range */
|
|
||||||
/* reuse GL_MAP_READ_BIT */
|
|
||||||
/* reuse GL_MAP_WRITE_BIT */
|
|
||||||
/* reuse GL_MAP_INVALIDATE_RANGE_BIT */
|
|
||||||
/* reuse GL_MAP_INVALIDATE_BUFFER_BIT */
|
|
||||||
/* reuse GL_MAP_FLUSH_EXPLICIT_BIT */
|
|
||||||
/* reuse GL_MAP_UNSYNCHRONIZED_BIT */
|
|
||||||
/* Reuse tokens from ARB_texture_compression_rgtc */
|
|
||||||
/* reuse GL_COMPRESSED_RED_RGTC1 */
|
|
||||||
/* reuse GL_COMPRESSED_SIGNED_RED_RGTC1 */
|
|
||||||
/* reuse GL_COMPRESSED_RG_RGTC2 */
|
|
||||||
/* reuse GL_COMPRESSED_SIGNED_RG_RGTC2 */
|
|
||||||
/* Reuse tokens from ARB_texture_rg */
|
|
||||||
/* reuse GL_RG */
|
|
||||||
/* reuse GL_RG_INTEGER */
|
|
||||||
/* reuse GL_R8 */
|
|
||||||
/* reuse GL_R16 */
|
|
||||||
/* reuse GL_RG8 */
|
|
||||||
/* reuse GL_RG16 */
|
|
||||||
/* reuse GL_R16F */
|
|
||||||
/* reuse GL_R32F */
|
|
||||||
/* reuse GL_RG16F */
|
|
||||||
/* reuse GL_RG32F */
|
|
||||||
/* reuse GL_R8I */
|
|
||||||
/* reuse GL_R8UI */
|
|
||||||
/* reuse GL_R16I */
|
|
||||||
/* reuse GL_R16UI */
|
|
||||||
/* reuse GL_R32I */
|
|
||||||
/* reuse GL_R32UI */
|
|
||||||
/* reuse GL_RG8I */
|
|
||||||
/* reuse GL_RG8UI */
|
|
||||||
/* reuse GL_RG16I */
|
|
||||||
/* reuse GL_RG16UI */
|
|
||||||
/* reuse GL_RG32I */
|
|
||||||
/* reuse GL_RG32UI */
|
|
||||||
/* Reuse tokens from ARB_vertex_array_object */
|
|
||||||
/* reuse GL_VERTEX_ARRAY_BINDING */
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GL_ARB_multitexture
|
#ifndef GL_ARB_multitexture
|
||||||
@@ -1318,8 +1192,6 @@ extern "C" {
|
|||||||
#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF
|
#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF
|
||||||
#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0
|
#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0
|
||||||
#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1
|
#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1
|
||||||
/* reuse GL_MAX_VARYING_COMPONENTS */
|
|
||||||
/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GL_ARB_half_float_vertex
|
#ifndef GL_ARB_half_float_vertex
|
||||||
@@ -3824,60 +3696,6 @@ extern "C" {
|
|||||||
#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76
|
#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GL_EXT_direct_state_access
|
|
||||||
#define GL_PROGRAM_MATRIX_EXT 0x8E2D
|
|
||||||
#define GL_TRANSPOSE_PROGRAM_MATRIX_EXT 0x8E2E
|
|
||||||
#define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef GL_EXT_vertex_array_bgra
|
|
||||||
/* reuse GL_BGRA */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef GL_EXT_texture_swizzle
|
|
||||||
#define GL_TEXTURE_SWIZZLE_R_EXT 0x8E42
|
|
||||||
#define GL_TEXTURE_SWIZZLE_G_EXT 0x8E43
|
|
||||||
#define GL_TEXTURE_SWIZZLE_B_EXT 0x8E44
|
|
||||||
#define GL_TEXTURE_SWIZZLE_A_EXT 0x8E45
|
|
||||||
#define GL_TEXTURE_SWIZZLE_RGBA_EXT 0x8E46
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef GL_NV_explicit_multisample
|
|
||||||
#define GL_SAMPLE_POSITION_NV 0x8E50
|
|
||||||
#define GL_SAMPLE_MASK_NV 0x8E51
|
|
||||||
#define GL_SAMPLE_MASK_VALUE_NV 0x8E52
|
|
||||||
#define GL_TEXTURE_BINDING_RENDERBUFFER_NV 0x8E53
|
|
||||||
#define GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV 0x8E54
|
|
||||||
#define GL_MAX_SAMPLE_MASK_WORDS_NV 0x8E59
|
|
||||||
#define GL_TEXTURE_RENDERBUFFER_NV 0x8E55
|
|
||||||
#define GL_SAMPLER_RENDERBUFFER_NV 0x8E56
|
|
||||||
#define GL_INT_SAMPLER_RENDERBUFFER_NV 0x8E57
|
|
||||||
#define GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV 0x8E58
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef GL_NV_transform_feedback2
|
|
||||||
#define GL_TRANSFORM_FEEDBACK_NV 0x8E22
|
|
||||||
#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV 0x8E23
|
|
||||||
#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV 0x8E24
|
|
||||||
#define GL_TRANSFORM_FEEDBACK_BINDING_NV 0x8E25
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef GL_ATI_meminfo
|
|
||||||
#define GL_VBO_FREE_MEMORY_ATI 0x87FB
|
|
||||||
#define GL_TEXTURE_FREE_MEMORY_ATI 0x87FC
|
|
||||||
#define GL_RENDERBUFFER_FREE_MEMORY_ATI 0x87FD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef GL_AMD_performance_monitor
|
|
||||||
#define GL_COUNTER_TYPE_AMD 0x8BC0
|
|
||||||
#define GL_COUNTER_RANGE_AMD 0x8BC1
|
|
||||||
#define GL_UNSIGNED_INT64_AMD 0x8BC2
|
|
||||||
#define GL_PERCENTAGE_AMD 0x8BC3
|
|
||||||
#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4
|
|
||||||
#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5
|
|
||||||
#define GL_PERFMON_RESULT_AMD 0x8BC6
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************/
|
/*************************************************************/
|
||||||
|
|
||||||
@@ -4488,128 +4306,6 @@ typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei co
|
|||||||
|
|
||||||
#ifndef GL_VERSION_3_0
|
#ifndef GL_VERSION_3_0
|
||||||
#define GL_VERSION_3_0 1
|
#define GL_VERSION_3_0 1
|
||||||
/* OpenGL 3.0 also reuses entry points from these extensions: */
|
|
||||||
/* ARB_framebuffer_object */
|
|
||||||
/* ARB_map_buffer_range */
|
|
||||||
/* ARB_vertex_array_object */
|
|
||||||
#ifdef GL_GLEXT_PROTOTYPES
|
|
||||||
GLAPI void APIENTRY glColorMaski (GLuint, GLboolean, GLboolean, GLboolean, GLboolean);
|
|
||||||
GLAPI void APIENTRY glGetBooleani_v (GLenum, GLuint, GLboolean *);
|
|
||||||
GLAPI void APIENTRY glGetIntegeri_v (GLenum, GLuint, GLint *);
|
|
||||||
GLAPI void APIENTRY glEnablei (GLenum, GLuint);
|
|
||||||
GLAPI void APIENTRY glDisablei (GLenum, GLuint);
|
|
||||||
GLAPI GLboolean APIENTRY glIsEnabledi (GLenum, GLuint);
|
|
||||||
GLAPI void APIENTRY glBeginTransformFeedback (GLenum);
|
|
||||||
GLAPI void APIENTRY glEndTransformFeedback (void);
|
|
||||||
GLAPI void APIENTRY glBindBufferRange (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr);
|
|
||||||
GLAPI void APIENTRY glBindBufferBase (GLenum, GLuint, GLuint);
|
|
||||||
GLAPI void APIENTRY glTransformFeedbackVaryings (GLuint, GLsizei, const GLint *, GLenum);
|
|
||||||
GLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint, GLuint, GLint *);
|
|
||||||
GLAPI void APIENTRY glClampColor (GLenum, GLenum);
|
|
||||||
GLAPI void APIENTRY glBeginConditionalRender (GLuint, GLenum);
|
|
||||||
GLAPI void APIENTRY glEndConditionalRender (void);
|
|
||||||
GLAPI void APIENTRY glVertexAttribI1i (GLuint, GLint);
|
|
||||||
GLAPI void APIENTRY glVertexAttribI2i (GLuint, GLint, GLint);
|
|
||||||
GLAPI void APIENTRY glVertexAttribI3i (GLuint, GLint, GLint, GLint);
|
|
||||||
GLAPI void APIENTRY glVertexAttribI4i (GLuint, GLint, GLint, GLint, GLint);
|
|
||||||
GLAPI void APIENTRY glVertexAttribI1ui (GLuint, GLuint);
|
|
||||||
GLAPI void APIENTRY glVertexAttribI2ui (GLuint, GLuint, GLuint);
|
|
||||||
GLAPI void APIENTRY glVertexAttribI3ui (GLuint, GLuint, GLuint, GLuint);
|
|
||||||
GLAPI void APIENTRY glVertexAttribI4ui (GLuint, GLuint, GLuint, GLuint, GLuint);
|
|
||||||
GLAPI void APIENTRY glVertexAttribI1iv (GLuint, const GLint *);
|
|
||||||
GLAPI void APIENTRY glVertexAttribI2iv (GLuint, const GLint *);
|
|
||||||
GLAPI void APIENTRY glVertexAttribI3iv (GLuint, const GLint *);
|
|
||||||
GLAPI void APIENTRY glVertexAttribI4iv (GLuint, const GLint *);
|
|
||||||
GLAPI void APIENTRY glVertexAttribI1uiv (GLuint, const GLuint *);
|
|
||||||
GLAPI void APIENTRY glVertexAttribI2uiv (GLuint, const GLuint *);
|
|
||||||
GLAPI void APIENTRY glVertexAttribI3uiv (GLuint, const GLuint *);
|
|
||||||
GLAPI void APIENTRY glVertexAttribI4uiv (GLuint, const GLuint *);
|
|
||||||
GLAPI void APIENTRY glVertexAttribI4bv (GLuint, const GLbyte *);
|
|
||||||
GLAPI void APIENTRY glVertexAttribI4sv (GLuint, const GLshort *);
|
|
||||||
GLAPI void APIENTRY glVertexAttribI4ubv (GLuint, const GLubyte *);
|
|
||||||
GLAPI void APIENTRY glVertexAttribI4usv (GLuint, const GLushort *);
|
|
||||||
GLAPI void APIENTRY glVertexAttribIPointer (GLuint, GLint, GLenum, GLsizei, const GLvoid *);
|
|
||||||
GLAPI void APIENTRY glGetVertexAttribIiv (GLuint, GLenum, GLint *);
|
|
||||||
GLAPI void APIENTRY glGetVertexAttribIuiv (GLuint, GLenum, GLuint *);
|
|
||||||
GLAPI void APIENTRY glGetUniformuiv (GLuint, GLint, GLuint *);
|
|
||||||
GLAPI void APIENTRY glBindFragDataLocation (GLuint, GLuint, const GLchar *);
|
|
||||||
GLAPI GLint APIENTRY glGetFragDataLocation (GLuint, const GLchar *);
|
|
||||||
GLAPI void APIENTRY glUniform1ui (GLint, GLuint);
|
|
||||||
GLAPI void APIENTRY glUniform2ui (GLint, GLuint, GLuint);
|
|
||||||
GLAPI void APIENTRY glUniform3ui (GLint, GLuint, GLuint, GLuint);
|
|
||||||
GLAPI void APIENTRY glUniform4ui (GLint, GLuint, GLuint, GLuint, GLuint);
|
|
||||||
GLAPI void APIENTRY glUniform1uiv (GLint, GLsizei, const GLuint *);
|
|
||||||
GLAPI void APIENTRY glUniform2uiv (GLint, GLsizei, const GLuint *);
|
|
||||||
GLAPI void APIENTRY glUniform3uiv (GLint, GLsizei, const GLuint *);
|
|
||||||
GLAPI void APIENTRY glUniform4uiv (GLint, GLsizei, const GLuint *);
|
|
||||||
GLAPI void APIENTRY glTexParameterIiv (GLenum, GLenum, const GLint *);
|
|
||||||
GLAPI void APIENTRY glTexParameterIuiv (GLenum, GLenum, const GLuint *);
|
|
||||||
GLAPI void APIENTRY glGetTexParameterIiv (GLenum, GLenum, GLint *);
|
|
||||||
GLAPI void APIENTRY glGetTexParameterIuiv (GLenum, GLenum, GLuint *);
|
|
||||||
GLAPI void APIENTRY glClearBufferiv (GLenum, GLint, const GLint *);
|
|
||||||
GLAPI void APIENTRY glClearBufferuiv (GLenum, GLint, const GLuint *);
|
|
||||||
GLAPI void APIENTRY glClearBufferfv (GLenum, GLint, const GLfloat *);
|
|
||||||
GLAPI void APIENTRY glClearBufferfi (GLenum, GLint, GLfloat, GLint);
|
|
||||||
GLAPI const GLubyte * APIENTRY glGetStringi (GLenum, GLuint);
|
|
||||||
#endif /* GL_GLEXT_PROTOTYPES */
|
|
||||||
typedef void (APIENTRYP PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
|
|
||||||
typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data);
|
|
||||||
typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data);
|
|
||||||
typedef void (APIENTRYP PFNGLENABLEIPROC) (GLenum target, GLuint index);
|
|
||||||
typedef void (APIENTRYP PFNGLDISABLEIPROC) (GLenum target, GLuint index);
|
|
||||||
typedef GLboolean (APIENTRYP PFNGLISENABLEDIPROC) (GLenum target, GLuint index);
|
|
||||||
typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode);
|
|
||||||
typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void);
|
|
||||||
typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
|
|
||||||
typedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer);
|
|
||||||
typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
|
|
||||||
typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLint *location);
|
|
||||||
typedef void (APIENTRYP PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp);
|
|
||||||
typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode);
|
|
||||||
typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC) (void);
|
|
||||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IPROC) (GLuint index, GLint x);
|
|
||||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IPROC) (GLuint index, GLint x, GLint y);
|
|
||||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IPROC) (GLuint index, GLint x, GLint y, GLint z);
|
|
||||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
|
|
||||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIPROC) (GLuint index, GLuint x);
|
|
||||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIPROC) (GLuint index, GLuint x, GLuint y);
|
|
||||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
|
|
||||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
|
|
||||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVPROC) (GLuint index, const GLint *v);
|
|
||||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVPROC) (GLuint index, const GLint *v);
|
|
||||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVPROC) (GLuint index, const GLint *v);
|
|
||||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v);
|
|
||||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC) (GLuint index, const GLuint *v);
|
|
||||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC) (GLuint index, const GLuint *v);
|
|
||||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC) (GLuint index, const GLuint *v);
|
|
||||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v);
|
|
||||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVPROC) (GLuint index, const GLbyte *v);
|
|
||||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort *v);
|
|
||||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC) (GLuint index, const GLubyte *v);
|
|
||||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVPROC) (GLuint index, const GLushort *v);
|
|
||||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
|
||||||
typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint color, const GLchar *name);
|
|
||||||
typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name);
|
|
||||||
typedef void (APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0);
|
|
||||||
typedef void (APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1);
|
|
||||||
typedef void (APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
|
|
||||||
typedef void (APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
|
|
||||||
typedef void (APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value);
|
|
||||||
typedef void (APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value);
|
|
||||||
typedef void (APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value);
|
|
||||||
typedef void (APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value);
|
|
||||||
typedef void (APIENTRYP PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value);
|
|
||||||
typedef void (APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value);
|
|
||||||
typedef void (APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value);
|
|
||||||
typedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
|
|
||||||
typedef const GLubyte * (APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GL_ARB_multitexture
|
#ifndef GL_ARB_multitexture
|
||||||
@@ -5197,58 +4893,10 @@ typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);
|
|||||||
|
|
||||||
#ifndef GL_ARB_draw_instanced
|
#ifndef GL_ARB_draw_instanced
|
||||||
#define GL_ARB_draw_instanced 1
|
#define GL_ARB_draw_instanced 1
|
||||||
#ifdef GL_GLEXT_PROTOTYPES
|
|
||||||
GLAPI void APIENTRY glDrawArraysInstancedARB (GLenum, GLint, GLsizei, GLsizei);
|
|
||||||
GLAPI void APIENTRY glDrawElementsInstancedARB (GLenum, GLsizei, GLenum, const GLvoid *, GLsizei);
|
|
||||||
#endif /* GL_GLEXT_PROTOTYPES */
|
|
||||||
typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
|
|
||||||
typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDARBPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GL_ARB_framebuffer_object
|
#ifndef GL_ARB_framebuffer_object
|
||||||
#define GL_ARB_framebuffer_object 1
|
#define GL_ARB_framebuffer_object 1
|
||||||
#ifdef GL_GLEXT_PROTOTYPES
|
|
||||||
GLAPI GLboolean APIENTRY glIsRenderbuffer (GLuint);
|
|
||||||
GLAPI void APIENTRY glBindRenderbuffer (GLenum, GLuint);
|
|
||||||
GLAPI void APIENTRY glDeleteRenderbuffers (GLsizei, const GLuint *);
|
|
||||||
GLAPI void APIENTRY glGenRenderbuffers (GLsizei, GLuint *);
|
|
||||||
GLAPI void APIENTRY glRenderbufferStorage (GLenum, GLenum, GLsizei, GLsizei);
|
|
||||||
GLAPI void APIENTRY glGetRenderbufferParameteriv (GLenum, GLenum, GLint *);
|
|
||||||
GLAPI GLboolean APIENTRY glIsFramebuffer (GLuint);
|
|
||||||
GLAPI void APIENTRY glBindFramebuffer (GLenum, GLuint);
|
|
||||||
GLAPI void APIENTRY glDeleteFramebuffers (GLsizei, const GLuint *);
|
|
||||||
GLAPI void APIENTRY glGenFramebuffers (GLsizei, GLuint *);
|
|
||||||
GLAPI GLenum APIENTRY glCheckFramebufferStatus (GLenum);
|
|
||||||
GLAPI void APIENTRY glFramebufferTexture1D (GLenum, GLenum, GLenum, GLuint, GLint);
|
|
||||||
GLAPI void APIENTRY glFramebufferTexture2D (GLenum, GLenum, GLenum, GLuint, GLint);
|
|
||||||
GLAPI void APIENTRY glFramebufferTexture3D (GLenum, GLenum, GLenum, GLuint, GLint, GLint);
|
|
||||||
GLAPI void APIENTRY glFramebufferRenderbuffer (GLenum, GLenum, GLenum, GLuint);
|
|
||||||
GLAPI void APIENTRY glGetFramebufferAttachmentParameteriv (GLenum, GLenum, GLenum, GLint *);
|
|
||||||
GLAPI void APIENTRY glGenerateMipmap (GLenum);
|
|
||||||
GLAPI void APIENTRY glBlitFramebuffer (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum);
|
|
||||||
GLAPI void APIENTRY glRenderbufferStorageMultisample (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
|
|
||||||
GLAPI void APIENTRY glFramebufferTextureLayer (GLenum, GLenum, GLuint, GLint, GLint);
|
|
||||||
#endif /* GL_GLEXT_PROTOTYPES */
|
|
||||||
typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer);
|
|
||||||
typedef void (APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer);
|
|
||||||
typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers);
|
|
||||||
typedef void (APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers);
|
|
||||||
typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
|
||||||
typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
|
|
||||||
typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer);
|
|
||||||
typedef void (APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer);
|
|
||||||
typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers);
|
|
||||||
typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers);
|
|
||||||
typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target);
|
|
||||||
typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
|
||||||
typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
|
||||||
typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
|
|
||||||
typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
|
||||||
typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target);
|
|
||||||
typedef void (APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
|
||||||
typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
|
||||||
typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GL_ARB_framebuffer_sRGB
|
#ifndef GL_ARB_framebuffer_sRGB
|
||||||
@@ -5257,16 +4905,6 @@ typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum
|
|||||||
|
|
||||||
#ifndef GL_ARB_geometry_shader4
|
#ifndef GL_ARB_geometry_shader4
|
||||||
#define GL_ARB_geometry_shader4 1
|
#define GL_ARB_geometry_shader4 1
|
||||||
#ifdef GL_GLEXT_PROTOTYPES
|
|
||||||
GLAPI void APIENTRY glProgramParameteriARB (GLuint, GLenum, GLint);
|
|
||||||
GLAPI void APIENTRY glFramebufferTextureARB (GLenum, GLenum, GLuint, GLint);
|
|
||||||
GLAPI void APIENTRY glFramebufferTextureLayerARB (GLenum, GLenum, GLuint, GLint, GLint);
|
|
||||||
GLAPI void APIENTRY glFramebufferTextureFaceARB (GLenum, GLenum, GLuint, GLint, GLenum);
|
|
||||||
#endif /* GL_GLEXT_PROTOTYPES */
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIARBPROC) (GLuint program, GLenum pname, GLint value);
|
|
||||||
typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
|
|
||||||
typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
|
|
||||||
typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GL_ARB_half_float_vertex
|
#ifndef GL_ARB_half_float_vertex
|
||||||
@@ -5275,28 +4913,14 @@ typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEARBPROC) (GLenum target, GLen
|
|||||||
|
|
||||||
#ifndef GL_ARB_instanced_arrays
|
#ifndef GL_ARB_instanced_arrays
|
||||||
#define GL_ARB_instanced_arrays 1
|
#define GL_ARB_instanced_arrays 1
|
||||||
#ifdef GL_GLEXT_PROTOTYPES
|
|
||||||
GLAPI void APIENTRY glVertexAttribDivisor (GLuint, GLuint);
|
|
||||||
#endif /* GL_GLEXT_PROTOTYPES */
|
|
||||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GL_ARB_map_buffer_range
|
#ifndef GL_ARB_map_buffer_range
|
||||||
#define GL_ARB_map_buffer_range 1
|
#define GL_ARB_map_buffer_range 1
|
||||||
#ifdef GL_GLEXT_PROTOTYPES
|
|
||||||
GLAPI GLvoid* APIENTRY glMapBufferRange (GLenum, GLintptr, GLsizeiptr, GLbitfield);
|
|
||||||
GLAPI void APIENTRY glFlushMappedBufferRange (GLenum, GLintptr, GLsizeiptr);
|
|
||||||
#endif /* GL_GLEXT_PROTOTYPES */
|
|
||||||
typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
|
|
||||||
typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GL_ARB_texture_buffer_object
|
#ifndef GL_ARB_texture_buffer_object
|
||||||
#define GL_ARB_texture_buffer_object 1
|
#define GL_ARB_texture_buffer_object 1
|
||||||
#ifdef GL_GLEXT_PROTOTYPES
|
|
||||||
GLAPI void APIENTRY glTexBufferARB (GLenum, GLenum, GLuint);
|
|
||||||
#endif /* GL_GLEXT_PROTOTYPES */
|
|
||||||
typedef void (APIENTRYP PFNGLTEXBUFFERARBPROC) (GLenum target, GLenum internalformat, GLuint buffer);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GL_ARB_texture_compression_rgtc
|
#ifndef GL_ARB_texture_compression_rgtc
|
||||||
@@ -5309,16 +4933,6 @@ typedef void (APIENTRYP PFNGLTEXBUFFERARBPROC) (GLenum target, GLenum internalfo
|
|||||||
|
|
||||||
#ifndef GL_ARB_vertex_array_object
|
#ifndef GL_ARB_vertex_array_object
|
||||||
#define GL_ARB_vertex_array_object 1
|
#define GL_ARB_vertex_array_object 1
|
||||||
#ifdef GL_GLEXT_PROTOTYPES
|
|
||||||
GLAPI void APIENTRY glBindVertexArray (GLuint);
|
|
||||||
GLAPI void APIENTRY glDeleteVertexArrays (GLsizei, const GLuint *);
|
|
||||||
GLAPI void APIENTRY glGenVertexArrays (GLsizei, GLuint *);
|
|
||||||
GLAPI GLboolean APIENTRY glIsVertexArray (GLuint);
|
|
||||||
#endif /* GL_GLEXT_PROTOTYPES */
|
|
||||||
typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array);
|
|
||||||
typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays);
|
|
||||||
typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays);
|
|
||||||
typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GL_EXT_abgr
|
#ifndef GL_EXT_abgr
|
||||||
@@ -8017,502 +7631,14 @@ typedef void (APIENTRYP PFNGLFRAMETERMINATORGREMEDYPROC) (void);
|
|||||||
|
|
||||||
#ifndef GL_NV_conditional_render
|
#ifndef GL_NV_conditional_render
|
||||||
#define GL_NV_conditional_render 1
|
#define GL_NV_conditional_render 1
|
||||||
#ifdef GL_GLEXT_PROTOTYPES
|
|
||||||
GLAPI void APIENTRY glBeginConditionalRenderNV (GLuint, GLenum);
|
|
||||||
GLAPI void APIENTRY glEndConditionalRenderNV (void);
|
|
||||||
#endif /* GL_GLEXT_PROTOTYPES */
|
|
||||||
typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode);
|
|
||||||
typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GL_NV_present_video
|
#ifndef GL_NV_present_video
|
||||||
#define GL_NV_present_video 1
|
#define GL_NV_present_video 1
|
||||||
#ifdef GL_GLEXT_PROTOTYPES
|
|
||||||
GLAPI void APIENTRY glPresentFrameKeyedNV (GLuint, GLuint64EXT, GLuint, GLuint, GLenum, GLenum, GLuint, GLuint, GLenum, GLuint, GLuint);
|
|
||||||
GLAPI void APIENTRY glPresentFrameDualFillNV (GLuint, GLuint64EXT, GLuint, GLuint, GLenum, GLenum, GLuint, GLenum, GLuint, GLenum, GLuint, GLenum, GLuint);
|
|
||||||
GLAPI void APIENTRY glGetVideoivNV (GLuint, GLenum, GLint *);
|
|
||||||
GLAPI void APIENTRY glGetVideouivNV (GLuint, GLenum, GLuint *);
|
|
||||||
GLAPI void APIENTRY glGetVideoi64vNV (GLuint, GLenum, GLint64EXT *);
|
|
||||||
GLAPI void APIENTRY glGetVideoui64vNV (GLuint, GLenum, GLuint64EXT *);
|
|
||||||
GLAPI void APIENTRY glVideoParameterivNV (GLuint, GLenum, const GLint *);
|
|
||||||
#endif /* GL_GLEXT_PROTOTYPES */
|
|
||||||
typedef void (APIENTRYP PFNGLPRESENTFRAMEKEYEDNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1);
|
|
||||||
typedef void (APIENTRYP PFNGLPRESENTFRAMEDUALFILLNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3);
|
|
||||||
typedef void (APIENTRYP PFNGLGETVIDEOIVNVPROC) (GLuint video_slot, GLenum pname, GLint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETVIDEOUIVNVPROC) (GLuint video_slot, GLenum pname, GLuint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETVIDEOI64VNVPROC) (GLuint video_slot, GLenum pname, GLint64EXT *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETVIDEOUI64VNVPROC) (GLuint video_slot, GLenum pname, GLuint64EXT *params);
|
|
||||||
typedef void (APIENTRYP PFNGLVIDEOPARAMETERIVNVPROC) (GLuint video_slot, GLenum pname, const GLint *params);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GL_EXT_transform_feedback
|
#ifndef GL_EXT_transform_feedback
|
||||||
#define GL_EXT_transform_feedback 1
|
#define GL_EXT_transform_feedback 1
|
||||||
#ifdef GL_GLEXT_PROTOTYPES
|
|
||||||
GLAPI void APIENTRY glBeginTransformFeedbackEXT (GLenum);
|
|
||||||
GLAPI void APIENTRY glEndTransformFeedbackEXT (void);
|
|
||||||
GLAPI void APIENTRY glBindBufferRangeEXT (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr);
|
|
||||||
GLAPI void APIENTRY glBindBufferOffsetEXT (GLenum, GLuint, GLuint, GLintptr);
|
|
||||||
GLAPI void APIENTRY glBindBufferBaseEXT (GLenum, GLuint, GLuint);
|
|
||||||
GLAPI void APIENTRY glTransformFeedbackVaryingsEXT (GLuint, GLsizei, const GLint *, GLenum);
|
|
||||||
GLAPI void APIENTRY glGetTransformFeedbackVaryingEXT (GLuint, GLuint, GLint *);
|
|
||||||
#endif /* GL_GLEXT_PROTOTYPES */
|
|
||||||
typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKEXTPROC) (GLenum primitiveMode);
|
|
||||||
typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKEXTPROC) (void);
|
|
||||||
typedef void (APIENTRYP PFNGLBINDBUFFERRANGEEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
|
|
||||||
typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
|
|
||||||
typedef void (APIENTRYP PFNGLBINDBUFFERBASEEXTPROC) (GLenum target, GLuint index, GLuint buffer);
|
|
||||||
typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
|
|
||||||
typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLint *location);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef GL_EXT_direct_state_access
|
|
||||||
#define GL_EXT_direct_state_access 1
|
|
||||||
#ifdef GL_GLEXT_PROTOTYPES
|
|
||||||
GLAPI void APIENTRY glClientAttribDefaultEXT (GLbitfield);
|
|
||||||
GLAPI void APIENTRY glPushClientAttribDefaultEXT (GLbitfield);
|
|
||||||
GLAPI void APIENTRY glMatrixLoadfEXT (GLenum, const GLfloat *);
|
|
||||||
GLAPI void APIENTRY glMatrixLoaddEXT (GLenum, const GLdouble *);
|
|
||||||
GLAPI void APIENTRY glMatrixMultfEXT (GLenum, const GLfloat *);
|
|
||||||
GLAPI void APIENTRY glMatrixMultdEXT (GLenum, const GLdouble *);
|
|
||||||
GLAPI void APIENTRY glMatrixLoadIdentityEXT (GLenum);
|
|
||||||
GLAPI void APIENTRY glMatrixRotatefEXT (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
|
|
||||||
GLAPI void APIENTRY glMatrixRotatedEXT (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
|
|
||||||
GLAPI void APIENTRY glMatrixScalefEXT (GLenum, GLfloat, GLfloat, GLfloat);
|
|
||||||
GLAPI void APIENTRY glMatrixScaledEXT (GLenum, GLdouble, GLdouble, GLdouble);
|
|
||||||
GLAPI void APIENTRY glMatrixTranslatefEXT (GLenum, GLfloat, GLfloat, GLfloat);
|
|
||||||
GLAPI void APIENTRY glMatrixTranslatedEXT (GLenum, GLdouble, GLdouble, GLdouble);
|
|
||||||
GLAPI void APIENTRY glMatrixFrustumEXT (GLenum, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble);
|
|
||||||
GLAPI void APIENTRY glMatrixOrthoEXT (GLenum, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble);
|
|
||||||
GLAPI void APIENTRY glMatrixPopEXT (GLenum);
|
|
||||||
GLAPI void APIENTRY glMatrixPushEXT (GLenum);
|
|
||||||
GLAPI void APIENTRY glMatrixLoadTransposefEXT (GLenum, const GLfloat *);
|
|
||||||
GLAPI void APIENTRY glMatrixLoadTransposedEXT (GLenum, const GLdouble *);
|
|
||||||
GLAPI void APIENTRY glMatrixMultTransposefEXT (GLenum, const GLfloat *);
|
|
||||||
GLAPI void APIENTRY glMatrixMultTransposedEXT (GLenum, const GLdouble *);
|
|
||||||
GLAPI void APIENTRY glTextureParameterfEXT (GLuint, GLenum, GLenum, GLfloat);
|
|
||||||
GLAPI void APIENTRY glTextureParameterfvEXT (GLuint, GLenum, GLenum, const GLfloat *);
|
|
||||||
GLAPI void APIENTRY glTextureParameteriEXT (GLuint, GLenum, GLenum, GLint);
|
|
||||||
GLAPI void APIENTRY glTextureParameterivEXT (GLuint, GLenum, GLenum, const GLint *);
|
|
||||||
GLAPI void APIENTRY glTextureImage1DEXT (GLuint, GLenum, GLint, GLenum, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
|
|
||||||
GLAPI void APIENTRY glTextureImage2DEXT (GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
|
|
||||||
GLAPI void APIENTRY glTextureSubImage1DEXT (GLuint, GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *);
|
|
||||||
GLAPI void APIENTRY glTextureSubImage2DEXT (GLuint, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
|
|
||||||
GLAPI void APIENTRY glCopyTextureImage1DEXT (GLuint, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint);
|
|
||||||
GLAPI void APIENTRY glCopyTextureImage2DEXT (GLuint, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint);
|
|
||||||
GLAPI void APIENTRY glCopyTextureSubImage1DEXT (GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei);
|
|
||||||
GLAPI void APIENTRY glCopyTextureSubImage2DEXT (GLuint, GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
|
|
||||||
GLAPI void APIENTRY glGetTextureImageEXT (GLuint, GLenum, GLint, GLenum, GLenum, GLvoid *);
|
|
||||||
GLAPI void APIENTRY glGetTextureParameterfvEXT (GLuint, GLenum, GLenum, GLfloat *);
|
|
||||||
GLAPI void APIENTRY glGetTextureParameterivEXT (GLuint, GLenum, GLenum, GLint *);
|
|
||||||
GLAPI void APIENTRY glGetTextureLevelParameterfvEXT (GLuint, GLenum, GLint, GLenum, GLfloat *);
|
|
||||||
GLAPI void APIENTRY glGetTextureLevelParameterivEXT (GLuint, GLenum, GLint, GLenum, GLint *);
|
|
||||||
GLAPI void APIENTRY glTextureImage3DEXT (GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
|
|
||||||
GLAPI void APIENTRY glTextureSubImage3DEXT (GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
|
|
||||||
GLAPI void APIENTRY glCopyTextureSubImage3DEXT (GLuint, GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
|
|
||||||
GLAPI void APIENTRY glMultiTexParameterfEXT (GLenum, GLenum, GLenum, GLfloat);
|
|
||||||
GLAPI void APIENTRY glMultiTexParameterfvEXT (GLenum, GLenum, GLenum, const GLfloat *);
|
|
||||||
GLAPI void APIENTRY glMultiTexParameteriEXT (GLenum, GLenum, GLenum, GLint);
|
|
||||||
GLAPI void APIENTRY glMultiTexParameterivEXT (GLenum, GLenum, GLenum, const GLint *);
|
|
||||||
GLAPI void APIENTRY glMultiTexImage1DEXT (GLenum, GLenum, GLint, GLenum, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
|
|
||||||
GLAPI void APIENTRY glMultiTexImage2DEXT (GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
|
|
||||||
GLAPI void APIENTRY glMultiTexSubImage1DEXT (GLenum, GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *);
|
|
||||||
GLAPI void APIENTRY glMultiTexSubImage2DEXT (GLenum, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
|
|
||||||
GLAPI void APIENTRY glCopyMultiTexImage1DEXT (GLenum, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint);
|
|
||||||
GLAPI void APIENTRY glCopyMultiTexImage2DEXT (GLenum, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint);
|
|
||||||
GLAPI void APIENTRY glCopyMultiTexSubImage1DEXT (GLenum, GLenum, GLint, GLint, GLint, GLint, GLsizei);
|
|
||||||
GLAPI void APIENTRY glCopyMultiTexSubImage2DEXT (GLenum, GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
|
|
||||||
GLAPI void APIENTRY glGetMultiTexImageEXT (GLenum, GLenum, GLint, GLenum, GLenum, GLvoid *);
|
|
||||||
GLAPI void APIENTRY glGetMultiTexParameterfvEXT (GLenum, GLenum, GLenum, GLfloat *);
|
|
||||||
GLAPI void APIENTRY glGetMultiTexParameterivEXT (GLenum, GLenum, GLenum, GLint *);
|
|
||||||
GLAPI void APIENTRY glGetMultiTexLevelParameterfvEXT (GLenum, GLenum, GLint, GLenum, GLfloat *);
|
|
||||||
GLAPI void APIENTRY glGetMultiTexLevelParameterivEXT (GLenum, GLenum, GLint, GLenum, GLint *);
|
|
||||||
GLAPI void APIENTRY glMultiTexImage3DEXT (GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
|
|
||||||
GLAPI void APIENTRY glMultiTexSubImage3DEXT (GLenum, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
|
|
||||||
GLAPI void APIENTRY glCopyMultiTexSubImage3DEXT (GLenum, GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
|
|
||||||
GLAPI void APIENTRY glBindMultiTextureEXT (GLenum, GLenum, GLuint);
|
|
||||||
GLAPI void APIENTRY glEnableClientStateIndexedEXT (GLenum, GLuint);
|
|
||||||
GLAPI void APIENTRY glDisableClientStateIndexedEXT (GLenum, GLuint);
|
|
||||||
GLAPI void APIENTRY glMultiTexCoordPointerEXT (GLenum, GLint, GLenum, GLsizei, const GLvoid *);
|
|
||||||
GLAPI void APIENTRY glMultiTexEnvfEXT (GLenum, GLenum, GLenum, GLfloat);
|
|
||||||
GLAPI void APIENTRY glMultiTexEnvfvEXT (GLenum, GLenum, GLenum, const GLfloat *);
|
|
||||||
GLAPI void APIENTRY glMultiTexEnviEXT (GLenum, GLenum, GLenum, GLint);
|
|
||||||
GLAPI void APIENTRY glMultiTexEnvivEXT (GLenum, GLenum, GLenum, const GLint *);
|
|
||||||
GLAPI void APIENTRY glMultiTexGendEXT (GLenum, GLenum, GLenum, GLdouble);
|
|
||||||
GLAPI void APIENTRY glMultiTexGendvEXT (GLenum, GLenum, GLenum, const GLdouble *);
|
|
||||||
GLAPI void APIENTRY glMultiTexGenfEXT (GLenum, GLenum, GLenum, GLfloat);
|
|
||||||
GLAPI void APIENTRY glMultiTexGenfvEXT (GLenum, GLenum, GLenum, const GLfloat *);
|
|
||||||
GLAPI void APIENTRY glMultiTexGeniEXT (GLenum, GLenum, GLenum, GLint);
|
|
||||||
GLAPI void APIENTRY glMultiTexGenivEXT (GLenum, GLenum, GLenum, const GLint *);
|
|
||||||
GLAPI void APIENTRY glGetMultiTexEnvfvEXT (GLenum, GLenum, GLenum, GLfloat *);
|
|
||||||
GLAPI void APIENTRY glGetMultiTexEnvivEXT (GLenum, GLenum, GLenum, GLint *);
|
|
||||||
GLAPI void APIENTRY glGetMultiTexGendvEXT (GLenum, GLenum, GLenum, GLdouble *);
|
|
||||||
GLAPI void APIENTRY glGetMultiTexGenfvEXT (GLenum, GLenum, GLenum, GLfloat *);
|
|
||||||
GLAPI void APIENTRY glGetMultiTexGenivEXT (GLenum, GLenum, GLenum, GLint *);
|
|
||||||
GLAPI void APIENTRY glGetFloatIndexedvEXT (GLenum, GLuint, GLfloat *);
|
|
||||||
GLAPI void APIENTRY glGetDoubleIndexedvEXT (GLenum, GLuint, GLdouble *);
|
|
||||||
GLAPI void APIENTRY glGetPointerIndexedvEXT (GLenum, GLuint, GLvoid* *);
|
|
||||||
GLAPI void APIENTRY glCompressedTextureImage3DEXT (GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
|
|
||||||
GLAPI void APIENTRY glCompressedTextureImage2DEXT (GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
|
|
||||||
GLAPI void APIENTRY glCompressedTextureImage1DEXT (GLuint, GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
|
|
||||||
GLAPI void APIENTRY glCompressedTextureSubImage3DEXT (GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
|
|
||||||
GLAPI void APIENTRY glCompressedTextureSubImage2DEXT (GLuint, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
|
|
||||||
GLAPI void APIENTRY glCompressedTextureSubImage1DEXT (GLuint, GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
|
|
||||||
GLAPI void APIENTRY glGetCompressedTextureImageEXT (GLuint, GLenum, GLint, GLvoid *);
|
|
||||||
GLAPI void APIENTRY glCompressedMultiTexImage3DEXT (GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
|
|
||||||
GLAPI void APIENTRY glCompressedMultiTexImage2DEXT (GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
|
|
||||||
GLAPI void APIENTRY glCompressedMultiTexImage1DEXT (GLenum, GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
|
|
||||||
GLAPI void APIENTRY glCompressedMultiTexSubImage3DEXT (GLenum, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
|
|
||||||
GLAPI void APIENTRY glCompressedMultiTexSubImage2DEXT (GLenum, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
|
|
||||||
GLAPI void APIENTRY glCompressedMultiTexSubImage1DEXT (GLenum, GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
|
|
||||||
GLAPI void APIENTRY glGetCompressedMultiTexImageEXT (GLenum, GLenum, GLint, GLvoid *);
|
|
||||||
GLAPI void APIENTRY glNamedProgramStringEXT (GLuint, GLenum, GLenum, GLsizei, const GLvoid *);
|
|
||||||
GLAPI void APIENTRY glNamedProgramLocalParameter4dEXT (GLuint, GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
|
|
||||||
GLAPI void APIENTRY glNamedProgramLocalParameter4dvEXT (GLuint, GLenum, GLuint, const GLdouble *);
|
|
||||||
GLAPI void APIENTRY glNamedProgramLocalParameter4fEXT (GLuint, GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
|
|
||||||
GLAPI void APIENTRY glNamedProgramLocalParameter4fvEXT (GLuint, GLenum, GLuint, const GLfloat *);
|
|
||||||
GLAPI void APIENTRY glGetNamedProgramLocalParameterdvEXT (GLuint, GLenum, GLuint, GLdouble *);
|
|
||||||
GLAPI void APIENTRY glGetNamedProgramLocalParameterfvEXT (GLuint, GLenum, GLuint, GLfloat *);
|
|
||||||
GLAPI void APIENTRY glGetNamedProgramivEXT (GLuint, GLenum, GLenum, GLint *);
|
|
||||||
GLAPI void APIENTRY glGetNamedProgramStringEXT (GLuint, GLenum, GLenum, GLvoid *);
|
|
||||||
GLAPI void APIENTRY glNamedProgramLocalParameters4fvEXT (GLuint, GLenum, GLuint, GLsizei, const GLfloat *);
|
|
||||||
GLAPI void APIENTRY glNamedProgramLocalParameterI4iEXT (GLuint, GLenum, GLuint, GLint, GLint, GLint, GLint);
|
|
||||||
GLAPI void APIENTRY glNamedProgramLocalParameterI4ivEXT (GLuint, GLenum, GLuint, const GLint *);
|
|
||||||
GLAPI void APIENTRY glNamedProgramLocalParametersI4ivEXT (GLuint, GLenum, GLuint, GLsizei, const GLint *);
|
|
||||||
GLAPI void APIENTRY glNamedProgramLocalParameterI4uiEXT (GLuint, GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
|
|
||||||
GLAPI void APIENTRY glNamedProgramLocalParameterI4uivEXT (GLuint, GLenum, GLuint, const GLuint *);
|
|
||||||
GLAPI void APIENTRY glNamedProgramLocalParametersI4uivEXT (GLuint, GLenum, GLuint, GLsizei, const GLuint *);
|
|
||||||
GLAPI void APIENTRY glGetNamedProgramLocalParameterIivEXT (GLuint, GLenum, GLuint, GLint *);
|
|
||||||
GLAPI void APIENTRY glGetNamedProgramLocalParameterIuivEXT (GLuint, GLenum, GLuint, GLuint *);
|
|
||||||
GLAPI void APIENTRY glTextureParameterIivEXT (GLuint, GLenum, GLenum, const GLint *);
|
|
||||||
GLAPI void APIENTRY glTextureParameterIuivEXT (GLuint, GLenum, GLenum, const GLuint *);
|
|
||||||
GLAPI void APIENTRY glGetTextureParameterIivEXT (GLuint, GLenum, GLenum, GLint *);
|
|
||||||
GLAPI void APIENTRY glGetTextureParameterIuivEXT (GLuint, GLenum, GLenum, GLuint *);
|
|
||||||
GLAPI void APIENTRY glMultiTexParameterIivEXT (GLenum, GLenum, GLenum, const GLint *);
|
|
||||||
GLAPI void APIENTRY glMultiTexParameterIuivEXT (GLenum, GLenum, GLenum, const GLuint *);
|
|
||||||
GLAPI void APIENTRY glGetMultiTexParameterIivEXT (GLenum, GLenum, GLenum, GLint *);
|
|
||||||
GLAPI void APIENTRY glGetMultiTexParameterIuivEXT (GLenum, GLenum, GLenum, GLuint *);
|
|
||||||
GLAPI void APIENTRY glProgramUniform1fEXT (GLuint, GLint, GLfloat);
|
|
||||||
GLAPI void APIENTRY glProgramUniform2fEXT (GLuint, GLint, GLfloat, GLfloat);
|
|
||||||
GLAPI void APIENTRY glProgramUniform3fEXT (GLuint, GLint, GLfloat, GLfloat, GLfloat);
|
|
||||||
GLAPI void APIENTRY glProgramUniform4fEXT (GLuint, GLint, GLfloat, GLfloat, GLfloat, GLfloat);
|
|
||||||
GLAPI void APIENTRY glProgramUniform1iEXT (GLuint, GLint, GLint);
|
|
||||||
GLAPI void APIENTRY glProgramUniform2iEXT (GLuint, GLint, GLint, GLint);
|
|
||||||
GLAPI void APIENTRY glProgramUniform3iEXT (GLuint, GLint, GLint, GLint, GLint);
|
|
||||||
GLAPI void APIENTRY glProgramUniform4iEXT (GLuint, GLint, GLint, GLint, GLint, GLint);
|
|
||||||
GLAPI void APIENTRY glProgramUniform1fvEXT (GLuint, GLint, GLsizei, const GLfloat *);
|
|
||||||
GLAPI void APIENTRY glProgramUniform2fvEXT (GLuint, GLint, GLsizei, const GLfloat *);
|
|
||||||
GLAPI void APIENTRY glProgramUniform3fvEXT (GLuint, GLint, GLsizei, const GLfloat *);
|
|
||||||
GLAPI void APIENTRY glProgramUniform4fvEXT (GLuint, GLint, GLsizei, const GLfloat *);
|
|
||||||
GLAPI void APIENTRY glProgramUniform1ivEXT (GLuint, GLint, GLsizei, const GLint *);
|
|
||||||
GLAPI void APIENTRY glProgramUniform2ivEXT (GLuint, GLint, GLsizei, const GLint *);
|
|
||||||
GLAPI void APIENTRY glProgramUniform3ivEXT (GLuint, GLint, GLsizei, const GLint *);
|
|
||||||
GLAPI void APIENTRY glProgramUniform4ivEXT (GLuint, GLint, GLsizei, const GLint *);
|
|
||||||
GLAPI void APIENTRY glProgramUniformMatrix2fvEXT (GLuint, GLint, GLsizei, GLboolean, const GLfloat *);
|
|
||||||
GLAPI void APIENTRY glProgramUniformMatrix3fvEXT (GLuint, GLint, GLsizei, GLboolean, const GLfloat *);
|
|
||||||
GLAPI void APIENTRY glProgramUniformMatrix4fvEXT (GLuint, GLint, GLsizei, GLboolean, const GLfloat *);
|
|
||||||
GLAPI void APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint, GLint, GLsizei, GLboolean, const GLfloat *);
|
|
||||||
GLAPI void APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint, GLint, GLsizei, GLboolean, const GLfloat *);
|
|
||||||
GLAPI void APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint, GLint, GLsizei, GLboolean, const GLfloat *);
|
|
||||||
GLAPI void APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint, GLint, GLsizei, GLboolean, const GLfloat *);
|
|
||||||
GLAPI void APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint, GLint, GLsizei, GLboolean, const GLfloat *);
|
|
||||||
GLAPI void APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint, GLint, GLsizei, GLboolean, const GLfloat *);
|
|
||||||
GLAPI void APIENTRY glProgramUniform1uiEXT (GLuint, GLint, GLuint);
|
|
||||||
GLAPI void APIENTRY glProgramUniform2uiEXT (GLuint, GLint, GLuint, GLuint);
|
|
||||||
GLAPI void APIENTRY glProgramUniform3uiEXT (GLuint, GLint, GLuint, GLuint, GLuint);
|
|
||||||
GLAPI void APIENTRY glProgramUniform4uiEXT (GLuint, GLint, GLuint, GLuint, GLuint, GLuint);
|
|
||||||
GLAPI void APIENTRY glProgramUniform1uivEXT (GLuint, GLint, GLsizei, const GLuint *);
|
|
||||||
GLAPI void APIENTRY glProgramUniform2uivEXT (GLuint, GLint, GLsizei, const GLuint *);
|
|
||||||
GLAPI void APIENTRY glProgramUniform3uivEXT (GLuint, GLint, GLsizei, const GLuint *);
|
|
||||||
GLAPI void APIENTRY glProgramUniform4uivEXT (GLuint, GLint, GLsizei, const GLuint *);
|
|
||||||
GLAPI void APIENTRY glNamedBufferDataEXT (GLuint, GLsizeiptr, const GLvoid *, GLenum);
|
|
||||||
GLAPI void APIENTRY glNamedBufferSubDataEXT (GLuint, GLintptr, GLsizeiptr, const GLvoid *);
|
|
||||||
GLAPI GLvoid* APIENTRY glMapNamedBufferEXT (GLuint, GLenum);
|
|
||||||
GLAPI GLboolean APIENTRY glUnmapNamedBufferEXT (GLuint);
|
|
||||||
GLAPI void APIENTRY glGetNamedBufferParameterivEXT (GLuint, GLenum, GLint *);
|
|
||||||
GLAPI void APIENTRY glGetNamedBufferPointervEXT (GLuint, GLenum, GLvoid* *);
|
|
||||||
GLAPI void APIENTRY glGetNamedBufferSubDataEXT (GLuint, GLintptr, GLsizeiptr, GLvoid *);
|
|
||||||
GLAPI void APIENTRY glTextureBufferEXT (GLuint, GLenum, GLenum, GLuint);
|
|
||||||
GLAPI void APIENTRY glMultiTexBufferEXT (GLenum, GLenum, GLenum, GLuint);
|
|
||||||
GLAPI void APIENTRY glNamedRenderbufferStorageEXT (GLuint, GLenum, GLsizei, GLsizei);
|
|
||||||
GLAPI void APIENTRY glGetNamedRenderbufferParameterivEXT (GLuint, GLenum, GLint *);
|
|
||||||
GLAPI GLenum APIENTRY glCheckNamedFramebufferStatusEXT (GLuint, GLenum);
|
|
||||||
GLAPI void APIENTRY glNamedFramebufferTexture1DEXT (GLuint, GLenum, GLenum, GLuint, GLint);
|
|
||||||
GLAPI void APIENTRY glNamedFramebufferTexture2DEXT (GLuint, GLenum, GLenum, GLuint, GLint);
|
|
||||||
GLAPI void APIENTRY glNamedFramebufferTexture3DEXT (GLuint, GLenum, GLenum, GLuint, GLint, GLint);
|
|
||||||
GLAPI void APIENTRY glNamedFramebufferRenderbufferEXT (GLuint, GLenum, GLenum, GLuint);
|
|
||||||
GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameterivEXT (GLuint, GLenum, GLenum, GLint *);
|
|
||||||
GLAPI void APIENTRY glGenerateTextureMipmapEXT (GLuint, GLenum);
|
|
||||||
GLAPI void APIENTRY glGenerateMultiTexMipmapEXT (GLenum, GLenum);
|
|
||||||
GLAPI void APIENTRY glFramebufferDrawBufferEXT (GLuint, GLenum);
|
|
||||||
GLAPI void APIENTRY glFramebufferDrawBuffersEXT (GLuint, GLsizei, const GLenum *);
|
|
||||||
GLAPI void APIENTRY glFramebufferReadBufferEXT (GLuint, GLenum);
|
|
||||||
GLAPI void APIENTRY glGetFramebufferParameterivEXT (GLuint, GLenum, GLint *);
|
|
||||||
GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleEXT (GLuint, GLsizei, GLenum, GLsizei, GLsizei);
|
|
||||||
GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleCoverageEXT (GLuint, GLsizei, GLsizei, GLenum, GLsizei, GLsizei);
|
|
||||||
GLAPI void APIENTRY glNamedFramebufferTextureEXT (GLuint, GLenum, GLuint, GLint);
|
|
||||||
GLAPI void APIENTRY glNamedFramebufferTextureLayerEXT (GLuint, GLenum, GLuint, GLint, GLint);
|
|
||||||
GLAPI void APIENTRY glNamedFramebufferTextureFaceEXT (GLuint, GLenum, GLuint, GLint, GLenum);
|
|
||||||
GLAPI void APIENTRY glTextureRenderbufferEXT (GLuint, GLenum, GLuint);
|
|
||||||
GLAPI void APIENTRY glMultiTexRenderbufferEXT (GLenum, GLenum, GLuint);
|
|
||||||
#endif /* GL_GLEXT_PROTOTYPES */
|
|
||||||
typedef void (APIENTRYP PFNGLCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask);
|
|
||||||
typedef void (APIENTRYP PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask);
|
|
||||||
typedef void (APIENTRYP PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m);
|
|
||||||
typedef void (APIENTRYP PFNGLMATRIXLOADDEXTPROC) (GLenum mode, const GLdouble *m);
|
|
||||||
typedef void (APIENTRYP PFNGLMATRIXMULTFEXTPROC) (GLenum mode, const GLfloat *m);
|
|
||||||
typedef void (APIENTRYP PFNGLMATRIXMULTDEXTPROC) (GLenum mode, const GLdouble *m);
|
|
||||||
typedef void (APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode);
|
|
||||||
typedef void (APIENTRYP PFNGLMATRIXROTATEFEXTPROC) (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
|
|
||||||
typedef void (APIENTRYP PFNGLMATRIXROTATEDEXTPROC) (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
|
|
||||||
typedef void (APIENTRYP PFNGLMATRIXSCALEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
|
|
||||||
typedef void (APIENTRYP PFNGLMATRIXSCALEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
|
|
||||||
typedef void (APIENTRYP PFNGLMATRIXTRANSLATEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
|
|
||||||
typedef void (APIENTRYP PFNGLMATRIXTRANSLATEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
|
|
||||||
typedef void (APIENTRYP PFNGLMATRIXFRUSTUMEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
|
|
||||||
typedef void (APIENTRYP PFNGLMATRIXORTHOEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
|
|
||||||
typedef void (APIENTRYP PFNGLMATRIXPOPEXTPROC) (GLenum mode);
|
|
||||||
typedef void (APIENTRYP PFNGLMATRIXPUSHEXTPROC) (GLenum mode);
|
|
||||||
typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m);
|
|
||||||
typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m);
|
|
||||||
typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m);
|
|
||||||
typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m);
|
|
||||||
typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat param);
|
|
||||||
typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLfloat *params);
|
|
||||||
typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint param);
|
|
||||||
typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
|
|
||||||
typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
|
|
||||||
typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
|
|
||||||
typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
|
|
||||||
typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
|
|
||||||
typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
|
|
||||||
typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
|
|
||||||
typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
|
||||||
typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
|
|
||||||
typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
|
|
||||||
typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
|
|
||||||
typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
|
||||||
typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
|
|
||||||
typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
|
|
||||||
typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param);
|
|
||||||
typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
|
|
||||||
typedef void (APIENTRYP PFNGLMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
|
|
||||||
typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
|
|
||||||
typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
|
|
||||||
typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
|
|
||||||
typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
|
|
||||||
typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
|
|
||||||
typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
|
||||||
typedef void (APIENTRYP PFNGLGETMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
|
|
||||||
typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
|
|
||||||
typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
|
|
||||||
typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
|
||||||
typedef void (APIENTRYP PFNGLBINDMULTITEXTUREEXTPROC) (GLenum texunit, GLenum target, GLuint texture);
|
|
||||||
typedef void (APIENTRYP PFNGLENABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index);
|
|
||||||
typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index);
|
|
||||||
typedef void (APIENTRYP PFNGLMULTITEXCOORDPOINTEREXTPROC) (GLenum texunit, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
|
||||||
typedef void (APIENTRYP PFNGLMULTITEXENVFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
|
|
||||||
typedef void (APIENTRYP PFNGLMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
|
|
||||||
typedef void (APIENTRYP PFNGLMULTITEXENVIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param);
|
|
||||||
typedef void (APIENTRYP PFNGLMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLMULTITEXGENDEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble param);
|
|
||||||
typedef void (APIENTRYP PFNGLMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params);
|
|
||||||
typedef void (APIENTRYP PFNGLMULTITEXGENFEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat param);
|
|
||||||
typedef void (APIENTRYP PFNGLMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params);
|
|
||||||
typedef void (APIENTRYP PFNGLMULTITEXGENIEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint param);
|
|
||||||
typedef void (APIENTRYP PFNGLMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETFLOATINDEXEDVEXTPROC) (GLenum target, GLuint index, GLfloat *data);
|
|
||||||
typedef void (APIENTRYP PFNGLGETDOUBLEINDEXEDVEXTPROC) (GLenum target, GLuint index, GLdouble *data);
|
|
||||||
typedef void (APIENTRYP PFNGLGETPOINTERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLvoid* *data);
|
|
||||||
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits);
|
|
||||||
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits);
|
|
||||||
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits);
|
|
||||||
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits);
|
|
||||||
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits);
|
|
||||||
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits);
|
|
||||||
typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint lod, GLvoid *img);
|
|
||||||
typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits);
|
|
||||||
typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits);
|
|
||||||
typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits);
|
|
||||||
typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits);
|
|
||||||
typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits);
|
|
||||||
typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits);
|
|
||||||
typedef void (APIENTRYP PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint lod, GLvoid *img);
|
|
||||||
typedef void (APIENTRYP PFNGLNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum format, GLsizei len, const GLvoid *string);
|
|
||||||
typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
|
|
||||||
typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLdouble *params);
|
|
||||||
typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
|
||||||
typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLfloat *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMIVEXTPROC) (GLuint program, GLenum target, GLenum pname, GLint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum pname, GLvoid *string);
|
|
||||||
typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params);
|
|
||||||
typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC) (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
|
|
||||||
typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
|
|
||||||
typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLuint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLuint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLuint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLuint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLuint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
|
|
||||||
typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
|
|
||||||
typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLsizeiptr size, const GLvoid *data, GLenum usage);
|
|
||||||
typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const GLvoid *data);
|
|
||||||
typedef GLvoid* (APIENTRYP PFNGLMAPNAMEDBUFFEREXTPROC) (GLuint buffer, GLenum access);
|
|
||||||
typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFEREXTPROC) (GLuint buffer);
|
|
||||||
typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC) (GLuint buffer, GLenum pname, GLint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVEXTPROC) (GLuint buffer, GLenum pname, GLvoid* *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLvoid *data);
|
|
||||||
typedef void (APIENTRYP PFNGLTEXTUREBUFFEREXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer);
|
|
||||||
typedef void (APIENTRYP PFNGLMULTITEXBUFFEREXTPROC) (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer);
|
|
||||||
typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
|
|
||||||
typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC) (GLuint renderbuffer, GLenum pname, GLint *params);
|
|
||||||
typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC) (GLuint framebuffer, GLenum target);
|
|
||||||
typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
|
||||||
typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
|
||||||
typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
|
|
||||||
typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
|
||||||
typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPEXTPROC) (GLuint texture, GLenum target);
|
|
||||||
typedef void (APIENTRYP PFNGLGENERATEMULTITEXMIPMAPEXTPROC) (GLenum texunit, GLenum target);
|
|
||||||
typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC) (GLuint framebuffer, GLenum mode);
|
|
||||||
typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs);
|
|
||||||
typedef void (APIENTRYP PFNGLFRAMEBUFFERREADBUFFEREXTPROC) (GLuint framebuffer, GLenum mode);
|
|
||||||
typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params);
|
|
||||||
typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
|
||||||
typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC) (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
|
|
||||||
typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
|
|
||||||
typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
|
|
||||||
typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face);
|
|
||||||
typedef void (APIENTRYP PFNGLTEXTURERENDERBUFFEREXTPROC) (GLuint texture, GLenum target, GLuint renderbuffer);
|
|
||||||
typedef void (APIENTRYP PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenum target, GLuint renderbuffer);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef GL_EXT_vertex_array_bgra
|
|
||||||
#define GL_EXT_vertex_array_bgra 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef GL_EXT_texture_swizzle
|
|
||||||
#define GL_EXT_texture_swizzle 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef GL_NV_explicit_multisample
|
|
||||||
#define GL_NV_explicit_multisample 1
|
|
||||||
#ifdef GL_GLEXT_PROTOTYPES
|
|
||||||
GLAPI void APIENTRY glGetMultisamplefvNV (GLenum, GLuint, GLfloat *);
|
|
||||||
GLAPI void APIENTRY glSampleMaskIndexedNV (GLuint, GLbitfield);
|
|
||||||
GLAPI void APIENTRY glTexRenderbufferNV (GLenum, GLuint);
|
|
||||||
#endif /* GL_GLEXT_PROTOTYPES */
|
|
||||||
typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVNVPROC) (GLenum pname, GLuint index, GLfloat *val);
|
|
||||||
typedef void (APIENTRYP PFNGLSAMPLEMASKINDEXEDNVPROC) (GLuint index, GLbitfield mask);
|
|
||||||
typedef void (APIENTRYP PFNGLTEXRENDERBUFFERNVPROC) (GLenum target, GLuint renderbuffer);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef GL_NV_transform_feedback2
|
|
||||||
#define GL_NV_transform_feedback2 1
|
|
||||||
#ifdef GL_GLEXT_PROTOTYPES
|
|
||||||
GLAPI void APIENTRY glBindTransformFeedbackNV (GLenum, GLuint);
|
|
||||||
GLAPI void APIENTRY glDeleteTransformFeedbacksNV (GLsizei, const GLuint *);
|
|
||||||
GLAPI void APIENTRY glGenTransformFeedbacksNV (GLsizei, GLuint *);
|
|
||||||
GLAPI GLboolean APIENTRY glIsTransformFeedbackNV (GLuint);
|
|
||||||
GLAPI void APIENTRY glPauseTransformFeedbackNV (void);
|
|
||||||
GLAPI void APIENTRY glResumeTransformFeedbackNV (void);
|
|
||||||
GLAPI void APIENTRY glDrawTransformFeedbackNV (GLenum, GLuint);
|
|
||||||
#endif /* GL_GLEXT_PROTOTYPES */
|
|
||||||
typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKNVPROC) (GLenum target, GLuint id);
|
|
||||||
typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSNVPROC) (GLsizei n, const GLuint *ids);
|
|
||||||
typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSNVPROC) (GLsizei n, GLuint *ids);
|
|
||||||
typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKNVPROC) (GLuint id);
|
|
||||||
typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKNVPROC) (void);
|
|
||||||
typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKNVPROC) (void);
|
|
||||||
typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKNVPROC) (GLenum mode, GLuint id);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef GL_ATI_meminfo
|
|
||||||
#define GL_ATI_meminfo 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef GL_AMD_performance_monitor
|
|
||||||
#define GL_AMD_performance_monitor 1
|
|
||||||
#ifdef GL_GLEXT_PROTOTYPES
|
|
||||||
GLAPI void APIENTRY glGetPerfMonitorGroupsAMD (GLint *, GLsizei, GLuint *);
|
|
||||||
GLAPI void APIENTRY glGetPerfMonitorCountersAMD (GLuint, GLint *, GLint *, GLsizei, GLuint *);
|
|
||||||
GLAPI void APIENTRY glGetPerfMonitorGroupStringAMD (GLuint, GLsizei, GLsizei *, GLchar *);
|
|
||||||
GLAPI void APIENTRY glGetPerfMonitorCounterStringAMD (GLuint, GLuint, GLsizei, GLsizei *, GLchar *);
|
|
||||||
GLAPI void APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint, GLuint, GLenum, void *);
|
|
||||||
GLAPI void APIENTRY glGenPerfMonitorsAMD (GLsizei, GLuint *);
|
|
||||||
GLAPI void APIENTRY glDeletePerfMonitorsAMD (GLsizei, GLuint *);
|
|
||||||
GLAPI void APIENTRY glSelectPerfMonitorCountersAMD (GLuint, GLboolean, GLuint, GLint, GLuint *);
|
|
||||||
GLAPI void APIENTRY glBeginPerfMonitorAMD (GLuint);
|
|
||||||
GLAPI void APIENTRY glEndPerfMonitorAMD (GLuint);
|
|
||||||
GLAPI void APIENTRY glGetPerfMonitorCounterDataAMD (GLuint, GLenum, GLsizei, GLuint *, GLint *);
|
|
||||||
#endif /* GL_GLEXT_PROTOTYPES */
|
|
||||||
typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
|
|
||||||
typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
|
|
||||||
typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
|
|
||||||
typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
|
|
||||||
typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data);
|
|
||||||
typedef void (APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
|
|
||||||
typedef void (APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
|
|
||||||
typedef void (APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);
|
|
||||||
typedef void (APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
|
|
||||||
typedef void (APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
|
|
||||||
typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,32 +1,31 @@
|
|||||||
/*
|
/*
|
||||||
* SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
|
** License Applicability. Except to the extent portions of this file are
|
||||||
* Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
|
** made subject to an alternative license as permitted in the SGI Free
|
||||||
*
|
** Software License B, Version 1.1 (the "License"), the contents of this
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
** file are subject only to the provisions of the License. You may not use
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
** this file except in compliance with the License. You may obtain a copy
|
||||||
* to deal in the Software without restriction, including without limitation
|
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
|
||||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
|
||||||
* 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:
|
** http://oss.sgi.com/projects/FreeB
|
||||||
*
|
**
|
||||||
* The above copyright notice including the dates of first publication and
|
** Note that, as provided in the License, the Software is distributed on an
|
||||||
* either this permission notice or a reference to
|
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
|
||||||
* http://oss.sgi.com/projects/FreeB/
|
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
|
||||||
* shall be included in all copies or substantial portions of the Software.
|
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
|
||||||
*
|
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
**
|
||||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
** Original Code. The Original Code is: OpenGL Sample Implementation,
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
|
||||||
* SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
|
||||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
** Copyright in any portions created by third parties is as indicated
|
||||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
** elsewhere herein. All Rights Reserved.
|
||||||
* SOFTWARE.
|
**
|
||||||
*
|
** Additional Notice Provisions: This software was created using the
|
||||||
* Except as contained in this notice, the name of Silicon Graphics, Inc.
|
** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
|
||||||
* shall not be used in advertising or otherwise to promote the sale, use or
|
** not been independently verified as being compliant with the OpenGL(R)
|
||||||
* other dealings in this Software without prior written authorization from
|
** version 1.2.1 Specification.
|
||||||
* Silicon Graphics, Inc.
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __glu_h__
|
#ifndef __glu_h__
|
||||||
#define __glu_h__
|
#define __glu_h__
|
||||||
@@ -38,12 +37,8 @@
|
|||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
|
|
||||||
#ifndef GLAPIENTRY
|
#ifndef GLAPIENTRY
|
||||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
|
||||||
#define GLAPIENTRY __stdcall
|
|
||||||
#else
|
|
||||||
#define GLAPIENTRY
|
#define GLAPIENTRY
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef GLAPIENTRYP
|
#ifndef GLAPIENTRYP
|
||||||
#define GLAPIENTRYP GLAPIENTRY *
|
#define GLAPIENTRYP GLAPIENTRY *
|
||||||
|
|||||||
@@ -290,25 +290,17 @@ extern void glXSelectEvent( Display *dpy, GLXDrawable drawable,
|
|||||||
extern void glXGetSelectedEvent( Display *dpy, GLXDrawable drawable,
|
extern void glXGetSelectedEvent( Display *dpy, GLXDrawable drawable,
|
||||||
unsigned long *mask );
|
unsigned long *mask );
|
||||||
|
|
||||||
/* GLX 1.3 function pointer typedefs */
|
|
||||||
typedef GLXFBConfig * (* PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
|
/* GLX 1.4 and later */
|
||||||
typedef GLXFBConfig * (* PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
|
extern void (*glXGetProcAddress(const GLubyte *procname))( void );
|
||||||
typedef int (* PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
|
|
||||||
typedef XVisualInfo * (* PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
|
|
||||||
typedef GLXWindow (* PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
|
#ifndef GLX_GLXEXT_LEGACY
|
||||||
typedef void (* PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
|
|
||||||
typedef GLXPixmap (* PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
|
#include <GL/glxext.h>
|
||||||
typedef void (* PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
|
|
||||||
typedef GLXPbuffer (* PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
|
#else
|
||||||
typedef void (* PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
|
|
||||||
typedef void (* PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
|
|
||||||
typedef GLXContext (* PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
|
|
||||||
typedef Bool (* PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
|
|
||||||
typedef GLXDrawable (* PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
|
|
||||||
typedef Display * (* PFNGLXGETCURRENTDISPLAYPROC) (void);
|
|
||||||
typedef int (* PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
|
|
||||||
typedef void (* PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
|
|
||||||
typedef void (* PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -324,17 +316,6 @@ extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* GLX 1.4 and later */
|
|
||||||
extern void (*glXGetProcAddress(const GLubyte *procname))( void );
|
|
||||||
|
|
||||||
/* GLX 1.4 function pointer typedefs */
|
|
||||||
typedef __GLXextFuncPtr (* PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef GLX_GLXEXT_LEGACY
|
|
||||||
|
|
||||||
#include <GL/glxext.h>
|
|
||||||
|
|
||||||
#endif /* GLX_GLXEXT_LEGACY */
|
#endif /* GLX_GLXEXT_LEGACY */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -46,9 +46,9 @@ extern "C" {
|
|||||||
/*************************************************************/
|
/*************************************************************/
|
||||||
|
|
||||||
/* Header file version number, required by OpenGL ABI for Linux */
|
/* Header file version number, required by OpenGL ABI for Linux */
|
||||||
/* glxext.h last updated 2008/10/22 */
|
/* glxext.h last updated 2008/08/10 */
|
||||||
/* Current version at http://www.opengl.org/registry/ */
|
/* Current version at http://www.opengl.org/registry/ */
|
||||||
#define GLX_GLXEXT_VERSION 21
|
#define GLX_GLXEXT_VERSION 20
|
||||||
|
|
||||||
#ifndef GLX_VERSION_1_3
|
#ifndef GLX_VERSION_1_3
|
||||||
#define GLX_WINDOW_BIT 0x00000001
|
#define GLX_WINDOW_BIT 0x00000001
|
||||||
@@ -127,14 +127,6 @@ extern "C" {
|
|||||||
#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
|
#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GLX_ARB_create_context
|
|
||||||
#define GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001
|
|
||||||
#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
|
|
||||||
#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
|
|
||||||
#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
|
|
||||||
#define GLX_CONTEXT_FLAGS_ARB 0x2094
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef GLX_SGIS_multisample
|
#ifndef GLX_SGIS_multisample
|
||||||
#define GLX_SAMPLE_BUFFERS_SGIS 100000
|
#define GLX_SAMPLE_BUFFERS_SGIS 100000
|
||||||
#define GLX_SAMPLES_SGIS 100001
|
#define GLX_SAMPLES_SGIS 100001
|
||||||
@@ -355,20 +347,20 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GLX_NV_present_video
|
#ifndef GLX_NV_present_video
|
||||||
#define GLX_NUM_VIDEO_SLOTS_NV 0x20F0
|
#define GLX_GLX_NUM_VIDEO_SLOTS_NV 0x20F0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GLX_NV_video_out
|
#ifndef GLX_NV_video_out
|
||||||
#define GLX_VIDEO_OUT_COLOR_NV 0x20C3
|
#define GLX_GLX_VIDEO_OUT_COLOR_NV 0x20C3
|
||||||
#define GLX_VIDEO_OUT_ALPHA_NV 0x20C4
|
#define GLX_GLX_VIDEO_OUT_ALPHA_NV 0x20C4
|
||||||
#define GLX_VIDEO_OUT_DEPTH_NV 0x20C5
|
#define GLX_GLX_VIDEO_OUT_DEPTH_NV 0x20C5
|
||||||
#define GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6
|
#define GLX_GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6
|
||||||
#define GLX_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7
|
#define GLX_GLX_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7
|
||||||
#define GLX_VIDEO_OUT_FRAME_NV 0x20C8
|
#define GLX_GLX_VIDEO_OUT_FRAME_NV 0x20C8
|
||||||
#define GLX_VIDEO_OUT_FIELD_1_NV 0x20C9
|
#define GLX_GLX_VIDEO_OUT_FIELD_1_NV 0x20C9
|
||||||
#define GLX_VIDEO_OUT_FIELD_2_NV 0x20CA
|
#define GLX_GLX_VIDEO_OUT_FIELD_2_NV 0x20CA
|
||||||
#define GLX_VIDEO_OUT_STACKED_FIELDS_1_2_NV 0x20CB
|
#define GLX_GLX_VIDEO_OUT_STACKED_FIELDS_1_2_NV 0x20CB
|
||||||
#define GLX_VIDEO_OUT_STACKED_FIELDS_2_1_NV 0x20CC
|
#define GLX_GLX_VIDEO_OUT_STACKED_FIELDS_2_1_NV 0x20CC
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GLX_NV_swap_group
|
#ifndef GLX_NV_swap_group
|
||||||
@@ -510,14 +502,6 @@ typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procNam
|
|||||||
#define GLX_ARB_fbconfig_float 1
|
#define GLX_ARB_fbconfig_float 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GLX_ARB_create_context
|
|
||||||
#define GLX_ARB_create_context 1
|
|
||||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
|
||||||
extern GLXContext glXCreateContextAttribsARB (Display *, GLXFBConfig, GLXContext, Bool, const int *);
|
|
||||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
|
||||||
typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef GLX_SGIS_multisample
|
#ifndef GLX_SGIS_multisample
|
||||||
#define GLX_SGIS_multisample 1
|
#define GLX_SGIS_multisample 1
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -40,8 +40,8 @@
|
|||||||
#ifndef DRI_INTERFACE_H
|
#ifndef DRI_INTERFACE_H
|
||||||
#define DRI_INTERFACE_H
|
#define DRI_INTERFACE_H
|
||||||
|
|
||||||
/* For archs with no drm.h */
|
/* Make this something other than __APPLE__ for other arcs with no drm.h */
|
||||||
#if !defined(__APPLE__) && !defined(__CYGWIN__)
|
#ifndef __APPLE__
|
||||||
#include <drm.h>
|
#include <drm.h>
|
||||||
#else
|
#else
|
||||||
typedef unsigned int drm_context_t;
|
typedef unsigned int drm_context_t;
|
||||||
@@ -75,10 +75,6 @@ typedef struct __DRItexOffsetExtensionRec __DRItexOffsetExtension;
|
|||||||
typedef struct __DRItexBufferExtensionRec __DRItexBufferExtension;
|
typedef struct __DRItexBufferExtensionRec __DRItexBufferExtension;
|
||||||
typedef struct __DRIlegacyExtensionRec __DRIlegacyExtension;
|
typedef struct __DRIlegacyExtensionRec __DRIlegacyExtension;
|
||||||
typedef struct __DRIswrastExtensionRec __DRIswrastExtension;
|
typedef struct __DRIswrastExtensionRec __DRIswrastExtension;
|
||||||
typedef struct __DRIbufferRec __DRIbuffer;
|
|
||||||
typedef struct __DRIdri2ExtensionRec __DRIdri2Extension;
|
|
||||||
typedef struct __DRIdri2LoaderExtensionRec __DRIdri2LoaderExtension;
|
|
||||||
|
|
||||||
/*@}*/
|
/*@}*/
|
||||||
|
|
||||||
|
|
||||||
@@ -347,6 +343,29 @@ struct __DRIdamageExtensionRec {
|
|||||||
void *loaderPrivate);
|
void *loaderPrivate);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DRI2 Loader extension. This extension describes the basic
|
||||||
|
* functionality the loader needs to provide for the DRI driver.
|
||||||
|
*/
|
||||||
|
#define __DRI_LOADER "DRI_Loader"
|
||||||
|
#define __DRI_LOADER_VERSION 1
|
||||||
|
struct __DRIloaderExtensionRec {
|
||||||
|
__DRIextension base;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ping the windowing system to get it to reemit info for the
|
||||||
|
* specified drawable in the DRI2 event buffer.
|
||||||
|
*
|
||||||
|
* \param draw the drawable for which to request info
|
||||||
|
* \param tail the new event buffer tail pointer
|
||||||
|
*/
|
||||||
|
void (*reemitDrawableInfo)(__DRIdrawable *draw, unsigned int *tail,
|
||||||
|
void *loaderPrivate);
|
||||||
|
|
||||||
|
void (*postDamage)(__DRIdrawable *draw, struct drm_clip_rect *rects,
|
||||||
|
int num_rects, void *loaderPrivate);
|
||||||
|
};
|
||||||
|
|
||||||
#define __DRI_SWRAST_IMAGE_OP_DRAW 1
|
#define __DRI_SWRAST_IMAGE_OP_DRAW 1
|
||||||
#define __DRI_SWRAST_IMAGE_OP_CLEAR 2
|
#define __DRI_SWRAST_IMAGE_OP_CLEAR 2
|
||||||
#define __DRI_SWRAST_IMAGE_OP_SWAP 3
|
#define __DRI_SWRAST_IMAGE_OP_SWAP 3
|
||||||
@@ -614,62 +633,4 @@ struct __DRIswrastExtensionRec {
|
|||||||
void *loaderPrivate);
|
void *loaderPrivate);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* DRI2 Loader extension.
|
|
||||||
*/
|
|
||||||
#define __DRI_BUFFER_FRONT_LEFT 0
|
|
||||||
#define __DRI_BUFFER_BACK_LEFT 1
|
|
||||||
#define __DRI_BUFFER_FRONT_RIGHT 2
|
|
||||||
#define __DRI_BUFFER_BACK_RIGHT 3
|
|
||||||
#define __DRI_BUFFER_DEPTH 4
|
|
||||||
#define __DRI_BUFFER_STENCIL 5
|
|
||||||
#define __DRI_BUFFER_ACCUM 6
|
|
||||||
#define __DRI_BUFFER_FAKE_FRONT_LEFT 7
|
|
||||||
#define __DRI_BUFFER_FAKE_FRONT_RIGHT 8
|
|
||||||
|
|
||||||
struct __DRIbufferRec {
|
|
||||||
unsigned int attachment;
|
|
||||||
unsigned int name;
|
|
||||||
unsigned int pitch;
|
|
||||||
unsigned int cpp;
|
|
||||||
unsigned int flags;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define __DRI_DRI2_LOADER "DRI_DRI2Loader"
|
|
||||||
#define __DRI_DRI2_LOADER_VERSION 1
|
|
||||||
struct __DRIdri2LoaderExtensionRec {
|
|
||||||
__DRIextension base;
|
|
||||||
|
|
||||||
__DRIbuffer *(*getBuffers)(__DRIdrawable *driDrawable,
|
|
||||||
int *width, int *height,
|
|
||||||
unsigned int *attachments, int count,
|
|
||||||
int *out_count, void *loaderPrivate);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This extension provides alternative screen, drawable and context
|
|
||||||
* constructors for DRI2.
|
|
||||||
*/
|
|
||||||
#define __DRI_DRI2 "DRI_DRI2"
|
|
||||||
#define __DRI_DRI2_VERSION 1
|
|
||||||
|
|
||||||
struct __DRIdri2ExtensionRec {
|
|
||||||
__DRIextension base;
|
|
||||||
|
|
||||||
__DRIscreen *(*createNewScreen)(int screen, int fd,
|
|
||||||
const __DRIextension **extensions,
|
|
||||||
const __DRIconfig ***driver_configs,
|
|
||||||
void *loaderPrivate);
|
|
||||||
|
|
||||||
__DRIdrawable *(*createNewDrawable)(__DRIscreen *screen,
|
|
||||||
const __DRIconfig *config,
|
|
||||||
void *loaderPrivate);
|
|
||||||
|
|
||||||
__DRIcontext *(*createNewContext)(__DRIscreen *screen,
|
|
||||||
const __DRIconfig *config,
|
|
||||||
__DRIcontext *shared,
|
|
||||||
void *loaderPrivate);
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
134
include/GL/internal/dri_sarea.h
Normal file
134
include/GL/internal/dri_sarea.h
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2007 Red Hat, Inc
|
||||||
|
* 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
|
||||||
|
* on the rights to use, copy, modify, merge, publish, distribute, sub
|
||||||
|
* license, 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 (including the next
|
||||||
|
* paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef DRI_SAREA_H
|
||||||
|
#define DRI_SAREA_H
|
||||||
|
|
||||||
|
#include <drm.h>
|
||||||
|
|
||||||
|
/* The DRI2 SAREA holds a list of self-describing blocks. Each block
|
||||||
|
* is 8 byte aligned and has a common 32-bit header word. The upper
|
||||||
|
* 16 bits describe the type of the block and the lower 16 bits the
|
||||||
|
* size. DRI2 only defines a couple of blocks and allows drivers to
|
||||||
|
* define driver specific blocks using type codes from 0x8000 and up.
|
||||||
|
* The type code 0x0000 defines the end of the sarea. */
|
||||||
|
|
||||||
|
#define DRI2_SAREA_BLOCK_HEADER(type, size) (((type) << 16) | (size))
|
||||||
|
#define DRI2_SAREA_BLOCK_TYPE(b) ((b) >> 16)
|
||||||
|
#define DRI2_SAREA_BLOCK_SIZE(b) ((b) & 0xffff)
|
||||||
|
#define DRI2_SAREA_BLOCK_NEXT(p) \
|
||||||
|
((void *) ((unsigned char *) (p) + \
|
||||||
|
DRI2_SAREA_BLOCK_SIZE(*(unsigned int *) p)))
|
||||||
|
|
||||||
|
#define DRI2_SAREA_BLOCK_END 0x0000
|
||||||
|
#define DRI2_SAREA_BLOCK_LOCK 0x0001
|
||||||
|
#define DRI2_SAREA_BLOCK_EVENT_BUFFER 0x0002
|
||||||
|
|
||||||
|
/* Chipset specific blocks start at 0x8000, 0xffff is reserved. */
|
||||||
|
|
||||||
|
typedef struct __DRILock __DRILock;
|
||||||
|
typedef struct __DRIEventBuffer __DRIEventBuffer;
|
||||||
|
typedef struct __DRIDrawableBuffer __DRIDrawableBuffer;
|
||||||
|
typedef struct __DRIDrawableConfigEvent __DRIDrawableConfigEvent;
|
||||||
|
typedef struct __DRIBufferAttachEvent __DRIBufferAttachEvent;
|
||||||
|
|
||||||
|
struct __DRILock {
|
||||||
|
unsigned int block_header;
|
||||||
|
drm_hw_lock_t lock;
|
||||||
|
|
||||||
|
/* We use this with DRM_CAS to allocate lock IDs for the real lock.*/
|
||||||
|
unsigned int next_id;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct __DRIEventBuffer {
|
||||||
|
unsigned int block_header;
|
||||||
|
unsigned int head; /* last valid event */
|
||||||
|
unsigned int prealloc; /* event currently being written */
|
||||||
|
unsigned int size; /* size of data */
|
||||||
|
unsigned char data[0];
|
||||||
|
};
|
||||||
|
|
||||||
|
enum {
|
||||||
|
/* the four standard color buffers */
|
||||||
|
DRI_DRAWABLE_BUFFER_FRONT_LEFT = 0,
|
||||||
|
DRI_DRAWABLE_BUFFER_BACK_LEFT = 1,
|
||||||
|
DRI_DRAWABLE_BUFFER_FRONT_RIGHT = 2,
|
||||||
|
DRI_DRAWABLE_BUFFER_BACK_RIGHT = 3,
|
||||||
|
/* optional aux buffer */
|
||||||
|
DRI_DRAWABLE_BUFFER_AUX0 = 4,
|
||||||
|
DRI_DRAWABLE_BUFFER_AUX1 = 5,
|
||||||
|
DRI_DRAWABLE_BUFFER_AUX2 = 6,
|
||||||
|
DRI_DRAWABLE_BUFFER_AUX3 = 7,
|
||||||
|
DRI_DRAWABLE_BUFFER_DEPTH = 8,
|
||||||
|
DRI_DRAWABLE_BUFFER_STENCIL = 9,
|
||||||
|
DRI_DRAWABLE_BUFFER_ACCUM = 10,
|
||||||
|
/* generic renderbuffers */
|
||||||
|
DRI_DRAWABLE_BUFFER_COLOR0 = 11,
|
||||||
|
DRI_DRAWABLE_BUFFER_COLOR1 = 12,
|
||||||
|
DRI_DRAWABLE_BUFFER_COLOR2 = 13,
|
||||||
|
DRI_DRAWABLE_BUFFER_COLOR3 = 14,
|
||||||
|
DRI_DRAWABLE_BUFFER_COLOR4 = 15,
|
||||||
|
DRI_DRAWABLE_BUFFER_COLOR5 = 16,
|
||||||
|
DRI_DRAWABLE_BUFFER_COLOR6 = 17,
|
||||||
|
DRI_DRAWABLE_BUFFER_COLOR7 = 18,
|
||||||
|
DRI_DRAWABLE_BUFFER_COUNT = 19
|
||||||
|
};
|
||||||
|
|
||||||
|
struct __DRIDrawableBuffer {
|
||||||
|
unsigned int attachment;
|
||||||
|
unsigned int handle;
|
||||||
|
unsigned int pitch;
|
||||||
|
unsigned short cpp;
|
||||||
|
|
||||||
|
/* Upper 8 bits are driver specific, lower 8 bits generic. The
|
||||||
|
* bits can inidicate buffer properties such as tiled, swizzled etc. */
|
||||||
|
unsigned short flags;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define DRI2_EVENT_HEADER(type, size) (((type) << 16) | (size))
|
||||||
|
#define DRI2_EVENT_TYPE(b) ((b) >> 16)
|
||||||
|
#define DRI2_EVENT_SIZE(b) ((b) & 0xffff)
|
||||||
|
|
||||||
|
#define DRI2_EVENT_PAD 0x0000
|
||||||
|
#define DRI2_EVENT_DRAWABLE_CONFIG 0x0001
|
||||||
|
#define DRI2_EVENT_BUFFER_ATTACH 0x0002
|
||||||
|
|
||||||
|
struct __DRIDrawableConfigEvent {
|
||||||
|
unsigned int event_header;
|
||||||
|
unsigned int drawable;
|
||||||
|
short x;
|
||||||
|
short y;
|
||||||
|
unsigned int width;
|
||||||
|
unsigned int height;
|
||||||
|
unsigned int num_rects;
|
||||||
|
struct drm_clip_rect rects[0];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct __DRIBufferAttachEvent {
|
||||||
|
unsigned int event_header;
|
||||||
|
unsigned int drawable;
|
||||||
|
__DRIDrawableBuffer buffer;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* DRI_SAREA_H */
|
||||||
@@ -2,34 +2,39 @@
|
|||||||
#define __gl_core_h_
|
#define __gl_core_h_
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
|
** License Applicability. Except to the extent portions of this file are
|
||||||
* Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
|
** made subject to an alternative license as permitted in the SGI Free
|
||||||
*
|
** Software License B, Version 1.1 (the "License"), the contents of this
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
** file are subject only to the provisions of the License. You may not use
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
** this file except in compliance with the License. You may obtain a copy
|
||||||
* to deal in the Software without restriction, including without limitation
|
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
|
||||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
|
||||||
* 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:
|
** http://oss.sgi.com/projects/FreeB
|
||||||
*
|
**
|
||||||
* The above copyright notice including the dates of first publication and
|
** Note that, as provided in the License, the Software is distributed on an
|
||||||
* either this permission notice or a reference to
|
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
|
||||||
* http://oss.sgi.com/projects/FreeB/
|
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
|
||||||
* shall be included in all copies or substantial portions of the Software.
|
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
|
||||||
*
|
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
**
|
||||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
** Original Code. The Original Code is: OpenGL Sample Implementation,
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
|
||||||
* SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
|
||||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
** Copyright in any portions created by third parties is as indicated
|
||||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
** elsewhere herein. All Rights Reserved.
|
||||||
* SOFTWARE.
|
**
|
||||||
*
|
** Additional Notice Provisions: The application programming interfaces
|
||||||
* Except as contained in this notice, the name of Silicon Graphics, Inc.
|
** established by SGI in conjunction with the Original Code are The
|
||||||
* shall not be used in advertising or otherwise to promote the sale, use or
|
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
|
||||||
* other dealings in this Software without prior written authorization from
|
** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
|
||||||
* Silicon Graphics, Inc.
|
** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
|
||||||
*/
|
** Window System(R) (Version 1.3), released October 19, 1998. This software
|
||||||
|
** was created using the OpenGL(R) version 1.2.1 Sample Implementation
|
||||||
|
** published by SGI, but has not been independently verified as being
|
||||||
|
** compliant with the OpenGL(R) version 1.2.1 Specification.
|
||||||
|
**
|
||||||
|
*/
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/* $XFree86: xc/programs/Xserver/GL/dri/sarea.h,v 1.11 2002/10/30 12:52:03 alanh Exp $ */
|
||||||
/**
|
/**
|
||||||
* \file sarea.h
|
* \file sarea.h
|
||||||
* SAREA definitions.
|
* SAREA definitions.
|
||||||
@@ -33,6 +34,7 @@
|
|||||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* $XFree86: xc/programs/Xserver/GL/dri/sarea.h,v 1.11 2002/10/30 12:52:03 alanh Exp $ */
|
||||||
|
|
||||||
#ifndef _SAREA_H_
|
#ifndef _SAREA_H_
|
||||||
#define _SAREA_H_
|
#define _SAREA_H_
|
||||||
|
|||||||
45
include/GL/uglglutshapes.h
Normal file
45
include/GL/uglglutshapes.h
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
/* uglglutshapes.h - Public header GLUT Shapes */
|
||||||
|
|
||||||
|
/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1998. */
|
||||||
|
|
||||||
|
/* This program is freely distributable without licensing fees and is
|
||||||
|
provided without guarantee or warrantee expressed or implied. This
|
||||||
|
program is -not- in the public domain. */
|
||||||
|
|
||||||
|
#ifndef GLUTSHAPES_H
|
||||||
|
#define GLUTSHAPES_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <GL/gl.h>
|
||||||
|
|
||||||
|
void glutWireSphere (GLdouble radius, GLint slices, GLint stacks);
|
||||||
|
void glutSolidSphere (GLdouble radius, GLint slices, GLint stacks);
|
||||||
|
void glutWireCone (GLdouble base, GLdouble height,
|
||||||
|
GLint slices, GLint stacks);
|
||||||
|
void glutSolidCone (GLdouble base, GLdouble height,
|
||||||
|
GLint slices, GLint stacks);
|
||||||
|
void glutWireCube (GLdouble size);
|
||||||
|
void glutSolidCube (GLdouble size);
|
||||||
|
void glutWireTorus (GLdouble innerRadius, GLdouble outerRadius,
|
||||||
|
GLint sides, GLint rings);
|
||||||
|
void glutSolidTorus (GLdouble innerRadius, GLdouble outerRadius,
|
||||||
|
GLint sides, GLint rings);
|
||||||
|
void glutWireDodecahedron (void);
|
||||||
|
void glutSolidDodecahedron (void);
|
||||||
|
void glutWireOctahedron (void);
|
||||||
|
void glutSolidOctahedron (void);
|
||||||
|
void glutWireTetrahedron (void);
|
||||||
|
void glutSolidTetrahedron (void);
|
||||||
|
void glutWireIcosahedron (void);
|
||||||
|
void glutSolidIcosahedron (void);
|
||||||
|
void glutWireTeapot (GLdouble size);
|
||||||
|
void glutSolidTeapot (GLdouble size);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
155
include/GL/uglmesa.h
Normal file
155
include/GL/uglmesa.h
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
/* uglmesa.h - Public header UGL/Mesa */
|
||||||
|
|
||||||
|
/* Copyright (C) 2001 by Wind River Systems, Inc */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Mesa 3-D graphics library
|
||||||
|
* Version: 4.0
|
||||||
|
*
|
||||||
|
* The MIT License
|
||||||
|
* 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
|
||||||
|
* THE AUTHORS OR COPYRIGHT 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Author:
|
||||||
|
* Stephane Raimbault <stephane.raimbault@windriver.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef UGLMESA_H
|
||||||
|
#define UGLMESA_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define UGL_MESA_MAJOR_VERSION 4
|
||||||
|
#define UGL_MESA_MINOR_VERSION 0
|
||||||
|
|
||||||
|
#include <GL/gl.h>
|
||||||
|
#include <ugl/ugl.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Values for display mode of uglMesaCreateContext ()
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* With these mask values, it's possible to test double buffer mode
|
||||||
|
* with UGL_MESA_DOUBLE mask
|
||||||
|
*
|
||||||
|
* SINGLE 0000 0001
|
||||||
|
* DOUBLE 0000 0110
|
||||||
|
* - SOFT 0000 0010
|
||||||
|
* - HARD 0000 0100
|
||||||
|
* WINDML 0001 0000
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define UGL_MESA_SINGLE 0x01
|
||||||
|
#define UGL_MESA_DOUBLE 0x06
|
||||||
|
#define UGL_MESA_DOUBLE_SOFTWARE 0x02
|
||||||
|
#define UGL_MESA_DOUBLE_HARDWARE 0x04
|
||||||
|
|
||||||
|
#define UGL_MESA_WINDML_EXCLUSIVE 0x10
|
||||||
|
|
||||||
|
#define UGL_MESA_FULLSCREEN_WIDTH 0x0
|
||||||
|
#define UGL_MESA_FULLSCREEN_HEIGHT 0x0
|
||||||
|
|
||||||
|
/*
|
||||||
|
* uglMesaPixelStore() parameters:
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define UGL_MESA_ROW_LENGTH 0x20
|
||||||
|
#define UGL_MESA_Y_UP 0x21
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Accepted by uglMesaGetIntegerv:
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define UGL_MESA_LEFT_X 0x01
|
||||||
|
#define UGL_MESA_TOP_Y 0x02
|
||||||
|
#define UGL_MESA_WIDTH 0x03
|
||||||
|
#define UGL_MESA_HEIGHT 0x04
|
||||||
|
#define UGL_MESA_DISPLAY_WIDTH 0x05
|
||||||
|
#define UGL_MESA_DISPLAY_HEIGHT 0x06
|
||||||
|
#define UGL_MESA_COLOR_FORMAT 0x07
|
||||||
|
#define UGL_MESA_COLOR_MODEL 0x08
|
||||||
|
#define UGL_MESA_PIXEL_FORMAT 0x09
|
||||||
|
#define UGL_MESA_TYPE 0x0A
|
||||||
|
#define UGL_MESA_RGB 0x0B
|
||||||
|
#define UGL_MESA_COLOR_INDEXED 0x0C
|
||||||
|
#define UGL_MESA_SINGLE_BUFFER 0x0D
|
||||||
|
#define UGL_MESA_DOUBLE_BUFFER 0x0E
|
||||||
|
#define UGL_MESA_DOUBLE_BUFFER_SOFTWARE 0x0F
|
||||||
|
#define UGL_MESA_DOUBLE_BUFFER_HARDWARE 0x10
|
||||||
|
|
||||||
|
/*
|
||||||
|
* typedefs
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef struct uglMesaContext * UGL_MESA_CONTEXT;
|
||||||
|
|
||||||
|
UGL_MESA_CONTEXT uglMesaCreateNewContext (GLenum mode,
|
||||||
|
UGL_MESA_CONTEXT share_list);
|
||||||
|
|
||||||
|
UGL_MESA_CONTEXT uglMesaCreateNewContextExt (GLenum mode,
|
||||||
|
GLint depth_bits,
|
||||||
|
GLint stencil_bits,
|
||||||
|
GLint accum_red_bits,
|
||||||
|
GLint accum_green_bits,
|
||||||
|
GLint accum_blue_bits,
|
||||||
|
GLint accum_alpha_bits,
|
||||||
|
UGL_MESA_CONTEXT share_list);
|
||||||
|
|
||||||
|
GLboolean uglMesaMakeCurrentContext (UGL_MESA_CONTEXT umc,
|
||||||
|
GLsizei left, GLsizei top,
|
||||||
|
GLsizei width, GLsizei height);
|
||||||
|
|
||||||
|
GLboolean uglMesaMoveWindow (GLsizei dx, GLsizei dy);
|
||||||
|
|
||||||
|
GLboolean uglMesaMoveToWindow (GLsizei left, GLsizei top);
|
||||||
|
|
||||||
|
GLboolean uglMesaResizeWindow (GLsizei dw, GLsizei dh);
|
||||||
|
|
||||||
|
GLboolean uglMesaResizeToWindow (GLsizei width, GLsizei height);
|
||||||
|
|
||||||
|
void uglMesaDestroyContext (void);
|
||||||
|
|
||||||
|
UGL_MESA_CONTEXT uglMesaGetCurrentContext (void);
|
||||||
|
|
||||||
|
void uglMesaSwapBuffers (void);
|
||||||
|
|
||||||
|
void uglMesaPixelStore (GLint pname, GLint value);
|
||||||
|
|
||||||
|
void uglMesaGetIntegerv (GLint pname, GLint *value);
|
||||||
|
|
||||||
|
GLboolean uglMesaGetDepthBuffer (GLint *width, GLint *height,
|
||||||
|
GLint *bytesPerValue, void **buffer);
|
||||||
|
|
||||||
|
GLboolean uglMesaGetColorBuffer (GLint *width, GLint *height,
|
||||||
|
GLint *format, void **buffer);
|
||||||
|
|
||||||
|
GLboolean uglMesaSetColor (GLubyte index, GLfloat red,
|
||||||
|
GLfloat green, GLfloat blue);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -2,34 +2,38 @@
|
|||||||
#define _EGL_H
|
#define _EGL_H
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
|
** License Applicability. Except to the extent portions of this file are
|
||||||
* Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
|
** made subject to an alternative license as permitted in the SGI Free
|
||||||
*
|
** Software License B, Version 1.0 (the "License"), the contents of this
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
** file are subject only to the provisions of the License. You may not use
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
** this file except in compliance with the License. You may obtain a copy
|
||||||
* to deal in the Software without restriction, including without limitation
|
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
|
||||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
|
||||||
* 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:
|
** http://oss.sgi.com/projects/FreeB
|
||||||
*
|
**
|
||||||
* The above copyright notice including the dates of first publication and
|
** Note that, as provided in the License, the Software is distributed on an
|
||||||
* either this permission notice or a reference to
|
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
|
||||||
* http://oss.sgi.com/projects/FreeB/
|
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
|
||||||
* shall be included in all copies or substantial portions of the Software.
|
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
|
||||||
*
|
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
**
|
||||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
** Original Code. The Original Code is: OpenGL Sample Implementation,
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
|
||||||
* SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
** Inc. The Original Code is Copyright (c) 1991-2004 Silicon Graphics, Inc.
|
||||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
** Copyright in any portions created by third parties is as indicated
|
||||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
** elsewhere herein. All Rights Reserved.
|
||||||
* SOFTWARE.
|
**
|
||||||
*
|
** Additional Notice Provisions: The application programming interfaces
|
||||||
* Except as contained in this notice, the name of Silicon Graphics, Inc.
|
** established by SGI in conjunction with the Original Code are The
|
||||||
* shall not be used in advertising or otherwise to promote the sale, use or
|
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
|
||||||
* other dealings in this Software without prior written authorization from
|
** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
|
||||||
* Silicon Graphics, Inc.
|
** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
|
||||||
*/
|
** Window System(R) (Version 1.3), released October 19, 1998. This software
|
||||||
|
** was created using the OpenGL(R) version 1.2.1 Sample Implementation
|
||||||
|
** published by SGI, but has not been independently verified as being
|
||||||
|
** compliant with the OpenGL(R) version 1.2.1 Specification.
|
||||||
|
*/
|
||||||
|
|
||||||
#if 0/*XXX TEMPORARY HACK*/
|
#if 0/*XXX TEMPORARY HACK*/
|
||||||
#include <GLES/gl.h>
|
#include <GLES/gl.h>
|
||||||
|
|||||||
@@ -13,20 +13,20 @@
|
|||||||
/*
|
/*
|
||||||
** These opaque EGL types are implemented as unsigned 32-bit integers:
|
** These opaque EGL types are implemented as unsigned 32-bit integers:
|
||||||
*/
|
*/
|
||||||
typedef uint32_t EGLDisplay;
|
typedef u_int32_t EGLDisplay;
|
||||||
typedef uint32_t EGLConfig;
|
typedef u_int32_t EGLConfig;
|
||||||
typedef uint32_t EGLSurface;
|
typedef u_int32_t EGLSurface;
|
||||||
typedef uint32_t EGLContext;
|
typedef u_int32_t EGLContext;
|
||||||
|
|
||||||
/* EGL_MESA_screen_surface */
|
/* EGL_MESA_screen_surface */
|
||||||
typedef uint32_t EGLModeMESA;
|
typedef u_int32_t EGLModeMESA;
|
||||||
typedef uint32_t EGLScreenMESA;
|
typedef u_int32_t EGLScreenMESA;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Other basic EGL types:
|
** Other basic EGL types:
|
||||||
*/
|
*/
|
||||||
typedef uint8_t EGLBoolean;
|
typedef u_int8_t EGLBoolean;
|
||||||
typedef int32_t EGLint;
|
typedef int32_t EGLint;
|
||||||
|
|
||||||
typedef void * NativeDisplayType;
|
typedef void * NativeDisplayType;
|
||||||
|
|||||||
192
include/GLView.h
Normal file
192
include/GLView.h
Normal file
@@ -0,0 +1,192 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
/
|
||||||
|
/ File: GLView.h
|
||||||
|
/
|
||||||
|
/ Copyright 1993-98, Be Incorporated, All Rights Reserved.
|
||||||
|
/
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
#ifndef BGLVIEW_H
|
||||||
|
#define BGLVIEW_H
|
||||||
|
|
||||||
|
#include <GL/gl.h>
|
||||||
|
|
||||||
|
#define BGL_RGB 0
|
||||||
|
#define BGL_INDEX 1
|
||||||
|
#define BGL_SINGLE 0
|
||||||
|
#define BGL_DOUBLE 2
|
||||||
|
#define BGL_DIRECT 0
|
||||||
|
#define BGL_INDIRECT 4
|
||||||
|
#define BGL_ACCUM 8
|
||||||
|
#define BGL_ALPHA 16
|
||||||
|
#define BGL_DEPTH 32
|
||||||
|
#define BGL_OVERLAY 64
|
||||||
|
#define BGL_UNDERLAY 128
|
||||||
|
#define BGL_STENCIL 512
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
|
||||||
|
|
||||||
|
#include <AppKit.h>
|
||||||
|
#include <interface/Window.h>
|
||||||
|
#include <interface/View.h>
|
||||||
|
#include <interface/Bitmap.h>
|
||||||
|
#include <game/WindowScreen.h>
|
||||||
|
#include <game/DirectWindow.h>
|
||||||
|
|
||||||
|
class BGLView : public BView {
|
||||||
|
public:
|
||||||
|
|
||||||
|
BGLView(BRect rect, char *name,
|
||||||
|
ulong resizingMode, ulong mode,
|
||||||
|
ulong options);
|
||||||
|
virtual ~BGLView();
|
||||||
|
|
||||||
|
void LockGL();
|
||||||
|
void UnlockGL();
|
||||||
|
void SwapBuffers();
|
||||||
|
void SwapBuffers( bool vSync );
|
||||||
|
BView * EmbeddedView();
|
||||||
|
status_t CopyPixelsOut(BPoint source, BBitmap *dest);
|
||||||
|
status_t CopyPixelsIn(BBitmap *source, BPoint dest);
|
||||||
|
virtual void ErrorCallback(unsigned long errorCode); // Mesa's GLenum is uint where Be's ones was ulong!
|
||||||
|
|
||||||
|
virtual void Draw(BRect updateRect);
|
||||||
|
|
||||||
|
virtual void AttachedToWindow();
|
||||||
|
virtual void AllAttached();
|
||||||
|
virtual void DetachedFromWindow();
|
||||||
|
virtual void AllDetached();
|
||||||
|
|
||||||
|
virtual void FrameResized(float width, float height);
|
||||||
|
virtual status_t Perform(perform_code d, void *arg);
|
||||||
|
|
||||||
|
/* The public methods below, for the moment,
|
||||||
|
are just pass-throughs to BView */
|
||||||
|
|
||||||
|
virtual status_t Archive(BMessage *data, bool deep = true) const;
|
||||||
|
|
||||||
|
virtual void MessageReceived(BMessage *msg);
|
||||||
|
virtual void SetResizingMode(uint32 mode);
|
||||||
|
|
||||||
|
virtual void Show();
|
||||||
|
virtual void Hide();
|
||||||
|
|
||||||
|
virtual BHandler *ResolveSpecifier(BMessage *msg, int32 index,
|
||||||
|
BMessage *specifier, int32 form,
|
||||||
|
const char *property);
|
||||||
|
virtual status_t GetSupportedSuites(BMessage *data);
|
||||||
|
|
||||||
|
/* New public functions */
|
||||||
|
void DirectConnected( direct_buffer_info *info );
|
||||||
|
void EnableDirectMode( bool enabled );
|
||||||
|
|
||||||
|
void * getGC() { return m_gc; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
virtual void _ReservedGLView1();
|
||||||
|
virtual void _ReservedGLView2();
|
||||||
|
virtual void _ReservedGLView3();
|
||||||
|
virtual void _ReservedGLView4();
|
||||||
|
virtual void _ReservedGLView5();
|
||||||
|
virtual void _ReservedGLView6();
|
||||||
|
virtual void _ReservedGLView7();
|
||||||
|
virtual void _ReservedGLView8();
|
||||||
|
|
||||||
|
BGLView(const BGLView &);
|
||||||
|
BGLView &operator=(const BGLView &);
|
||||||
|
|
||||||
|
void dither_front();
|
||||||
|
bool confirm_dither();
|
||||||
|
void draw(BRect r);
|
||||||
|
|
||||||
|
void * m_gc;
|
||||||
|
uint32 m_options;
|
||||||
|
uint32 m_ditherCount;
|
||||||
|
BLocker m_drawLock;
|
||||||
|
BLocker m_displayLock;
|
||||||
|
void * m_clip_info;
|
||||||
|
void * _Unused1;
|
||||||
|
|
||||||
|
BBitmap * m_ditherMap;
|
||||||
|
BRect m_bounds;
|
||||||
|
int16 * m_errorBuffer[2];
|
||||||
|
uint64 _reserved[8];
|
||||||
|
|
||||||
|
/* Direct Window stuff */
|
||||||
|
private:
|
||||||
|
void drawScanline( int x1, int x2, int y, void *data );
|
||||||
|
static void scanlineHandler(struct rasStateRec *state, GLint x1, GLint x2);
|
||||||
|
|
||||||
|
void lock_draw();
|
||||||
|
void unlock_draw();
|
||||||
|
bool validateView();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class BGLScreen : public BWindowScreen {
|
||||||
|
public:
|
||||||
|
BGLScreen(char *name,
|
||||||
|
ulong screenMode, ulong options,
|
||||||
|
status_t *error, bool debug=false);
|
||||||
|
~BGLScreen();
|
||||||
|
|
||||||
|
void LockGL();
|
||||||
|
void UnlockGL();
|
||||||
|
void SwapBuffers();
|
||||||
|
virtual void ErrorCallback(GLenum errorCode);
|
||||||
|
|
||||||
|
virtual void ScreenConnected(bool connected);
|
||||||
|
virtual void FrameResized(float width, float height);
|
||||||
|
virtual status_t Perform(perform_code d, void *arg);
|
||||||
|
|
||||||
|
/* The public methods below, for the moment,
|
||||||
|
are just pass-throughs to BWindowScreen */
|
||||||
|
|
||||||
|
virtual status_t Archive(BMessage *data, bool deep = true) const;
|
||||||
|
virtual void MessageReceived(BMessage *msg);
|
||||||
|
|
||||||
|
virtual void Show();
|
||||||
|
virtual void Hide();
|
||||||
|
|
||||||
|
virtual BHandler *ResolveSpecifier(BMessage *msg,
|
||||||
|
int32 index,
|
||||||
|
BMessage *specifier,
|
||||||
|
int32 form,
|
||||||
|
const char *property);
|
||||||
|
virtual status_t GetSupportedSuites(BMessage *data);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
virtual void _ReservedGLScreen1();
|
||||||
|
virtual void _ReservedGLScreen2();
|
||||||
|
virtual void _ReservedGLScreen3();
|
||||||
|
virtual void _ReservedGLScreen4();
|
||||||
|
virtual void _ReservedGLScreen5();
|
||||||
|
virtual void _ReservedGLScreen6();
|
||||||
|
virtual void _ReservedGLScreen7();
|
||||||
|
virtual void _ReservedGLScreen8();
|
||||||
|
|
||||||
|
BGLScreen(const BGLScreen &);
|
||||||
|
BGLScreen &operator=(const BGLScreen &);
|
||||||
|
|
||||||
|
void * m_gc;
|
||||||
|
long m_options;
|
||||||
|
BLocker m_drawLock;
|
||||||
|
|
||||||
|
int32 m_colorSpace;
|
||||||
|
uint32 m_screen_mode;
|
||||||
|
|
||||||
|
uint64 _reserved[7];
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // __cplusplus
|
||||||
|
|
||||||
|
#endif // BGLVIEW_H
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// $Id: demo.cpp,v 1.2 2004/08/14 09:59:16 phoudoin Exp $
|
||||||
|
|
||||||
// Simple BeOS GLView demo
|
// Simple BeOS GLView demo
|
||||||
// Written by Brian Paul
|
// Written by Brian Paul
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
static GLboolean Anim = GL_TRUE;
|
static GLboolean Anim = GL_TRUE;
|
||||||
static GLfloat Xpos = 0;
|
static GLfloat Xpos = 0;
|
||||||
static GLuint OccQuery;
|
static GLuint OccQuery;
|
||||||
static GLint Win = 0;
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -204,7 +204,6 @@ static void Key( unsigned char key, int x, int y )
|
|||||||
(void) y;
|
(void) y;
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case 27:
|
case 27:
|
||||||
glutDestroyWindow(Win);
|
|
||||||
exit(0);
|
exit(0);
|
||||||
break;
|
break;
|
||||||
case ' ':
|
case ' ':
|
||||||
@@ -272,7 +271,7 @@ int main( int argc, char *argv[] )
|
|||||||
glutInitWindowPosition( 0, 0 );
|
glutInitWindowPosition( 0, 0 );
|
||||||
glutInitWindowSize( 400, 400 );
|
glutInitWindowSize( 400, 400 );
|
||||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
||||||
Win = glutCreateWindow(argv[0]);
|
glutCreateWindow(argv[0]);
|
||||||
glutReshapeFunc( Reshape );
|
glutReshapeFunc( Reshape );
|
||||||
glutKeyboardFunc( Key );
|
glutKeyboardFunc( Key );
|
||||||
glutSpecialFunc( SpecialKey );
|
glutSpecialFunc( SpecialKey );
|
||||||
|
|||||||
@@ -154,7 +154,6 @@ static GLuint TexObj;
|
|||||||
static GLuint MyFB;
|
static GLuint MyFB;
|
||||||
static GLuint DepthRB;
|
static GLuint DepthRB;
|
||||||
static GLboolean WireFrame = GL_FALSE;
|
static GLboolean WireFrame = GL_FALSE;
|
||||||
static GLboolean Anim = GL_TRUE;
|
|
||||||
static GLint texType = 0;
|
static GLint texType = 0;
|
||||||
|
|
||||||
static GLint T0 = 0;
|
static GLint T0 = 0;
|
||||||
@@ -164,11 +163,6 @@ static GLint Win = 0;
|
|||||||
static GLfloat ViewRotX = 20.0, ViewRotY = 30.0, ViewRotZ = 0.0;
|
static GLfloat ViewRotX = 20.0, ViewRotY = 30.0, ViewRotZ = 0.0;
|
||||||
static GLfloat CubeRot = 0.0;
|
static GLfloat CubeRot = 0.0;
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
idle(void);
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
CheckError(int line)
|
CheckError(int line)
|
||||||
{
|
{
|
||||||
@@ -567,7 +561,7 @@ drawfire(void)
|
|||||||
printstring(GLUT_BITMAP_HELVETICA_18, texNames[texType]);
|
printstring(GLUT_BITMAP_HELVETICA_18, texNames[texType]);
|
||||||
glColor3f(1.0, 0.0, 0.0);
|
glColor3f(1.0, 0.0, 0.0);
|
||||||
glRasterPos2i(10, 470);
|
glRasterPos2i(10, 470);
|
||||||
printstring(GLUT_BITMAP_HELVETICA_10,
|
printstring(GLUT_BITMAP_HELVETICA_10,
|
||||||
"Fire V1.5 Written by David Bucciarelli (tech.hmw@plus.it)");
|
"Fire V1.5 Written by David Bucciarelli (tech.hmw@plus.it)");
|
||||||
|
|
||||||
if (help)
|
if (help)
|
||||||
@@ -611,10 +605,7 @@ key(unsigned char key, int x, int y)
|
|||||||
cleanup();
|
cleanup();
|
||||||
exit(0);
|
exit(0);
|
||||||
break;
|
break;
|
||||||
case ' ':
|
|
||||||
Anim = !Anim;
|
|
||||||
glutIdleFunc(Anim ? idle : NULL);
|
|
||||||
break;
|
|
||||||
case 'a':
|
case 'a':
|
||||||
v += 0.0005;
|
v += 0.0005;
|
||||||
break;
|
break;
|
||||||
@@ -1022,7 +1013,7 @@ static void
|
|||||||
visible(int vis)
|
visible(int vis)
|
||||||
{
|
{
|
||||||
if (vis == GLUT_VISIBLE)
|
if (vis == GLUT_VISIBLE)
|
||||||
glutIdleFunc(Anim ? idle : NULL);
|
glutIdleFunc(idle);
|
||||||
else
|
else
|
||||||
glutIdleFunc(NULL);
|
glutIdleFunc(NULL);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/* $Id: gears.c,v 1.3 1999/08/22 08:56:50 jtaylor Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 3-D gear wheels. This program is in the public domain.
|
* 3-D gear wheels. This program is in the public domain.
|
||||||
|
|||||||
1
progs/glsl/.gitignore
vendored
1
progs/glsl/.gitignore
vendored
@@ -4,7 +4,6 @@ bump
|
|||||||
deriv
|
deriv
|
||||||
extfuncs.h
|
extfuncs.h
|
||||||
mandelbrot
|
mandelbrot
|
||||||
multinoise
|
|
||||||
multitex
|
multitex
|
||||||
noise
|
noise
|
||||||
points
|
points
|
||||||
|
|||||||
@@ -15,21 +15,15 @@ PROGS = \
|
|||||||
bump \
|
bump \
|
||||||
convolutions \
|
convolutions \
|
||||||
deriv \
|
deriv \
|
||||||
fragcoord \
|
|
||||||
mandelbrot \
|
mandelbrot \
|
||||||
multinoise \
|
|
||||||
multitex \
|
multitex \
|
||||||
noise \
|
noise \
|
||||||
points \
|
points \
|
||||||
pointcoord \
|
pointcoord \
|
||||||
samplers \
|
|
||||||
skinning \
|
|
||||||
texdemo1 \
|
texdemo1 \
|
||||||
toyball \
|
toyball \
|
||||||
twoside \
|
twoside \
|
||||||
trirast \
|
trirast
|
||||||
vert-or-frag-only \
|
|
||||||
vert-tex
|
|
||||||
|
|
||||||
|
|
||||||
##### RULES #####
|
##### RULES #####
|
||||||
@@ -111,13 +105,6 @@ deriv: deriv.o shaderutil.o
|
|||||||
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) deriv.o shaderutil.o $(LIBS) -o $@
|
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) deriv.o shaderutil.o $(LIBS) -o $@
|
||||||
|
|
||||||
|
|
||||||
fragcoord.o: fragcoord.c extfuncs.h shaderutil.h
|
|
||||||
$(CC) -c -I$(INCDIR) $(CFLAGS) fragcoord.c
|
|
||||||
|
|
||||||
fragcoord: fragcoord.o shaderutil.o
|
|
||||||
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) fragcoord.o shaderutil.o $(LIBS) -o $@
|
|
||||||
|
|
||||||
|
|
||||||
mandelbrot.o: mandelbrot.c extfuncs.h shaderutil.h
|
mandelbrot.o: mandelbrot.c extfuncs.h shaderutil.h
|
||||||
$(CC) -c -I$(INCDIR) $(CFLAGS) mandelbrot.c
|
$(CC) -c -I$(INCDIR) $(CFLAGS) mandelbrot.c
|
||||||
|
|
||||||
@@ -153,20 +140,6 @@ pointcoord: pointcoord.o readtex.o shaderutil.o
|
|||||||
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) pointcoord.o readtex.o shaderutil.o $(LIBS) -o $@
|
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) pointcoord.o readtex.o shaderutil.o $(LIBS) -o $@
|
||||||
|
|
||||||
|
|
||||||
samplers.o: samplers.c readtex.h extfuncs.h shaderutil.h
|
|
||||||
$(CC) -c -I$(INCDIR) $(CFLAGS) samplers.c
|
|
||||||
|
|
||||||
samplers: samplers.o readtex.o shaderutil.o
|
|
||||||
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) samplers.o readtex.o shaderutil.o $(LIBS) -o $@
|
|
||||||
|
|
||||||
|
|
||||||
skinning.o: skinning.c readtex.h extfuncs.h shaderutil.h
|
|
||||||
$(CC) -c -I$(INCDIR) $(CFLAGS) skinning.c
|
|
||||||
|
|
||||||
skinning: skinning.o readtex.o shaderutil.o
|
|
||||||
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) skinning.o readtex.o shaderutil.o $(LIBS) -o $@
|
|
||||||
|
|
||||||
|
|
||||||
texdemo1.o: texdemo1.c readtex.h extfuncs.h shaderutil.h
|
texdemo1.o: texdemo1.c readtex.h extfuncs.h shaderutil.h
|
||||||
$(CC) -c -I$(INCDIR) $(CFLAGS) texdemo1.c
|
$(CC) -c -I$(INCDIR) $(CFLAGS) texdemo1.c
|
||||||
|
|
||||||
@@ -195,20 +168,6 @@ trirast: trirast.o shaderutil.o
|
|||||||
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) trirast.o shaderutil.o $(LIBS) -o $@
|
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) trirast.o shaderutil.o $(LIBS) -o $@
|
||||||
|
|
||||||
|
|
||||||
vert-or-frag-only.o: vert-or-frag-only.c extfuncs.h shaderutil.h
|
|
||||||
$(CC) -c -I$(INCDIR) $(CFLAGS) vert-or-frag-only.c
|
|
||||||
|
|
||||||
vert-or-frag-only: vert-or-frag-only.o shaderutil.o
|
|
||||||
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) vert-or-frag-only.o shaderutil.o $(LIBS) -o $@
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
vert-tex.o: vert-tex.c extfuncs.h shaderutil.h
|
|
||||||
$(CC) -c -I$(INCDIR) $(CFLAGS) vert-tex.c
|
|
||||||
|
|
||||||
vert-tex: vert-tex.o shaderutil.o
|
|
||||||
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) vert-tex.o shaderutil.o $(LIBS) -o $@
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -141,6 +141,9 @@ Redisplay(void)
|
|||||||
|
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
|
|
||||||
|
glFinish();
|
||||||
|
glFlush();
|
||||||
|
|
||||||
CheckError(__LINE__);
|
CheckError(__LINE__);
|
||||||
|
|
||||||
glutSwapBuffers();
|
glutSwapBuffers();
|
||||||
|
|||||||
@@ -438,6 +438,8 @@ static void draw()
|
|||||||
|
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
|
|
||||||
|
glFlush();
|
||||||
|
|
||||||
glutSwapBuffers();
|
glutSwapBuffers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,185 +0,0 @@
|
|||||||
/**
|
|
||||||
* Test GLSL gl_FragCoord fragment program attribute.
|
|
||||||
* Color the quad's fragments according to their window position.
|
|
||||||
*
|
|
||||||
* Brian Paul
|
|
||||||
* 20 Nov 2008
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <math.h>
|
|
||||||
#include <GL/gl.h>
|
|
||||||
#include <GL/glut.h>
|
|
||||||
#include <GL/glext.h>
|
|
||||||
#include "extfuncs.h"
|
|
||||||
#include "shaderutil.h"
|
|
||||||
|
|
||||||
|
|
||||||
static GLint WinWidth = 200, WinHeight = 200;
|
|
||||||
static char *FragProgFile = NULL;
|
|
||||||
static char *VertProgFile = NULL;
|
|
||||||
static GLuint fragShader;
|
|
||||||
static GLuint vertShader;
|
|
||||||
static GLuint program;
|
|
||||||
static GLint win = 0;
|
|
||||||
static GLboolean Anim = GL_TRUE;
|
|
||||||
static GLfloat PosX = 0.0, PosY = 0.0;
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
Idle(void)
|
|
||||||
{
|
|
||||||
float r = (WinWidth < WinHeight) ? WinWidth : WinHeight;
|
|
||||||
float a = glutGet(GLUT_ELAPSED_TIME) * 0.001;
|
|
||||||
r *= 0.25;
|
|
||||||
PosX = WinWidth / 2 + r * cos(a);
|
|
||||||
PosY = WinHeight / 2 + r * sin(a);
|
|
||||||
|
|
||||||
glutPostRedisplay();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
Redisplay(void)
|
|
||||||
{
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
|
||||||
|
|
||||||
glPushMatrix();
|
|
||||||
glTranslatef(PosX, PosY, 0.0);
|
|
||||||
#if 0
|
|
||||||
glBegin(GL_POLYGON);
|
|
||||||
glVertex2f(-50, -50);
|
|
||||||
glVertex2f( 50, -50);
|
|
||||||
glVertex2f( 50, 50);
|
|
||||||
glVertex2f(-50, 50);
|
|
||||||
glEnd();
|
|
||||||
#else
|
|
||||||
glutSolidSphere(50, 20, 10);
|
|
||||||
#endif
|
|
||||||
glPopMatrix();
|
|
||||||
|
|
||||||
glutSwapBuffers();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
Reshape(int width, int height)
|
|
||||||
{
|
|
||||||
glViewport(0, 0, width, height);
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
|
||||||
glLoadIdentity();
|
|
||||||
glOrtho(0, width, 0, height, -55, 55);
|
|
||||||
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
|
||||||
glLoadIdentity();
|
|
||||||
|
|
||||||
WinWidth = width;
|
|
||||||
WinHeight = height;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
CleanUp(void)
|
|
||||||
{
|
|
||||||
glDeleteShader_func(fragShader);
|
|
||||||
glDeleteShader_func(vertShader);
|
|
||||||
glDeleteProgram_func(program);
|
|
||||||
glutDestroyWindow(win);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
Key(unsigned char key, int x, int y)
|
|
||||||
{
|
|
||||||
(void) x;
|
|
||||||
(void) y;
|
|
||||||
|
|
||||||
switch(key) {
|
|
||||||
case ' ':
|
|
||||||
case 'a':
|
|
||||||
Anim = !Anim;
|
|
||||||
glutIdleFunc(Anim ? Idle : NULL);
|
|
||||||
break;
|
|
||||||
case 27:
|
|
||||||
CleanUp();
|
|
||||||
exit(0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
glutPostRedisplay();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
Init(void)
|
|
||||||
{
|
|
||||||
static const char *fragShaderText =
|
|
||||||
"void main() { \n"
|
|
||||||
" vec4 scale = vec4(.005, 0.005, 0.5, 1.0);\n"
|
|
||||||
" gl_FragColor = gl_FragCoord * scale; \n"
|
|
||||||
"}\n";
|
|
||||||
static const char *vertShaderText =
|
|
||||||
"void main() {\n"
|
|
||||||
" gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n"
|
|
||||||
"}\n";
|
|
||||||
|
|
||||||
if (!ShadersSupported())
|
|
||||||
exit(1);
|
|
||||||
|
|
||||||
GetExtensionFuncs();
|
|
||||||
|
|
||||||
vertShader = CompileShaderText(GL_VERTEX_SHADER, vertShaderText);
|
|
||||||
fragShader = CompileShaderText(GL_FRAGMENT_SHADER, fragShaderText);
|
|
||||||
program = LinkShaders(vertShader, fragShader);
|
|
||||||
|
|
||||||
glUseProgram_func(program);
|
|
||||||
|
|
||||||
/*assert(glGetError() == 0);*/
|
|
||||||
|
|
||||||
glClearColor(0.3f, 0.3f, 0.3f, 0.0f);
|
|
||||||
|
|
||||||
printf("GL_RENDERER = %s\n",(const char *) glGetString(GL_RENDERER));
|
|
||||||
|
|
||||||
assert(glIsProgram_func(program));
|
|
||||||
assert(glIsShader_func(fragShader));
|
|
||||||
assert(glIsShader_func(vertShader));
|
|
||||||
|
|
||||||
glColor3f(1, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
ParseOptions(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for (i = 1; i < argc; i++) {
|
|
||||||
if (strcmp(argv[i], "-fs") == 0) {
|
|
||||||
FragProgFile = argv[i+1];
|
|
||||||
}
|
|
||||||
else if (strcmp(argv[i], "-vs") == 0) {
|
|
||||||
VertProgFile = argv[i+1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
glutInit(&argc, argv);
|
|
||||||
glutInitWindowPosition( 0, 0);
|
|
||||||
glutInitWindowSize(WinWidth, WinHeight);
|
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
|
|
||||||
win = glutCreateWindow(argv[0]);
|
|
||||||
glutReshapeFunc(Reshape);
|
|
||||||
glutKeyboardFunc(Key);
|
|
||||||
glutDisplayFunc(Redisplay);
|
|
||||||
ParseOptions(argc, argv);
|
|
||||||
Init();
|
|
||||||
glutIdleFunc(Anim ? Idle : NULL);
|
|
||||||
glutMainLoop();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -74,6 +74,8 @@ Redisplay(void)
|
|||||||
|
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
|
|
||||||
|
glFinish();
|
||||||
|
glFlush();
|
||||||
glutSwapBuffers();
|
glutSwapBuffers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,281 +0,0 @@
|
|||||||
/**
|
|
||||||
* Another test for noise() functions (noise1 to noise4 tested independently).
|
|
||||||
* 13 Dec 2008
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <math.h>
|
|
||||||
#include <GL/gl.h>
|
|
||||||
#include <GL/glut.h>
|
|
||||||
#include <GL/glext.h>
|
|
||||||
#include "extfuncs.h"
|
|
||||||
|
|
||||||
static const char *VertShaderText =
|
|
||||||
"void main() {\n"
|
|
||||||
" gl_TexCoord[0].xyz = gl_Vertex.xyz;\n"
|
|
||||||
" gl_TexCoord[0].w = gl_MultiTexCoord1.x;\n"
|
|
||||||
" gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n"
|
|
||||||
"}\n";
|
|
||||||
|
|
||||||
static const char *FragShaderText[ 4 ] = {
|
|
||||||
"void main()\n"
|
|
||||||
"{\n"
|
|
||||||
" gl_FragColor.rgb = noise3( gl_TexCoord[ 0 ].w ) * 0.5 + 0.5;\n"
|
|
||||||
" gl_FragColor.a = 1;\n"
|
|
||||||
"}\n",
|
|
||||||
"void main()\n"
|
|
||||||
"{\n"
|
|
||||||
" gl_FragColor.rgb = noise3( gl_TexCoord[ 0 ].xw ) * 0.5 + 0.5;\n"
|
|
||||||
" gl_FragColor.a = 1;\n"
|
|
||||||
"}\n",
|
|
||||||
"void main()\n"
|
|
||||||
"{\n"
|
|
||||||
" gl_FragColor.rgb = noise3( gl_TexCoord[ 0 ].xyw ) * 0.5 + 0.5;\n"
|
|
||||||
" gl_FragColor.a = 1;\n"
|
|
||||||
"}\n",
|
|
||||||
"void main()\n"
|
|
||||||
"{\n"
|
|
||||||
" gl_FragColor.rgb = noise3( gl_TexCoord[ 0 ].xyzw ) * 0.5 + 0.5;\n"
|
|
||||||
" gl_FragColor.a = 1;\n"
|
|
||||||
"}\n"
|
|
||||||
};
|
|
||||||
|
|
||||||
struct uniform_info {
|
|
||||||
const char *name;
|
|
||||||
GLuint size;
|
|
||||||
GLint location;
|
|
||||||
GLfloat value[4];
|
|
||||||
};
|
|
||||||
|
|
||||||
/* program/shader objects */
|
|
||||||
static GLuint fragShader[ 4 ];
|
|
||||||
static GLuint vertShader;
|
|
||||||
static GLuint program[ 4 ];
|
|
||||||
|
|
||||||
static GLint win = 0;
|
|
||||||
static GLfloat xRot = 0.0f, yRot = 0.0f, zRot = 0.0f;
|
|
||||||
static GLfloat Slice = 0.0;
|
|
||||||
static GLboolean Anim = GL_FALSE;
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
Idle(void)
|
|
||||||
{
|
|
||||||
Slice += 0.01;
|
|
||||||
glutPostRedisplay();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
Redisplay(void)
|
|
||||||
{
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
|
||||||
|
|
||||||
glMultiTexCoord1f( GL_TEXTURE1, Slice );
|
|
||||||
|
|
||||||
glPushMatrix();
|
|
||||||
glRotatef(xRot, 1.0f, 0.0f, 0.0f);
|
|
||||||
glRotatef(yRot, 0.0f, 1.0f, 0.0f);
|
|
||||||
glRotatef(zRot, 0.0f, 0.0f, 1.0f);
|
|
||||||
|
|
||||||
glutSolidTeapot( 1.0 );
|
|
||||||
|
|
||||||
glPopMatrix();
|
|
||||||
|
|
||||||
glutSwapBuffers();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
Reshape(int width, int height)
|
|
||||||
{
|
|
||||||
glViewport(0, 0, width, height);
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
|
||||||
glLoadIdentity();
|
|
||||||
glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 25.0);
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
|
||||||
glLoadIdentity();
|
|
||||||
glTranslatef(0.0f, 0.0f, -15.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
CleanUp(void)
|
|
||||||
{
|
|
||||||
GLint i;
|
|
||||||
|
|
||||||
glDeleteShader_func(vertShader);
|
|
||||||
for( i = 0; i < 4; i++ ) {
|
|
||||||
glDeleteShader_func(fragShader[ i ]);
|
|
||||||
glDeleteProgram_func(program[ i ]);
|
|
||||||
}
|
|
||||||
glutDestroyWindow(win);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
Key(unsigned char key, int x, int y)
|
|
||||||
{
|
|
||||||
const GLfloat step = 0.01;
|
|
||||||
(void) x;
|
|
||||||
(void) y;
|
|
||||||
|
|
||||||
switch(key) {
|
|
||||||
case 'a':
|
|
||||||
Anim = !Anim;
|
|
||||||
glutIdleFunc(Anim ? Idle : NULL);
|
|
||||||
case 's':
|
|
||||||
Slice -= step;
|
|
||||||
break;
|
|
||||||
case 'S':
|
|
||||||
Slice += step;
|
|
||||||
break;
|
|
||||||
case 'z':
|
|
||||||
zRot -= 1.0;
|
|
||||||
break;
|
|
||||||
case 'Z':
|
|
||||||
zRot += 1.0;
|
|
||||||
break;
|
|
||||||
case '1':
|
|
||||||
case '2':
|
|
||||||
case '3':
|
|
||||||
case '4':
|
|
||||||
glUseProgram_func(program[ key - '1' ]);
|
|
||||||
break;
|
|
||||||
case 27:
|
|
||||||
CleanUp();
|
|
||||||
exit(0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
glutPostRedisplay();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
SpecialKey(int key, int x, int y)
|
|
||||||
{
|
|
||||||
const GLfloat step = 3.0f;
|
|
||||||
|
|
||||||
(void) x;
|
|
||||||
(void) y;
|
|
||||||
|
|
||||||
switch(key) {
|
|
||||||
case GLUT_KEY_UP:
|
|
||||||
xRot -= step;
|
|
||||||
break;
|
|
||||||
case GLUT_KEY_DOWN:
|
|
||||||
xRot += step;
|
|
||||||
break;
|
|
||||||
case GLUT_KEY_LEFT:
|
|
||||||
yRot -= step;
|
|
||||||
break;
|
|
||||||
case GLUT_KEY_RIGHT:
|
|
||||||
yRot += step;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
glutPostRedisplay();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
LoadAndCompileShader(GLuint shader, const char *text)
|
|
||||||
{
|
|
||||||
GLint stat;
|
|
||||||
|
|
||||||
glShaderSource_func(shader, 1, (const GLchar **) &text, NULL);
|
|
||||||
|
|
||||||
glCompileShader_func(shader);
|
|
||||||
|
|
||||||
glGetShaderiv_func(shader, GL_COMPILE_STATUS, &stat);
|
|
||||||
if (!stat) {
|
|
||||||
GLchar log[1000];
|
|
||||||
GLsizei len;
|
|
||||||
glGetShaderInfoLog_func(shader, 1000, &len, log);
|
|
||||||
fprintf(stderr, "noise: problem compiling shader: %s\n", log);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
printf("Shader compiled OK\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
CheckLink(GLuint prog)
|
|
||||||
{
|
|
||||||
GLint stat;
|
|
||||||
glGetProgramiv_func(prog, GL_LINK_STATUS, &stat);
|
|
||||||
if (!stat) {
|
|
||||||
GLchar log[1000];
|
|
||||||
GLsizei len;
|
|
||||||
glGetProgramInfoLog_func(prog, 1000, &len, log);
|
|
||||||
fprintf(stderr, "Linker error:\n%s\n", log);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
fprintf(stderr, "Link success!\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
Init(void)
|
|
||||||
{
|
|
||||||
const char *version;
|
|
||||||
GLint i;
|
|
||||||
|
|
||||||
version = (const char *) glGetString(GL_VERSION);
|
|
||||||
if (version[0] != '2' || version[1] != '.') {
|
|
||||||
printf("Warning: this program expects OpenGL 2.0\n");
|
|
||||||
/*exit(1);*/
|
|
||||||
}
|
|
||||||
|
|
||||||
GetExtensionFuncs();
|
|
||||||
|
|
||||||
vertShader = glCreateShader_func(GL_VERTEX_SHADER);
|
|
||||||
LoadAndCompileShader(vertShader, VertShaderText);
|
|
||||||
|
|
||||||
for( i = 0; i < 4; i++ ) {
|
|
||||||
fragShader[ i ] = glCreateShader_func(GL_FRAGMENT_SHADER);
|
|
||||||
LoadAndCompileShader(fragShader[ i ], FragShaderText[ i ]);
|
|
||||||
program[ i ] = glCreateProgram_func();
|
|
||||||
glAttachShader_func(program[ i ], fragShader[ i ]);
|
|
||||||
glAttachShader_func(program[ i ], vertShader);
|
|
||||||
glLinkProgram_func(program[ i ]);
|
|
||||||
CheckLink(program[ i ]);
|
|
||||||
}
|
|
||||||
|
|
||||||
glUseProgram_func(program[ 0 ]);
|
|
||||||
|
|
||||||
assert(glGetError() == 0);
|
|
||||||
|
|
||||||
glClearColor(0.4f, 0.4f, 0.8f, 0.0f);
|
|
||||||
|
|
||||||
glColor3f(1, 0, 0);
|
|
||||||
|
|
||||||
glFrontFace( GL_CW );
|
|
||||||
glEnable( GL_CULL_FACE );
|
|
||||||
glEnable( GL_DEPTH_TEST );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
glutInit(&argc, argv);
|
|
||||||
glutInitWindowPosition( 0, 0);
|
|
||||||
glutInitWindowSize(400, 400);
|
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
|
||||||
win = glutCreateWindow(argv[0]);
|
|
||||||
glutReshapeFunc(Reshape);
|
|
||||||
glutKeyboardFunc(Key);
|
|
||||||
glutSpecialFunc(SpecialKey);
|
|
||||||
glutDisplayFunc(Redisplay);
|
|
||||||
Init();
|
|
||||||
glutMainLoop();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -47,12 +47,9 @@ static const char *TexFiles[2] =
|
|||||||
|
|
||||||
static GLuint Program;
|
static GLuint Program;
|
||||||
|
|
||||||
static GLfloat Xrot = 0.0, Yrot = .0, Zrot = 0.0;
|
static GLfloat Xrot = -90.0, Yrot = .0, Zrot = 0.0;
|
||||||
static GLfloat EyeDist = 10;
|
static GLfloat EyeDist = 10;
|
||||||
static GLboolean Anim = GL_TRUE;
|
static GLboolean Anim = GL_TRUE;
|
||||||
static GLboolean UseArrays = GL_TRUE;
|
|
||||||
|
|
||||||
static GLint VertCoord_attr = -1, TexCoord0_attr = -1, TexCoord1_attr = -1;
|
|
||||||
|
|
||||||
|
|
||||||
/* value[0] = tex unit */
|
/* value[0] = tex unit */
|
||||||
@@ -63,62 +60,32 @@ static struct uniform_info Uniforms[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static const GLfloat Tex0Coords[4][2] = {
|
|
||||||
{ 0.0, 0.0 }, { 2.0, 0.0 }, { 2.0, 2.0 }, { 0.0, 2.0 }
|
|
||||||
};
|
|
||||||
|
|
||||||
static const GLfloat Tex1Coords[4][2] = {
|
|
||||||
{ 0.0, 0.0 }, { 1.0, 0.0 }, { 1.0, 1.0 }, { 0.0, 1.0 }
|
|
||||||
};
|
|
||||||
|
|
||||||
static const GLfloat VertCoords[4][2] = {
|
|
||||||
{ -3.0, -3.0 }, { 3.0, -3.0 }, { 3.0, 3.0 }, { -3.0, 3.0 }
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
DrawPolygonArray(void)
|
DrawPolygon(GLfloat size)
|
||||||
{
|
{
|
||||||
if (VertCoord_attr >= 0) {
|
glPushMatrix();
|
||||||
glVertexAttribPointer_func(VertCoord_attr, 2, GL_FLOAT, GL_FALSE,
|
glRotatef(90, 1, 0, 0);
|
||||||
0, VertCoords);
|
glNormal3f(0, 0, 1);
|
||||||
glEnableVertexAttribArray_func(VertCoord_attr);
|
glBegin(GL_POLYGON);
|
||||||
}
|
|
||||||
else {
|
|
||||||
glVertexPointer(2, GL_FLOAT, 0, VertCoords);
|
|
||||||
glEnable(GL_VERTEX_ARRAY);
|
|
||||||
}
|
|
||||||
|
|
||||||
glVertexAttribPointer_func(TexCoord0_attr, 2, GL_FLOAT, GL_FALSE,
|
glMultiTexCoord2f(GL_TEXTURE0, 0, 0);
|
||||||
0, Tex0Coords);
|
glMultiTexCoord2f(GL_TEXTURE1, 0, 0);
|
||||||
glEnableVertexAttribArray_func(TexCoord0_attr);
|
glVertex2f(-size, -size);
|
||||||
|
|
||||||
glVertexAttribPointer_func(TexCoord1_attr, 2, GL_FLOAT, GL_FALSE,
|
glMultiTexCoord2f(GL_TEXTURE0, 2, 0);
|
||||||
0, Tex1Coords);
|
glMultiTexCoord2f(GL_TEXTURE1, 1, 0);
|
||||||
glEnableVertexAttribArray_func(TexCoord1_attr);
|
glVertex2f( size, -size);
|
||||||
|
|
||||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
glMultiTexCoord2f(GL_TEXTURE0, 2, 2);
|
||||||
}
|
glMultiTexCoord2f(GL_TEXTURE1, 1, 1);
|
||||||
|
glVertex2f( size, size);
|
||||||
|
|
||||||
|
glMultiTexCoord2f(GL_TEXTURE0, 0, 2);
|
||||||
static void
|
glMultiTexCoord2f(GL_TEXTURE1, 0, 1);
|
||||||
DrawPolygonVert(void)
|
glVertex2f(-size, size);
|
||||||
{
|
|
||||||
GLuint i;
|
|
||||||
|
|
||||||
glBegin(GL_TRIANGLE_FAN);
|
|
||||||
|
|
||||||
for (i = 0; i < 4; i++) {
|
|
||||||
glVertexAttrib2fv_func(TexCoord0_attr, Tex0Coords[i]);
|
|
||||||
glVertexAttrib2fv_func(TexCoord1_attr, Tex1Coords[i]);
|
|
||||||
|
|
||||||
if (VertCoord_attr >= 0)
|
|
||||||
glVertexAttrib2fv_func(VertCoord_attr, VertCoords[i]);
|
|
||||||
else
|
|
||||||
glVertex2fv(VertCoords[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
glEnd();
|
glEnd();
|
||||||
|
glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -133,10 +100,7 @@ draw(void)
|
|||||||
glRotatef(Yrot, 0, 1, 0);
|
glRotatef(Yrot, 0, 1, 0);
|
||||||
glRotatef(Xrot, 1, 0, 0);
|
glRotatef(Xrot, 1, 0, 0);
|
||||||
|
|
||||||
if (UseArrays)
|
DrawPolygon(3.0);
|
||||||
DrawPolygonArray();
|
|
||||||
else
|
|
||||||
DrawPolygonVert();
|
|
||||||
|
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
|
|
||||||
@@ -159,11 +123,8 @@ key(unsigned char k, int x, int y)
|
|||||||
(void) x;
|
(void) x;
|
||||||
(void) y;
|
(void) y;
|
||||||
switch (k) {
|
switch (k) {
|
||||||
case 'a':
|
|
||||||
UseArrays = !UseArrays;
|
|
||||||
printf("Arrays: %d\n", UseArrays);
|
|
||||||
break;
|
|
||||||
case ' ':
|
case ' ':
|
||||||
|
case 'a':
|
||||||
Anim = !Anim;
|
Anim = !Anim;
|
||||||
if (Anim)
|
if (Anim)
|
||||||
glutIdleFunc(idle);
|
glutIdleFunc(idle);
|
||||||
@@ -271,13 +232,6 @@ CreateProgram(const char *vertProgFile, const char *fragProgFile,
|
|||||||
|
|
||||||
InitUniforms(program, uniforms);
|
InitUniforms(program, uniforms);
|
||||||
|
|
||||||
TexCoord0_attr = glGetAttribLocation_func(program, "TexCoord0");
|
|
||||||
TexCoord1_attr = glGetAttribLocation_func(program, "TexCoord1");
|
|
||||||
VertCoord_attr = glGetAttribLocation_func(program, "VertCoord");
|
|
||||||
printf("TexCoord0_attr = %d\n", TexCoord0_attr);
|
|
||||||
printf("TexCoord1_attr = %d\n", TexCoord1_attr);
|
|
||||||
printf("VertCoord_attr = %d\n", VertCoord_attr);
|
|
||||||
|
|
||||||
return program;
|
return program;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,13 +2,9 @@
|
|||||||
// Brian Paul
|
// Brian Paul
|
||||||
|
|
||||||
|
|
||||||
attribute vec4 TexCoord0, TexCoord1;
|
|
||||||
attribute vec4 VertCoord;
|
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
gl_TexCoord[0] = TexCoord0;
|
gl_TexCoord[0] = gl_MultiTexCoord0;
|
||||||
gl_TexCoord[1] = TexCoord1;
|
gl_TexCoord[1] = gl_MultiTexCoord1;
|
||||||
// note: may use gl_Vertex or VertCoord here for testing:
|
gl_Position = ftransform();
|
||||||
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ static const char *FragShaderText =
|
|||||||
" vec4 p;\n"
|
" vec4 p;\n"
|
||||||
" p.xy = gl_TexCoord[0].xy;\n"
|
" p.xy = gl_TexCoord[0].xy;\n"
|
||||||
" p.z = Slice;\n"
|
" p.z = Slice;\n"
|
||||||
" p.w = 0;\n"
|
|
||||||
" vec4 n = noise4(p * scale);\n"
|
" vec4 n = noise4(p * scale);\n"
|
||||||
" gl_FragColor = n * Scale + Bias;\n"
|
" gl_FragColor = n * Scale + Bias;\n"
|
||||||
"}\n";
|
"}\n";
|
||||||
|
|||||||
@@ -1,357 +0,0 @@
|
|||||||
/**
|
|
||||||
* Exercise all available GLSL texture samplers.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2009 VMware, Inc. 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* We generate a fragment shader which uses the maximum number of supported
|
|
||||||
* texture samplers.
|
|
||||||
* For each sampler we create a separate texture. Each texture has a
|
|
||||||
* single strip of color at a different intensity. The fragment shader
|
|
||||||
* samples all the textures at the same coordinate and sums the values.
|
|
||||||
* The result should be a quad with rows of colors of increasing intensity
|
|
||||||
* from bottom to top.
|
|
||||||
*
|
|
||||||
* Brian Paul
|
|
||||||
* 1 Jan 2009
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
#include <math.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include "GL/glut.h"
|
|
||||||
#include "readtex.h"
|
|
||||||
#include "extfuncs.h"
|
|
||||||
#include "shaderutil.h"
|
|
||||||
|
|
||||||
|
|
||||||
#define MAX_SAMPLERS 128
|
|
||||||
|
|
||||||
|
|
||||||
static const char *Demo = "samplers";
|
|
||||||
|
|
||||||
static GLuint Program;
|
|
||||||
static GLint NumSamplers;
|
|
||||||
static GLuint Textures[MAX_SAMPLERS];
|
|
||||||
static GLfloat Xrot = 0.0, Yrot = .0, Zrot = 0.0;
|
|
||||||
static GLfloat EyeDist = 10;
|
|
||||||
static GLboolean Anim = GL_FALSE;
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
DrawPolygon(GLfloat size)
|
|
||||||
{
|
|
||||||
glPushMatrix();
|
|
||||||
glNormal3f(0, 0, 1);
|
|
||||||
glBegin(GL_POLYGON);
|
|
||||||
|
|
||||||
glMultiTexCoord2f(GL_TEXTURE0, 0, 0);
|
|
||||||
glVertex2f(-size, -size);
|
|
||||||
|
|
||||||
glMultiTexCoord2f(GL_TEXTURE0, 1, 0);
|
|
||||||
glVertex2f( size, -size);
|
|
||||||
|
|
||||||
glMultiTexCoord2f(GL_TEXTURE0, 1, 1);
|
|
||||||
glVertex2f( size, size);
|
|
||||||
|
|
||||||
glMultiTexCoord2f(GL_TEXTURE0, 0, 1);
|
|
||||||
glVertex2f(-size, size);
|
|
||||||
|
|
||||||
glEnd();
|
|
||||||
glPopMatrix();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
draw(void)
|
|
||||||
{
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
|
||||||
|
|
||||||
glPushMatrix();
|
|
||||||
glTranslatef(0.0, 0.0, -EyeDist);
|
|
||||||
glRotatef(Zrot, 0, 0, 1);
|
|
||||||
glRotatef(Yrot, 0, 1, 0);
|
|
||||||
glRotatef(Xrot, 1, 0, 0);
|
|
||||||
|
|
||||||
DrawPolygon(3.0);
|
|
||||||
|
|
||||||
glPopMatrix();
|
|
||||||
|
|
||||||
glutSwapBuffers();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
idle(void)
|
|
||||||
{
|
|
||||||
GLfloat t = 0.05 * glutGet(GLUT_ELAPSED_TIME);
|
|
||||||
Yrot = t;
|
|
||||||
glutPostRedisplay();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
key(unsigned char k, int x, int y)
|
|
||||||
{
|
|
||||||
(void) x;
|
|
||||||
(void) y;
|
|
||||||
switch (k) {
|
|
||||||
case ' ':
|
|
||||||
case 'a':
|
|
||||||
Anim = !Anim;
|
|
||||||
if (Anim)
|
|
||||||
glutIdleFunc(idle);
|
|
||||||
else
|
|
||||||
glutIdleFunc(NULL);
|
|
||||||
break;
|
|
||||||
case 'z':
|
|
||||||
EyeDist -= 0.5;
|
|
||||||
if (EyeDist < 3.0)
|
|
||||||
EyeDist = 3.0;
|
|
||||||
break;
|
|
||||||
case 'Z':
|
|
||||||
EyeDist += 0.5;
|
|
||||||
if (EyeDist > 90.0)
|
|
||||||
EyeDist = 90;
|
|
||||||
break;
|
|
||||||
case 27:
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
glutPostRedisplay();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
specialkey(int key, int x, int y)
|
|
||||||
{
|
|
||||||
GLfloat step = 2.0;
|
|
||||||
(void) x;
|
|
||||||
(void) y;
|
|
||||||
switch (key) {
|
|
||||||
case GLUT_KEY_UP:
|
|
||||||
Xrot += step;
|
|
||||||
break;
|
|
||||||
case GLUT_KEY_DOWN:
|
|
||||||
Xrot -= step;
|
|
||||||
break;
|
|
||||||
case GLUT_KEY_LEFT:
|
|
||||||
Yrot -= step;
|
|
||||||
break;
|
|
||||||
case GLUT_KEY_RIGHT:
|
|
||||||
Yrot += step;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
glutPostRedisplay();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* new window size or exposure */
|
|
||||||
static void
|
|
||||||
Reshape(int width, int height)
|
|
||||||
{
|
|
||||||
GLfloat ar = (float) width / (float) height;
|
|
||||||
glViewport(0, 0, (GLint)width, (GLint)height);
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
|
||||||
glLoadIdentity();
|
|
||||||
glFrustum(-2.0*ar, 2.0*ar, -2.0, 2.0, 4.0, 100.0);
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
|
||||||
glLoadIdentity();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
InitTextures(void)
|
|
||||||
{
|
|
||||||
const GLint size = MAX_SAMPLERS;
|
|
||||||
GLubyte *texImage;
|
|
||||||
GLenum filter = GL_NEAREST;
|
|
||||||
GLint stripeSize;
|
|
||||||
GLint s;
|
|
||||||
|
|
||||||
texImage = (GLubyte *) malloc(size * size * 4);
|
|
||||||
|
|
||||||
glGenTextures(NumSamplers, Textures);
|
|
||||||
|
|
||||||
/* size of texels stripe */
|
|
||||||
stripeSize = size / NumSamplers;
|
|
||||||
|
|
||||||
/* create a texture for each sampler */
|
|
||||||
for (s = 0; s < NumSamplers; s++) {
|
|
||||||
GLint x, y, ypos;
|
|
||||||
GLubyte intensity = 31 + s * (256-32) / (NumSamplers - 1);
|
|
||||||
|
|
||||||
printf("Texture %d: color = %d, %d, %d\n", s,
|
|
||||||
(int) intensity, 0, (int) intensity );
|
|
||||||
|
|
||||||
/* initialize the texture to black */
|
|
||||||
memset(texImage, 0, size * size * 4);
|
|
||||||
|
|
||||||
/* set a stripe of texels to the intensity value */
|
|
||||||
ypos = s * stripeSize;
|
|
||||||
for (y = 0; y < stripeSize; y++) {
|
|
||||||
for (x = 0; x < size; x++) {
|
|
||||||
GLint k = 4 * ((ypos + y) * size + x);
|
|
||||||
texImage[k + 0] = intensity;
|
|
||||||
texImage[k + 1] = intensity;
|
|
||||||
texImage[k + 2] = 0;
|
|
||||||
texImage[k + 3] = 255;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
glActiveTexture(GL_TEXTURE0 + s);
|
|
||||||
glBindTexture(GL_TEXTURE_2D, Textures[s]);
|
|
||||||
gluBuild2DMipmaps(GL_TEXTURE_2D, 4, size, size,
|
|
||||||
GL_RGBA, GL_UNSIGNED_BYTE, texImage);
|
|
||||||
|
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
|
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
|
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter);
|
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter);
|
|
||||||
}
|
|
||||||
|
|
||||||
free(texImage);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate a fragment shader that uses the given number of samplers.
|
|
||||||
*/
|
|
||||||
static char *
|
|
||||||
GenFragmentShader(GLint numSamplers)
|
|
||||||
{
|
|
||||||
const int maxLen = 10 * 1000;
|
|
||||||
char *prog = (char *) malloc(maxLen);
|
|
||||||
char *p = prog;
|
|
||||||
int s;
|
|
||||||
|
|
||||||
p += sprintf(p, "// Generated fragment shader:\n");
|
|
||||||
for (s = 0; s < numSamplers; s++) {
|
|
||||||
p += sprintf(p, "uniform sampler2D tex%d;\n", s);
|
|
||||||
}
|
|
||||||
p += sprintf(p, "void main()\n");
|
|
||||||
p += sprintf(p, "{\n");
|
|
||||||
p += sprintf(p, " vec4 color = vec4(0.0);\n");
|
|
||||||
for (s = 0; s < numSamplers; s++) {
|
|
||||||
p += sprintf(p, " color += texture2D(tex%d, gl_TexCoord[0].xy);\n", s);
|
|
||||||
}
|
|
||||||
p += sprintf(p, " gl_FragColor = color;\n");
|
|
||||||
p += sprintf(p, "}\n");
|
|
||||||
|
|
||||||
assert(p - prog < maxLen);
|
|
||||||
return prog;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/** Create & bind shader program */
|
|
||||||
static GLuint
|
|
||||||
CreateProgram(void)
|
|
||||||
{
|
|
||||||
GLuint fragShader, vertShader, program;
|
|
||||||
const char *vertShaderText =
|
|
||||||
"void main() \n"
|
|
||||||
"{ \n"
|
|
||||||
" gl_TexCoord[0] = gl_MultiTexCoord0; \n"
|
|
||||||
" gl_Position = ftransform(); \n"
|
|
||||||
"} \n";
|
|
||||||
char *fragShaderText = GenFragmentShader(NumSamplers);
|
|
||||||
|
|
||||||
printf("%s", fragShaderText);
|
|
||||||
|
|
||||||
vertShader = CompileShaderText(GL_VERTEX_SHADER, vertShaderText);
|
|
||||||
fragShader = CompileShaderText(GL_FRAGMENT_SHADER, fragShaderText);
|
|
||||||
assert(vertShader);
|
|
||||||
program = LinkShaders(vertShader, fragShader);
|
|
||||||
|
|
||||||
glUseProgram_func(program);
|
|
||||||
|
|
||||||
free(fragShaderText);
|
|
||||||
|
|
||||||
return program;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
InitProgram(void)
|
|
||||||
{
|
|
||||||
GLint s;
|
|
||||||
|
|
||||||
Program = CreateProgram();
|
|
||||||
|
|
||||||
/* init sampler uniforms */
|
|
||||||
for (s = 0; s < NumSamplers; s++) {
|
|
||||||
char uname[10];
|
|
||||||
GLint loc;
|
|
||||||
|
|
||||||
sprintf(uname, "tex%d", s);
|
|
||||||
loc = glGetUniformLocation_func(Program, uname);
|
|
||||||
assert(loc >= 0);
|
|
||||||
|
|
||||||
glUniform1i_func(loc, s);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
InitGL(void)
|
|
||||||
{
|
|
||||||
if (!ShadersSupported()) {
|
|
||||||
printf("GLSL not supported!\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
printf("GL_RENDERER = %s\n", (const char *) glGetString(GL_RENDERER));
|
|
||||||
|
|
||||||
GetExtensionFuncs();
|
|
||||||
|
|
||||||
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &NumSamplers);
|
|
||||||
if (NumSamplers > MAX_SAMPLERS)
|
|
||||||
NumSamplers = MAX_SAMPLERS;
|
|
||||||
printf("Testing %d samplers\n", NumSamplers);
|
|
||||||
|
|
||||||
InitTextures();
|
|
||||||
InitProgram();
|
|
||||||
|
|
||||||
glClearColor(.6, .6, .9, 0);
|
|
||||||
glColor3f(1.0, 1.0, 1.0);
|
|
||||||
|
|
||||||
printf("Each color corresponds to a separate sampler/texture.\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
glutInit(&argc, argv);
|
|
||||||
glutInitWindowSize(500, 400);
|
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
|
|
||||||
glutCreateWindow(Demo);
|
|
||||||
glutReshapeFunc(Reshape);
|
|
||||||
glutKeyboardFunc(key);
|
|
||||||
glutSpecialFunc(specialkey);
|
|
||||||
glutDisplayFunc(draw);
|
|
||||||
if (Anim)
|
|
||||||
glutIdleFunc(idle);
|
|
||||||
InitGL();
|
|
||||||
glutMainLoop();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1,280 +0,0 @@
|
|||||||
/**
|
|
||||||
* Vertex "skinning" example.
|
|
||||||
* The idea is there are multiple modeling matrices applied to every
|
|
||||||
* vertex. Weighting values in [0,1] control the influence of each
|
|
||||||
* matrix on each vertex.
|
|
||||||
*
|
|
||||||
* 4 Nov 2008
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <math.h>
|
|
||||||
#include <GL/gl.h>
|
|
||||||
#include <GL/glut.h>
|
|
||||||
#include <GL/glext.h>
|
|
||||||
#include "extfuncs.h"
|
|
||||||
#include "shaderutil.h"
|
|
||||||
|
|
||||||
|
|
||||||
static char *FragProgFile = "skinning.frag";
|
|
||||||
static char *VertProgFile = "skinning.vert";
|
|
||||||
|
|
||||||
/* program/shader objects */
|
|
||||||
static GLuint fragShader;
|
|
||||||
static GLuint vertShader;
|
|
||||||
static GLuint program;
|
|
||||||
|
|
||||||
|
|
||||||
static GLint win = 0;
|
|
||||||
static GLboolean Anim = GL_TRUE;
|
|
||||||
static GLboolean WireFrame = GL_TRUE;
|
|
||||||
static GLfloat xRot = 0.0f, yRot = 90.0f, zRot = 0.0f;
|
|
||||||
|
|
||||||
#define NUM_MATS 2
|
|
||||||
|
|
||||||
static GLfloat Matrices[NUM_MATS][16];
|
|
||||||
static GLint uMat0, uMat1;
|
|
||||||
static GLint WeightAttr;
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
Idle(void)
|
|
||||||
{
|
|
||||||
yRot = 90 + glutGet(GLUT_ELAPSED_TIME) * 0.005;
|
|
||||||
glutPostRedisplay();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
Cylinder(GLfloat length, GLfloat radius, GLint slices, GLint stacks)
|
|
||||||
{
|
|
||||||
float dw = 1.0 / (stacks - 1);
|
|
||||||
float dz = length / stacks;
|
|
||||||
int i, j;
|
|
||||||
|
|
||||||
for (j = 0; j < stacks; j++) {
|
|
||||||
float w0 = j * dw;
|
|
||||||
float z0 = j * dz;
|
|
||||||
|
|
||||||
glBegin(GL_TRIANGLE_STRIP);
|
|
||||||
for (i = 0; i < slices; i++) {
|
|
||||||
float a = (float) i / (slices - 1) * M_PI * 2.0;
|
|
||||||
float x = radius * cos(a);
|
|
||||||
float y = radius * sin(a);
|
|
||||||
glVertexAttrib1f_func(WeightAttr, w0);
|
|
||||||
glNormal3f(x, y, 0.0);
|
|
||||||
glVertex3f(x, y, z0);
|
|
||||||
|
|
||||||
glVertexAttrib1f_func(WeightAttr, w0 + dw);
|
|
||||||
glNormal3f(x, y, 0.0);
|
|
||||||
glVertex3f(x, y, z0 + dz);
|
|
||||||
}
|
|
||||||
glEnd();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update/animate the two matrices. One rotates, the other scales.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
UpdateMatrices(void)
|
|
||||||
{
|
|
||||||
GLfloat t = glutGet(GLUT_ELAPSED_TIME) * 0.0025;
|
|
||||||
GLfloat scale = 0.5 * (1.1 + sin(0.5 * t));
|
|
||||||
GLfloat rot = cos(t) * 90.0;
|
|
||||||
|
|
||||||
glPushMatrix();
|
|
||||||
glLoadIdentity();
|
|
||||||
glScalef(1.0, scale, 1.0);
|
|
||||||
glGetFloatv(GL_MODELVIEW_MATRIX, Matrices[0]);
|
|
||||||
glPopMatrix();
|
|
||||||
|
|
||||||
glPushMatrix();
|
|
||||||
glLoadIdentity();
|
|
||||||
glRotatef(rot, 0, 0, 1);
|
|
||||||
glGetFloatv(GL_MODELVIEW_MATRIX, Matrices[1]);
|
|
||||||
glPopMatrix();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
Redisplay(void)
|
|
||||||
{
|
|
||||||
UpdateMatrices();
|
|
||||||
|
|
||||||
glUniformMatrix4fv_func(uMat0, 1, GL_FALSE, Matrices[0]);
|
|
||||||
glUniformMatrix4fv_func(uMat1, 1, GL_FALSE, Matrices[1]);
|
|
||||||
|
|
||||||
if (WireFrame)
|
|
||||||
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
|
|
||||||
else
|
|
||||||
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
|
||||||
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
|
||||||
|
|
||||||
glPushMatrix();
|
|
||||||
glRotatef(xRot, 1.0f, 0.0f, 0.0f);
|
|
||||||
glRotatef(yRot, 0.0f, 1.0f, 0.0f);
|
|
||||||
glRotatef(zRot, 0.0f, 0.0f, 1.0f);
|
|
||||||
|
|
||||||
glPushMatrix();
|
|
||||||
glTranslatef(0, 0, -2.5);
|
|
||||||
Cylinder(5.0, 1.0, 10, 20);
|
|
||||||
glPopMatrix();
|
|
||||||
|
|
||||||
glPopMatrix();
|
|
||||||
|
|
||||||
glutSwapBuffers();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
Reshape(int width, int height)
|
|
||||||
{
|
|
||||||
glViewport(0, 0, width, height);
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
|
||||||
glLoadIdentity();
|
|
||||||
glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 25.0);
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
|
||||||
glLoadIdentity();
|
|
||||||
glTranslatef(0.0f, 0.0f, -15.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
CleanUp(void)
|
|
||||||
{
|
|
||||||
glDeleteShader_func(fragShader);
|
|
||||||
glDeleteShader_func(vertShader);
|
|
||||||
glDeleteProgram_func(program);
|
|
||||||
glutDestroyWindow(win);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
Key(unsigned char key, int x, int y)
|
|
||||||
{
|
|
||||||
const GLfloat step = 2.0;
|
|
||||||
(void) x;
|
|
||||||
(void) y;
|
|
||||||
|
|
||||||
switch(key) {
|
|
||||||
case 'a':
|
|
||||||
Anim = !Anim;
|
|
||||||
if (Anim)
|
|
||||||
glutIdleFunc(Idle);
|
|
||||||
else
|
|
||||||
glutIdleFunc(NULL);
|
|
||||||
break;
|
|
||||||
case 'w':
|
|
||||||
WireFrame = !WireFrame;
|
|
||||||
break;
|
|
||||||
case 'z':
|
|
||||||
zRot += step;
|
|
||||||
break;
|
|
||||||
case 'Z':
|
|
||||||
zRot -= step;
|
|
||||||
break;
|
|
||||||
case 27:
|
|
||||||
CleanUp();
|
|
||||||
exit(0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
glutPostRedisplay();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
SpecialKey(int key, int x, int y)
|
|
||||||
{
|
|
||||||
const GLfloat step = 2.0;
|
|
||||||
|
|
||||||
(void) x;
|
|
||||||
(void) y;
|
|
||||||
|
|
||||||
switch(key) {
|
|
||||||
case GLUT_KEY_UP:
|
|
||||||
xRot += step;
|
|
||||||
break;
|
|
||||||
case GLUT_KEY_DOWN:
|
|
||||||
xRot -= step;
|
|
||||||
break;
|
|
||||||
case GLUT_KEY_LEFT:
|
|
||||||
yRot -= step;
|
|
||||||
break;
|
|
||||||
case GLUT_KEY_RIGHT:
|
|
||||||
yRot += step;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
glutPostRedisplay();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
Init(void)
|
|
||||||
{
|
|
||||||
if (!ShadersSupported())
|
|
||||||
exit(1);
|
|
||||||
|
|
||||||
GetExtensionFuncs();
|
|
||||||
|
|
||||||
vertShader = CompileShaderFile(GL_VERTEX_SHADER, VertProgFile);
|
|
||||||
fragShader = CompileShaderFile(GL_FRAGMENT_SHADER, FragProgFile);
|
|
||||||
program = LinkShaders(vertShader, fragShader);
|
|
||||||
|
|
||||||
glUseProgram_func(program);
|
|
||||||
|
|
||||||
uMat0 = glGetUniformLocation_func(program, "mat0");
|
|
||||||
uMat1 = glGetUniformLocation_func(program, "mat1");
|
|
||||||
|
|
||||||
WeightAttr = glGetAttribLocation_func(program, "weight");
|
|
||||||
|
|
||||||
assert(glGetError() == 0);
|
|
||||||
|
|
||||||
glClearColor(0.4f, 0.4f, 0.8f, 0.0f);
|
|
||||||
|
|
||||||
glEnable(GL_DEPTH_TEST);
|
|
||||||
|
|
||||||
glColor3f(1, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
ParseOptions(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for (i = 1; i < argc; i++) {
|
|
||||||
if (strcmp(argv[i], "-fs") == 0) {
|
|
||||||
FragProgFile = argv[i+1];
|
|
||||||
}
|
|
||||||
else if (strcmp(argv[i], "-vs") == 0) {
|
|
||||||
VertProgFile = argv[i+1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
glutInit(&argc, argv);
|
|
||||||
glutInitWindowSize(500, 500);
|
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
|
||||||
win = glutCreateWindow(argv[0]);
|
|
||||||
glutReshapeFunc(Reshape);
|
|
||||||
glutKeyboardFunc(Key);
|
|
||||||
glutSpecialFunc(SpecialKey);
|
|
||||||
glutDisplayFunc(Redisplay);
|
|
||||||
ParseOptions(argc, argv);
|
|
||||||
Init();
|
|
||||||
if (Anim)
|
|
||||||
glutIdleFunc(Idle);
|
|
||||||
glutMainLoop();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
// color pass-through
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
gl_FragColor = gl_Color;
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
// Vertex weighting/blendin shader
|
|
||||||
// Brian Paul
|
|
||||||
// 4 Nov 2008
|
|
||||||
|
|
||||||
uniform mat4 mat0, mat1;
|
|
||||||
attribute float weight;
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
// simple diffuse shading
|
|
||||||
// Note that we should really transform the normal vector along with
|
|
||||||
// the postion below... someday.
|
|
||||||
vec3 lightVec = vec3(0, 0, 1);
|
|
||||||
vec3 norm = gl_NormalMatrix * gl_Normal;
|
|
||||||
float dot = 0.2 + max(0.0, dot(norm, lightVec));
|
|
||||||
gl_FrontColor = vec4(dot);
|
|
||||||
|
|
||||||
// compute sum of weighted transformations
|
|
||||||
vec4 pos0 = mat0 * gl_Vertex;
|
|
||||||
vec4 pos1 = mat1 * gl_Vertex;
|
|
||||||
vec4 pos = mix(pos0, pos1, weight);
|
|
||||||
|
|
||||||
gl_Position = gl_ModelViewProjectionMatrix * pos;
|
|
||||||
}
|
|
||||||
@@ -79,6 +79,8 @@ Redisplay(void)
|
|||||||
|
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
|
|
||||||
|
glFinish();
|
||||||
|
glFlush();
|
||||||
glutSwapBuffers();
|
glutSwapBuffers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,39 +26,27 @@ static GLuint fragShader;
|
|||||||
static GLuint vertShader;
|
static GLuint vertShader;
|
||||||
static GLuint program;
|
static GLuint program;
|
||||||
static GLint win = 0;
|
static GLint win = 0;
|
||||||
static GLboolean anim;
|
static GLboolean anim = 0*GL_TRUE;
|
||||||
static GLboolean DetermineFacingInFragProg;
|
static GLboolean DetermineInFragProg = GL_TRUE;
|
||||||
static GLfloat Xrot;
|
static GLfloat Xrot = 30.0f;
|
||||||
static GLint u_fragface;
|
static GLint u_fragface;
|
||||||
static GLenum FrontWinding;
|
static GLenum FrontWinding = GL_CCW;
|
||||||
static int prevTime = 0;
|
static int prevTime = 0;
|
||||||
|
|
||||||
|
|
||||||
static const GLfloat Red[4] = {1, 0, 0, 1};
|
static const GLfloat Red[4] = {1, 0, 0, 0};
|
||||||
static const GLfloat Green[4] = {0, 1, 0, 0};
|
static const GLfloat Green[4] = {0, 1, 0, 0};
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
SetDefaults(void)
|
|
||||||
{
|
|
||||||
DetermineFacingInFragProg = GL_TRUE;
|
|
||||||
FrontWinding = GL_CCW;
|
|
||||||
Xrot = 30;
|
|
||||||
anim = 0;
|
|
||||||
glutIdleFunc(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
Redisplay(void)
|
Redisplay(void)
|
||||||
{
|
{
|
||||||
const int sections = 20;
|
|
||||||
int i;
|
int i;
|
||||||
float radius = 2;
|
float radius = 2;
|
||||||
|
|
||||||
glFrontFace(FrontWinding);
|
glFrontFace(FrontWinding);
|
||||||
|
|
||||||
if (DetermineFacingInFragProg) {
|
if (DetermineInFragProg) {
|
||||||
glUniform1i_func(u_fragface, 1);
|
glUniform1i_func(u_fragface, 1);
|
||||||
glDisable(GL_VERTEX_PROGRAM_TWO_SIDE);
|
glDisable(GL_VERTEX_PROGRAM_TWO_SIDE);
|
||||||
}
|
}
|
||||||
@@ -76,8 +64,8 @@ Redisplay(void)
|
|||||||
glBegin(GL_TRIANGLE_STRIP);
|
glBegin(GL_TRIANGLE_STRIP);
|
||||||
glColor4fv(Red);
|
glColor4fv(Red);
|
||||||
glSecondaryColor3fv_func(Green);
|
glSecondaryColor3fv_func(Green);
|
||||||
for (i = 0; i <= sections; i++) {
|
for (i = 0; i < 20; i++) {
|
||||||
float a = (float) i / (sections) * M_PI * 2.0;
|
float a = i / 19.0 * M_PI * 2.0;
|
||||||
float x = radius * cos(a);
|
float x = radius * cos(a);
|
||||||
float y = radius * sin(a);
|
float y = radius * sin(a);
|
||||||
glVertex3f(x, -1, y);
|
glVertex3f(x, -1, y);
|
||||||
@@ -151,15 +139,17 @@ Key(unsigned char key, int x, int y)
|
|||||||
break;
|
break;
|
||||||
case 'f':
|
case 'f':
|
||||||
printf("Using frag shader gl_FrontFacing\n");
|
printf("Using frag shader gl_FrontFacing\n");
|
||||||
DetermineFacingInFragProg = GL_TRUE;
|
DetermineInFragProg = GL_TRUE;
|
||||||
break;
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
printf("Using vert shader Two-sided lighting\n");
|
printf("Using vert shader Two-sided lighting\n");
|
||||||
DetermineFacingInFragProg = GL_FALSE;
|
DetermineInFragProg = GL_FALSE;
|
||||||
break;
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
/* reset */
|
/* reset */
|
||||||
SetDefaults();
|
Xrot = 30;
|
||||||
|
anim = 0;
|
||||||
|
glutIdleFunc(NULL);
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
Xrot += 5;
|
Xrot += 5;
|
||||||
@@ -192,16 +182,14 @@ Init(void)
|
|||||||
static const char *fragShaderText =
|
static const char *fragShaderText =
|
||||||
"uniform bool fragface; \n"
|
"uniform bool fragface; \n"
|
||||||
"void main() { \n"
|
"void main() { \n"
|
||||||
#if 1
|
#if 0
|
||||||
" if (!fragface || gl_FrontFacing) { \n"
|
" if (!fragface || gl_FrontFacing) { \n"
|
||||||
" gl_FragColor = gl_Color; \n"
|
" gl_FragColor = gl_Color; \n"
|
||||||
" } \n"
|
" } \n"
|
||||||
" else { \n"
|
" else { \n"
|
||||||
" // note: dim green to help debug \n"
|
|
||||||
" gl_FragColor = 0.8 * gl_SecondaryColor; \n"
|
" gl_FragColor = 0.8 * gl_SecondaryColor; \n"
|
||||||
" } \n"
|
" } \n"
|
||||||
#else
|
#else
|
||||||
/* DEBUG CODE */
|
|
||||||
" bool f = gl_FrontFacing; \n"
|
" bool f = gl_FrontFacing; \n"
|
||||||
" if (f) { \n"
|
" if (f) { \n"
|
||||||
" gl_FragColor = vec4(1.0, 0.0, 0.0, 0.0); \n"
|
" gl_FragColor = vec4(1.0, 0.0, 0.0, 0.0); \n"
|
||||||
@@ -209,6 +197,8 @@ Init(void)
|
|||||||
" else { \n"
|
" else { \n"
|
||||||
" gl_FragColor = vec4(0.0, 1.0, 0.0, 0.0); \n"
|
" gl_FragColor = vec4(0.0, 1.0, 0.0, 0.0); \n"
|
||||||
" } \n"
|
" } \n"
|
||||||
|
" //float g = float(gl_FrontFacing) * 0.5 + 0.5; \n"
|
||||||
|
" //gl_FragColor = vec4(g); \n"
|
||||||
#endif
|
#endif
|
||||||
"} \n";
|
"} \n";
|
||||||
static const char *vertShaderText =
|
static const char *vertShaderText =
|
||||||
@@ -251,8 +241,6 @@ Init(void)
|
|||||||
assert(glIsShader_func(vertShader));
|
assert(glIsShader_func(vertShader));
|
||||||
|
|
||||||
glEnable(GL_DEPTH_TEST);
|
glEnable(GL_DEPTH_TEST);
|
||||||
|
|
||||||
SetDefaults();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,191 +0,0 @@
|
|||||||
/**
|
|
||||||
* Draw two quads, one using only a vertex shader, the other only with a
|
|
||||||
* fragment shader. They should appear the same.
|
|
||||||
* 17 Dec 2008
|
|
||||||
* Brian Paul
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <math.h>
|
|
||||||
#include <GL/gl.h>
|
|
||||||
#include <GL/glut.h>
|
|
||||||
#include <GL/glext.h>
|
|
||||||
#include "extfuncs.h"
|
|
||||||
#include "shaderutil.h"
|
|
||||||
|
|
||||||
|
|
||||||
static char *FragProgFile = NULL;
|
|
||||||
static char *VertProgFile = NULL;
|
|
||||||
static GLuint FragShader;
|
|
||||||
static GLuint VertShader;
|
|
||||||
static GLuint VertProgram; /* w/out vertex shader */
|
|
||||||
static GLuint FragProgram; /* w/out fragment shader */
|
|
||||||
static GLint Win = 0;
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
DrawQuadColor(void)
|
|
||||||
{
|
|
||||||
glBegin(GL_QUADS);
|
|
||||||
glColor3f(1, 0, 0); glVertex2f(-1, -1);
|
|
||||||
glColor3f(0, 1, 0); glVertex2f( 1, -1);
|
|
||||||
glColor3f(0, 0, 1); glVertex2f( 1, 1);
|
|
||||||
glColor3f(1, 0, 1); glVertex2f(-1, 1);
|
|
||||||
glEnd();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/** as above, but specify color via texcoords */
|
|
||||||
static void
|
|
||||||
DrawQuadTex(void)
|
|
||||||
{
|
|
||||||
glBegin(GL_QUADS);
|
|
||||||
glTexCoord3f(1, 0, 0); glVertex2f(-1, -1);
|
|
||||||
glTexCoord3f(0, 1, 0); glVertex2f( 1, -1);
|
|
||||||
glTexCoord3f(0, 0, 1); glVertex2f( 1, 1);
|
|
||||||
glTexCoord3f(1, 0, 1); glVertex2f(-1, 1);
|
|
||||||
glEnd();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
Redisplay(void)
|
|
||||||
{
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
|
||||||
|
|
||||||
/* render with vertex shader only */
|
|
||||||
glUseProgram_func(VertProgram);
|
|
||||||
glPushMatrix();
|
|
||||||
glTranslatef(-1.5, 0, 0);
|
|
||||||
DrawQuadTex();
|
|
||||||
glPopMatrix();
|
|
||||||
|
|
||||||
/* render with fragment shader only */
|
|
||||||
glUseProgram_func(FragProgram);
|
|
||||||
glPushMatrix();
|
|
||||||
glTranslatef(+1.5, 0, 0);
|
|
||||||
DrawQuadColor();
|
|
||||||
glPopMatrix();
|
|
||||||
|
|
||||||
glutSwapBuffers();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
Reshape(int width, int height)
|
|
||||||
{
|
|
||||||
glViewport(0, 0, width, height);
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
|
||||||
glLoadIdentity();
|
|
||||||
glOrtho(-4, 4, -2, 2, -1, 1);
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
|
||||||
glLoadIdentity();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
CleanUp(void)
|
|
||||||
{
|
|
||||||
glDeleteShader_func(FragShader);
|
|
||||||
glDeleteShader_func(VertShader);
|
|
||||||
glDeleteProgram_func(VertProgram);
|
|
||||||
glDeleteProgram_func(FragProgram);
|
|
||||||
glutDestroyWindow(Win);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
Key(unsigned char key, int x, int y)
|
|
||||||
{
|
|
||||||
(void) x;
|
|
||||||
(void) y;
|
|
||||||
switch(key) {
|
|
||||||
case 27:
|
|
||||||
CleanUp();
|
|
||||||
exit(0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
glutPostRedisplay();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
Init(void)
|
|
||||||
{
|
|
||||||
static const char *fragShaderText =
|
|
||||||
"void main() {\n"
|
|
||||||
" gl_FragColor = gl_Color;\n"
|
|
||||||
"}\n";
|
|
||||||
static const char *vertShaderText =
|
|
||||||
"void main() {\n"
|
|
||||||
" gl_Position = ftransform();\n"
|
|
||||||
" gl_FrontColor = gl_MultiTexCoord0;\n" /* see DrawQuadTex() */
|
|
||||||
"}\n";
|
|
||||||
|
|
||||||
if (!ShadersSupported())
|
|
||||||
exit(1);
|
|
||||||
|
|
||||||
GetExtensionFuncs();
|
|
||||||
|
|
||||||
if (FragProgFile)
|
|
||||||
FragShader = CompileShaderFile(GL_FRAGMENT_SHADER, FragProgFile);
|
|
||||||
else
|
|
||||||
FragShader = CompileShaderText(GL_FRAGMENT_SHADER, fragShaderText);
|
|
||||||
|
|
||||||
if (VertProgFile)
|
|
||||||
VertShader = CompileShaderFile(GL_VERTEX_SHADER, VertProgFile);
|
|
||||||
else
|
|
||||||
VertShader = CompileShaderText(GL_VERTEX_SHADER, vertShaderText);
|
|
||||||
|
|
||||||
VertProgram = LinkShaders(VertShader, 0);
|
|
||||||
FragProgram = LinkShaders(0, FragShader);
|
|
||||||
|
|
||||||
glClearColor(0.3f, 0.3f, 0.3f, 0.0f);
|
|
||||||
glEnable(GL_DEPTH_TEST);
|
|
||||||
|
|
||||||
printf("GL_RENDERER = %s\n",(const char *) glGetString(GL_RENDERER));
|
|
||||||
|
|
||||||
assert(glIsProgram_func(VertProgram));
|
|
||||||
assert(glIsProgram_func(FragProgram));
|
|
||||||
assert(glIsShader_func(FragShader));
|
|
||||||
assert(glIsShader_func(VertShader));
|
|
||||||
|
|
||||||
glColor3f(1, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
ParseOptions(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for (i = 1; i < argc; i++) {
|
|
||||||
if (strcmp(argv[i], "-fs") == 0) {
|
|
||||||
FragProgFile = argv[i+1];
|
|
||||||
}
|
|
||||||
else if (strcmp(argv[i], "-vs") == 0) {
|
|
||||||
VertProgFile = argv[i+1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
glutInit(&argc, argv);
|
|
||||||
glutInitWindowPosition( 0, 0);
|
|
||||||
glutInitWindowSize(400, 200);
|
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
|
||||||
Win = glutCreateWindow(argv[0]);
|
|
||||||
glutReshapeFunc(Reshape);
|
|
||||||
glutKeyboardFunc(Key);
|
|
||||||
glutDisplayFunc(Redisplay);
|
|
||||||
ParseOptions(argc, argv);
|
|
||||||
Init();
|
|
||||||
glutMainLoop();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1,279 +0,0 @@
|
|||||||
/**
|
|
||||||
* Vertex shader texture sampling test.
|
|
||||||
* Brian Paul
|
|
||||||
* 2 Dec 2008
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <math.h>
|
|
||||||
#include <GL/gl.h>
|
|
||||||
#include <GL/glut.h>
|
|
||||||
#include <GL/glext.h>
|
|
||||||
#include "extfuncs.h"
|
|
||||||
#include "shaderutil.h"
|
|
||||||
|
|
||||||
|
|
||||||
static const char *VertShaderText =
|
|
||||||
"uniform sampler2D tex1; \n"
|
|
||||||
"void main() \n"
|
|
||||||
"{ \n"
|
|
||||||
" vec4 pos = gl_Vertex; \n"
|
|
||||||
" pos.z = texture2D(tex1, gl_MultiTexCoord0.xy).x - 0.5; \n"
|
|
||||||
" gl_Position = gl_ModelViewProjectionMatrix * pos; \n"
|
|
||||||
" gl_FrontColor = pos; \n"
|
|
||||||
"} \n";
|
|
||||||
|
|
||||||
static const char *FragShaderText =
|
|
||||||
"void main() \n"
|
|
||||||
"{ \n"
|
|
||||||
" gl_FragColor = gl_Color; \n"
|
|
||||||
"} \n";
|
|
||||||
|
|
||||||
|
|
||||||
static GLuint fragShader;
|
|
||||||
static GLuint vertShader;
|
|
||||||
static GLuint program;
|
|
||||||
|
|
||||||
static GLint win = 0;
|
|
||||||
static GLboolean Anim = GL_TRUE;
|
|
||||||
static GLboolean WireFrame = GL_TRUE;
|
|
||||||
static GLfloat xRot = -70.0f, yRot = 0.0f, zRot = 0.0f;
|
|
||||||
|
|
||||||
|
|
||||||
/* value[0] = tex unit */
|
|
||||||
static struct uniform_info Uniforms[] = {
|
|
||||||
{ "tex1", 1, GL_INT, { 0, 0, 0, 0 }, -1 },
|
|
||||||
END_OF_UNIFORMS
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
Idle(void)
|
|
||||||
{
|
|
||||||
zRot = 90 + glutGet(GLUT_ELAPSED_TIME) * 0.05;
|
|
||||||
glutPostRedisplay();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
DrawMesh(void)
|
|
||||||
{
|
|
||||||
GLfloat xmin = -2.0, xmax = 2.0;
|
|
||||||
GLfloat ymin = -2.0, ymax = 2.0;
|
|
||||||
GLuint xdivs = 20, ydivs = 20;
|
|
||||||
GLfloat dx = (xmax - xmin) / xdivs;
|
|
||||||
GLfloat dy = (ymax - ymin) / ydivs;
|
|
||||||
GLfloat ds = 1.0 / xdivs, dt = 1.0 / ydivs;
|
|
||||||
GLfloat x, y, s, t;
|
|
||||||
GLuint i, j;
|
|
||||||
|
|
||||||
y = ymin;
|
|
||||||
t = 0.0;
|
|
||||||
for (i = 0; i < ydivs; i++) {
|
|
||||||
x = xmin;
|
|
||||||
s = 0.0;
|
|
||||||
glBegin(GL_QUAD_STRIP);
|
|
||||||
for (j = 0; j < xdivs; j++) {
|
|
||||||
glTexCoord2f(s, t);
|
|
||||||
glVertex2f(x, y);
|
|
||||||
glTexCoord2f(s, t + dt);
|
|
||||||
glVertex2f(x, y + dy);
|
|
||||||
x += dx;
|
|
||||||
s += ds;
|
|
||||||
}
|
|
||||||
glEnd();
|
|
||||||
y += dy;
|
|
||||||
t += dt;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
Redisplay(void)
|
|
||||||
{
|
|
||||||
if (WireFrame)
|
|
||||||
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
|
|
||||||
else
|
|
||||||
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
|
||||||
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
|
||||||
|
|
||||||
glPushMatrix();
|
|
||||||
glRotatef(xRot, 1.0f, 0.0f, 0.0f);
|
|
||||||
glRotatef(yRot, 0.0f, 1.0f, 0.0f);
|
|
||||||
glRotatef(zRot, 0.0f, 0.0f, 1.0f);
|
|
||||||
|
|
||||||
glPushMatrix();
|
|
||||||
DrawMesh();
|
|
||||||
glPopMatrix();
|
|
||||||
|
|
||||||
glPopMatrix();
|
|
||||||
|
|
||||||
glutSwapBuffers();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
Reshape(int width, int height)
|
|
||||||
{
|
|
||||||
glViewport(0, 0, width, height);
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
|
||||||
glLoadIdentity();
|
|
||||||
glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 25.0);
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
|
||||||
glLoadIdentity();
|
|
||||||
glTranslatef(0.0f, 0.0f, -15.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
CleanUp(void)
|
|
||||||
{
|
|
||||||
glDeleteShader_func(fragShader);
|
|
||||||
glDeleteShader_func(vertShader);
|
|
||||||
glDeleteProgram_func(program);
|
|
||||||
glutDestroyWindow(win);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
Key(unsigned char key, int x, int y)
|
|
||||||
{
|
|
||||||
const GLfloat step = 2.0;
|
|
||||||
(void) x;
|
|
||||||
(void) y;
|
|
||||||
|
|
||||||
switch(key) {
|
|
||||||
case 'a':
|
|
||||||
Anim = !Anim;
|
|
||||||
if (Anim)
|
|
||||||
glutIdleFunc(Idle);
|
|
||||||
else
|
|
||||||
glutIdleFunc(NULL);
|
|
||||||
break;
|
|
||||||
case 'w':
|
|
||||||
WireFrame = !WireFrame;
|
|
||||||
break;
|
|
||||||
case 'z':
|
|
||||||
zRot += step;
|
|
||||||
break;
|
|
||||||
case 'Z':
|
|
||||||
zRot -= step;
|
|
||||||
break;
|
|
||||||
case 27:
|
|
||||||
CleanUp();
|
|
||||||
exit(0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
glutPostRedisplay();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
SpecialKey(int key, int x, int y)
|
|
||||||
{
|
|
||||||
const GLfloat step = 2.0;
|
|
||||||
|
|
||||||
(void) x;
|
|
||||||
(void) y;
|
|
||||||
|
|
||||||
switch(key) {
|
|
||||||
case GLUT_KEY_UP:
|
|
||||||
xRot += step;
|
|
||||||
break;
|
|
||||||
case GLUT_KEY_DOWN:
|
|
||||||
xRot -= step;
|
|
||||||
break;
|
|
||||||
case GLUT_KEY_LEFT:
|
|
||||||
yRot -= step;
|
|
||||||
break;
|
|
||||||
case GLUT_KEY_RIGHT:
|
|
||||||
yRot += step;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
glutPostRedisplay();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
MakeTexture(void)
|
|
||||||
{
|
|
||||||
const GLuint texWidth = 64, texHeight = 64;
|
|
||||||
GLfloat texImage[64][64];
|
|
||||||
GLuint i, j;
|
|
||||||
|
|
||||||
/* texture is basically z = f(x, y) */
|
|
||||||
for (i = 0; i < texHeight; i++) {
|
|
||||||
GLfloat y = 2.0 * (i / (float) (texHeight - 1)) - 1.0;
|
|
||||||
for (j = 0; j < texWidth; j++) {
|
|
||||||
GLfloat x = 2.0 * (j / (float) (texWidth - 1)) - 1.0;
|
|
||||||
GLfloat z = 0.5 + 0.5 * (sin(4.0 * x) * sin(4.0 * y));
|
|
||||||
texImage[i][j] = z;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
glActiveTexture(GL_TEXTURE0);
|
|
||||||
glBindTexture(GL_TEXTURE_2D, 42);
|
|
||||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_INTENSITY, texWidth, texHeight, 0,
|
|
||||||
GL_LUMINANCE, GL_FLOAT, texImage);
|
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
Init(void)
|
|
||||||
{
|
|
||||||
GLint m;
|
|
||||||
|
|
||||||
glGetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB, &m);
|
|
||||||
if (m < 1) {
|
|
||||||
printf("Error: no vertex shader texture units supported.\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!ShadersSupported())
|
|
||||||
exit(1);
|
|
||||||
|
|
||||||
GetExtensionFuncs();
|
|
||||||
|
|
||||||
vertShader = CompileShaderText(GL_VERTEX_SHADER, VertShaderText);
|
|
||||||
fragShader = CompileShaderText(GL_FRAGMENT_SHADER, FragShaderText);
|
|
||||||
program = LinkShaders(vertShader, fragShader);
|
|
||||||
|
|
||||||
glUseProgram_func(program);
|
|
||||||
|
|
||||||
assert(glGetError() == 0);
|
|
||||||
|
|
||||||
MakeTexture();
|
|
||||||
|
|
||||||
glClearColor(0.4f, 0.4f, 0.8f, 0.0f);
|
|
||||||
|
|
||||||
glEnable(GL_DEPTH_TEST);
|
|
||||||
|
|
||||||
glColor3f(1, 1, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
glutInit(&argc, argv);
|
|
||||||
glutInitWindowSize(500, 500);
|
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
|
||||||
win = glutCreateWindow(argv[0]);
|
|
||||||
glutReshapeFunc(Reshape);
|
|
||||||
glutKeyboardFunc(Key);
|
|
||||||
glutSpecialFunc(SpecialKey);
|
|
||||||
glutDisplayFunc(Redisplay);
|
|
||||||
Init();
|
|
||||||
if (Anim)
|
|
||||||
glutIdleFunc(Idle);
|
|
||||||
glutMainLoop();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/* $Id: glfbdevtest.c,v 1.1 2003/08/06 17:47:15 keithw Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Test the GLFBDev interface. Only tested with radeonfb driver!!!!
|
* Test the GLFBDev interface. Only tested with radeonfb driver!!!!
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user