Merge branch 'master' into opengl-es-v2
Conflicts: src/mesa/main/dd.h
This commit is contained in:
commit
562c127693
|
@ -4,6 +4,7 @@
|
|||
*.ilk
|
||||
*.o
|
||||
*.obj
|
||||
*.os
|
||||
*.pc
|
||||
*.pdb
|
||||
*.pyc
|
||||
|
|
16
Makefile
16
Makefile
|
@ -105,6 +105,7 @@ irix6-n32-static \
|
|||
irix6-o32 \
|
||||
irix6-o32-static \
|
||||
linux \
|
||||
linux-i965 \
|
||||
linux-alpha \
|
||||
linux-alpha-static \
|
||||
linux-cell \
|
||||
|
@ -183,7 +184,7 @@ ultrix-gcc:
|
|||
|
||||
# Rules for making release tarballs
|
||||
|
||||
VERSION=7.7-devel
|
||||
VERSION=7.7
|
||||
DIRECTORY = Mesa-$(VERSION)
|
||||
LIB_NAME = MesaLib-$(VERSION)
|
||||
DEMO_NAME = MesaDemos-$(VERSION)
|
||||
|
@ -226,6 +227,11 @@ MAIN_FILES = \
|
|||
$(DIRECTORY)/include/GL/vms_x_fix.h \
|
||||
$(DIRECTORY)/include/GL/wglext.h \
|
||||
$(DIRECTORY)/include/GL/wmesa.h \
|
||||
$(DIRECTORY)/src/glsl/Makefile \
|
||||
$(DIRECTORY)/src/glsl/Makefile.template \
|
||||
$(DIRECTORY)/src/glsl/*/Makefile \
|
||||
$(DIRECTORY)/src/glsl/*/SConscript \
|
||||
$(DIRECTORY)/src/glsl/*/*.[ch] \
|
||||
$(DIRECTORY)/src/Makefile \
|
||||
$(DIRECTORY)/src/mesa/Makefile* \
|
||||
$(DIRECTORY)/src/mesa/sources.mak \
|
||||
|
@ -241,7 +247,6 @@ MAIN_FILES = \
|
|||
$(DIRECTORY)/src/mesa/shader/*.[chly] \
|
||||
$(DIRECTORY)/src/mesa/shader/Makefile \
|
||||
$(DIRECTORY)/src/mesa/shader/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/shader/grammar/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/shader/slang/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/shader/slang/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/shader/slang/library/*.[ch] \
|
||||
|
@ -455,8 +460,7 @@ DEMO_FILES = \
|
|||
$(DIRECTORY)/progs/windml/Makefile.ugl \
|
||||
$(DIRECTORY)/progs/windml/*.c \
|
||||
$(DIRECTORY)/progs/windml/*.bmp \
|
||||
$(DIRECTORY)/progs/ggi/*.c \
|
||||
$(DIRECTORY)/windows/VC7/progs/progs.sln
|
||||
$(DIRECTORY)/progs/ggi/*.c
|
||||
|
||||
GLUT_FILES = \
|
||||
$(DIRECTORY)/include/GL/glut.h \
|
||||
|
@ -479,9 +483,7 @@ GLUT_FILES = \
|
|||
$(DIRECTORY)/src/glut/mini/glut.pc.in \
|
||||
$(DIRECTORY)/src/glut/directfb/Makefile \
|
||||
$(DIRECTORY)/src/glut/directfb/NOTES \
|
||||
$(DIRECTORY)/src/glut/directfb/*[ch] \
|
||||
$(DIRECTORY)/windows/VC6/progs/glut/glut.dsp \
|
||||
$(DIRECTORY)/windows/VC7/progs/glut/glut.vcproj
|
||||
$(DIRECTORY)/src/glut/directfb/*[ch]
|
||||
|
||||
DEPEND_FILES = \
|
||||
$(TOP)/src/mesa/depend \
|
||||
|
|
39
SConstruct
39
SConstruct
|
@ -32,10 +32,10 @@ import common
|
|||
default_statetrackers = 'mesa'
|
||||
|
||||
if common.default_platform in ('linux', 'freebsd', 'darwin'):
|
||||
default_drivers = 'softpipe,failover,i915,trace,identity,llvmpipe'
|
||||
default_drivers = 'softpipe,failover,svga,i915,i965,trace,identity,llvmpipe'
|
||||
default_winsys = 'xlib'
|
||||
elif common.default_platform in ('winddk',):
|
||||
default_drivers = 'softpipe,i915,trace,identity'
|
||||
default_drivers = 'softpipe,svga,i915,i965,trace,identity'
|
||||
default_winsys = 'all'
|
||||
else:
|
||||
default_drivers = 'all'
|
||||
|
@ -46,9 +46,9 @@ common.AddOptions(opts)
|
|||
opts.Add(ListVariable('statetrackers', 'state trackers to build', default_statetrackers,
|
||||
['mesa', 'python', 'xorg']))
|
||||
opts.Add(ListVariable('drivers', 'pipe drivers to build', default_drivers,
|
||||
['softpipe', 'failover', 'i915', 'cell', 'trace', 'r300', 'identity', 'llvmpipe']))
|
||||
['softpipe', 'failover', 'svga', 'i915', 'i965', 'trace', 'r300', 'identity', 'llvmpipe']))
|
||||
opts.Add(ListVariable('winsys', 'winsys drivers to build', default_winsys,
|
||||
['xlib', 'intel', 'gdi', 'radeon']))
|
||||
['xlib', 'vmware', 'intel', 'i965', 'gdi', 'radeon']))
|
||||
|
||||
opts.Add(EnumVariable('MSVS_VERSION', 'MS Visual C++ version', None, allowed_values=('7.1', '8.0', '9.0')))
|
||||
|
||||
|
@ -97,6 +97,9 @@ env.Append(CPPPATH = [
|
|||
'#/src/gallium/drivers',
|
||||
])
|
||||
|
||||
if env['msvc']:
|
||||
env.Append(CPPPATH = ['#include/c99'])
|
||||
|
||||
|
||||
# Posix
|
||||
if platform in ('posix', 'linux', 'freebsd', 'darwin'):
|
||||
|
@ -160,8 +163,36 @@ Export('env')
|
|||
# TODO: Build several variants at the same time?
|
||||
# http://www.scons.org/wiki/SimultaneousVariantBuilds
|
||||
|
||||
if env['platform'] != common.default_platform:
|
||||
# GLSL code has to be built twice -- one for the host OS, another for the target OS...
|
||||
|
||||
host_env = Environment(
|
||||
# options are ignored
|
||||
# default tool is used
|
||||
tools = ['default', 'custom'],
|
||||
toolpath = ['#scons'],
|
||||
ENV = os.environ,
|
||||
)
|
||||
|
||||
host_env['platform'] = common.default_platform
|
||||
host_env['machine'] = common.default_machine
|
||||
host_env['debug'] = env['debug']
|
||||
|
||||
SConscript(
|
||||
'src/glsl/SConscript',
|
||||
variant_dir = os.path.join(env['build'], 'host'),
|
||||
duplicate = 0, # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
|
||||
exports={'env':host_env},
|
||||
)
|
||||
|
||||
SConscript(
|
||||
'src/SConscript',
|
||||
variant_dir = env['build'],
|
||||
duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
|
||||
)
|
||||
|
||||
SConscript(
|
||||
'progs/SConscript',
|
||||
variant_dir = os.path.join('progs', env['build']),
|
||||
duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
|
||||
)
|
||||
|
|
269
bin/mklib
269
bin/mklib
|
@ -25,6 +25,124 @@
|
|||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
# Given a list of files, look for .a archives and unpack them.
|
||||
# Return the original list of files minus the .a files plus the unpacked files.
|
||||
expand_archives() {
|
||||
DIR=$1
|
||||
shift
|
||||
FILES=$@
|
||||
NEWFILES=""
|
||||
ORIG_DIR=`pwd`
|
||||
mkdir -p "$DIR"
|
||||
cd "$DIR"
|
||||
for FILE in $FILES ; do
|
||||
case $FILE in
|
||||
*.a)
|
||||
# extract the .o files from this .a archive
|
||||
case $FILE in
|
||||
/*) ;;
|
||||
*) FILE="$ORIG_DIR/$FILE" ;;
|
||||
esac
|
||||
MEMBERS=`ar t $FILE`
|
||||
ar x $FILE
|
||||
for MEMBER in $MEMBERS ; do
|
||||
NEWFILES="$NEWFILES $DIR/$MEMBER"
|
||||
done
|
||||
;;
|
||||
*)
|
||||
# other file type, just add to list
|
||||
NEWFILES="$NEWFILES $FILE"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
cd "$ORIG_DIR"
|
||||
echo $NEWFILES
|
||||
}
|
||||
|
||||
|
||||
# Given a list of files, look for .a archives and return a list of all objects
|
||||
# in the .a archives.
|
||||
contents_of_archives() {
|
||||
FILES=$@
|
||||
NEWFILES=""
|
||||
for FILE in $FILES ; do
|
||||
case $FILE in
|
||||
*.a)
|
||||
# get list of members in this .a archive
|
||||
MEMBERS=`ar t $FILE`
|
||||
NEWFILES="$NEWFILES $MEMBERS"
|
||||
;;
|
||||
*)
|
||||
# skip other file types
|
||||
;;
|
||||
esac
|
||||
done
|
||||
echo $NEWFILES
|
||||
}
|
||||
|
||||
|
||||
# Make static library with 'ar'
|
||||
# params:
|
||||
# options to ar
|
||||
# 1 or 0 to indicate if ranlib should be run
|
||||
# libname to make
|
||||
# list of object files
|
||||
# Return name of library we made
|
||||
# Example: "make_ar_static_lib -ru 1 libfoo.a foo.o bar.o"
|
||||
make_ar_static_lib() {
|
||||
OPTS=$1
|
||||
shift;
|
||||
RANLIB=$1
|
||||
shift;
|
||||
LIBNAME=$1
|
||||
shift;
|
||||
OBJECTS=$@
|
||||
|
||||
# remove existing lib, if present
|
||||
rm -f ${LIBNAME}
|
||||
|
||||
# make static lib
|
||||
ar ${OPTS} ${LIBNAME} ${OBJECTS}
|
||||
|
||||
# run ranlib
|
||||
if [ ${RANLIB} = 1 ] ; then
|
||||
ranlib ${LIBNAME}
|
||||
fi
|
||||
|
||||
echo ${LIBNAME}
|
||||
}
|
||||
|
||||
|
||||
# Print usage info.
|
||||
usage() {
|
||||
echo 'Usage: mklib [options] objects'
|
||||
echo 'Create a shared library from object files.'
|
||||
echo ' -o LIBRARY specifies the name of the resulting library, without'
|
||||
echo ' the leading "lib" or any suffix.'
|
||||
echo ' (eg: "-o GL" might result in "libGL.so" being made)'
|
||||
echo ' -major N specifies major version number (default is 1)'
|
||||
echo ' -minor N specifies minor version number (default is 0)'
|
||||
echo ' -patch N specifies patch version number (default is 0)'
|
||||
echo ' -lLIBRARY specifies a dependency on LIBRARY'
|
||||
echo ' -LDIR search in DIR for library dependencies at build time'
|
||||
echo ' -RDIR search in DIR for library dependencies at run time'
|
||||
echo ' -linker L explicity specify the linker program to use (eg: gcc, g++)'
|
||||
echo ' Not observed on all systems at this time.'
|
||||
echo ' -ldflags OPT specify any additional linker flags in OPT'
|
||||
echo ' -cplusplus link with C++ runtime'
|
||||
echo ' -static make a static library (default is dynamic/shared)'
|
||||
echo ' -dlopen make a shared library suitable for dynamic loading'
|
||||
echo ' -install DIR put resulting library file(s) in DIR'
|
||||
echo ' -arch ARCH override using `uname` to determine host system'
|
||||
echo ' -archopt OPT specify an extra achitecture-specific option OPT'
|
||||
echo ' -altopts OPTS alternate options to override all others'
|
||||
echo " -noprefix don't prefix library name with 'lib' nor add any suffix"
|
||||
echo ' -exports FILE only export the symbols listed in FILE'
|
||||
echo ' -id NAME Sets the id of the dylib (Darwin)'
|
||||
echo ' -h, --help display this information and exit'
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Option defaults
|
||||
#
|
||||
|
@ -52,31 +170,7 @@ while true
|
|||
do
|
||||
case $1 in
|
||||
'-h' | '--help')
|
||||
echo 'Usage: mklib [options] objects'
|
||||
echo 'Create a shared library from object files.'
|
||||
echo ' -o LIBRARY specifies the name of the resulting library, without'
|
||||
echo ' the leading "lib" or any suffix.'
|
||||
echo ' (eg: "-o GL" might result in "libGL.so" being made)'
|
||||
echo ' -major N specifies major version number (default is 1)'
|
||||
echo ' -minor N specifies minor version number (default is 0)'
|
||||
echo ' -patch N specifies patch version number (default is 0)'
|
||||
echo ' -lLIBRARY specifies a dependency on LIBRARY'
|
||||
echo ' -LDIR search in DIR for library dependencies at build time'
|
||||
echo ' -RDIR search in DIR for library dependencies at run time'
|
||||
echo ' -linker L explicity specify the linker program to use (eg: gcc, g++)'
|
||||
echo ' Not observed on all systems at this time.'
|
||||
echo ' -ldflags OPT specify any additional linker flags in OPT'
|
||||
echo ' -cplusplus link with C++ runtime'
|
||||
echo ' -static make a static library (default is dynamic/shared)'
|
||||
echo ' -dlopen make a shared library suitable for dynamic loading'
|
||||
echo ' -install DIR put resulting library file(s) in DIR'
|
||||
echo ' -arch ARCH override using `uname` to determine host system'
|
||||
echo ' -archopt OPT specify an extra achitecture-specific option OPT'
|
||||
echo ' -altopts OPTS alternate options to override all others'
|
||||
echo " -noprefix don't prefix library name with 'lib' nor add any suffix"
|
||||
echo ' -exports FILE only export the symbols listed in FILE'
|
||||
echo ' -id NAME Sets the id of the dylib (Darwin)'
|
||||
echo ' -h, --help display this information and exit'
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
'-o')
|
||||
|
@ -197,11 +291,11 @@ fi
|
|||
# Error checking
|
||||
#
|
||||
if [ "x${LIBNAME}" = "x" ] ; then
|
||||
echo "mklib: Error: no library name specified"
|
||||
echo "mklib: Error: no library name specified (-h for help)"
|
||||
exit 1
|
||||
fi
|
||||
if [ "x${OBJECTS}" = "x" ] ; then
|
||||
echo "mklib: Error: no object files specified"
|
||||
echo "mklib: Error: no object files specified (-h for help)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -269,45 +363,24 @@ case $ARCH in
|
|||
# finish up
|
||||
FINAL_LIBS="${LIBNAME}"
|
||||
elif [ $STATIC = 1 ] ; then
|
||||
# make a static .a library
|
||||
LIBNAME="lib${LIBNAME}.a" # prefix with "lib", suffix with ".a"
|
||||
echo "mklib: Making" $ARCH "static library: " ${LIBNAME}
|
||||
LINK="ar"
|
||||
OPTS="-ru"
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
OPTS=${ALTOPTS}
|
||||
fi
|
||||
rm -f ${LIBNAME}
|
||||
|
||||
# expand any .a objects into constituent .o files.
|
||||
NEWOBJECTS=""
|
||||
DELETIA=""
|
||||
for OBJ in $OBJECTS ; do
|
||||
case $OBJ in
|
||||
*.a)
|
||||
# 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"
|
||||
;;
|
||||
*)
|
||||
# ordinary .o file
|
||||
NEWOBJECTS="$NEWOBJECTS $OBJ"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
# expand .a into .o files
|
||||
NEW_OBJECTS=`expand_archives ${LIBNAME}.obj $OBJECTS`
|
||||
|
||||
# make lib
|
||||
${LINK} ${OPTS} ${LIBNAME} ${NEWOBJECTS}
|
||||
ranlib ${LIBNAME}
|
||||
# make static lib
|
||||
FINAL_LIBS=`make_ar_static_lib ${OPTS} 1 ${LIBNAME} ${NEW_OBJECTS}`
|
||||
|
||||
# remove temporary extracted .o files
|
||||
rm -f ${DELETIA}
|
||||
|
||||
# finish up
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
rm -rf ${LIBNAME}.obj
|
||||
else
|
||||
# make dynamic library
|
||||
LIBNAME="lib${LIBNAME}" # prefix with "lib"
|
||||
case $ARCH in 'Linux' | 'GNU' | GNU/*)
|
||||
OPTS="-Xlinker -Bsymbolic -shared -Wl,-soname,${LIBNAME}.so.${MAJOR}"
|
||||
|
@ -368,9 +441,7 @@ case $ARCH in
|
|||
if [ $STATIC = 1 ] ; then
|
||||
LIBNAME="lib${LIBNAME}.a"
|
||||
echo "mklib: Making SunOS static library: " ${LIBNAME}
|
||||
rm -f ${LIBNAME}
|
||||
ar -ruv ${LIBNAME} ${OBJECTS}
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
FINAL_LIBS=`make_ar_static_lib -ruv 0 ${LIBNAME} ${OBJECTS}`
|
||||
else
|
||||
if [ $NOPREFIX = 0 ] ; then
|
||||
LIBNAME="lib${LIBNAME}.so"
|
||||
|
@ -489,13 +560,19 @@ case $ARCH in
|
|||
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
elif [ $STATIC = 1 ] ; then
|
||||
# make a static .a library
|
||||
STLIB="lib${LIBNAME}.a"
|
||||
echo "mklib: Making FreeBSD static library: " ${STLIB}
|
||||
rm -f ${STLIB}
|
||||
ar cq ${STLIB} ${OBJECTS}
|
||||
ranlib ${STLIB}
|
||||
FINAL_LIBS=${STLIB}
|
||||
|
||||
# expand .a into .o files
|
||||
NEW_OBJECTS=`expand_archives ${STLIB}.obj $OBJECTS`
|
||||
|
||||
FINAL_LIBS=`make_ar_static_lib cq 1 ${STLIB} ${NEW_OBJECTS}`
|
||||
|
||||
# remove temporary extracted .o files
|
||||
rm -rf ${STLIB}.obj
|
||||
else
|
||||
# make dynamic library
|
||||
SHLIB="lib${LIBNAME}.so.${MAJOR}"
|
||||
OPTS="-shared -Wl,-soname,${SHLIB}"
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
|
@ -513,10 +590,7 @@ case $ARCH in
|
|||
if [ $STATIC = 1 ] ; then
|
||||
LIBNAME="lib${LIBNAME}_pic.a"
|
||||
echo "mklib: Making NetBSD PIC static library: " ${LIBNAME}
|
||||
rm -f ${LIBNAME}
|
||||
ar cq ${LIBNAME} ${OBJECTS}
|
||||
ranlib ${LIBNAME}
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
FINAL_LIBS=`make_ar_static_lib cq 1 ${LIBNAME} ${OBJECTS}`
|
||||
else
|
||||
LIBNAME="lib${LIBNAME}.so.${MAJOR}.${MINOR}"
|
||||
echo "mklib: Making NetBSD PIC shared library: " ${LIBNAME}
|
||||
|
@ -529,9 +603,7 @@ case $ARCH in
|
|||
'IRIX' | 'IRIX64')
|
||||
if [ $STATIC = 1 ] ; then
|
||||
LIBNAME="lib${LIBNAME}.a"
|
||||
rm -f ${LIBNAME}
|
||||
ar rc ${LIBNAME} ${OBJECTS}
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
FINAL_LIBS=`make_ar_static_lib rc 0 ${LIBNAME} ${OBJECTS}`
|
||||
else
|
||||
LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so"
|
||||
|
||||
|
@ -582,9 +654,7 @@ case $ARCH in
|
|||
if [ $STATIC = 1 ] ; then
|
||||
LIBNAME="lib${LIBNAME}.a"
|
||||
echo "mklib: Making HP-UX static library: " ${LIBNAME}
|
||||
rm -f ${LIBNAME}
|
||||
ar -ruv ${LIBNAME} ${OBJECTS}
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
FINAL_LIBS=`make_ar_static_lib -ruv 0 ${LIBNAME} ${OBJECTS}`
|
||||
else
|
||||
# HP uses a .2 for their current GL/GLU libraries
|
||||
if [ ${LIBNAME} = "GL" -o ${LIBNAME} = "GLU" ] ; then
|
||||
|
@ -614,8 +684,7 @@ case $ARCH in
|
|||
if [ $STATIC = 1 ] ; then
|
||||
LIBNAME="lib${LIBNAME}.a"
|
||||
echo "mklib: Making AIX static library: " ${LIBNAME}
|
||||
ar -ruv ${X64} ${LIBNAME} ${OBJECTS}
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
FINAL_LIBS=`make_ar_static_lib -ruv 0 ${LIBNAME} ${OBJECTS}`
|
||||
else
|
||||
EXPFILE="lib${LIBNAME}.exp"
|
||||
LIBNAME="lib${LIBNAME}.a" # shared objects are still stored in the .a libraries
|
||||
|
@ -666,9 +735,7 @@ case $ARCH in
|
|||
if [ $STATIC = 1 ] ; then
|
||||
LIBNAME="lib${LIBNAME}.a"
|
||||
echo "mklib: Making OSF/1 static library: " ${LIBNAME}
|
||||
rm -f ${LIBNAME}
|
||||
ar -ruv ${LIBNAME} ${OBJECTS}
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
FINAL_LIBS=`make_ar_static_lib -ruv 0 ${LIBNAME} ${OBJECTS}`
|
||||
else
|
||||
VERSION="${MAJOR}.${MINOR}"
|
||||
LIBNAME="lib${LIBNAME}.so"
|
||||
|
@ -724,22 +791,10 @@ case $ARCH in
|
|||
|
||||
# examine first object to determine ABI
|
||||
set ${OBJECTS}
|
||||
ABI_PPC=`file $1 | grep ' ppc'`
|
||||
ABI_I386=`file $1 | grep ' i386'`
|
||||
ABI_PPC64=`file $1 | grep ' ppc64'`
|
||||
ABI_X86_64=`file $1 | grep ' x86_64'`
|
||||
if [ "${ABI_PPC}" ] ; then
|
||||
OPTS="${OPTS} -arch ppc"
|
||||
fi
|
||||
if [ "${ABI_I386}" ] ; then
|
||||
OPTS="${OPTS} -arch i386"
|
||||
fi
|
||||
if [ "${ABI_PPC64}" ] ; then
|
||||
OPTS="${OPTS} -arch ppc64"
|
||||
fi
|
||||
if [ "${ABI_X86_64}" ] ; then
|
||||
OPTS="${OPTS} -arch x86_64"
|
||||
fi
|
||||
ABIS=`lipo -info $1 | sed s/.*://`
|
||||
for ABI in $ABIS; do
|
||||
OPTS="${OPTS} -arch ${ABI}"
|
||||
done
|
||||
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
OPTS=${ALTOPTS}
|
||||
|
@ -767,16 +822,14 @@ case $ARCH in
|
|||
'LynxOS')
|
||||
LIBNAME="lib${LIBNAME}.a"
|
||||
echo "mklib: Making LynxOS static library: " ${LIBNAME}
|
||||
rm -f ${LIBNAME}
|
||||
ar ru ${LIBNAME} ${OBJECTS}
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
FINAL_LIBS=`make_ar_static_lib -ru 0 ${LIBNAME} ${OBJECTS}`
|
||||
;;
|
||||
|
||||
'BeOS')
|
||||
if [ $STATIC = 1 ] ; then
|
||||
LIBNAME="lib${LIBNAME}.a"
|
||||
echo "mklib: Making BeOS static library: " ${LIBNAME}
|
||||
ar -cru "${LIBNAME}" ${OBJECTS}
|
||||
FINAL_LIBS=`make_ar_static_lib -cru 0 ${LIBNAME} ${OBJECTS}`
|
||||
else
|
||||
LIBNAME="lib${LIBNAME}.so"
|
||||
echo "mklib: Making BeOS shared library: " ${LIBNAME}
|
||||
|
@ -855,9 +908,7 @@ case $ARCH in
|
|||
if [ $STATIC = 1 ] ; then
|
||||
LIBNAME="lib${LIBNAME}.a"
|
||||
echo "mklib: Making AIX GCC static library: " ${LIBNAME}
|
||||
rm -f ${LIBNAME}
|
||||
ar ru ${LIBNAME} ${OBJECTS}
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
FINAL_LIBS=`make_ar_static_lib ru 0 ${LIBNAME} ${OBJECTS}`
|
||||
else
|
||||
LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so"
|
||||
echo "mklib: Making AIX GCC shared library: " ${LIBNAME}
|
||||
|
@ -878,9 +929,7 @@ case $ARCH in
|
|||
fi
|
||||
LIBNAME="lib${LIBNAME}.a"
|
||||
echo "mklib: Making static library for Ultrix: " ${LIBNAME}
|
||||
rm -f ${LIBNAME}
|
||||
ar ru ${LIBNAME} ${OBJECTS}
|
||||
FINAL_LIBS="${LIBNAME}"
|
||||
FINAL_LIBS=`make_ar_static_lib ru 0 ${LIBNAME} ${OBJECTS}`
|
||||
;;
|
||||
|
||||
CYGWIN*)
|
||||
|
@ -900,17 +949,13 @@ case $ARCH in
|
|||
LIBNAME="lib${LIBNAME}" # prefix with "lib"
|
||||
|
||||
if [ $STATIC = 1 ] ; then
|
||||
echo "mklib: Making" $ARCH "static library: " ${LIBNAME}.a
|
||||
LINK="ar"
|
||||
LIBNAME=${LIBNAME}.a
|
||||
echo "mklib: Making" $ARCH "static library: " ${LIBNAME}
|
||||
OPTS="-ru"
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
OPTS=${ALTOPTS}
|
||||
fi
|
||||
# make lib
|
||||
${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS}
|
||||
ranlib ${LIBNAME}.a
|
||||
# finish up
|
||||
FINAL_LIBS=${LIBNAME}.a
|
||||
FINAL_LIBS=`make_ar_static_lib ${OPTS} 1 ${LIBNAME} ${OBJECTS}`
|
||||
else
|
||||
OPTS="-shared -Wl,--enable-auto-image-base -Wl,-export-all -Wl,--out-implib=${LIBNAME}-${MAJOR}.dll.a"
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
|
@ -948,9 +993,7 @@ case $ARCH in
|
|||
if [ $STATIC = 1 ] ; then
|
||||
LIBNAME="lib${LIBNAME}.a"
|
||||
echo "mklib: Making static library for example arch: " ${LIBNAME}
|
||||
rm -f ${LIBNAME}
|
||||
ar rv ${LIBNAME} ${OBJECTS}
|
||||
FINAL_LIBS="${LIBNAME}"
|
||||
FINAL_LIBS=`make_ar_static_lib rv 0 ${LIBNAME} ${OBJECTS}`
|
||||
else
|
||||
LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so"
|
||||
echo "mklib: Making shared library for example arch: " ${LIBNAME}
|
||||
|
|
|
@ -12,7 +12,7 @@ import platform as _platform
|
|||
|
||||
_platform_map = {
|
||||
'linux2': 'linux',
|
||||
'win32': 'winddk',
|
||||
'win32': 'windows',
|
||||
}
|
||||
|
||||
default_platform = sys.platform
|
||||
|
|
|
@ -22,6 +22,8 @@ LDFLAGS = @LDFLAGS@
|
|||
EXTRA_LIB_PATH = @EXTRA_LIB_PATH@
|
||||
RADEON_CFLAGS = @RADEON_CFLAGS@
|
||||
RADEON_LDFLAGS = @RADEON_LDFLAGS@
|
||||
INTEL_LIBS = @INTEL_LIBS@
|
||||
INTEL_CFLAGS = @INTEL_CFLAGS@
|
||||
|
||||
# Assembler
|
||||
MESA_ASM_SOURCES = @MESA_ASM_SOURCES@
|
||||
|
@ -52,6 +54,7 @@ GLU_LIB_NAME = @GLU_LIB_NAME@
|
|||
GLUT_LIB_NAME = @GLUT_LIB_NAME@
|
||||
GLW_LIB_NAME = @GLW_LIB_NAME@
|
||||
OSMESA_LIB_NAME = @OSMESA_LIB_NAME@
|
||||
EGL_LIB_NAME = @EGL_LIB_NAME@
|
||||
|
||||
# Globs used to install the lib and all symlinks
|
||||
GL_LIB_GLOB = @GL_LIB_GLOB@
|
||||
|
@ -59,19 +62,20 @@ GLU_LIB_GLOB = @GLU_LIB_GLOB@
|
|||
GLUT_LIB_GLOB = @GLUT_LIB_GLOB@
|
||||
GLW_LIB_GLOB = @GLW_LIB_GLOB@
|
||||
OSMESA_LIB_GLOB = @OSMESA_LIB_GLOB@
|
||||
EGL_LIB_GLOB = @EGL_LIB_GLOB@
|
||||
|
||||
# Directories to build
|
||||
LIB_DIR = @LIB_DIR@
|
||||
SRC_DIRS = @SRC_DIRS@
|
||||
GLU_DIRS = @GLU_DIRS@
|
||||
DRIVER_DIRS = @DRIVER_DIRS@
|
||||
EGL_DRIVERS_DIRS = @EGL_DRIVERS_DIRS@
|
||||
GALLIUM_DIRS = @GALLIUM_DIRS@
|
||||
GALLIUM_AUXILIARY_DIRS = @GALLIUM_AUXILIARY_DIRS@
|
||||
GALLIUM_DRIVERS_DIRS = @GALLIUM_DRIVERS_DIRS@
|
||||
GALLIUM_WINSYS_DIRS = @GALLIUM_WINSYS_DIRS@
|
||||
GALLIUM_WINSYS_DRM_DIRS = @GALLIUM_WINSYS_DRM_DIRS@
|
||||
GALLIUM_STATE_TRACKERS_DIRS = @GALLIUM_STATE_TRACKERS_DIRS@
|
||||
GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a)
|
||||
GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a
|
||||
GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a)
|
||||
|
||||
# Which subdirs under $(TOP)/progs/ to enter:
|
||||
|
@ -80,6 +84,7 @@ PROGRAM_DIRS = @PROGRAM_DIRS@
|
|||
# Driver specific build vars
|
||||
DRI_DIRS = @DRI_DIRS@
|
||||
WINDOW_SYSTEM = @WINDOW_SYSTEM@
|
||||
EGL_DISPLAYS = @EGL_DISPLAYS@
|
||||
USING_EGL = @USING_EGL@
|
||||
|
||||
# Dependencies
|
||||
|
|
|
@ -12,10 +12,10 @@ X11_DIR = $(INSTALL_DIR)
|
|||
CC = gcc
|
||||
CXX = g++
|
||||
PIC_FLAGS = -fPIC
|
||||
DEFINES = -D_DARWIN_C_SOURCE -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L \
|
||||
-D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -DPTHREADS \
|
||||
DEFINES = -D_DARWIN_C_SOURCE -DPTHREADS -D_GNU_SOURCE \
|
||||
-DGLX_ALIAS_UNSUPPORTED -DGLX_INDIRECT_RENDERING
|
||||
|
||||
# -D_GNU_SOURCE - for src/mesa/main ...
|
||||
# -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
|
||||
|
@ -49,7 +49,7 @@ GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X
|
|||
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXmu -lXt -lXi -lm
|
||||
|
||||
# omit glw lib for now:
|
||||
SRC_DIRS = glx/x11 mesa glu glut/glx glew
|
||||
SRC_DIRS = glsl glx/x11 mesa gallium glu glut/glx glew
|
||||
GLU_DIRS = sgi
|
||||
DRIVER_DIRS = osmesa
|
||||
#DRIVER_DIRS = dri
|
||||
|
|
|
@ -9,7 +9,7 @@ CONFIG_NAME = default
|
|||
|
||||
# Version info
|
||||
MESA_MAJOR=7
|
||||
MESA_MINOR=7
|
||||
MESA_MINOR=8
|
||||
MESA_TINY=0
|
||||
MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
|
||||
|
||||
|
@ -55,6 +55,7 @@ GLUT_LIB = glut
|
|||
GLEW_LIB = GLEW
|
||||
GLW_LIB = GLw
|
||||
OSMESA_LIB = OSMesa
|
||||
EGL_LIB = EGL
|
||||
|
||||
|
||||
# Library names (actual file names)
|
||||
|
@ -64,6 +65,7 @@ GLUT_LIB_NAME = lib$(GLUT_LIB).so
|
|||
GLEW_LIB_NAME = lib$(GLEW_LIB).a
|
||||
GLW_LIB_NAME = lib$(GLW_LIB).so
|
||||
OSMESA_LIB_NAME = lib$(OSMESA_LIB).so
|
||||
EGL_LIB_NAME = lib$(EGL_LIB).so
|
||||
|
||||
# globs used to install the lib and all symlinks
|
||||
GL_LIB_GLOB = $(GL_LIB_NAME)*
|
||||
|
@ -71,6 +73,7 @@ GLU_LIB_GLOB = $(GLU_LIB_NAME)*
|
|||
GLUT_LIB_GLOB = $(GLUT_LIB_NAME)*
|
||||
GLW_LIB_GLOB = $(GLW_LIB_NAME)*
|
||||
OSMESA_LIB_GLOB = $(OSMESA_LIB_NAME)*
|
||||
EGL_LIB_GLOB = $(EGL_LIB_NAME)*
|
||||
|
||||
# Optional assembly language optimization files for libGL
|
||||
MESA_ASM_SOURCES =
|
||||
|
@ -83,25 +86,26 @@ MOTIF_CFLAGS = -I/usr/include/Motif1.2
|
|||
|
||||
# Directories to build
|
||||
LIB_DIR = lib
|
||||
SRC_DIRS = mesa gallium egl gallium/winsys glu glut/glx glew glw
|
||||
SRC_DIRS = glsl mesa gallium egl gallium/winsys glu glut/glx glew glw
|
||||
GLU_DIRS = sgi
|
||||
DRIVER_DIRS = x11 osmesa
|
||||
# Which subdirs under $(TOP)/progs/ to enter:
|
||||
PROGRAM_DIRS = demos redbook samples glsl objviewer xdemos
|
||||
|
||||
# EGL directories
|
||||
# EGL drivers to build
|
||||
EGL_DRIVERS_DIRS = demo
|
||||
|
||||
# Gallium directories and
|
||||
GALLIUM_DIRS = auxiliary drivers state_trackers
|
||||
GALLIUM_AUXILIARY_DIRS = rbug draw translate cso_cache pipebuffer tgsi sct rtasm util indices vl
|
||||
GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a)
|
||||
GALLIUM_DRIVERS_DIRS = softpipe i915 failover trace identity
|
||||
GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a
|
||||
GALLIUM_DRIVERS_DIRS = softpipe failover svga i915 i965 trace identity
|
||||
GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a)
|
||||
GALLIUM_WINSYS_DIRS = xlib egl_xlib
|
||||
GALLIUM_WINSYS_DRM_DIRS =
|
||||
GALLIUM_STATE_TRACKERS_DIRS = glx
|
||||
|
||||
# native displays EGL should support
|
||||
EGL_DISPLAYS = x11
|
||||
|
||||
# Library dependencies
|
||||
#EXTRA_LIB_PATH ?=
|
||||
|
|
|
@ -23,11 +23,11 @@ DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
|
|||
X11_INCLUDES = -I/usr/X11R6/include
|
||||
|
||||
CFLAGS = -Wall -Wmissing-prototypes -Wdeclaration-after-statement \
|
||||
$(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \
|
||||
$(DEFINES) $(ASM_FLAGS) $(X11_INCLUDES) -std=c99 -ffast-math
|
||||
-Wpointer-arith $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \
|
||||
$(DEFINES) $(ASM_FLAGS) $(X11_INCLUDES) -std=c99 -ffast-math
|
||||
|
||||
CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
|
||||
$(X11_INCLUDES)
|
||||
CXXFLAGS = -Wall -Wpointer-arith $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \
|
||||
$(DEFINES) $(X11_INCLUDES)
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
|
|
|
@ -33,7 +33,7 @@ CFLAGS = $(OPT_FLAGS) -Wall -Winline -Wmissing-prototypes \
|
|||
CXXFLAGS = $(CFLAGS)
|
||||
|
||||
# Omitting glw here:
|
||||
SRC_DIRS = gallium mesa gallium/winsys glu glut/glx glew
|
||||
SRC_DIRS = glsl mesa gallium gallium/winsys glu glut/glx glew
|
||||
|
||||
# Build no traditional Mesa drivers:
|
||||
DRIVER_DIRS =
|
||||
|
|
|
@ -4,5 +4,6 @@ include $(TOP)/configs/linux
|
|||
|
||||
CONFIG_NAME = linux-debug
|
||||
|
||||
OPT_FLAGS = -g -ansi -pedantic
|
||||
OPT_FLAGS = -g
|
||||
CFLAGS += -ansi -pedantic
|
||||
DEFINES += -DDEBUG -DDEBUG_MATH
|
||||
|
|
|
@ -60,8 +60,14 @@ EGL_DRIVERS_DIRS = demo glx
|
|||
DRIVER_DIRS = dri
|
||||
WINDOW_SYSTEM = dri
|
||||
GALLIUM_WINSYS_DIRS = drm
|
||||
GALLIUM_WINSYS_DRM_DIRS = intel
|
||||
GALLIUM_WINSYS_DRM_DIRS = vmware intel i965
|
||||
GALLIUM_STATE_TRACKERS_DIRS = egl
|
||||
|
||||
DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon \
|
||||
savage sis tdfx unichrome ffb swrast
|
||||
|
||||
INTEL_LIBS = `pkg-config --libs libdrm_intel`
|
||||
INTEL_CFLAGS = `pkg-config --cflags libdrm_intel`
|
||||
|
||||
RADEON_LIBS = `pkg-config --libs libdrm_radeon`
|
||||
RADEON_CFLAGS = `pkg-config --cflags libdrm_radeon`
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
# Configuration for standalone mode i965 debug
|
||||
|
||||
include $(TOP)/configs/linux-debug
|
||||
|
||||
CONFIG_NAME = linux-i965
|
||||
|
||||
GALLIUM_DRIVER_DIRS = i965
|
||||
GALLIUM_WINSYS_DIRS = drm/i965/xlib
|
|
@ -6,8 +6,6 @@ include $(TOP)/configs/linux
|
|||
|
||||
CONFIG_NAME = linux-llvm
|
||||
|
||||
#GALLIUM_AUXILIARY_DIRS += gallivm
|
||||
|
||||
# Add llvmpipe driver
|
||||
GALLIUM_DRIVERS_DIRS += llvmpipe
|
||||
|
||||
|
|
127
configure.ac
127
configure.ac
|
@ -19,7 +19,9 @@ AC_CANONICAL_HOST
|
|||
|
||||
dnl Versions for external dependencies
|
||||
LIBDRM_REQUIRED=2.4.15
|
||||
DRI2PROTO_REQUIRED=1.99.3
|
||||
LIBDRM_RADEON_REQUIRED=2.4.17
|
||||
DRI2PROTO_REQUIRED=2.2
|
||||
GLPROTO_REQUIRED=1.4.11
|
||||
|
||||
dnl Check for progs
|
||||
AC_PROG_CPP
|
||||
|
@ -94,7 +96,7 @@ esac
|
|||
|
||||
dnl Add flags for gcc and g++
|
||||
if test "x$GCC" = xyes; then
|
||||
CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -std=c99 -ffast-math"
|
||||
CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -std=c99 -ffast-math -fvisibility=hidden"
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CFLAGS="$CFLAGS -fno-strict-aliasing"
|
||||
|
@ -242,24 +244,28 @@ GLU_LIB_NAME='lib$(GLU_LIB).'${LIB_EXTENSION}
|
|||
GLUT_LIB_NAME='lib$(GLUT_LIB).'${LIB_EXTENSION}
|
||||
GLW_LIB_NAME='lib$(GLW_LIB).'${LIB_EXTENSION}
|
||||
OSMESA_LIB_NAME='lib$(OSMESA_LIB).'${LIB_EXTENSION}
|
||||
EGL_LIB_NAME='lib$(EGL_LIB).'${LIB_EXTENSION}
|
||||
|
||||
GL_LIB_GLOB='lib$(GL_LIB).*'${LIB_EXTENSION}'*'
|
||||
GLU_LIB_GLOB='lib$(GLU_LIB).*'${LIB_EXTENSION}'*'
|
||||
GLUT_LIB_GLOB='lib$(GLUT_LIB).*'${LIB_EXTENSION}'*'
|
||||
GLW_LIB_GLOB='lib$(GLW_LIB).*'${LIB_EXTENSION}'*'
|
||||
OSMESA_LIB_GLOB='lib$(OSMESA_LIB).*'${LIB_EXTENSION}'*'
|
||||
EGL_LIB_GLOB='lib$(EGL_LIB).*'${LIB_EXTENSION}'*'
|
||||
|
||||
AC_SUBST([GL_LIB_NAME])
|
||||
AC_SUBST([GLU_LIB_NAME])
|
||||
AC_SUBST([GLUT_LIB_NAME])
|
||||
AC_SUBST([GLW_LIB_NAME])
|
||||
AC_SUBST([OSMESA_LIB_NAME])
|
||||
AC_SUBST([EGL_LIB_NAME])
|
||||
|
||||
AC_SUBST([GL_LIB_GLOB])
|
||||
AC_SUBST([GLU_LIB_GLOB])
|
||||
AC_SUBST([GLUT_LIB_GLOB])
|
||||
AC_SUBST([GLW_LIB_GLOB])
|
||||
AC_SUBST([OSMESA_LIB_GLOB])
|
||||
AC_SUBST([EGL_LIB_GLOB])
|
||||
|
||||
dnl
|
||||
dnl Arch/platform-specific settings
|
||||
|
@ -413,13 +419,12 @@ esac
|
|||
dnl
|
||||
dnl Driver specific build directories
|
||||
dnl
|
||||
SRC_DIRS="mesa glew"
|
||||
SRC_DIRS="glsl mesa glew"
|
||||
GLU_DIRS="sgi"
|
||||
WINDOW_SYSTEM=""
|
||||
GALLIUM_DIRS="auxiliary drivers state_trackers"
|
||||
GALLIUM_WINSYS_DIRS=""
|
||||
GALLIUM_WINSYS_DRM_DIRS=""
|
||||
GALLIUM_AUXILIARY_DIRS="rbug draw translate cso_cache pipebuffer tgsi sct rtasm util indices vl"
|
||||
GALLIUM_DRIVERS_DIRS="softpipe failover trace identity"
|
||||
GALLIUM_STATE_TRACKERS_DIRS=""
|
||||
|
||||
|
@ -446,10 +451,7 @@ AC_SUBST([GALLIUM_DIRS])
|
|||
AC_SUBST([GALLIUM_WINSYS_DIRS])
|
||||
AC_SUBST([GALLIUM_WINSYS_DRM_DIRS])
|
||||
AC_SUBST([GALLIUM_DRIVERS_DIRS])
|
||||
AC_SUBST([GALLIUM_AUXILIARY_DIRS])
|
||||
AC_SUBST([GALLIUM_STATE_TRACKERS_DIRS])
|
||||
AC_SUBST([RADEON_CFLAGS])
|
||||
AC_SUBST([RADEON_LDFLAGS])
|
||||
|
||||
dnl
|
||||
dnl User supplied program configuration
|
||||
|
@ -576,13 +578,7 @@ dri)
|
|||
PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED])
|
||||
GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED"
|
||||
DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED"
|
||||
|
||||
PKG_CHECK_MODULES([LIBDRM_RADEON], [libdrm_radeon], HAVE_LIBDRM_RADEON=yes, HAVE_LIBDRM_RADEON=no)
|
||||
|
||||
if test "$HAVE_LIBDRM_RADEON" = yes; then
|
||||
RADEON_CFLAGS="-DHAVE_LIBDRM_RADEON=1 $LIBDRM_RADEON_CFLAGS"
|
||||
RADEON_LDFLAGS=$LIBDRM_RADEON_LIBS
|
||||
fi
|
||||
PKG_CHECK_MODULES([GLPROTO], [glproto >= $GLPROTO_REQUIRED])
|
||||
|
||||
# find the DRI deps for libGL
|
||||
if test "$x11_pkgconfig" = yes; then
|
||||
|
@ -803,6 +799,29 @@ AC_SUBST([DRI_DIRS])
|
|||
AC_SUBST([EXPAT_INCLUDES])
|
||||
AC_SUBST([DRI_LIB_DEPS])
|
||||
|
||||
case $DRI_DIRS in
|
||||
*i915*|*i965*)
|
||||
PKG_CHECK_MODULES([INTEL], [libdrm_intel])
|
||||
;;
|
||||
esac
|
||||
|
||||
case $DRI_DIRS in
|
||||
*radeon*|*r200*|*r300*|*r600*)
|
||||
PKG_CHECK_MODULES([LIBDRM_RADEON],
|
||||
[libdrm_radeon libdrm >= $LIBDRM_RADEON_REQUIRED],
|
||||
HAVE_LIBDRM_RADEON=yes,
|
||||
HAVE_LIBDRM_RADEON=no)
|
||||
|
||||
if test "$HAVE_LIBDRM_RADEON" = yes; then
|
||||
RADEON_CFLAGS="-DHAVE_LIBDRM_RADEON=1 $LIBDRM_RADEON_CFLAGS"
|
||||
RADEON_LDFLAGS=$LIBDRM_RADEON_LIBS
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
AC_SUBST([RADEON_CFLAGS])
|
||||
AC_SUBST([RADEON_LDFLAGS])
|
||||
|
||||
|
||||
dnl
|
||||
dnl OSMesa configuration
|
||||
dnl
|
||||
|
@ -887,17 +906,15 @@ AC_ARG_ENABLE([egl],
|
|||
[enable_egl=yes])
|
||||
if test "x$enable_egl" = xyes; then
|
||||
SRC_DIRS="$SRC_DIRS egl"
|
||||
|
||||
if test "$x11_pkgconfig" = yes; then
|
||||
PKG_CHECK_MODULES([EGL], [x11])
|
||||
EGL_LIB_DEPS="$EGL_LIBS"
|
||||
else
|
||||
# should check these...
|
||||
EGL_LIB_DEPS="$X_LIBS -lX11"
|
||||
EGL_LIB_DEPS="$DLOPEN_LIBS -lpthread"
|
||||
EGL_DRIVERS_DIRS=""
|
||||
if test "$enable_static" != yes && test "$mesa_driver" != osmesa; then
|
||||
# build egl_glx when libGL is built
|
||||
EGL_DRIVERS_DIRS="glx"
|
||||
fi
|
||||
EGL_LIB_DEPS="$EGL_LIB_DEPS $DLOPEN_LIBS"
|
||||
fi
|
||||
AC_SUBST([EGL_LIB_DEPS])
|
||||
AC_SUBST([EGL_DRIVERS_DIRS])
|
||||
|
||||
dnl
|
||||
dnl GLU configuration
|
||||
|
@ -1143,7 +1160,14 @@ yes)
|
|||
GALLIUM_STATE_TRACKERS_DIRS=glx
|
||||
;;
|
||||
dri)
|
||||
test "x$enable_egl" = xyes && GALLIUM_STATE_TRACKERS_DIRS=egl
|
||||
GALLIUM_STATE_TRACKERS_DIRS="dri"
|
||||
if test "x$enable_egl" = xyes; then
|
||||
GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS egl egl_g3d"
|
||||
fi
|
||||
# Have only tested st/xorg on 1.6.0 servers
|
||||
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.6.0],
|
||||
HAVE_XORG="yes"; GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS xorg",
|
||||
HAVE_XORG="no")
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
@ -1175,6 +1199,35 @@ yes)
|
|||
;;
|
||||
esac
|
||||
|
||||
AC_ARG_WITH([egl-displays],
|
||||
[AS_HELP_STRING([--with-egl-displays@<:@=DIRS...@:>@],
|
||||
[comma delimited native displays libEGL supports, e.g.
|
||||
"x11,kms" @<:@default=auto@:>@])],
|
||||
[with_egl_displays="$withval"],
|
||||
[with_egl_displays=yes])
|
||||
|
||||
EGL_DISPLAYS=""
|
||||
case "$with_egl_displays" in
|
||||
yes)
|
||||
if test "x$enable_egl" = xyes && test "x$mesa_driver" != xosmesa; then
|
||||
EGL_DISPLAYS="x11"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if test "x$enable_egl" != xyes; then
|
||||
AC_MSG_ERROR([cannot build egl state tracker without EGL library])
|
||||
fi
|
||||
# verify the requested driver directories exist
|
||||
egl_displays=`IFS=', '; echo $with_egl_displays`
|
||||
for dpy in $egl_displays; do
|
||||
test -d "$srcdir/src/gallium/state_trackers/egl_g3d/$dpy" || \
|
||||
AC_MSG_ERROR([EGL display '$dpy' does't exist])
|
||||
done
|
||||
EGL_DISPLAYS="$egl_displays"
|
||||
;;
|
||||
esac
|
||||
AC_SUBST([EGL_DISPLAYS])
|
||||
|
||||
AC_ARG_WITH([xorg-driver-dir],
|
||||
[AS_HELP_STRING([--with-xorg-driver-dir=DIR],
|
||||
[Default xorg driver directory[[default=${libdir}/xorg/modules/drivers]]])],
|
||||
|
@ -1197,17 +1250,34 @@ AC_ARG_WITH([max-height],
|
|||
[AC_MSG_WARN([Large framebuffer: see s_tritemp.h comments.])])]
|
||||
)
|
||||
|
||||
dnl
|
||||
dnl Gallium SVGA configuration
|
||||
dnl
|
||||
AC_ARG_ENABLE([gallium-svga],
|
||||
[AS_HELP_STRING([--enable-gallium-svga],
|
||||
[build gallium SVGA @<:@default=disabled@:>@])],
|
||||
[enable_gallium_svga="$enableval"],
|
||||
[enable_gallium_svga=auto])
|
||||
if test "x$enable_gallium_svga" = xyes; then
|
||||
GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS vmware"
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS svga"
|
||||
elif test "x$enable_gallium_svga" = xauto; then
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS svga"
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl Gallium Intel configuration
|
||||
dnl
|
||||
AC_ARG_ENABLE([gallium-intel],
|
||||
[AS_HELP_STRING([--disable-gallium-intel],
|
||||
[build gallium intel @<:@default=enabled@:>@])],
|
||||
[AS_HELP_STRING([--enable-gallium-intel],
|
||||
[build gallium intel @<:@default=disabled@:>@])],
|
||||
[enable_gallium_intel="$enableval"],
|
||||
[enable_gallium_intel=yes])
|
||||
[enable_gallium_intel=auto])
|
||||
if test "x$enable_gallium_intel" = xyes; then
|
||||
GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS intel"
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915"
|
||||
GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS intel i965"
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915 i965"
|
||||
elif test "x$enable_gallium_intel" = xauto; then
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915 i965"
|
||||
fi
|
||||
|
||||
dnl
|
||||
|
@ -1289,7 +1359,6 @@ if echo "$SRC_DIRS" | grep 'gallium' >/dev/null 2>&1; then
|
|||
echo " Gallium dirs: $GALLIUM_DIRS"
|
||||
echo " Winsys dirs: $GALLIUM_WINSYS_DIRS"
|
||||
echo " Winsys drm dirs:$GALLIUM_WINSYS_DRM_DIRS"
|
||||
echo " Auxiliary dirs: $GALLIUM_AUXILIARY_DIRS"
|
||||
echo " Driver dirs: $GALLIUM_DRIVERS_DIRS"
|
||||
echo " Trackers dirs: $GALLIUM_STATE_TRACKERS_DIRS"
|
||||
else
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
|
||||
Status of OpenGL 3.x features in Mesa
|
||||
|
||||
|
||||
Note: when an item is marked as "DONE" it means all the core Mesa
|
||||
infrastructure is complete but it may be the case that few (if any) drivers
|
||||
implement the features.
|
||||
|
||||
|
||||
Feature Status
|
||||
----------------------------------------------------- ------------------------
|
||||
|
||||
GL 3.0:
|
||||
|
||||
GLSL changes (GL_EXT_gpu_shader4, etc) not started
|
||||
Conditional rendering (GL_NV_conditional_render) DONE (swrast & softpipe)
|
||||
Map buffer subranges (GL_APPLE_flush_buffer_range) not started
|
||||
Float textures, renderbuffers some infrastructure done
|
||||
Framebuffer objects (GL_EXT_framebuffer_object) DONE
|
||||
Half-float some infrastructure done
|
||||
Multisample blit DONE
|
||||
Non-normalized Integer texture/framebuffer formats not started
|
||||
1D/2D Texture arrays mostly done
|
||||
Packed depth/stencil formats DONE
|
||||
Per-buffer blend and masks (GL_EXT_draw_buffers2) DONE
|
||||
GL_EXT_texture_compression_rgtc not started
|
||||
Red and red/green texture formats Ian?
|
||||
Transform feedback (GL_EXT_transform_feedback) not started
|
||||
Vertex array objects (GL_APPLE_vertex_array_object) DONE
|
||||
sRGB framebuffer format (GL_EXT_framebuffer_sRGB) not started
|
||||
glClearBuffer commands DONE, except for dispatch
|
||||
glGetStringi command DONE, except for dispatch
|
||||
glTexParameterI, glGetTexParameterI commands DONE, except for dispatch
|
||||
glVertexAttribI commands not started
|
||||
glBindFragDataLocation, glGetFragDataLocation cmds not started
|
||||
glBindBufferRange, glBindBufferBase commands not started
|
||||
|
||||
|
||||
GL 3.1:
|
||||
|
||||
GLSL 1.30 and 1.40 not started
|
||||
Instanced drawing (GL_ARB_draw_instanced) not started
|
||||
Buffer copying (GL_ARB_copy_buffer) DONE
|
||||
Primitive restart (GL_NV_primitive_restart) not started
|
||||
16 vertex texture image units not started
|
||||
Texture buffer objs (GL_ARB_textur_buffer_object) not started
|
||||
Rectangular textures (GL_ARB_texture_rectangle) DONE
|
||||
Uniform buffer objs (GL_ARB_uniform_buffer_object) not started
|
||||
Signed normalized texture formats not started
|
||||
|
||||
|
||||
GL 3.2:
|
||||
|
||||
Core/compatibility profiles not started
|
||||
GLSL 1.50 not started
|
||||
Geometry shaders (GL_ARB_geometry_shader4) partially done (Zack)
|
||||
BGRA vertex order (GL_ARB_vertex_array_bgra) DONE
|
||||
Base vertex offset(GL_ARB_draw_elements_base_vertex) DONE
|
||||
Frag shader coord (GL_ARB_fragment_coord_conventions) not started
|
||||
Provoking vertex (GL_ARB_provoking_vertex) DONE
|
||||
Seamless cubemaps (GL_ARB_seamless_cube_map) DONE, mostly?
|
||||
Multisample textures (GL_ARB_texture_multisample) not started
|
||||
Frag depth clamp (GL_ARB_depth_clamp) DONE
|
||||
Fence objects (GL_ARB_sync) DONE
|
||||
|
||||
|
||||
|
||||
More info about these features and the work involved can be found at
|
||||
http://dri.freedesktop.org/wiki/MissingFunctionality
|
|
@ -27,12 +27,6 @@ using the SDK with Visual Studio Express can be found at
|
|||
|
||||
http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
|
||||
|
||||
If you are stuck using VC6 or VC7, you may start with these project
|
||||
files, but you may need to modify them to reflect changes in the
|
||||
Mesa source code tree. If you sucessfully update the project files,
|
||||
please submit them to the author of this document so that they may
|
||||
be included in the next distribution.
|
||||
|
||||
The project files to build the core Mesa library, Windows Mesa
|
||||
drivers, OSMesa, and GLU are in the mesa directory. The project files
|
||||
to build GLUT and some demo programs are in the progs directory.
|
||||
|
@ -106,23 +100,6 @@ should build all the demos.
|
|||
Build System Notes
|
||||
----- ------ -----
|
||||
|
||||
VC6 (not actively supported)
|
||||
---
|
||||
|
||||
Visual Studio 6 does not recognize files with the .cc extension as C++
|
||||
language files, without a lot of unnatural tweaking. So, the VC6
|
||||
build process uses custom build steps to compile these files in the
|
||||
GLU library.
|
||||
|
||||
Two additional configurations are provided, Debug x86 and Release x86
|
||||
that activate the shader code compilation by defining SLANG_86. It is
|
||||
unknown if and how this works.
|
||||
|
||||
VC7 (not actively supported)
|
||||
---
|
||||
|
||||
The above-mentioned .cc problem does not exist in this version.
|
||||
|
||||
VC8
|
||||
---
|
||||
|
||||
|
|
|
@ -351,20 +351,11 @@ example linux or windows, <i>machine</i> is x86 or x86_64, optionally followed
|
|||
by -debug for debug builds.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The sample programs are built seperately. To build them do
|
||||
<pre>
|
||||
scons -C progs
|
||||
</pre>
|
||||
And the build output will be placed in progs/build/...
|
||||
</p>
|
||||
|
||||
<p>
|
||||
To build Mesa with SCons for Windows on Linux using the MinGW crosscompiler toolchain do
|
||||
</p>
|
||||
<pre>
|
||||
scons platform=windows toolchain=crossmingw machine=x86 statetrackers=mesa drivers=softpipe,trace winsys=gdi
|
||||
scons -C progs platform=windows toolchain=crossmingw machine=x86 -k
|
||||
</pre>
|
||||
<p>
|
||||
This will create:
|
||||
|
|
|
@ -0,0 +1,197 @@
|
|||
|
||||
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
This document describes the implementation of the XFree86 4.0 libGL.so
|
||||
library defined by the Linux/OpenGL Base specification found at
|
||||
http://reality.sgi.com/opengl/linux/linuxbase.html.
|
||||
|
||||
The documentation is divided into two sections:
|
||||
User's Guide
|
||||
Driver Developer's Guide
|
||||
|
||||
Author: Brian Paul (brian@precisioninsight.com)
|
||||
Date: February 2000
|
||||
|
||||
|
||||
|
||||
User's Guide
|
||||
------------
|
||||
|
||||
Using libGL.so
|
||||
|
||||
The libGL.so library defines the gl- and glX-prefixed functions needed to
|
||||
run OpenGL programs. OpenGL client applications should link with the
|
||||
-lGL option to use it.
|
||||
|
||||
libGL.so serves two primary functions: GLX protocol generation for indirect
|
||||
rendering and loading/management of hardware drivers for direct rendering.
|
||||
|
||||
When libGL.so initializes itself it uses the DRI to determine the
|
||||
appropriate hardware driver for each screen on the local X display.
|
||||
The hardware drivers are expected to be in the /usr/X11R6/lib/modules/dri/
|
||||
directory. Drivers are named with the convention <name>_dri.so where
|
||||
<name> is a driver such as "tdfx", "i810", "gamma", etc.
|
||||
|
||||
The LIBGL_DRIVERS_DIR environment variable may be used to specify a
|
||||
different DRI modules directory, overriding /usr/X11R6/lib/modules/dri/.
|
||||
This environment variable is ignored in setuid programs for security
|
||||
reasons.
|
||||
|
||||
When libGL.so is unable to locate appropriate hardware drivers it will
|
||||
fall back to using indirect GLX rendering.
|
||||
|
||||
To aid in solving problems, libGL.so will print diagnostic messages to
|
||||
stderr if the LIBGL_DEBUG environment variable is defined.
|
||||
|
||||
libGL.so is thread safe. The overhead of thread safety for common,
|
||||
single-thread clients is negligible. However, the overhead of thread
|
||||
safety for multi-threaded clients is significant. Each GL API call
|
||||
requires two calls to pthread_get_specific() which can noticably
|
||||
impact performance. Warning: libGL.so is thread safe but individual
|
||||
DRI drivers may not be. Please consult the documentation for a driver
|
||||
to learn if it is thread safe.
|
||||
|
||||
|
||||
|
||||
Indirect Rendering
|
||||
|
||||
You can force indirect rendering mode by setting the LIBGL_ALWAYS_INDIRECT
|
||||
environment variable. Hardware acceleration will not be used.
|
||||
|
||||
|
||||
|
||||
libGL.so Extensibility
|
||||
|
||||
libGL.so is designed to be extended without upgrading. That is,
|
||||
drivers may install new OpenGL extension functions into libGL.so
|
||||
without requiring libGL.so to be replaced. Clients of libGL.so should
|
||||
use the glXGetProcAddressEXT() function to obtain the address of
|
||||
functions by name. For more details of GLX_ARB_get_proc_address see
|
||||
http://oss.sgi.com/projects/ogl-sample/registry/ARB/get_proc_address.spec
|
||||
|
||||
libGL.so is also designed with flexibility such that it may be used
|
||||
with many generations of hardware drivers to come.
|
||||
|
||||
|
||||
|
||||
|
||||
Driver Developer's Guide
|
||||
------------------------
|
||||
|
||||
This section describes the requirements to make an XFree86 4.0
|
||||
libGL.so-compatible hardware driver. It is not intended for end
|
||||
users of libGL.so.
|
||||
|
||||
|
||||
XFree86 source files
|
||||
|
||||
libGL.so is built inside XFree86 with sources found in xc/lib/GL/.
|
||||
Specifically, libGL.so is built from:
|
||||
|
||||
xc/lib/GL/glx/*.c
|
||||
xc/lib/dri/XF86dri.c
|
||||
xc/lib/dri/dri_glx.c
|
||||
xc/lib/GL/mesa/src/glapi.c
|
||||
xc/lib/GL/mesa/src/glapitemp.h
|
||||
xc/lib/GL/mesa/src/glapitable.h
|
||||
xc/lib/GL/mesa/src/glapioffsets.h
|
||||
xc/lib/GL/mesa/src/glapinoop.c
|
||||
xc/lib/GL/mesa/src/glheader.h
|
||||
xc/lib/GL/mesa/src/glthread.c
|
||||
xc/lib/GL/mesa/src/glthread.h
|
||||
xc/lib/GL/mesa/src/X86/glapi_x86.S
|
||||
xc/lib/GL/mesa/src/X86/assyntax.h
|
||||
|
||||
Understand that the mesa/src/gl*.[ch] files are not tied to Mesa. They
|
||||
have no dependencies on the rest of Mesa and are designed to be reusable
|
||||
in a number of projects.
|
||||
|
||||
The glapi_x86.X and assyntax.h files implement x86-optimized dispatch
|
||||
of GL functions. They are not required; C-based dispatch can be used
|
||||
instead, with a slight performance penalty.
|
||||
|
||||
|
||||
|
||||
Driver loading and binding
|
||||
|
||||
When libGL.so initializes itself (via the __glXInitialize function) a
|
||||
call is made to driCreateDisplay(). This function uses DRI facilities
|
||||
to determine the driver file appropriate for each screen on the local
|
||||
display. Each screen's driver is then opened with dlopen() and asked
|
||||
for its __driCreateScreen() function. The pointers to the __driCreateScreen()
|
||||
functions are kept in an array, indexed by screen number, in the
|
||||
__DRIdisplayRec struct.
|
||||
|
||||
When a driver's __driCreateScreen() function is called, it must initialize
|
||||
a __DRIscreenRec struct. This struct acts as the root of a tree of
|
||||
function pointers which are called to create and destroy contexts and
|
||||
drawables and perform all the operations needed by the GLX interface.
|
||||
See the xc/lib/GL/glx/glxclient.h file for details.
|
||||
|
||||
|
||||
|
||||
Dynamic Extension Function Registration
|
||||
|
||||
In order to provide forward compatibility with future drivers, libGL.so
|
||||
allows drivers to register new OpenGL extension functions which weren't
|
||||
known when libGL.so was built.
|
||||
|
||||
The register_extensions() function in xc/lib/GL/dri/dri_glx.c is called
|
||||
as soon as libGL.so is loaded. This is done with gcc's constructor
|
||||
attribute. This mechanism will likely have to be changed for other compilers.
|
||||
|
||||
register_extensions() loops over all local displays and screens, determines
|
||||
the DRI driver for each, and calls the driver's __driRegisterExtensions()
|
||||
function, if present.
|
||||
|
||||
The __driRegisterExtensions() function can add new entrypoints to libGL
|
||||
by calling:
|
||||
|
||||
GLboolean _glapi_add_entrypoint(const char *funcName, GLuint offset)
|
||||
|
||||
The parameters are the name of the function (such as "glFoobarEXT") and the
|
||||
offset of the dispatch slot in the API dispatch table. The return value
|
||||
indicates success (GL_TRUE) or failure (GL_FALSE).
|
||||
|
||||
_glapi_add_entrypoint() will synthesize entrypoint code in assembly
|
||||
language. Assembly languages is required since parameter passing
|
||||
can't be handled correctly using a C-based solution.
|
||||
|
||||
The address of the new entrypoint is obtained by calling the
|
||||
glXGetProcAddressARB() function.
|
||||
|
||||
The dispatch offset number MUST be a number allocated by SGI in the same
|
||||
manner in which new GL_* constants are allocated. Using an arbitrary
|
||||
offset number will result in many problems.
|
||||
|
||||
|
||||
|
||||
Dispatch Management
|
||||
|
||||
When a GL context is made current, the driver must install its dispatch
|
||||
table as the current dispatch table. This is done by calling
|
||||
|
||||
void _glapi_set_dispatch(struct _glapi_table *dispatch);
|
||||
|
||||
This will install the named dispatch table for the calling thread.
|
||||
The current dispatch table for a thread can be obtained by calling
|
||||
|
||||
struct _glapi_table *_glapi_get_dispatch(void);
|
||||
|
||||
For higher performance in the common single-thread case, the global
|
||||
variable _glapi_Dispatch will point to the current dispatch table.
|
||||
This variable will be NULL when in multi-thread mode.
|
||||
|
||||
|
||||
|
||||
Context Management
|
||||
|
||||
libGL.so uses the XFree86 xthreads package to manage a thread-specific
|
||||
current context pointer. See __glXGet/SetCurrentContext() in glext.c
|
||||
|
||||
Drivers may use the _glapi_set/get_context() functions to maintain
|
||||
a private thread-specific context pointer.
|
||||
|
|
@ -10,6 +10,17 @@
|
|||
|
||||
<H1>News</H1>
|
||||
|
||||
<h2>December 21, 2009</h2>
|
||||
<p>
|
||||
<a href="relnotes-7.6.1.html">Mesa 7.6.1</a> is released. This is a bug-fix
|
||||
release fixing issues found in the 7.6 release.
|
||||
</p>
|
||||
<p>
|
||||
Also, <a href="relnotes-7.7.html">Mesa 7.7</a> is released. This is a new
|
||||
development release.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>September 28, 2009</h2>
|
||||
<p>
|
||||
<a href="relnotes-7.6.html">Mesa 7.6</a> is released. This is a new feature
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.6.1 Release Notes, (date tbd)</H1>
|
||||
<H1>Mesa 7.6.1 Release Notes, 21 December 2009</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.6.1 is a bug-fix release fixing issues since version 7.6.
|
||||
|
@ -26,7 +26,15 @@ for DRI hardware acceleration.
|
|||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
tbd
|
||||
e80fabad2e3eb7990adae773d6aeacba MesaLib-7.6.1.tar.gz
|
||||
7db4617e9e10ad3aca1b64339fd71b7d MesaLib-7.6.1.tar.bz2
|
||||
dd3275dbf9833480d2e92d0c69b22abd MesaLib-7.6.1.zip
|
||||
f7fdcfe3c0f363e571c60f02f74368fb MesaDemos-7.6.1.tar.gz
|
||||
a4226f06732a02556fcf6be290b86dff MesaDemos-7.6.1.tar.bz2
|
||||
849425f356bd940726cebedfa79de176 MesaDemos-7.6.1.zip
|
||||
d40cc7c5e337a85b674e27a8e494f52f MesaGLUT-7.6.1.tar.gz
|
||||
ca9aecb91f05b1da9fd7d5eeb19d47d7 MesaGLUT-7.6.1.tar.bz2
|
||||
23fad8398004c977a1d8953079b72ca6 MesaGLUT-7.6.1.zip
|
||||
</pre>
|
||||
|
||||
|
||||
|
@ -34,6 +42,7 @@ tbd
|
|||
<ul>
|
||||
<li>Upgraded GL/glext.h to version 56, GL/glxext.h to version 25,
|
||||
GL/wglext.h to version 17
|
||||
<li>New 3D driver, r600, for Radeon R6xx, R7xx hardware
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -52,7 +61,20 @@ tbd
|
|||
it returns the actual compressed format chosen.
|
||||
<li>Fixed glBitmap bugs in Intel drivers.
|
||||
<li>Fixed a number of Microsoft Visual Studio compilation problems.
|
||||
<li>Fixed clipping / provoking vertex bugs in i965 driver.
|
||||
<li>Assorted build fixes for AIX.
|
||||
<li>Endianness fixes for the DRI swrast driver (bug 22767).</li>
|
||||
<li>Point sprite fixes for i915/945 driver.
|
||||
<li>Fixed assorted memory leaks (usually on error paths)
|
||||
<li>Fixed some GLSL compiler bugs (ex: 25579)
|
||||
<li>Assorted build fixes for BlueGene
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
<ul>
|
||||
<li>Removed old VC6, VC7 project files for Windows
|
||||
</ul>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
<HTML>
|
||||
|
||||
<TITLE>Mesa Release Notes</TITLE>
|
||||
|
||||
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<BODY>
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.7.1 Release Notes / date tbd</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.7.1 is a bug-fix release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 7.7.1 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>
|
||||
tbd
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<ul>
|
||||
<li>tbd
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
<li>Assorted fixes to VMware SVGA gallium driver.
|
||||
<li>Fixed broken blending to multiple color buffers in swrast driver.
|
||||
<li>Allocate constants more tightly in GL_ARB_vertex/fragment parser.
|
||||
<li>Fixed mipmap generation bug caused by invalid viewport state.
|
||||
<li>Gallium SSE codegen for XPD didn't always work.
|
||||
</ul>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.7 Release Notes / date TBD</H1>
|
||||
<H1>Mesa 7.7 Release Notes / 21 December 2009</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.7 is a new development release.
|
||||
|
@ -28,12 +28,23 @@ for DRI hardware acceleration.
|
|||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
tbd
|
||||
395c9516edf1ad54b0934d8db15557bf MesaLib-7.7.tar.gz
|
||||
e3fa64a1508bc23dd9de9dd2cea7cfb1 MesaLib-7.7.tar.bz2
|
||||
e54903eb5e49c3969821fa16b32da245 MesaLib-7.7.zip
|
||||
53b5b6f78e55de170d43c98cb6aaab7e MesaDemos-7.7.tar.gz
|
||||
6fd616b27b9826d0faa23e08e05d9435 MesaDemos-7.7.tar.bz2
|
||||
240fe06159ad73d5e22c27033b66c80a MesaDemos-7.7.zip
|
||||
9fe11a904b2a9d8cd06cc52bc330b716 MesaGLUT-7.7.tar.gz
|
||||
e8dceed05a59a2d3c2619d7d734587e3 MesaGLUT-7.7.tar.bz2
|
||||
96af041d435349ee23ead4667ec36363 MesaGLUT-7.7.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<ul>
|
||||
<li>VMware "SVGA" Gallium driver. This is a Gallium3D driver which targets the
|
||||
VMware virtual graphics device. It allows Linux OpenGL guest applications
|
||||
to utilize the 3D graphics hardware of the host operating system.
|
||||
<li>GL_ARB_draw_elements_base_vertex (supported in Intel i965 and software drivers)</li>
|
||||
<li>GL_ARB_depth_clamp (supported in Intel i965 DRI and software drivers)</li>
|
||||
<li>GL_NV_depth_clamp (supported in Intel i965 DRI and software drivers)</li>
|
||||
|
@ -44,11 +55,15 @@ tbd
|
|||
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
<li>Many assorted i965 driver fixes.
|
||||
<li>Many r300-gallium driver fixes; this driver is now considered unstable-quality instead of experimental-quality.
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
<ul>
|
||||
<li>New Mesa texture/surface format infrastructure
|
||||
<li>Removed some unused Mesa device driver hooks
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
<HTML>
|
||||
|
||||
<TITLE>Mesa Release Notes</TITLE>
|
||||
|
||||
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<BODY>
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.8 Release Notes / date TBD</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.8 is a new development release.
|
||||
People who are concerned with stability and reliability should stick
|
||||
with a previous release or wait for Mesa 7.8.1.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 7.8 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>
|
||||
tbd
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<ul>
|
||||
<li>GL_NV_conditional_render extension (swrast driver only)
|
||||
<li>GL_EXT_draw_buffers2 extension (swrast driver only)
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
<li>TBD
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
<ul>
|
||||
<li>TBD
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -13,6 +13,9 @@ The release notes summarize what's new or changed in each Mesa release.
|
|||
</p>
|
||||
|
||||
<UL>
|
||||
<<<<<<< HEAD:docs/relnotes.html
|
||||
<LI><A HREF="relnotes-7.8.html">7.8 release notes</A>
|
||||
<LI><A HREF="relnotes-7.7.1.html">7.7.1 release notes</A>
|
||||
<LI><A HREF="relnotes-7.7.html">7.7 release notes</A>
|
||||
<LI><A HREF="relnotes-7.6.1.html">7.6.1 release notes</A>
|
||||
<LI><A HREF="relnotes-7.6.html">7.6 release notes</A>
|
||||
|
|
|
@ -18,6 +18,11 @@
|
|||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
|
||||
# define EGLAPI __attribute__((visibility("default")))
|
||||
# define EGLAPIENTRY
|
||||
#endif
|
||||
|
||||
/* Macros used in EGL function prototype declarations.
|
||||
*
|
||||
* EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
|
||||
|
|
|
@ -85,7 +85,9 @@
|
|||
* glut.h or gl.h.
|
||||
*/
|
||||
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
/*REGENERATE_TO_END-----------ALL LINES BELOW HERE GET REPLACED ON REGENERATION */
|
||||
|
||||
#define glAccum MANGLE(Accum)
|
||||
#define glActiveProgramEXT MANGLE(ActiveProgramEXT)
|
||||
#define glActiveStencilFaceEXT MANGLE(ActiveStencilFaceEXT)
|
||||
#define glActiveTextureARB MANGLE(ActiveTextureARB)
|
||||
#define glActiveTexture MANGLE(ActiveTexture)
|
||||
|
@ -60,6 +61,7 @@
|
|||
#define glBeginTransformFeedback MANGLE(BeginTransformFeedback)
|
||||
#define glBeginTransformFeedbackNV MANGLE(BeginTransformFeedbackNV)
|
||||
#define glBeginVertexShaderEXT MANGLE(BeginVertexShaderEXT)
|
||||
#define glBeginVideoCaptureNV MANGLE(BeginVideoCaptureNV)
|
||||
#define glBindAttribLocationARB MANGLE(BindAttribLocationARB)
|
||||
#define glBindAttribLocation MANGLE(BindAttribLocation)
|
||||
#define glBindBufferARB MANGLE(BindBufferARB)
|
||||
|
@ -93,6 +95,8 @@
|
|||
#define glBindVertexArrayAPPLE MANGLE(BindVertexArrayAPPLE)
|
||||
#define glBindVertexArray MANGLE(BindVertexArray)
|
||||
#define glBindVertexShaderEXT MANGLE(BindVertexShaderEXT)
|
||||
#define glBindVideoCaptureStreamBufferNV MANGLE(BindVideoCaptureStreamBufferNV)
|
||||
#define glBindVideoCaptureStreamTextureNV MANGLE(BindVideoCaptureStreamTextureNV)
|
||||
#define glBinormal3bEXT MANGLE(Binormal3bEXT)
|
||||
#define glBinormal3bvEXT MANGLE(Binormal3bvEXT)
|
||||
#define glBinormal3dEXT MANGLE(Binormal3dEXT)
|
||||
|
@ -126,6 +130,7 @@
|
|||
#define glBlendFuncSeparate MANGLE(BlendFuncSeparate)
|
||||
#define glBlitFramebufferEXT MANGLE(BlitFramebufferEXT)
|
||||
#define glBlitFramebuffer MANGLE(BlitFramebuffer)
|
||||
#define glBufferAddressRangeNV MANGLE(BufferAddressRangeNV)
|
||||
#define glBufferDataARB MANGLE(BufferDataARB)
|
||||
#define glBufferData MANGLE(BufferData)
|
||||
#define glBufferParameteriAPPLE MANGLE(BufferParameteriAPPLE)
|
||||
|
@ -202,6 +207,7 @@
|
|||
#define glColor4uiv MANGLE(Color4uiv)
|
||||
#define glColor4us MANGLE(Color4us)
|
||||
#define glColor4usv MANGLE(Color4usv)
|
||||
#define glColorFormatNV MANGLE(ColorFormatNV)
|
||||
#define glColorFragmentOp1ATI MANGLE(ColorFragmentOp1ATI)
|
||||
#define glColorFragmentOp2ATI MANGLE(ColorFragmentOp2ATI)
|
||||
#define glColorFragmentOp3ATI MANGLE(ColorFragmentOp3ATI)
|
||||
|
@ -276,6 +282,7 @@
|
|||
#define glCopyConvolutionFilter1D MANGLE(CopyConvolutionFilter1D)
|
||||
#define glCopyConvolutionFilter2DEXT MANGLE(CopyConvolutionFilter2DEXT)
|
||||
#define glCopyConvolutionFilter2D MANGLE(CopyConvolutionFilter2D)
|
||||
#define glCopyImageSubDataNV MANGLE(CopyImageSubDataNV)
|
||||
#define glCopyMultiTexImage1DEXT MANGLE(CopyMultiTexImage1DEXT)
|
||||
#define glCopyMultiTexImage2DEXT MANGLE(CopyMultiTexImage2DEXT)
|
||||
#define glCopyMultiTexSubImage1DEXT MANGLE(CopyMultiTexSubImage1DEXT)
|
||||
|
@ -302,6 +309,7 @@
|
|||
#define glCreateProgramObjectARB MANGLE(CreateProgramObjectARB)
|
||||
#define glCreateShader MANGLE(CreateShader)
|
||||
#define glCreateShaderObjectARB MANGLE(CreateShaderObjectARB)
|
||||
#define glCreateShaderProgramEXT MANGLE(CreateShaderProgramEXT)
|
||||
#define glCullFace MANGLE(CullFace)
|
||||
#define glCullParameterdvEXT MANGLE(CullParameterdvEXT)
|
||||
#define glCullParameterfvEXT MANGLE(CullParameterfvEXT)
|
||||
|
@ -379,6 +387,7 @@
|
|||
#define glDrawRangeElementsEXT MANGLE(DrawRangeElementsEXT)
|
||||
#define glDrawRangeElements MANGLE(DrawRangeElements)
|
||||
#define glDrawTransformFeedbackNV MANGLE(DrawTransformFeedbackNV)
|
||||
#define glEdgeFlagFormatNV MANGLE(EdgeFlagFormatNV)
|
||||
#define glEdgeFlag MANGLE(EdgeFlag)
|
||||
#define glEdgeFlagPointerEXT MANGLE(EdgeFlagPointerEXT)
|
||||
#define glEdgeFlagPointerListIBM MANGLE(EdgeFlagPointerListIBM)
|
||||
|
@ -408,6 +417,7 @@
|
|||
#define glEndTransformFeedback MANGLE(EndTransformFeedback)
|
||||
#define glEndTransformFeedbackNV MANGLE(EndTransformFeedbackNV)
|
||||
#define glEndVertexShaderEXT MANGLE(EndVertexShaderEXT)
|
||||
#define glEndVideoCaptureNV MANGLE(EndVideoCaptureNV)
|
||||
#define glEvalCoord1d MANGLE(EvalCoord1d)
|
||||
#define glEvalCoord1dv MANGLE(EvalCoord1dv)
|
||||
#define glEvalCoord1f MANGLE(EvalCoord1f)
|
||||
|
@ -445,6 +455,7 @@
|
|||
#define glFogCoorddv MANGLE(FogCoorddv)
|
||||
#define glFogCoordfEXT MANGLE(FogCoordfEXT)
|
||||
#define glFogCoordf MANGLE(FogCoordf)
|
||||
#define glFogCoordFormatNV MANGLE(FogCoordFormatNV)
|
||||
#define glFogCoordfvEXT MANGLE(FogCoordfvEXT)
|
||||
#define glFogCoordfv MANGLE(FogCoordfv)
|
||||
#define glFogCoordhNV MANGLE(FogCoordhNV)
|
||||
|
@ -544,6 +555,7 @@
|
|||
#define glGetBufferParameteri64v MANGLE(GetBufferParameteri64v)
|
||||
#define glGetBufferParameterivARB MANGLE(GetBufferParameterivARB)
|
||||
#define glGetBufferParameteriv MANGLE(GetBufferParameteriv)
|
||||
#define glGetBufferParameterui64vNV MANGLE(GetBufferParameterui64vNV)
|
||||
#define glGetBufferPointervARB MANGLE(GetBufferPointervARB)
|
||||
#define glGetBufferPointerv MANGLE(GetBufferPointerv)
|
||||
#define glGetBufferSubDataARB MANGLE(GetBufferSubDataARB)
|
||||
|
@ -609,6 +621,8 @@
|
|||
#define glGetInteger64v MANGLE(GetInteger64v)
|
||||
#define glGetIntegerIndexedvEXT MANGLE(GetIntegerIndexedvEXT)
|
||||
#define glGetIntegeri_v MANGLE(GetIntegeri_v)
|
||||
#define glGetIntegerui64i_vNV MANGLE(GetIntegerui64i_vNV)
|
||||
#define glGetIntegerui64vNV MANGLE(GetIntegerui64vNV)
|
||||
#define glGetIntegerv MANGLE(GetIntegerv)
|
||||
#define glGetInvariantBooleanvEXT MANGLE(GetInvariantBooleanvEXT)
|
||||
#define glGetInvariantFloatvEXT MANGLE(GetInvariantFloatvEXT)
|
||||
|
@ -651,6 +665,7 @@
|
|||
#define glGetMultiTexParameterIuivEXT MANGLE(GetMultiTexParameterIuivEXT)
|
||||
#define glGetMultiTexParameterivEXT MANGLE(GetMultiTexParameterivEXT)
|
||||
#define glGetNamedBufferParameterivEXT MANGLE(GetNamedBufferParameterivEXT)
|
||||
#define glGetNamedBufferParameterui64vNV MANGLE(GetNamedBufferParameterui64vNV)
|
||||
#define glGetNamedBufferPointervEXT MANGLE(GetNamedBufferPointervEXT)
|
||||
#define glGetNamedBufferSubDataEXT MANGLE(GetNamedBufferSubDataEXT)
|
||||
#define glGetNamedFramebufferAttachmentParameterivEXT MANGLE(GetNamedFramebufferAttachmentParameterivEXT)
|
||||
|
@ -761,6 +776,7 @@
|
|||
#define glGetUniformLocationARB MANGLE(GetUniformLocationARB)
|
||||
#define glGetUniformLocation MANGLE(GetUniformLocation)
|
||||
#define glGetUniformOffsetEXT MANGLE(GetUniformOffsetEXT)
|
||||
#define glGetUniformui64vNV MANGLE(GetUniformui64vNV)
|
||||
#define glGetUniformuivEXT MANGLE(GetUniformuivEXT)
|
||||
#define glGetUniformuiv MANGLE(GetUniformuiv)
|
||||
#define glGetVariantArrayObjectfvATI MANGLE(GetVariantArrayObjectfvATI)
|
||||
|
@ -788,6 +804,10 @@
|
|||
#define glGetVertexAttribPointervARB MANGLE(GetVertexAttribPointervARB)
|
||||
#define glGetVertexAttribPointerv MANGLE(GetVertexAttribPointerv)
|
||||
#define glGetVertexAttribPointervNV MANGLE(GetVertexAttribPointervNV)
|
||||
#define glGetVideoCaptureivNV MANGLE(GetVideoCaptureivNV)
|
||||
#define glGetVideoCaptureStreamdvNV MANGLE(GetVideoCaptureStreamdvNV)
|
||||
#define glGetVideoCaptureStreamfvNV MANGLE(GetVideoCaptureStreamfvNV)
|
||||
#define glGetVideoCaptureStreamivNV MANGLE(GetVideoCaptureStreamivNV)
|
||||
#define glGetVideoi64vNV MANGLE(GetVideoi64vNV)
|
||||
#define glGetVideoivNV MANGLE(GetVideoivNV)
|
||||
#define glGetVideoui64vNV MANGLE(GetVideoui64vNV)
|
||||
|
@ -812,6 +832,7 @@
|
|||
#define glIndexd MANGLE(Indexd)
|
||||
#define glIndexdv MANGLE(Indexdv)
|
||||
#define glIndexf MANGLE(Indexf)
|
||||
#define glIndexFormatNV MANGLE(IndexFormatNV)
|
||||
#define glIndexFuncEXT MANGLE(IndexFuncEXT)
|
||||
#define glIndexfv MANGLE(Indexfv)
|
||||
#define glIndexi MANGLE(Indexi)
|
||||
|
@ -832,6 +853,7 @@
|
|||
#define glIsAsyncMarkerSGIX MANGLE(IsAsyncMarkerSGIX)
|
||||
#define glIsBufferARB MANGLE(IsBufferARB)
|
||||
#define glIsBuffer MANGLE(IsBuffer)
|
||||
#define glIsBufferResidentNV MANGLE(IsBufferResidentNV)
|
||||
#define glIsEnabledi MANGLE(IsEnabledi)
|
||||
#define glIsEnabledIndexedEXT MANGLE(IsEnabledIndexedEXT)
|
||||
#define glIsEnabled MANGLE(IsEnabled)
|
||||
|
@ -840,6 +862,7 @@
|
|||
#define glIsFramebufferEXT MANGLE(IsFramebufferEXT)
|
||||
#define glIsFramebuffer MANGLE(IsFramebuffer)
|
||||
#define glIsList MANGLE(IsList)
|
||||
#define glIsNamedBufferResidentNV MANGLE(IsNamedBufferResidentNV)
|
||||
#define glIsObjectBufferATI MANGLE(IsObjectBufferATI)
|
||||
#define glIsOcclusionQueryNV MANGLE(IsOcclusionQueryNV)
|
||||
#define glIsProgramARB MANGLE(IsProgramARB)
|
||||
|
@ -888,6 +911,8 @@
|
|||
#define glLoadTransposeMatrixf MANGLE(LoadTransposeMatrixf)
|
||||
#define glLockArraysEXT MANGLE(LockArraysEXT)
|
||||
#define glLogicOp MANGLE(LogicOp)
|
||||
#define glMakeBufferNonResidentNV MANGLE(MakeBufferNonResidentNV)
|
||||
#define glMakeBufferResidentNV MANGLE(MakeBufferResidentNV)
|
||||
#define glMap1d MANGLE(Map1d)
|
||||
#define glMap1f MANGLE(Map1f)
|
||||
#define glMap2d MANGLE(Map2d)
|
||||
|
@ -1060,6 +1085,8 @@
|
|||
#define glNamedFramebufferTextureEXT MANGLE(NamedFramebufferTextureEXT)
|
||||
#define glNamedFramebufferTextureFaceEXT MANGLE(NamedFramebufferTextureFaceEXT)
|
||||
#define glNamedFramebufferTextureLayerEXT MANGLE(NamedFramebufferTextureLayerEXT)
|
||||
#define glNamedMakeBufferNonResidentNV MANGLE(NamedMakeBufferNonResidentNV)
|
||||
#define glNamedMakeBufferResidentNV MANGLE(NamedMakeBufferResidentNV)
|
||||
#define glNamedProgramLocalParameter4dEXT MANGLE(NamedProgramLocalParameter4dEXT)
|
||||
#define glNamedProgramLocalParameter4dvEXT MANGLE(NamedProgramLocalParameter4dvEXT)
|
||||
#define glNamedProgramLocalParameter4fEXT MANGLE(NamedProgramLocalParameter4fEXT)
|
||||
|
@ -1091,6 +1118,7 @@
|
|||
#define glNormal3iv MANGLE(Normal3iv)
|
||||
#define glNormal3s MANGLE(Normal3s)
|
||||
#define glNormal3sv MANGLE(Normal3sv)
|
||||
#define glNormalFormatNV MANGLE(NormalFormatNV)
|
||||
#define glNormalPointerEXT MANGLE(NormalPointerEXT)
|
||||
#define glNormalPointerListIBM MANGLE(NormalPointerListIBM)
|
||||
#define glNormalPointer MANGLE(NormalPointer)
|
||||
|
@ -1234,6 +1262,8 @@
|
|||
#define glProgramUniformMatrix4fvEXT MANGLE(ProgramUniformMatrix4fvEXT)
|
||||
#define glProgramUniformMatrix4x2fvEXT MANGLE(ProgramUniformMatrix4x2fvEXT)
|
||||
#define glProgramUniformMatrix4x3fvEXT MANGLE(ProgramUniformMatrix4x3fvEXT)
|
||||
#define glProgramUniformui64NV MANGLE(ProgramUniformui64NV)
|
||||
#define glProgramUniformui64vNV MANGLE(ProgramUniformui64vNV)
|
||||
#define glProgramVertexLimitNV MANGLE(ProgramVertexLimitNV)
|
||||
#define glProvokingVertexEXT MANGLE(ProvokingVertexEXT)
|
||||
#define glProvokingVertex MANGLE(ProvokingVertex)
|
||||
|
@ -1362,6 +1392,7 @@
|
|||
#define glSecondaryColor3us MANGLE(SecondaryColor3us)
|
||||
#define glSecondaryColor3usvEXT MANGLE(SecondaryColor3usvEXT)
|
||||
#define glSecondaryColor3usv MANGLE(SecondaryColor3usv)
|
||||
#define glSecondaryColorFormatNV MANGLE(SecondaryColorFormatNV)
|
||||
#define glSecondaryColorPointerEXT MANGLE(SecondaryColorPointerEXT)
|
||||
#define glSecondaryColorPointerListIBM MANGLE(SecondaryColorPointerListIBM)
|
||||
#define glSecondaryColorPointer MANGLE(SecondaryColorPointer)
|
||||
|
@ -1475,6 +1506,7 @@
|
|||
#define glTexCoord4iv MANGLE(TexCoord4iv)
|
||||
#define glTexCoord4s MANGLE(TexCoord4s)
|
||||
#define glTexCoord4sv MANGLE(TexCoord4sv)
|
||||
#define glTexCoordFormatNV MANGLE(TexCoordFormatNV)
|
||||
#define glTexCoordPointerEXT MANGLE(TexCoordPointerEXT)
|
||||
#define glTexCoordPointerListIBM MANGLE(TexCoordPointerListIBM)
|
||||
#define glTexCoordPointer MANGLE(TexCoordPointer)
|
||||
|
@ -1513,6 +1545,7 @@
|
|||
#define glTexSubImage3DEXT MANGLE(TexSubImage3DEXT)
|
||||
#define glTexSubImage3D MANGLE(TexSubImage3D)
|
||||
#define glTexSubImage4DSGIS MANGLE(TexSubImage4DSGIS)
|
||||
#define glTextureBarrierNV MANGLE(TextureBarrierNV)
|
||||
#define glTextureBufferEXT MANGLE(TextureBufferEXT)
|
||||
#define glTextureColorMaskSGIS MANGLE(TextureColorMaskSGIS)
|
||||
#define glTextureImage1DEXT MANGLE(TextureImage1DEXT)
|
||||
|
@ -1601,6 +1634,8 @@
|
|||
#define glUniformMatrix4fv MANGLE(UniformMatrix4fv)
|
||||
#define glUniformMatrix4x2fv MANGLE(UniformMatrix4x2fv)
|
||||
#define glUniformMatrix4x3fv MANGLE(UniformMatrix4x3fv)
|
||||
#define glUniformui64NV MANGLE(Uniformui64NV)
|
||||
#define glUniformui64vNV MANGLE(Uniformui64vNV)
|
||||
#define glUnlockArraysEXT MANGLE(UnlockArraysEXT)
|
||||
#define glUnmapBufferARB MANGLE(UnmapBufferARB)
|
||||
#define glUnmapBuffer MANGLE(UnmapBuffer)
|
||||
|
@ -1609,6 +1644,7 @@
|
|||
#define glUpdateObjectBufferATI MANGLE(UpdateObjectBufferATI)
|
||||
#define glUseProgram MANGLE(UseProgram)
|
||||
#define glUseProgramObjectARB MANGLE(UseProgramObjectARB)
|
||||
#define glUseShaderProgramEXT MANGLE(UseShaderProgramEXT)
|
||||
#define glValidateProgramARB MANGLE(ValidateProgramARB)
|
||||
#define glValidateProgram MANGLE(ValidateProgram)
|
||||
#define glVariantArrayObjectATI MANGLE(VariantArrayObjectATI)
|
||||
|
@ -1762,6 +1798,7 @@
|
|||
#define glVertexAttrib4usv MANGLE(VertexAttrib4usv)
|
||||
#define glVertexAttribArrayObjectATI MANGLE(VertexAttribArrayObjectATI)
|
||||
#define glVertexAttribDivisorARB MANGLE(VertexAttribDivisorARB)
|
||||
#define glVertexAttribFormatNV MANGLE(VertexAttribFormatNV)
|
||||
#define glVertexAttribI1iEXT MANGLE(VertexAttribI1iEXT)
|
||||
#define glVertexAttribI1i MANGLE(VertexAttribI1i)
|
||||
#define glVertexAttribI1ivEXT MANGLE(VertexAttribI1ivEXT)
|
||||
|
@ -1802,6 +1839,7 @@
|
|||
#define glVertexAttribI4uiv MANGLE(VertexAttribI4uiv)
|
||||
#define glVertexAttribI4usvEXT MANGLE(VertexAttribI4usvEXT)
|
||||
#define glVertexAttribI4usv MANGLE(VertexAttribI4usv)
|
||||
#define glVertexAttribIFormatNV MANGLE(VertexAttribIFormatNV)
|
||||
#define glVertexAttribIPointerEXT MANGLE(VertexAttribIPointerEXT)
|
||||
#define glVertexAttribIPointer MANGLE(VertexAttribIPointer)
|
||||
#define glVertexAttribPointerARB MANGLE(VertexAttribPointerARB)
|
||||
|
@ -1827,6 +1865,7 @@
|
|||
#define glVertexBlendARB MANGLE(VertexBlendARB)
|
||||
#define glVertexBlendEnvfATI MANGLE(VertexBlendEnvfATI)
|
||||
#define glVertexBlendEnviATI MANGLE(VertexBlendEnviATI)
|
||||
#define glVertexFormatNV MANGLE(VertexFormatNV)
|
||||
#define glVertexPointerEXT MANGLE(VertexPointerEXT)
|
||||
#define glVertexPointerListIBM MANGLE(VertexPointerListIBM)
|
||||
#define glVertexPointer MANGLE(VertexPointer)
|
||||
|
@ -1868,6 +1907,10 @@
|
|||
#define glVertexWeighthNV MANGLE(VertexWeighthNV)
|
||||
#define glVertexWeighthvNV MANGLE(VertexWeighthvNV)
|
||||
#define glVertexWeightPointerEXT MANGLE(VertexWeightPointerEXT)
|
||||
#define glVideoCaptureNV MANGLE(VideoCaptureNV)
|
||||
#define glVideoCaptureStreamParameterdvNV MANGLE(VideoCaptureStreamParameterdvNV)
|
||||
#define glVideoCaptureStreamParameterfvNV MANGLE(VideoCaptureStreamParameterfvNV)
|
||||
#define glVideoCaptureStreamParameterivNV MANGLE(VideoCaptureStreamParameterivNV)
|
||||
#define glViewport MANGLE(Viewport)
|
||||
#define glWaitSync MANGLE(WaitSync)
|
||||
#define glWeightbvARB MANGLE(WeightbvARB)
|
||||
|
|
1157
include/GL/glew.h
1157
include/GL/glew.h
File diff suppressed because it is too large
Load Diff
|
@ -452,8 +452,7 @@ GLUTAPI void GLUTAPIENTRY glutInit(int *argcp, char **argv);
|
|||
#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
|
||||
GLUTAPI void GLUTAPIENTRY __glutInitWithExit(int *argcp, char **argv, void (__cdecl *exitfunc)(int));
|
||||
#ifndef GLUT_BUILDING_LIB
|
||||
static void GLUTAPIENTRY glutInit_ATEXIT_HACK(int *argcp, char **argv) { __glutInitWithExit(argcp, argv, exit); }
|
||||
#define glutInit glutInit_ATEXIT_HACK
|
||||
#define glutInit(__argcp, __argv) __glutInitWithExit(__argcp, __argv, exit)
|
||||
#endif
|
||||
#endif
|
||||
GLUTAPI void GLUTAPIENTRY glutInitDisplayMode(unsigned int mode);
|
||||
|
@ -469,8 +468,7 @@ GLUTAPI int GLUTAPIENTRY glutCreateWindow(const char *title);
|
|||
#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
|
||||
GLUTAPI int GLUTAPIENTRY __glutCreateWindowWithExit(const char *title, void (__cdecl *exitfunc)(int));
|
||||
#ifndef GLUT_BUILDING_LIB
|
||||
static int GLUTAPIENTRY glutCreateWindow_ATEXIT_HACK(const char *title) { return __glutCreateWindowWithExit(title, exit); }
|
||||
#define glutCreateWindow glutCreateWindow_ATEXIT_HACK
|
||||
#define glutCreateWindow(__title) __glutCreateWindowWithExit(__title, exit)
|
||||
#endif
|
||||
#endif
|
||||
GLUTAPI int GLUTAPIENTRY glutCreateSubWindow(int win, int x, int y, int width, int height);
|
||||
|
@ -515,8 +513,7 @@ GLUTAPI int GLUTAPIENTRY glutCreateMenu(void (GLUTCALLBACK *func)(int));
|
|||
#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
|
||||
GLUTAPI int GLUTAPIENTRY __glutCreateMenuWithExit(void (GLUTCALLBACK *func)(int), void (__cdecl *exitfunc)(int));
|
||||
#ifndef GLUT_BUILDING_LIB
|
||||
static int GLUTAPIENTRY glutCreateMenu_ATEXIT_HACK(void (GLUTCALLBACK *func)(int)) { return __glutCreateMenuWithExit(func, exit); }
|
||||
#define glutCreateMenu glutCreateMenu_ATEXIT_HACK
|
||||
#define glutCreateMenu(__func) __glutCreateMenuWithExit(__func, exit)
|
||||
#endif
|
||||
#endif
|
||||
GLUTAPI void GLUTAPIENTRY glutDestroyMenu(int menu);
|
||||
|
|
|
@ -186,6 +186,16 @@ typedef XID GLXWindow;
|
|||
typedef XID GLXPbuffer;
|
||||
|
||||
|
||||
/*
|
||||
** Events.
|
||||
** __GLX_NUMBER_EVENTS is set to 17 to account for the BufferClobberSGIX
|
||||
** event - this helps initialization if the server supports the pbuffer
|
||||
** extension and the client doesn't.
|
||||
*/
|
||||
#define GLX_PbufferClobber 0
|
||||
#define GLX_BufferSwapComplete 1
|
||||
|
||||
#define __GLX_NUMBER_EVENTS 17
|
||||
|
||||
extern XVisualInfo* glXChooseVisual( Display *dpy, int screen,
|
||||
int *attribList );
|
||||
|
@ -507,8 +517,17 @@ typedef struct {
|
|||
int count; /* if nonzero, at least this many more */
|
||||
} GLXPbufferClobberEvent;
|
||||
|
||||
typedef struct {
|
||||
int event_type;
|
||||
GLXDrawable drawable;
|
||||
int64_t ust;
|
||||
int64_t msc;
|
||||
int64_t sbc;
|
||||
} GLXBufferSwapComplete;
|
||||
|
||||
typedef union __GLXEvent {
|
||||
GLXPbufferClobberEvent glxpbufferclobber;
|
||||
GLXBufferSwapComplete glxbufferswapcomplete;
|
||||
long pad[24];
|
||||
} GLXEvent;
|
||||
|
||||
|
|
|
@ -76,6 +76,7 @@
|
|||
|
||||
/* GLX 1.4 */
|
||||
#define glXGetProcAddress mglXGetProcAddress
|
||||
#define glXGetProcAddressARB mglXGetProcAddressARB
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -362,6 +362,19 @@ typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display* dpy, GLXFBCo
|
|||
|
||||
#endif /* GLX_ARB_create_context */
|
||||
|
||||
/* --------------------- GLX_ARB_create_context_profile -------------------- */
|
||||
|
||||
#ifndef GLX_ARB_create_context_profile
|
||||
#define GLX_ARB_create_context_profile 1
|
||||
|
||||
#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
|
||||
#define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
|
||||
#define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126
|
||||
|
||||
#define GLXEW_ARB_create_context_profile GLXEW_GET_VAR(__GLXEW_ARB_create_context_profile)
|
||||
|
||||
#endif /* GLX_ARB_create_context_profile */
|
||||
|
||||
/* ------------------------- GLX_ARB_fbconfig_float ------------------------ */
|
||||
|
||||
#ifndef GLX_ARB_fbconfig_float
|
||||
|
@ -529,6 +542,22 @@ typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display* dpy, GLXContext context
|
|||
|
||||
#endif /* GLX_EXT_scene_marker */
|
||||
|
||||
/* -------------------------- GLX_EXT_swap_control ------------------------- */
|
||||
|
||||
#ifndef GLX_EXT_swap_control
|
||||
#define GLX_EXT_swap_control 1
|
||||
|
||||
#define GLX_SWAP_INTERVAL_EXT 0x20F1
|
||||
#define GLX_MAX_SWAP_INTERVAL_EXT 0x20F2
|
||||
|
||||
typedef void ( * PFNGLXSWAPINTERVALEXTPROC) (Display* dpy, GLXDrawable drawable, int interval);
|
||||
|
||||
#define glXSwapIntervalEXT GLXEW_GET_FUN(__glewXSwapIntervalEXT)
|
||||
|
||||
#define GLXEW_EXT_swap_control GLXEW_GET_VAR(__GLXEW_EXT_swap_control)
|
||||
|
||||
#endif /* GLX_EXT_swap_control */
|
||||
|
||||
/* ---------------------- GLX_EXT_texture_from_pixmap ---------------------- */
|
||||
|
||||
#ifndef GLX_EXT_texture_from_pixmap
|
||||
|
@ -683,6 +712,19 @@ typedef GLboolean ( * PFNGLXSET3DFXMODEMESAPROC) (GLint mode);
|
|||
|
||||
#endif /* GLX_MESA_set_3dfx_mode */
|
||||
|
||||
/* --------------------------- GLX_NV_copy_image --------------------------- */
|
||||
|
||||
#ifndef GLX_NV_copy_image
|
||||
#define GLX_NV_copy_image 1
|
||||
|
||||
typedef void ( * PFNGLXCOPYIMAGESUBDATANVPROC) (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
|
||||
|
||||
#define glXCopyImageSubDataNV GLXEW_GET_FUN(__glewXCopyImageSubDataNV)
|
||||
|
||||
#define GLXEW_NV_copy_image GLXEW_GET_VAR(__GLXEW_NV_copy_image)
|
||||
|
||||
#endif /* GLX_NV_copy_image */
|
||||
|
||||
/* -------------------------- GLX_NV_float_buffer -------------------------- */
|
||||
|
||||
#ifndef GLX_NV_float_buffer
|
||||
|
@ -1217,6 +1259,8 @@ extern PFNGLXGETCONTEXTIDEXTPROC __glewXGetContextIDEXT;
|
|||
extern PFNGLXIMPORTCONTEXTEXTPROC __glewXImportContextEXT;
|
||||
extern PFNGLXQUERYCONTEXTINFOEXTPROC __glewXQueryContextInfoEXT;
|
||||
|
||||
extern PFNGLXSWAPINTERVALEXTPROC __glewXSwapIntervalEXT;
|
||||
|
||||
extern PFNGLXBINDTEXIMAGEEXTPROC __glewXBindTexImageEXT;
|
||||
extern PFNGLXRELEASETEXIMAGEEXTPROC __glewXReleaseTexImageEXT;
|
||||
|
||||
|
@ -1230,6 +1274,8 @@ extern PFNGLXRELEASEBUFFERSMESAPROC __glewXReleaseBuffersMESA;
|
|||
|
||||
extern PFNGLXSET3DFXMODEMESAPROC __glewXSet3DfxModeMESA;
|
||||
|
||||
extern PFNGLXCOPYIMAGESUBDATANVPROC __glewXCopyImageSubDataNV;
|
||||
|
||||
extern PFNGLXBINDVIDEODEVICENVPROC __glewXBindVideoDeviceNV;
|
||||
extern PFNGLXENUMERATEVIDEODEVICESNVPROC __glewXEnumerateVideoDevicesNV;
|
||||
|
||||
|
@ -1318,6 +1364,7 @@ GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_3;
|
|||
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_4;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_3DFX_multisample;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_create_context;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_create_context_profile;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_fbconfig_float;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_framebuffer_sRGB;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_ARB_get_proc_address;
|
||||
|
@ -1328,6 +1375,7 @@ GLXEW_EXPORT GLboolean __GLXEW_EXT_fbconfig_packed_float;
|
|||
GLXEW_EXPORT GLboolean __GLXEW_EXT_framebuffer_sRGB;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_import_context;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_scene_marker;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_swap_control;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_texture_from_pixmap;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_info;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_rating;
|
||||
|
@ -1336,6 +1384,7 @@ GLXEW_EXPORT GLboolean __GLXEW_MESA_copy_sub_buffer;
|
|||
GLXEW_EXPORT GLboolean __GLXEW_MESA_pixmap_colormap;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_MESA_release_buffers;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_MESA_set_3dfx_mode;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_NV_copy_image;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_NV_float_buffer;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_NV_present_video;
|
||||
GLXEW_EXPORT GLboolean __GLXEW_NV_swap_group;
|
||||
|
|
|
@ -696,6 +696,14 @@ extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable);
|
|||
typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
|
||||
#endif
|
||||
|
||||
#ifndef GLX_INTEL_swap_event
|
||||
#define GLX_INTEL_swap_event
|
||||
#define GLX_BUFFER_SWAP_COMPLETE_MASK 0x10000000
|
||||
#define GLX_EXCHANGE_COMPLETE 0x8024
|
||||
#define GLX_BLIT_COMPLETE 0x8025
|
||||
#define GLX_FLIP_COMPLETE 0x8026
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGIX_swap_barrier
|
||||
#define GLX_SGIX_swap_barrier 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
|
|
|
@ -262,10 +262,22 @@ struct __DRItexBufferExtensionRec {
|
|||
* Used by drivers that implement DRI2
|
||||
*/
|
||||
#define __DRI2_FLUSH "DRI2_Flush"
|
||||
#define __DRI2_FLUSH_VERSION 1
|
||||
#define __DRI2_FLUSH_VERSION 2
|
||||
struct __DRI2flushExtensionRec {
|
||||
__DRIextension base;
|
||||
void (*flush)(__DRIdrawable *drawable);
|
||||
|
||||
/**
|
||||
* Flush all rendering queue in the driver to the drm and
|
||||
* invalidate all buffers. The driver will call out to
|
||||
* getBuffers/getBuffersWithFormat before it starts rendering
|
||||
* again.
|
||||
*
|
||||
* \param drawable the drawable to flush and invalidate
|
||||
*
|
||||
* \since 2
|
||||
*/
|
||||
void (*flushInvalidate)(__DRIdrawable *drawable);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -62,11 +62,12 @@
|
|||
|
||||
#define __wglext_h_
|
||||
|
||||
#if !defined(APIENTRY) && !defined(__CYGWIN__)
|
||||
#if !defined(WINAPI)
|
||||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN 1
|
||||
# endif
|
||||
#include <windows.h>
|
||||
# undef WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -117,6 +118,46 @@ typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState
|
|||
|
||||
#endif /* WGL_3DL_stereo_control */
|
||||
|
||||
/* ------------------------ WGL_AMD_gpu_association ------------------------ */
|
||||
|
||||
#ifndef WGL_AMD_gpu_association
|
||||
#define WGL_AMD_gpu_association 1
|
||||
|
||||
#define WGL_GPU_VENDOR_AMD 0x1F00
|
||||
#define WGL_GPU_RENDERER_STRING_AMD 0x1F01
|
||||
#define WGL_GPU_OPENGL_VERSION_STRING_AMD 0x1F02
|
||||
#define WGL_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2
|
||||
#define WGL_GPU_RAM_AMD 0x21A3
|
||||
#define WGL_GPU_CLOCK_AMD 0x21A4
|
||||
#define WGL_GPU_NUM_PIPES_AMD 0x21A5
|
||||
#define WGL_GPU_NUM_SIMD_AMD 0x21A6
|
||||
#define WGL_GPU_NUM_RB_AMD 0x21A7
|
||||
#define WGL_GPU_NUM_SPI_AMD 0x21A8
|
||||
|
||||
typedef VOID (WINAPI * PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC) (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC) (UINT id);
|
||||
typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (UINT id, HGLRC hShareContext, const int* attribList);
|
||||
typedef BOOL (WINAPI * PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC) (HGLRC hglrc);
|
||||
typedef UINT (WINAPI * PFNWGLGETCONTEXTGPUIDAMDPROC) (HGLRC hglrc);
|
||||
typedef HGLRC (WINAPI * PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void);
|
||||
typedef UINT (WINAPI * PFNWGLGETGPUIDSAMDPROC) (UINT maxCount, UINT* ids);
|
||||
typedef INT (WINAPI * PFNWGLGETGPUINFOAMDPROC) (UINT id, INT property, GLenum dataType, UINT size, void* data);
|
||||
typedef BOOL (WINAPI * PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (HGLRC hglrc);
|
||||
|
||||
#define wglBlitContextFramebufferAMD WGLEW_GET_FUN(__wglewBlitContextFramebufferAMD)
|
||||
#define wglCreateAssociatedContextAMD WGLEW_GET_FUN(__wglewCreateAssociatedContextAMD)
|
||||
#define wglCreateAssociatedContextAttribsAMD WGLEW_GET_FUN(__wglewCreateAssociatedContextAttribsAMD)
|
||||
#define wglDeleteAssociatedContextAMD WGLEW_GET_FUN(__wglewDeleteAssociatedContextAMD)
|
||||
#define wglGetContextGPUIDAMD WGLEW_GET_FUN(__wglewGetContextGPUIDAMD)
|
||||
#define wglGetCurrentAssociatedContextAMD WGLEW_GET_FUN(__wglewGetCurrentAssociatedContextAMD)
|
||||
#define wglGetGPUIDsAMD WGLEW_GET_FUN(__wglewGetGPUIDsAMD)
|
||||
#define wglGetGPUInfoAMD WGLEW_GET_FUN(__wglewGetGPUInfoAMD)
|
||||
#define wglMakeAssociatedContextCurrentAMD WGLEW_GET_FUN(__wglewMakeAssociatedContextCurrentAMD)
|
||||
|
||||
#define WGLEW_AMD_gpu_association WGLEW_GET_VAR(__WGLEW_AMD_gpu_association)
|
||||
|
||||
#endif /* WGL_AMD_gpu_association */
|
||||
|
||||
/* ------------------------- WGL_ARB_buffer_region ------------------------- */
|
||||
|
||||
#ifndef WGL_ARB_buffer_region
|
||||
|
@ -161,6 +202,19 @@ typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShar
|
|||
|
||||
#endif /* WGL_ARB_create_context */
|
||||
|
||||
/* --------------------- WGL_ARB_create_context_profile -------------------- */
|
||||
|
||||
#ifndef WGL_ARB_create_context_profile
|
||||
#define WGL_ARB_create_context_profile 1
|
||||
|
||||
#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
|
||||
#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
|
||||
#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
|
||||
|
||||
#define WGLEW_ARB_create_context_profile WGLEW_GET_VAR(__WGLEW_ARB_create_context_profile)
|
||||
|
||||
#endif /* WGL_ARB_create_context_profile */
|
||||
|
||||
/* ----------------------- WGL_ARB_extensions_string ----------------------- */
|
||||
|
||||
#ifndef WGL_ARB_extensions_string
|
||||
|
@ -752,6 +806,19 @@ typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD* pFrameCount, DWO
|
|||
|
||||
#endif /* WGL_I3D_swap_frame_usage */
|
||||
|
||||
/* --------------------------- WGL_NV_copy_image --------------------------- */
|
||||
|
||||
#ifndef WGL_NV_copy_image
|
||||
#define WGL_NV_copy_image 1
|
||||
|
||||
typedef BOOL (WINAPI * PFNWGLCOPYIMAGESUBDATANVPROC) (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
|
||||
|
||||
#define wglCopyImageSubDataNV WGLEW_GET_FUN(__wglewCopyImageSubDataNV)
|
||||
|
||||
#define WGLEW_NV_copy_image WGLEW_GET_VAR(__WGLEW_NV_copy_image)
|
||||
|
||||
#endif /* WGL_NV_copy_image */
|
||||
|
||||
/* -------------------------- WGL_NV_float_buffer -------------------------- */
|
||||
|
||||
#ifndef WGL_NV_float_buffer
|
||||
|
@ -863,7 +930,7 @@ typedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrie
|
|||
typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint* count);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint* maxGroups, GLuint *maxBarriers);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint* group);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint* group, GLuint *barrier);
|
||||
typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC);
|
||||
|
||||
#define wglBindSwapBarrierNV WGLEW_GET_FUN(__wglewBindSwapBarrierNV)
|
||||
|
@ -969,6 +1036,16 @@ struct WGLEWContextStruct
|
|||
|
||||
WGLEW_EXPORT PFNWGLSETSTEREOEMITTERSTATE3DLPROC __wglewSetStereoEmitterState3DL;
|
||||
|
||||
WGLEW_EXPORT PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC __wglewBlitContextFramebufferAMD;
|
||||
WGLEW_EXPORT PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC __wglewCreateAssociatedContextAMD;
|
||||
WGLEW_EXPORT PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC __wglewCreateAssociatedContextAttribsAMD;
|
||||
WGLEW_EXPORT PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC __wglewDeleteAssociatedContextAMD;
|
||||
WGLEW_EXPORT PFNWGLGETCONTEXTGPUIDAMDPROC __wglewGetContextGPUIDAMD;
|
||||
WGLEW_EXPORT PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC __wglewGetCurrentAssociatedContextAMD;
|
||||
WGLEW_EXPORT PFNWGLGETGPUIDSAMDPROC __wglewGetGPUIDsAMD;
|
||||
WGLEW_EXPORT PFNWGLGETGPUINFOAMDPROC __wglewGetGPUInfoAMD;
|
||||
WGLEW_EXPORT PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC __wglewMakeAssociatedContextCurrentAMD;
|
||||
|
||||
WGLEW_EXPORT PFNWGLCREATEBUFFERREGIONARBPROC __wglewCreateBufferRegionARB;
|
||||
WGLEW_EXPORT PFNWGLDELETEBUFFERREGIONARBPROC __wglewDeleteBufferRegionARB;
|
||||
WGLEW_EXPORT PFNWGLRESTOREBUFFERREGIONARBPROC __wglewRestoreBufferRegionARB;
|
||||
|
@ -1054,6 +1131,8 @@ WGLEW_EXPORT PFNWGLENDFRAMETRACKINGI3DPROC __wglewEndFrameTrackingI3D;
|
|||
WGLEW_EXPORT PFNWGLGETFRAMEUSAGEI3DPROC __wglewGetFrameUsageI3D;
|
||||
WGLEW_EXPORT PFNWGLQUERYFRAMETRACKINGI3DPROC __wglewQueryFrameTrackingI3D;
|
||||
|
||||
WGLEW_EXPORT PFNWGLCOPYIMAGESUBDATANVPROC __wglewCopyImageSubDataNV;
|
||||
|
||||
WGLEW_EXPORT PFNWGLCREATEAFFINITYDCNVPROC __wglewCreateAffinityDCNV;
|
||||
WGLEW_EXPORT PFNWGLDELETEDCNVPROC __wglewDeleteDCNV;
|
||||
WGLEW_EXPORT PFNWGLENUMGPUDEVICESNVPROC __wglewEnumGpuDevicesNV;
|
||||
|
@ -1089,8 +1168,10 @@ WGLEW_EXPORT PFNWGLWAITFORMSCOMLPROC __wglewWaitForMscOML;
|
|||
WGLEW_EXPORT PFNWGLWAITFORSBCOMLPROC __wglewWaitForSbcOML;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_3DFX_multisample;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_3DL_stereo_control;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_AMD_gpu_association;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_buffer_region;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_create_context;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_create_context_profile;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_extensions_string;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_framebuffer_sRGB;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_ARB_make_current_read;
|
||||
|
@ -1117,6 +1198,7 @@ WGLEW_EXPORT GLboolean __WGLEW_I3D_genlock;
|
|||
WGLEW_EXPORT GLboolean __WGLEW_I3D_image_buffer;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_swap_frame_lock;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_I3D_swap_frame_usage;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_copy_image;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_float_buffer;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_gpu_affinity;
|
||||
WGLEW_EXPORT GLboolean __WGLEW_NV_present_video;
|
||||
|
|
|
@ -38,6 +38,11 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
|
||||
# define VG_API_CALL __attribute__((visibility("default")))
|
||||
# define VGU_API_CALL __attribute__((visibility("default")))
|
||||
#endif
|
||||
|
||||
#ifndef VG_API_CALL
|
||||
#if defined(OPENVG_STATIC_LIBRARY)
|
||||
# define VG_API_CALL
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2006 Tungsten Graphics, Inc., Bismarck, ND., USA
|
||||
*
|
||||
* Copyright 2007-2010 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
|
||||
|
@ -10,32 +10,37 @@
|
|||
* 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 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, AUTHORS AND/OR ITS 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
|
||||
* 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.
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the
|
||||
* next paragraph) shall be included in all copies or substantial portions
|
||||
* of the Software.
|
||||
*
|
||||
*
|
||||
*
|
||||
**************************************************************************/
|
||||
/*
|
||||
* Authors: Keith Whitwell <keithw-at-tungstengraphics-dot-com>
|
||||
*/
|
||||
|
||||
#include "radeon_winsys_softpipe.h"
|
||||
#ifndef _STDBOOL_H_
|
||||
#define _STDBOOL_H_
|
||||
|
||||
struct pipe_context *radeon_create_softpipe(struct pipe_winsys* winsys)
|
||||
{
|
||||
struct pipe_screen *pipe_screen;
|
||||
#ifndef __cplusplus
|
||||
|
||||
pipe_screen = softpipe_create_screen(winsys);
|
||||
#define false 0
|
||||
#define true 1
|
||||
#define bool _Bool
|
||||
|
||||
return softpipe_create(pipe_screen);
|
||||
}
|
||||
/* For compilers that don't have the builtin _Bool type. */
|
||||
#if defined(_MSC_VER) || (__STDC_VERSION__ < 199901L && __GNUC__ < 3)
|
||||
typedef unsigned char _Bool;
|
||||
#endif
|
||||
|
||||
#endif /* !__cplusplus */
|
||||
|
||||
#define __bool_true_false_are_defined 1
|
||||
|
||||
#endif /* !_STDBOOL_H_ */
|
|
@ -0,0 +1,119 @@
|
|||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2007-2010 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, 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 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, AUTHORS AND/OR ITS 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.
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the
|
||||
* next paragraph) shall be included in all copies or substantial portions
|
||||
* of the Software.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
/*
|
||||
* stdint.h --
|
||||
*
|
||||
* Portable subset of C99's stdint.h.
|
||||
*
|
||||
* At the moment it only supports MSVC, given all other mainstream compilers
|
||||
* already support C99. If this is necessary for other compilers then it
|
||||
* might be worth to replace this with
|
||||
* http://www.azillionmonkeys.com/qed/pstdint.h.
|
||||
*/
|
||||
|
||||
#ifndef _STDINT_H_
|
||||
#define _STDINT_H_
|
||||
|
||||
|
||||
#ifndef INT8_MAX
|
||||
#define INT8_MAX 127
|
||||
#endif
|
||||
#ifndef INT8_MIN
|
||||
#define INT8_MIN -128
|
||||
#endif
|
||||
#ifndef UINT8_MAX
|
||||
#define UINT8_MAX 255
|
||||
#endif
|
||||
#ifndef INT16_MAX
|
||||
#define INT16_MAX 32767
|
||||
#endif
|
||||
#ifndef INT16_MIN
|
||||
#define INT16_MIN -32768
|
||||
#endif
|
||||
#ifndef UINT16_MAX
|
||||
#define UINT16_MAX 65535
|
||||
#endif
|
||||
#ifndef INT32_MAX
|
||||
#define INT32_MAX 2147483647
|
||||
#endif
|
||||
#ifndef INT32_MIN
|
||||
#define INT32_MIN -2147483648
|
||||
#endif
|
||||
#ifndef UINT32_MAX
|
||||
#define UINT32_MAX 4294967295U
|
||||
#endif
|
||||
|
||||
#ifndef INT8_C
|
||||
#define INT8_C(__val) __val
|
||||
#endif
|
||||
#ifndef UINT8_C
|
||||
#define UINT8_C(__val) __val
|
||||
#endif
|
||||
#ifndef INT16_C
|
||||
#define INT16_C(__val) __val
|
||||
#endif
|
||||
#ifndef UINT16_C
|
||||
#define UINT16_C(__val) __val
|
||||
#endif
|
||||
#ifndef INT32_C
|
||||
#define INT32_C(__val) __val
|
||||
#endif
|
||||
#ifndef UINT32_C
|
||||
#define UINT32_C(__val) __val##U
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
|
||||
typedef __int8 int8_t;
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef __int16 int16_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
#ifndef __eglplatform_h_
|
||||
typedef __int32 int32_t;
|
||||
#endif
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
|
||||
#if defined(_WIN64)
|
||||
typedef __int64 intptr_t;
|
||||
typedef unsigned __int64 uintptr_t;
|
||||
#else
|
||||
typedef __int32 intptr_t;
|
||||
typedef unsigned __int32 uintptr_t;
|
||||
#endif
|
||||
|
||||
#define INT64_C(__val) __val##i64
|
||||
#define UINT64_C(__val) __val##ui64
|
||||
|
||||
#else
|
||||
#error "Unsupported compiler"
|
||||
#endif
|
||||
|
||||
#endif /* _STDINT_H_ */
|
|
@ -0,0 +1 @@
|
|||
*.dSYM
|
|
@ -15,22 +15,18 @@ message:
|
|||
|
||||
|
||||
subdirs:
|
||||
@if test -n "$(SUBDIRS)" ; then \
|
||||
for dir in $(SUBDIRS) ; do \
|
||||
if [ -d $$dir ] ; then \
|
||||
(cd $$dir && $(MAKE)) || exit 1 ; \
|
||||
fi \
|
||||
done \
|
||||
fi
|
||||
@list='$(SUBDIRS)'; for dir in $$list ; do \
|
||||
if [ -d $$dir ] ; then \
|
||||
(cd $$dir && $(MAKE)) || exit 1 ; \
|
||||
fi \
|
||||
done
|
||||
|
||||
# Dummy install target
|
||||
install:
|
||||
|
||||
clean:
|
||||
-@if test -n "$(SUBDIRS)" ; then \
|
||||
for dir in $(SUBDIRS) tests ; do \
|
||||
if [ -d $$dir ] ; then \
|
||||
(cd $$dir && $(MAKE) clean) ; \
|
||||
fi \
|
||||
done \
|
||||
fi
|
||||
@list='$(SUBDIRS)'; for dir in $$list tests ; do \
|
||||
if [ -d $$dir ] ; then \
|
||||
(cd $$dir && $(MAKE) clean) ; \
|
||||
fi \
|
||||
done
|
||||
|
|
|
@ -1,5 +1,43 @@
|
|||
SConscript([
|
||||
'util/SConscript',
|
||||
])
|
||||
|
||||
Import('*')
|
||||
|
||||
progs_env = env.Clone()
|
||||
|
||||
if progs_env['platform'] == 'windows':
|
||||
progs_env.Append(CPPDEFINES = ['NOMINMAX'])
|
||||
progs_env.Prepend(LIBS = [
|
||||
'winmm',
|
||||
'kernel32',
|
||||
'user32',
|
||||
'gdi32',
|
||||
])
|
||||
|
||||
# OpenGL
|
||||
if progs_env['platform'] == 'windows':
|
||||
progs_env.Prepend(LIBS = ['glu32', 'opengl32'])
|
||||
else:
|
||||
progs_env.Prepend(LIBS = ['GLU', 'GL'])
|
||||
|
||||
# Glut
|
||||
progs_env.Prepend(LIBS = [glut])
|
||||
|
||||
# GLEW
|
||||
progs_env.Prepend(LIBS = [glew])
|
||||
|
||||
progs_env.Prepend(CPPPATH = [
|
||||
'#progs/util',
|
||||
])
|
||||
|
||||
progs_env.Prepend(LIBS = [
|
||||
util,
|
||||
])
|
||||
|
||||
Export('progs_env')
|
||||
|
||||
SConscript([
|
||||
'demos/SConscript',
|
||||
'glsl/SConscript',
|
||||
'redbook/SConscript',
|
||||
|
|
|
@ -1,65 +0,0 @@
|
|||
import os
|
||||
import os.path
|
||||
import sys
|
||||
|
||||
env = Environment(
|
||||
tools = ['generic'],
|
||||
toolpath = ['../scons'],
|
||||
ENV = os.environ,
|
||||
)
|
||||
|
||||
|
||||
# Use Mesa's headers and libs
|
||||
if 1:
|
||||
build_topdir = 'build'
|
||||
build_subdir = env['platform']
|
||||
if env['machine'] != 'generic':
|
||||
build_subdir += '-' + env['machine']
|
||||
if env['debug']:
|
||||
build_subdir += "-debug"
|
||||
if env['profile']:
|
||||
build_subdir += "-profile"
|
||||
build_dir = os.path.join(build_topdir, build_subdir)
|
||||
|
||||
env.Append(CPPDEFINES = ['GLEW_STATIC'])
|
||||
env.Append(CPPPATH = ['#../include'])
|
||||
env.Append(LIBPATH = [
|
||||
'#../' + build_dir + '/glew/',
|
||||
'#../' + build_dir + '/glut/glx',
|
||||
])
|
||||
|
||||
|
||||
conf = Configure(env)
|
||||
|
||||
# OpenGL
|
||||
if env['platform'] == 'windows':
|
||||
env.Prepend(LIBS = ['glu32', 'opengl32'])
|
||||
else:
|
||||
env.Prepend(LIBS = ['GLU', 'GL'])
|
||||
|
||||
# Glut
|
||||
env['GLUT'] = False
|
||||
if conf.CheckCHeader('GL/glut.h'):
|
||||
if env['platform'] == 'windows':
|
||||
env['GLUT_LIB'] = 'glut32'
|
||||
else:
|
||||
env['GLUT_LIB'] = 'glut'
|
||||
env['GLUT'] = True
|
||||
|
||||
# GLEW
|
||||
env['GLEW'] = False
|
||||
if conf.CheckCHeader('GL/glew.h'):
|
||||
env['GLEW_LIB'] = 'glew'
|
||||
env['GLEW'] = True
|
||||
env.Prepend(LIBS = ['glew'])
|
||||
|
||||
conf.Finish()
|
||||
|
||||
|
||||
Export('env')
|
||||
|
||||
SConscript(
|
||||
'SConscript',
|
||||
build_dir = env['build'],
|
||||
duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
|
||||
)
|
|
@ -1,84 +1,66 @@
|
|||
Import('*')
|
||||
|
||||
if not env['GLUT']:
|
||||
Return()
|
||||
|
||||
env = env.Clone()
|
||||
|
||||
env.Prepend(CPPPATH = [
|
||||
'../util',
|
||||
])
|
||||
|
||||
env.Prepend(LIBS = [
|
||||
util,
|
||||
'$GLUT_LIB'
|
||||
])
|
||||
|
||||
if env['platform'] == 'windows':
|
||||
env.Append(CPPDEFINES = ['NOMINMAX'])
|
||||
env.Prepend(LIBS = ['winmm'])
|
||||
|
||||
progs = [
|
||||
'arbfplight',
|
||||
'arbfslight',
|
||||
'arbocclude',
|
||||
'bounce',
|
||||
'clearspd',
|
||||
'copypix',
|
||||
'cubemap',
|
||||
'drawpix',
|
||||
'engine',
|
||||
'fbo_firecube',
|
||||
'fire',
|
||||
'fogcoord',
|
||||
'fplight',
|
||||
'fslight',
|
||||
'gamma',
|
||||
'gearbox',
|
||||
'gears',
|
||||
'geartrain',
|
||||
'glinfo',
|
||||
'gloss',
|
||||
'gltestperf',
|
||||
'ipers',
|
||||
'isosurf',
|
||||
'lodbias',
|
||||
'morph3d',
|
||||
'multiarb',
|
||||
'paltex',
|
||||
'pointblast',
|
||||
'ray',
|
||||
'readpix',
|
||||
'reflect',
|
||||
'renormal',
|
||||
'shadowtex',
|
||||
'singlebuffer',
|
||||
'spectex',
|
||||
'spriteblast',
|
||||
'stex3d',
|
||||
'teapot',
|
||||
'terrain',
|
||||
'tessdemo',
|
||||
'texcyl',
|
||||
'texenv',
|
||||
'textures',
|
||||
'trispd',
|
||||
'tunnel',
|
||||
'tunnel2',
|
||||
'vao_demo',
|
||||
'winpos',
|
||||
'dinoshade',
|
||||
'fbotexture',
|
||||
'projtex',
|
||||
'arbfplight',
|
||||
'arbfslight',
|
||||
'arbocclude',
|
||||
'bounce',
|
||||
'clearspd',
|
||||
'copypix',
|
||||
'cubemap',
|
||||
'drawpix',
|
||||
'engine',
|
||||
'fbo_firecube',
|
||||
'fire',
|
||||
'fogcoord',
|
||||
'fplight',
|
||||
'fslight',
|
||||
'gamma',
|
||||
'gearbox',
|
||||
'gears',
|
||||
'geartrain',
|
||||
'glinfo',
|
||||
'gloss',
|
||||
'gltestperf',
|
||||
'ipers',
|
||||
'isosurf',
|
||||
'lodbias',
|
||||
'morph3d',
|
||||
'multiarb',
|
||||
'paltex',
|
||||
'pointblast',
|
||||
'ray',
|
||||
'readpix',
|
||||
'reflect',
|
||||
'renormal',
|
||||
'shadowtex',
|
||||
'singlebuffer',
|
||||
'spectex',
|
||||
'spriteblast',
|
||||
'stex3d',
|
||||
'teapot',
|
||||
'terrain',
|
||||
'tessdemo',
|
||||
'texcyl',
|
||||
'texenv',
|
||||
'textures',
|
||||
'trispd',
|
||||
'tunnel',
|
||||
'tunnel2',
|
||||
'vao_demo',
|
||||
'winpos',
|
||||
'dinoshade',
|
||||
'fbotexture',
|
||||
'projtex',
|
||||
]
|
||||
|
||||
for prog in progs:
|
||||
env.Program(
|
||||
progs_env.Program(
|
||||
target = prog,
|
||||
source = prog + '.c',
|
||||
)
|
||||
|
||||
env.Program(
|
||||
progs_env.Program(
|
||||
target = 'rain',
|
||||
source = [
|
||||
'rain.cxx',
|
||||
|
|
|
@ -388,9 +388,8 @@ static void Init( void )
|
|||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
glutInit( &argc, argv );
|
||||
glutInitWindowPosition( 0, 0 );
|
||||
glutInitWindowSize( 200, 200 );
|
||||
glutInit( &argc, argv );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
||||
Win = glutCreateWindow(argv[0]);
|
||||
glutReshapeFunc( Reshape );
|
||||
|
|
|
@ -311,9 +311,8 @@ static void Init (void)
|
|||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
glutInit (&argc, argv);
|
||||
glutInitWindowPosition ( 0, 0);
|
||||
glutInitWindowSize (200, 200);
|
||||
glutInit (&argc, argv);
|
||||
glutInitDisplayMode (GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
||||
glutCreateWindow (argv[0]);
|
||||
glutReshapeFunc (Reshape);
|
||||
|
|
|
@ -268,9 +268,8 @@ static void Init( void )
|
|||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
glutInit( &argc, argv );
|
||||
glutInitWindowPosition( 0, 0 );
|
||||
glutInitWindowSize( 400, 400 );
|
||||
glutInit( &argc, argv );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
||||
Win = glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
|
|
|
@ -192,10 +192,8 @@ visible(int vis)
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
glutInit(&argc, argv);
|
||||
glutInitWindowPosition(0, 0);
|
||||
glutInitWindowSize(600, 450);
|
||||
|
||||
glutInit(&argc, argv);
|
||||
|
||||
IndexMode = argc > 1 && strcmp(argv[1], "-ci") == 0;
|
||||
if (IndexMode)
|
||||
|
|
|
@ -187,9 +187,8 @@ int main( int argc, char *argv[] )
|
|||
|
||||
Init( argc, argv );
|
||||
|
||||
glutInit( &argc, argv );
|
||||
glutInitWindowSize( (int) Width, (int) Height );
|
||||
glutInitWindowPosition( 0, 0 );
|
||||
glutInit( &argc, argv );
|
||||
|
||||
mode = ColorMode | GLUT_DOUBLE;
|
||||
if (BufferMask & GL_STENCIL_BUFFER_BIT)
|
||||
|
|
|
@ -237,6 +237,9 @@ int main( int argc, char *argv[] )
|
|||
const char *filename = IMAGE_FILE;
|
||||
int i = 1;
|
||||
|
||||
glutInitWindowSize( WinWidth, WinHeight );
|
||||
glutInit( &argc, argv );
|
||||
|
||||
if (argc > i && strcmp(argv[i], "-ci")==0) {
|
||||
ciMode = GL_TRUE;
|
||||
i++;
|
||||
|
@ -245,10 +248,6 @@ int main( int argc, char *argv[] )
|
|||
filename = argv[i];
|
||||
}
|
||||
|
||||
glutInit( &argc, argv );
|
||||
glutInitWindowPosition( 0, 0 );
|
||||
glutInitWindowSize( WinWidth, WinHeight );
|
||||
|
||||
if (ciMode)
|
||||
glutInitDisplayMode( GLUT_INDEX | GLUT_DOUBLE );
|
||||
else
|
||||
|
|
|
@ -613,9 +613,8 @@ static void parse_args(int argc, char *argv[])
|
|||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
glutInit(&argc, argv);
|
||||
glutInitWindowPosition(0, 0);
|
||||
glutInitWindowSize(600, 500);
|
||||
glutInit(&argc, argv);
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
|
||||
glutCreateWindow("Texture Cube Mapping");
|
||||
glewInit();
|
||||
|
|
|
@ -328,6 +328,9 @@ int main( int argc, char *argv[] )
|
|||
const char *filename = IMAGE_FILE;
|
||||
int i = 1;
|
||||
|
||||
glutInitWindowSize( 500, 400 );
|
||||
glutInit( &argc, argv );
|
||||
|
||||
if (argc > i && strcmp(argv[i], "-ci")==0) {
|
||||
ciMode = GL_TRUE;
|
||||
i++;
|
||||
|
@ -336,10 +339,6 @@ int main( int argc, char *argv[] )
|
|||
filename = argv[i];
|
||||
}
|
||||
|
||||
glutInit( &argc, argv );
|
||||
glutInitWindowPosition( 0, 0 );
|
||||
glutInitWindowSize( 500, 400 );
|
||||
|
||||
if (ciMode)
|
||||
glutInitDisplayMode( GLUT_INDEX | GLUT_DOUBLE );
|
||||
else
|
||||
|
|
|
@ -1308,8 +1308,8 @@ Init(void)
|
|||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
glutInit(&argc, argv);
|
||||
glutInitWindowSize(WinWidth, WinHeight);
|
||||
glutInit(&argc, argv);
|
||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
||||
glutCreateWindow("OpenGL Engine Demo");
|
||||
glewInit();
|
||||
|
|
|
@ -1051,11 +1051,11 @@ visible(int vis)
|
|||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
glutInitWindowSize(WinWidth, WinHeight);
|
||||
glutInit(&argc, argv);
|
||||
|
||||
glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
|
||||
|
||||
glutInitWindowSize(WinWidth, WinHeight);
|
||||
Win = glutCreateWindow("fbo_firecube");
|
||||
glewInit();
|
||||
init(argc, argv);
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
* Humanware s.r.l.
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
@ -733,7 +734,6 @@ main(int ac, char **av)
|
|||
HEIGHT = atoi(av[3]);
|
||||
}
|
||||
|
||||
glutInitWindowPosition(0, 0);
|
||||
glutInitWindowSize(WIDTH, HEIGHT);
|
||||
glutInit(&ac, av);
|
||||
|
||||
|
@ -759,6 +759,7 @@ main(int ac, char **av)
|
|||
glFogfv(GL_FOG_COLOR, fogcolor);
|
||||
glFogf(GL_FOG_DENSITY, 0.1);
|
||||
|
||||
assert(np > 0);
|
||||
p = (part *) malloc(sizeof(part) * np);
|
||||
|
||||
for (i = 0; i < np; i++)
|
||||
|
|
|
@ -15,8 +15,6 @@
|
|||
|
||||
#define DEPTH 5.0f
|
||||
|
||||
static PFNGLFOGCOORDPOINTEREXTPROC glFogCoordPointer_ext;
|
||||
|
||||
static GLfloat camz;
|
||||
|
||||
static GLint fogMode;
|
||||
|
@ -406,8 +404,8 @@ Init(void)
|
|||
int
|
||||
main( int argc, char *argv[] )
|
||||
{
|
||||
glutInit( &argc, argv );
|
||||
glutInitWindowSize( 600, 600 );
|
||||
glutInit( &argc, argv );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
||||
glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
|
|
|
@ -268,9 +268,8 @@ static void Init( void )
|
|||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
glutInit( &argc, argv );
|
||||
glutInitWindowPosition( 0, 0 );
|
||||
glutInitWindowSize( 200, 200 );
|
||||
glutInit( &argc, argv );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
||||
Win = glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
|
|
|
@ -353,6 +353,7 @@ MakeSphere(void)
|
|||
glNewList(SphereList, GL_COMPILE);
|
||||
gluSphere(obj, 2.0f, 10, 5);
|
||||
glEndList();
|
||||
gluDeleteQuadric(obj);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -599,9 +600,8 @@ ParseOptions(int argc, char *argv[])
|
|||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
glutInit(&argc, argv);
|
||||
glutInitWindowPosition( 0, 0);
|
||||
glutInitWindowSize(200, 200);
|
||||
glutInit(&argc, argv);
|
||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
||||
win = glutCreateWindow(argv[0]);
|
||||
glutReshapeFunc(Reshape);
|
||||
|
|
|
@ -146,12 +146,9 @@ display(void)
|
|||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
glutInitWindowSize(500, 400);
|
||||
glutInit(&argc, argv);
|
||||
glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE);
|
||||
|
||||
glutInitWindowPosition(50, 50);
|
||||
glutInitWindowSize(500, 400);
|
||||
|
||||
glutCreateWindow("gamma test patterns");
|
||||
glutReshapeFunc(Reshape);
|
||||
glutDisplayFunc(display);
|
||||
|
|
|
@ -474,10 +474,10 @@ visible(int vis)
|
|||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
glutInitWindowSize(WinWidth, WinHeight);
|
||||
glutInit(&argc, argv);
|
||||
glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
|
||||
|
||||
glutInitWindowSize(WinWidth, WinHeight);
|
||||
Win = glutCreateWindow("gearbox");
|
||||
init(argc, argv);
|
||||
|
||||
|
|
|
@ -385,11 +385,9 @@ visible(int vis)
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
glutInitWindowSize(300, 300);
|
||||
glutInit(&argc, argv);
|
||||
glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
|
||||
|
||||
glutInitWindowPosition(0, 0);
|
||||
glutInitWindowSize(300, 300);
|
||||
win = glutCreateWindow("Gears");
|
||||
init(argc, argv);
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
*/
|
||||
|
||||
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <GL/glut.h>
|
||||
|
@ -129,8 +130,10 @@ Clear_Buffers ()
|
|||
static void
|
||||
LoadTriplet (TDA A)
|
||||
{
|
||||
int result;
|
||||
Clear_Buffers ();
|
||||
fscanf (mainfile, "%s %s %s %s", Buf1, Buf2, Buf3, Buf4);
|
||||
result = fscanf (mainfile, "%s %s %s %s", Buf1, Buf2, Buf3, Buf4);
|
||||
assert(result != EOF);
|
||||
A[0] = atof (Buf2);
|
||||
A[1] = atof (Buf3);
|
||||
A[2] = atof (Buf4);
|
||||
|
@ -140,8 +143,10 @@ LoadTriplet (TDA A)
|
|||
static void
|
||||
LoadReal (float *a)
|
||||
{
|
||||
int result;
|
||||
Clear_Buffers ();
|
||||
fscanf (mainfile, "%s %s", Buf1, Buf2);
|
||||
result = fscanf (mainfile, "%s %s", Buf1, Buf2);
|
||||
assert(result != EOF);
|
||||
*a = atof (Buf2);
|
||||
}
|
||||
|
||||
|
@ -149,8 +154,10 @@ LoadReal (float *a)
|
|||
static void
|
||||
LoadInteger (int *a)
|
||||
{
|
||||
int result;
|
||||
Clear_Buffers ();
|
||||
fscanf (mainfile, "%s %s", Buf1, Buf2);
|
||||
result = fscanf (mainfile, "%s %s", Buf1, Buf2);
|
||||
assert(result != EOF);
|
||||
*a = atoi (Buf2);
|
||||
}
|
||||
|
||||
|
@ -158,8 +165,10 @@ LoadInteger (int *a)
|
|||
static void
|
||||
LoadText (char *a)
|
||||
{
|
||||
int result;
|
||||
Clear_Buffers ();
|
||||
fscanf (mainfile, "%s %s", Buf1, Buf2);
|
||||
result = fscanf (mainfile, "%s %s", Buf1, Buf2);
|
||||
assert(result != EOF);
|
||||
strcpy (a, Buf2);
|
||||
}
|
||||
|
||||
|
@ -177,8 +186,10 @@ getdata (char filename[])
|
|||
|
||||
do
|
||||
{
|
||||
int result;
|
||||
Clear_Buffers ();
|
||||
fscanf (mainfile, "%s", Buf1);
|
||||
result = fscanf (mainfile, "%s", Buf1);
|
||||
(void) result;
|
||||
if (ferror (mainfile))
|
||||
{
|
||||
printf ("\nError opening file !\n");
|
||||
|
@ -1049,19 +1060,18 @@ main (int argc, char *argv[])
|
|||
{
|
||||
char *file;
|
||||
|
||||
if (argc < 2)
|
||||
file = "geartrain.dat";
|
||||
else
|
||||
file = argv[1];
|
||||
|
||||
glutInit(&argc, argv);
|
||||
glutInitWindowPosition (0, 0);
|
||||
glutInitWindowSize(640,480);
|
||||
glutInit(&argc, argv);
|
||||
glutInitDisplayMode (GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
|
||||
|
||||
if (glutCreateWindow ("Gear Train Simulation") == GL_FALSE)
|
||||
exit (1);
|
||||
|
||||
if (argc < 2)
|
||||
file = "geartrain.dat";
|
||||
else
|
||||
file = argv[1];
|
||||
|
||||
getdata (file);
|
||||
process ();
|
||||
init ();
|
||||
|
|
|
@ -436,8 +436,8 @@ static void Init( int argc, char *argv[] )
|
|||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
glutInit( &argc, argv );
|
||||
glutInitWindowSize(WinWidth, WinHeight);
|
||||
glutInit( &argc, argv );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
||||
glutCreateWindow(argv[0] );
|
||||
glewInit();
|
||||
|
|
|
@ -569,10 +569,9 @@ main(int ac, char **av)
|
|||
if (ac == 2)
|
||||
frontbuffer = 0;
|
||||
|
||||
glutInitWindowSize(640, 480);
|
||||
glutInit(&ac, av);
|
||||
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
|
||||
glutInitWindowPosition(0, 0);
|
||||
glutInitWindowSize(640, 480);
|
||||
glutCreateWindow("OpenGL/Mesa Performances");
|
||||
glutDisplayFunc(display);
|
||||
glutMainLoop();
|
||||
|
|
|
@ -133,6 +133,8 @@ initdlists(void)
|
|||
|
||||
glEndList();
|
||||
}
|
||||
|
||||
gluDeleteQuadric(obj);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -680,7 +682,6 @@ main(int ac, char **av)
|
|||
fprintf(stderr,
|
||||
"IperS V1.0\nWritten by David Bucciarelli (tech.hmw@plus.it)\n");
|
||||
|
||||
glutInitWindowPosition(0, 0);
|
||||
glutInitWindowSize(WIDTH, HEIGHT);
|
||||
glutInit(&ac, av);
|
||||
|
||||
|
|
|
@ -132,9 +132,11 @@ static void read_surface( char *filename )
|
|||
|
||||
numverts = 0;
|
||||
while (!feof(f) && numverts<maxverts) {
|
||||
fscanf( f, "%f %f %f %f %f %f",
|
||||
&data[numverts][0], &data[numverts][1], &data[numverts][2],
|
||||
&data[numverts][3], &data[numverts][4], &data[numverts][5] );
|
||||
int result;
|
||||
result = fscanf( f, "%f %f %f %f %f %f",
|
||||
&data[numverts][0], &data[numverts][1], &data[numverts][2],
|
||||
&data[numverts][3], &data[numverts][4], &data[numverts][5] );
|
||||
(void) result;
|
||||
numverts++;
|
||||
}
|
||||
numverts--;
|
||||
|
@ -1061,9 +1063,8 @@ int main(int argc, char **argv)
|
|||
|
||||
read_surface( "isosurf.dat" );
|
||||
|
||||
glutInit( &argc, argv);
|
||||
glutInitWindowPosition(0, 0);
|
||||
glutInitWindowSize(400, 400);
|
||||
glutInit( &argc, argv);
|
||||
|
||||
type = GLUT_DEPTH;
|
||||
type |= GLUT_RGB;
|
||||
|
|
|
@ -282,9 +282,8 @@ static void Init( void )
|
|||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
glutInit( &argc, argv );
|
||||
glutInitWindowPosition( 0, 0 );
|
||||
glutInitWindowSize( 350, 350 );
|
||||
glutInit( &argc, argv );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
||||
win = glutCreateWindow(argv[0]);
|
||||
glutReshapeFunc( Reshape );
|
||||
|
|
|
@ -841,9 +841,8 @@ int main(int argc, char **argv)
|
|||
|
||||
object=1;
|
||||
|
||||
glutInit(&argc, argv);
|
||||
glutInitWindowPosition(0,0);
|
||||
glutInitWindowSize(640,480);
|
||||
glutInit(&argc, argv);
|
||||
|
||||
glutInitDisplayMode( GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGB );
|
||||
|
||||
|
@ -887,5 +886,6 @@ int main(int argc, char **argv)
|
|||
glutIdleFunc( idle_ );
|
||||
glutDisplayFunc( draw );
|
||||
glutMainLoop();
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -338,9 +338,8 @@ int main( int argc, char *argv[] )
|
|||
{
|
||||
GLint i;
|
||||
|
||||
glutInit( &argc, argv );
|
||||
glutInitWindowSize( 300, 300 );
|
||||
glutInitWindowPosition( 0, 0 );
|
||||
glutInit( &argc, argv );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
||||
glutCreateWindow(argv[0] );
|
||||
glewInit();
|
||||
|
|
|
@ -248,12 +248,9 @@ static void Init2( void )
|
|||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
glutInit( &argc, argv );
|
||||
glutInitWindowPosition( 0, 0 );
|
||||
glutInitWindowSize( 400, 300 );
|
||||
|
||||
glutInit( &argc, argv );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
||||
|
||||
glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
|
||||
|
|
|
@ -427,10 +427,10 @@ int
|
|||
main(int argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
|
||||
glutInitWindowSize(300, 300);
|
||||
glutInit(&argc, argv);
|
||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_MULTISAMPLE);
|
||||
glutInitWindowPosition(0, 0);
|
||||
glutInitWindowSize(300, 300);
|
||||
|
||||
for (i=1; i<argc; i++) {
|
||||
if(!strcmp("-noms", argv[i])) {
|
||||
|
|
|
@ -245,6 +245,10 @@ loadImageTextures(void)
|
|||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
}
|
||||
glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, borderColor);
|
||||
|
||||
free(texData3);
|
||||
free(texData4);
|
||||
free(image);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -994,18 +998,17 @@ menu(int selection)
|
|||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
glutInitWindowSize(500,500);
|
||||
glutInit(&argc, argv);
|
||||
glutInitDisplayMode(GLUT_RGBA | GLUT_DEPTH | GLUT_DOUBLE);
|
||||
(void) glutCreateWindow("projtex");
|
||||
glewInit();
|
||||
|
||||
if (argc > 1) {
|
||||
NumTextures = atoi(argv[1]);
|
||||
}
|
||||
assert(NumTextures <= MAX_TEX);
|
||||
|
||||
glutInitDisplayMode(GLUT_RGBA | GLUT_DEPTH | GLUT_DOUBLE);
|
||||
glutInitWindowSize(500,500);
|
||||
(void) glutCreateWindow("projtex");
|
||||
glewInit();
|
||||
|
||||
loadTexture = loadImageTextures;
|
||||
drawObject = drawCube;
|
||||
initialize();
|
||||
|
|
|
@ -834,6 +834,8 @@ initdlists(void)
|
|||
gluQuadricTexture(obj, GL_TRUE);
|
||||
gluSphere(obj, SPHERE_RADIUS, 16, 16);
|
||||
glEndList();
|
||||
|
||||
gluDeleteQuadric(obj);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -854,7 +856,6 @@ main(int ac, char **av)
|
|||
}
|
||||
*/
|
||||
|
||||
glutInitWindowPosition(0, 0);
|
||||
glutInitWindowSize(WIDTH, HEIGHT);
|
||||
glutInit(&ac, av);
|
||||
|
||||
|
|
|
@ -219,7 +219,7 @@ Display( void )
|
|||
GLint reads = 0;
|
||||
GLint endTime;
|
||||
GLint startTime = glutGet(GLUT_ELAPSED_TIME);
|
||||
GLdouble seconds, pixelsPerSecond;
|
||||
GLdouble seconds, mpixels, mpixelsPerSecond;
|
||||
printf("Benchmarking...\n");
|
||||
do {
|
||||
glReadPixels(APosX, APosY, ImgWidth, ImgHeight,
|
||||
|
@ -228,9 +228,10 @@ Display( void )
|
|||
endTime = glutGet(GLUT_ELAPSED_TIME);
|
||||
} while (endTime - startTime < 4000); /* 4 seconds */
|
||||
seconds = (double) (endTime - startTime) / 1000.0;
|
||||
pixelsPerSecond = reads * ImgWidth * ImgHeight / seconds;
|
||||
printf("Result: %d reads in %f seconds = %f pixels/sec\n",
|
||||
reads, seconds, pixelsPerSecond);
|
||||
mpixels = reads * (ImgWidth * ImgHeight / (1000.0 * 1000.0));
|
||||
mpixelsPerSecond = mpixels / seconds;
|
||||
printf("Result: %d reads in %f seconds = %f Mpixels/sec\n",
|
||||
reads, seconds, mpixelsPerSecond);
|
||||
Benchmark = GL_FALSE;
|
||||
}
|
||||
else {
|
||||
|
@ -382,12 +383,11 @@ int
|
|||
main( int argc, char *argv[] )
|
||||
{
|
||||
GLboolean ciMode = GL_FALSE;
|
||||
glutInitWindowSize( 750, 250 );
|
||||
glutInit( &argc, argv );
|
||||
if (argc > 1 && strcmp(argv[1], "-ci")==0) {
|
||||
ciMode = GL_TRUE;
|
||||
}
|
||||
glutInit( &argc, argv );
|
||||
glutInitWindowPosition( 0, 0 );
|
||||
glutInitWindowSize( 750, 250 );
|
||||
if (ciMode)
|
||||
glutInitDisplayMode( GLUT_INDEX | GLUT_DOUBLE );
|
||||
else
|
||||
|
|
|
@ -112,12 +112,9 @@ key(unsigned char k, int x, int y)
|
|||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
glutInit( &argc, argv );
|
||||
glutInitWindowPosition(0, 0);
|
||||
glutInitWindowSize( 400, 400 );
|
||||
|
||||
glutInit( &argc, argv );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
||||
|
||||
glutCreateWindow(argv[0]);
|
||||
|
||||
Init();
|
||||
|
|
|
@ -1022,9 +1022,8 @@ PrintHelp(void)
|
|||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
glutInit(&argc, argv);
|
||||
glutInitWindowPosition(0, 0);
|
||||
glutInitWindowSize(WindowWidth, WindowHeight);
|
||||
glutInit(&argc, argv);
|
||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL);
|
||||
glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
|
|
|
@ -239,13 +239,9 @@ static void ModeMenu(int entry)
|
|||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
|
||||
glutInit( &argc, argv );
|
||||
glutInitWindowPosition( 0, 0 );
|
||||
glutInitWindowSize( 300, 300 );
|
||||
|
||||
glutInit( &argc, argv );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
||||
|
||||
glutCreateWindow( "spectex" );
|
||||
|
||||
Init();
|
||||
|
|
|
@ -493,6 +493,8 @@ int
|
|||
main(int argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
|
||||
glutInitWindowSize(600,300);
|
||||
glutInit(&argc, argv);
|
||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_MULTISAMPLE);
|
||||
|
||||
|
@ -506,8 +508,6 @@ main(int argc, char **argv)
|
|||
linearFiltering = 0;
|
||||
}
|
||||
}
|
||||
glutInitWindowPosition(0, 0);
|
||||
glutInitWindowSize(600,300);
|
||||
glutCreateWindow("sprite blast");
|
||||
glewInit();
|
||||
glutReshapeFunc(reshape);
|
||||
|
|
|
@ -638,7 +638,6 @@ int main(int ac, char **av)
|
|||
}
|
||||
*/
|
||||
|
||||
glutInitWindowPosition(0,0);
|
||||
glutInitWindowSize(WIDTH,HEIGHT);
|
||||
glutInit(&ac,av);
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
* based on a Mikael SkiZoWalker's (MoDEL) / France (Skizo@Hol.Fr) demo
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -559,12 +560,14 @@ loadpic(void)
|
|||
FILE *FilePic;
|
||||
int i, tmp;
|
||||
GLenum gluerr;
|
||||
size_t result;
|
||||
|
||||
if ((FilePic = fopen("terrain.dat", "r")) == NULL) {
|
||||
fprintf(stderr, "Error loading terrain.dat\n");
|
||||
exit(-1);
|
||||
}
|
||||
fread(bufferter, 256 * 256, 1, FilePic);
|
||||
result = fread(bufferter, 256 * 256, 1, FilePic);
|
||||
assert(result == 1);
|
||||
fclose(FilePic);
|
||||
|
||||
for (i = 0; i < (256 * 256); i++) {
|
||||
|
@ -623,7 +626,6 @@ init(void)
|
|||
int
|
||||
main(int ac, char **av)
|
||||
{
|
||||
glutInitWindowPosition(0, 0);
|
||||
glutInitWindowSize(WIDTH, HEIGHT);
|
||||
glutInit(&ac, av);
|
||||
|
||||
|
|
|
@ -503,10 +503,9 @@ int main( int argc, char **argv )
|
|||
|
||||
usage();
|
||||
|
||||
glutInitWindowSize( 400, 400 );
|
||||
glutInit( &argc, argv );
|
||||
glutInitDisplayMode( GLUT_SINGLE | GLUT_RGB );
|
||||
glutInitWindowPosition(0, 0);
|
||||
glutInitWindowSize( 400, 400 );
|
||||
glutCreateWindow( argv[0] );
|
||||
|
||||
/* GH: Bit of a hack...
|
||||
|
|
|
@ -261,10 +261,8 @@ static void Init( int argc, char *argv[] )
|
|||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
glutInit( &argc, argv );
|
||||
glutInitWindowSize( 400, 400 );
|
||||
glutInitWindowPosition( 0, 0 );
|
||||
|
||||
glutInit( &argc, argv );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
||||
|
||||
Win = glutCreateWindow(argv[0] );
|
||||
|
|
|
@ -765,6 +765,7 @@ int main( int argc, char *argv[] )
|
|||
GLboolean info = GL_FALSE;
|
||||
int i;
|
||||
|
||||
glutInitWindowSize( winWidth, winHeight );
|
||||
glutInit( &argc, argv );
|
||||
|
||||
for ( i = 1 ; i < argc ; i++ ) {
|
||||
|
@ -786,8 +787,6 @@ int main( int argc, char *argv[] )
|
|||
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE );
|
||||
}
|
||||
|
||||
glutInitWindowSize( winWidth, winHeight );
|
||||
glutInitWindowPosition( 0, 0 );
|
||||
Win = glutCreateWindow( "Texture Environment Test" );
|
||||
|
||||
initialize();
|
||||
|
|
|
@ -57,7 +57,7 @@ Idle(void)
|
|||
{
|
||||
Xrot = glutGet(GLUT_ELAPSED_TIME) * 0.02;
|
||||
Yrot = glutGet(GLUT_ELAPSED_TIME) * 0.04;
|
||||
//Zrot += 2.0;
|
||||
/* Zrot += 2.0; */
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
|
@ -356,9 +356,8 @@ Usage(void)
|
|||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
glutInit(&argc, argv);
|
||||
glutInitWindowPosition(0, 0);
|
||||
glutInitWindowSize(700, 700);
|
||||
glutInit(&argc, argv);
|
||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
||||
Win = glutCreateWindow(argv[0]);
|
||||
glutReshapeFunc(Reshape);
|
||||
|
|
|
@ -227,15 +227,12 @@ static void Help( const char *program )
|
|||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
printf("For options: %s -help\n", argv[0]);
|
||||
glutInit( &argc, argv );
|
||||
glutInitWindowSize( (int) Width, (int) Height );
|
||||
glutInitWindowPosition( 0, 0 );
|
||||
|
||||
glutInit( &argc, argv );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
||||
|
||||
glutCreateWindow( argv[0] );
|
||||
|
||||
printf("For options: %s -help\n", argv[0]);
|
||||
if (argc==2 && strcmp(argv[1],"-help")==0) {
|
||||
Help(argv[0]);
|
||||
return 0;
|
||||
|
|
|
@ -491,7 +491,6 @@ main(int ac, char **av)
|
|||
fprintf(stderr,
|
||||
"Tunnel V1.5\nWritten by David Bucciarelli (tech.hmw@plus.it)\n");
|
||||
|
||||
glutInitWindowPosition(0, 0);
|
||||
glutInitWindowSize(WIDTH, HEIGHT);
|
||||
glutInit(&ac, av);
|
||||
|
||||
|
|
|
@ -559,7 +559,6 @@ main(int ac, char **av)
|
|||
fprintf(stderr,
|
||||
"Tunnel2 V1.0\nWritten by David Bucciarelli (tech.hmw@plus.it)\n");
|
||||
|
||||
glutInitWindowPosition(0, 0);
|
||||
glutInitWindowSize(WIDTHC0, HEIGHTC0);
|
||||
glutInit(&ac, av);
|
||||
|
||||
|
|
|
@ -317,9 +317,8 @@ static void Init( void )
|
|||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
glutInit( &argc, argv );
|
||||
glutInitWindowPosition( 0, 0 );
|
||||
glutInitWindowSize( Width, Height );
|
||||
glutInit( &argc, argv );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
||||
Win = glutCreateWindow( "GL_APPLE_vertex_array_object demo" );
|
||||
glutReshapeFunc( Reshape );
|
||||
|
|
|
@ -96,9 +96,8 @@ static void init( void )
|
|||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
glutInit(&argc, argv);
|
||||
glutInitWindowPosition(0, 0);
|
||||
glutInitWindowSize(500, 500);
|
||||
glutInit(&argc, argv);
|
||||
glutInitDisplayMode( GLUT_RGB );
|
||||
|
||||
if (glutCreateWindow("winpos") <= 0) {
|
||||
|
|
|
@ -114,6 +114,7 @@ main(int argc, char *argv[])
|
|||
|
||||
PrintConfigs(d, configs, numConfigs);
|
||||
|
||||
eglBindAPI(EGL_OPENGL_API);
|
||||
ctx = eglCreateContext(d, configs[0], EGL_NO_CONTEXT, NULL);
|
||||
if (ctx == EGL_NO_CONTEXT) {
|
||||
printf("failed to create context\n");
|
||||
|
|
|
@ -111,11 +111,7 @@ main(int argc, char *argv[])
|
|||
EGL_HEIGHT, 500,
|
||||
EGL_NONE
|
||||
};
|
||||
const EGLint screenAttribs[] = {
|
||||
EGL_WIDTH, 1024,
|
||||
EGL_HEIGHT, 768,
|
||||
EGL_NONE
|
||||
};
|
||||
EGLint screenAttribs[32];
|
||||
EGLModeMESA mode;
|
||||
EGLScreenMESA screen;
|
||||
EGLint count;
|
||||
|
@ -149,6 +145,7 @@ main(int argc, char *argv[])
|
|||
eglGetScreensMESA(d, &screen, 1, &count);
|
||||
eglGetModesMESA(d, screen, &mode, 1, &count);
|
||||
|
||||
eglBindAPI(EGL_OPENGL_API);
|
||||
ctx = eglCreateContext(d, configs[0], EGL_NO_CONTEXT, NULL);
|
||||
if (ctx == EGL_NO_CONTEXT) {
|
||||
printf("failed to create context\n");
|
||||
|
@ -169,6 +166,13 @@ main(int argc, char *argv[])
|
|||
|
||||
b = eglMakeCurrent(d, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
|
||||
|
||||
i = 0;
|
||||
screenAttribs[i++] = EGL_WIDTH;
|
||||
eglGetModeAttribMESA(d, mode, EGL_WIDTH, &screenAttribs[i++]);
|
||||
screenAttribs[i++] = EGL_HEIGHT;
|
||||
eglGetModeAttribMESA(d, mode, EGL_HEIGHT, &screenAttribs[i++]);
|
||||
screenAttribs[i] = EGL_NONE;
|
||||
|
||||
screen_surf = eglCreateScreenSurfaceMESA(d, configs[0], screenAttribs);
|
||||
if (screen_surf == EGL_NO_SURFACE) {
|
||||
printf("failed to create screen surface\n");
|
||||
|
|
|
@ -564,11 +564,8 @@ main(int argc, char *argv[])
|
|||
EGLint numConfigs, count;
|
||||
EGLBoolean b;
|
||||
const GLubyte *bitmap;
|
||||
const EGLint screenAttribs[] = {
|
||||
EGL_WIDTH, 1024,
|
||||
EGL_HEIGHT, 768,
|
||||
EGL_NONE
|
||||
};
|
||||
EGLint screenAttribs[32];
|
||||
EGLint i;
|
||||
|
||||
EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY);
|
||||
assert(d);
|
||||
|
@ -590,12 +587,20 @@ main(int argc, char *argv[])
|
|||
eglGetScreensMESA(d, &screen, 1, &count);
|
||||
eglGetModesMESA(d, screen, &mode, 1, &count);
|
||||
|
||||
eglBindAPI(EGL_OPENGL_API);
|
||||
ctx = eglCreateContext(d, configs[0], EGL_NO_CONTEXT, NULL);
|
||||
if (ctx == EGL_NO_CONTEXT) {
|
||||
printf("failed to create context\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
i = 0;
|
||||
screenAttribs[i++] = EGL_WIDTH;
|
||||
eglGetModeAttribMESA(d, mode, EGL_WIDTH, &screenAttribs[i++]);
|
||||
screenAttribs[i++] = EGL_HEIGHT;
|
||||
eglGetModeAttribMESA(d, mode, EGL_HEIGHT, &screenAttribs[i++]);
|
||||
screenAttribs[i] = EGL_NONE;
|
||||
|
||||
screen_surf = eglCreateScreenSurfaceMESA(d, configs[0], screenAttribs);
|
||||
if (screen_surf == EGL_NO_SURFACE) {
|
||||
printf("failed to create screen surface\n");
|
||||
|
|
|
@ -374,7 +374,8 @@ main(int argc, char *argv[])
|
|||
EGLint screenAttribs[10];
|
||||
EGLModeMESA mode[MAX_MODES];
|
||||
EGLScreenMESA screen;
|
||||
EGLint count, chosenMode;
|
||||
EGLint count;
|
||||
EGLint chosenMode = 0;
|
||||
GLboolean printInfo = GL_FALSE;
|
||||
EGLint width = 0, height = 0;
|
||||
|
||||
|
@ -425,6 +426,7 @@ main(int argc, char *argv[])
|
|||
}
|
||||
printf("eglgears: Using screen mode/size %d: %d x %d\n", chosenMode, width, height);
|
||||
|
||||
eglBindAPI(EGL_OPENGL_API);
|
||||
ctx = eglCreateContext(d, configs[0], EGL_NO_CONTEXT, NULL);
|
||||
if (ctx == EGL_NO_CONTEXT) {
|
||||
printf("eglgears: failed to create context\n");
|
||||
|
|
|
@ -52,7 +52,8 @@ main(int argc, char *argv[])
|
|||
EGLint screenAttribs[10];
|
||||
EGLModeMESA mode[MAX_MODES];
|
||||
EGLScreenMESA screen;
|
||||
EGLint count, chosenMode;
|
||||
EGLint count;
|
||||
EGLint chosenMode = 0;
|
||||
EGLint width = 0, height = 0;
|
||||
|
||||
d = eglGetDisplay(EGL_DEFAULT_DISPLAY);
|
||||
|
|
|
@ -208,6 +208,7 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
printf("egltri: Using screen mode/size %d: %d x %d\n", chosenMode, width, height);
|
||||
|
||||
eglBindAPI(EGL_OPENGL_API);
|
||||
ctx = eglCreateContext(d, configs[0], EGL_NO_CONTEXT, NULL);
|
||||
if (ctx == EGL_NO_CONTEXT) {
|
||||
printf("egltri: failed to create context\n");
|
||||
|
|
|
@ -120,6 +120,7 @@ make_x_window(Display *x_dpy, EGLDisplay egl_dpy,
|
|||
EGL_GREEN_SIZE, 1,
|
||||
EGL_BLUE_SIZE, 1,
|
||||
EGL_DEPTH_SIZE, 1,
|
||||
EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT,
|
||||
EGL_NONE
|
||||
};
|
||||
|
||||
|
@ -138,7 +139,8 @@ make_x_window(Display *x_dpy, EGLDisplay egl_dpy,
|
|||
scrnum = DefaultScreen( x_dpy );
|
||||
root = RootWindow( x_dpy, scrnum );
|
||||
|
||||
if (!eglChooseConfig( egl_dpy, attribs, &config, 1, &num_configs)) {
|
||||
if (!eglChooseConfig( egl_dpy, attribs, &config, 1, &num_configs) ||
|
||||
!num_configs) {
|
||||
printf("Error: couldn't get an EGL visual config\n");
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -53,6 +53,7 @@ make_pbuffer(int width, int height)
|
|||
EGL_GREEN_SIZE, 8,
|
||||
EGL_BLUE_SIZE, 8,
|
||||
EGL_BIND_TO_TEXTURE_RGB, EGL_TRUE,
|
||||
EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT,
|
||||
EGL_NONE
|
||||
};
|
||||
EGLint pbuf_attribs[] = {
|
||||
|
@ -65,7 +66,8 @@ make_pbuffer(int width, int height)
|
|||
EGLConfig config;
|
||||
EGLint num_configs;
|
||||
|
||||
if (!eglChooseConfig(dpy, config_attribs, &config, 1, &num_configs)) {
|
||||
if (!eglChooseConfig(dpy, config_attribs, &config, 1, &num_configs) ||
|
||||
!num_configs) {
|
||||
printf("Error: couldn't get an EGL visual config for pbuffer\n");
|
||||
exit(1);
|
||||
}
|
||||
|
@ -77,8 +79,6 @@ make_pbuffer(int width, int height)
|
|||
printf("failed to allocate pbuffer\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
glGenTextures(1, &tex_pbuf);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -112,6 +112,8 @@ use_pbuffer(void)
|
|||
glTranslatef(0.0, 0.0, -5.0);
|
||||
|
||||
glClearColor(0.2, 0.2, 0.2, 0.0);
|
||||
|
||||
glGenTextures(1, &tex_pbuf);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -126,6 +128,7 @@ make_window(Display *x_dpy, const char *name,
|
|||
EGL_BLUE_SIZE, 8,
|
||||
EGL_ALPHA_SIZE, 8,
|
||||
EGL_DEPTH_SIZE, 8,
|
||||
EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT,
|
||||
EGL_NONE
|
||||
};
|
||||
|
||||
|
@ -142,7 +145,8 @@ make_window(Display *x_dpy, const char *name,
|
|||
scrnum = DefaultScreen( x_dpy );
|
||||
root = RootWindow( x_dpy, scrnum );
|
||||
|
||||
if (!eglChooseConfig(dpy, attribs, &config, 1, &num_configs)) {
|
||||
if (!eglChooseConfig(dpy, attribs, &config, 1, &num_configs) ||
|
||||
!num_configs) {
|
||||
printf("Error: couldn't get an EGL visual config\n");
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -467,6 +467,7 @@ create_window(struct winthread *wt, EGLContext shareCtx)
|
|||
EGL_GREEN_SIZE, 1,
|
||||
EGL_BLUE_SIZE, 1,
|
||||
EGL_DEPTH_SIZE, 1,
|
||||
EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT,
|
||||
EGL_NONE };
|
||||
EGLConfig config;
|
||||
EGLint num_configs;
|
||||
|
@ -484,7 +485,8 @@ create_window(struct winthread *wt, EGLContext shareCtx)
|
|||
scrnum = DefaultScreen(wt->Dpy);
|
||||
root = RootWindow(wt->Dpy, scrnum);
|
||||
|
||||
if (!eglChooseConfig(wt->Display, attribs, &config, 1, &num_configs)) {
|
||||
if (!eglChooseConfig(wt->Display, attribs, &config, 1, &num_configs) ||
|
||||
!num_configs) {
|
||||
Error("Unable to choose an EGL config");
|
||||
}
|
||||
|
||||
|
|
|
@ -1,15 +1,4 @@
|
|||
Import('env')
|
||||
|
||||
if not env['GLUT']:
|
||||
Return()
|
||||
|
||||
env = env.Clone()
|
||||
|
||||
env.Prepend(CPPPATH = [
|
||||
'../util',
|
||||
])
|
||||
|
||||
env.Prepend(LIBS = ['$GLUT_LIB'])
|
||||
Import('*')
|
||||
|
||||
progs = [
|
||||
'fp-tri',
|
||||
|
@ -17,14 +6,13 @@ progs = [
|
|||
'tri-depth2',
|
||||
'tri-depthwrite',
|
||||
'tri-depthwrite2',
|
||||
'tri-inv',
|
||||
'tri-param',
|
||||
'tri-tex',
|
||||
'point-position',
|
||||
]
|
||||
|
||||
for prog in progs:
|
||||
env.Program(
|
||||
progs_env.Program(
|
||||
target = prog,
|
||||
source = [prog + '.c'],
|
||||
)
|
||||
|
|
|
@ -73,7 +73,7 @@ static void Init( void )
|
|||
GLuint Texture;
|
||||
GLint errno;
|
||||
GLuint prognum;
|
||||
char buf[4096];
|
||||
char buf[50000];
|
||||
GLuint sz;
|
||||
FILE *f;
|
||||
|
||||
|
@ -176,6 +176,17 @@ static void Init( void )
|
|||
}
|
||||
|
||||
|
||||
{
|
||||
const float Ambient[4] = { 0.0, 1.0, 0.0, 0.0 };
|
||||
const float Diffuse[4] = { 1.0, 0.0, 0.0, 0.0 };
|
||||
const float Specular[4] = { 0.0, 0.0, 1.0, 0.0 };
|
||||
const float Emission[4] = { 0.0, 0.0, 0.0, 1.0 };
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, Ambient);
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, Diffuse);
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, Specular);
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, Emission);
|
||||
}
|
||||
|
||||
glClearColor(.1, .3, .5, 0);
|
||||
}
|
||||
|
||||
|
@ -197,7 +208,7 @@ static void Key(unsigned char key, int x, int y)
|
|||
case 27:
|
||||
exit(1);
|
||||
default:
|
||||
return;
|
||||
break;
|
||||
}
|
||||
|
||||
glutPostRedisplay();
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue