Compare commits

..

1 Commits

Author SHA1 Message Date
jtg
fd624c0601 Imported sources 1999-08-19 00:55:39 +00:00
402 changed files with 11068 additions and 88859 deletions

View File

@@ -1,13 +1,12 @@
# $Id: Make-config,v 1.10.2.3 2000/03/23 00:12:13 brianp Exp $
# $Id: Make-config,v 1.1.1.1 1999/08/19 00:55:39 jtg Exp $
MESA_MAJOR=3
MESA_MINOR=2
MESA_TINY=0
VERSION=$(MESA_MAJOR).$(MESA_MINOR)
MAJOR=3
MINOR=1
VERSION=$(MAJOR).$(MINOR)
# Mesa 3-D graphics library
#
# Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
# Copyright (C) 1999 Brian Paul All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -29,8 +28,8 @@ VERSION=$(MESA_MAJOR).$(MESA_MINOR)
# The following variables are passed to each Makefile:
#
# GL_LIB the name of the Mesa "GL" library file (usually libGL.a)
# GLU_LIB the name of the Mesa "GLU" library file (usually libGLU.a)
# GL_LIB the name of the Mesa "GL" library file (usually libMesaGL.a)
# GLU_LIB the name of the Mesa "GLU" library file (usually libMesaGLU.a)
# GLUT_LIB the name of the GLUT library file (usually libglut.a)
# CC the C compiler (usually cc or gcc)
# CFLAGS flags to C compiler (usually -O)
@@ -67,7 +66,7 @@ aix:
"CC = cc" \
"CFLAGS = -O -DAIXV3" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -lX11 -lXext -lXmu -lXi -lm"
"XLIBS = -lX11 -lXext -lXmu -lXi"
aix-sl:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -78,7 +77,7 @@ aix-sl:
"CC = cc" \
"CFLAGS = -O -DAIXV3" \
"MAKELIB = ../bin/mklib.aix" \
"XLIBS = -lX11 -lXext -lXmu -lXi -lm"
"XLIBS = -lX11 -lXext -lXmu -lXi"
# Make-config additions for the Amiga 3000 UX
# Carlyn Voss Iuzzolino 5/8/95:
@@ -96,7 +95,7 @@ amix:
"CC = cc" \
"CFLAGS =" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -lX11 -lsocket -lnsl -lm"
"XLIBS = -lX11 -lsocket -lnsl "
beos-r4:
$(MAKE) -f Makefile.BeOS-R4 targets \
@@ -118,7 +117,7 @@ bsdos:
"CC = gcc" \
"CFLAGS = -I/usr/X11/include -O2" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -L/usr/X11/lib -lX11 -lipc -lm"
"XLIBS = -L/usr/X11/lib -lX11 -lipc"
bsdos4:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -129,7 +128,7 @@ bsdos4:
"CC = gcc" \
"CFLAGS = -I/usr/X11/include -O2 -fPIC" \
"MAKELIB = ../bin/mklib.bsdos4" \
"XLIBS = -L/usr/X11/lib -lX11 -lipc -lm"
"XLIBS = -L/usr/X11/lib -lX11 -lipc"
cygnus:
$(MAKE) -f Makefile.cygnus $(MFLAGS) -f Makefile.X11 targets \
@@ -174,7 +173,7 @@ dgux:
"CC = gcc" \
"CFLAGS = -O" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -lX11 -lm"
"XLIBS = -lX11"
freebsd:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -185,7 +184,7 @@ freebsd:
"CC = gcc" \
"CFLAGS = -O2 -fPIC -pedantic -I/usr/X11R6/include -DSHM -DHZ=100" \
"MAKELIB = ../bin/mklib.freebsd" \
"XLIBS = -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11 -lm"
"XLIBS = -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11"
freebsd-386:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -196,7 +195,7 @@ freebsd-386:
"CC = gcc" \
"CFLAGS = -O3 -ffast-math -fPIC -pedantic -I/usr/X11R6/include -DSHM -DHZ=100 -DUSE_X86_ASM -DFREEBSD" \
"MAKELIB = ../bin/mklib.freebsd" \
"XLIBS = -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11 -lm" \
"XLIBS = -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11" \
"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S"
gcc:
@@ -208,7 +207,7 @@ gcc:
"CC = gcc" \
"CFLAGS = -pedantic -O2" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -lX11 -lm"
"XLIBS = -lX11"
hpux9:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -219,7 +218,7 @@ hpux9:
"CC = cc" \
"CFLAGS = +O3 -Aa -D_HPUX_SOURCE -I/usr/include/X11R5 -DSHM" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -L/usr/lib/X11R5 -lXext -lXmu -lXi -lX11 -lm"
"XLIBS = -L/usr/lib/X11R5 -lXext -lXmu -lXi -lX11"
hpux9-gcc:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -230,7 +229,7 @@ hpux9-gcc:
"CC = gcc" \
"CFLAGS = -ansi -O3 -D_HPUX_SOURCE -I/usr/include/X11R5 -DSHM" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -L/usr/lib/X11R5 -lXext -lXmu -lXi -lX11 -lm"
"XLIBS = -L/usr/lib/X11R5 -lXext -lXmu -lXi -lX11"
hpux9-sl:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -241,7 +240,7 @@ hpux9-sl:
"CC = cc" \
"CFLAGS = +z +O3 +Olibcalls +ESlit -Aa +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R5 -DSHM" \
"MAKELIB = ../bin/mklib.hpux" \
"XLIBS = -L/usr/lib/X11R5 -s -Wl,+s,-B,nonfatal,-B,immediate -lXext -lXmu -lXi -lX11 -lm"
"XLIBS = -L/usr/lib/X11R5 -s -Wl,+s,-B,nonfatal,-B,immediate -lXext -lXmu -lXi -lX11"
hpux9-gcc-sl:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -252,7 +251,7 @@ hpux9-gcc-sl:
"CC = gcc" \
"CFLAGS = -fPIC -ansi -O3 -D_HPUX_SOURCE -I/usr/include/X11R5 -DSHM" \
"MAKELIB = ../bin/mklib.hpux" \
"XLIBS = -L/usr/lib/X11R5 -lXext -lXmu -lXi -lX11 -lm"
"XLIBS = -L/usr/lib/X11R5 -lXext -lXmu -lXi -lX11"
hpux10:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -263,7 +262,7 @@ hpux10:
"CC = cc" \
"CFLAGS = +O3 +DAportable -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DSHM" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm"
"XLIBS = -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11"
hpux10-sl:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -274,7 +273,7 @@ hpux10-sl:
"CC = cc" \
"CFLAGS = +z -Ae +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DSHM" \
"MAKELIB = ../bin/mklib.hpux" \
"XLIBS = -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm"
"XLIBS = -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11"
hpux10-gcc:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -285,7 +284,7 @@ hpux10-gcc:
"CC = gcc" \
"CFLAGS = -ansi -O3 -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DSHM" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm"
"XLIBS = -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11"
hpux10-gcc-sl:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -296,7 +295,7 @@ hpux10-gcc-sl:
"CC = gcc" \
"CFLAGS = -fPIC -ansi -O3 -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DSHM" \
"MAKELIB = ../bin/mklib.hpux" \
"XLIBS = -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm"
"XLIBS = -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11"
# For IRIX 4: don't use -fullwarn because it causes too much garbage
@@ -309,7 +308,7 @@ irix4:
"CC = cc" \
"CFLAGS = -O2 -ansi -prototypes -DSHM" \
"MAKELIB = ../bin/mklib.ar-rcv" \
"XLIBS = -lXext -lXmu -lXi -lX11 -lm"
"XLIBS = -lXext -lXmu -lXi -lX11"
# On IRIX 5.3 -sopt causes a problem in drawpixels.c so we don't use it
irix5:
@@ -321,7 +320,7 @@ irix5:
"CC = cc" \
"CFLAGS = -O2 -ansi -fullwarn -DSHM -DNO_CONST" \
"MAKELIB = ../bin/mklib.ar-rcv" \
"XLIBS = -lX11 -lXext -lXmu -lXi -lm"
"XLIBS = -lX11 -lXext -lXmu -lXi"
# On IRIX 5.2+gcc
irix5-gcc:
@@ -333,7 +332,7 @@ irix5-gcc:
"CC = gcc" \
"CFLAGS = -O2 -pedantic -DSHM" \
"MAKELIB = ../bin/mklib.ar-rcv" \
"XLIBS = -lX11 -lXext -lXmu -lXi -lm"
"XLIBS = -lX11 -lXext -lXmu -lXi"
# IRIX 5 using Dynamic Shared Objects (DSO)
irix5-dso:
@@ -345,7 +344,7 @@ irix5-dso:
"CC = cc" \
"CFLAGS = -O2 -ansi -fullwarn -DSHM -DNO_CONST" \
"MAKELIB = ../bin/mklib.irix5" \
"XLIBS = -rpath ../lib -lX11 -lXmu -lXi -lm"
"XLIBS = -rpath ../lib -lX11 -lXmu -lXi"
irix6-o32:
pmake $(MFLAGS) -f Makefile.X11 targets \
@@ -356,7 +355,7 @@ irix6-o32:
"CC = cc" \
"CFLAGS = -32 -mips2 -O2 -ansi -DSHM -DNO_CONST" \
"MAKELIB = ../bin/mklib.ar-rcv" \
"XLIBS = -lX11 -lXext -lXmu -lXi -lm"
"XLIBS = -lX11 -lXext -lXmu -lXi"
irix6-o32-dso:
pmake $(MFLAGS) -f Makefile.X11 targets \
@@ -367,7 +366,7 @@ irix6-o32-dso:
"CC = cc" \
"CFLAGS = -32 -mips2 -O2 -ansi -DSHM -DNO_CONST" \
"MAKELIB = ../bin/mklib.irix6-32" \
"XLIBS = -rpath ../lib -lX11 -lXext -lXmu -lXi -lm"
"XLIBS = -rpath ../lib -lX11 -lXext -lXmu -lXi"
# For IRIX 6: -woff:
# 1209 - controlling expression is constant
@@ -381,7 +380,7 @@ irix6-n32:
"CC = cc" \
"CFLAGS = -n32 -mips3 -O3 -ansi -woff 1209,1521" \
"MAKELIB = ../bin/mklib.ar-rcv" \
"XLIBS = -lX11 -lXext -lXmu -lXi -lm"
"XLIBS = -lX11 -lXext -lXmu -lXi"
irix6-n32-dso:
pmake $(MFLAGS) -f Makefile.X11 targets \
@@ -393,7 +392,7 @@ irix6-n32-dso:
"CC = cc" \
"CFLAGS = -n32 -mips3 -O3 -ansi -DSHM -woff 1185,1521" \
"MAKELIB = ../bin/mklib.irix6-n32" \
"XLIBS = -rpath ../lib32 -lX11 -lXmu -lXi -lfpe -lm"
"XLIBS = -rpath ../lib32 -lX11 -lXmu -lXi -lfpe"
irix6-gcc-n32-sl:
make $(MFLAGS) -f Makefile.X11 targets \
@@ -405,7 +404,7 @@ irix6-gcc-n32-sl:
"CC = gcc" \
"CFLAGS = -mabi=n32 -mips3 -O3 -DSHM" \
"MAKELIB = ../bin/mklib.irix6-n32" \
"XLIBS = -rpath ../lib32 -lX11 -lXmu -lXi -lm"
"XLIBS = -rpath ../lib32 -lX11 -lXmu -lXi"
# For IRIX 6-64: -woff:
# 1068 - integer conversion resulted in a change of sign
@@ -425,7 +424,7 @@ irix6-64:
"CC = cc" \
"CFLAGS = -64 -O3 -ansi -woff 1068,1069,1174,1185,1209,1474,1552 -DSHM" \
"MAKELIB = ../bin/mklib.ar-rcv" \
"XLIBS = -lX11 -lXext -lXmu -lXi -lm"
"XLIBS = -lX11 -lXext -lXmu -lXi"
irix6-64-dso:
pmake $(MFLAGS) -f Makefile.X11 targets \
@@ -437,7 +436,7 @@ irix6-64-dso:
"CC = cc" \
"CFLAGS = -64 -O3 -ansi -woff 1068,1069,1174,1185,1209,1474,1552 -DSHM" \
"MAKELIB = ../bin/mklib.irix6-64" \
"XLIBS = -rpath ../lib64 -lX11 -lXmu -lXi -lm"
"XLIBS = -rpath ../lib64 -lX11 -lXmu -lXi"
# May want to try these CFLAGS for better performance under Linux and GCC:
# -fPIC -O2 -ansi -pedantic -mieee-fp -DSHM -funroll-loops
@@ -451,9 +450,9 @@ linux:
"GLUT_LIB = libglut.a" \
"GLW_LIB = libGLw.a" \
"CC = gcc" \
"CFLAGS = -O3 -funroll-loops -ansi -pedantic -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -DSHM -I/usr/X11R6/include" \
"CFLAGS = -O2 -funroll-loops -ansi -pedantic -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -DSHM -I/usr/X11R6/include" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lm"
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE"
# One Linux user reports having to use these XLIBS:
# -lMrm -lXmu -lXi -lXt -lXext -lXmu -lXi -lSM -lICE -lX11
@@ -467,7 +466,7 @@ linux-elf:
"CC = gcc" \
"CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -DSHM -I/usr/X11R6/include" \
"MAKELIB = ../bin/mklib.linux" \
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lm"
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE"
linux-glide:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -488,10 +487,10 @@ linux-386:
"GLUT_LIB = libglut.a" \
"GLW_LIB = libGLw.a" \
"CC = gcc" \
"CFLAGS = -O3 -funroll-loops -ansi -pedantic -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -DSHM -DUSE_X86_ASM -I/usr/X11R6/include" \
"CFLAGS = -O2 -funroll-loops -ansi -pedantic -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -DSHM -DUSE_X86_ASM -I/usr/X11R6/include" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lm" \
"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S X86/vertex.S"
"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S"
linux-386-elf:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -503,7 +502,7 @@ linux-386-elf:
"CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -DSHM -DUSE_X86_ASM -I/usr/X11R6/include" \
"MAKELIB = ../bin/mklib.linux" \
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lm" \
"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S X86/vertex.S"
"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S"
linux-386-glide:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -515,7 +514,7 @@ linux-386-glide:
"CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_X86_ASM -DSHM -DFX -I/usr/X11R6/include -I/usr/include/glide -I/usr/local/glide/include" \
"MAKELIB = ../bin/mklib.linux" \
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -L/usr/local/glide/lib -lglide2x -lm" \
"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S X86/vertex.S"
"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S"
linux-386-glide-mits:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -527,7 +526,7 @@ linux-386-glide-mits:
"CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -DSHM -DFX -D_REENTRANT -DMITS -DUSE_X86_ASM -I/usr/X11R6/include -I/usr/include/glide -I/usr/local/glide/include" \
"MAKELIB = ../bin/mklib.linux" \
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -L/usr/local/glide/lib -lglide2x -lm -lpthread" \
"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S X86/vertex.S"
"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S"
linux-386-opt-V2-glide:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -539,7 +538,7 @@ linux-386-opt-V2-glide:
"CFLAGS = -O3 -m486 -fomit-frame-pointer -pipe -ansi -pedantic -ffast-math -fexpensive-optimizations -malign-loops=2 -malign-jumps=2 -malign-functions=2 -D_SVID_SOURCE -D_BSD_SOURCE -DSHM -DFX -DFX_V2 -DUSE_X86_ASM -I/usr/X11R6/include -I/usr/include/glide -I/usr/local/glide/include"\
"MAKELIB = ../bin/mklib.linux" \
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -L/usr/local/glide/lib -lglide2x -lm -lpthread" \
"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S X86/vertex.S"
"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S"
linux-386-opt-glide:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -551,7 +550,7 @@ linux-386-opt-glide:
"CFLAGS = -O3 -m486 -fomit-frame-pointer -pipe -ansi -pedantic -ffast-math -fexpensive-optimizations -malign-loops=2 -malign-jumps=2 -malign-functions=2 -D_SVID_SOURCE -D_BSD_SOURCE -DSHM -DFX -DUSE_X86_ASM -I/usr/X11R6/include -I/usr/include/glide -I/usr/local/glide/include" \
"MAKELIB = ../bin/mklib.linux" \
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -L/usr/local/glide/lib -lglide2x -lm" \
"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S X86/vertex.S"
"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S"
linux-3dnow:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -562,14 +561,14 @@ linux-3dnow:
"CC = gcc -malign-loops=2 -malign-jumps=2 -malign-functions=2" \
"CFLAGS = -Wall -O3 -ansi -pedantic -fPIC -ffast-math -funroll-loops -fomit-frame-pointer -D_SVID_SOURCE -D_BSD_SOURCE -DSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -I/usr/X11R6/include" \
"MAKELIB = ../bin/mklib.linux" \
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lm" \
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE" \
"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S \
X86/mmx_blend.S \
X86/3dnow_xform_raw1.S X86/3dnow_xform_raw2.S \
X86/3dnow_xform_raw3.S X86/3dnow_xform_raw4.S \
X86/3dnow_xform_masked1.S X86/3dnow_xform_masked2.S \
X86/3dnow_xform_masked3.S X86/3dnow_xform_masked4.S \
X86/3dnow_norm_raw.S X86/vertex.S X86/vertex_3dnow.S"
X86/3dnow_norm_raw.S"
linux-3dnow-glide:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -587,23 +586,10 @@ linux-3dnow-glide:
X86/3dnow_xform_raw3.S X86/3dnow_xform_raw4.S \
X86/3dnow_xform_masked1.S X86/3dnow_xform_masked2.S \
X86/3dnow_xform_masked3.S X86/3dnow_xform_masked4.S \
X86/3dnow_norm_raw.S X86/vertex.S X86/vertex_3dnow.S \
X86/3dnow_norm_raw.S \
FX/X86/fx_3dnow_fastpath.S"
# Contributed by C. Alex. North-Keys (erlkonig@talisman.org)
linux-386-pthread-shared-glide:
$(MAKE) $(MFLAGS) targets \
"GL_LIB = libGL.so" \
"GLU_LIB = libGLU.so" \
"GLUT_LIB = libglut.so" \
"CC = gcc" \
"CFLAGS = -O3 -fPIC -funroll-loops -ansi -pedantic -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DSHM -DUSE_X86_ASM -D_REENTRANT -DTHREADS -DPTHREADS -DFX -I/usr/include/glide -I/usr/local/glide/include" \
"MAKELIB = ../mklib.glide" \
"XLIBS = -L/usr/X11/lib -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lpthread -lm" \
"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S \
X86/mmx_blend.S X86/vertex.S"
# Contributed by Uwe_Maurer@t-online.de
linux-ggi:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -614,7 +600,7 @@ linux-ggi:
"CC = gcc" \
"CFLAGS = -O3 -fPIC -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DSHM -DGGI -DCDECL=" \
"MAKELIB = ../bin/mklib.ggi" \
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lggi -lm"
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lggi"
# Contributed by Emmanuel marty core@ggi-project.org
linux-386-ggi:
@@ -626,8 +612,8 @@ linux-386-ggi:
"CC = gcc" \
"CFLAGS = -O3 -fPIC -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DSHM -DUSE_X86_ASM -DGGI -DCDECL=" \
"MAKELIB = ../bin/mklib.ggi" \
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lggi -lm" \
"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S X86/vertex.S"
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lggi" \
"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S"
# Linux on Alpha (based on email from John Ferguson ferguson@viz.tamu.edu)
linux-alpha:
@@ -637,9 +623,9 @@ linux-alpha:
"GLUT_LIB = libglut.so" \
"GLW_LIB = libGLw.a" \
"CC = gcc" \
"CFLAGS = -O3 -mieee -pedantic -L/usr/X11R6/lib -D_XOPEN_SOURCE -DSHM" \
"CFLAGS = -O2 -mieee -pedantic -L/usr/X11R6/lib -D_XOPEN_SOURCE -DSHM" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -L/usr/X11R6/lib -lX11 -lm"
"XLIBS = -L/usr/X11R6/lib -lX11"
linux-alpha-elf:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -650,7 +636,7 @@ linux-alpha-elf:
"CC = gcc" \
"CFLAGS = -ansi -mieee -pedantic -fPIC -D_XOPEN_SOURCE -DSHM" \
"MAKELIB = ../bin/mklib.linux" \
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXi -lm"
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXi"
# Not tested, but should be okay on any RedHat-based linux for PowerPC machines
# If your linux supports shared libraries, you might want to build with the
@@ -666,7 +652,7 @@ linux-ppc:
"CC = gcc" \
"CFLAGS = -O3 -mcpu=603 -ansi -pedantic -fsigned-char -ffast-math -funroll-loops -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DSHM" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lm"
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE"
# -O5 and -fexpensive-optimizations causes a compiler crash for Linux PPC R4
linux-ppc-so:
@@ -678,7 +664,7 @@ linux-ppc-so:
"CC = gcc" \
"CFLAGS = -O3 -mcpu=603 -ansi -pedantic -fPIC -fsigned-char -ffast-math -funroll-loops -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DSHM" \
"MAKELIB = ../bin/mklib.linux" \
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lm"
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE"
# Contributed by John Stone
linux-386-pthread:
@@ -687,10 +673,10 @@ linux-386-pthread:
"GLU_LIB = libGLU.a" \
"GLUT_LIB = libglut.a" \
"CC = gcc" \
"CFLAGS = -O3 -funroll-loops -ansi -pedantic -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R\6/include -DSHM -DUSE_X86_ASM -D_REENTRANT -DTHREADS -DPTHREADS" \
"CFLAGS = -O2 -funroll-loops -ansi -pedantic -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R\6/include -DSHM -DUSE_X86_ASM -D_REENTRANT -DTHREADS -DPTHREADS" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lpthread -lm" \
"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S X86/vertex.S"
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lpthread" \
"ASM_SOURCES = asm_386.S"
# Contributed by John Gotts
linux-386-pthread-shared:
@@ -701,8 +687,8 @@ linux-386-pthread-shared:
"CC = gcc" \
"CFLAGS = -O3 -fPIC -funroll-loops -ansi -pedantic -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -I/us\r/X11R6/include -DSHM -DUSE_X86_ASM -D_REENTRANT -DTHREADS -DPTHREADS" \
"MAKELIB = ../bin/mklib.linux" \
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lpthread -lm" \
"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S X86/vertex.S"
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lpthread" \
"ASM_SOURCES = asm_386.S"
linux-sparc:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -713,7 +699,7 @@ linux-sparc:
"CC = gcc" \
"CFLAGS = -pedantic -funroll-loops -O3 -DSHM" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXt -lSM -lICE -lXmu -lXi -lm"
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXt -lSM -lICE -lXmu -lXi"
# Replace -mv8 with -mcypress, -msupersparc or -msparclite as appropriate.
linux-sparc5-elf:
@@ -723,9 +709,9 @@ linux-sparc5-elf:
"GLUT_LIB = libglut.so" \
"GLW_LIB = libGLw.so" \
"CC = gcc" \
"CFLAGS = -mv8 -O3 -ffast-math -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DSHM" \
"CFLAGS = -mv8 -O2 -ffast-math -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DSHM" \
"MAKELIB = ../bin/mklib.linux" \
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lm"
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE"
# 32-bit Sparc ELF userland, on UltraSparc
linux-sparc-ultra:
@@ -735,9 +721,9 @@ linux-sparc-ultra:
"GLUT_LIB = libglut.so" \
"GLW_LIB = libGLw.so" \
"CC = gcc" \
"CFLAGS = -mv8 -O3 -mtune=ultrasparc -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DSHM" \
"CFLAGS = -mv8 -O2 -mtune=ultrasparc -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DSHM" \
"MAKELIB = ../bin/mklib.linux" \
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lm"
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE"
# May want to add these CFLAGS for better performance under LynxOS and GCC:
# -fPIC -O2 -ansi -pedantic -mieee-fp -DSHM -funroll-loops
@@ -753,7 +739,7 @@ lynxos:
"CC = gcc" \
"CFLAGS = -O2 -ansi -pedantic -funroll-loops -ffast-math -DSHM" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -L/usr/X11/lib -lXext -lXi -lXmu -lX11 -lbsd -lm"
"XLIBS = -L/usr/X11/lib -lXext -lXi -lXmu -lX11 -lbsd"
machten-2.2:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -764,7 +750,7 @@ machten-2.2:
"CC = gcc" \
"CFLAGS = -DTENON -D__MACHTEN__ -fstrength-reduce -m68881 -O2" \
"MAKELIB = ../bin/mklib.ar-rcv" \
"XLIBS = -L/usr/lib/X11 -lX11 -lm"
"XLIBS = -L/usr/lib/X11 -lX11"
machten-4.0:
$(MAKE) targets \
@@ -775,7 +761,7 @@ machten-4.0:
"CC = gcc" \
"CFLAGS = -DTENON -D__MACHTEN__ -fstrength-reduce -O2" \
"MAKELIB = ../bin/mklib.ar-rcv" \
"XLIBS = -L/usr/X11R5/lib -lX11 -lm"
"XLIBS = -L/usr/X11R5/lib -lX11"
mklinux:
$(MAKE) targets \
@@ -786,7 +772,7 @@ mklinux:
"CC = gcc" \
"CFLAGS = -pedantic -O2" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -lmoto -L/usr/X11/lib -lXmu -lX11 -lm"
"XLIBS = -lmoto -L/usr/X11/lib -lXmu -lX11"
netbsd:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -795,9 +781,9 @@ netbsd:
"GLUT_LIB = libglut.so" \
"GLW_LIB = libGLw.so" \
"CC = gcc" \
"CFLAGS = -O3 -fPIC -DSHM -I/usr/X11R6/include -DHZ=100" \
"CFLAGS = -O2 -fPIC -DSHM -I/usr/X11R6/include -DHZ=100" \
"MAKELIB = ../bin/mklib.netbsd" \
"XLIBS = -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11 -lm"
"XLIBS = -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11"
next:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -817,7 +803,7 @@ openbsd:
"CC = cc" \
"CFLAGS = -O2 -fPIC -I/usr/X11R6/include -DSHM -DHZ=100" \
"MAKELIB = ../bin/mklib.openbsd" \
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXi -lm"
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXi"
openstep:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -846,8 +832,8 @@ os2-x11:
"CC = gcc" \
"CFLAGS = -Zmt -O3 -m486 -funroll-loops -Wall -Wno-unused -ansi -pedantic -ffast-math -DUSE_X86_ASM -D_SVID_SOURCE -D_BSD_SOURCE -I$(X11ROOT)/XFree86/include" \
"MAKELIB = ..\\bin\\mklib-emx.cmd " \
"XLIBS = -Zmt -Zcrtdll -Zexe -L$(X11ROOT)/XFree86/lib -lXt -lX11 -lm" \
"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S X86/vertex.S"
"XLIBS = -Zmt -Zcrtdll -Zexe -L$(X11ROOT)/XFree86/lib -lXt -lX11" \
"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S"
osf1:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -858,7 +844,7 @@ osf1:
"CC = cc" \
"CFLAGS = -O2 -std1 -ieee_with_no_inexact -DSHM -DNO_CONST" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -lX11 -lXext -lXmu -lXi -lm"
"XLIBS = -lX11 -lXext -lXmu -lXi"
osf1-sl:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -869,7 +855,7 @@ osf1-sl:
"CC = cc" \
"CFLAGS = -O2 -std1 -ieee_with_no_inexact -DSHM -DNO_CONST" \
"MAKELIB = ../bin/mklib.osf1" \
"XLIBS = -lX11 -lXext -lXmu -lXi -lm"
"XLIBS = -lX11 -lXext -lXmu -lXi"
pgi-cygnus:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -880,7 +866,7 @@ pgi-cygnus:
"CC = pgcc" \
"CFLAGS = -fast -cyglibs -Munix -I. -DWIN32 -D__WIN32__ -D_WINDOWS " \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -lX11 -lm"
"XLIBS = -lX11"
pgi-mingw32:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -891,7 +877,7 @@ pgi-mingw32:
"CC = pgcc" \
"CFLAGS = -fast -msvcrt -Munix -I. -DWIN32 -D__WIN32__ -D_WINDOWS " \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -lX11 -lm"
"XLIBS = -lX11"
# QNX V4 & Watcom Compiler
qnx:
@@ -903,7 +889,7 @@ qnx:
"CC = cc" \
"CFLAGS = -O" \
"MAKELIB = ../bin/mklib.qnx" \
"XLIBS = -L/usr/X11/lib -lX11 -lm"
"XLIBS = -L/usr/X11/lib -lX11"
sco:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -914,21 +900,10 @@ sco:
"CC = gcc" \
"CFLAGS = -pedantic -O2 -mieee-fp" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -L/usr/X11/lib -lX11 -lm"
sco5:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
"GL_LIB = libGL.a" \
"GLU_LIB = libGLU.a" \
"GLUT_LIB = libglut.a" \
"GLW_LIB = libGLw.a" \
"CC = gcc" \
"CFLAGS = -pedantic -O2 -mieee-fp" \
"MAKELIB = ../mklib.ar-ruv" \
"XLIBS = -lXm -lXt -lX11 -lXmu -lXext -lsocket -lx -lm"
"XLIBS = -L/usr/X11/lib -lX11"
solaris-x86:
$(MAKE) -f Makefile.X11 targets \
$(MAKE) targets \
"GL_LIB = libGL.a" \
"GLU_LIB = libGLU.a" \
"GLUT_LIB = libglut.a" \
@@ -936,10 +911,10 @@ solaris-x86:
"CC = cc" \
"CFLAGS = -Xa -xO3 -xpentium -KPIC -I/usr/openwin/include -DSHM" \
"MAKELIB = ../bin/mklib.solaris" \
"XLIBS = -L/usr/openwin/lib -R/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm"
"XLIBS = -L/usr/openwin/lib -R/usr/openwin/lib -lX11 -lXext -lXmu -lXi"
solaris-x86-gcc:
$(MAKE) -f Makefile.X11 targets \
$(MAKE) targets \
"GL_LIB = libGL.a" \
"GLU_LIB = libGLU.a" \
"GLUT_LIB = libglut.a" \
@@ -947,7 +922,7 @@ solaris-x86-gcc:
"CC = gcc" \
"CFLAGS = -O3 -m486 -fPIC -I/usr/openwin/include -DSHM" \
"MAKELIB = ../bin/mklib.solaris" \
"XLIBS = -L/usr/openwin/lib -R/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm"
"XLIBS = -L/usr/openwin/lib -R/usr/openwin/lib -lX11 -lXext -lXmu -lXi"
sunos4:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -958,7 +933,7 @@ sunos4:
"CC = acc" \
"CFLAGS = -O -DSHM -DSUNOS4" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -lX11 -lXext -lXmu -lXi -lm"
"XLIBS = -lX11 -lXext -lXmu -lXi"
sunos4-sl:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -969,7 +944,7 @@ sunos4-sl:
"CC = acc" \
"CFLAGS = -Kpic -O -I/usr/include/X11R5 -DSHM -DSUNOS4" \
"MAKELIB = ld -assert pure-text -o" \
"XLIBS = -L/usr/lib/X11R5 -lX11 -lXext -lXmu -lXi -lm"
"XLIBS = -L/usr/lib/X11R5 -lX11 -lXext -lXmu -lXi"
sunos4-gcc:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -980,7 +955,7 @@ sunos4-gcc:
"CC = gcc" \
"CFLAGS = -O3 -DSHM -DSUNOS4 -I/usr/openwin/include" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -L/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm"
"XLIBS = -L/usr/openwin/lib -lX11 -lXext -lXmu -lXi"
sunos4-gcc-sl:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -991,7 +966,7 @@ sunos4-gcc-sl:
"CC = gcc" \
"CFLAGS = -fPIC -O3 -I/usr/openwin/include -I/usr/include/X11R5 -I/usr/include/X11R5 -DSHM -DSUNOS4 -DSOLARIS_2_4_BUG" \
"MAKELIB = ../bin/mklib.sunos4" \
"XLIBS = -L/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm"
"XLIBS = -L/usr/openwin/lib -lX11 -lXext -lXmu -lXi"
sunos4-gcc-x11r6-sl:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -1002,7 +977,7 @@ sunos4-gcc-x11r6-sl:
"CC = gcc" \
"CFLAGS = -fPIC -O3 -I/usr/X11R6.3/include -DSHM -DSUNOS4 -DSOLARIS_2_4_BUG" \
"MAKELIB = ../bin/mklib.sunos4" \
"XLIBS = -L/usr/X11R6.3/lib/X11 -lX11 -lXext -lXmu -lXi -lm"
"XLIBS = -L/usr/X11R6.3/lib/X11 -lX11 -lXext -lXmu -lXi"
sunos5:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -1013,7 +988,7 @@ sunos5:
"CC = cc" \
"CFLAGS = -Xa -fast -xO4 -native -I/usr/openwin/include -I/usr/dt/include -DSHM -DSOLARIS_2_4_BUG" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -L/usr/openwin/lib -L/usr/dt/lib -R/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm"
"XLIBS = -L/usr/openwin/lib -L/usr/dt/lib -R/usr/openwin/lib -lX11 -lXext -lXmu -lXi"
sunos5-sl:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -1024,7 +999,7 @@ sunos5-sl:
"CC = cc" \
"CFLAGS = -KPIC -Xa -O -I/usr/openwin/include -I/usr/dt/include -DSHM -DSOLARIS_2_4_BUG" \
"MAKELIB = ../bin/mklib.sunos5" \
"XLIBS = -L/usr/openwin/lib -L/usr/dt/lib -R/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm"
"XLIBS = -L/usr/openwin/lib -L/usr/dt/lib -R/usr/openwin/lib -lX11 -lXext -lXmu -lXi"
sunos5-ultra:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -1035,7 +1010,7 @@ sunos5-ultra:
"CC = cc" \
"CFLAGS = -Xa -fast -xO5 -xtarget=ultra -I/usr/openwin/include -I/usr/dt/include -DSHM -DSOLARIS_2_4_BUG" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -L/usr/openwin/lib -L/usr/dt/lib -R/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm"
"XLIBS = -L/usr/openwin/lib -L/usr/dt/lib -R/usr/openwin/lib -lX11 -lXext -lXmu -lXi"
sunos5-ultra-sl:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -1046,7 +1021,7 @@ sunos5-ultra-sl:
"CC = cc" \
"CFLAGS = -KPIC -Xa -fast -xO5 -xtarget=ultra -I/usr/openwin/include -I/usr/dt/include -DSHM -DSOLARIS_2_4_BUG" \
"MAKELIB = ../bin/mklib.sunos5" \
"XLIBS = -L/usr/openwin/lib -L/usr/dt/lib -R/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm"
"XLIBS = -L/usr/openwin/lib -L/usr/dt/lib -R/usr/openwin/lib -lX11 -lXext -lXmu -lXi"
sunos5-gcc:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -1057,7 +1032,7 @@ sunos5-gcc:
"CC = gcc" \
"CFLAGS = -O3 -I/usr/openwin/include -DSHM -DSOLARIS_2_4_BUG" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -L/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm"
"XLIBS = -L/usr/openwin/lib -lX11 -lXext -lXmu -lXi"
sunos5-gcc-sl:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -1068,7 +1043,7 @@ sunos5-gcc-sl:
"CC = gcc" \
"CFLAGS = -fPIC -O3 -I/usr/openwin/include -DSHM -DSOLARIS_2_4_BUG" \
"MAKELIB = ../bin/mklib.sunos5" \
"XLIBS = -L/usr/openwin/lib -R/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm"
"XLIBS = -L/usr/openwin/lib -R/usr/openwin/lib -lX11 -lXext -lXmu -lXi"
sunos5-x11r6-gcc-sl:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -1079,7 +1054,7 @@ sunos5-x11r6-gcc-sl:
"CC = gcc" \
"CFLAGS = -fPIC -O3 -DSHM -DSOLARIS_2_4_BUG" \
"MAKELIB = ../bin/mklib.sunos5" \
"XLIBS = -lSM -lICE -lX11 -lXext -lXmu -lXi -lnsl -lsocket -lm"
"XLIBS = -lSM -lICE -lX11 -lXext -lXmu -lXi -lnsl -lsocket"
# Contributed by John Stone
sunos5-pthread:
@@ -1090,7 +1065,7 @@ sunos5-pthread:
"CC = cc" \
"CFLAGS = -mt -Xa -fast -xO4 -native -I/usr/openwin/include -I/usr/dt/include -DSHM -DSOLARIS_2_4\_BUG -DTHREADS -DPTHREADS" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -L/usr/openwin/lib -L/usr/dt/lib -R/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lpthread -lm"
"XLIBS = -L/usr/openwin/lib -L/usr/dt/lib -R/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lpthread"
# Contributed by John Stone
sunos5-thread:
@@ -1101,7 +1076,7 @@ sunos5-thread:
"CC = cc" \
"CFLAGS = -mt -Xa -fast -xO4 -native -I/usr/openwin/include -I/usr/dt/include -DSHM -DSOLARIS_2_4\_BUG -DTHREADS -DSOLARIS_THREADS" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -L/usr/openwin/lib -L/usr/dt/lib -R/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lthread -lm"
"XLIBS = -L/usr/openwin/lib -L/usr/dt/lib -R/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lthread"
# Contributed by John Stone
sunos5-gcc-thread:
@@ -1112,7 +1087,7 @@ sunos5-gcc-thread:
"CC = gcc" \
"CFLAGS = -O3 -I/usr/openwin/include -DSHM -DSOLARIS_2_4_BUG -D_REENTRANT -DTHREADS -DSOLARIS_THR\EADS" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -L/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lthread -lm"
"XLIBS = -L/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lthread"
# Contributed by John Stone
sunos5-gcc-pthread:
@@ -1123,7 +1098,7 @@ sunos5-gcc-pthread:
"CC = gcc" \
"CFLAGS = -O3 -I/usr/openwin/include -DSHM -DSOLARIS_2_4_BUG -D_REENTRANT -DTHREADS -DPTHREADS" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -L/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lpthread -lm"
"XLIBS = -L/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lpthread"
# from Ron Metoyer (metoyer@iexist.flw.lucent.com)
sunSolaris-CC:
@@ -1135,7 +1110,7 @@ sunSolaris-CC:
"CC = CC" \
"CFLAGS = -O -I/usr/openwin/include -DSHM -DSOLARIS_2_4_BUG" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -L/usr/openwin/lib -R/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm"
"XLIBS = -L/usr/openwin/lib -R/usr/openwin/lib -lX11 -lXext -lXmu -lXi"
#This config doesn't work, Ultrix C compiler isn't ANSI compliant
ultrix:
@@ -1147,7 +1122,7 @@ ultrix:
"CC = cc" \
"CFLAGS = -O -Dconst=/**/" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -lXmu -lX11 -lXi -lm"
"XLIBS = -lXmu -lX11 -lXi"
ultrix-gcc:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -1158,7 +1133,7 @@ ultrix-gcc:
"CC = gcc" \
"CFLAGS = -pedantic -O2" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -lXmu -lX11 -lXi -lm"
"XLIBS = -lXmu -lX11 -lXi"
# tested on Cray C90 running UNICOS 8.0.4
unicos:
@@ -1170,7 +1145,7 @@ unicos:
"CC = cc" \
"CFLAGS =" \
"MAKELIB = ../bin/mklib/ar-rcv" \
"XLIBS = -lX11 -lXext -lXmu -lXi -lm"
"XLIBS = -lX11 -lXext -lXmu -lXi"
unixware:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -1181,7 +1156,7 @@ unixware:
"CC = cc" \
"CFLAGS = -O -I/usr/X/include -DSHM" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -lX11 -lXext -lXmu -lXi -lsocket -lnsl -lm"
"XLIBS = -lX11 -lXext -lXmu -lXi -lsocket -lnsl"
unixware-shared:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -1192,7 +1167,7 @@ unixware-shared:
"CC = cc" \
"CFLAGS = -O -I/usr/X/include -KPIC,inline -DSHM" \
"MAKELIB = ../bin/mklib.solaris" \
"XLIBS = -lX11 -lXext -lXmu -lXi -lsocket -lnsl -lm"
"XLIBS = -lX11 -lXext -lXmu -lXi -lsocket -lnsl"
uwin:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -1202,7 +1177,7 @@ uwin:
"CC = gcc" \
"CFLAGS = -pedantic -O2 -I/usr/X11/include " \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -L/usr/X11/lib -lX11 -lm"
"XLIBS = -L/usr/X11/lib -lX11"
vistra:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -1213,7 +1188,7 @@ vistra:
"CC = gcc" \
"CFLAGS = -pedantic -O2" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -lX11 -lsocket -lnsl -lgen -lm"
"XLIBS = -lX11 -lsocket -lnsl -lgen"
# for debugging on IRIX 5.x systems
@@ -1232,7 +1207,7 @@ irix-debug:
"CC = cc" \
"CFLAGS = -g -n32 -ansi -fullwarn -DSHM -DDEBUG -woff 1209,1210,1506,1521,3496" \
"MAKELIB = ../bin/mklib.ar-rcv" \
"XLIBS = -rpath ../lib32 -lX11 -lXext -lXmu -lXi -lfpe -lXext -lXmu -lXi -lm"
"XLIBS = -rpath ../lib32 -lX11 -lXext -lXmu -lXi -lfpe -lXext -lXmu -lXi"
DEBUG:
pmake $(MFLAGS) -f Makefile.X11 targets \
@@ -1243,7 +1218,7 @@ DEBUG:
"CC = cc" \
"CFLAGS = -g -ansi -prototypes -fullwarn -DSHM -DDEBUG" \
"MAKELIB = ../bin/mklib.ar-rcv" \
"XLIBS = -lX11 -lXext -lXmu -lXi -lfpe -lm"
"XLIBS = -lX11 -lXext -lXmu -lXi -lfpe"
# for debugging on Linux systems
linux-debug:
@@ -1255,22 +1230,10 @@ linux-debug:
"CC = gcc" \
"CFLAGS = -g -ansi -pedantic -Wall -DSHM -DDEBUG -DSVGA -DFX -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_X86_ASM_not -I/usr/include/glide -I/usr/local/glide/include" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -L/usr/local/glide/lib -lglide2x -ltexus -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lvga -lm" \
"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S X86/vertex.S"
"XLIBS = -L/usr/local/glide/lib -lglide2x -ltexus -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lvga" \
"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S"
linux-elf-debug:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
"GL_LIB = libGL.so" \
"GLU_LIB = libGLU.so" \
"GLUT_LIB = libglut.so" \
"GLW_LIB = libGLw.so" \
"CC = gcc" \
"CFLAGS = -g -ansi -pedantic -Wall -fPIC -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -DSHM -DDEBUG -DSVGA -DFX -I/usr/X11R6/include -I/usr/include/glide" \
"MAKELIB = ../bin/mklib.linux" \
"XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lvga -lm -lvga -L/usr/local/lib -L/usr/local/glide/lib -lglide2x" \
"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S X86/vertex.S"
linux-glide-debug:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
"GL_LIB = libGL.so" \
"GLU_LIB = libGLU.so" \
@@ -1279,8 +1242,8 @@ linux-glide-debug:
"CC = gcc" \
"CFLAGS = -g -ansi -pedantic -Wall -fPIC -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DSHM -DFX -DDEBUG -I/usr/local/glide/include -I/usr/include/glide" \
"MAKELIB = ../bin/mklib.linux" \
"XLIBS = -L/usr/local/glide/lib -lglide2x -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lvga -lm" \
"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S X86/vertex.S"
"XLIBS = -L/usr/local/glide/lib -lglide2x -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lvga -L/usr/local/glide/lib -lglide2x -lm" \
"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S"
# for profiling on Linux systems
linux-prof:
@@ -1292,12 +1255,11 @@ linux-prof:
"CC = gcc" \
"CFLAGS = -O2 -pg -ansi -pedantic -Wall -DSHM -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -I/usr/include/glide -I/usr/local/glide/include" \
"MAKELIB = ../bin/mklib.ar-ruv" \
"XLIBS = -L/usr/local/glide/lib -lglide2x -L/usr/X11/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lm" \
"XLIBS = -L/usr/local/glide/lib -lglide2x -L/usr/X11/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE" \
"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S \
X86/mmx_blend.S \
X86/3dnow_xform_raw1.S X86/3dnow_xform_raw2.S \
X86/3dnow_xform_raw3.S X86/3dnow_xform_raw4.S \
X86/3dnow_xform_masked1.S X86/3dnow_xform_masked2.S \
X86/3dnow_xform_masked3.S X86/3dnow_xform_masked4.S \
X86/3dnow_norm_raw.S X86/vertex.S X86/vertex_3dnow.S \
FX/X86/fx_3dnow_fastpath.S"
X86/3dnow_norm_raw.S"

View File

@@ -1,9 +1,9 @@
# $Id: Makefile.X11,v 1.12.2.8 2000/03/23 00:14:28 brianp Exp $
# $Id: Makefile.X11,v 1.1.1.1 1999/08/19 00:55:39 jtg Exp $
# Mesa 3-D graphics library
# Version: 3.2
# Version: 3.1
#
# Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
# Copyright (C) 1999 Brian Paul All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -84,7 +84,6 @@ default:
@echo " make linux-3dnow-glide for Linux on AMD w/ 3DNow! for Glide"
@echo " make linux-386-pthread for Linux w/ Intel assembly and linuxthreads"
@echo " make linux-386-pthread-shared for Linux w/ Intel assembly and linuxthreads"
@echo " make linux-386-pthread-shared-glide for Linux w/ Intel assembly, linuxthreads, and 3Dfx Glide driver"
@echo " make linux-sparc for Linux on Sparc systems"
@echo " make linux-sparc5-elf for Sparc5 systems, make ELF shared libs"
@echo " make linux-sparc-ultra for UltraSparc systems, make ELF shared libs"
@@ -104,7 +103,6 @@ default:
@echo " make pgi-mingw32 for mingW32 with Portland Group, Inc. compiler"
@echo " make qnx for QNX V4 systems with Watcom compiler"
@echo " make sco for SCO Unix systems with ODT"
@echo " make sco5 for SCO 5.0.5 OpenServer Unix"
@echo " make solaris-x86 for PCs with Solaris"
@echo " make solaris-x86-gcc for PCs with Solaris using GCC"
@echo " make sunos4 for Suns with SunOS 4.x"
@@ -139,20 +137,20 @@ default:
aix aix-sl amix bsdos bsdos4 dgux freebsd freebsd-386 gcc \
hpux9 hpux9-sl hpux9-gcc hpux9-gcc-sl \
hpux10 hpux10-sl hpux10-gcc hpux10-gcc-sl \
irix4 irix5 irix5-gcc irix5-dso irix6-o32 irix6-o32-dso \
linux linux-debug linux-prof linux-elf linux-elf-debug linux-glide-debug \
irix-debug irix4 irix5 irix5-gcc irix5-dso irix6-o32 irix6-o32-dso \
linux linux-debug linux-prof linux-elf linux-elf-debug \
linux-glide linux-386-glide linux-386-opt-glide \
linux-386-opt-V2-glide \
linux-386 linux-386-elf \
linux-3dnow linux-3dnow-glide \
linux-alpha linux-alpha-elf \
linux-ppc linux-ppc-so \
linux-386-pthread linux-386-pthread-shared linux-386-pthread-shared-glide \
linux-386-pthread linux-386-pthread-shared \
linux-sparc \
linux-sparc5-elf \
linux-sparc-ultra \
lynxos machten-2.2 machten-4.0 \
mklinux netbsd osf1 osf1-sl openbsd qnx sco sco5 \
mklinux netbsd osf1 osf1-sl openbsd qnx sco \
solaris-x86 solaris-x86-gcc sunSolaris-CC \
sunos4 sunos4-sl sunos4-gcc sunos4-gcc-sl sunos4-gcc-x11r6-sl \
sunos5 sunos5-sl sunos5-ultra sunos5-ultra-sl sunos5-gcc sunos5-gcc-sl \
@@ -169,10 +167,9 @@ sunos5-x11r6-gcc-sl ultrix-gcc unicos unixware uwin vistra:
if [ -d xdemos ] ; then cd xdemos ; $(MAKE) -f Makefile.X11 $@ ; fi
if [ -d samples ] ; then cd samples ; $(MAKE) -f Makefile.X11 $@ ; fi
if [ -d book ] ; then cd book ; $(MAKE) -f Makefile.X11 $@ ; fi
if [ -d widgets-sgi ] ; then cd widgets-sgi; $(MAKE) -f Makefile.X11 $@ ; fi
irix6-n32 irix6-n32-dso irix6-gcc-n32-sl irix-debug:
irix6-n32 irix6-n32-dso irix6-gcc-n32-sl:
-mkdir lib32
touch src/depend
touch src-glu/depend
@@ -184,7 +181,6 @@ irix6-n32 irix6-n32-dso irix6-gcc-n32-sl irix-debug:
if [ -d xdemos ] ; then cd xdemos ; $(MAKE) -f Makefile.X11 $@ ; fi
if [ -d samples ] ; then cd samples ; $(MAKE) -f Makefile.X11 $@ ; fi
if [ -d book ] ; then cd book ; $(MAKE) -f Makefile.X11 $@ ; fi
if [ -d widgets-sgi ] ; then cd widgets-sgi; $(MAKE) -f Makefile.X11 $@ ; fi
irix6-64 irix6-64-dso:
@@ -199,7 +195,6 @@ irix6-64 irix6-64-dso:
if [ -d xdemos ] ; then cd xdemos ; $(MAKE) -f Makefile.X11 $@ ; fi
if [ -d samples ] ; then cd samples ; $(MAKE) -f Makefile.X11 $@ ; fi
if [ -d book ] ; then cd book ; $(MAKE) -f Makefile.X11 $@ ; fi
if [ -d widgets-sgi ] ; then cd widgets-sgi; $(MAKE) -f Makefile.X11 $@ ; fi
amiwin:
@@ -228,10 +223,9 @@ cygnus cygnus-linux:
touch src-glu/depend
cd src ; $(MAKE) -f Makefile.X11 $@
cd src-glu ; $(MAKE) -f Makefile.X11 $@
if [ -d src-glut ] ; then cd src-glut ; $(MAKE) -f Makefile.X11 $@ ; fi
if [ -d demos ] ; then cd demos ; $(MAKE) -f Makefile.X11 $@ ; fi
cd src-glut ; $(MAKE) -f Makefile.X11 $@
cd demos ; $(MAKE) -f Makefile.X11 $@
if [ -d xdemos ] ; then cd xdemos ; $(MAKE) -f Makefile.X11 $@ ; fi
if [ -d widgets-sgi ] ; then cd widgets-sgi; $(MAKE) -f Makefile.X11 $@ ; fi
macintosh:
@echo "See the README file for Macintosh intallation information"
@@ -276,7 +270,6 @@ linux-ggi linux-386-ggi:
if [ -d xdemos ] ; then cd xdemos ; $(MAKE) -f Makefile.X11 $@ ; fi
if [ -d samples ] ; then cd samples ; $(MAKE) -f Makefile.X11 $@ ; fi
if [ -d book ] ; then cd book ; $(MAKE) -f Makefile.X11 $@ ; fi
if [ -d widgets-sgi ] ; then cd widgets-sgi; $(MAKE) -f Makefile.X11 $@ ; fi
# if you change GGI_DEST please change it in ggimesa.conf, too.
DESTDIR=/usr/local
@@ -314,192 +307,141 @@ realclean: clean
cd xdemos && $(MAKE) -f Makefile.X11 realclean || true
cd book && $(MAKE) -f Makefile.X11 realclean || true
cd samples && $(MAKE) -f Makefile.X11 realclean || true
cd ggi/demos && $(MAKE) -f Makefile.X11 realclean || true
cd ggi/demos && ($MAKE) -f Makefile.X11 realclean || true
cd src/GGI/default && $(MAKE) -f Makefile.X11 realclean || true
DIRECTORY = Mesa-3.2
LIB_NAME = MesaLib-3.2
DEMO_NAME = MesaDemos-3.2
DIRECTORY = Mesa-3.1
LIB_NAME = MesaLib-3.1beta2
DEMO_NAME = MesaDemos-3.1beta2
LIB_FILES = \
$(DIRECTORY)/Makefile* \
$(DIRECTORY)/Make-config \
$(DIRECTORY)/acconfig.h \
$(DIRECTORY)/acinclude.m4 \
$(DIRECTORY)/aclocal.m4 \
$(DIRECTORY)/conf.h.in \
$(DIRECTORY)/config.guess \
$(DIRECTORY)/config.sub \
$(DIRECTORY)/configure \
$(DIRECTORY)/configure.in \
$(DIRECTORY)/install-sh \
$(DIRECTORY)/ltconfig \
$(DIRECTORY)/ltmain.sh \
$(DIRECTORY)/missing \
$(DIRECTORY)/mkinstalldirs \
$(DIRECTORY)/stamp-h.in \
$(DIRECTORY)/configure \
$(DIRECTORY)/docs/CONFIG \
$(DIRECTORY)/docs/CONFORM \
$(DIRECTORY)/docs/COPYING \
$(DIRECTORY)/docs/COPYRIGHT \
$(DIRECTORY)/docs/DEVINFO \
$(DIRECTORY)/docs/IAFA-PACKAGE \
$(DIRECTORY)/docs/INSTALL \
$(DIRECTORY)/docs/INSTALL.GNU \
$(DIRECTORY)/docs/README \
$(DIRECTORY)/docs/README.* \
$(DIRECTORY)/docs/RELNOTES \
$(DIRECTORY)/docs/VERSIONS \
$(DIRECTORY)/docs/*.spec \
$(DIRECTORY)/bin/README \
$(DIRECTORY)/bin/mklib* \
$(DIRECTORY)/*.BAT \
$(DIRECTORY)/*.bat \
$(DIRECTORY)/descrip.mms \
$(DIRECTORY)/mms-config \
$(DIRECTORY)/xlib.opt \
$(DIRECTORY)/STARTUP.MK \
$(DIRECTORY)/mesawin32.mak \
$(DIRECTORY)/Names.win \
$(DIRECTORY)/win32-openstep.sh \
$(DIRECTORY)/Makefile.dja \
$(DIRECTORY)/common.dja \
$(DIRECTORY)/include/GL/Makefile.in \
$(DIRECTORY)/include/GL/Makefile.am \
$(DIRECTORY)/include/GL/amesa.h \
$(DIRECTORY)/include/GL/dosmesa.h \
$(DIRECTORY)/include/GL/foomesa.h \
$(DIRECTORY)/include/GL/fxmesa.h \
$(DIRECTORY)/include/GL/ggimesa.h \
$(DIRECTORY)/include/GL/gl.h \
$(DIRECTORY)/include/GL/gl_mangle.h \
$(DIRECTORY)/include/GL/glu.h \
$(DIRECTORY)/include/GL/glu_mangle.h \
$(DIRECTORY)/include/GL/glx.h \
$(DIRECTORY)/include/GL/glx_mangle.h \
$(DIRECTORY)/include/GL/mesa_wgl.h \
$(DIRECTORY)/include/GL/mglmesa.h \
$(DIRECTORY)/include/GL/osmesa.h \
$(DIRECTORY)/include/GL/svgamesa.h \
$(DIRECTORY)/include/GL/wmesa.h \
$(DIRECTORY)/include/GL/xmesa.h \
$(DIRECTORY)/include/GL/xmesa_x.h \
$(DIRECTORY)/include/GL/xmesa_xf86.h \
$(DIRECTORY)/include/GLView.h \
$(DIRECTORY)/include/Makefile.in \
$(DIRECTORY)/include/Makefile.am \
$(DIRECTORY)/src/Makefile* \
$(DIRECTORY)/src/descrip.mms \
$(DIRECTORY)/src/mms_depend \
$(DIRECTORY)/src/mesa.conf \
$(DIRECTORY)/src/*.def \
$(DIRECTORY)/src/depend \
$(DIRECTORY)/src/*.[chS] \
$(DIRECTORY)/src/Allegro/*.[ch] \
$(DIRECTORY)/src/BeOS/*.cpp \
$(DIRECTORY)/src/D3D/*.cpp \
$(DIRECTORY)/src/D3D/*.CPP \
$(DIRECTORY)/src/D3D/*.h \
$(DIRECTORY)/src/D3D/*.H \
$(DIRECTORY)/src/D3D/*.c \
$(DIRECTORY)/src/D3D/*.C \
$(DIRECTORY)/src/D3D/MAKEFILE \
$(DIRECTORY)/src/D3D/*bat \
$(DIRECTORY)/src/D3D/*DEF \
$(DIRECTORY)/src/DOS/DEPEND.DOS \
$(DIRECTORY)/src/DOS/*.c \
$(DIRECTORY)/src/FX/Makefile.am \
$(DIRECTORY)/src/FX/Makefile.in \
$(DIRECTORY)/src/FX/*.[ch] \
$(DIRECTORY)/src/FX/*.def \
$(DIRECTORY)/src/FX/X86/Makefile.am \
$(DIRECTORY)/src/FX/X86/Makefile.in \
$(DIRECTORY)/src/FX/X86/*.[Shc] \
$(DIRECTORY)/src/GGI/Makefile.am \
$(DIRECTORY)/src/GGI/Makefile.in \
$(DIRECTORY)/src/GGI/*.[ch] \
$(DIRECTORY)/src/GGI/ggimesa.conf.in \
$(DIRECTORY)/src/GGI/default/*.c \
$(DIRECTORY)/src/GGI/default/Makefile.am \
$(DIRECTORY)/src/GGI/default/Makefile.in \
$(DIRECTORY)/src/GGI/default/genkgi.conf.in \
$(DIRECTORY)/src/GGI/display/*.c \
$(DIRECTORY)/src/GGI/display/Makefile.am \
$(DIRECTORY)/src/GGI/display/Makefile.in \
$(DIRECTORY)/src/GGI/display/fbdev.conf.in \
$(DIRECTORY)/src/GGI/include/Makefile.am \
$(DIRECTORY)/src/GGI/include/Makefile.in \
$(DIRECTORY)/src/GGI/include/ggi/Makefile.am \
$(DIRECTORY)/src/GGI/include/ggi/Makefile.in \
$(DIRECTORY)/src/GGI/include/ggi/mesa/Makefile.am \
$(DIRECTORY)/src/GGI/include/ggi/mesa/Makefile.in \
$(DIRECTORY)/src/GGI/include/ggi/mesa/*.h \
$(DIRECTORY)/src/KNOWN_BUGS \
$(DIRECTORY)/src/MGL/*.[ch] \
$(DIRECTORY)/src/MGL/*.txt \
$(DIRECTORY)/src/OSmesa/Makefile.am \
$(DIRECTORY)/src/OSmesa/Makefile.in \
$(DIRECTORY)/src/OSmesa/*.[ch] \
$(DIRECTORY)/src/S3/*.[ch] \
$(DIRECTORY)/src/S3/*.def \
$(DIRECTORY)/src/S3/*.mak \
$(DIRECTORY)/src/S3/*.rc \
$(DIRECTORY)/src/SVGA/Makefile.am \
$(DIRECTORY)/src/SVGA/Makefile.in \
$(DIRECTORY)/src/SVGA/*.[ch] \
$(DIRECTORY)/src/Windows/*.[ch] \
$(DIRECTORY)/src/Windows/*.def \
$(DIRECTORY)/src/X/Makefile.am \
$(DIRECTORY)/src/X/Makefile.in \
$(DIRECTORY)/src/X/*.[ch] \
$(DIRECTORY)/src/X86/*.[ch] \
$(DIRECTORY)/src/X86/Makefile.am \
$(DIRECTORY)/src/X86/Makefile.in \
$(DIRECTORY)/src/X86/*.m4 \
$(DIRECTORY)/src/X86/*.S \
$(DIRECTORY)/src/*.dja \
$(DIRECTORY)/src-glu/README[12] \
$(DIRECTORY)/src-glu/Makefile* \
$(DIRECTORY)/src-glu/descrip.mms \
$(DIRECTORY)/src-glu/mms_depend \
$(DIRECTORY)/src-glu/*.def \
$(DIRECTORY)/src-glu/*.dja \
$(DIRECTORY)/src-glu/depend \
$(DIRECTORY)/src-glu/*.[ch] \
$(DIRECTORY)/widgets-mesa \
$(DIRECTORY)/widgets-sgi \
$(DIRECTORY)/util/README \
$(DIRECTORY)/util/Makefile.am \
$(DIRECTORY)/util/Makefile.in \
$(DIRECTORY)/util/*.[ch] \
$(DIRECTORY)/util/sampleMakefile \
$(DIRECTORY)/BeOS/Makefile \
$(DIRECTORY)/BeOS/*.cpp \
$(DIRECTORY)/WIN32/NMAKE.MAK \
$(DIRECTORY)/WIN32/NMAKE.MIF \
$(DIRECTORY)/WIN32/RES/*rc \
$(DIRECTORY)/WIN32/RES/*def \
$(DIRECTORY)/WIN32/RULES/lib.* \
$(DIRECTORY)/WIN32/RULES/progs.* \
$(DIRECTORY)/macos/README \
$(DIRECTORY)/macos/gli_api/*.h \
$(DIRECTORY)/macos/include-mac/*.h \
$(DIRECTORY)/macos/libraries/*.stub \
$(DIRECTORY)/macos/libraries/*Stub \
$(DIRECTORY)/macos/projects/*.mcp \
$(DIRECTORY)/macos/projects/*.exp \
$(DIRECTORY)/macos/projects/*.h \
$(DIRECTORY)/macos/resources/*.c \
$(DIRECTORY)/macos/resources/*.r \
$(DIRECTORY)/macos/resources/*.rsrc \
$(DIRECTORY)/macos/src-agl/*.exp \
$(DIRECTORY)/macos/src-agl/*.[ch] \
$(DIRECTORY)/macos/src-gli/*.[ch] \
$(DIRECTORY)/OpenStep \
$(DIRECTORY)/Makefile* \
$(DIRECTORY)/Make-config \
$(DIRECTORY)/acconfig.h \
$(DIRECTORY)/acinclude.m4 \
$(DIRECTORY)/aclocal.m4 \
$(DIRECTORY)/conf.h.in \
$(DIRECTORY)/config.guess \
$(DIRECTORY)/config.sub \
$(DIRECTORY)/configure \
$(DIRECTORY)/configure.in \
$(DIRECTORY)/install-sh \
$(DIRECTORY)/ltconfig \
$(DIRECTORY)/ltmain.sh \
$(DIRECTORY)/missing \
$(DIRECTORY)/mkinstalldirs \
$(DIRECTORY)/stamp-h.in \
$(DIRECTORY)/INSTALL \
$(DIRECTORY)/INSTALL.GNU \
$(DIRECTORY)/configure \
$(DIRECTORY)/docs/CONFIG \
$(DIRECTORY)/docs/CONFORM \
$(DIRECTORY)/docs/COPYRIGHT \
$(DIRECTORY)/docs/IAFA-PACKAGE \
$(DIRECTORY)/docs/LICENSE \
$(DIRECTORY)/docs/README \
$(DIRECTORY)/docs/README.* \
$(DIRECTORY)/docs/RELNOTES \
$(DIRECTORY)/docs/VERSIONS \
$(DIRECTORY)/bin/mklib* \
$(DIRECTORY)/*.BAT \
$(DIRECTORY)/*.bat \
$(DIRECTORY)/descrip.mms \
$(DIRECTORY)/mms-config \
$(DIRECTORY)/xlib.opt \
$(DIRECTORY)/STARTUP.MK \
$(DIRECTORY)/mesawin32.mak \
$(DIRECTORY)/Names.win \
$(DIRECTORY)/win32-openstep.sh \
$(DIRECTORY)/*.dja \
$(DIRECTORY)/include/GL/dosmesa.h \
$(DIRECTORY)/include/GL/foomesa.h \
$(DIRECTORY)/include/GL/fxmesa.h \
$(DIRECTORY)/include/GL/ggimesa.h \
$(DIRECTORY)/include/GL/gl.h \
$(DIRECTORY)/include/GL/gl_mangle.h \
$(DIRECTORY)/include/GL/glu.h \
$(DIRECTORY)/include/GL/glu_mangle.h \
$(DIRECTORY)/include/GL/glx.h \
$(DIRECTORY)/include/GL/glx_mangle.h \
$(DIRECTORY)/include/GL/mglmesa.h \
$(DIRECTORY)/include/GL/osmesa.h \
$(DIRECTORY)/include/GL/svgamesa.h \
$(DIRECTORY)/include/GL/wmesa.h \
$(DIRECTORY)/include/GL/xmesa.h \
$(DIRECTORY)/include/GL/xmesa_x.h \
$(DIRECTORY)/include/GL/xmesa_xf86.h \
$(DIRECTORY)/include/GLView.h \
$(DIRECTORY)/src/Makefile* \
$(DIRECTORY)/src/descrip.mms \
$(DIRECTORY)/src/mms_depend \
$(DIRECTORY)/src/*.def \
$(DIRECTORY)/src/depend \
$(DIRECTORY)/src/*.[chS] \
$(DIRECTORY)/src/Allegro/*.[ch] \
$(DIRECTORY)/src/BeOS/*.cpp \
$(DIRECTORY)/src/D3D/*.cpp \
$(DIRECTORY)/src/D3D/*.CPP \
$(DIRECTORY)/src/D3D/*.h \
$(DIRECTORY)/src/D3D/*.H \
$(DIRECTORY)/src/D3D/*.c \
$(DIRECTORY)/src/D3D/*.C \
$(DIRECTORY)/src/D3D/MAKEFILE \
$(DIRECTORY)/src/D3D/*bat \
$(DIRECTORY)/src/D3D/*DEF \
$(DIRECTORY)/src/DOS/DEPEND.DOS \
$(DIRECTORY)/src/DOS/*.c \
$(DIRECTORY)/src/FX/*.[ch] \
$(DIRECTORY)/src/FX/*.def \
$(DIRECTORY)/src/GGI/*.[ch] \
$(DIRECTORY)/src/GGI/ggimesa.conf \
$(DIRECTORY)/src/GGI/default/*.c \
$(DIRECTORY)/src/GGI/default/Makefile \
$(DIRECTORY)/src/GGI/display/*.c \
$(DIRECTORY)/src/GGI/display/Makefile \
$(DIRECTORY)/src/KNOWN_BUGS \
$(DIRECTORY)/src/MGL/*.[ch] \
$(DIRECTORY)/src/MGL/*.txt \
$(DIRECTORY)/src/OSmesa/*.[ch] \
$(DIRECTORY)/src/S3/*.[ch] \
$(DIRECTORY)/src/S3/*.def \
$(DIRECTORY)/src/S3/*.mak \
$(DIRECTORY)/src/S3/*.rc \
$(DIRECTORY)/src/SVGA/*.[ch] \
$(DIRECTORY)/src/Windows/*.[ch] \
$(DIRECTORY)/src/Windows/*.def \
$(DIRECTORY)/src/X/*.[ch] \
$(DIRECTORY)/src/X86/*.[ch] \
$(DIRECTORY)/src/X86/Makefile \
$(DIRECTORY)/src/X86/*.m4 \
$(DIRECTORY)/src/X86/*.S \
$(DIRECTORY)/src/*.dja \
$(DIRECTORY)/src-glu/README[12] \
$(DIRECTORY)/src-glu/Makefile* \
$(DIRECTORY)/src-glu/descrip.mms \
$(DIRECTORY)/src-glu/mms_depend \
$(DIRECTORY)/src-glu/*.def \
$(DIRECTORY)/src-glu/*.dja \
$(DIRECTORY)/src-glu/depend \
$(DIRECTORY)/src-glu/*.[ch] \
$(DIRECTORY)/widgets-mesa \
$(DIRECTORY)/widgets-sgi \
$(DIRECTORY)/util/README \
$(DIRECTORY)/util/*.[ch] \
$(DIRECTORY)/util/sampleMakefile \
$(DIRECTORY)/BeOS/Makefile \
$(DIRECTORY)/BeOS/*.cpp
# old stuff
# $(DIRECTORY)/Win32 \
# $(DIRECTORY)/win32
# $(DIRECTORY)/OpenStep \
#
#
DEMO_FILES = \
@@ -538,13 +480,13 @@ DEMO_FILES = \
lib_tar:
cd .. ; \
tar --exclude CVS -c -v -f $(LIB_NAME).tar $(LIB_FILES) ; \
tar -cvf $(LIB_NAME).tar $(LIB_FILES) ; \
gzip $(LIB_NAME).tar ; \
mv $(LIB_NAME).tar.gz $(DIRECTORY)
demo_tar:
cd .. ; \
tar --exclude CVS -c -v -f $(DEMO_NAME).tar $(DEMO_FILES) ; \
tar -cvf $(DEMO_NAME).tar $(DEMO_FILES) ; \
gzip $(DEMO_NAME).tar ; \
mv $(DEMO_NAME).tar.gz $(DIRECTORY)

View File

@@ -1,153 +0,0 @@
#!/bin/ksh
# Make an AIX shared library (tricky!!!)
# Based on a script from Athanasios G. Gaitatzes (gaitat@vnet.ibm.com)
# Improved by Greg Thompson <gregt@visix.com> -gt
#--identification------------------------------------------------------
# $Id: mklib.aix,v 1.2 1999/09/15 15:10:20 brianp Exp $
# $Log: mklib.aix,v $
# Revision 1.2 1999/09/15 15:10:20 brianp
# added third, tiny version number to arguments
#
# Revision 1.1 1999/08/19 13:52:56 brianp
# initial check-in (post-crash)
#
#--common--------------------------------------------------------------
LIBRARY=$1
shift 1
MAJOR=$1
shift 1
MINOR=$1
shift 1
TINY=$1
shift 1
OBJECTS=$*
#--platform------------------------------------------------------------
# BASENAME = LIBRARY without .a suffix
BASENAME=`echo ${LIBRARY} | sed "s/\.a//g"`
# Name of exports file
EXPFILE=${BASENAME}.exp
# Name of temporary shared lib file
OFILE=shr.o
####OFILE=${BASENAME}.o
# Remove any old files from previous make
rm -f ${LIBRARY} ${EXPFILE} ${OFILE}
# Pick a way to use nm -gt
NM=${NM-/bin/nm -eC}
# Determine which version of AIX this is
AIXVERSION=`uname -v`
# Pick a way to tell the linker there's no entrypoint -gt
case ${AIXVERSION}
{
3*)
ENTRY='-e _nostart'
;;
4*)
ENTRY=-bnoentry
;;
*)
echo "Error in mklib.aix!"
exit 1
;;
}
# Other libraries which we may be dependent on. Since we make the libraries
# in the order libGL.a, libaGLU.a, libglut.a just depends on its predecessor.
# modified to make otherlibs in the form of -lfoo -gt
OTHERLIBS=`ls ../lib/*.a | sed "s/..\/lib\/lib/-l/g" | sed "s/\.a//g"`
##echo OTHERLIBS are ${OTHERLIBS}
# Make exports (.exp) file header
echo "#! ${LIBRARY}" > ${EXPFILE}
# Append list of exported symbols to exports file -gt
case ${AIXVERSION}
{
3*)
${NM} ${OBJECTS} | awk -F'|' '{
if ($3 != "extern" || substr($7,1,1) == " ") continue
sub (" *", "", $1); sub (" *", "", $7)
if ( (($7 == ".text") || ($7 == ".data") || ($7 == ".bss")) \
&& ( substr($1,1,1) != ".")) {
if (substr ($1, 1, 7) != "__sinit" &&
substr ($1, 1, 7) != "__sterm") {
if (substr ($1, 1, 5) == "__tf1")
print (substr ($1, 7))
else if (substr ($1, 1, 5) == "__tf9")
print (substr ($1, 15))
else
print $1
}
}
}' | sort -u >> ${EXPFILE}
;;
4*)
${NM} ${OBJECTS} | awk '{
if ((($2 == "T") || ($2 == "D") || ($2 == "B")) \
&& ( substr($1,1,1) != ".")) {
if (substr ($1, 1, 7) != "__sinit" &&
substr ($1, 1, 7) != "__sterm") {
if (substr ($1, 1, 5) == "__tf1")
print (substr ($1, 7))
else if (substr ($1, 1, 5) == "__tf9")
print (substr ($1, 15))
else
print $1
}
}
}' | sort -u >> ${EXPFILE}
;;
}
# This next line is a hack to allow full compatibility with IBM's OpenGL
# libraries. IBM mistakenly exports glLoadIdentity from the libGLU.a
# library. We have to do the same thing. Problem reported by Yemi Adesanya
# (adesanya@afsmail.cern.ch) and Patrick Brown (pbrown@austin.ibm.com)
if [ "${BASENAME}" = libGLU ] ; then
echo "glLoadIdentity" >> ${EXPFILE}
fi
# Make the shared lib file
cc -o ${OFILE} ${OBJECTS} -L../lib ${OTHERLIBS} -lX11 -lXext -lXmu -lXi -lm -lc -bE:${EXPFILE} -bM:SRE ${ENTRY}
# Make the .a file
ar ruv ${LIBRARY} ${OFILE}
# Put exports file in Mesa lib directory
mv ${EXPFILE} ../lib
# Remove OFILE
rm -f ${OFILE}
#NOTES
# AIX 4.x /usr/bin/nm -B patch from ssclift@mach.me.queensu.ca (Simon Clift)
# Robustified symbol extraction for AIX 3 and 4
# Greg Thompson <gregt@visix.com>

View File

@@ -1,38 +0,0 @@
#!/bin/sh
# Make a standard Unix .a library file with 'ar ruv'
#--identification------------------------------------------------------
# $Id: mklib.ar-ruv,v 1.2 1999/09/15 15:10:20 brianp Exp $
# $Log: mklib.ar-ruv,v $
# Revision 1.2 1999/09/15 15:10:20 brianp
# added third, tiny version number to arguments
#
# Revision 1.1 1999/08/19 13:52:57 brianp
# initial check-in (post-crash)
#
#--common--------------------------------------------------------------
LIBRARY=$1
shift 1
MAJOR=$1
shift 1
MINOR=$1
shift 1
TINY=$1
shift 1
OBJECTS=$*
#--platform-------------------------------------------------------------
#ar ruv $LIBRARY $OBJECTS
ar ru $LIBRARY $OBJECTS

View File

@@ -1,52 +0,0 @@
#!/bin/sh
# Make a Solaris shared library
# contributed by Arno Hahma (arno@nitro.pp.utu.fi)
#--identification------------------------------------------------------
# $Id: mklib.solaris,v 1.2 1999/09/15 15:10:20 brianp Exp $
# $Log: mklib.solaris,v $
# Revision 1.2 1999/09/15 15:10:20 brianp
# added third, tiny version number to arguments
#
# Revision 1.1 1999/08/19 13:53:06 brianp
# initial check-in (post-crash)
#
#--common--------------------------------------------------------------
LIBRARY=$1
shift 1
MAJOR=$1
shift 1
MINOR=$1
shift 1
TINY=$1
shift 1
OBJECTS=$*
#--platform-------------------------------------------------------------
set -x
LIBRARY=`basename $LIBRARY .a`
VERSION=$MAJOR.$MINOR
echo "Building shared object $LIBRARY.so.$VERSION and the archive library $LIBRARY.a"
rm -f ${LIBRARY}.a ${LIBRARY}.so.${VERSION}
ar ruv ${LIBRARY}.a ${OBJECTS}
ld -G -o ${LIBRARY}.so.${VERSION} ${OBJECTS}
cp ${LIBRARY}.a ${LIBRARY}.so.${VERSION} ../lib
cd ../lib
ln -s ${LIBRARY}.so.${VERSION} ${LIBRARY}.so

View File

@@ -1,8 +1,13 @@
3Dfx Glide device driver for Mesa 3.2
3Dfx Glide device driver for Mesa 3.1
(see below for FAQ)
This software is distributed under the terms of the GNU Library
General Public License, see the LICENSE file for details.
What do you need ?
------------------
@@ -322,11 +327,6 @@ The Mesa/Voodoo Environment Variables:
export MESA_FX_INFO=1
you will get some useful statistic.
- If you define the env. var. MESA_FX_NO_SIGNALS:
export MESA_FX_NO_SIGNALS=1
Mesa/FX will not install atexit() or signal() handlers.
Know BUGS and Problems:
-----------------------
@@ -541,7 +541,9 @@ No because the Linux Glide doesn't (yet) support the Voodoo Rush.
a binary copy of the Mesa in order to make the software
working out of the box ?
Yes.
Yes, you have simply to include some informations about authors
and where the library sources are available (check the LICENSE
file for more informations about the GNU GPL).
11. Which is the best make target for compiling the Mesa for

View File

@@ -28,7 +28,7 @@ working. No optimizations have been made at this time.
Compiling
In the Mesa-3.x directory type "make -f Makefile.X11 beos-r4".
Simply cd to the Mesa-3.x directory and type "make beos-r4".
When it finishes the libMesaGL.so and libMesaGLU.so libraries for
BeOS will be in the Mesa-3.x/lib/ directory.
@@ -99,4 +99,4 @@ of February, 1999.
----------------------------------------------------------------------
$Id: README.BEOS,v 1.5.6.1 1999/11/27 01:39:50 brianp Exp $
$Id: README.BEOS,v 1.5 1999/03/03 02:34:04 brianp Exp $

View File

@@ -1,26 +1,172 @@
GGIMesa for LibGGI 2.x
LibGGI driver for Mesa-3.0
by Uwe Maurer (uwe_maurer@t-online.de)
Requirements:
-------------
LibGGI 2.0 or greater
Installation:
-------------
To install GGIMesa, follow the instructions in INSTALL.GNU. If you
wish to install GGIGLUT as well, first install GGIMesa and then run
Introduction
============
[from libggi.txt by Steve Cheng and Hartmut Niemann]
make
make install (must be root)
"LibGGI, the dynamic GGI (General Graphics Interface) library is a
flexible drawing library.
in ggi/ggiglut.
It provides an opaque interface to the display's acceleration
functions. It was originally intended to allow user programs to
interface with KGI, the kernel side of the GGI code, but other display
types can be easily used by loading the appropriate "display target"
(e.g. X, memory).
Notes:
------
LibGGI consists of a main library (libggi.so) and a multitude of
dynamic drivers. The library then loads the necessary "drivers" for
the requested mode, taking hints from the graphics device if
necessary. LibGGI can also load extension libraries, e.g. to provide
enhanced 2D and 3D functions.
* Set the environment variables GGIMESA_DEBUG and/or GGIGLUT_DEBUG
to 255 to see lots of debugging output.
It has been designed after having a look at several existing
libraries, and so far we have found porting to be quite simple from
and to most of them."
* GGIGLUT contains support for all of the GLUT 3.6 API except for the
high-level primitive drawing functions, but many of the functions (in
particular the menu drawing functions) are just stubs.
----------------------------------------------------------------------------
More information about the GGI project and LibGGI can be
obtained from the GGI website:
www.ggi-project.org
----------------------------------------------------------------------------
Installation
============
- Install LibGGI
- Unpack the Mesa archives
- In the Mesa directory type:
make linux-ggi
su
make linux-ggi-install
exit
- Now you can try some demos.
If they don't work, you can set the GGIMESA_DEBUG
variable to 255 and you will see some information from the
LibGGI-driver.
export GGIMESA_DEBUG=255
GLUT
====
You can change these default values in ggi/ggiglut.c:
#define WIDTH 640
#define HEIGHT 400
#define GRAPHTYPE_RGB GT_16BIT
#define GRAPHTYPE_INDEX GT_8BIT
Options:
-bpp x Set graphic mode with x bits per pixel
-size x y Screen (or window) is x*y pixels
Example:
demos/gears -size 320 200 -bpp 24
Updates
=======
You can find the latest LibGGI-driver and ggiglut on my
homepage:
http://home.t-online.de/home/uwe_maurer/ggimesa.htm
Uwe Maurer - uwe_maurer@t-online.de
LibGGI driver for Mesa-3.0
by Uwe Maurer (uwe_maurer@t-online.de)
Introduction
============
[from libggi.txt by Steve Cheng and Hartmut Niemann]
"LibGGI, the dynamic GGI (General Graphics Interface) library is a
flexible drawing library.
It provides an opaque interface to the display's acceleration
functions. It was originally intended to allow user programs to
interface with KGI, the kernel side of the GGI code, but other display
types can be easily used by loading the appropriate "display target"
(e.g. X, memory).
LibGGI consists of a main library (libggi.so) and a multitude of
dynamic drivers. The library then loads the necessary "drivers" for
the requested mode, taking hints from the graphics device if
necessary. LibGGI can also load extension libraries, e.g. to provide
enhanced 2D and 3D functions.
It has been designed after having a look at several existing
libraries, and so far we have found porting to be quite simple from
and to most of them."
----------------------------------------------------------------------------
More information about the GGI project and LibGGI can be
obtained from the GGI website:
www.ggi-project.org
----------------------------------------------------------------------------
Installation
============
- Install LibGGI
- Unpack the Mesa archives
- In the Mesa directory type:
make linux-ggi
su
make linux-ggi-install
exit
- Now you can try some demos.
If they don't work, you can set the GGIMESA_DEBUG
variable to 255 and you will see some information from the
LibGGI-driver.
export GGIMESA_DEBUG=255
GLUT
====
You can change these default values in ggi/ggiglut.c:
#define WIDTH 640
#define HEIGHT 400
#define GRAPHTYPE_RGB GT_16BIT
#define GRAPHTYPE_INDEX GT_8BIT
Options:
-bpp x Set graphic mode with x bits per pixel
-size x y Screen (or window) is x*y pixels
Example:
demos/gears -size 320 200 -bpp 24
Updates
=======
You can find the latest LibGGI-driver and ggiglut on my
homepage:
http://home.t-online.de/home/uwe_maurer/ggimesa.htm
Uwe Maurer - uwe_maurer@t-online.de

View File

@@ -1,50 +1,120 @@
August 30, 1998 -- Paul Garceau
Updated January 13, 2000 -- Paul Garceau (pgarceau@teleport.com)
August 30, 1998 -- Paul Garceau (pgarceau@teleport.com)
DISCLAIMER: I make this port of the Mesa 3-D Graphics Library as a service
DISCLAIMER: I make this extension to the Mesa 3-D Graphics Library as a service
to the general public. I can, in no way support or make any guarantee that the
build will work for your system.
The associated packages and batch files I have included as part of the GCC-2.95.2/Mingw32 extension are provided "As-is" with out any guarantee of support or functionality from this author.
EGCS-Mingw32 build or any Gnu-Win32 build will work for your system. The
associated packages and batch files I have included as part of the EGCS-Mingw32
extension are provided "As-is" with out any guarantee of support or functionality
from the author of this EGCS-Mingw32 native windows port of the Mesa 3-D Graphics
Library.
Feel free to modify or change things as you see fit, just remember that
I can't support any modifications you might want to make to the files which I
have included OR the lgpl protected Mesa 3-D Graphics Library.
I recommend using GCC-2.95.2/Mingw32 which is available at Mumit Khans' ftp site:
(ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32/)
EGCS-Mingw32 Beta 3.08 Archive Manifest:
mingw32.bat
src/makefile.nt4
src/wmesa.c
src-glu/makefile.nt4
This build has been tested under WinNT4/SP6. Win9x and WinNT5 remain untested by me. I have not tested any of the demos included with Mesa3d.
###############
I recommend using the GCC-2.95.2/Mingw32.
Greetings,
ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32/gcc-2.95.2
In order to build the Mingw32 set of Mesa 3-D Graphics Library for Beta3.08
it will be necessary for you to use the Dos or Command Prompt that is available
on most of the i86 based MS Windows machines. Also, I believe that this build
will run on Win95, Win98, WinNT4 and WinNT5.
I haven't tested Win95/98 or WinNT5. This build was generated under
WinNT4 with SP3 installed.
This has not been tested under any systems outside of
a WinNT4 Workstation with EGCS-Mingw32 toolchain, v.1.0.2 installed.
EGCS-Mingw32 uses a variation of gcc to handle its build. The Mesa 3-D
Graphics Library build that I have generated is based, in small part, on the
Cygwin32 build and associated makefiles that Stephane Rehel (rehel@worldnet.fr)
defined back in 1997. The EGCS-Mingw32 toolchain is capable of generating
native windows code and, as of the date of this readme, can be obtained from:
http://www.xraylith.wisc.edu/~khan/software/gnu-win32/egcs-mingw32-102.html
Much thanks to the combined efforts of Mumit Khan, Jan-Jaap Vanderhagen
and Colin Peters for making it possible for the Mingw32 toolchain to exist. Also, thanks go out to Stephane Rehel for the work that was completed on the Cygwin build.
and Colin Peters for making it possible for the EGCS-Mingw32 toolchain to exist.
Installing GCC-2.95.2/Mingw32 Build:
Installing EGCS-Mingw32 Build Revisions:
a) Open the file archive (either tar.gz or .zip extensions)
To install the makefile and source revisions incorporated with this build
of the Mesa 3-D Graphics Library, you'll have to use a version of winzip. I am
in the process of finding a suitable Win32 compatible tar executable so that if
you don't have winzip, you can still decompress the files into their respective
folders/directories.
b) Decide the directory you want to move the archived files to.
a) Move the mingw32.zip file to the top level of the hard drive on your
system.
d) Extract the files from the archive.
e) Edit the mingw32.bat file to accomodate your choice of directory structure.
b) Copy all of the Beta 3.08 src/windows files to the src/ directory.
%mesaroot%: This is your root directory (Mesa-3.2)
%mesasrc%: This is the Mesa-3.2 src directory (Mesa-3.2\src)
%mesalib%: This is where the build will put libGL.a and libGLU.a
b) Open the Winzip file
c) Verify that the files will be properly extracted.
d) Extract the files with the Winzip "Overwrite" and "Use Folder Names"
options enabled.
The zip file directory structure extraction defaults to the top level of
the hard drive where the mingw32.zip file exists unless otherwise instructed by
you.
The version of wmesa.c included with the mingw32 archive needs to replace
the current version of the Beta 3.08 wmesa.c file in order for the egcs-mingw32
build to work. This is because the original Win32 stuff assumes that the glut
utilities are to be installed. The Glut utilities are not part of the
egcs-mingw32 build for Beta 3.08.
Build Considerations:
In order to get the build to work, I needed to create a special makefile
for each library which the Mesa 3-D Graphics Library requires since there is no
comparable make-config/config on a native windows platform.
Since I was only creating a few of the possible libraries for
Mesa (gl, glu), I only created the new make files in their respective libraries
src, src-glu). For libMesaaux.a. you will find a makefile for it in the
src-aux directory. libMesatk.a and libglut.a were not ported.
The build itself is a .bat based build and uses Gnu Make,Version 3.76.1 to
process the makefiles noted above. The build must be run from the directory
where the mingw32.bat file is. You can get the binary version of Make 3.76.1
from Jan-Jaap van der Heijden's site in Germany:
http://agnes.dida.physik.uni-essen.de/~janjaap/mingw32/download.html
It was necessary to modify some source code, specifically the source code
in the src-glu directory. I needed to modify nurbs.c, quadric.c and tess.c in
order to get them to work using the EGCS-Mingw32 toolchain.
The original EGCS-Mingw32 Toolchain, is available from:
http://www.xraylith.wisc.edu/~khan/software/gnu-win32/egcs-mingw32-102.html
Running the Build:
Open your Command Prompt or MS-DOS prompt.
Go to your Mesa-3.2 'root' directory
At the command line type: mingw32
Ok, now that we've got the basics out of the way, follows is all you need
to do in order to build the EGCS-Mingw32 version of libMesaGL.a and libMesaGLU.a:
That's all there is to it.
Open your Command Prompt/Dos prompt.
Go to your Mesa-3.0 beta 'root' directory.
This is the same directory that the Mesa mingw32.zip file was
originally stored in if you've installed the Mesa-3.0 beta 3-D
Graphics Library source as outlined in the "readme" file included
with the Mesa-3.0 beta distribution.
At the command line type: mingw32
mingw32 is the .bat file that actually does the build.
Enjoy!

View File

@@ -1,7 +1,9 @@
Mesa 3.0 MITS Information
[The MITS code hasn't been update for Mesa 3.1 and may no longer work]
This software is distributed under the terms of the GNU Library
General Public License, see the LICENSE file for details.
This document is a preliminary introduction to help you get

View File

@@ -1,32 +1,15 @@
Mesa/Readme.win32
Last Updated: Sunday, September 19th, 1999 - tjump@tertius.com
Last Updated: Friday, July 9th, 1999 - tjump@tertius.com
*** What's New
- Updated for Mesa 3.1beta3/CVS. Debug and Release command-line builds of
Mesa, fxMesa, GLU, GLUT and all sample programs DLL-based. Manual
executions tests with minimum requisite results (aka: things looked like
I expected them to).
What did you expect, complete regression testing maybe?
- NASM build support. Any file in the project coded as a .S file will
automatically be recognized and built as a NASM-source assember file.
To enable building using NASM, set the environment variable NASM to
indicate that command to execute to run nasm on a file. If NASM is in
your command search path then all this needs be set to is 'nasmw' -
otherwise you will need to include the complete drive and directory path.
NASM may be retrieved here: http://www.web-sites.co.uk/nasm/
- Updated for Mesa 3.1beta2/CVS.
- DevStudio projects suspended for compatability reasons: projects modified
by DevStudio 6 are not compatible with DevStudio 5.
These will slowly be rebuilt and put into CVS as I can.
- Build environment change: The Glide SDK is no longer assumed to be in
the global INCLUDE/LIB environment vars, it is required that you set the
value 'GLIDE2X' as either an environment variable pointing to your Glide

View File

@@ -1,54 +1,33 @@
Mesa 3.1 Unix/X11 Information
Mesa 3.0 Unix/X11 Information
Installation
============
There are two ways to compile Mesa on Unix/X11 systems:
1. The old way:
First type 'make' alone to see the list of system
configurations currently supported. If you see your configuration on the
list, type 'make <config>'. Most popular Unix/X workstations are currently
supported.
If your system configuration is not listed by 'make', you'll have to modify
the top-level Makefile and Make-config files. There are instructions in
each file.
2. The new way:
Type './configure' and then 'make'. This uses GNU autoconfig.
See docs/INSTALL for more details.
To compile the library, first type 'make' alone to see the list of system
configurations currently supported. If you see your configuration on the
list, type 'make <config>'. Most popular Unix/X workstations are currently
supported.
The top-level makefile will execute the makefiles in a number of sub-
directories. When finished, the Mesa libraries will be in the Mesa-3.1/lib/
directories. When finished, the Mesa libraries will be in the Mesa-2.6/lib/
directory. A few GLUT demos in the demos/ directory should be ready to run.
If you also downloaded and unpacked the demos there should be executables
in the "xdemos/", "samples/", and "book/" directories for you to try out.
If you only want to compile the contents of one subdirectory you can 'cd'
to that directory and type 'make <config>' there.
If your system configuration is not listed by 'make', you'll have to modify
the top-level Makefile and Make-config files. There are instructions in
each file.
If you have compilation problems you should try to fix them and return the
patches to the author.
Notes on assembly language optimizations:
When using the old-style Makefiles, you can specify a configuration
that uses X86 assembly language optimizations (linux-3dnow for example).
The detection of MMX, 3DNow!, PIII/SSE, etc capability is done at
runtime. That means you can compile Mesa for 3DNow! optimizations
even if you don't have an AMD CPU.
However, your Linux binutils and assembler must understand the
special instructions in order to compile them. If you have
compilation problems, try upgrading your binutils.
Header and library files:
After you've compiled Mesa and tried the demos I recommend the following
procedure for "installing" Mesa.
@@ -61,6 +40,16 @@ Header and library files:
(actually, use "cp -d" on Linux to preserve symbolic links)
Create a few symbolic links so that compiling OpenGL applications is easy:
cd /usr/local/lib
IF USING STATIC (lib*.a) FILES THEN
ln -s libMesaGL.a libGL.a
ln -s libMesaGLU.a libGLU.a
ELSE
ln -s libMesaGL.so libGL.so
ln -s libMesaGLU.so libGLU.so
ENDIF
Xt/Motif widgets:
If you want to use Mesa or OpenGL in your Xt/Motif program you can build
@@ -119,6 +108,8 @@ Remote display of OpenGL/GLX programs:
in /usr/local/Mesa and using the C-shell:
% cd /usr/local/Mesa
% make irix5-dso
% cd lib
% ln -s libMesaGL.so libGL.so
% setenv _RLD_LIST "/usr/local/Mesa/lib/libGL.so:DEFAULT"
% /usr/demos/bin/ideas_ogl // this is a test
@@ -322,4 +313,4 @@ Summary of X-related environment variables:
----------------------------------------------------------------------
$Id: README.X11,v 3.3.2.3 2000/01/25 17:18:46 brianp Exp $
$Id: README.X11,v 3.2 1998/10/03 12:48:50 brianp Exp $

View File

@@ -1,146 +0,0 @@
Mesa 3.1 release notes
PLEASE READ!!!!
New copyright
-------------
Mesa 3.1 will be distributed under an XFree86-style copyright instead
of the GNU LGPL.
New directories
---------------
All documentation files are now in the docs/ directory.
All shell scripts are now in the bin/ directory.
New library names
-----------------
Formerly, the main Mesa library was named libMesaGL.so (or libMesaGL.a)
and the GLU library was named libMesaGLU.so (or libMesaGLU.a).
Now, the main library is named libGL.so (or libGL.a) and the GLU library
is named libGLU.so (or libGLU.a).
The change allows Mesa to be more easily substituted for OpenGL.
Specifically, the linker/loader on some Unix-like systems won't
allow libMesaGL.so to be used instead of libGL.so if the application
was linked with the former.
Warning: if you have another OpenGL implementation installed on your
system (i.e. you have another OpenGL libGL.so) you'll have to be
carefull about which library (OpenGL or Mesa) you link against. Be
aware of -L linker flags and the value of the LD_LIBRARY_PATH environment
variable.
New library versioning
----------------------
Previously, the Mesa GL library was named libMesaGL.so.3.0
To better support Linux/OpenGL standards, the Mesa GL library is now
named libGL.so.1.2.030100 This indicates version 1.2 of the OpenGL spec
and Mesa implementation 3.1.0
In the long term this will allow better interoperability with other
OpenGL implementations, especially on Linux. In the short term,
OpenGL apps may have to be relinked to use the new library naming.
New makefiles
-------------
The old Makefiles found in the various directories have been renamed
to Makefile.X11 in order to prevent filename collisions with autoconfig-
generated Makefiles.
The top-level Makefile simply includes Makefile.X11
If your top-level Makefile get's overwritten/destroyed you can restore
it by copying Makefile.X11 to Makefile
New extensions
--------------
GL_EXT_stencil_wrap
Implements two new stencil operations: GL_INCR_WRAP_EXT and
GL_DECR_WRAP_EXT which allow stencil increment and decrement
without clamping.
GL_INGR_blend_func_separate
Allows specification of blend factors for RGB and Alpha independently.
(INGR = Intergraph)
GL_ARB_multitexture
Multiple simultaneous textures. (ARB = Architecture Review Board)
GL_NV_texgen_reflection
nVidia texgen extension for better reflection mapping.
GL_PGI_misc_hints
Assorted transformation hints.
GL_EXT_compiled_vertex_array
Compiled vertex arrays.
GL_EXT_clip_volume_hint
Allows one to disable clip volume (frustum) testing.
Extensions removed
------------------
GL_EXT_multitexture - obsolete in favor of GL_ARB_multitexture
Config file
-----------
By default, /etc/mesa.conf will be read when Mesa starts. This
file controls default hints, enable/disable of extensions, and
more. See the CONFIG file for documentation.
Optimizations
-------------
Keith Whitwell has contributed significant optimizations to Mesa's
vertex transformation code. Basically, the whole transformation
stage of Mesa has been rewritten.
It's impossible to give a speedup factor. You'll just have to
try your app and see how it performs.
Device Driver changes
---------------------
A bunch of new device driver functions have been added. See src/dd.h
Keith Harrison contributed many of them. I've been planning on adding
a bunch of functions like these to make writing hardware drivers easier.
More such function will probably be added in the near future.
Miscellaneous
-------------
util/glstate.c has some handy functions for debugging. Basically, it
offers a simple function for printing GL state variables. It's not
finished yet. There's a LOT more GLenum records to be added (see the
code). Anyone want to help?
----------------------------------------------------------------------
$Id: RELNOTES-3.1,v 1.1.2.1 2000/02/22 17:56:56 brianp Exp $

View File

@@ -1,4 +1,4 @@
$Id: VERSIONS,v 1.13.2.24 2000/03/23 00:12:41 brianp Exp $
$Id: VERSIONS,v 1.10 1999/07/30 18:58:30 brianp Exp $
Mesa Version History
@@ -644,67 +644,12 @@ Mesa Version History
- new copyright on core Mesa code
3.1 beta 3 September 17, 1999
3.1 beta 3 August ??, 1999
New:
- optimized glAccum function
- optimized 24bpp rendering in XMesa driver
- GLU 1.2 polygon tessellator
Bug Fixes:
- glGetTexLevelParameter wasn't fully implemented
- glXUseXFont now handles multi-byte fonts
- glIsEnabled(GL_TEXTURE_2D / 3D) returned wrong result
- alpha channel of blending points, lines was sometimes incorrect
Changes:
- New library names: "libGL" instead of "libMesaGL"
- New library numbering: libGL.so.1.2.310
- New library names: libGL.so and libGLU.so
- New subdirectories: docs/ and bin/
- New Makefile-system (autoconf,automake,libtool)
3.1 final December 14, 1999
New:
- added demos/gloss.c
- added xdemos/glxdpyinfo.c
- added GLX_ARB_get_proc_address extension
Bug fixes:
- several vertex array bug fixes
- overlapping glCopyPixels with pixel zooming now works
- glXUseXFont() bitmaps were vertically shifted by one pixel
3.2 beta 1 March 23, 2000
Bug fixes:
- mixed drawing of lines and bitmaps sometimes had wrong colors
- added missing glHintPGI() function
- fixed a polygon culling bug
- fixed bugs in gluPartialDisk()
- Z values in selection mode were wrong
- added missing tokens:
GL_SMOOTH_POINT_SIZE_RANGE
GL_SMOOTH_POINT_SIZE_GRANULARITY
GL_SMOOTH_LINE_WIDTH_RANGE
GL_SMOOTH_LINE_WIDTH_GRANULARITY
GL_ALIASED_POINT_SIZE_RANGE
GL_ALIASED_LINE_WIDTH_RANGE
- fixed glCopyPixels when copying from back to front buffer
- GL_EXT_compiled_vertex_array tokens had _SGI suffix instead of _EXT
- glDrawRangeElements(GL_LINES, 0, 1, 2, type, indices) was broken
- glDeleteTextures() didn't decrement reference count correctly
- GL_SRCA_ALPHA_SATURATE blend mode didn't work correctly
- Actual depth of transformation matrix stacks was off by one
- 24bpp visuals didn't address pixels correctly
- mipmap level of detail (lambda) calculation simplified, more accurate
- 101691 - Polygon clipping and GL_LINE
- 101928 - Polygon clipping and GL_LINE (same fix as above)
- 101808 - Non-glVertexArrays tristrip bug
- 101971 - find_last_3f on Dec OSF (worked around)
- 102369 - segv on dec osf (possibly a duplicate of the above)
- 102893 - orientations of modelview cause segfault
New:
- updated SVGA Linux driver
- added the MESA_FX_NO_SIGNALS env var, see docs/README.3DFX
- build libGLw.a (Xt/OpenGL drawing area widget) library by default
- changed -O2 to -O3 for a number of gcc configs
Changes:
- glXCopyContext's mask parameter is now unsigned long, per GLX spec

View File

@@ -22,13 +22,9 @@ if HAVE_X11
INC_X11 = glx.h glx_mangle.h xmesa.h xmesa_x.h xmesa_xf86.h
endif
if NEED_GLUT
INC_GLUT = glut.h
endif
EXTRA_DIST = fxmesa.h ggimesa.h osmesa.h svgamesa.h \
glx.h glx_mangle.h xmesa.h xmesa_x.h xmesa_xf86.h
GLinclude_HEADERS = gl.h gl_mangle.h glu.h glu_mangle.h \
$(INC_FX) $(INC_GGI) $(INC_OSMESA) $(INC_SVGA) $(INC_X11) $(INC_GLUT)
$(INC_FX) $(INC_GGI) $(INC_OSMESA) $(INC_SVGA) $(INC_X11)

View File

@@ -1,10 +1,10 @@
/* $Id: amesa.h,v 1.1.1.1.2.1 2000/02/09 18:53:54 brianp Exp $ */
/* $Id: amesa.h,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.2
* Version: 3.1
*
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
* Copyright (C) 1999 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -25,17 +25,25 @@
*/
/*
* $Log: amesa.h,v $
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 1.1 1999/03/16 01:24:13 brianp
* initial check-in
*
*/
/* Allegro (DJGPP) driver by Bernhard Tschirren (bernie-t@geocities.com) */
#ifndef AMESA_H
#define AMESA_H
#define AMESA_MAJOR_VERSION 3
#define AMESA_MINOR_VERSION 2
typedef struct amesa_visual *AMesaVisual;
typedef struct amesa_buffer *AMesaBuffer;
typedef struct amesa_context *AMesaContext;

View File

@@ -1,4 +1,4 @@
/* $Id: foomesa.h,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
/* $Id: foomesa.h,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* Mesa 3-D graphics library
@@ -23,8 +23,8 @@
/*
* $Log: foomesa.h,v $
* Revision 1.1 1999/08/19 00:55:40 jtg
* Initial revision
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 1.1 1998/06/02 01:34:18 brianp
* Initial revision

View File

@@ -1,27 +1,40 @@
/* $Id: fxmesa.h,v 1.1.1.1.2.2 2000/02/09 18:53:55 brianp Exp $ */
/* $Id: fxmesa.h,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.2
* Version: 3.1
* Copyright (C) 1995-1999 Brian Paul
*
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* $Log: fxmesa.h,v $
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 3.2 1999/01/03 02:46:31 brianp
* now using GLAPI and GLAPIENTRY keywords (Ted Jump)
*
* Revision 3.1 1998/04/01 03:00:28 brianp
* updated for v0.24 of 3Dfx/Glide driver
*
* Revision 3.0 1998/02/20 05:04:45 brianp
* initial rev
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -45,7 +58,7 @@ extern "C" {
#define FXMESA_MAJOR_VERSION 3
#define FXMESA_MINOR_VERSION 2
#define FXMESA_MINOR_VERSION 0
/*

View File

@@ -1,8 +1,8 @@
/* $Id: ggimesa.h,v 1.2.2.1 2000/02/09 18:53:55 brianp Exp $ */
/* $Id: ggimesa.h,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.2
* Version: 3.1
* Copyright (C) 1995-1998 Brian Paul
* Copyright (C) 1998 Uwe Maurer
*
@@ -22,14 +22,20 @@
*/
/*
* $Log: ggimesa.h,v $
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 1.2 1998/09/29 01:46:40 brianp
* applied Emmanuel Marty's patches for latest GGI
*
*/
#ifndef GGIMESA_H
#define GGIMESA_H
#define GGIMESA_MAJOR_VERSION 3
#define GGIMESA_MINOR_VERSION 2
#ifdef __cplusplus
extern "C" {
#endif
@@ -43,16 +49,16 @@ typedef struct ggi_mesa_context *GGIMesaContext;
extern GGIMesaContext GGIMesaCreateContext(void);
extern void GGIMesaDestroyContext(GGIMesaContext ctx);
extern void GGIMesaDestroyContext( GGIMesaContext ctx );
extern void GGIMesaMakeCurrent(GGIMesaContext ctx);
extern void GGIMesaMakeCurrent(GGIMesaContext ctx );
extern GGIMesaContext GGIMesaGetCurrentContext(void);
extern GGIMesaContext GGIMesaGetCurrentContext( void );
extern void GGIMesaSwapBuffers(void);
extern void GGIMesaSwapBuffers( void );
extern int GGIMesaSetVisual(GGIMesaContext ctx, ggi_visual_t vis,
GLboolean rgb_flag, GLboolean db_flag);
extern int GGIMesaSetVisual(GGIMesaContext ctx,ggi_visual_t vis,
GLboolean rgb_flag,GLboolean db_flag);
#ifdef __cplusplus
}

View File

@@ -1,10 +1,10 @@
/* $Id: gl.h,v 1.17.2.6 2000/03/20 17:54:44 brianp Exp $ */
/* $Id: gl.h,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.2
* Version: 3.1
*
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
* Copyright (C) 1999 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -25,6 +25,8 @@
*/
#ifndef GL_H
#define GL_H
@@ -48,53 +50,39 @@
#endif
#if !defined(OPENSTEP) && (defined(__WIN32__) || defined(__CYGWIN32__))
# pragma warning( disable : 4068 ) /* unknown pragma */
# pragma warning( disable : 4710 ) /* function 'foo' not inlined */
# pragma warning( disable : 4711 ) /* function 'foo' selected for automatic inline expansion */
# pragma warning( disable : 4127 ) /* conditional expression is constant */
# if defined(MESA_MINWARN)
# pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */
# pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */
# pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */
# pragma warning( disable : 4550 ) /* 'function' undefined; assuming extern returning int */
# pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */
# endif
# pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */
# pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */
# pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */
# pragma warning( disable : 4550 ) /* 'function' undefined; assuming extern returning int */
# pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */
# if defined(_MSC_VER) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
# define GLAPI __declspec(dllexport)
# define WGLAPI __declspec(dllexport)
# elif defined(_MSC_VER) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
# define GLAPI __declspec(dllimport)
# define WGLAPI __declspec(dllimport)
# else /* for use with static link lib build of Win32 edition only */
# define GLAPI extern
# define WGLAPI __declspec(dllimport)
# endif /* _STATIC_MESA support */
# define GLAPIENTRY __stdcall
# define GLAPIENTRYP __stdcall *
# define GLCALLBACK __stdcall
# define GLCALLBACKP __stdcall *
#if defined(__CYGWIN32__)
# define GLCALLBACKPCAST *
#else
# define GLCALLBACKPCAST __stdcall *
#endif
# define GLWINAPI __stdcall
# define GLWINAPIV __cdecl
#else
/* non-Windows compilation */
# define GLAPI extern
# define GLAPIENTRY
# define GLAPIENTRYP *
# define GLCALLBACK
# define GLCALLBACKP *
# define GLCALLBACKPCAST *
# define GLWINAPI
# define GLWINAPIV
#endif /* WIN32 / CYGWIN32 bracket */
/* compatability guard so we don't need to change client code */
#if defined(_WIN32) && !defined(_WINDEF_) && !defined(_GNU_H_WINDOWS32_BASE) && !defined(OPENSTEP)
#if defined(_WIN32) && !defined(_WINDEF_) && !defined(OPENSTEP)
# if !defined(MESA_MINWARN)
# pragma message( "note: WINDOWS.H not included, providing Mesa definition of CALLBACK macro" )
# pragma message( "----: and PROC typedef. If you receive compiler warnings about either ")
# pragma message( "----: being multiply defined you should include WINDOWS.H priot to gl/gl.h" )
# endif
# define CALLBACK GLCALLBACK
typedef int (GLAPIENTRY *PROC)();
typedef void *HGLRC;
@@ -102,10 +90,14 @@ typedef void *HDC;
typedef unsigned long COLORREF;
#endif
#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP)
#if defined(_WIN32) && !defined(_WINGDI_) && !defined(OPENSTEP)
# if !defined(MESA_MINWARN)
# pragma message( "note: WINDOWS.H not included, providing Mesa definition of wgl functions" )
# pragma message( "----: and macros. If you receive compiler warnings about any being multiply ")
# pragma message( "----: defined you should include WINDOWS.H priot to gl/gl.h" )
# endif
# define WGL_FONT_LINES 0
# define WGL_FONT_POLYGONS 1
#ifndef _GNU_H_WINDOWS32_FUNCTIONS
# ifdef UNICODE
# define wglUseFontBitmaps wglUseFontBitmapsW
# define wglUseFontOutlines wglUseFontOutlinesW
@@ -113,13 +105,30 @@ typedef unsigned long COLORREF;
# define wglUseFontBitmaps wglUseFontBitmapsA
# define wglUseFontOutlines wglUseFontOutlinesA
# endif /* !UNICODE */
#endif /* _GNU_H_WINDOWS32_FUNCTIONS */
typedef struct tagLAYERPLANEDESCRIPTOR LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR;
typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT;
typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, *LPPIXELFORMATDESCRIPTOR;
#include <gl/mesa_wgl.h>
GLAPI int GLAPIENTRY wglCopyContext(HGLRC, HGLRC, unsigned int);
GLAPI HGLRC GLAPIENTRY wglCreateContext(HDC);
GLAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC, int);
GLAPI int GLAPIENTRY wglDeleteContext(HGLRC);
GLAPI HGLRC GLAPIENTRY wglGetCurrentContext(void);
GLAPI HDC GLAPIENTRY wglGetCurrentDC(void);
GLAPI PROC GLAPIENTRY wglGetProcAddress(char*);
GLAPI int GLAPIENTRY wglMakeCurrent(HDC, HGLRC);
GLAPI int GLAPIENTRY wglShareLists(HGLRC, HGLRC);
GLAPI int GLAPIENTRY wglUseFontBitmapsA(HDC, unsigned long, unsigned long, unsigned long);
GLAPI int GLAPIENTRY wglUseFontBitmapsW(HDC, unsigned long, unsigned long, unsigned long);
GLAPI int GLAPIENTRY wglUseFontOutlinesA(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
GLAPI int GLAPIENTRY wglUseFontOutlinesW(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
GLAPI int GLAPIENTRY wglDescribeLayerPlane(HDC, int, int, unsigned int,LPLAYERPLANEDESCRIPTOR);
GLAPI int GLAPIENTRY wglSetLayerPaletteEntries(HDC, int, int, int,const COLORREF *);
GLAPI int GLAPIENTRY wglGetLayerPaletteEntries(HDC, int, int, int,COLORREF *);
GLAPI int GLAPIENTRY wglRealizeLayerPalette(HDC, int, int);
GLAPI int GLAPIENTRY wglSwapLayerBuffers(HDC, unsigned int);
GLAPI int GLAPIENTRY SwapBuffers(HDC);
#endif
#ifdef __cplusplus
extern "C" {
#endif
@@ -140,7 +149,7 @@ extern "C" {
#define MESA
#define MESA_MAJOR_VERSION 3
#define MESA_MINOR_VERSION 2
#define MESA_MINOR_VERSION 1
#define GL_VERSION_1_1 1
@@ -865,8 +874,8 @@ typedef enum {
/* OpenGL 1.2 */
GL_RESCALE_NORMAL = 0x803A,
GL_CLAMP_TO_EDGE = 0x812F,
GL_MAX_ELEMENTS_VERTICES = 0x80E8,
GL_MAX_ELEMENTS_INDICES = 0x80E9,
GL_MAX_ELEMENTS_VERTICES = 0xF0E8,
GL_MAX_ELEMENTS_INDICES = 0xF0E9,
GL_BGR = 0x80E0,
GL_BGRA = 0x80E1,
GL_UNSIGNED_BYTE_3_3_2 = 0x8032,
@@ -888,12 +897,6 @@ typedef enum {
GL_TEXTURE_MAX_LOD = 0x813B,
GL_TEXTURE_BASE_LEVEL = 0x813C,
GL_TEXTURE_MAX_LEVEL = 0x813D,
GL_SMOOTH_POINT_SIZE_RANGE = 0x0B12,
GL_SMOOTH_POINT_SIZE_GRANULARITY = 0x0B13,
GL_SMOOTH_LINE_WIDTH_RANGE = 0x0B22,
GL_SMOOTH_LINE_WIDTH_GRANULARITY = 0x0B23,
GL_ALIASED_POINT_SIZE_RANGE = 0x846D,
GL_ALIASED_LINE_WIDTH_RANGE = 0x846E,
/* GL_ARB_multitexture */
GL_TEXTURE0_ARB = 0x84C0,
@@ -952,6 +955,7 @@ typedef enum {
GL_COLOR_TABLE_ALPHA_SIZE = 0x80DD,
GL_COLOR_TABLE_LUMINANCE_SIZE = 0x80DE,
GL_COLOR_TABLE_INTENSITY_SIZE = 0x80DF,
/* GL_EXT_convolution and GL_HP_convolution_border_modes */
GL_CONVOLUTION_1D = 0x8010,
GL_CONVOLUTION_2D = 0x8011,
@@ -976,6 +980,7 @@ typedef enum {
GL_CONSTANT_BORDER = 0x8151,
GL_REPLICATE_BORDER = 0x8153,
GL_CONVOLUTION_BORDER_COLOR = 0x8154,
/* GL_SGI_color_matrix */
GL_COLOR_MATRIX = 0x80B1,
GL_COLOR_MATRIX_STACK_DEPTH = 0x80B2,
@@ -988,6 +993,7 @@ typedef enum {
GL_POST_COLOR_MATRIX_GREEN_BIAS = 0x80B9,
GL_POST_COLOR_MATRIX_BLUE_BIAS = 0x80BA,
GL_POST_COLOR_MATRIX_ALPHA_BIAS = 0x80BB,
/* GL_EXT_histogram */
GL_HISTOGRAM = 0x8024,
GL_PROXY_HISTOGRAM = 0x8025,
@@ -1003,14 +1009,6 @@ typedef enum {
GL_MINMAX_FORMAT = 0x802F,
GL_MINMAX_SINK = 0x8030,
GL_TABLE_TOO_LARGE = 0x8031,
/* GL_EXT_blend_color, GL_EXT_blend_minmax */
GL_BLEND_EQUATION = 0x8009,
GL_MIN = 0x8007,
GL_MAX = 0x8008,
GL_FUNC_ADD = 0x8006,
GL_FUNC_SUBTRACT = 0x800A,
GL_FUNC_REVERSE_SUBTRACT = 0x800B,
GL_BLEND_COLOR = 0x8005,
/* GL_NV_texgen_reflection (nVidia) */
GL_NORMAL_MAP_NV = 0x8511,
@@ -1040,8 +1038,8 @@ typedef enum {
GL_NATIVE_GRAPHICS_HANDLE_PGI = 107010,
/* GL_EXT_compiled_vertex_array */
GL_ARRAY_ELEMENT_LOCK_FIRST_EXT = 0x81A8,
GL_ARRAY_ELEMENT_LOCK_COUNT_EXT = 0x81A9,
GL_ARRAY_ELEMENT_LOCK_FIRST_SGI = 0x81A8,
GL_ARRAY_ELEMENT_LOCK_COUNT_SGI = 0x81A9,
/* GL_EXT_clip_volume_hint */
GL_CLIP_VOLUME_CLIPPING_HINT_EXT = 0x80F0
@@ -1861,7 +1859,7 @@ GLAPI void GLAPIENTRY glPopName( void );
/*
* Extensions
* 1.0 Extensions
*/
/* GL_EXT_blend_minmax */
@@ -2098,36 +2096,6 @@ GLAPI void GLAPIENTRY glCopyTexSubImage3D( GLenum target, GLint level,
/* 1.2 imaging extension functions */
GLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat,
GLsizei width, GLenum format,
GLenum type, const GLvoid *table );
GLAPI void GLAPIENTRY glColorSubTable( GLenum target,
GLsizei start, GLsizei count,
GLenum format, GLenum type,
const GLvoid *data );
GLAPI void GLAPIENTRY glColorTableParameteriv(GLenum target, GLenum pname,
const GLint *params);
GLAPI void GLAPIENTRY glColorTableParameterfv(GLenum target, GLenum pname,
const GLfloat *params);
GLAPI void GLAPIENTRY glCopyColorSubTable( GLenum target, GLsizei start,
GLint x, GLint y, GLsizei width );
GLAPI void GLAPIENTRY glCopyColorTable( GLenum target, GLenum internalformat,
GLint x, GLint y, GLsizei width );
GLAPI void GLAPIENTRY glGetColorTable( GLenum target, GLenum format,
GLenum type, GLvoid *table );
GLAPI void GLAPIENTRY glGetColorTableParameterfv( GLenum target, GLenum pname,
GLfloat *params );
GLAPI void GLAPIENTRY glGetColorTableParameteriv( GLenum target, GLenum pname,
GLint *params );
GLAPI void GLAPIENTRY glBlendEquation( GLenum mode );
GLAPI void GLAPIENTRY glBlendColor( GLclampf red, GLclampf green,
@@ -2153,7 +2121,7 @@ GLAPI void GLAPIENTRY glMinmax( GLenum target, GLenum internalformat,
GLAPI void GLAPIENTRY glResetMinmax( GLenum target );
GLAPI void GLAPIENTRY glGetMinmax( GLenum target, GLboolean reset,
GLAPI void GLAPIENTRY glGetMinMax( GLenum target, GLboolean reset,
GLenum format, GLenum types,
GLvoid *values );
@@ -2206,6 +2174,12 @@ GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target,
GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
GLenum type, GLvoid *row, GLvoid *column, GLvoid *span );
GLAPI void GLAPIENTRY glCopyColorSubTable( GLenum target, GLsizei start,
GLint x, GLint y, GLsizei width );
GLAPI void GLAPIENTRY glCopyColorTable( GLenum target, GLenum internalformat,
GLint x, GLint y, GLsizei width );
/* GL_EXT_compiled_vertex_array */
@@ -2213,11 +2187,6 @@ GLAPI void GLAPIENTRY glLockArraysEXT( GLint first, GLsizei count );
GLAPI void GLAPIENTRY glUnlockArraysEXT( void );
/* GL_PGI_misc_hints */
GLAPI void GLAPIENTRY glHintPGI(GLenum target, GLint mode);
#if defined(__BEOS__) || defined(__QUICKDRAW__)
#pragma export off
#endif

View File

@@ -1,8 +1,8 @@
/* $Id: gl_mangle.h,v 1.3.2.1 2000/01/04 08:08:28 brianp Exp $ */
/* $Id: gl_mangle.h,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.2
* Version: 3.1
*
* Copyright (C) 1999 Brian Paul All Rights Reserved.
*
@@ -344,7 +344,6 @@
#define glGetMapdv mglGetMapdv
#define glGetMapfv mglGetMapfv
#define glGetMapiv mglGetMapiv
#define glGetMinmax mglGetMinmax
#define glEvalCoord1d mglEvalCoord1d
#define glEvalCoord1f mglEvalCoord1f
#define glEvalCoord1dv mglEvalCoord1dv
@@ -395,18 +394,12 @@
#define glTexImage3DEXT mglTexImage3DEXT
#define glTexSubImage3DEXT mglTexSubImage3DEXT
#define glCopyTexSubImage3DEXT mglCopyTexSubImage3DEXT
#define glColorTable mglColorTable
#define glColorTableParameteriv mglColorTableParameteriv
#define glColorTableParameterfv mglColorTableParameterfv
#define glColorSubTable mglColorSubTable
#define glGetColorTable mglGetColorTable
#define glGetColorTableParameteriv mglGetColorTableParameteriv
#define glGetColorTableParameterfv mglGetColorTableParameterfv
#define glColorTableEXT mglColorTableEXT
#define glColorSubTableEXT mglColorSubTableEXT
#define glGetColorTableEXT mglGetColorTableEXT
#define glGetColorTableParameterfvEXT mglGetColorTableParameterfvEXT
#define glGetColorTableParameterivEXT mglGetColorTableParameterivEXT
#define glGetMinMax mglGetMinMax
#define glMultiTexCoord1dSGIS mglMultiTexCoord1dSGIS
#define glMultiTexCoord1dvSGIS mglMultiTexCoord1dvSGIS
#define glMultiTexCoord1fSGIS mglMultiTexCoord1fSGIS
@@ -515,7 +508,6 @@
#define glGetHistogramParameteriv mglGetHistogramParameteriv
#define glMinmax mglMinmax
#define glResetMinmax mglResetMinmax
#define glGetMinmax mglGetMinmax
#define glGetMinmaxParameterfv mglGetMinmaxParameterfv
#define glGetMinmaxParameteriv mglGetMinmaxParameteriv
#define glConvolutionFilter1D mglConvolutionFilter1D

View File

@@ -1,9 +1,8 @@
/* $Id: glu.h,v 1.16 1999/11/11 03:21:43 kendallb Exp $ */
/* $Id: glu.h,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
*
* Version: 3.1
* Copyright (C) 1995-1999 Brian Paul
*
* This library is free software; you can redistribute it and/or
@@ -22,6 +21,35 @@
*/
/*
* $Log: glu.h,v $
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 3.6 1999/02/14 03:39:45 brianp
* updated for BeOS R4
*
* Revision 3.5 1999/01/03 03:02:55 brianp
* now using GLAPI and GLAPIENTRY keywords, misc Windows changes (Ted Jump)
*
* Revision 3.4 1998/12/01 02:34:27 brianp
* applied Mark Kilgard's patches from November 30, 1998
*
* Revision 3.3 1998/11/17 01:14:02 brianp
* minor changes for OpenStep compilation (pete@ohm.york.ac.uk)
*
* Revision 3.2 1998/07/26 01:36:27 brianp
* changes for Windows compilation per Ted Jump
*
* Revision 3.1 1998/06/23 00:33:08 brianp
* added some WIN32 APIENTRY, CALLBACK stuff (Eric Lassauge)
*
* Revision 3.0 1998/02/20 05:06:01 brianp
* initial rev
*
*/
#ifndef GLU_H
#define GLU_H
@@ -58,178 +86,136 @@ extern "C" {
#endif
#endif
#ifndef GLUAPI
#define GLUAPI
#endif
#ifndef GLAPIENTRY
#define GLAPIENTRY
#endif
#ifndef GLCALLBACK
#define GLCALLBACK
#endif
#define GLU_VERSION_1_1 1
#define GLU_VERSION_1_1 1
#define GLU_VERSION_1_2 1
#define GLU_TRUE GL_TRUE
#define GLU_FALSE GL_FALSE
#define GLU_TRUE 1
#define GLU_FALSE 0
enum {
/* Normal vectors */
GLU_SMOOTH = 100000,
GLU_FLAT = 100001,
GLU_NONE = 100002,
/* Quadric draw styles */
GLU_POINT = 100010,
GLU_LINE = 100011,
GLU_FILL = 100012,
GLU_SILHOUETTE = 100013,
/* Normal vectors */
#define GLU_SMOOTH 100000
#define GLU_FLAT 100001
#define GLU_NONE 100002
/* Quadric orientation */
GLU_OUTSIDE = 100020,
GLU_INSIDE = 100021,
/* Quadric draw styles */
#define GLU_POINT 100010
#define GLU_LINE 100011
#define GLU_FILL 100012
#define GLU_SILHOUETTE 100013
/* Tesselator */
GLU_BEGIN = 100100,
GLU_VERTEX = 100101,
GLU_END = 100102,
GLU_ERROR = 100103,
GLU_EDGE_FLAG = 100104,
/* Quadric orientation */
#define GLU_OUTSIDE 100020
#define GLU_INSIDE 100021
/* Contour types */
GLU_CW = 100120,
GLU_CCW = 100121,
GLU_INTERIOR = 100122,
GLU_EXTERIOR = 100123,
GLU_UNKNOWN = 100124,
/* Tessellator */
#define GLU_TESS_BEGIN 100100
#define GLU_TESS_VERTEX 100101
#define GLU_TESS_END 100102
#define GLU_TESS_ERROR 100103
#define GLU_TESS_EDGE_FLAG 100104
#define GLU_TESS_COMBINE 100105
/* Tesselation errors */
GLU_TESS_ERROR1 = 100151, /* missing gluEndPolygon */
GLU_TESS_ERROR2 = 100152, /* missing gluBeginPolygon */
GLU_TESS_ERROR3 = 100153, /* misoriented contour */
GLU_TESS_ERROR4 = 100154, /* vertex/edge intersection */
GLU_TESS_ERROR5 = 100155, /* misoriented or self-intersecting loops */
GLU_TESS_ERROR6 = 100156, /* coincident vertices */
GLU_TESS_ERROR7 = 100157, /* all vertices collinear */
GLU_TESS_ERROR8 = 100158, /* intersecting edges */
GLU_TESS_ERROR9 = 100159, /* not coplanar contours */
#define GLU_TESS_BEGIN_DATA 100106
#define GLU_TESS_VERTEX_DATA 100107
#define GLU_TESS_END_DATA 100108
#define GLU_TESS_ERROR_DATA 100109
#define GLU_TESS_EDGE_FLAG_DATA 100110
#define GLU_TESS_COMBINE_DATA 100111
/* NURBS */
GLU_AUTO_LOAD_MATRIX = 100200,
GLU_CULLING = 100201,
GLU_PARAMETRIC_TOLERANCE= 100202,
GLU_SAMPLING_TOLERANCE = 100203,
GLU_DISPLAY_MODE = 100204,
GLU_SAMPLING_METHOD = 100205,
GLU_U_STEP = 100206,
GLU_V_STEP = 100207,
/* Winding rules */
#define GLU_TESS_WINDING_ODD 100130
#define GLU_TESS_WINDING_NONZERO 100131
#define GLU_TESS_WINDING_POSITIVE 100132
#define GLU_TESS_WINDING_NEGATIVE 100133
#define GLU_TESS_WINDING_ABS_GEQ_TWO 100134
GLU_PATH_LENGTH = 100215,
GLU_PARAMETRIC_ERROR = 100216,
GLU_DOMAIN_DISTANCE = 100217,
/* Tessellation properties */
#define GLU_TESS_WINDING_RULE 100140
#define GLU_TESS_BOUNDARY_ONLY 100141
#define GLU_TESS_TOLERANCE 100142
GLU_MAP1_TRIM_2 = 100210,
GLU_MAP1_TRIM_3 = 100211,
/* Tessellation errors */
#define GLU_TESS_ERROR1 100151 /* Missing gluBeginPolygon */
#define GLU_TESS_ERROR2 100152 /* Missing gluBeginContour */
#define GLU_TESS_ERROR3 100153 /* Missing gluEndPolygon */
#define GLU_TESS_ERROR4 100154 /* Missing gluEndContour */
#define GLU_TESS_ERROR5 100155 /* */
#define GLU_TESS_ERROR6 100156 /* */
#define GLU_TESS_ERROR7 100157 /* */
#define GLU_TESS_ERROR8 100158 /* */
GLU_OUTLINE_POLYGON = 100240,
GLU_OUTLINE_PATCH = 100241,
/* NURBS */
#define GLU_AUTO_LOAD_MATRIX 100200
#define GLU_CULLING 100201
#define GLU_PARAMETRIC_TOLERANCE 100202
#define GLU_SAMPLING_TOLERANCE 100203
#define GLU_DISPLAY_MODE 100204
#define GLU_SAMPLING_METHOD 100205
#define GLU_U_STEP 100206
#define GLU_V_STEP 100207
GLU_NURBS_ERROR1 = 100251, /* spline order un-supported */
GLU_NURBS_ERROR2 = 100252, /* too few knots */
GLU_NURBS_ERROR3 = 100253, /* valid knot range is empty */
GLU_NURBS_ERROR4 = 100254, /* decreasing knot sequence */
GLU_NURBS_ERROR5 = 100255, /* knot multiplicity > spline order */
GLU_NURBS_ERROR6 = 100256, /* endcurve() must follow bgncurve() */
GLU_NURBS_ERROR7 = 100257, /* bgncurve() must precede endcurve() */
GLU_NURBS_ERROR8 = 100258, /* ctrlarray or knot vector is NULL */
GLU_NURBS_ERROR9 = 100259, /* can't draw pwlcurves */
GLU_NURBS_ERROR10 = 100260, /* missing gluNurbsCurve() */
GLU_NURBS_ERROR11 = 100261, /* missing gluNurbsSurface() */
GLU_NURBS_ERROR12 = 100262, /* endtrim() must precede endsurface() */
GLU_NURBS_ERROR13 = 100263, /* bgnsurface() must precede endsurface() */
GLU_NURBS_ERROR14 = 100264, /* curve of improper type passed as trim curve */
GLU_NURBS_ERROR15 = 100265, /* bgnsurface() must precede bgntrim() */
GLU_NURBS_ERROR16 = 100266, /* endtrim() must follow bgntrim() */
GLU_NURBS_ERROR17 = 100267, /* bgntrim() must precede endtrim()*/
GLU_NURBS_ERROR18 = 100268, /* invalid or missing trim curve*/
GLU_NURBS_ERROR19 = 100269, /* bgntrim() must precede pwlcurve() */
GLU_NURBS_ERROR20 = 100270, /* pwlcurve referenced twice*/
GLU_NURBS_ERROR21 = 100271, /* pwlcurve and nurbscurve mixed */
GLU_NURBS_ERROR22 = 100272, /* improper usage of trim data type */
GLU_NURBS_ERROR23 = 100273, /* nurbscurve referenced twice */
GLU_NURBS_ERROR24 = 100274, /* nurbscurve and pwlcurve mixed */
GLU_NURBS_ERROR25 = 100275, /* nurbssurface referenced twice */
GLU_NURBS_ERROR26 = 100276, /* invalid property */
GLU_NURBS_ERROR27 = 100277, /* endsurface() must follow bgnsurface() */
GLU_NURBS_ERROR28 = 100278, /* intersecting or misoriented trim curves */
GLU_NURBS_ERROR29 = 100279, /* intersecting trim curves */
GLU_NURBS_ERROR30 = 100280, /* UNUSED */
GLU_NURBS_ERROR31 = 100281, /* unconnected trim curves */
GLU_NURBS_ERROR32 = 100282, /* unknown knot error */
GLU_NURBS_ERROR33 = 100283, /* negative vertex count encountered */
GLU_NURBS_ERROR34 = 100284, /* negative byte-stride */
GLU_NURBS_ERROR35 = 100285, /* unknown type descriptor */
GLU_NURBS_ERROR36 = 100286, /* null control point reference */
GLU_NURBS_ERROR37 = 100287, /* duplicate point on pwlcurve */
#define GLU_PATH_LENGTH 100215
#define GLU_PARAMETRIC_ERROR 100216
#define GLU_DOMAIN_DISTANCE 100217
/* Errors */
GLU_INVALID_ENUM = 100900,
GLU_INVALID_VALUE = 100901,
GLU_OUT_OF_MEMORY = 100902,
GLU_INCOMPATIBLE_GL_VERSION = 100903,
#define GLU_MAP1_TRIM_2 100210
#define GLU_MAP1_TRIM_3 100211
#define GLU_OUTLINE_POLYGON 100240
#define GLU_OUTLINE_PATCH 100241
#define GLU_NURBS_ERROR1 100251 /* spline order un-supported */
#define GLU_NURBS_ERROR2 100252 /* too few knots */
#define GLU_NURBS_ERROR3 100253 /* valid knot range is empty */
#define GLU_NURBS_ERROR4 100254 /* decreasing knot sequence */
#define GLU_NURBS_ERROR5 100255 /* knot multiplicity > spline order */
#define GLU_NURBS_ERROR6 100256 /* endcurve() must follow bgncurve() */
#define GLU_NURBS_ERROR7 100257 /* bgncurve() must precede endcurve() */
#define GLU_NURBS_ERROR8 100258 /* ctrlarray or knot vector is NULL */
#define GLU_NURBS_ERROR9 100259 /* can't draw pwlcurves */
#define GLU_NURBS_ERROR10 100260 /* missing gluNurbsCurve() */
#define GLU_NURBS_ERROR11 100261 /* missing gluNurbsSurface() */
#define GLU_NURBS_ERROR12 100262 /* endtrim() must precede endsurface() */
#define GLU_NURBS_ERROR13 100263 /* bgnsurface() must precede endsurface() */
#define GLU_NURBS_ERROR14 100264 /* curve of improper type passed as trim curve */
#define GLU_NURBS_ERROR15 100265 /* bgnsurface() must precede bgntrim() */
#define GLU_NURBS_ERROR16 100266 /* endtrim() must follow bgntrim() */
#define GLU_NURBS_ERROR17 100267 /* bgntrim() must precede endtrim()*/
#define GLU_NURBS_ERROR18 100268 /* invalid or missing trim curve*/
#define GLU_NURBS_ERROR19 100269 /* bgntrim() must precede pwlcurve() */
#define GLU_NURBS_ERROR20 100270 /* pwlcurve referenced twice*/
#define GLU_NURBS_ERROR21 100271 /* pwlcurve and nurbscurve mixed */
#define GLU_NURBS_ERROR22 100272 /* improper usage of trim data type */
#define GLU_NURBS_ERROR23 100273 /* nurbscurve referenced twice */
#define GLU_NURBS_ERROR24 100274 /* nurbscurve and pwlcurve mixed */
#define GLU_NURBS_ERROR25 100275 /* nurbssurface referenced twice */
#define GLU_NURBS_ERROR26 100276 /* invalid property */
#define GLU_NURBS_ERROR27 100277 /* endsurface() must follow bgnsurface() */
#define GLU_NURBS_ERROR28 100278 /* intersecting or misoriented trim curves */
#define GLU_NURBS_ERROR29 100279 /* intersecting trim curves */
#define GLU_NURBS_ERROR30 100280 /* UNUSED */
#define GLU_NURBS_ERROR31 100281 /* unconnected trim curves */
#define GLU_NURBS_ERROR32 100282 /* unknown knot error */
#define GLU_NURBS_ERROR33 100283 /* negative vertex count encountered */
#define GLU_NURBS_ERROR34 100284 /* negative byte-stride */
#define GLU_NURBS_ERROR35 100285 /* unknown type descriptor */
#define GLU_NURBS_ERROR36 100286 /* null control point reference */
#define GLU_NURBS_ERROR37 100287 /* duplicate point on pwlcurve */
/* Errors */
#define GLU_INVALID_ENUM 100900
#define GLU_INVALID_VALUE 100901
#define GLU_OUT_OF_MEMORY 100902
#define GLU_INCOMPATIBLE_GL_VERSION 100903
/* New in GLU 1.1 */
#define GLU_VERSION 100800
#define GLU_EXTENSIONS 100801
/*** GLU 1.0 tessellation - obsolete! ***/
/* Contour types */
#define GLU_CW 100120
#define GLU_CCW 100121
#define GLU_INTERIOR 100122
#define GLU_EXTERIOR 100123
#define GLU_UNKNOWN 100124
/* Tessellator */
#define GLU_BEGIN GLU_TESS_BEGIN
#define GLU_VERTEX GLU_TESS_VERTEX
#define GLU_END GLU_TESS_END
#define GLU_ERROR GLU_TESS_ERROR
#define GLU_EDGE_FLAG GLU_TESS_EDGE_FLAG
/* New in GLU 1.1 */
GLU_VERSION = 100800,
GLU_EXTENSIONS = 100801
};
/*
* These are the GLU 1.1 typedefs. GLU 1.3 has different ones!
* These are the GLU 1.1 typedefs. GLU 1.2 has different ones!
*/
#if defined(__BEOS__)
/* The BeOS does something funky and makes these typedefs in one
* of its system headers.
*/
/* The BeOS does something funky and makes these typedefs in one
* of its system headers.
*/
#else
typedef struct GLUquadric GLUquadricObj;
typedef struct GLUnurbs GLUnurbsObj;
/* FIXME: We need to implement the other 1.3 typedefs - GH */
typedef struct GLUtesselator GLUtesselator;
typedef GLUtesselator GLUtriangulatorObj;
typedef struct GLUquadric GLUquadricObj;
typedef struct GLUtesselator GLUtriangulatorObj;
typedef struct GLUnurbs GLUnurbsObj;
#endif
@@ -246,37 +232,37 @@ extern "C" {
*/
GLUAPI void GLAPIENTRY gluLookAt( GLdouble eyex, GLdouble eyey, GLdouble eyez,
GLdouble centerx, GLdouble centery,
GLdouble centerz,
GLdouble upx, GLdouble upy, GLdouble upz );
GLdouble centerx, GLdouble centery,
GLdouble centerz,
GLdouble upx, GLdouble upy, GLdouble upz );
GLUAPI void GLAPIENTRY gluOrtho2D( GLdouble left, GLdouble right,
GLdouble bottom, GLdouble top );
GLdouble bottom, GLdouble top );
GLUAPI void GLAPIENTRY gluPerspective( GLdouble fovy, GLdouble aspect,
GLdouble zNear, GLdouble zFar );
GLdouble zNear, GLdouble zFar );
GLUAPI void GLAPIENTRY gluPickMatrix( GLdouble x, GLdouble y,
GLdouble width, GLdouble height,
const GLint viewport[4] );
GLdouble width, GLdouble height,
const GLint viewport[4] );
GLUAPI GLint GLAPIENTRY gluProject( GLdouble objx, GLdouble objy, GLdouble objz,
const GLdouble modelMatrix[16],
const GLdouble projMatrix[16],
const GLint viewport[4],
GLdouble *winx, GLdouble *winy,
GLdouble *winz );
GLUAPI GLint GLAPIENTRY gluUnProject( GLdouble winx, GLdouble winy,
GLdouble winz,
const GLdouble modelMatrix[16],
const GLdouble projMatrix[16],
const GLint viewport[4],
GLdouble *winx, GLdouble *winy,
GLdouble *winz );
GLUAPI GLint GLAPIENTRY gluUnProject( GLdouble winx, GLdouble winy,
GLdouble winz,
const GLdouble modelMatrix[16],
const GLdouble projMatrix[16],
const GLint viewport[4],
GLdouble *objx, GLdouble *objy,
GLdouble *objz );
GLdouble *objx, GLdouble *objy,
GLdouble *objz );
GLUAPI const GLubyte* GLAPIENTRY gluErrorString( GLenum errorCode );
@@ -289,19 +275,19 @@ GLUAPI const GLubyte* GLAPIENTRY gluErrorString( GLenum errorCode );
*/
GLUAPI GLint GLAPIENTRY gluScaleImage( GLenum format,
GLint widthin, GLint heightin,
GLenum typein, const void *datain,
GLint widthout, GLint heightout,
GLenum typeout, void *dataout );
GLint widthin, GLint heightin,
GLenum typein, const void *datain,
GLint widthout, GLint heightout,
GLenum typeout, void *dataout );
GLUAPI GLint GLAPIENTRY gluBuild1DMipmaps( GLenum target, GLint components,
GLint width, GLenum format,
GLenum type, const void *data );
GLint width, GLenum format,
GLenum type, const void *data );
GLUAPI GLint GLAPIENTRY gluBuild2DMipmaps( GLenum target, GLint components,
GLint width, GLint height,
GLenum format,
GLenum type, const void *data );
GLint width, GLint height,
GLenum format,
GLenum type, const void *data );
@@ -316,39 +302,37 @@ GLUAPI GLUquadricObj* GLAPIENTRY gluNewQuadric( void );
GLUAPI void GLAPIENTRY gluDeleteQuadric( GLUquadricObj *state );
GLUAPI void GLAPIENTRY gluQuadricDrawStyle( GLUquadricObj *quadObject,
GLenum drawStyle );
GLenum drawStyle );
GLUAPI void GLAPIENTRY gluQuadricOrientation( GLUquadricObj *quadObject,
GLenum orientation );
GLenum orientation );
GLUAPI void GLAPIENTRY gluQuadricNormals( GLUquadricObj *quadObject,
GLenum normals );
GLenum normals );
GLUAPI void GLAPIENTRY gluQuadricTexture( GLUquadricObj *quadObject,
GLboolean textureCoords );
GLboolean textureCoords );
GLUAPI void GLAPIENTRY gluQuadricCallback( GLUquadricObj *qobj,
GLenum which,
void (GLCALLBACK *fn)() );
GLenum which, void (GLCALLBACK *fn)() );
GLUAPI void GLAPIENTRY gluCylinder( GLUquadricObj *qobj,
GLdouble baseRadius,
GLdouble topRadius,
GLdouble height,
GLint slices, GLint stacks );
GLdouble baseRadius,
GLdouble topRadius,
GLdouble height,
GLint slices, GLint stacks );
GLUAPI void GLAPIENTRY gluSphere( GLUquadricObj *qobj,
GLdouble radius, GLint slices,
GLint stacks );
GLdouble radius, GLint slices, GLint stacks );
GLUAPI void GLAPIENTRY gluDisk( GLUquadricObj *qobj,
GLdouble innerRadius, GLdouble outerRadius,
GLint slices, GLint loops );
GLdouble innerRadius, GLdouble outerRadius,
GLint slices, GLint loops );
GLUAPI void GLAPIENTRY gluPartialDisk( GLUquadricObj *qobj, GLdouble innerRadius,
GLdouble outerRadius, GLint slices,
GLint loops, GLdouble startAngle,
GLdouble sweepAngle );
GLdouble outerRadius, GLint slices,
GLint loops, GLdouble startAngle,
GLdouble sweepAngle );
@@ -363,95 +347,70 @@ GLUAPI GLUnurbsObj* GLAPIENTRY gluNewNurbsRenderer( void );
GLUAPI void GLAPIENTRY gluDeleteNurbsRenderer( GLUnurbsObj *nobj );
GLUAPI void GLAPIENTRY gluLoadSamplingMatrices( GLUnurbsObj *nobj,
const GLfloat modelMatrix[16],
const GLfloat projMatrix[16],
const GLint viewport[4] );
const GLfloat modelMatrix[16],
const GLfloat projMatrix[16],
const GLint viewport[4] );
GLUAPI void GLAPIENTRY gluNurbsProperty( GLUnurbsObj *nobj, GLenum property,
GLfloat value );
GLfloat value );
GLUAPI void GLAPIENTRY gluGetNurbsProperty( GLUnurbsObj *nobj, GLenum property,
GLfloat *value );
GLfloat *value );
GLUAPI void GLAPIENTRY gluBeginCurve( GLUnurbsObj *nobj );
GLUAPI void GLAPIENTRY gluEndCurve( GLUnurbsObj * nobj );
GLUAPI void GLAPIENTRY gluNurbsCurve( GLUnurbsObj *nobj, GLint nknots,
GLfloat *knot, GLint stride,
GLfloat *ctlarray, GLint order,
GLenum type );
GLfloat *knot, GLint stride,
GLfloat *ctlarray, GLint order,
GLenum type );
GLUAPI void GLAPIENTRY gluBeginSurface( GLUnurbsObj *nobj );
GLUAPI void GLAPIENTRY gluEndSurface( GLUnurbsObj * nobj );
GLUAPI void GLAPIENTRY gluNurbsSurface( GLUnurbsObj *nobj,
GLint sknot_count, GLfloat *sknot,
GLint tknot_count, GLfloat *tknot,
GLint s_stride, GLint t_stride,
GLfloat *ctlarray,
GLint sorder, GLint torder,
GLenum type );
GLint sknot_count, GLfloat *sknot,
GLint tknot_count, GLfloat *tknot,
GLint s_stride, GLint t_stride,
GLfloat *ctlarray,
GLint sorder, GLint torder,
GLenum type );
GLUAPI void GLAPIENTRY gluBeginTrim( GLUnurbsObj *nobj );
GLUAPI void GLAPIENTRY gluEndTrim( GLUnurbsObj *nobj );
GLUAPI void GLAPIENTRY gluPwlCurve( GLUnurbsObj *nobj, GLint count,
GLfloat *array, GLint stride,
GLenum type );
GLfloat *array, GLint stride, GLenum type );
GLUAPI void GLAPIENTRY gluNurbsCallback( GLUnurbsObj *nobj, GLenum which,
void (GLCALLBACK *fn)() );
void (GLCALLBACK *fn)() );
/*
*
* Polygon tessellation
* Polygon tesselation
*
*/
GLUAPI GLUtesselator* GLAPIENTRY gluNewTess( void );
GLUAPI GLUtriangulatorObj* GLAPIENTRY gluNewTess( void );
GLUAPI void GLAPIENTRY gluDeleteTess( GLUtesselator *tobj );
GLUAPI void GLAPIENTRY gluTessCallback( GLUtriangulatorObj *tobj, GLenum which,
void (GLCALLBACK *fn)() );
GLUAPI void GLAPIENTRY gluTessBeginPolygon( GLUtesselator *tobj,
void *polygon_data );
GLUAPI void GLAPIENTRY gluDeleteTess( GLUtriangulatorObj *tobj );
GLUAPI void GLAPIENTRY gluTessBeginContour( GLUtesselator *tobj );
GLUAPI void GLAPIENTRY gluBeginPolygon( GLUtriangulatorObj *tobj );
GLUAPI void GLAPIENTRY gluTessVertex( GLUtesselator *tobj, GLdouble coords[3],
void *vertex_data );
GLUAPI void GLAPIENTRY gluEndPolygon( GLUtriangulatorObj *tobj );
GLUAPI void GLAPIENTRY gluTessEndContour( GLUtesselator *tobj );
GLUAPI void GLAPIENTRY gluNextContour( GLUtriangulatorObj *tobj, GLenum type );
GLUAPI void GLAPIENTRY gluTessEndPolygon( GLUtesselator *tobj );
GLUAPI void GLAPIENTRY gluTessProperty( GLUtesselator *tobj, GLenum which,
GLdouble value );
GLUAPI void GLAPIENTRY gluTessNormal( GLUtesselator *tobj, GLdouble x,
GLdouble y, GLdouble z );
GLUAPI void GLAPIENTRY gluTessCallback( GLUtesselator *tobj, GLenum which,
void (GLCALLBACK *fn)() );
GLUAPI void GLAPIENTRY gluGetTessProperty( GLUtesselator *tobj, GLenum which,
GLdouble *value );
/*
*
* Obsolete 1.0 tessellation functions
*
*/
GLUAPI void GLAPIENTRY gluBeginPolygon( GLUtesselator *tobj );
GLUAPI void GLAPIENTRY gluNextContour( GLUtesselator *tobj, GLenum type );
GLUAPI void GLAPIENTRY gluEndPolygon( GLUtesselator *tobj );
GLUAPI void GLAPIENTRY gluTessVertex( GLUtriangulatorObj *tobj, GLdouble v[3],
void *data );
@@ -464,7 +423,6 @@ GLUAPI void GLAPIENTRY gluEndPolygon( GLUtesselator *tobj );
GLUAPI const GLubyte* GLAPIENTRY gluGetString( GLenum name );
#if defined(__BEOS__) || defined(__QUICKDRAW__)
#pragma export off
#endif

View File

@@ -1,4 +1,4 @@
/* $Id: glu_mangle.h,v 1.2 1999/09/10 02:08:19 gareth Exp $ */
/* $Id: glu_mangle.h,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* Mesa 3-D graphics library
@@ -23,9 +23,6 @@
/*
* $Log: glu_mangle.h,v $
* Revision 1.2 1999/09/10 02:08:19 gareth
* Added GLU 1.3 tessellation (except winding rule code).
*
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
@@ -78,19 +75,12 @@
#define gluPwlCurve mgluPwlCurve
#define gluNurbsCallback mgluNurbsCallback
#define gluNewTess mgluNewTess
#define gluDeleteTess mgluDeleteTess
#define gluTessBeginPolygon mgluTessBeginPolygon
#define gluTessBeginContour mgluTessBeginContour
#define gluTessVertex mgluTessVertex
#define gluTessEndPolygon mgluTessEndPolygon
#define gluTessEndContour mgluTessEndContour
#define gluTessProperty mgluTessProperty
#define gluTessNormal mgluTessNormal
#define gluTessCallback mgluTessCallback
#define gluGetTessProperty mgluGetTessProperty
#define gluDeleteTess mgluDeleteTess
#define gluBeginPolygon mgluBeginPolygon
#define gluNextContour mgluNextContour
#define gluEndPolygon mgluEndPolygon
#define gluNextContour mgluNextContour
#define gluTessVertex mgluTessVertex
#define gluGetString mgluGetString
#endif

View File

@@ -108,7 +108,7 @@ extern _CRTIMP void __cdecl exit(int);
and redifinition of Windows system defs, also removes requirement of
pretty much any standard windows header from this file */
#if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__CYGWIN32__)
#if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
# define GLUTAPIENTRY __stdcall
#else
# define GLUTAPIENTRY
@@ -153,41 +153,25 @@ typedef unsigned long COLORREF;
# endif /* !UNICODE */
typedef struct tagLAYERPLANEDESCRIPTOR LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR;
typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT;
# pragma warning( push )
# pragma warning( disable : 4273 ) /* 'function' : inconsistent DLL linkage. dllexport assumed. */
# define WGLAPI __declspec(dllimport)
WGLAPI int GLAPIENTRY wglDeleteContext(HGLRC);
WGLAPI int GLAPIENTRY wglMakeCurrent(HDC,HGLRC);
WGLAPI int GLAPIENTRY wglSetPixelFormat(HDC, int, const PIXELFORMATDESCRIPTOR *);
WGLAPI int GLAPIENTRY wglSwapBuffers(HDC hdc);
WGLAPI HDC GLAPIENTRY wglGetCurrentDC(void);
WGLAPI HGLRC GLAPIENTRY wglCreateContext(HDC);
WGLAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC,int);
WGLAPI HGLRC GLAPIENTRY wglGetCurrentContext(void);
WGLAPI PROC GLAPIENTRY wglGetProcAddress(const char*);
WGLAPI int GLAPIENTRY wglChoosePixelFormat(HDC, const PIXELFORMATDESCRIPTOR *);
WGLAPI int GLAPIENTRY wglCopyContext(HGLRC, HGLRC, unsigned int);
WGLAPI int GLAPIENTRY wglDeleteContext(HGLRC);
WGLAPI int GLAPIENTRY wglDescribeLayerPlane(HDC, int, int, unsigned int,LPLAYERPLANEDESCRIPTOR);
WGLAPI int GLAPIENTRY wglDescribePixelFormat(HDC,int, unsigned int, LPPIXELFORMATDESCRIPTOR);
WGLAPI int GLAPIENTRY wglGetLayerPaletteEntries(HDC, int, int, int,COLORREF *);
WGLAPI int GLAPIENTRY wglGetPixelFormat(HDC hdc);
WGLAPI int GLAPIENTRY wglMakeCurrent(HDC, HGLRC);
WGLAPI int GLAPIENTRY wglRealizeLayerPalette(HDC, int, int);
WGLAPI int GLAPIENTRY wglSetLayerPaletteEntries(HDC, int, int, int,const COLORREF *);
WGLAPI int GLAPIENTRY wglShareLists(HGLRC, HGLRC);
WGLAPI int GLAPIENTRY wglSwapLayerBuffers(HDC, unsigned int);
WGLAPI int GLAPIENTRY wglUseFontBitmapsA(HDC, unsigned long, unsigned long, unsigned long);
WGLAPI int GLAPIENTRY wglUseFontBitmapsW(HDC, unsigned long, unsigned long, unsigned long);
WGLAPI int GLAPIENTRY wglUseFontOutlinesA(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
WGLAPI int GLAPIENTRY wglUseFontOutlinesW(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
WGLAPI int GLAPIENTRY SwapBuffers(HDC);
WGLAPI int GLAPIENTRY ChoosePixelFormat(HDC,const PIXELFORMATDESCRIPTOR *);
WGLAPI int GLAPIENTRY DescribePixelFormat(HDC,int,unsigned int,LPPIXELFORMATDESCRIPTOR);
WGLAPI int GLAPIENTRY GetPixelFormat(HDC);
WGLAPI int GLAPIENTRY SetPixelFormat(HDC,int,const PIXELFORMATDESCRIPTOR *);
# undef WGLAPI
# pragma warning( pop )
GLUTAPI int GLUTAPIENTRY wglCopyContext(HGLRC, HGLRC, unsigned int);
GLUTAPI HGLRC GLUTAPIENTRY wglCreateContext(HDC);
GLUTAPI HGLRC GLUTAPIENTRY wglCreateLayerContext(HDC, int);
GLUTAPI int GLUTAPIENTRY wglDeleteContext(HGLRC);
GLUTAPI HGLRC GLUTAPIENTRY wglGetCurrentContext(void);
GLUTAPI HDC GLUTAPIENTRY wglGetCurrentDC(void);
GLUTAPI PROC GLUTAPIENTRY wglGetProcAddress(char*);
GLUTAPI int GLUTAPIENTRY wglMakeCurrent(HDC, HGLRC);
GLUTAPI int GLUTAPIENTRY wglShareLists(HGLRC, HGLRC);
GLUTAPI int GLUTAPIENTRY wglUseFontBitmapsA(HDC, unsigned long, unsigned long, unsigned long);
GLUTAPI int GLUTAPIENTRY wglUseFontBitmapsW(HDC, unsigned long, unsigned long, unsigned long);
GLUTAPI int GLUTAPIENTRY wglUseFontOutlinesA(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
GLUTAPI int GLUTAPIENTRY wglUseFontOutlinesW(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
GLUTAPI int GLUTAPIENTRY wglDescribeLayerPlane(HDC, int, int, unsigned int,LPLAYERPLANEDESCRIPTOR);
GLUTAPI int GLUTAPIENTRY wglSetLayerPaletteEntries(HDC, int, int, int,const COLORREF *);
GLUTAPI int GLUTAPIENTRY wglGetLayerPaletteEntries(HDC, int, int, int,COLORREF *);
GLUTAPI int GLUTAPIENTRY wglRealizeLayerPalette(HDC, int, int);
GLUTAPI int GLUTAPIENTRY wglSwapLayerBuffers(HDC, unsigned int);
GLUTAPI int GLUTAPIENTRY SwapBuffers(HDC);
#endif
#else /* _WIN32 not defined */
@@ -739,6 +723,7 @@ GLUTAPI int GLUTAPIENTRY glutGameModeGet(GLenum mode);
#ifdef __cplusplus
}
#endif
#if 0

View File

@@ -23,8 +23,8 @@
/*
* $Log: glut_h.dja,v $
* Revision 1.1 1999/08/19 00:55:40 jtg
* Initial revision
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 1.1 1999/06/23 00:51:27 brianp
* initial check-in

View File

@@ -1,10 +1,10 @@
/* $Id: glx.h,v 1.5.2.3 2000/02/23 23:05:07 brianp Exp $ */
/* $Id: glx.h,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.2
* Version: 3.1
*
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
* Copyright (C) 1999 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -25,11 +25,44 @@
*/
/*
* $Log: glx.h,v $
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 3.3 1999/02/14 03:39:09 brianp
* new copyright
*
* Revision 3.2 1998/06/18 03:44:00 brianp
* replaced "uint" with "unsigned int"
*
* Revision 3.1 1998/06/01 00:00:17 brianp
* added GLX_SGI_video_sync extension
*
* Revision 3.0 1998/02/20 05:06:01 brianp
* initial rev
*
*/
#ifndef GLX_H
#define GLX_H
/*
* A pseudo-GLX implementation to allow GLX-based OpenGL programs to
* work with Mesa.
*
* Notes:
* 1. If the visual passed to glXGetConfig was not one returned by
* glXChooseVisual then the GLX_RGBA and GLX_DOUBLEBUFFER queries
* will always return True and the GLX_DEPTH_SIZE query will always
* return non-zero.
* 2. The glXIsDirect() function always returns True.
*/
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include "GL/gl.h"
@@ -121,13 +154,13 @@ enum _GLX_CONFIGS {
/*
* Compile-time extension tests
*/
#ifdef MESA
#define GLX_EXT_visual_info 1
#define GLX_MESA_pixmap_colormap 1
#define GLX_MESA_release_buffers 1
#define GLX_MESA_copy_sub_buffer 1
#define GLX_MESA_set_3dfx_mode 1
#define GLX_SGI_video_sync 1
#define GLX_ARB_get_proc_address 1
#endif
@@ -156,7 +189,7 @@ extern Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable,
GLXContext ctx);
extern void glXCopyContext( Display *dpy, GLXContext src, GLXContext dst,
unsigned long mask );
GLuint mask );
extern void glXSwapBuffers( Display *dpy, GLXDrawable drawable );
@@ -195,32 +228,29 @@ extern const char *glXGetClientString( Display *dpy, int name );
/* GLX_MESA_pixmap_colormap */
/*
* Mesa GLX Extensions
*/
#ifdef GLX_MESA_pixmap_colormap
extern GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual,
Pixmap pixmap, Colormap cmap );
#endif
/* GLX_MESA_release_buffers */
#ifdef GLX_MESA_release_buffers
extern Bool glXReleaseBuffersMESA( Display *dpy, GLXDrawable d );
#endif
/* GLX_MESA_copy_sub_buffer */
#ifdef GLX_MESA_copy_sub_buffer
extern void glXCopySubBufferMESA( Display *dpy, GLXDrawable drawable,
int x, int y, int width, int height );
#endif
/* GLX_MESA_set_3dfx_mode */
extern GLboolean glXSet3DfxModeMESA( GLint mode );
/* GLX_SGI_video_sync */
#ifdef GLX_SGI_video_sync
extern int glXGetVideoSyncSGI(unsigned int *count);
extern int glXWaitVideoSyncSGI(int divisor, int remainder,
unsigned int *count);
/* GLX_ARB_get_proc_address */
extern void (*glXGetProcAddressARB(const GLubyte *procName))();
#endif

View File

@@ -1,4 +1,4 @@
/* $Id: glx_mangle.h,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
/* $Id: glx_mangle.h,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* Mesa 3-D graphics library
@@ -23,8 +23,8 @@
/*
* $Log: glx_mangle.h,v $
* Revision 1.1 1999/08/19 00:55:40 jtg
* Initial revision
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 3.3 1999/06/21 22:01:00 brianp
* added #ifndef GLX_MANGLE_H stuff, video sync extension functions

View File

@@ -1,88 +0,0 @@
/* $Id: mesa_wgl.h,v 1.2.2.2 1999/11/22 14:05:15 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.1
*
* Copyright (C) 1999 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/* prototypes for the Mesa WGL functions */
/* relocated here so that I could make GLUT get them properly */
#ifndef _mesa_wgl_h_
#define _mesa_wgl_h_
#include <gl/gl.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _MSC_VER
# pragma warning( disable : 4615 ) /* pragma warning : unknown user warning type*/
# pragma warning( push )
# pragma warning( disable : 4273 ) /* 'function' : inconsistent DLL linkage. dllexport assumed. */
#endif
WGLAPI int GLAPIENTRY wglDeleteContext(HGLRC);
WGLAPI int GLAPIENTRY wglMakeCurrent(HDC,HGLRC);
WGLAPI int GLAPIENTRY wglSetPixelFormat(HDC, int, const PIXELFORMATDESCRIPTOR *);
WGLAPI int GLAPIENTRY wglSwapBuffers(HDC hdc);
WGLAPI HDC GLAPIENTRY wglGetCurrentDC(void);
WGLAPI HGLRC GLAPIENTRY wglCreateContext(HDC);
WGLAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC,int);
WGLAPI HGLRC GLAPIENTRY wglGetCurrentContext(void);
WGLAPI PROC GLAPIENTRY wglGetProcAddress(const char*);
WGLAPI int GLAPIENTRY wglChoosePixelFormat(HDC, const PIXELFORMATDESCRIPTOR *);
WGLAPI int GLAPIENTRY wglCopyContext(HGLRC, HGLRC, unsigned int);
WGLAPI int GLAPIENTRY wglDeleteContext(HGLRC);
WGLAPI int GLAPIENTRY wglDescribeLayerPlane(HDC, int, int, unsigned int,LPLAYERPLANEDESCRIPTOR);
WGLAPI int GLAPIENTRY wglDescribePixelFormat(HDC,int, unsigned int, LPPIXELFORMATDESCRIPTOR);
WGLAPI int GLAPIENTRY wglGetLayerPaletteEntries(HDC, int, int, int,COLORREF *);
WGLAPI int GLAPIENTRY wglGetPixelFormat(HDC hdc);
WGLAPI int GLAPIENTRY wglMakeCurrent(HDC, HGLRC);
WGLAPI int GLAPIENTRY wglRealizeLayerPalette(HDC, int, int);
WGLAPI int GLAPIENTRY wglSetLayerPaletteEntries(HDC, int, int, int,const COLORREF *);
WGLAPI int GLAPIENTRY wglShareLists(HGLRC, HGLRC);
WGLAPI int GLAPIENTRY wglSwapLayerBuffers(HDC, unsigned int);
WGLAPI int GLAPIENTRY wglUseFontBitmapsA(HDC, unsigned long, unsigned long, unsigned long);
WGLAPI int GLAPIENTRY wglUseFontBitmapsW(HDC, unsigned long, unsigned long, unsigned long);
WGLAPI int GLAPIENTRY wglUseFontOutlinesA(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
WGLAPI int GLAPIENTRY wglUseFontOutlinesW(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
WGLAPI int GLAPIENTRY SwapBuffers(HDC);
WGLAPI int GLAPIENTRY ChoosePixelFormat(HDC,const PIXELFORMATDESCRIPTOR *);
WGLAPI int GLAPIENTRY DescribePixelFormat(HDC,int,unsigned int,LPPIXELFORMATDESCRIPTOR);
WGLAPI int GLAPIENTRY GetPixelFormat(HDC);
WGLAPI int GLAPIENTRY SetPixelFormat(HDC,int,const PIXELFORMATDESCRIPTOR *);
#ifdef _MSC_VER
# pragma warning( pop )
#endif
#ifdef __cplusplus
}
#endif
#endif /* _mesa_wgl_h_ */

View File

@@ -6,7 +6,7 @@
* All rights reserved.
*
* Filename: $Workfile: mglmesa.h $
* Version: $Revision: 1.1 $
* Version: $Revision: 1.1.1.1 $
*
* Language: ANSI C
* Environment: Any

View File

@@ -1,10 +1,10 @@
/* $Id: osmesa.h,v 1.1.1.1.2.2 2000/02/09 18:53:55 brianp Exp $ */
/* $Id: osmesa.h,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.2
* Version: 3.1
*
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
* Copyright (C) 1999 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -25,6 +25,26 @@
*/
/*
* $Log: osmesa.h,v $
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 1.4 1999/02/14 03:39:09 brianp
* new copyright
*
* Revision 1.3 1999/01/03 02:52:30 brianp
* now using GLAPI and GLAPIENTRY keywords (Ted Jump)
*
* Revision 1.2 1998/07/26 01:33:51 brianp
* added WINGDIAPI and APIENTRY keywords per Ted Jump
*
* Revision 1.1 1998/02/13 03:17:50 brianp
* Initial revision
*
*/
/*
* Mesa Off-Screen rendering interface.
*
@@ -66,7 +86,7 @@ extern "C" {
#define OSMESA_MAJOR_VERSION 3
#define OSMESA_MINOR_VERSION 2
#define OSMESA_MINOR_VERSION 0

View File

@@ -1,9 +1,9 @@
/* $Id: svgamesa.h,v 1.1.1.1.2.2 2000/01/22 19:58:02 brianp Exp $ */
/* $Id: svgamesa.h,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.2
* Copyright (C) 1995-2000 Brian Paul
* Version: 3.0
* Copyright (C) 1995-1998 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -21,6 +21,18 @@
*/
/*
* $Log: svgamesa.h,v $
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 3.0 1998/02/20 05:07:24 brianp
* initial rev
*
*/
/*
* SVGA/Mesa interface for Linux.
*/
@@ -53,7 +65,7 @@
#define SVGAMESA_MAJOR_VERSION 3
#define SVGAMESA_MINOR_VERSION 2
#define SVGAMESA_MINOR_VERSION 0
#ifdef __cplusplus
@@ -75,21 +87,16 @@ typedef struct svgamesa_context *SVGAMesaContext;
/*
* doubleBuffer flag new in version 2.4
*/
extern int SVGAMesaInit( int GraphMode );
extern int SVGAMesaClose( void );
extern SVGAMesaContext SVGAMesaCreateContext( GLboolean doubleBuffer );
extern void SVGAMesaDestroyContext( SVGAMesaContext ctx );
extern void SVGAMesaMakeCurrent( SVGAMesaContext ctx );
extern SVGAMesaContext SVGAMesaGetCurrentContext( void );
extern void SVGAMesaSwapBuffers( void );
extern void SVGAMesaSetCI(int ndx, GLubyte red, GLubyte green, GLubyte blue);
extern SVGAMesaContext SVGAMesaGetCurrentContext( void );
#ifdef __cplusplus
}

View File

@@ -1,4 +1,4 @@
/* $Id: wmesa.h,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
/* $Id: wmesa.h,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* Mesa 3-D graphics library
@@ -24,8 +24,8 @@
/*
* $Log: wmesa.h,v $
* Revision 1.1 1999/08/19 00:55:40 jtg
* Initial revision
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 3.2 1999/01/03 02:54:45 brianp
* updated per Ted Jump

View File

@@ -1,10 +1,10 @@
/* $Id: xmesa.h,v 1.1.1.1.2.3 2000/02/09 18:53:55 brianp Exp $ */
/* $Id: xmesa.h,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.2
* Version: 3.1
*
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
* Copyright (C) 1999 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -25,6 +25,23 @@
*/
/*
* $Log: xmesa.h,v $
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 1.3 1999/02/24 22:43:27 jens
* Name changes to get XMesa to compile standalone inside XFree86
*
* Revision 1.2 1999/02/14 03:39:09 brianp
* new copyright
*
* Revision 1.1 1998/02/13 03:17:32 brianp
* Initial revision
*
*/
/*
* Mesa/X11 interface. This header file serves as the documentation for
* the Mesa/X11 interface functions.
@@ -79,9 +96,6 @@ extern "C" {
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include "xmesa_x.h"
#ifdef GLX_DIRECT_RENDERING
#include "dri_mesa.h"
#endif
#endif
#include "GL/gl.h"
@@ -92,7 +106,7 @@ extern struct Library *XLibBase;
#define XMESA_MAJOR_VERSION 3
#define XMESA_MINOR_VERSION 2
#define XMESA_MINOR_VERSION 0
@@ -117,17 +131,7 @@ typedef struct xmesa_visual *XMesaVisual;
typedef struct xmesa_buffer *XMesaBuffer;
#if defined(GLX_DIRECT_RENDERING) && !defined(XFree86Server)
/*
* Initialize the XMesa driver.
*/
extern GLboolean XMesaInitDriver( __DRIscreenPrivate *driScrnPriv );
/*
* Reset the XMesa driver when the X server resets.
*/
extern void XMesaResetDriver( __DRIscreenPrivate *driScrnPriv );
#endif
/*
@@ -175,11 +179,7 @@ extern void XMesaDestroyVisual( XMesaVisual v );
* Return: an XMesaContext or NULL if error.
*/
extern XMesaContext XMesaCreateContext( XMesaVisual v,
XMesaContext share_list
#if defined(GLX_DIRECT_RENDERING) && !defined(XFree86Server)
, __DRIcontextPrivate *driContextPriv
#endif
);
XMesaContext share_list );
/*
@@ -192,12 +192,7 @@ extern void XMesaDestroyContext( XMesaContext c );
* Create an XMesaBuffer from an X window.
*/
extern XMesaBuffer XMesaCreateWindowBuffer( XMesaVisual v,
XMesaWindow w
#if defined(GLX_DIRECT_RENDERING) && !defined(XFree86Server)
, __DRIdrawablePrivate *driDrawPriv
#endif
);
XMesaWindow w );
/*
@@ -205,12 +200,7 @@ extern XMesaBuffer XMesaCreateWindowBuffer( XMesaVisual v,
*/
extern XMesaBuffer XMesaCreatePixmapBuffer( XMesaVisual v,
XMesaPixmap p,
XMesaColormap cmap
#if defined(GLX_DIRECT_RENDERING) && !defined(XFree86Server)
, __DRIdrawablePrivate *driDrawPriv
#endif
);
XMesaColormap cmap );
/*

View File

@@ -30,7 +30,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* Authors:
* Kevin E. Martin <kevin@precisioninsight.com>
*
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/include/GL/xmesa_x.h,v 1.1 1999/08/19 00:55:40 jtg Exp $
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/include/GL/xmesa_x.h,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $
*/
#ifndef _XMESA_X_H_

View File

@@ -30,7 +30,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* Authors:
* Kevin E. Martin <kevin@precisioninsight.com>
*
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/include/GL/xmesa_xf86.h,v 1.1.1.1.2.1 1999/12/13 21:54:19 brianp Exp $
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/include/GL/xmesa_xf86.h,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $
*/
#ifndef _XMESA_XF86_H_
@@ -52,29 +52,29 @@ typedef DDXPointRec XMesaPoint;
typedef xColorItem XMesaColor;
#define XMesaSetGeneric(__d,__gc,__val,__mask) \
do { \
{ \
CARD32 __v[1]; \
(void) __d; \
__v[0] = __val; \
dixChangeGC(NullClient, __gc, __mask, __v, NULL); \
} while (0)
}
#define XMesaSetGenericPtr(__d,__gc,__pval,__mask) \
do { \
{ \
ChangeGCVal __v[1]; \
(void) __d; \
__v[0].ptr = __pval; \
dixChangeGC(NullClient, __gc, __mask, NULL, __v); \
} while (0)
}
#define XMesaSetDashes(__d,__gc,__do,__dl,__n) \
do { \
{ \
(void) __d; \
SetDashes(__gc, __do, __n, (unsigned char *)__dl); \
} while (0)
}
#define XMesaSetLineAttributes(__d,__gc,__lw,__ls,__cs,__js) \
do { \
{ \
CARD32 __v[4]; \
(void) __d; \
__v[0] = __lw; \
@@ -84,7 +84,7 @@ do { \
dixChangeGC(NullClient, __gc, \
GCLineWidth|GCLineStyle|GCCapStyle|GCJoinStyle, \
__v, NULL); \
} while (0)
}
#define XMesaSetForeground(d,gc,v) XMesaSetGeneric(d,gc,v,GCForeground)
#define XMesaSetBackground(d,gc,v) XMesaSetGeneric(d,gc,v,GCBackground)
@@ -96,24 +96,24 @@ do { \
#define XMesaSetStipple(d,gc,v) XMesaSetGenericPtr(d,gc,v,GCStipple)
#define XMesaDrawPoint(__d,__b,__gc,__x,__y) \
do { \
{ \
XMesaPoint __p[1]; \
(void) __d; \
__p[0].x = __x; \
__p[0].y = __y; \
ValidateGC(__b, __gc); \
(*gc->ops->PolyPoint)(__b, __gc, CoordModeOrigin, 1, __p); \
} while (0)
}
#define XMesaDrawPoints(__d,__b,__gc,__p,__n,__m) \
do { \
{ \
(void) __d; \
ValidateGC(__b, __gc); \
(*gc->ops->PolyPoint)(__b, __gc, __m, __n, __p); \
} while (0)
}
#define XMesaDrawLine(__d,__b,__gc,__x0,__y0,__x1,__y1) \
do { \
{ \
XMesaPoint __p[2]; \
(void) __d; \
ValidateGC(__b, __gc); \
@@ -122,10 +122,10 @@ do { \
__p[1].x = __x1; \
__p[1].y = __y1; \
(*__gc->ops->Polylines)(__b, __gc, CoordModeOrigin, 2, __p); \
} while (0)
}
#define XMesaFillRectangle(__d,__b,__gc,__x,__y,__w,__h) \
do { \
{ \
xRectangle __r[1]; \
(void) __d; \
ValidateGC(__b, __gc); \
@@ -134,10 +134,10 @@ do { \
__r[0].width = __w; \
__r[0].height = __h; \
(*__gc->ops->PolyFillRect)(__b, __gc, 1, __r); \
} while (0)
}
#define XMesaPutImage(__d,__b,__gc,__i,__sx,__sy,__x,__y,__w,__h) \
do { \
{ \
/* Assumes: Images are always in ZPixmap format */ \
(void) __d; \
if (__sx || __sy) /* The non-trivial case */ \
@@ -146,22 +146,22 @@ do { \
(*__gc->ops->PutImage)(__b, __gc, ((XMesaDrawable)(__b))->depth, \
__x, __y, __w, __h, 0, ZPixmap, \
((XMesaImage *)(__i))->data); \
} while (0)
}
#define XMesaCopyArea(__d,__sb,__db,__gc,__sx,__sy,__w,__h,__x,__y) \
do { \
{ \
(void) __d; \
ValidateGC(__db, __gc); \
(*__gc->ops->CopyArea)((DrawablePtr)__sb, __db, __gc, \
__sx, __sy, __w, __h, __x, __y); \
} while (0)
}
#define XMesaFillPolygon(__d,__b,__gc,__p,__n,__s,__m) \
do { \
{ \
(void) __d; \
ValidateGC(__b, __gc); \
(*__gc->ops->FillPolygon)(__b, __gc, __s, __m, __n, __p); \
} while (0)
}
/* CreatePixmap returns a PixmapPtr; so, it cannot be inside braces */
#define XMesaCreatePixmap(__d,__b,__w,__h,__depth) \
@@ -170,10 +170,10 @@ do { \
(*__d->DestroyPixmap)(__b)
#define XMesaFreeGC(__d,__gc) \
do { \
{ \
(void) __d; \
FreeScratchGC(__gc); \
} while (0)
}
#define GET_COLORMAP_SIZE(__v) __v->visinfo->ColormapEntries
#define GET_REDMASK(__v) __v->visinfo->redMask

View File

@@ -1,4 +1,4 @@
# $Id: Makefile,v 1.2 1999/09/17 00:55:21 brianp Exp $
# $Id: Makefile,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $
# Makefile for BeOS demos
@@ -11,7 +11,7 @@ CC = g++
# Use Mesa:
CFLAGS = -I../include -c -g
LFLAGS = -L../lib -Xlinker -rpath ../lib -lbe -lGL
LFLAGS = -L../lib -Xlinker -rpath ../lib -lbe -lMesaGL
# Use BeOS OpenGL:
#CFLAGS = -I/boot/develop/headers/be/opengl -c -g

View File

@@ -1,4 +1,4 @@
// $Id: demo.cpp,v 1.1 1999/08/19 00:55:40 jtg Exp $
// $Id: demo.cpp,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $
// Simple BeOS GLView demo
// Written by Brian Paul

View File

@@ -1,23 +1,59 @@
# $Id: Makefile.BeOS-R4,v 1.3 1999/10/22 20:36:38 brianp Exp $
# $Id: Makefile.BeOS-R4,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $
# Mesa 3-D graphics library
# Version: 3.1
# Copyright (C) 1995-1999 Brian Paul
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# Makefile for GLUT-based demo programs for BeOS R4
# $Log: Makefile.BeOS-R4,v $
# Revision 1.1.1.1 1999/08/19 00:55:40 jtg
# Imported sources
#
# Revision 1.5 1999/06/22 12:50:11 brianp
# removed multitex demo
#
# Revision 1.4 1999/02/03 03:57:26 brianp
# replace multiext with multiarb
#
# Revision 1.3 1999/02/02 04:47:45 brianp
# removed glutfx from targets
#
# Revision 1.2 1999/02/02 04:46:23 brianp
# removed tessdemo from targets
#
# Revision 1.1 1999/02/02 04:43:27 brianp
# Initial revision
#
##### MACROS #####
INCDIR = ../include
LIBDIR = ../lib
GL_LIBS = -L$(LIBDIR) -L/boot/home/config/lib -Xlinker -rpath $(LIBDIR) -lbe -lglut -lGLU -lGL $(XLIBS)
GL_LIBS = -L$(LIBDIR) -L/boot/home/config/lib -Xlinker -rpath $(LIBDIR) -lbe -lglut -lMesaGLU -lMesaGL $(XLIBS)
LIB_DEP = $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(GLU_LIB) $(LIBDIR)/$(GLUT_LIB)
PROGS = bounce clearspd drawpix gamma gears glinfo gloss isosurf \
PROGS = bounce clearspd drawpix gamma gears glinfo isosurf \
morph3d multiarb osdemo paltex pointblast reflect \
renormal spectex stex3d texcyl texobj trispd winpos

View File

@@ -1,4 +1,4 @@
# $Id: Makefile.X11,v 1.3 1999/10/27 10:09:53 brianp Exp $
# $Id: Makefile.X11,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $
# Mesa 3-D graphics library
# Version: 3.1
@@ -13,13 +13,13 @@
INCDIR = ../include
LIBDIR = ../lib
GL_LIBS = -L$(LIBDIR) -lglut -lGLU -lGL $(XLIBS)
GL_LIBS = -L$(LIBDIR) -lglut -lGLU -lGL -lm $(XLIBS)
LIB_DEP = $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(GLU_LIB) $(LIBDIR)/$(GLUT_LIB)
PROGS = bounce clearspd drawpix gamma gears glinfo gloss glutfx isosurf \
PROGS = bounce clearspd drawpix gamma gears glinfo glutfx isosurf \
morph3d multiarb osdemo paltex pointblast reflect \
renormal spectex stex3d tessdemo texcyl texobj trispd winpos \
renormal spectex stex3d tessdemo texcyl texobj trispd winpos
##### RULES #####

View File

@@ -1,13 +1,37 @@
# $Id: Makefile.cygnus,v 1.2 1999/10/22 20:37:23 brianp Exp $
# Mesa 3-D graphics library
# Version: 3.1
# Copyright (C) 1995-1999 Brian Paul
# Makefile for demo programs for cygnus
# Makefile for demo programs
# Stephane Rehel (rehel@worldnet.fr) April 13 1997
# Mesa 3-D graphics library
# Version: 3.0
# Copyright (C) 1995-1998 Brian Paul
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# $Id: Makefile.cygnus,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $
# $Log: Makefile.cygnus,v $
# Revision 1.1.1.1 1999/08/19 00:55:40 jtg
# Imported sources
#
# Revision 3.1 1999/06/22 12:50:29 brianp
# removed multitex demo
#
# Revision 3.0 1998/06/10 02:55:51 brianp
# initial revision
#
##### MACROS #####
@@ -19,7 +43,7 @@ GL_LIBS = -L$(LIBDIR) -lglut -lMesaGLU -lMesaGL -lm $(WLIBS)
LIB_DEP = $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(GLU_LIB) $(LIBDIR)/$(GLUT_LIB)
PROGS = clearspd drawpix gamma gears glinfo glutfx gloss isosurf \
PROGS = clearspd drawpix gamma gears glinfo glutfx isosurf \
morph3d multiext osdemo paltex pointblast reflect \
renormal spectex stex3d tessdemo texcyl texobj trispd winpos

View File

@@ -1,4 +1,4 @@
/* $Id: bounce.c,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
/* $Id: bounce.c,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* Bouncing ball demo. Color index mode only!
@@ -12,8 +12,8 @@
/*
* $Log: bounce.c,v $
* Revision 1.1 1999/08/19 00:55:40 jtg
* Initial revision
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 3.3 1999/03/18 08:16:14 joukj
*

View File

@@ -1,4 +1,4 @@
/* $Id: clearspd.c,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
/* $Id: clearspd.c,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* Simple GLUT program to measure glClear() and glutSwapBuffers() speed.
@@ -7,8 +7,8 @@
/*
* $Log: clearspd.c,v $
* Revision 1.1 1999/08/19 00:55:40 jtg
* Initial revision
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 3.3 1999/03/28 18:18:33 brianp
* minor clean-up

View File

@@ -1,4 +1,4 @@
/* $Id: drawpix.c,v 1.3 1999/10/28 18:23:29 brianp Exp $ */
/* $Id: drawpix.c,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* glDrawPixels demo/test/benchmark
@@ -8,12 +8,6 @@
/*
* $Log: drawpix.c,v $
* Revision 1.3 1999/10/28 18:23:29 brianp
* minor changes to Usage() function
*
* Revision 1.2 1999/10/21 22:13:58 brianp
* added f key to toggle front/back drawing
*
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
@@ -50,7 +44,6 @@ static int SkipPixels, SkipRows;
static int DrawWidth, DrawHeight;
static int Scissor = 0;
static float Xzoom, Yzoom;
static GLboolean DrawFront = GL_FALSE;
@@ -89,8 +82,7 @@ static void Display( void )
glDisable(GL_SCISSOR_TEST);
if (!DrawFront)
glutSwapBuffers();
glutSwapBuffers();
}
@@ -108,11 +100,6 @@ static void Benchmark( void )
if (Scissor)
glEnable(GL_SCISSOR_TEST);
if (DrawFront)
glDrawBuffer(GL_FRONT);
else
glDrawBuffer(GL_BACK);
/* Run timing test */
draws = 0;
startTime = glutGet(GLUT_ELAPSED_TIME);
@@ -200,14 +187,6 @@ static void Key( unsigned char key, int x, int y )
case 'b':
Benchmark();
break;
case 'f':
DrawFront = !DrawFront;
if (DrawFront)
glDrawBuffer(GL_FRONT);
else
glDrawBuffer(GL_BACK);
printf("glDrawBuffer(%s)\n", DrawFront ? "GL_FRONT" : "GL_BACK");
break;
case 27:
exit(0);
break;
@@ -279,27 +258,20 @@ static void Init( GLboolean ciMode )
static void Usage(void)
{
printf("Keys:\n");
printf(" SPACE Reset Parameters\n");
printf(" SPACE Reset\n");
printf(" Up/Down Move image up/down\n");
printf(" Left/Right Move image left/right\n");
printf(" x Decrease X-axis PixelZoom\n");
printf(" X Increase X-axis PixelZoom\n");
printf(" y Decrease Y-axis PixelZoom\n");
printf(" Y Increase Y-axis PixelZoom\n");
printf(" w Decrease glDrawPixels width*\n");
printf(" W Increase glDrawPixels width*\n");
printf(" h Decrease glDrawPixels height*\n");
printf(" H Increase glDrawPixels height*\n");
printf(" p Decrease GL_UNPACK_SKIP_PIXELS*\n");
printf(" P Increase GL_UNPACK_SKIP_PIXELS*\n");
printf(" r Decrease GL_UNPACK_SKIP_ROWS*\n");
printf(" R Increase GL_UNPACK_SKIP_ROWS*\n");
printf(" w Decrease glDrawPixels width\n");
printf(" W Increase glDrawPixels width\n");
printf(" h Decrease glDrawPixels height\n");
printf(" H Increase glDrawPixels height\n");
printf(" p Decrease GL_UNPACK_SKIP_PIXELS\n");
printf(" P Increase GL_UNPACK_SKIP_PIXELS\n");
printf(" r Decrease GL_UNPACK_SKIP_ROWS\n");
printf(" R Increase GL_UNPACK_SKIP_ROWS\n");
printf(" s Toggle GL_SCISSOR_TEST\n");
printf(" f Toggle front/back buffer drawing\n");
printf(" b Benchmark test\n");
printf(" ESC Exit\n");
printf("* Warning: no limits are imposed on these parameters so it's\n");
printf(" possible to cause a segfault if you go too far.\n");
}

View File

@@ -1,5 +1,5 @@
/* $Id: gamma.c,v 1.1.1.1.2.1 2000/03/18 01:14:01 brianp Exp $ */
/* $Id: gamma.c,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/* Draw test patterns to help determine correct gamma value for a display.
When the intensities of the inner squares nearly match the intensities
@@ -25,12 +25,6 @@
/*
* $Log: gamma.c,v $
* Revision 1.1.1.1.2.1 2000/03/18 01:14:01 brianp
* colors were computed incorrectly (Hans Nelles)
*
* Revision 1.2 2000/03/18 01:13:29 brianp
* colors were computed incorrectly (Hans Nelles)
*
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
@@ -136,9 +130,8 @@ gamma_ramp(GLfloat yoffs, GLfloat r, GLfloat g, GLfloat b)
for(d = 1; d < 4; d++) { /* increasing density from 25% to 75% */
GLfloat xcoord = (-1.0 + d*0.4);
GLfloat t = d * 0.25;
glColor3f(r*t, g*t, b*t); /* draw outer rect */
glColor3f(r*d / 5.0, g*d / 5.0, b*d / 5.0); /* draw outer rect */
glRectf(xcoord, yoffs, xcoord+0.4, yoffs + 0.5);
glColor3f(0.0, 0.0, 0.0); /* "clear" inner rect */

View File

@@ -1,12 +1,8 @@
/* $Id: gears.c,v 1.2 1999/10/21 16:39:06 brianp Exp $ */
/* $Id: gears.c,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* 3-D gear wheels. This program is in the public domain.
*
* Command line options:
* -info print GL implementation information
*
*
* Brian Paul
*/
@@ -14,9 +10,6 @@
/*
* $Log: gears.c,v $
* Revision 1.2 1999/10/21 16:39:06 brianp
* added -info command line option
*
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
@@ -35,7 +28,6 @@
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <GL/glut.h>
#ifndef M_PI
@@ -295,7 +287,7 @@ reshape(int width, int height)
}
static void
init(int argc, char *argv[])
init(void)
{
static GLfloat pos[4] =
{5.0, 5.0, 10.0, 0.0};
@@ -332,13 +324,6 @@ init(int argc, char *argv[])
glEndList();
glEnable(GL_NORMALIZE);
if (argc > 1 && strcmp(argv[1], "-info")==0) {
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS));
}
}
void
@@ -358,7 +343,7 @@ int main(int argc, char *argv[])
glutInitWindowPosition(0, 0);
glutInitWindowSize(300, 300);
glutCreateWindow("Gears");
init(argc, argv);
init();
glutDisplayFunc(draw);
glutReshapeFunc(reshape);

View File

@@ -1,4 +1,4 @@
/* $Id: glinfo.c,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
/* $Id: glinfo.c,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* Print GL, GLU and GLUT version and extension info
@@ -10,8 +10,8 @@
/*
* $Log: glinfo.c,v $
* Revision 1.1 1999/08/19 00:55:40 jtg
* Initial revision
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 3.2 1999/02/02 04:45:49 brianp
* include stdio.h before glut.h

View File

@@ -1,373 +0,0 @@
/* $Id: gloss.c,v 1.3 1999/10/26 17:08:31 brianp Exp $ */
/*
* Specular reflection demo. The specular highlight is modulated by
* a sphere-mapped texture. The result is a high-gloss surface.
* NOTE: you really need hardware acceleration for this.
* Also note, this technique can't be implemented with multi-texture
* and separate specular color interpolation because there's no way
* to indicate that the second texture unit (the reflection map)
* should modulate the specular color and not the base color.
* A future multi-texture extension could fix that.
*
* Command line options:
* -info print GL implementation information
*
*
* Brian Paul October 22, 1999 This program is in the public domain.
*/
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <GL/glut.h>
#include "../util/readtex.c" /* I know, this is a hack. */
#define SPECULAR_TEXTURE_FILE "../images/reflect.rgb"
#define BASE_TEXTURE_FILE "../images/tile.rgb"
/* Menu items */
#define DO_SPEC_TEXTURE 1
#define OBJECT 2
#define ANIMATE 3
#define QUIT 100
static GLuint CylinderObj = 0;
static GLuint TeapotObj = 0;
static GLuint Object = 0;
static GLboolean Animate = GL_TRUE;
static GLfloat Xrot = 0.0, Yrot = 0.0, Zrot = 0.0;
static GLfloat DXrot = 1.0, DYrot = 2.5;
static GLfloat Black[4] = { 0, 0, 0, 0 };
static GLfloat White[4] = { 1, 1, 1, 1 };
static GLfloat Diffuse[4] = { .3, .3, 1.0, 1.0 }; /* blue */
static GLfloat Shininess = 15;
static GLuint BaseTexture, SpecularTexture;
static GLboolean DoSpecTexture = GL_TRUE;
/* performance info */
static GLint T0 = 0;
static GLint Frames = 0;
static void Idle( void )
{
if (Animate) {
Xrot += DXrot;
Yrot += DYrot;
glutPostRedisplay();
}
}
static void Display( void )
{
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
glPushMatrix();
glRotatef(Xrot, 1.0, 0.0, 0.0);
glRotatef(Yrot, 0.0, 1.0, 0.0);
glRotatef(Zrot, 0.0, 0.0, 1.0);
/* First pass: diffuse lighting with base texture */
glMaterialfv(GL_FRONT, GL_DIFFUSE, Diffuse);
glMaterialfv(GL_FRONT, GL_SPECULAR, Black);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, BaseTexture);
glCallList(Object);
/* Second pass: specular lighting with reflection texture */
glBlendFunc(GL_ONE, GL_ONE); /* add */
glEnable(GL_BLEND);
glDepthFunc(GL_LEQUAL);
glMaterialfv(GL_FRONT, GL_DIFFUSE, Black);
glMaterialfv(GL_FRONT, GL_SPECULAR, White);
if (DoSpecTexture) {
glBindTexture(GL_TEXTURE_2D, SpecularTexture);
glEnable(GL_TEXTURE_GEN_S);
glEnable(GL_TEXTURE_GEN_T);
}
else {
glDisable(GL_TEXTURE_2D);
}
glCallList(Object);
glDisable(GL_TEXTURE_GEN_S);
glDisable(GL_TEXTURE_GEN_T);
glDisable(GL_BLEND);
glPopMatrix();
glutSwapBuffers();
if (Animate) {
GLint t = glutGet(GLUT_ELAPSED_TIME);
Frames++;
if (t - T0 >= 5000) {
GLfloat seconds = (t - T0) / 1000.0;
GLfloat fps = Frames / seconds;
printf("%d frames in %g seconds = %g FPS\n", Frames, seconds, fps);
T0 = t;
Frames = 0;
}
}
}
static void Reshape( int width, int height )
{
GLfloat h = 30.0;
GLfloat w = h * width / height;
glViewport( 0, 0, width, height );
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glFrustum( -w, w, -h, h, 150.0, 500.0 );
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
glTranslatef( 0.0, 0.0, -380.0 );
}
static void ToggleAnimate(void)
{
Animate = !Animate;
if (Animate) {
glutIdleFunc( Idle );
T0 = glutGet(GLUT_ELAPSED_TIME);
Frames = 0;
}
else {
glutIdleFunc( NULL );
}
}
static void ModeMenu(int entry)
{
if (entry==ANIMATE) {
ToggleAnimate();
}
else if (entry==DO_SPEC_TEXTURE) {
DoSpecTexture = !DoSpecTexture;
}
else if (entry==OBJECT) {
if (Object == TeapotObj)
Object = CylinderObj;
else
Object = TeapotObj;
}
else if (entry==QUIT) {
exit(0);
}
glutPostRedisplay();
}
static void Key( unsigned char key, int x, int y )
{
(void) x;
(void) y;
switch (key) {
case 's':
Shininess--;
if (Shininess < 0.0)
Shininess = 0.0;
glMaterialf(GL_FRONT, GL_SHININESS, Shininess);
printf("Shininess = %g\n", Shininess);
break;
case 'S':
Shininess++;
if (Shininess > 128.0)
Shininess = 128.0;
glMaterialf(GL_FRONT, GL_SHININESS, Shininess);
printf("Shininess = %g\n", Shininess);
break;
case ' ':
ToggleAnimate();
break;
case 27:
exit(0);
break;
}
glutPostRedisplay();
}
static void SpecialKey( int key, int x, int y )
{
float step = 3.0;
(void) x;
(void) y;
switch (key) {
case GLUT_KEY_UP:
Xrot += step;
break;
case GLUT_KEY_DOWN:
Xrot -= step;
break;
case GLUT_KEY_LEFT:
Yrot += step;
break;
case GLUT_KEY_RIGHT:
Yrot -= step;
break;
}
glutPostRedisplay();
}
static void Init( int argc, char *argv[] )
{
/* Cylinder object */
{
static GLfloat height = 100.0;
static GLfloat radius = 40.0;
static GLint slices = 24; /* pie slices around Z axis */
static GLint stacks = 10; /* subdivisions along length of cylinder */
static GLint rings = 4; /* rings in the end disks */
GLUquadricObj *q = gluNewQuadric();
assert(q);
gluQuadricTexture(q, GL_TRUE);
CylinderObj = glGenLists(1);
glNewList(CylinderObj, GL_COMPILE);
glPushMatrix();
glTranslatef(0.0, 0.0, -0.5 * height);
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glScalef(8.0, 4.0, 2.0);
glMatrixMode(GL_MODELVIEW);
/* cylinder */
gluQuadricNormals(q, GL_SMOOTH);
gluQuadricTexture(q, GL_TRUE);
gluCylinder(q, radius, radius, height, slices, stacks);
/* end cap */
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glScalef(3.0, 3.0, 1.0);
glMatrixMode(GL_MODELVIEW);
glTranslatef(0.0, 0.0, height);
gluDisk(q, 0.0, radius, slices, rings);
/* other end cap */
glTranslatef(0.0, 0.0, -height);
gluQuadricOrientation(q, GLU_INSIDE);
gluDisk(q, 0.0, radius, slices, rings);
glPopMatrix();
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glMatrixMode(GL_MODELVIEW);
glEndList();
gluDeleteQuadric(q);
}
/* Teapot */
{
TeapotObj = glGenLists(1);
glNewList(TeapotObj, GL_COMPILE);
glFrontFace(GL_CW);
glutSolidTeapot(40.0);
glFrontFace(GL_CCW);
glEndList();
}
/* show cylinder by default */
Object = CylinderObj;
/* lighting */
glEnable(GL_LIGHTING);
{
GLfloat pos[4] = { 3, 3, 3, 1 };
glLightfv(GL_LIGHT0, GL_AMBIENT, Black);
glLightfv(GL_LIGHT0, GL_DIFFUSE, White);
glLightfv(GL_LIGHT0, GL_SPECULAR, White);
glLightfv(GL_LIGHT0, GL_POSITION, pos);
glEnable(GL_LIGHT0);
glMaterialfv(GL_FRONT, GL_AMBIENT, Black);
glMaterialf(GL_FRONT, GL_SHININESS, Shininess);
glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, 1);
}
/* Base texture */
glGenTextures(1, &BaseTexture);
glBindTexture(GL_TEXTURE_2D, BaseTexture);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
if (!LoadRGBMipmaps(BASE_TEXTURE_FILE, GL_RGB)) {
printf("Error: couldn't load texture image file %s\n", BASE_TEXTURE_FILE);
exit(1);
}
/* Specular texture */
glGenTextures(1, &SpecularTexture);
glBindTexture(GL_TEXTURE_2D, SpecularTexture);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
if (!LoadRGBMipmaps(SPECULAR_TEXTURE_FILE, GL_RGB)) {
printf("Error: couldn't load texture image file %s\n", SPECULAR_TEXTURE_FILE);
exit(1);
}
/* misc */
glEnable(GL_CULL_FACE);
glEnable(GL_TEXTURE_2D);
glEnable(GL_DEPTH_TEST);
glEnable(GL_NORMALIZE);
if (argc > 1 && strcmp(argv[1], "-info")==0) {
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS));
}
}
int main( int argc, char *argv[] )
{
glutInit( &argc, argv );
glutInitWindowSize( 500, 500 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0] );
Init(argc, argv);
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
glutDisplayFunc( Display );
glutIdleFunc( Idle );
glutCreateMenu(ModeMenu);
glutAddMenuEntry("Toggle Highlight", DO_SPEC_TEXTURE);
glutAddMenuEntry("Toggle Object", OBJECT);
glutAddMenuEntry("Toggle Animate", ANIMATE);
glutAddMenuEntry("Quit", QUIT);
glutAttachMenu(GLUT_RIGHT_BUTTON);
glutMainLoop();
return 0;
}

View File

@@ -1,4 +1,4 @@
/* $Id: glutfx.c,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
/* $Id: glutfx.c,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* Example of how one might use GLUT with the 3Dfx driver in full-screen mode.
@@ -16,8 +16,8 @@
/*
* $Log: glutfx.c,v $
* Revision 1.1 1999/08/19 00:55:40 jtg
* Initial revision
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 3.2 1999/03/28 18:18:33 brianp
* minor clean-up

View File

@@ -1,40 +1,15 @@
/* $Id: isosurf.c,v 1.4 1999/10/21 16:39:06 brianp Exp $ */
/* $Id: isosurf.c,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* Display an isosurface of 3-D wind speed volume.
*
* Command line options:
* -info print GL implementation information
*
* Display an isosurface of 3-D wind speed volume. Use arrow keys to
* rotate, S toggles smooth shading, L toggles lighting
* Brian Paul This file in public domain.
*/
/* Keys:
* =====
*
* - Arrow keys to rotate
* - 's' toggles smooth shading
* - 'l' toggles lighting
* - 'f' toggles fog
* - 'I' and 'i' zoom in and out
* - 'c' toggles a user clip plane
* - 'm' toggles colorful materials in GL_TRIANGLES modes.
* - '+' and '-' move the user clip plane
*
* Other options are available via the popup menu.
*/
/*
* $Log: isosurf.c,v $
* Revision 1.4 1999/10/21 16:39:06 brianp
* added -info command line option
*
* Revision 1.3 1999/09/08 22:14:31 brianp
* minor changes. always call compactify_arrays()
*
* Revision 1.2 1999/09/03 14:56:40 keithw
* Fog, displaylist and zoom operations
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 3.4 1999/04/24 01:10:47 keithw
* clip planes, materials
@@ -55,7 +30,6 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "GL/glut.h"
@@ -70,11 +44,11 @@
#define NO_REFLECT 0x20
#define POINT_FILTER 0x40
#define LINEAR_FILTER 0x80
#define GLVERTEX 0x100
#define IMMEDIATE 0x100
#define DRAW_ARRAYS 0x200 /* or draw_elts, if compiled */
#define ARRAY_ELT 0x400
#define COMPILED 0x800
#define IMMEDIATE 0x1000
#define NOT_COMPILED 0x1000
#define SHADE_SMOOTH 0x2000
#define SHADE_FLAT 0x4000
#define TRIANGLES 0x8000
@@ -83,22 +57,18 @@
#define NO_USER_CLIP 0x40000
#define MATERIALS 0x80000
#define NO_MATERIALS 0x100000
#define FOG 0x200000
#define NO_FOG 0x400000
#define QUIT 0x800000
#define DISPLAYLIST 0x1000000
#define LIGHT_MASK (LIT|UNLIT)
#define TEXTURE_MASK (TEXTURE|NO_TEXTURE)
#define REFLECT_MASK (REFLECT|NO_REFLECT)
#define FILTER_MASK (POINT_FILTER|LINEAR_FILTER)
#define RENDER_STYLE_MASK (GLVERTEX|DRAW_ARRAYS|ARRAY_ELT)
#define COMPILED_MASK (COMPILED|IMMEDIATE|DISPLAYLIST)
#define RENDER_STYLE_MASK (IMMEDIATE|DRAW_ARRAYS|ARRAY_ELT)
#define COMPILED_MASK (COMPILED|NOT_COMPILED)
#define MATERIAL_MASK (MATERIALS|NO_MATERIALS)
#define PRIMITIVE_MASK (TRIANGLES|STRIPS)
#define CLIP_MASK (USER_CLIP|NO_USER_CLIP)
#define SHADE_MASK (SHADE_SMOOTH|SHADE_FLAT)
#define FOG_MASK (FOG|NO_FOG)
#define MAXVERTS 10000
static float data[MAXVERTS][6];
@@ -110,16 +80,9 @@ static GLint numverts, num_tri_verts, numuniq;
static GLfloat xrot;
static GLfloat yrot;
static GLfloat dist = -6;
static GLint state, allowed = ~0;
static GLboolean doubleBuffer = GL_TRUE;
static GLdouble plane[4] = {1.0, 0.0, -1.0, 0.0};
static GLuint surf1;
static GLboolean PrintInfo = GL_FALSE;
/* forward decl */
int BuildList( int mode );
static void read_surface( char *filename )
@@ -156,7 +119,7 @@ struct data_idx {
#define COMPARE_FUNC( AXIS ) \
static int compare_axis_##AXIS( const void *a, const void *b ) \
int compare_axis_##AXIS( const void *a, const void *b ) \
{ \
float t = ( (*(struct data_idx *)a).data[AXIS] - \
(*(struct data_idx *)b).data[AXIS] ); \
@@ -262,7 +225,7 @@ static void extract_indices1( const struct data_idx *in, unsigned int *out,
}
static void compactify_arrays(void)
static void compactify_arrays()
{
int i;
struct data_idx *ind;
@@ -327,11 +290,11 @@ static void make_tri_indices( void )
#define MIN(x,y) (x < y) ? x : y
static void draw_surface( int with_state )
static void draw_surface( void )
{
GLuint i, j;
switch (with_state & (COMPILED_MASK|RENDER_STYLE_MASK|PRIMITIVE_MASK)) {
switch (state & (COMPILED_MASK|RENDER_STYLE_MASK|PRIMITIVE_MASK)) {
#ifdef GL_EXT_vertex_array
case (COMPILED|DRAW_ARRAYS|STRIPS):
@@ -347,8 +310,8 @@ static void draw_surface( int with_state )
break;
case (COMPILED|DRAW_ARRAYS|TRIANGLES):
case (IMMEDIATE|DRAW_ARRAYS|TRIANGLES):
if (with_state & MATERIALS) {
case (NOT_COMPILED|DRAW_ARRAYS|TRIANGLES):
if (state & MATERIALS) {
for (j = i = 0 ; i < num_tri_verts ; i += 600, j++) {
GLuint nr = MIN(num_tri_verts-i, 600);
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, col[j]);
@@ -364,22 +327,22 @@ static void draw_surface( int with_state )
/* Uses the original arrays (including duplicate elements):
*/
case (IMMEDIATE|DRAW_ARRAYS|STRIPS):
case (NOT_COMPILED|DRAW_ARRAYS|STRIPS):
glDrawArraysEXT( GL_TRIANGLE_STRIP, 0, numverts );
break;
/* Uses the original arrays (including duplicate elements):
*/
case (IMMEDIATE|ARRAY_ELT|STRIPS):
case (NOT_COMPILED|ARRAY_ELT|STRIPS):
glBegin( GL_TRIANGLE_STRIP );
for (i = 0 ; i < numverts ; i++)
glArrayElement( i );
glEnd();
break;
case (IMMEDIATE|ARRAY_ELT|TRIANGLES):
case (NOT_COMPILED|ARRAY_ELT|TRIANGLES):
case (COMPILED|ARRAY_ELT|TRIANGLES):
if (with_state & MATERIALS) {
if (state & MATERIALS) {
for (j = i = 0 ; i < num_tri_verts ; i += 600, j++) {
GLuint nr = MIN(num_tri_verts-i, 600);
GLuint k;
@@ -394,13 +357,12 @@ static void draw_surface( int with_state )
glBegin( GL_TRIANGLES );
for (i = 0 ; i < num_tri_verts ; i++)
glArrayElement( tri_indices[i] );
glEnd();
}
break;
case (IMMEDIATE|GLVERTEX|TRIANGLES):
if (with_state & MATERIALS) {
case (NOT_COMPILED|IMMEDIATE|TRIANGLES):
if (state & MATERIALS) {
for (j = i = 0 ; i < num_tri_verts ; i += 600, j++) {
GLuint nr = MIN(num_tri_verts-i, 600);
GLuint k;
@@ -423,13 +385,6 @@ static void draw_surface( int with_state )
}
break;
case (DISPLAYLIST|GLVERTEX|STRIPS):
if (!surf1)
surf1 = BuildList( GL_COMPILE_AND_EXECUTE );
else
glCallList(surf1);
break;
#endif
/* Uses the original arrays (including duplicate elements):
@@ -449,27 +404,18 @@ static void draw_surface( int with_state )
static void Display(void)
{
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
draw_surface( state );
draw_surface();
glFlush();
if (doubleBuffer) glutSwapBuffers();
}
int BuildList( int mode )
{
int rv = glGenLists(1);
glNewList(rv, mode );
draw_surface( IMMEDIATE|GLVERTEX|STRIPS );
glEndList();
return rv;
}
/* KW: only do this when necessary, so CVA can re-use results.
*/
static void set_matrix( void )
{
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef( 0.0, 0.0, dist );
glTranslatef( 0.0, 0.0, -6.0 );
glRotatef( yrot, 0.0, 1.0, 0.0 );
glRotatef( xrot, 1.0, 0.0, 0.0 );
}
@@ -602,23 +548,10 @@ static void ModeMenu(int m)
}
}
if (CHANGED(state, m, FOG_MASK)) {
if (m & FOG)
{
glEnable(GL_FOG);
printf("FOG enable\n");
}
else
{
glDisable(GL_FOG);
printf("FOG disable\n");
}
}
#ifdef GL_EXT_vertex_array
if (CHANGED(state, m, (COMPILED_MASK|RENDER_STYLE_MASK|PRIMITIVE_MASK)))
{
if ((m & (COMPILED_MASK|PRIMITIVE_MASK)) == (IMMEDIATE|STRIPS))
if ((m & (COMPILED_MASK|PRIMITIVE_MASK)) == (NOT_COMPILED|STRIPS))
{
glVertexPointerEXT( 3, GL_FLOAT, sizeof(data[0]), numverts, data );
glNormalPointerEXT( GL_FLOAT, sizeof(data[0]), numverts, &data[0][3]);
@@ -653,10 +586,8 @@ static void ModeMenu(int m)
static void Init(int argc, char *argv[])
static void Init(void)
{
GLfloat fogColor[4] = {0.5,1.0,0.5,1.0};
glClearColor(0.0, 0.0, 0.0, 0.0);
glEnable( GL_DEPTH_TEST );
glEnable( GL_VERTEX_ARRAY_EXT );
@@ -685,35 +616,20 @@ static void Init(int argc, char *argv[])
exit(1);
}
/* Green fog is easy to see */
glFogi(GL_FOG_MODE,GL_EXP2);
glFogfv(GL_FOG_COLOR,fogColor);
glFogf(GL_FOG_DENSITY,0.15);
glHint(GL_FOG_HINT,GL_DONT_CARE);
compactify_arrays();
make_tri_indices();
surf1 = BuildList( GL_COMPILE );
if (allowed & COMPILED) {
compactify_arrays();
make_tri_indices();
}
ModeMenu(SHADE_SMOOTH|
LIT|
NO_TEXTURE|
NO_REFLECT|
POINT_FILTER|
IMMEDIATE|
NOT_COMPILED|
NO_USER_CLIP|
NO_MATERIALS|
NO_FOG|
GLVERTEX);
if (PrintInfo) {
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS));
}
IMMEDIATE);
}
@@ -727,60 +643,45 @@ static void Reshape(int width, int height)
static void Key( unsigned char key, int x, int y )
{
(void) x;
(void) y;
switch (key) {
case 27:
exit(0);
case 'f':
ModeMenu((state ^ FOG_MASK) & FOG_MASK);
break;
case 's':
ModeMenu((state ^ SHADE_MASK) & SHADE_MASK);
break;
case 'l':
ModeMenu((state ^ LIGHT_MASK) & LIGHT_MASK);
break;
case 'm':
ModeMenu((state ^ MATERIAL_MASK) & MATERIAL_MASK);
break;
case 'c':
ModeMenu((state ^ CLIP_MASK) & CLIP_MASK);
break;
case 'b':
Benchmark(5.0, 0);
break;
case 'B':
Benchmark(0, 5.0);
break;
case 'i':
dist += .25;
set_matrix();
glutPostRedisplay();
break;
case 'I':
dist -= .25;
set_matrix();
glutPostRedisplay();
break;
case '-':
case '_':
plane[3] += 2.0;
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glClipPlane(GL_CLIP_PLANE0, plane);
set_matrix();
glutPostRedisplay();
break;
case '+':
case '=':
plane[3] -= 2.0;
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glClipPlane(GL_CLIP_PLANE0, plane);
set_matrix();
glutPostRedisplay();
break;
case 27:
exit(0);
case 's':
ModeMenu((state ^ SHADE_MASK) & SHADE_MASK);
break;
case 'l':
ModeMenu((state ^ LIGHT_MASK) & LIGHT_MASK);
break;
case 'm':
ModeMenu((state ^ MATERIAL_MASK) & MATERIAL_MASK);
break;
case 'c':
ModeMenu((state ^ CLIP_MASK) & CLIP_MASK);
break;
case 'b':
Benchmark(5.0, 0);
break;
case 'B':
Benchmark(0, 5.0);
break;
case '-':
case '_':
plane[3] += 2.0;
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glClipPlane(GL_CLIP_PLANE0, plane);
set_matrix();
glutPostRedisplay();
break;
case '+':
case '=':
plane[3] -= 2.0;
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glClipPlane(GL_CLIP_PLANE0, plane);
set_matrix();
glutPostRedisplay();
break;
}
}
@@ -788,8 +689,6 @@ static void Key( unsigned char key, int x, int y )
static void SpecialKey( int key, int x, int y )
{
(void) x;
(void) y;
switch (key) {
case GLUT_KEY_LEFT:
yrot -= 15.0;
@@ -824,9 +723,6 @@ static GLint Args(int argc, char **argv)
else if (strcmp(argv[i], "-db") == 0) {
doubleBuffer = GL_TRUE;
}
else if (strcmp(argv[i], "-info") == 0) {
PrintInfo = GL_TRUE;
}
else {
printf("%s (Bad option).\n", argv[i]);
return QUIT;
@@ -874,7 +770,7 @@ int main(int argc, char **argv)
allowed &= ~COMPILED;
}
Init(argc, argv);
Init();
ModeMenu(arg_mode);
glutCreateMenu(ModeMenu);
@@ -886,27 +782,21 @@ int main(int argc, char **argv)
glutAddMenuEntry("Smooth", SHADE_SMOOTH);
glutAddMenuEntry("Flat", SHADE_FLAT);
glutAddMenuEntry("", 0);
glutAddMenuEntry("Fog", FOG);
glutAddMenuEntry("No Fog", NO_FOG);
glutAddMenuEntry("", 0);
glutAddMenuEntry("Point Filtered", POINT_FILTER);
glutAddMenuEntry("Linear Filtered", LINEAR_FILTER);
glutAddMenuEntry("", 0);
glutAddMenuEntry("glVertex (STRIPS)", IMMEDIATE|GLVERTEX|STRIPS);
glutAddMenuEntry("glVertex (TRIANGLES)", IMMEDIATE|GLVERTEX|TRIANGLES);
glutAddMenuEntry("", 0);
glutAddMenuEntry("glVertex display list (STRIPS)",
DISPLAYLIST|GLVERTEX|STRIPS);
glutAddMenuEntry("Immediate (STRIPS)", NOT_COMPILED|IMMEDIATE|STRIPS);
glutAddMenuEntry("Immediate (TRIANGLES)", NOT_COMPILED|IMMEDIATE|TRIANGLES);
glutAddMenuEntry("", 0);
if (allowed & DRAW_ARRAYS) {
glutAddMenuEntry("DrawArrays (STRIPS)",
IMMEDIATE|DRAW_ARRAYS|STRIPS);
NOT_COMPILED|DRAW_ARRAYS|STRIPS);
glutAddMenuEntry("ArrayElement (STRIPS)",
IMMEDIATE|ARRAY_ELT|STRIPS);
NOT_COMPILED|ARRAY_ELT|STRIPS);
glutAddMenuEntry("DrawElements (TRIANGLES)",
IMMEDIATE|DRAW_ARRAYS|TRIANGLES);
NOT_COMPILED|DRAW_ARRAYS|TRIANGLES);
glutAddMenuEntry("ArrayElement (TRIANGLES)",
IMMEDIATE|ARRAY_ELT|TRIANGLES);
NOT_COMPILED|ARRAY_ELT|TRIANGLES);
glutAddMenuEntry("", 0);
}
@@ -915,9 +805,7 @@ int main(int argc, char **argv)
COMPILED|DRAW_ARRAYS|TRIANGLES);
glutAddMenuEntry("Compiled DrawElements (STRIPS)",
COMPILED|DRAW_ARRAYS|STRIPS);
glutAddMenuEntry("Compiled ArrayElement (TRIANGLES)",
COMPILED|ARRAY_ELT|TRIANGLES);
glutAddMenuEntry("Compiled ArrayElement (STRIPS)",
glutAddMenuEntry("Compiled ArrayElement",
COMPILED|ARRAY_ELT|STRIPS);
glutAddMenuEntry("", 0);
}

View File

@@ -1,13 +1,7 @@
/* $Id: morph3d.c,v 1.2.2.1 1999/12/15 13:00:24 brianp Exp $ */
/* $Id: morph3d.c,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* $Log: morph3d.c,v $
* Revision 1.2.2.1 1999/12/15 13:00:24 brianp
* moved #define to column 0
*
* Revision 1.2 1999/09/17 12:27:01 brianp
* silenced some warnings
*
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
@@ -501,7 +495,7 @@ static void draw_dodeca( void )
{
GLuint list;
#define TAU ((SQRT5+1)/2)
#define TAU ((SQRT5+1)/2)
list = glGenLists( 1 );
glNewList( list, GL_COMPILE );
@@ -723,8 +717,6 @@ static void pinit(void);
static void key( unsigned char k, int x, int y )
{
(void) x;
(void) y;
switch (k) {
case '1': object=1; break;
case '2': object=2; break;

View File

@@ -1,29 +1,12 @@
/* $Id: multiarb.c,v 1.3.2.2 2000/02/02 17:32:15 brianp Exp $ */
/* $Id: multiarb.c,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* GL_ARB_multitexture demo
*
* Command line options:
* -info print GL implementation information
*
*
* Brian Paul November 1998 This program is in the public domain.
*/
/*
* $Log: multiarb.c,v $
* Revision 1.3.2.2 2000/02/02 17:32:15 brianp
* changed > to >=
*
* Revision 1.3.2.1 2000/02/02 01:08:09 brianp
* limit Drift to [0, 1]
*
* Revision 1.3 1999/10/21 16:40:32 brianp
* added -info command line option
*
* Revision 1.2 1999/10/13 12:02:13 brianp
* use texture objects now
*
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
@@ -67,8 +50,6 @@ static void Idle( void )
{
if (Animate) {
Drift += 0.05;
if (Drift >= 1.0)
Drift = 0.0;
#ifdef GL_ARB_multitexture
glActiveTextureARB(GL_TEXTURE0_ARB);
@@ -240,21 +221,18 @@ static void SpecialKey( int key, int x, int y )
}
static void Init( int argc, char *argv[] )
static void Init( void )
{
GLuint texObj[2];
const char *exten = (const char *) glGetString(GL_EXTENSIONS);
if (!strstr(exten, "GL_ARB_multitexture")) {
printf("Sorry, GL_ARB_multitexture not supported by this renderer.\n");
exit(1);
}
/* allocate two texture objects */
glGenTextures(2, texObj);
/* setup texture obj 0 */
glBindTexture(GL_TEXTURE_2D, texObj[0]);
/* setup texture env 0 */
#ifdef GL_ARB_multitexture
glActiveTextureARB(GL_TEXTURE0_ARB);
#endif
#ifdef LINEAR_FILTER
/* linear filtering looks much nicer but is much slower for Mesa */
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
@@ -274,8 +252,10 @@ static void Init( int argc, char *argv[] )
}
/* setup texture obj 1 */
glBindTexture(GL_TEXTURE_2D, texObj[1]);
/* setup texture env 1 */
#ifdef GL_ARB_multitexture
glActiveTextureARB(GL_TEXTURE1_ARB);
#endif
#ifdef LINEAR_FILTER
/* linear filtering looks much nicer but is much slower for Mesa */
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
@@ -292,26 +272,10 @@ static void Init( int argc, char *argv[] )
exit(1);
}
/* now bind the texture objects to the respective texture units */
#ifdef GL_ARB_multitexture
glActiveTextureARB(GL_TEXTURE0_ARB);
glBindTexture(GL_TEXTURE_2D, texObj[0]);
glActiveTextureARB(GL_TEXTURE1_ARB);
glBindTexture(GL_TEXTURE_2D, texObj[1]);
#endif
glShadeModel(GL_FLAT);
glClearColor(0.3, 0.3, 0.4, 1.0);
ModeMenu(TEXBOTH);
if (argc > 1 && strcmp(argv[1], "-info")==0) {
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS));
}
}
@@ -322,7 +286,7 @@ int main( int argc, char *argv[] )
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow(argv[0] );
Init( argc, argv );
Init();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );

View File

@@ -1,4 +1,4 @@
/* $Id: osdemo.c,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
/* $Id: osdemo.c,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* Demo of off-screen Mesa rendering
@@ -19,8 +19,8 @@
/*
* $Log: osdemo.c,v $
* Revision 1.1 1999/08/19 00:55:40 jtg
* Initial revision
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 3.0 1998/02/14 18:42:29 brianp
* initial rev

View File

@@ -1,15 +1,11 @@
/* $Id: paltex.c,v 1.2 1999/11/02 15:09:04 brianp Exp $ */
/* $Id: paltex.c,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* Paletted texture demo. Written by Brian Paul.
* This program is in the public domain.
* Paletted texture demo. Written by Brian Paul. This file in public domain.
*/
/*
* $Log: paltex.c,v $
* Revision 1.2 1999/11/02 15:09:04 brianp
* new texture image, cleaned-up code
*
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
@@ -46,10 +42,10 @@ static void Display( void )
glRotatef(Rot, 0, 0, 1);
glBegin(GL_POLYGON);
glTexCoord2f(0, 1); glVertex2f(-1, -0.5);
glTexCoord2f(1, 1); glVertex2f( 1, -0.5);
glTexCoord2f(1, 0); glVertex2f( 1, 0.5);
glTexCoord2f(0, 0); glVertex2f(-1, 0.5);
glTexCoord2f(0, 1); glVertex2f(-1, -1);
glTexCoord2f(1, 1); glVertex2f( 1, -1);
glTexCoord2f(1, 0); glVertex2f( 1, 1);
glTexCoord2f(0, 0); glVertex2f(-1, 1);
glEnd();
glPopMatrix();
@@ -66,7 +62,7 @@ static void Reshape( int width, int height )
glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 );
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
glTranslatef( 0.0, 0.0, -7.0 );
glTranslatef( 0.0, 0.0, -15.0 );
}
@@ -83,20 +79,37 @@ static void Key( unsigned char key, int x, int y )
}
static void SpecialKey( int key, int x, int y )
{
(void) x;
(void) y;
switch (key) {
case GLUT_KEY_UP:
break;
case GLUT_KEY_DOWN:
break;
case GLUT_KEY_LEFT:
break;
case GLUT_KEY_RIGHT:
break;
}
glutPostRedisplay();
}
static void Init( void )
{
#define HEIGHT 8
#define WIDTH 32
static char texture[HEIGHT][WIDTH] = {
" ",
" MMM EEEE SSS AAA ",
" M M M E S S A A ",
" M M M EEEE SS A A ",
" M M M E SS AAAAA ",
" M M E S S A A ",
" M M EEEE SSS A A ",
" "
};
GLubyte texture[8][8] = { /* PT = Paletted Texture! */
{ 0, 0, 0, 0, 0, 0, 0, 0},
{ 0, 100, 100, 100, 0, 180, 180, 180},
{ 0, 100, 0, 100, 0, 0, 180, 0},
{ 0, 100, 0, 100, 0, 0, 180, 0},
{ 0, 100, 100, 100, 0, 0, 180, 0},
{ 0, 100, 0, 0, 0, 0, 180, 0},
{ 0, 100, 0, 0, 0, 0, 180, 0},
{ 0, 100, 255, 0, 0, 0, 180, 250},
};
GLubyte table[256][4];
int i;
@@ -105,31 +118,17 @@ static void Init( void )
exit(0);
}
/* load the color table for each texel-index */
table[' '][0] = 50;
table[' '][1] = 50;
table[' '][2] = 50;
table[' '][3] = 50;
table['M'][0] = 255;
table['M'][1] = 0;
table['M'][2] = 0;
table['M'][3] = 0;
table['E'][0] = 0;
table['E'][1] = 255;
table['E'][2] = 0;
table['E'][3] = 0;
table['S'][0] = 40;
table['S'][1] = 40;
table['S'][2] = 255;
table['S'][3] = 0;
table['A'][0] = 255;
table['A'][1] = 255;
table['A'][2] = 0;
table['A'][3] = 0;
/* put some wacky colors into the texture palette */
for (i=0;i<256;i++) {
table[i][0] = i;
table[i][1] = 0;
table[i][2] = 127 + i / 2;
table[i][3] = 255;
}
#ifdef GL_EXT_paletted_texture
#if defined(GL_EXT_shared_texture_palette) && defined(USE_SHARED_PALETTE)
#if defined(GL_EXT_shared_texture_palette) && defined(SHARED_PALETTE)
printf("Using shared palette\n");
glColorTableEXT(GL_SHARED_TEXTURE_PALETTE_EXT, /* target */
GL_RGBA, /* internal format */
@@ -150,7 +149,7 @@ static void Init( void )
glTexImage2D(GL_TEXTURE_2D, /* target */
0, /* level */
GL_COLOR_INDEX8_EXT, /* internal format */
WIDTH, HEIGHT, /* width, height */
8, 8, /* width, height */
0, /* border */
GL_COLOR_INDEX, /* texture format */
GL_UNSIGNED_BYTE, /* texture type */
@@ -178,6 +177,7 @@ int main( int argc, char *argv[] )
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
glutDisplayFunc( Display );
glutIdleFunc( Idle );

View File

@@ -13,8 +13,8 @@
/*
* $Log: pointblast.c,v $
* Revision 1.1 1999/08/19 00:55:40 jtg
* Initial revision
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 3.3 1998/07/26 01:24:27 brianp
* removed include of gl.h

View File

@@ -1,4 +1,4 @@
/* $Id: reflect.c,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
/* $Id: reflect.c,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* Demo of a reflective, texture-mapped surface with OpenGL.
@@ -31,8 +31,8 @@
/*
* $Log: reflect.c,v $
* Revision 1.1 1999/08/19 00:55:40 jtg
* Initial revision
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 3.4 1999/03/28 18:22:05 brianp
* minor clean-up

View File

@@ -1,4 +1,4 @@
/* $Id: renormal.c,v 1.3 1999/09/17 12:27:01 brianp Exp $ */
/* $Id: renormal.c,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* Test GL_EXT_rescale_normal extension
@@ -6,7 +6,7 @@
*/
/*
* $Id: renormal.c,v 1.3 1999/09/17 12:27:01 brianp Exp $
* $Id: renormal.c,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $
*/
@@ -95,20 +95,6 @@ static void ModeMenu(int entry)
glutPostRedisplay();
}
static void
key(unsigned char k, int x, int y)
{
(void) x;
(void) y;
switch (k) {
case 27: /* Escape */
exit(0);
break;
default:
return;
}
glutPostRedisplay();
}
int main( int argc, char *argv[] )
{
@@ -124,7 +110,6 @@ int main( int argc, char *argv[] )
glutIdleFunc( Idle );
glutReshapeFunc( Reshape );
glutDisplayFunc( Display );
glutKeyboardFunc(key);
glutCreateMenu(ModeMenu);
glutAddMenuEntry("Unscaled", UNSCALED);

View File

@@ -1,4 +1,4 @@
/* $Id: spectex.c,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
/* $Id: spectex.c,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* GLUT demonstration of texturing with specular highlights.
@@ -20,8 +20,8 @@
/*
* $Log: spectex.c,v $
* Revision 1.1 1999/08/19 00:55:40 jtg
* Initial revision
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 3.2 1999/03/28 18:22:05 brianp
* minor clean-up

View File

@@ -1,4 +1,4 @@
/* $Id: stex3d.c,v 1.2.2.1 1999/12/16 08:53:51 brianp Exp $ */
/* $Id: stex3d.c,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*-----------------------------
* stex3d.c GL example of the mesa 3d-texture extention to simulate procedural
@@ -17,12 +17,6 @@
/*
* $Log: stex3d.c,v $
* Revision 1.2.2.1 1999/12/16 08:53:51 brianp
* added a cast to malloc call
*
* Revision 1.2 1999/09/17 12:27:01 brianp
* silenced some warnings
*
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
@@ -233,7 +227,7 @@ void create3Dtexture()
int tmp;
printf("creating 3d textures...\n");
voxels = (unsigned char *) malloc((size_t) (4*tex_width*tex_height*tex_depth));
voxels = (unsigned char *) malloc((4*tex_width*tex_height*tex_depth));
vp=voxels;
for (i=0;i<tex_width;i++){
vec[0]=i;
@@ -407,8 +401,6 @@ void cleanEverything(void)
void KeyHandler( unsigned char key, int x, int y )
{
(void) x;
(void) y;
switch(key) {
case 27:
case 'q':

View File

@@ -1,4 +1,4 @@
/* $Id: tessdemo.c,v 1.3.2.1 1999/11/16 11:09:09 gareth Exp $ */
/* $Id: tessdemo.c,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* A demo of the GLU polygon tesselation functions written by Bogdan Sikorski.
@@ -8,23 +8,9 @@
cc -g -ansi -prototypes -fullwarn -float -I../include -DSHM tess_demo.c -L../lib -lglut -lMesaGLU -lMesaGL -lm -lX11 -lXext -lXmu -lfpe -lXext -o tess_demo
*/
/*
* Updated for GLU 1.3 tessellation by Gareth Hughes <garethh@bell-labs.com>
*/
/*
* $Log: tessdemo.c,v $
* Revision 1.3.2.1 1999/11/16 11:09:09 gareth
* Added combine callback. Converted vertices from ints to floats.
*
* Revision 1.3 1999/11/04 04:00:42 gareth
* Updated demo for new GLU 1.3 tessellation. Added optimized rendering
* by saving the output of the tessellation into display lists.
*
* Revision 1.2 1999/09/19 20:09:00 tanner
*
* lots of autoconf updates
*
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
@@ -54,9 +40,29 @@
#include <stdlib.h>
#include <string.h>
#define MAX_POINTS 256
#define MAX_CONTOURS 32
#define MAX_TRIANGLES 256
#define MAX_POINTS 200
#define MAX_CONTOURS 50
int menu;
typedef enum{ QUIT, TESSELATE, CLEAR } menu_entries;
typedef enum{ DEFINE, TESSELATED } mode_type;
struct
{
GLint p[MAX_POINTS][2];
GLuint point_cnt;
} contours[MAX_CONTOURS];
GLuint contour_cnt;
GLsizei width,height;
mode_type mode;
struct
{
GLsizei no;
GLfloat color[3];
GLint p[3][2];
GLclampf p_color[3][3];
} triangle;
#ifndef GLCALLBACK
#ifdef CALLBACK
@@ -66,513 +72,368 @@
#endif
#endif
typedef enum{ QUIT, TESSELATE, CLEAR } menu_entries;
typedef enum{ DEFINE, TESSELATED } mode_type;
static GLsizei width, height;
static GLuint contour_cnt;
static GLuint triangle_cnt;
static mode_type mode;
static int menu;
static GLuint list_start;
static GLfloat edge_color[3];
static struct
void GLCALLBACK my_error(GLenum err)
{
GLfloat p[MAX_POINTS][2];
GLuint point_cnt;
} contours[MAX_CONTOURS];
int len,i;
char const *str;
static struct
{
GLsizei no;
GLfloat p[3][2];
GLclampf color[3][3];
} triangles[MAX_TRIANGLES];
void GLCALLBACK error_callback( GLenum err )
{
int len, i;
char const *str;
glColor3f( 0.9, 0.9, 0.9 );
glRasterPos2i( 5, 5 );
str = (const char *) gluErrorString( err );
len = strlen( str );
for ( i = 0 ; i < len ; i++ ) {
glutBitmapCharacter( GLUT_BITMAP_9_BY_15, str[i] );
}
glColor3f(0.9,0.9,0.9);
glRasterPos2i(5,5);
str=(const char *)gluErrorString(err);
len=strlen(str);
for(i=0;i<len;i++)
glutBitmapCharacter(GLUT_BITMAP_9_BY_15,str[i]);
}
void GLCALLBACK begin_callback( GLenum mode )
void GLCALLBACK begin_callback(GLenum mode)
{
/* Allow multiple triangles to be output inside the begin/end pair. */
triangle_cnt = 0;
triangles[triangle_cnt].no = 0;
triangle.no=0;
}
void GLCALLBACK edge_callback( GLenum flag )
void GLCALLBACK edge_callback(GLenum flag)
{
/* Persist the edge flag across triangles. */
if ( flag == GL_TRUE )
{
edge_color[0] = 1.0;
edge_color[1] = 1.0;
edge_color[2] = 0.5;
}
else
{
edge_color[0] = 1.0;
edge_color[1] = 0.0;
edge_color[2] = 0.0;
}
if(flag==GL_TRUE)
{
triangle.color[0]=1.0;
triangle.color[1]=1.0;
triangle.color[2]=0.5;
}
else
{
triangle.color[0]=1.0;
triangle.color[1]=0.0;
triangle.color[2]=0.0;
}
}
void GLCALLBACK end_callback()
{
GLint i;
glBegin( GL_LINES );
/* Output the three edges of each triangle as lines colored
according to their edge flag. */
for ( i = 0 ; i < triangle_cnt ; i++ )
{
glColor3f( triangles[i].color[0][0],
triangles[i].color[0][1],
triangles[i].color[0][2] );
glVertex2f( triangles[i].p[0][0], triangles[i].p[0][1] );
glVertex2f( triangles[i].p[1][0], triangles[i].p[1][1] );
glColor3f( triangles[i].color[1][0],
triangles[i].color[1][1],
triangles[i].color[1][2] );
glVertex2f( triangles[i].p[1][0], triangles[i].p[1][1] );
glVertex2f( triangles[i].p[2][0], triangles[i].p[2][1] );
glColor3f( triangles[i].color[2][0],
triangles[i].color[2][1],
triangles[i].color[2][2] );
glVertex2f( triangles[i].p[2][0], triangles[i].p[2][1] );
glVertex2f( triangles[i].p[0][0], triangles[i].p[0][1] );
}
glEnd();
glBegin(GL_LINES);
glColor3f(triangle.p_color[0][0],triangle.p_color[0][1],
triangle.p_color[0][2]);
glVertex2i(triangle.p[0][0],triangle.p[0][1]);
glVertex2i(triangle.p[1][0],triangle.p[1][1]);
glColor3f(triangle.p_color[1][0],triangle.p_color[1][1],
triangle.p_color[1][2]);
glVertex2i(triangle.p[1][0],triangle.p[1][1]);
glVertex2i(triangle.p[2][0],triangle.p[2][1]);
glColor3f(triangle.p_color[2][0],triangle.p_color[2][1],
triangle.p_color[2][2]);
glVertex2i(triangle.p[2][0],triangle.p[2][1]);
glVertex2i(triangle.p[0][0],triangle.p[0][1]);
glEnd();
}
void GLCALLBACK vertex_callback( void *data )
void GLCALLBACK vertex_callback(void *data)
{
GLsizei no;
GLfloat *p;
GLsizei no;
GLint *p;
p = (GLfloat *) data;
no = triangles[triangle_cnt].no;
triangles[triangle_cnt].p[no][0] = p[0];
triangles[triangle_cnt].p[no][1] = p[1];
triangles[triangle_cnt].color[no][0] = edge_color[0];
triangles[triangle_cnt].color[no][1] = edge_color[1];
triangles[triangle_cnt].color[no][2] = edge_color[2];
/* After every three vertices, initialize the next triangle. */
if ( ++(triangles[triangle_cnt].no) == 3 )
{
triangle_cnt++;
triangles[triangle_cnt].no = 0;
}
p=(GLint *)data;
no=triangle.no;
triangle.p[no][0]=p[0];
triangle.p[no][1]=p[1];
triangle.p_color[no][0]=triangle.color[0];
triangle.p_color[no][1]=triangle.color[1];
triangle.p_color[no][2]=triangle.color[2];
++(triangle.no);
}
void GLCALLBACK combine_callback( GLdouble coords[3],
GLdouble *vertex_data[4],
GLfloat weight[4], void **data )
void set_screen_wh(GLsizei w, GLsizei h)
{
GLfloat *vertex;
int i;
vertex = (GLfloat *) malloc( 2 * sizeof(GLfloat) );
vertex[0] = (GLfloat) coords[0];
vertex[1] = (GLfloat) coords[1];
*data = vertex;
width=w;
height=h;
}
void set_screen_wh( GLsizei w, GLsizei h )
void tesse(void)
{
width = w;
height = h;
GLUtriangulatorObj *tobj;
GLdouble data[3];
GLuint i,j,point_cnt;
tobj=gluNewTess();
if(tobj!=NULL)
{
glClear(GL_COLOR_BUFFER_BIT);
glColor3f (0.7, 0.7, 0.0);
gluTessCallback(tobj,GLU_BEGIN,glBegin);
gluTessCallback(tobj,GLU_END,glEnd);
gluTessCallback(tobj,GLU_ERROR,my_error);
gluTessCallback(tobj,GLU_VERTEX,glVertex2iv);
gluBeginPolygon(tobj);
for(j=0;j<=contour_cnt;j++)
{
point_cnt=contours[j].point_cnt;
gluNextContour(tobj,GLU_UNKNOWN);
for(i=0;i<point_cnt;i++)
{
data[0]=(GLdouble)(contours[j].p[i][0]);
data[1]=(GLdouble)(contours[j].p[i][1]);
data[2]=0.0;
gluTessVertex(tobj,data,contours[j].p[i]);
}
}
gluEndPolygon(tobj);
glLineWidth(2.0);
gluTessCallback(tobj,GLU_BEGIN,begin_callback);
gluTessCallback(tobj,GLU_END,end_callback);
gluTessCallback(tobj,GLU_VERTEX,vertex_callback);
gluTessCallback(tobj,GLU_EDGE_FLAG,edge_callback);
gluBeginPolygon(tobj);
for(j=0;j<=contour_cnt;j++)
{
point_cnt=contours[j].point_cnt;
gluNextContour(tobj,GLU_UNKNOWN);
for(i=0;i<point_cnt;i++)
{
data[0]=(GLdouble)(contours[j].p[i][0]);
data[1]=(GLdouble)(contours[j].p[i][1]);
data[2]=0.0;
gluTessVertex(tobj,data,contours[j].p[i]);
}
}
gluEndPolygon(tobj);
gluDeleteTess(tobj);
glutMouseFunc(NULL);
glColor3f (1.0, 1.0, 0.0);
glLineWidth(1.0);
mode=TESSELATED;
}
}
void tesse( void )
void left_down(int x1,int y1)
{
GLUtesselator *tobj;
GLdouble data[3];
GLuint i, j, point_cnt;
GLint P[2];
GLuint point_cnt;
list_start = glGenLists( 2 );
tobj = gluNewTess();
if ( tobj != NULL )
{
gluTessCallback( tobj, GLU_TESS_BEGIN, glBegin );
gluTessCallback( tobj, GLU_TESS_VERTEX, glVertex2fv );
gluTessCallback( tobj, GLU_TESS_END, glEnd );
gluTessCallback( tobj, GLU_TESS_ERROR, error_callback );
gluTessCallback( tobj, GLU_TESS_COMBINE, combine_callback );
glNewList( list_start, GL_COMPILE );
gluBeginPolygon( tobj );
for ( j = 0 ; j <= contour_cnt ; j++ )
{
point_cnt = contours[j].point_cnt;
gluNextContour( tobj, GLU_UNKNOWN );
for ( i = 0 ; i < point_cnt ; i++ )
{
data[0] = (GLdouble)( contours[j].p[i][0] );
data[1] = (GLdouble)( contours[j].p[i][1] );
data[2] = 0.0;
gluTessVertex( tobj, data, contours[j].p[i] );
}
}
gluEndPolygon( tobj );
glEndList();
gluTessCallback( tobj, GLU_TESS_BEGIN, begin_callback );
gluTessCallback( tobj, GLU_TESS_VERTEX, vertex_callback );
gluTessCallback( tobj, GLU_TESS_END, end_callback );
gluTessCallback( tobj, GLU_TESS_EDGE_FLAG, edge_callback );
glNewList( list_start + 1, GL_COMPILE );
gluBeginPolygon( tobj );
for ( j = 0 ; j <= contour_cnt ; j++ )
{
point_cnt = contours[j].point_cnt;
gluNextContour( tobj, GLU_UNKNOWN );
for ( i = 0 ; i < point_cnt ; i++ )
{
data[0] = (GLdouble)( contours[j].p[i][0] );
data[1] = (GLdouble)( contours[j].p[i][1] );
data[2] = 0.0;
gluTessVertex( tobj, data, contours[j].p[i] );
}
}
gluEndPolygon( tobj );
glEndList();
gluDeleteTess( tobj );
glutMouseFunc( NULL );
mode = TESSELATED;
}
/* translate GLUT into GL coordinates */
P[0]=x1;
P[1]=height-y1;
point_cnt=contours[contour_cnt].point_cnt;
contours[contour_cnt].p[point_cnt][0]=P[0];
contours[contour_cnt].p[point_cnt][1]=P[1];
glBegin(GL_LINES);
if(point_cnt)
{
glVertex2iv(contours[contour_cnt].p[point_cnt-1]);
glVertex2iv(P);
}
else
{
glVertex2iv(P);
glVertex2iv(P);
}
glEnd();
glFinish();
++(contours[contour_cnt].point_cnt);
}
void left_down( int x1, int y1 )
void middle_down(int x1, int y1)
{
GLfloat P[2];
GLuint point_cnt;
GLuint point_cnt;
(void) x1;
(void) y1;
/* translate GLUT into GL coordinates */
P[0] = x1;
P[1] = height - y1;
point_cnt = contours[contour_cnt].point_cnt;
contours[contour_cnt].p[point_cnt][0] = P[0];
contours[contour_cnt].p[point_cnt][1] = P[1];
glBegin( GL_LINES );
if ( point_cnt )
{
glVertex2fv( contours[contour_cnt].p[point_cnt-1] );
glVertex2fv( P );
}
else
{
glVertex2fv( P );
glVertex2fv( P );
}
glEnd();
glFinish();
contours[contour_cnt].point_cnt++;
point_cnt=contours[contour_cnt].point_cnt;
if(point_cnt>2)
{
glBegin(GL_LINES);
glVertex2iv(contours[contour_cnt].p[0]);
glVertex2iv(contours[contour_cnt].p[point_cnt-1]);
contours[contour_cnt].p[point_cnt][0]= -1;
glEnd();
glFinish();
contour_cnt++;
contours[contour_cnt].point_cnt=0;
}
}
void middle_down( int x1, int y1 )
void mouse_clicked(int button,int state,int x,int y)
{
GLuint point_cnt;
(void) x1;
(void) y1;
point_cnt = contours[contour_cnt].point_cnt;
if ( point_cnt > 2 )
{
glBegin( GL_LINES );
glVertex2fv( contours[contour_cnt].p[0] );
glVertex2fv( contours[contour_cnt].p[point_cnt-1] );
contours[contour_cnt].p[point_cnt][0] = -1;
glEnd();
glFinish();
contour_cnt++;
contours[contour_cnt].point_cnt = 0;
}
x-= x%10;
y-= y%10;
switch(button)
{
case GLUT_LEFT_BUTTON:
if(state==GLUT_DOWN)
left_down(x,y);
break;
case GLUT_MIDDLE_BUTTON:
if(state==GLUT_DOWN)
middle_down(x,y);
break;
}
}
void mouse_clicked( int button, int state, int x, int y )
void display(void)
{
x -= x%10;
y -= y%10;
GLuint i,j;
GLuint point_cnt;
switch ( button )
{
case GLUT_LEFT_BUTTON:
if ( state == GLUT_DOWN ) {
left_down( x, y );
}
break;
case GLUT_MIDDLE_BUTTON:
if ( state == GLUT_DOWN ) {
middle_down( x, y );
}
break;
}
}
glClear(GL_COLOR_BUFFER_BIT);
switch(mode)
{
case DEFINE:
/* draw grid */
glColor3f (0.6,0.5,0.5);
glBegin(GL_LINES);
for(i=0;i<width;i+=10)
for(j=0;j<height;j+=10)
{
glVertex2i(0,j);
glVertex2i(width,j);
glVertex2i(i,height);
glVertex2i(i,0);
}
glColor3f (1.0, 1.0, 0.0);
for(i=0;i<=contour_cnt;i++)
{
point_cnt=contours[i].point_cnt;
glBegin(GL_LINES);
switch(point_cnt)
{
case 0:
break;
case 1:
glVertex2iv(contours[i].p[0]);
glVertex2iv(contours[i].p[0]);
break;
case 2:
glVertex2iv(contours[i].p[0]);
glVertex2iv(contours[i].p[1]);
break;
default:
--point_cnt;
for(j=0;j<point_cnt;j++)
{
glVertex2iv(contours[i].p[j]);
glVertex2iv(contours[i].p[j+1]);
}
if(contours[i].p[j+1][0]== -1)
{
glVertex2iv(contours[i].p[0]);
glVertex2iv(contours[i].p[j]);
}
break;
}
glEnd();
}
glFinish();
break;
case TESSELATED:
/* draw lines */
tesse();
break;
}
void display( void )
{
GLuint i,j;
GLuint point_cnt;
glClear( GL_COLOR_BUFFER_BIT );
switch ( mode )
{
case DEFINE:
/* draw grid */
glColor3f( 0.6, 0.5, 0.5 );
glBegin( GL_LINES );
for ( i = 0 ; i < width ; i += 10 )
{
for ( j = 0 ; j < height ; j += 10 )
{
glVertex2i( 0, j );
glVertex2i( width, j );
glVertex2i( i, height );
glVertex2i( i, 0 );
}
}
glColor3f( 1.0, 1.0, 0.0 );
for ( i = 0 ; i <= contour_cnt ; i++ )
{
point_cnt = contours[i].point_cnt;
glBegin( GL_LINES );
switch ( point_cnt )
{
case 0:
break;
case 1:
glVertex2fv( contours[i].p[0] );
glVertex2fv( contours[i].p[0] );
break;
case 2:
glVertex2fv( contours[i].p[0] );
glVertex2fv( contours[i].p[1] );
break;
default:
--point_cnt;
for ( j = 0 ; j < point_cnt ; j++ )
{
glVertex2fv( contours[i].p[j] );
glVertex2fv( contours[i].p[j+1] );
}
if ( contours[i].p[j+1][0] == -1 )
{
glVertex2fv( contours[i].p[0] );
glVertex2fv( contours[i].p[j] );
}
break;
}
glEnd();
}
glFinish();
break;
case TESSELATED:
/* draw triangles */
glColor3f( 0.7, 0.7, 0.0 );
glCallList( list_start );
glLineWidth( 2.0 );
glCallList( list_start + 1 );
glLineWidth( 1.0 );
glFlush();
break;
}
glColor3f( 1.0, 1.0, 0.0 );
glColor3f (1.0, 1.0, 0.0);
}
void clear( void )
{
contour_cnt = 0;
contours[0].point_cnt = 0;
triangle_cnt = 0;
glutMouseFunc( mouse_clicked );
mode = DEFINE;
glDeleteLists( list_start, 2 );
list_start = 0;
contour_cnt=0;
contours[0].point_cnt=0;
glutMouseFunc(mouse_clicked);
mode=DEFINE;
display();
}
void quit( void )
{
exit( 0 );
exit(0);
}
void menu_selected( int entry )
void menu_selected(int entry)
{
switch ( entry )
{
case CLEAR:
clear();
break;
case TESSELATE:
tesse();
break;
case QUIT:
quit();
break;
}
glutPostRedisplay();
switch(entry)
{
case CLEAR:
clear();
break;
case TESSELATE:
tesse();
break;
case QUIT:
quit();
break;
}
}
void key_pressed( unsigned char key, int x, int y )
void key_pressed(unsigned char key,int x,int y)
{
(void) x;
(void) y;
switch ( key )
{
case 'c':
case 'C':
clear();
break;
case 't':
case 'T':
tesse();
break;
case 'q':
case 'Q':
quit();
break;
}
glutPostRedisplay();
(void) x;
(void) y;
switch(key)
{
case 't':
case 'T':
tesse();
glFinish();
break;
case 'q':
case 'Q':
quit();
break;
case 'c':
case 'C':
clear();
break;
}
}
void myinit( void )
void myinit (void)
{
/* clear background to gray */
glClearColor( 0.4, 0.4, 0.4, 0.0 );
glShadeModel( GL_FLAT );
glPolygonMode( GL_FRONT, GL_FILL );
/* clear background to gray */
glClearColor (0.4, 0.4, 0.4, 0.0);
glShadeModel (GL_FLAT);
menu = glutCreateMenu( menu_selected );
glutAddMenuEntry( "clear", CLEAR );
glutAddMenuEntry( "tesselate", TESSELATE );
glutAddMenuEntry( "quit", QUIT );
glutAttachMenu( GLUT_RIGHT_BUTTON );
glutMouseFunc( mouse_clicked );
glutKeyboardFunc( key_pressed );
contour_cnt = 0;
mode = DEFINE;
menu=glutCreateMenu(menu_selected);
glutAddMenuEntry("clear",CLEAR);
glutAddMenuEntry("tesselate",TESSELATE);
glutAddMenuEntry("quit",QUIT);
glutAttachMenu(GLUT_RIGHT_BUTTON);
glutMouseFunc(mouse_clicked);
glutKeyboardFunc(key_pressed);
contour_cnt=0;
glPolygonMode(GL_FRONT,GL_FILL);
mode=DEFINE;
}
static void reshape( GLsizei w, GLsizei h )
static void reshape(GLsizei w, GLsizei h)
{
glViewport( 0, 0, w, h );
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glOrtho( 0.0, (GLdouble)w, 0.0, (GLdouble)h, -1.0, 1.0 );
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
set_screen_wh( w, h );
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0.0, (GLdouble)w, 0.0, (GLdouble)h, -1.0, 1.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
set_screen_wh(w,h);
}
static void usage( void )
{
printf( "Use left mouse button to place vertices.\n" );
printf( "Press middle mouse button when done.\n" );
printf( "Select tesselate from the pop-up menu.\n" );
printf("Use left mouse button to place vertices.\n");
printf("Press middle mouse button when done.\n");
printf("Select tesselate from the pop-up menu.\n");
}
/*
* Main Loop
* Open window with initial window size, title bar,
* RGBA display mode, and handle input events.
/* Main Loop
* Open window with initial window size, title bar,
* RGBA display mode, and handle input events.
*/
int main( int argc, char **argv )
int main(int argc, char** argv)
{
usage();
glutInit( &argc, argv );
glutInitDisplayMode( GLUT_SINGLE | GLUT_RGB );
glutInitWindowSize( 400, 400 );
glutCreateWindow( argv[0] );
myinit();
glutDisplayFunc( display );
glutReshapeFunc( reshape );
glutMainLoop();
return 0;
usage();
glutInit(&argc, argv);
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize (400, 400);
glutCreateWindow (argv[0]);
myinit ();
glutDisplayFunc(display);
glutReshapeFunc(reshape);
glutMainLoop();
return 0;
}

View File

@@ -1,20 +1,12 @@
/* $Id: texcyl.c,v 1.2 1999/10/21 16:39:06 brianp Exp $ */
/* $Id: texcyl.c,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* Textured cylinder demo: lighting, texturing, reflection mapping.
*
* Command line options:
* -info print GL implementation information
*
*
* Brian Paul May 1997 This program is in the public domain.
*/
/*
* $Log: texcyl.c,v $
* Revision 1.2 1999/10/21 16:39:06 brianp
* added -info command line option
*
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
@@ -179,7 +171,7 @@ static void SpecialKey( int key, int x, int y )
}
static void Init( int argc, char *argv[] )
static void Init( void )
{
GLUquadricObj *q = gluNewQuadric();
CylinderObj = glGenLists(1);
@@ -234,13 +226,6 @@ static void Init( int argc, char *argv[] )
glEnable(GL_CULL_FACE); /* don't need Z testing for convex objects */
SetMode(LIT);
if (argc > 1 && strcmp(argv[1], "-info")==0) {
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS));
}
}
@@ -253,7 +238,7 @@ int main( int argc, char *argv[] )
glutCreateWindow(argv[0] );
Init(argc, argv);
Init();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );

View File

@@ -1,4 +1,4 @@
/* $Id: texobj.c,v 1.1.1.1.2.2 2000/03/01 03:36:35 brianp Exp $ */
/* $Id: texobj.c,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* Example of using the 1.1 texture object functions.
@@ -10,12 +10,6 @@
/*
* $Log: texobj.c,v $
* Revision 1.1.1.1.2.2 2000/03/01 03:36:35 brianp
* test for GL 1.2
*
* Revision 1.1.1.1.2.1 2000/02/25 23:24:28 brianp
* fixed bug when using display lists
*
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
@@ -40,7 +34,7 @@ static GLfloat Angle = 0.0f;
static GLboolean HaveTexObj = GL_FALSE;
#if defined(GL_VERSION_1_1) || defined(GL_VERSION_1_2)
#if defined(GL_VERSION_1_1)
# define TEXTURE_OBJECT 1
#elif defined(GL_EXT_texture_object)
# define TEXTURE_OBJECT 1
@@ -90,7 +84,7 @@ static void draw( void )
#endif
}
else {
glCallList( TexObj[1] );
glCallList( TexObj[0] );
}
glBegin( GL_POLYGON );
glTexCoord2f( 0.0, 0.0 ); glVertex2f( -1.0, -1.0 );
@@ -278,8 +272,7 @@ int main( int argc, char *argv[] )
char *exten = (char *) glGetString( GL_EXTENSIONS );
char *version = (char *) glGetString( GL_VERSION );
if ( strstr( exten, "GL_EXT_texture_object" )
|| strncmp( version, "1.1", 3 )==0
|| strncmp( version, "1.2", 3 )==0 ) {
|| strncmp( version, "1.1", 3 )==0 ) {
HaveTexObj = GL_TRUE;
}
}

View File

@@ -1,4 +1,4 @@
/* $Id: trispd.c,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
/* $Id: trispd.c,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* Simple GLUT program to measure triangle strip rendering speed.
@@ -7,8 +7,8 @@
/*
* $Log: trispd.c,v $
* Revision 1.1 1999/08/19 00:55:40 jtg
* Initial revision
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 3.4 1999/03/28 18:24:37 brianp
* minor clean-up

View File

@@ -1,4 +1,4 @@
/* $Id: winpos.c,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
/* $Id: winpos.c,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $ */
/*
* Example of how to use the GL_MESA_window_pos extension.
@@ -8,8 +8,8 @@
/*
* $Log: winpos.c,v $
* Revision 1.1 1999/08/19 00:55:40 jtg
* Initial revision
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 3.3 1999/03/28 18:24:37 brianp
* minor clean-up

View File

@@ -1,377 +0,0 @@
/*
test program for the ggi-mesa driver
Copyright (C) 1997,1998 Uwe Maurer - uwe_maurer@t-online.de
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <sys/time.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <GL/gl.h>
#include <GL/ggimesa.h>
#include <ggi/ggi.h>
#include <stdlib.h>
ggi_visual_t vis,vis_mem;
GGIMesaContext ctx;
int screen_x=GGI_AUTO,screen_y=GGI_AUTO;
ggi_graphtype bpp=GT_AUTO;
//#define ZBUFFER
//#define SMOOTH_NORMALS
void Init()
{
GLfloat h=(GLfloat)3/4;
GLfloat pos[4]={5,5,-20,0};
GLfloat specular[4]={.4,.4,.4,1};
GLfloat diffuse[4]={.3,.3,.3,1};
GLfloat ambient[4]={.2,.2,.2,1};
int err;
if (ggiInit()<0)
{
printf("ggiInit() failed\n");
exit(1);
}
ctx=GGIMesaCreateContext();
if (ctx==NULL)
{
printf("Can't create Context!\n");
exit(1);
}
vis=ggiOpen(NULL);
vis_mem=ggiOpen("display-memory",NULL);
if (vis==NULL || vis_mem==NULL)
{
printf("Can't open ggi_visuals!\n");
exit(1);
}
err=ggiSetGraphMode(vis,screen_x,screen_y,screen_x,screen_y,bpp);
err+=ggiSetGraphMode(vis_mem,screen_x,screen_y,screen_x,screen_y,bpp);
if (err)
{
printf("Can't set %ix%i\n",screen_x,screen_y);
exit(1);
}
if (GGIMesaSetVisual(ctx,vis_mem,GL_TRUE,GL_FALSE)<0)
{
printf("GGIMesaSetVisual() failed!\n");
exit(1);
}
GGIMesaMakeCurrent(ctx);
glViewport(0,0,screen_x,screen_y);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(-1,1,-h,h,1,50);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(0,0,-9);
glShadeModel(GL_FLAT);
glFrontFace(GL_CW);
glEnable(GL_CULL_FACE);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glLightfv(GL_LIGHT0,GL_POSITION,pos);
glLightfv(GL_LIGHT0,GL_DIFFUSE,diffuse);
glLightfv(GL_LIGHT0,GL_AMBIENT,ambient);
glLightfv(GL_LIGHT0,GL_SPECULAR,specular);
#ifdef ZBUFFER
glEnable(GL_DEPTH_TEST);
#endif
}
#define MAX_VERTS 1000
#define MAX_TRIS 2000
#define MAX_LEN 1024
#define MAX_F 100000000
void LoadAsc(GLuint *list,char *file)
{
FILE *fp;
GLfloat p[MAX_VERTS][3];
GLfloat normal[MAX_VERTS][3];
float ncount[MAX_VERTS];
int v[MAX_TRIS][3];
char line[MAX_LEN];
char *s;
int i,j;
int verts,faces;
GLuint v0,v1,v2;
GLfloat n[3];
GLfloat len,k;
GLfloat min[3]={MAX_F,MAX_F,MAX_F};
GLfloat max[3]={-MAX_F,-MAX_F,-MAX_F};
char *coord_str[]={"X","Z","Y"};
fp=fopen(file,"r");
if (!fp)
{
printf("Can't open %s!\n",file);
exit(1);
}
while (strncmp(fgets(line,MAX_LEN,fp),"Tri-mesh",8)) ;
s=strstr(line,":")+1;
verts=atoi(s);
s=strstr(s,":")+1;
faces=atoi(s);
if (verts>MAX_VERTS)
{
printf("Too many vertices..\n");
exit(1);
}
while (strncmp(fgets(line,MAX_LEN,fp),"Vertex list",11)) ;
for (i=0;i<verts;i++)
{
while (strncmp(fgets(line,MAX_LEN,fp),"Vertex",6)) ;
for (j=0;j<3;j++)
{
s=strstr(line,coord_str[j])+2;
k=atoi(s);
if (k>max[j]) max[j]=k;
if (k<min[j]) min[j]=k;
p[i][j]=k;
}
}
len=0;
for (i=0;i<3;i++)
{
k=max[i]-min[i];
if (k>len) {len=k;j=i;}
n[i]=(max[i]+min[i])/2;
}
len/=2;
for (i=0;i<verts;i++)
{
for (j=0;j<3;j++)
{
p[i][j]-=n[j];
p[i][j]/=len;
}
}
*list=glGenLists(1);
glNewList(*list,GL_COMPILE);
glBegin(GL_TRIANGLES);
memset(ncount,0,sizeof(ncount));
memset(normal,0,sizeof(normal));
while (strncmp(fgets(line,MAX_LEN,fp),"Face list",9)) ;
for (i=0;i<faces;i++)
{
while (strncmp(fgets(line,MAX_LEN,fp),"Face",4)) ;
s=strstr(line,"A")+2;
v0=v[i][0]=atoi(s);
s=strstr(line,"B")+2;
v1=v[i][1]=atoi(s);
s=strstr(line,"C")+2;
v2=v[i][2]=atoi(s);
n[0]=((p[v1][1]-p[v0][1])*(p[v2][2]-p[v0][2])
- (p[v1][2]-p[v0][2])*(p[v2][1]-p[v0][1]));
n[1]=((p[v1][2]-p[v0][2])*(p[v2][0]-p[v0][0])
- (p[v1][0]-p[v0][0])*(p[v2][2]-p[v0][2]));
n[2]=((p[v1][0]-p[v0][0])*(p[v2][1]-p[v0][1])
- (p[v1][1]-p[v0][1])*(p[v2][0]-p[v0][0]));
len=n[0]*n[0]+n[1]*n[1]+n[2]*n[2];
len=sqrt(len);
n[0]/=len;
n[1]/=len;
n[2]/=len;
#ifdef SMOOTH_NORMALS
for (j=0;j<3;j++){
normal[v[i][j]][0]+=n[0];
normal[v[i][j]][1]+=n[1];
normal[v[i][j]][2]+=n[2];
ncount[v[i][j]]++;
}
#else
glNormal3fv(n);
for (j=0;j<3;j++)
glVertex3fv(p[v[i][j]]);
#endif
}
#ifdef SMOOTH_NORMALS
for (i=0;i<verts;i++) {
for (j=0;j<3;j++) {
normal[i][j]/=ncount[i];
}
}
for (i=0;i<faces;i++) {
for (j=0;j<3;j++) {
glNormal3f(normal[v[i][j]][0],
normal[v[i][j]][1],
normal[v[i][j]][2]);
glVertex3fv(p[v[i][j]]);
}
}
#endif
glEnd();
glEndList();
fclose(fp);
}
double Display(GLuint l,int *maxframes)
{
int x,y;
GLfloat col[]={.25,0,.25,1};
int frames=0;
struct timeval start,stop;
double len;
GLfloat rotate=0;
gettimeofday(&start,NULL);
while(1)
{
glClearColor(0,0,0,0);
glClearIndex(0);
#ifdef ZBUFFER
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
#else
glClear(GL_COLOR_BUFFER_BIT);
#endif
glPushMatrix();
glRotatef(30,1,0,0);
glRotatef(rotate/10,0,0,1);
glTranslatef(-6,-4,0);
for (y=0;y<3;y++)
{
glPushMatrix();
for (x=0;x<5;x++)
{
glPushMatrix();
glRotatef(rotate,y+1,-x-1,0);
col[0]=(GLfloat)(x+1)/4;
col[1]=0;
col[2]=(GLfloat)(y+1)/2;
glMaterialfv(GL_FRONT,GL_AMBIENT,col);
glCallList(l);
glPopMatrix();
glTranslatef(3,0,0);
}
glPopMatrix();
glTranslatef(0,4,0);
}
glPopMatrix();
glFinish();
ggiPutBox(vis,0,0,screen_x,screen_y,ggiDBGetBuffer(vis,0)->read);
rotate+=10;
frames++;
if (frames==(*maxframes)) break;
if (ggiKbhit(vis))
{
*maxframes=frames;
break;
}
}
gettimeofday(&stop,NULL);
len=(double)(stop.tv_sec-start.tv_sec)+
(double)(stop.tv_usec-start.tv_usec)/1e6;
return len;
}
void visible(int vis)
{
if (vis == GLUT_VISIBLE)
glutIdleFunc(idle);
else
glutIdleFunc(NULL);
}
int main(int argc, char *argv[])
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
glutInitWindowPosition(0, 0);
glutInitWindowSize(300, 300);
glutCreateWindow("asc-view");
init();
glutDisplayFunc(draw);
glutReshapeFunc(reshape);
glutKeyboardFunc(key);
glutSpecialFunc(special);
glutVisibilityFunc(visible);
glutMainLoop();
#if 0
GLuint l;
char *file;
int maxframes=0;
double len;
Init();
file=(argc>1) ? argv[1] : "asc/box.asc";
if (argc>2) maxframes=atoi(argv[2]);
if (argc==1)
{
printf("usage: %s filename.asc\n",argv[0]);
}
LoadAsc(&l,file);
len=Display(l,&maxframes);
printf("\ttime: %.3f sec\n",len);
printf("\tframes: %i\n",maxframes);
printf("\tfps: %.3f \n",(double)maxframes/len);
GGIMesaDestroyContext(ctx);
ggiClose(vis);
ggiClose(vis_mem);
ggiExit();
#endif
return 0;
}

View File

@@ -1,2 +0,0 @@
Terminating on signal 11

View File

@@ -1,7 +0,0 @@
#!/bin/sh
function foobar() {
echo "foo!"
}
foobar

View File

@@ -1,66 +0,0 @@
Ambient light color: Red=0.039216 Green=0.039216 Blue=0.039216
Named object: "Object01"
Tri-mesh, Vertices: 8 Faces: 12
Vertex list:
Vertex 0: X: -20 Y: -19.999998 Z: 20.000002
Vertex 1: X: 20 Y: -19.999998 Z: 20.000002
Vertex 2: X: 20 Y: 20.000002 Z: 19.999998
Vertex 3: X: -20 Y: 20.000002 Z: 19.999998
Vertex 4: X: -20 Y: -20.000002 Z: -19.999998
Vertex 5: X: 20 Y: -20.000002 Z: -19.999998
Vertex 6: X: 20 Y: 19.999998 Z: -20.000002
Vertex 7: X: -20 Y: 19.999998 Z: -20.000002
Face list:
Face 0: A:0 B:1 C:2 AB:1 BC:1 CA:0
Smoothing: 1
Face 1: A:0 B:2 C:3 AB:0 BC:1 CA:1
Smoothing: 1
Face 2: A:0 B:4 C:5 AB:1 BC:1 CA:0
Smoothing: 2
Face 3: A:0 B:5 C:1 AB:0 BC:1 CA:1
Smoothing: 2
Face 4: A:1 B:5 C:6 AB:1 BC:1 CA:0
Smoothing: 3
Face 5: A:1 B:6 C:2 AB:0 BC:1 CA:1
Smoothing: 3
Face 6: A:2 B:6 C:7 AB:1 BC:1 CA:0
Smoothing: 4
Face 7: A:2 B:7 C:3 AB:0 BC:1 CA:1
Smoothing: 4
Face 8: A:3 B:7 C:4 AB:1 BC:1 CA:0
Smoothing: 5
Face 9: A:3 B:4 C:0 AB:0 BC:1 CA:1
Smoothing: 5
Face 10: A:4 B:7 C:6 AB:1 BC:1 CA:0
Smoothing: 6
Face 11: A:4 B:6 C:5 AB:0 BC:1 CA:1
Smoothing: 6
Page 1

View File

@@ -1,198 +0,0 @@
Ambient light color: Red=0.039216 Green=0.039216 Blue=0.039216
Named object: "Object01"
Tri-mesh, Vertices: 34 Faces: 64
Vertex list:
Vertex 0: X: 60.167416 Y: -87.419525 Z: -53.3088
Vertex 1: X: 76.70787 Y: -87.419518 Z: -29.84565
Vertex 2: X: 83.0103 Y: -87.419518 Z: -1.838764
Vertex 3: X: 78.115204 Y: -87.419518 Z: 26.448057
Vertex 4: X: 62.767834 Y: -87.41951 Z: 50.708401
Vertex 5: X: 39.304672 Y: -87.41951 Z: 67.248848
Vertex 6: X: 11.297782 Y: -87.41951 Z: 73.551254
Vertex 7: X: -16.989004 Y: -87.41951 Z: 68.656158
Vertex 8: X: -41.249344 Y: -87.41951 Z: 53.308777
Vertex 9: X: -57.789783 Y: -87.419518 Z: 29.845612
Vertex 10: X: -64.092194 Y: -87.419518 Z: 1.838721
Vertex 11: X: -59.197079 Y: -87.419518 Z: -26.448097
Vertex 12: X: -43.849678 Y: -87.419525 Z: -50.708427
Vertex 13: X: -20.386503 Y: -87.419525 Z: -67.248856
Vertex 14: X: 7.62039 Y: -87.419525 Z: -73.551239
Vertex 15: X: 35.907204 Y: -87.419525 Z: -68.656105
Vertex 16: X: 101.684875 Y: 94.590591 Z: -96.955391
Vertex 17: X: 131.767838 Y: 94.590591 Z: -54.281792
Vertex 18: X: 143.230377 Y: 94.590599 Z: -3.344275
Vertex 19: X: 134.327423 Y: 94.590607 Z: 48.102379
Vertex 20: X: 106.414383 Y: 94.590607 Z: 92.225876
Vertex 21: X: 63.740765 Y: 94.590607 Z: 122.3088
Vertex 22: X: 12.803238 Y: 94.590614 Z: 133.771301
Vertex 23: X: -38.643349 Y: 94.590607 Z: 124.868355
Vertex 24: X: -82.766846 Y: 94.590607 Z: 96.955307
Vertex 25: X: -112.849762 Y: 94.590607 Z: 54.281677
Vertex 26: X: -124.312256 Y: 94.590599 Z: 3.344152
Vertex 27: X: -115.409271 Y: 94.590591 Z: -48.102493
Vertex 28: X: -87.496201 Y: 94.590591 Z: -92.225967
Vertex 29: X: -44.822552 Y: 94.590591 Z: -122.308861
Vertex 30: X: 6.114983 Y: 94.590584 Z: -133.771332
Vertex 31: X: 57.561623 Y: 94.590591 Z: -124.868301
Vertex 32: X: 9.459057 Y: -87.419518 Z: 0.000008
Vertex 33: X: 9.459057 Y: 94.590599 Z: -0.000008
Face list:
Face 0: A:0 B:1 C:32 AB:1 BC:0 CA:0
Smoothing: 1
Face 1: A:1 B:2 C:32 AB:1 BC:0 CA:0
Smoothing: 1
Face 2: A:2 B:3 C:32 AB:1 BC:0 CA:0
Smoothing: 1
Face 3: A:3 B:4 C:32 AB:1 BC:0 CA:0
Smoothing: 1
Face 4: A:4 B:5 C:32 AB:1 BC:0 CA:0
Smoothing: 1
Face 5: A:5 B:6 C:32 AB:1 BC:0 CA:0
Smoothing: 1
Face 6: A:6 B:7 C:32 AB:1 BC:0 CA:0
Smoothing: 1
Face 7: A:7 B:8 C:32 AB:1 BC:0 CA:0
Smoothing: 1
Face 8: A:8 B:9 C:32 AB:1 BC:0 CA:0
Smoothing: 1
Face 9: A:9 B:10 C:32 AB:1 BC:0 CA:0
Smoothing: 1
Face 10: A:10 B:11 C:32 AB:1 BC:0 CA:0
Page 1
Smoothing: 1
Face 11: A:11 B:12 C:32 AB:1 BC:0 CA:0
Smoothing: 1
Face 12: A:12 B:13 C:32 AB:1 BC:0 CA:0
Smoothing: 1
Face 13: A:13 B:14 C:32 AB:1 BC:0 CA:0
Smoothing: 1
Face 14: A:14 B:15 C:32 AB:1 BC:0 CA:0
Smoothing: 1
Face 15: A:15 B:0 C:32 AB:1 BC:0 CA:0
Smoothing: 1
Face 16: A:0 B:16 C:17 AB:1 BC:1 CA:0
Smoothing: 2
Face 17: A:0 B:17 C:1 AB:0 BC:1 CA:1
Smoothing: 2
Face 18: A:1 B:17 C:18 AB:1 BC:1 CA:0
Smoothing: 3
Face 19: A:1 B:18 C:2 AB:0 BC:1 CA:1
Smoothing: 3
Face 20: A:2 B:18 C:19 AB:1 BC:1 CA:0
Smoothing: 4
Face 21: A:2 B:19 C:3 AB:0 BC:1 CA:1
Smoothing: 4
Face 22: A:3 B:19 C:20 AB:1 BC:1 CA:0
Smoothing: 5
Face 23: A:3 B:20 C:4 AB:0 BC:1 CA:1
Smoothing: 5
Face 24: A:4 B:20 C:21 AB:1 BC:1 CA:0
Smoothing: 6
Face 25: A:4 B:21 C:5 AB:0 BC:1 CA:1
Smoothing: 6
Face 26: A:5 B:21 C:22 AB:1 BC:1 CA:0
Smoothing: 7
Face 27: A:5 B:22 C:6 AB:0 BC:1 CA:1
Smoothing: 7
Face 28: A:6 B:22 C:23 AB:1 BC:1 CA:0
Smoothing: 8
Face 29: A:6 B:23 C:7 AB:0 BC:1 CA:1
Smoothing: 8
Face 30: A:7 B:23 C:24 AB:1 BC:1 CA:0
Smoothing: 9
Face 31: A:7 B:24 C:8 AB:0 BC:1 CA:1
Smoothing: 9
Face 32: A:8 B:24 C:25 AB:1 BC:1 CA:0
Smoothing: 10
Face 33: A:8 B:25 C:9 AB:0 BC:1 CA:1
Smoothing: 10
Face 34: A:9 B:25 C:26 AB:1 BC:1 CA:0
Smoothing: 11
Face 35: A:9 B:26 C:10 AB:0 BC:1 CA:1
Smoothing: 11
Face 36: A:10 B:26 C:27 AB:1 BC:1 CA:0
Smoothing: 12
Face 37: A:10 B:27 C:11 AB:0 BC:1 CA:1
Smoothing: 12
Face 38: A:11 B:27 C:28 AB:1 BC:1 CA:0
Smoothing: 13
Face 39: A:11 B:28 C:12 AB:0 BC:1 CA:1
Smoothing: 13
Face 40: A:12 B:28 C:29 AB:1 BC:1 CA:0
Smoothing: 14
Page 2
Face 41: A:12 B:29 C:13 AB:0 BC:1 CA:1
Smoothing: 14
Face 42: A:13 B:29 C:30 AB:1 BC:1 CA:0
Smoothing: 15
Face 43: A:13 B:30 C:14 AB:0 BC:1 CA:1
Smoothing: 15
Face 44: A:14 B:30 C:31 AB:1 BC:1 CA:0
Smoothing: 16
Face 45: A:14 B:31 C:15 AB:0 BC:1 CA:1
Smoothing: 16
Face 46: A:15 B:31 C:16 AB:1 BC:1 CA:0
Smoothing: 17
Face 47: A:15 B:16 C:0 AB:0 BC:1 CA:1
Smoothing: 17
Face 48: A:16 B:33 C:17 AB:0 BC:0 CA:1
Smoothing: 18
Face 49: A:17 B:33 C:18 AB:0 BC:0 CA:1
Smoothing: 18
Face 50: A:18 B:33 C:19 AB:0 BC:0 CA:1
Smoothing: 18
Face 51: A:19 B:33 C:20 AB:0 BC:0 CA:1
Smoothing: 18
Face 52: A:20 B:33 C:21 AB:0 BC:0 CA:1
Smoothing: 18
Face 53: A:21 B:33 C:22 AB:0 BC:0 CA:1
Smoothing: 18
Face 54: A:22 B:33 C:23 AB:0 BC:0 CA:1
Smoothing: 18
Face 55: A:23 B:33 C:24 AB:0 BC:0 CA:1
Smoothing: 18
Face 56: A:24 B:33 C:25 AB:0 BC:0 CA:1
Smoothing: 18
Face 57: A:25 B:33 C:26 AB:0 BC:0 CA:1
Smoothing: 18
Face 58: A:26 B:33 C:27 AB:0 BC:0 CA:1
Smoothing: 18
Face 59: A:27 B:33 C:28 AB:0 BC:0 CA:1
Smoothing: 18
Face 60: A:28 B:33 C:29 AB:0 BC:0 CA:1
Smoothing: 18
Face 61: A:29 B:33 C:30 AB:0 BC:0 CA:1
Smoothing: 18
Face 62: A:30 B:33 C:31 AB:0 BC:0 CA:1
Smoothing: 18
Face 63: A:31 B:33 C:16 AB:0 BC:0 CA:1
Smoothing: 18
Page 3

View File

@@ -1,340 +0,0 @@
/* $Id: gears.c,v 1.3 1999/08/22 08:56:50 jtaylor Exp $ */
/*
* 3-D gear wheels. This program is in the public domain.
*
* Brian Paul
*/
/* Conversion to GLUT by Mark J. Kilgard */
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <GL/glut.h>
#ifndef M_PI
#define M_PI 3.14159265
#endif
static GLint T0 = 0;
static GLint Frames = 0;
/**
Draw a gear wheel. You'll probably want to call this function when
building a display list since we do a lot of trig here.
Input: inner_radius - radius of hole at center
outer_radius - radius at center of teeth
width - width of gear
teeth - number of teeth
tooth_depth - depth of tooth
**/
static void
gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width,
GLint teeth, GLfloat tooth_depth)
{
GLint i;
GLfloat r0, r1, r2;
GLfloat angle, da;
GLfloat u, v, len;
r0 = inner_radius;
r1 = outer_radius - tooth_depth / 2.0;
r2 = outer_radius + tooth_depth / 2.0;
da = 2.0 * M_PI / teeth / 4.0;
glShadeModel(GL_FLAT);
glNormal3f(0.0, 0.0, 1.0);
/* draw front face */
glBegin(GL_QUAD_STRIP);
for (i = 0; i <= teeth; i++) {
angle = i * 2.0 * M_PI / teeth;
glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5);
glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5);
if (i < teeth) {
glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5);
glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5);
}
}
glEnd();
/* draw front sides of teeth */
glBegin(GL_QUADS);
da = 2.0 * M_PI / teeth / 4.0;
for (i = 0; i < teeth; i++) {
angle = i * 2.0 * M_PI / teeth;
glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5);
glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5);
glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), width * 0.5);
glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5);
}
glEnd();
glNormal3f(0.0, 0.0, -1.0);
/* draw back face */
glBegin(GL_QUAD_STRIP);
for (i = 0; i <= teeth; i++) {
angle = i * 2.0 * M_PI / teeth;
glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5);
glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5);
if (i < teeth) {
glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5);
glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5);
}
}
glEnd();
/* draw back sides of teeth */
glBegin(GL_QUADS);
da = 2.0 * M_PI / teeth / 4.0;
for (i = 0; i < teeth; i++) {
angle = i * 2.0 * M_PI / teeth;
glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5);
glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), -width * 0.5);
glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5);
glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5);
}
glEnd();
/* draw outward faces of teeth */
glBegin(GL_QUAD_STRIP);
for (i = 0; i < teeth; i++) {
angle = i * 2.0 * M_PI / teeth;
glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5);
glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5);
u = r2 * cos(angle + da) - r1 * cos(angle);
v = r2 * sin(angle + da) - r1 * sin(angle);
len = sqrt(u * u + v * v);
u /= len;
v /= len;
glNormal3f(v, -u, 0.0);
glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5);
glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5);
glNormal3f(cos(angle), sin(angle), 0.0);
glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), width * 0.5);
glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), -width * 0.5);
u = r1 * cos(angle + 3 * da) - r2 * cos(angle + 2 * da);
v = r1 * sin(angle + 3 * da) - r2 * sin(angle + 2 * da);
glNormal3f(v, -u, 0.0);
glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5);
glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5);
glNormal3f(cos(angle), sin(angle), 0.0);
}
glVertex3f(r1 * cos(0), r1 * sin(0), width * 0.5);
glVertex3f(r1 * cos(0), r1 * sin(0), -width * 0.5);
glEnd();
glShadeModel(GL_SMOOTH);
/* draw inside radius cylinder */
glBegin(GL_QUAD_STRIP);
for (i = 0; i <= teeth; i++) {
angle = i * 2.0 * M_PI / teeth;
glNormal3f(-cos(angle), -sin(angle), 0.0);
glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5);
glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5);
}
glEnd();
}
static GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 0.0;
static GLint gear1, gear2, gear3;
static GLfloat angle = 0.0;
static void
draw(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glPushMatrix();
glRotatef(view_rotx, 1.0, 0.0, 0.0);
glRotatef(view_roty, 0.0, 1.0, 0.0);
glRotatef(view_rotz, 0.0, 0.0, 1.0);
glPushMatrix();
glTranslatef(-3.0, -2.0, 0.0);
glRotatef(angle, 0.0, 0.0, 1.0);
glCallList(gear1);
glPopMatrix();
glPushMatrix();
glTranslatef(3.1, -2.0, 0.0);
glRotatef(-2.0 * angle - 9.0, 0.0, 0.0, 1.0);
glCallList(gear2);
glPopMatrix();
glPushMatrix();
glTranslatef(-3.1, 4.2, 0.0);
glRotatef(-2.0 * angle - 25.0, 0.0, 0.0, 1.0);
glCallList(gear3);
glPopMatrix();
glPopMatrix();
glutSwapBuffers();
Frames++;
{
GLint t = glutGet(GLUT_ELAPSED_TIME);
if (t - T0 >= 5000) {
GLfloat seconds = (t - T0) / 1000.0;
GLfloat fps = Frames / seconds;
printf("%d frames in %g seconds = %g FPS\n", Frames, seconds, fps);
T0 = t;
Frames = 0;
}
}
}
static void
idle(void)
{
angle += 2.0;
glutPostRedisplay();
}
/* change view angle, exit upon ESC */
/* ARGSUSED1 */
static void
key(unsigned char k, int x, int y)
{
switch (k) {
case 'z':
view_rotz += 5.0;
break;
case 'Z':
view_rotz -= 5.0;
break;
case 27: /* Escape */
exit(0); /* FIXME: Shutdown and free resources cleanly in ggiglut */
break;
default:
return;
}
glutPostRedisplay();
}
/* change view angle */
/* ARGSUSED1 */
static void
special(int k, int x, int y)
{
switch (k) {
case GLUT_KEY_UP:
view_rotx += 5.0;
break;
case GLUT_KEY_DOWN:
view_rotx -= 5.0;
break;
case GLUT_KEY_LEFT:
view_roty += 5.0;
break;
case GLUT_KEY_RIGHT:
view_roty -= 5.0;
break;
default:
return;
}
glutPostRedisplay();
}
/* new window size or exposure */
static void
reshape(int width, int height)
{
GLfloat h = (GLfloat) height / (GLfloat) width;
glViewport(0, 0, (GLint) width, (GLint) height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(-1.0, 1.0, -h, h, 5.0, 60.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(0.0, 0.0, -40.0);
}
static void
init(void)
{
static GLfloat pos[4] =
{5.0, 5.0, 10.0, 0.0};
static GLfloat red[4] =
{0.8, 0.1, 0.0, 1.0};
static GLfloat green[4] =
{0.0, 0.8, 0.2, 1.0};
static GLfloat blue[4] =
{0.2, 0.2, 1.0, 1.0};
glLightfv(GL_LIGHT0, GL_POSITION, pos);
glEnable(GL_CULL_FACE);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glEnable(GL_DEPTH_TEST);
/* make the gears */
gear1 = glGenLists(1);
glNewList(gear1, GL_COMPILE);
glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red);
gear(1.0, 4.0, 1.0, 20, 0.7);
glEndList();
gear2 = glGenLists(1);
glNewList(gear2, GL_COMPILE);
glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green);
gear(0.5, 2.0, 2.0, 10, 0.7);
glEndList();
gear3 = glGenLists(1);
glNewList(gear3, GL_COMPILE);
glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue);
gear(1.3, 2.0, 0.5, 10, 0.7);
glEndList();
glEnable(GL_NORMALIZE);
}
void
visible(int vis)
{
if (vis == GLUT_VISIBLE)
glutIdleFunc(idle);
else
glutIdleFunc(NULL);
}
int main(int argc, char *argv[])
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
// glutInitWindowPosition(0, 0);
// glutInitWindowSize(300, 300);
glutCreateWindow("Gears");
init();
glutDisplayFunc(draw);
glutReshapeFunc(reshape);
glutKeyboardFunc(key);
glutSpecialFunc(special);
glutVisibilityFunc(visible);
glutMainLoop();
return 0;
}

View File

@@ -1,359 +0,0 @@
/* gears.c */
/*
* 3-D gear wheels. This program is in the public domain.
*
* Brian Paul
* modified by Uwe Maurer (uwe_maurer@t-online.de)
*/
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <ggi/ggi.h>
#include <GL/ggimesa.h>
#ifndef M_PI
# define M_PI 3.14159265
#endif
ggi_visual_t vis;
char text[100];
/*
* Draw a gear wheel. You'll probably want to call this function when
* building a display list since we do a lot of trig here.
*
* Input: inner_radius - radius of hole at center
* outer_radius - radius at center of teeth
* width - width of gear
* teeth - number of teeth
* tooth_depth - depth of tooth
*/
static void gear( GLfloat inner_radius, GLfloat outer_radius, GLfloat width,
GLint teeth, GLfloat tooth_depth )
{
GLint i;
GLfloat r0, r1, r2;
GLfloat angle, da;
GLfloat u, v, len;
r0 = inner_radius;
r1 = outer_radius - tooth_depth/2.0;
r2 = outer_radius + tooth_depth/2.0;
da = 2.0*M_PI / teeth / 4.0;
glShadeModel( GL_FLAT );
glNormal3f( 0.0, 0.0, 1.0 );
/* draw front face */
glBegin( GL_QUAD_STRIP );
for (i=0;i<=teeth;i++) {
angle = i * 2.0*M_PI / teeth;
glVertex3f( r0*cos(angle), r0*sin(angle), width*0.5 );
glVertex3f( r1*cos(angle), r1*sin(angle), width*0.5 );
glVertex3f( r0*cos(angle), r0*sin(angle), width*0.5 );
glVertex3f( r1*cos(angle+3*da), r1*sin(angle+3*da), width*0.5 );
}
glEnd();
/* draw front sides of teeth */
glBegin( GL_QUADS );
da = 2.0*M_PI / teeth / 4.0;
for (i=0;i<teeth;i++) {
angle = i * 2.0*M_PI / teeth;
glVertex3f( r1*cos(angle), r1*sin(angle), width*0.5 );
glVertex3f( r2*cos(angle+da), r2*sin(angle+da), width*0.5 );
glVertex3f( r2*cos(angle+2*da), r2*sin(angle+2*da), width*0.5 );
glVertex3f( r1*cos(angle+3*da), r1*sin(angle+3*da), width*0.5 );
}
glEnd();
glNormal3f( 0.0, 0.0, -1.0 );
/* draw back face */
glBegin( GL_QUAD_STRIP );
for (i=0;i<=teeth;i++) {
angle = i * 2.0*M_PI / teeth;
glVertex3f( r1*cos(angle), r1*sin(angle), -width*0.5 );
glVertex3f( r0*cos(angle), r0*sin(angle), -width*0.5 );
glVertex3f( r1*cos(angle+3*da), r1*sin(angle+3*da), -width*0.5 );
glVertex3f( r0*cos(angle), r0*sin(angle), -width*0.5 );
}
glEnd();
/* draw back sides of teeth */
glBegin( GL_QUADS );
da = 2.0*M_PI / teeth / 4.0;
for (i=0;i<teeth;i++) {
angle = i * 2.0*M_PI / teeth;
glVertex3f( r1*cos(angle+3*da), r1*sin(angle+3*da), -width*0.5 );
glVertex3f( r2*cos(angle+2*da), r2*sin(angle+2*da), -width*0.5 );
glVertex3f( r2*cos(angle+da), r2*sin(angle+da), -width*0.5 );
glVertex3f( r1*cos(angle), r1*sin(angle), -width*0.5 );
}
glEnd();
/* draw outward faces of teeth */
glBegin( GL_QUAD_STRIP );
for (i=0;i<teeth;i++) {
angle = i * 2.0*M_PI / teeth;
glVertex3f( r1*cos(angle), r1*sin(angle), width*0.5 );
glVertex3f( r1*cos(angle), r1*sin(angle), -width*0.5 );
u = r2*cos(angle+da) - r1*cos(angle);
v = r2*sin(angle+da) - r1*sin(angle);
len = sqrt( u*u + v*v );
u /= len;
v /= len;
glNormal3f( v, -u, 0.0 );
glVertex3f( r2*cos(angle+da), r2*sin(angle+da), width*0.5 );
glVertex3f( r2*cos(angle+da), r2*sin(angle+da), -width*0.5 );
glNormal3f( cos(angle), sin(angle), 0.0 );
glVertex3f( r2*cos(angle+2*da), r2*sin(angle+2*da), width*0.5 );
glVertex3f( r2*cos(angle+2*da), r2*sin(angle+2*da), -width*0.5 );
u = r1*cos(angle+3*da) - r2*cos(angle+2*da);
v = r1*sin(angle+3*da) - r2*sin(angle+2*da);
glNormal3f( v, -u, 0.0 );
glVertex3f( r1*cos(angle+3*da), r1*sin(angle+3*da), width*0.5 );
glVertex3f( r1*cos(angle+3*da), r1*sin(angle+3*da), -width*0.5 );
glNormal3f( cos(angle), sin(angle), 0.0 );
}
glVertex3f( r1*cos(0), r1*sin(0), width*0.5 );
glVertex3f( r1*cos(0), r1*sin(0), -width*0.5 );
glEnd();
glShadeModel( GL_SMOOTH );
/* draw inside radius cylinder */
glBegin( GL_QUAD_STRIP );
for (i=0;i<=teeth;i++) {
angle = i * 2.0*M_PI / teeth;
glNormal3f( -cos(angle), -sin(angle), 0.0 );
glVertex3f( r0*cos(angle), r0*sin(angle), -width*0.5 );
glVertex3f( r0*cos(angle), r0*sin(angle), width*0.5 );
}
glEnd();
}
static GLfloat view_rotx=20.0, view_roty=30.0, view_rotz=0.0;
static GLint gear1, gear2, gear3;
static GLfloat angle = 0.0;
static GLuint limit;
static GLuint count = 1;
static void draw( void )
{
glClearColor(0,0,0,0);
glClearIndex(0);
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
glPushMatrix();
glRotatef( view_rotx, 1.0, 0.0, 0.0 );
glRotatef( view_roty, 0.0, 1.0, 0.0 );
glRotatef( view_rotz, 0.0, 0.0, 1.0 );
glPushMatrix();
glTranslatef( -3.0, -2.0, 0.0 );
glRotatef( angle, 0.0, 0.0, 1.0 );
glCallList(gear1);
glPopMatrix();
glPushMatrix();
glTranslatef( 3.1, -2.0, 0.0 );
glRotatef( -2.0*angle-9.0, 0.0, 0.0, 1.0 );
glCallList(gear2);
glPopMatrix();
glPushMatrix();
glTranslatef( -3.1, 4.2, 0.0 );
glRotatef( -2.0*angle-25.0, 0.0, 0.0, 1.0 );
glCallList(gear3);
glPopMatrix();
glPopMatrix();
glFlush();
glFinish();
#if 0
ggiSetGCForeground(vis,255);
ggiPuts(vis,0,0,"Mesa -> GGI");
ggiPuts(vis,0,ggiGetInfo(vis)->mode->visible.y," Mesa -> GGI");
ggiPuts(vis,0,16,text);
ggiPuts(vis,0,ggiGetInfo(vis)->mode->visible.y+16,text);
#endif
GGIMesaSwapBuffers();
count++;
if (count==limit) {
exit(1);
}
}
static void idle( void )
{
angle += 2.0;
draw();
}
/* new window size or exposure */
static void reshape( int width, int height )
{
GLfloat h = (GLfloat) height / (GLfloat) width;
glViewport(0, 0, (GLint)width, (GLint)height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum( -1.0, 1.0, -h, h, 5.0, 60.0 );
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef( 0.0, 0.0, -40.0 );
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
}
static void init( void )
{
static GLfloat pos[4] = {5.0, 5.0, 10.0, 0.0 };
static GLfloat red[4] = {0.8, 0.1, 0.0, 1.0 };
static GLfloat green[4] = {0.0, 0.8, 0.2, 1.0 };
static GLfloat blue[4] = {0.2, 0.2, 1.0, 1.0 };
glLightfv( GL_LIGHT0, GL_POSITION, pos );
glEnable( GL_CULL_FACE );
glEnable( GL_LIGHTING );
glEnable( GL_LIGHT0 );
glEnable( GL_DEPTH_TEST );
/* make the gears */
gear1 = glGenLists(1);
glNewList(gear1, GL_COMPILE);
glMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red );
glIndexi(1);
gear( 1.0, 4.0, 1.0, 20, 0.7 );
glEndList();
gear2 = glGenLists(1);
glNewList(gear2, GL_COMPILE);
glMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green );
glIndexi(2);
gear( 0.5, 2.0, 2.0, 10, 0.7 );
glEndList();
gear3 = glGenLists(1);
glNewList(gear3, GL_COMPILE);
glMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue );
glIndexi(3);
gear( 1.3, 2.0, 0.5, 10, 0.7 );
glEndList();
glEnable( GL_NORMALIZE );
}
static void usage(char *s)
{
printf("%s visible_x visible_y virtual_x virtual_y bpp db_flag\n",s);
printf("example:\n");
printf("%s 320 200 320 400 8 1\n",s);
exit(1);
}
int main( int argc, char *argv[] )
{
GGIMesaContext ctx;
int vis_x,vis_y,vir_x,vir_y,bpp,db_flag,gt;
ggi_mode mode;
limit=0;
if (argc<7) usage(argv[0]);
vis_x=atoi(argv[1]);
vis_y=atoi(argv[2]);
vir_x=atoi(argv[3]);
vir_y=atoi(argv[4]);
bpp=atoi(argv[5]);
db_flag=atoi(argv[6]);
switch(bpp)
{
case 4: gt=GT_4BIT;break;
case 8: gt=GT_8BIT;break;
case 15:gt=GT_15BIT;break;
case 16:gt=GT_16BIT;break;
case 24:gt=GT_24BIT;break;
case 32:gt=GT_32BIT;break;
default:
printf("%i Bits per Pixel ???\n",bpp);
exit(1);
}
sprintf(text,"%sx%s %i colors, RGB mode, %s",
argv[1],argv[2],1<<bpp,
(db_flag) ? "doublebuffer" : "no doublebuffer");
if (ggiInit()<0)
{
printf("ggiInit() failed\n");
exit(1);
}
ctx=GGIMesaCreateContext();
if (ctx==NULL)
{
printf("GGIMesaCreateContext() failed\n");
exit(1);
}
vis=ggiOpen(NULL);
if (vis==NULL)
{
printf("ggiOpen() failed\n");
exit(1);
}
if (ggiSetGraphMode(vis,vis_x,vis_y,vir_x,vir_y,gt)<0)
{
printf("%s: can't set graphmode (%i %i %i %i) %i BPP\n",
argv[0],vis_x,vis_y,vir_x,vir_y,bpp);
exit(1);
}
if (GGIMesaSetVisual(ctx,vis,GL_TRUE,db_flag)<0)
{
printf ("GGIMesaSetVisual() failed\n");
exit(1);
}
GGIMesaMakeCurrent(ctx);
ggiGetMode(vis,&mode);
reshape(mode.visible.x,mode.visible.y);
init();
while (!ggiKbhit(vis)) idle();
GGIMesaDestroyContext(ctx);
ggiClose(vis);
printf("%s\n",text);
ggiExit();
return 0;
}

View File

@@ -1,132 +0,0 @@
Ambient light color: Red=0.039216 Green=0.039216 Blue=0.039216
Named object: "Object01"
Tri-mesh, Vertices: 20 Faces: 36
Vertex list:
Vertex 0: X: -210 Y: -432.781738 Z: 180.000031
Vertex 1: X: -610.810303 Y: 144.260559 Z: 103.580154
Vertex 2: X: 56.586655 Y: 144.260544 Z: -128.902023
Vertex 3: X: -75.776352 Y: 144.260605 Z: 565.321838
Vertex 4: X: -462.815979 Y: -347.937683 Z: 131.797302
Vertex 5: X: -616.506042 Y: -126.67173 Z: 102.494209
Vertex 6: X: -41.847229 Y: -347.937683 Z: -14.843644
Vertex 7: X: 60.375015 Y: -126.671753 Z: -133.291641
Vertex 8: X: -125.336807 Y: -347.937653 Z: 423.046448
Vertex 9: X: -73.868958 Y: -126.671692 Z: 570.797424
Vertex 10: X: -448.353271 Y: 237.304672 Z: -92.34951
Vertex 11: X: -192.440964 Y: 237.304672 Z: -181.494431
Vertex 12: X: 145.038193 Y: 237.304672 Z: 109.754745
Vertex 13: X: 94.283768 Y: 237.304688 Z: 375.953766
Vertex 14: X: -326.684937 Y: 237.304733 Z: 522.594727
Vertex 15: X: -531.842834 Y: 237.304718 Z: 345.540588
Vertex 16: X: -331.419525 Y: -225.964966 Z: -168.564438
Vertex 17: X: 152.575485 Y: -225.964935 Z: 249.129868
Vertex 18: X: -451.155914 Y: -225.964905 Z: 459.434662
Vertex 19: X: -298.413483 Y: 423.31897 Z: 163.142761
Face list:
Face 0: A:0 B:4 C:6 AB:1 BC:1 CA:1
Face 1: A:4 B:5 C:16 AB:1 BC:1 CA:1
Face 2: A:4 B:16 C:6 AB:1 BC:1 CA:1
Face 3: A:6 B:16 C:7 AB:1 BC:1 CA:1
Face 4: A:5 B:1 C:10 AB:1 BC:1 CA:1
Face 5: A:5 B:10 C:16 AB:1 BC:1 CA:1
Face 6: A:16 B:10 C:11 AB:1 BC:1 CA:1
Face 7: A:16 B:11 C:7 AB:1 BC:1 CA:1
Face 8: A:7 B:11 C:2 AB:1 BC:1 CA:1
Face 9: A:0 B:6 C:8 AB:1 BC:1 CA:1
Face 10: A:6 B:7 C:17 AB:1 BC:1 CA:1
Face 11: A:6 B:17 C:8 AB:1 BC:1 CA:1
Face 12: A:8 B:17 C:9 AB:1 BC:1 CA:1
Face 13: A:7 B:2 C:12 AB:1 BC:1 CA:1
Face 14: A:7 B:12 C:17 AB:1 BC:1 CA:1
Face 15: A:17 B:12 C:13 AB:1 BC:1 CA:1
Face 16: A:17 B:13 C:9 AB:1 BC:1 CA:1
Face 17: A:9 B:13 C:3 AB:1 BC:1 CA:1
Face 18: A:0 B:8 C:4 AB:1 BC:1 CA:1
Face 19: A:8 B:9 C:18 AB:1 BC:1 CA:1
Face 20: A:8 B:18 C:4 AB:1 BC:1 CA:1
Face 21: A:4 B:18 C:5 AB:1 BC:1 CA:1
Face 22: A:9 B:3 C:14 AB:1 BC:1 CA:1
Face 23: A:9 B:14 C:18 AB:1 BC:1 CA:1
Face 24: A:18 B:14 C:15 AB:1 BC:1 CA:1
Face 25: A:18 B:15 C:5 AB:1 BC:1 CA:1
Face 26: A:5 B:15 C:1 AB:1 BC:1 CA:1
Face 27: A:1 B:15 C:10 AB:1 BC:1 CA:1
Face 28: A:15 B:14 C:19 AB:1 BC:1 CA:1
Face 29: A:15 B:19 C:10 AB:1 BC:1 CA:1
Face 30: A:10 B:19 C:11 AB:1 BC:1 CA:1
Face 31: A:14 B:3 C:13 AB:1 BC:1 CA:1
Face 32: A:14 B:13 C:19 AB:1 BC:1 CA:1
Face 33: A:19 B:13 C:12 AB:1 BC:1 CA:1
Face 34: A:19 B:12 C:11 AB:1 BC:1 CA:1
Page 1
Face 35: A:11 B:12 C:2 AB:1 BC:1 CA:1
Page 2

View File

@@ -1,264 +0,0 @@
Ambient light color: Red=0.039216 Green=0.039216 Blue=0.039216
Named object: "Object01"
Tri-mesh, Vertices: 40 Faces: 80
Vertex list:
Vertex 0: X: -50.170624 Y: -0.000026 Z: -240.147842
Vertex 1: X: -80.584503 Y: -63.958851 Z: -205.014572
Vertex 2: X: -129.795166 Y: -39.528744 Z: -148.16774
Vertex 3: X: -129.795166 Y: 39.528721 Z: -148.16774
Vertex 4: X: -80.584503 Y: 63.958797 Z: -205.014572
Vertex 5: X: 85.963654 Y: -0.000002 Z: 31.490465
Vertex 6: X: 39.614838 Y: -63.958828 Z: 34.827602
Vertex 7: X: -35.37915 Y: -39.528728 Z: 40.227196
Vertex 8: X: -35.37912 Y: 39.528736 Z: 40.227188
Vertex 9: X: 39.614838 Y: 63.95882 Z: 34.827595
Vertex 10: X: -9.852051 Y: 0.000023 Z: 319.829254
Vertex 11: X: -44.985352 Y: -63.958805 Z: 289.415405
Vertex 12: X: -101.832199 Y: -39.528709 Z: 240.204758
Vertex 13: X: -101.832184 Y: 39.528755 Z: 240.204773
Vertex 14: X: -44.985352 Y: 63.958843 Z: 289.415405
Vertex 15: X: -281.490326 Y: 0.000035 Z: 455.963654
Vertex 16: X: -284.827484 Y: -63.958794 Z: 409.614868
Vertex 17: X: -290.227112 Y: -39.528702 Z: 334.62085
Vertex 18: X: -290.227112 Y: 39.528763 Z: 334.62088
Vertex 19: X: -284.827484 Y: 63.958855 Z: 409.614838
Vertex 20: X: -569.829163 Y: 0.000026 Z: 360.14798
Vertex 21: X: -539.415344 Y: -63.958801 Z: 325.014709
Vertex 22: X: -490.204712 Y: -39.528709 Z: 268.167847
Vertex 23: X: -490.204712 Y: 39.528755 Z: 268.167847
Vertex 24: X: -539.415344 Y: 63.958847 Z: 325.014679
Vertex 25: X: -705.963684 Y: 0.000002 Z: 88.509598
Vertex 26: X: -659.614807 Y: -63.958824 Z: 85.172462
Vertex 27: X: -584.62085 Y: -39.528725 Z: 79.77285
Vertex 28: X: -584.62085 Y: 39.52874 Z: 79.77285
Vertex 29: X: -659.614868 Y: 63.958824 Z: 85.172447
Vertex 30: X: -610.147827 Y: -0.000023 Z: -199.829361
Vertex 31: X: -575.014587 Y: -63.958847 Z: -169.415497
Vertex 32: X: -518.167725 Y: -39.528744 Z: -120.204819
Vertex 33: X: -518.167725 Y: 39.528721 Z: -120.204834
Vertex 34: X: -575.014587 Y: 63.958801 Z: -169.415497
Vertex 35: X: -338.509338 Y: -0.000035 Z: -335.963745
Vertex 36: X: -335.172241 Y: -63.958858 Z: -289.614868
Vertex 37: X: -329.772675 Y: -39.528751 Z: -214.620865
Vertex 38: X: -329.772675 Y: 39.528713 Z: -214.620865
Vertex 39: X: -335.172241 Y: 63.95879 Z: -289.614899
Face list:
Face 0: A:0 B:6 C:1 AB:0 BC:1 CA:1
Smoothing: 1
Face 1: A:0 B:5 C:6 AB:1 BC:1 CA:0
Smoothing: 1
Face 2: A:1 B:7 C:2 AB:0 BC:1 CA:1
Smoothing: 2
Face 3: A:1 B:6 C:7 AB:1 BC:1 CA:0
Smoothing: 2
Face 4: A:2 B:8 C:3 AB:0 BC:1 CA:1
Smoothing: 3
Face 5: A:2 B:7 C:8 AB:1 BC:1 CA:0
Smoothing: 3
Face 6: A:3 B:9 C:4 AB:0 BC:1 CA:1
Smoothing: 4
Face 7: A:3 B:8 C:9 AB:1 BC:1 CA:0
Page 1
Smoothing: 4
Face 8: A:4 B:5 C:0 AB:0 BC:1 CA:1
Smoothing: 5
Face 9: A:4 B:9 C:5 AB:1 BC:1 CA:0
Smoothing: 5
Face 10: A:5 B:11 C:6 AB:0 BC:1 CA:1
Smoothing: 6
Face 11: A:5 B:10 C:11 AB:1 BC:1 CA:0
Smoothing: 6
Face 12: A:6 B:12 C:7 AB:0 BC:1 CA:1
Smoothing: 7
Face 13: A:6 B:11 C:12 AB:1 BC:1 CA:0
Smoothing: 7
Face 14: A:7 B:13 C:8 AB:0 BC:1 CA:1
Smoothing: 8
Face 15: A:7 B:12 C:13 AB:1 BC:1 CA:0
Smoothing: 8
Face 16: A:8 B:14 C:9 AB:0 BC:1 CA:1
Smoothing: 9
Face 17: A:8 B:13 C:14 AB:1 BC:1 CA:0
Smoothing: 9
Face 18: A:9 B:10 C:5 AB:0 BC:1 CA:1
Smoothing: 10
Face 19: A:9 B:14 C:10 AB:1 BC:1 CA:0
Smoothing: 10
Face 20: A:10 B:16 C:11 AB:0 BC:1 CA:1
Smoothing: 11
Face 21: A:10 B:15 C:16 AB:1 BC:1 CA:0
Smoothing: 11
Face 22: A:11 B:17 C:12 AB:0 BC:1 CA:1
Smoothing: 12
Face 23: A:11 B:16 C:17 AB:1 BC:1 CA:0
Smoothing: 12
Face 24: A:12 B:18 C:13 AB:0 BC:1 CA:1
Smoothing: 13
Face 25: A:12 B:17 C:18 AB:1 BC:1 CA:0
Smoothing: 13
Face 26: A:13 B:19 C:14 AB:0 BC:1 CA:1
Smoothing: 14
Face 27: A:13 B:18 C:19 AB:1 BC:1 CA:0
Smoothing: 14
Face 28: A:14 B:15 C:10 AB:0 BC:1 CA:1
Smoothing: 15
Face 29: A:14 B:19 C:15 AB:1 BC:1 CA:0
Smoothing: 15
Face 30: A:15 B:21 C:16 AB:0 BC:1 CA:1
Smoothing: 16
Face 31: A:15 B:20 C:21 AB:1 BC:1 CA:0
Smoothing: 16
Face 32: A:16 B:22 C:17 AB:0 BC:1 CA:1
Smoothing: 17
Face 33: A:16 B:21 C:22 AB:1 BC:1 CA:0
Smoothing: 17
Face 34: A:17 B:23 C:18 AB:0 BC:1 CA:1
Smoothing: 18
Face 35: A:17 B:22 C:23 AB:1 BC:1 CA:0
Smoothing: 18
Face 36: A:18 B:24 C:19 AB:0 BC:1 CA:1
Smoothing: 19
Face 37: A:18 B:23 C:24 AB:1 BC:1 CA:0
Smoothing: 19
Page 2
Face 38: A:19 B:20 C:15 AB:0 BC:1 CA:1
Smoothing: 20
Face 39: A:19 B:24 C:20 AB:1 BC:1 CA:0
Smoothing: 20
Face 40: A:20 B:26 C:21 AB:0 BC:1 CA:1
Smoothing: 21
Face 41: A:20 B:25 C:26 AB:1 BC:1 CA:0
Smoothing: 21
Face 42: A:21 B:27 C:22 AB:0 BC:1 CA:1
Smoothing: 22
Face 43: A:21 B:26 C:27 AB:1 BC:1 CA:0
Smoothing: 22
Face 44: A:22 B:28 C:23 AB:0 BC:1 CA:1
Smoothing: 23
Face 45: A:22 B:27 C:28 AB:1 BC:1 CA:0
Smoothing: 23
Face 46: A:23 B:29 C:24 AB:0 BC:1 CA:1
Smoothing: 24
Face 47: A:23 B:28 C:29 AB:1 BC:1 CA:0
Smoothing: 24
Face 48: A:24 B:25 C:20 AB:0 BC:1 CA:1
Smoothing: 25
Face 49: A:24 B:29 C:25 AB:1 BC:1 CA:0
Smoothing: 25
Face 50: A:25 B:31 C:26 AB:0 BC:1 CA:1
Smoothing: 26
Face 51: A:25 B:30 C:31 AB:1 BC:1 CA:0
Smoothing: 26
Face 52: A:26 B:32 C:27 AB:0 BC:1 CA:1
Smoothing: 27
Face 53: A:26 B:31 C:32 AB:1 BC:1 CA:0
Smoothing: 27
Face 54: A:27 B:33 C:28 AB:0 BC:1 CA:1
Smoothing: 28
Face 55: A:27 B:32 C:33 AB:1 BC:1 CA:0
Smoothing: 28
Face 56: A:28 B:34 C:29 AB:0 BC:1 CA:1
Smoothing: 29
Face 57: A:28 B:33 C:34 AB:1 BC:1 CA:0
Smoothing: 29
Face 58: A:29 B:30 C:25 AB:0 BC:1 CA:1
Smoothing: 30
Face 59: A:29 B:34 C:30 AB:1 BC:1 CA:0
Smoothing: 30
Face 60: A:30 B:36 C:31 AB:0 BC:1 CA:1
Smoothing: 31
Face 61: A:30 B:35 C:36 AB:1 BC:1 CA:0
Smoothing: 31
Face 62: A:31 B:37 C:32 AB:0 BC:1 CA:1
Smoothing: 32
Face 63: A:31 B:36 C:37 AB:1 BC:1 CA:0
Smoothing: 32
Face 64: A:32 B:38 C:33 AB:0 BC:1 CA:1
Smoothing: 1
Face 65: A:32 B:37 C:38 AB:1 BC:1 CA:0
Smoothing: 1
Face 66: A:33 B:39 C:34 AB:0 BC:1 CA:1
Smoothing: 2
Face 67: A:33 B:38 C:39 AB:1 BC:1 CA:0
Smoothing: 2
Face 68: A:34 B:35 C:30 AB:0 BC:1 CA:1
Page 3
Smoothing: 3
Face 69: A:34 B:39 C:35 AB:1 BC:1 CA:0
Smoothing: 3
Face 70: A:35 B:1 C:36 AB:0 BC:1 CA:1
Smoothing: 4
Face 71: A:35 B:0 C:1 AB:1 BC:1 CA:0
Smoothing: 4
Face 72: A:36 B:2 C:37 AB:0 BC:1 CA:1
Smoothing: 5
Face 73: A:36 B:1 C:2 AB:1 BC:1 CA:0
Smoothing: 5
Face 74: A:37 B:3 C:38 AB:0 BC:1 CA:1
Smoothing: 6
Face 75: A:37 B:2 C:3 AB:1 BC:1 CA:0
Smoothing: 6
Face 76: A:38 B:4 C:39 AB:0 BC:1 CA:1
Smoothing: 7
Face 77: A:38 B:3 C:4 AB:1 BC:1 CA:0
Smoothing: 7
Face 78: A:39 B:0 C:35 AB:0 BC:1 CA:1
Smoothing: 8
Face 79: A:39 B:4 C:0 AB:1 BC:1 CA:0
Smoothing: 8
Page 4

View File

@@ -1,396 +0,0 @@
Ambient light color: Red=0.039216 Green=0.039216 Blue=0.039216
Named object: "Object01"
Tri-mesh, Vertices: 64 Faces: 128
Vertex list:
Vertex 0: X: 61.483898 Y: 37.836231 Z: -70.94294
Vertex 1: X: 82.867447 Y: 37.836235 Z: -41.288902
Vertex 2: X: 91.275154 Y: 37.836239 Z: -5.70901
Vertex 3: X: 85.427025 Y: 37.836243 Z: 30.380013
Vertex 4: X: 66.213379 Y: 37.836243 Z: 61.483936
Vertex 5: X: 36.559322 Y: 37.836246 Z: 82.86747
Vertex 6: X: 0.979424 Y: 37.836246 Z: 91.275154
Vertex 7: X: -35.109554 Y: 37.836246 Z: 85.42701
Vertex 8: X: -66.213478 Y: 37.836246 Z: 66.213356
Vertex 9: X: -87.597 Y: 37.836243 Z: 36.559303
Vertex 10: X: -96.004677 Y: 37.836239 Z: 0.979406
Vertex 11: X: -90.156517 Y: 37.836235 Z: -35.109615
Vertex 12: X: -70.942848 Y: 37.836235 Z: -66.213516
Vertex 13: X: -41.288776 Y: 37.836231 Z: -87.597023
Vertex 14: X: -5.708872 Y: 37.836231 Z: -96.004692
Vertex 15: X: 30.380142 Y: 37.836231 Z: -90.156502
Vertex 16: X: 61.483898 Y: -38.14529 Z: -70.942932
Vertex 17: X: 82.867447 Y: -38.145287 Z: -41.288895
Vertex 18: X: 91.275154 Y: -38.145283 Z: -5.709003
Vertex 19: X: 85.427025 Y: -38.145279 Z: 30.38002
Vertex 20: X: 66.213379 Y: -38.145279 Z: 61.483944
Vertex 21: X: 36.559322 Y: -38.145275 Z: 82.867477
Vertex 22: X: 0.979424 Y: -38.145275 Z: 91.275162
Vertex 23: X: -35.109554 Y: -38.145275 Z: 85.427017
Vertex 24: X: -66.213478 Y: -38.145275 Z: 66.213364
Vertex 25: X: -87.597 Y: -38.145279 Z: 36.559311
Vertex 26: X: -96.004677 Y: -38.145283 Z: 0.979412
Vertex 27: X: -90.156517 Y: -38.145287 Z: -35.109608
Vertex 28: X: -70.942848 Y: -38.145287 Z: -66.213516
Vertex 29: X: -41.288776 Y: -38.14529 Z: -87.597015
Vertex 30: X: -5.708872 Y: -38.14529 Z: -96.004684
Vertex 31: X: 30.380142 Y: -38.14529 Z: -90.156494
Vertex 32: X: 29.53923 Y: 37.836235 Z: -36.632011
Vertex 33: X: 40.224194 Y: 37.836239 Z: -21.814436
Vertex 34: X: 44.425369 Y: 37.836239 Z: -4.035822
Vertex 35: X: 41.503166 Y: 37.836239 Z: 13.997195
Vertex 36: X: 31.902466 Y: 37.836243 Z: 29.539249
Vertex 37: X: 17.084883 Y: 37.836243 Z: 40.224201
Vertex 38: X: -0.693734 Y: 37.836243 Z: 44.425365
Vertex 39: X: -18.726728 Y: 37.836243 Z: 41.503159
Vertex 40: X: -34.26878 Y: 37.836243 Z: 31.902454
Vertex 41: X: -44.953732 Y: 37.836239 Z: 17.084871
Vertex 42: X: -49.154892 Y: 37.836239 Z: -0.693745
Vertex 43: X: -46.232677 Y: 37.836239 Z: -18.726759
Vertex 44: X: -36.631962 Y: 37.836235 Z: -34.268806
Vertex 45: X: -21.814371 Y: 37.836235 Z: -44.953747
Vertex 46: X: -4.035751 Y: 37.836235 Z: -49.1549
Vertex 47: X: 13.997261 Y: 37.836235 Z: -46.23267
Vertex 48: X: 29.53923 Y: -38.145287 Z: -36.632004
Vertex 49: X: 40.224194 Y: -38.145283 Z: -21.814428
Vertex 50: X: 44.425369 Y: -38.145283 Z: -4.035816
Vertex 51: X: 41.503166 Y: -38.145283 Z: 13.997201
Vertex 52: X: 31.902466 Y: -38.145279 Z: 29.539257
Vertex 53: X: 17.084883 Y: -38.145279 Z: 40.224209
Vertex 54: X: -0.693734 Y: -38.145279 Z: 44.425373
Vertex 55: X: -18.726728 Y: -38.145279 Z: 41.503166
Page 1
Vertex 56: X: -34.26878 Y: -38.145279 Z: 31.902462
Vertex 57: X: -44.953732 Y: -38.145283 Z: 17.084879
Vertex 58: X: -49.154892 Y: -38.145283 Z: -0.693738
Vertex 59: X: -46.232677 Y: -38.145283 Z: -18.726751
Vertex 60: X: -36.631962 Y: -38.145287 Z: -34.268799
Vertex 61: X: -21.814371 Y: -38.145287 Z: -44.953739
Vertex 62: X: -4.035751 Y: -38.145287 Z: -49.154892
Vertex 63: X: 13.997261 Y: -38.145287 Z: -46.232662
Face list:
Face 0: A:0 B:1 C:17 AB:1 BC:1 CA:0
Smoothing: 1
Face 1: A:0 B:17 C:16 AB:0 BC:1 CA:1
Smoothing: 1
Face 2: A:1 B:2 C:18 AB:1 BC:1 CA:0
Smoothing: 2
Face 3: A:1 B:18 C:17 AB:0 BC:1 CA:1
Smoothing: 2
Face 4: A:2 B:3 C:19 AB:1 BC:1 CA:0
Smoothing: 3
Face 5: A:2 B:19 C:18 AB:0 BC:1 CA:1
Smoothing: 3
Face 6: A:3 B:4 C:20 AB:1 BC:1 CA:0
Smoothing: 4
Face 7: A:3 B:20 C:19 AB:0 BC:1 CA:1
Smoothing: 4
Face 8: A:4 B:5 C:21 AB:1 BC:1 CA:0
Smoothing: 5
Face 9: A:4 B:21 C:20 AB:0 BC:1 CA:1
Smoothing: 5
Face 10: A:5 B:6 C:22 AB:1 BC:1 CA:0
Smoothing: 6
Face 11: A:5 B:22 C:21 AB:0 BC:1 CA:1
Smoothing: 6
Face 12: A:6 B:7 C:23 AB:1 BC:1 CA:0
Smoothing: 7
Face 13: A:6 B:23 C:22 AB:0 BC:1 CA:1
Smoothing: 7
Face 14: A:7 B:8 C:24 AB:1 BC:1 CA:0
Smoothing: 8
Face 15: A:7 B:24 C:23 AB:0 BC:1 CA:1
Smoothing: 8
Face 16: A:8 B:9 C:25 AB:1 BC:1 CA:0
Smoothing: 9
Face 17: A:8 B:25 C:24 AB:0 BC:1 CA:1
Smoothing: 9
Face 18: A:9 B:10 C:26 AB:1 BC:1 CA:0
Smoothing: 10
Face 19: A:9 B:26 C:25 AB:0 BC:1 CA:1
Smoothing: 10
Face 20: A:10 B:11 C:27 AB:1 BC:1 CA:0
Smoothing: 11
Face 21: A:10 B:27 C:26 AB:0 BC:1 CA:1
Smoothing: 11
Face 22: A:11 B:12 C:28 AB:1 BC:1 CA:0
Smoothing: 12
Face 23: A:11 B:28 C:27 AB:0 BC:1 CA:1
Smoothing: 12
Face 24: A:12 B:13 C:29 AB:1 BC:1 CA:0
Smoothing: 13
Face 25: A:12 B:29 C:28 AB:0 BC:1 CA:1
Smoothing: 13
Page 2
Face 26: A:13 B:14 C:30 AB:1 BC:1 CA:0
Smoothing: 14
Face 27: A:13 B:30 C:29 AB:0 BC:1 CA:1
Smoothing: 14
Face 28: A:14 B:15 C:31 AB:1 BC:1 CA:0
Smoothing: 15
Face 29: A:14 B:31 C:30 AB:0 BC:1 CA:1
Smoothing: 15
Face 30: A:15 B:0 C:16 AB:1 BC:1 CA:0
Smoothing: 16
Face 31: A:15 B:16 C:31 AB:0 BC:1 CA:1
Smoothing: 16
Face 32: A:32 B:49 C:33 AB:0 BC:1 CA:1
Smoothing: 17
Face 33: A:32 B:48 C:49 AB:1 BC:1 CA:0
Smoothing: 17
Face 34: A:33 B:50 C:34 AB:0 BC:1 CA:1
Smoothing: 18
Face 35: A:33 B:49 C:50 AB:1 BC:1 CA:0
Smoothing: 18
Face 36: A:34 B:51 C:35 AB:0 BC:1 CA:1
Smoothing: 19
Face 37: A:34 B:50 C:51 AB:1 BC:1 CA:0
Smoothing: 19
Face 38: A:35 B:52 C:36 AB:0 BC:1 CA:1
Smoothing: 20
Face 39: A:35 B:51 C:52 AB:1 BC:1 CA:0
Smoothing: 20
Face 40: A:36 B:53 C:37 AB:0 BC:1 CA:1
Smoothing: 21
Face 41: A:36 B:52 C:53 AB:1 BC:1 CA:0
Smoothing: 21
Face 42: A:37 B:54 C:38 AB:0 BC:1 CA:1
Smoothing: 22
Face 43: A:37 B:53 C:54 AB:1 BC:1 CA:0
Smoothing: 22
Face 44: A:38 B:55 C:39 AB:0 BC:1 CA:1
Smoothing: 23
Face 45: A:38 B:54 C:55 AB:1 BC:1 CA:0
Smoothing: 23
Face 46: A:39 B:56 C:40 AB:0 BC:1 CA:1
Smoothing: 24
Face 47: A:39 B:55 C:56 AB:1 BC:1 CA:0
Smoothing: 24
Face 48: A:40 B:57 C:41 AB:0 BC:1 CA:1
Smoothing: 25
Face 49: A:40 B:56 C:57 AB:1 BC:1 CA:0
Smoothing: 25
Face 50: A:41 B:58 C:42 AB:0 BC:1 CA:1
Smoothing: 26
Face 51: A:41 B:57 C:58 AB:1 BC:1 CA:0
Smoothing: 26
Face 52: A:42 B:59 C:43 AB:0 BC:1 CA:1
Smoothing: 27
Face 53: A:42 B:58 C:59 AB:1 BC:1 CA:0
Smoothing: 27
Face 54: A:43 B:60 C:44 AB:0 BC:1 CA:1
Smoothing: 28
Face 55: A:43 B:59 C:60 AB:1 BC:1 CA:0
Smoothing: 28
Face 56: A:44 B:61 C:45 AB:0 BC:1 CA:1
Page 3
Smoothing: 29
Face 57: A:44 B:60 C:61 AB:1 BC:1 CA:0
Smoothing: 29
Face 58: A:45 B:62 C:46 AB:0 BC:1 CA:1
Smoothing: 30
Face 59: A:45 B:61 C:62 AB:1 BC:1 CA:0
Smoothing: 30
Face 60: A:46 B:63 C:47 AB:0 BC:1 CA:1
Smoothing: 31
Face 61: A:46 B:62 C:63 AB:1 BC:1 CA:0
Smoothing: 31
Face 62: A:47 B:48 C:32 AB:0 BC:1 CA:1
Smoothing: 32
Face 63: A:47 B:63 C:48 AB:1 BC:1 CA:0
Smoothing: 32
Face 64: A:0 B:32 C:33 AB:0 BC:1 CA:0
Smoothing: 1
Face 65: A:0 B:33 C:1 AB:0 BC:0 CA:1
Smoothing: 1
Face 66: A:1 B:33 C:34 AB:0 BC:1 CA:0
Smoothing: 1
Face 67: A:1 B:34 C:2 AB:0 BC:0 CA:1
Smoothing: 1
Face 68: A:2 B:34 C:35 AB:0 BC:1 CA:0
Smoothing: 1
Face 69: A:2 B:35 C:3 AB:0 BC:0 CA:1
Smoothing: 1
Face 70: A:3 B:35 C:36 AB:0 BC:1 CA:0
Smoothing: 1
Face 71: A:3 B:36 C:4 AB:0 BC:0 CA:1
Smoothing: 1
Face 72: A:4 B:36 C:37 AB:0 BC:1 CA:0
Smoothing: 1
Face 73: A:4 B:37 C:5 AB:0 BC:0 CA:1
Smoothing: 1
Face 74: A:5 B:37 C:38 AB:0 BC:1 CA:0
Smoothing: 1
Face 75: A:5 B:38 C:6 AB:0 BC:0 CA:1
Smoothing: 1
Face 76: A:6 B:38 C:39 AB:0 BC:1 CA:0
Smoothing: 1
Face 77: A:6 B:39 C:7 AB:0 BC:0 CA:1
Smoothing: 1
Face 78: A:7 B:39 C:40 AB:0 BC:1 CA:0
Smoothing: 1
Face 79: A:7 B:40 C:8 AB:0 BC:0 CA:1
Smoothing: 1
Face 80: A:8 B:40 C:41 AB:0 BC:1 CA:0
Smoothing: 1
Face 81: A:8 B:41 C:9 AB:0 BC:0 CA:1
Smoothing: 1
Face 82: A:9 B:41 C:42 AB:0 BC:1 CA:0
Smoothing: 1
Face 83: A:9 B:42 C:10 AB:0 BC:0 CA:1
Smoothing: 1
Face 84: A:10 B:42 C:43 AB:0 BC:1 CA:0
Smoothing: 1
Face 85: A:10 B:43 C:11 AB:0 BC:0 CA:1
Smoothing: 1
Face 86: A:11 B:43 C:44 AB:0 BC:1 CA:0
Smoothing: 1
Page 4
Face 87: A:11 B:44 C:12 AB:0 BC:0 CA:1
Smoothing: 1
Face 88: A:12 B:44 C:45 AB:0 BC:1 CA:0
Smoothing: 1
Face 89: A:12 B:45 C:13 AB:0 BC:0 CA:1
Smoothing: 1
Face 90: A:13 B:45 C:46 AB:0 BC:1 CA:0
Smoothing: 1
Face 91: A:13 B:46 C:14 AB:0 BC:0 CA:1
Smoothing: 1
Face 92: A:14 B:46 C:47 AB:0 BC:1 CA:0
Smoothing: 1
Face 93: A:14 B:47 C:15 AB:0 BC:0 CA:1
Smoothing: 1
Face 94: A:15 B:47 C:32 AB:0 BC:1 CA:0
Smoothing: 1
Face 95: A:15 B:32 C:0 AB:0 BC:0 CA:1
Smoothing: 1
Face 96: A:16 B:17 C:49 AB:1 BC:0 CA:0
Smoothing: 2
Face 97: A:16 B:49 C:48 AB:0 BC:1 CA:0
Smoothing: 2
Face 98: A:17 B:18 C:50 AB:1 BC:0 CA:0
Smoothing: 2
Face 99: A:17 B:50 C:49 AB:0 BC:1 CA:0
Smoothing: 2
Face 100: A:18 B:19 C:51 AB:1 BC:0 CA:0
Smoothing: 2
Face 101: A:18 B:51 C:50 AB:0 BC:1 CA:0
Smoothing: 2
Face 102: A:19 B:20 C:52 AB:1 BC:0 CA:0
Smoothing: 2
Face 103: A:19 B:52 C:51 AB:0 BC:1 CA:0
Smoothing: 2
Face 104: A:20 B:21 C:53 AB:1 BC:0 CA:0
Smoothing: 2
Face 105: A:20 B:53 C:52 AB:0 BC:1 CA:0
Smoothing: 2
Face 106: A:21 B:22 C:54 AB:1 BC:0 CA:0
Smoothing: 2
Face 107: A:21 B:54 C:53 AB:0 BC:1 CA:0
Smoothing: 2
Face 108: A:22 B:23 C:55 AB:1 BC:0 CA:0
Smoothing: 2
Face 109: A:22 B:55 C:54 AB:0 BC:1 CA:0
Smoothing: 2
Face 110: A:23 B:24 C:56 AB:1 BC:0 CA:0
Smoothing: 2
Face 111: A:23 B:56 C:55 AB:0 BC:1 CA:0
Smoothing: 2
Face 112: A:24 B:25 C:57 AB:1 BC:0 CA:0
Smoothing: 2
Face 113: A:24 B:57 C:56 AB:0 BC:1 CA:0
Smoothing: 2
Face 114: A:25 B:26 C:58 AB:1 BC:0 CA:0
Smoothing: 2
Face 115: A:25 B:58 C:57 AB:0 BC:1 CA:0
Smoothing: 2
Face 116: A:26 B:27 C:59 AB:1 BC:0 CA:0
Smoothing: 2
Face 117: A:26 B:59 C:58 AB:0 BC:1 CA:0
Page 5
Smoothing: 2
Face 118: A:27 B:28 C:60 AB:1 BC:0 CA:0
Smoothing: 2
Face 119: A:27 B:60 C:59 AB:0 BC:1 CA:0
Smoothing: 2
Face 120: A:28 B:29 C:61 AB:1 BC:0 CA:0
Smoothing: 2
Face 121: A:28 B:61 C:60 AB:0 BC:1 CA:0
Smoothing: 2
Face 122: A:29 B:30 C:62 AB:1 BC:0 CA:0
Smoothing: 2
Face 123: A:29 B:62 C:61 AB:0 BC:1 CA:0
Smoothing: 2
Face 124: A:30 B:31 C:63 AB:1 BC:0 CA:0
Smoothing: 2
Face 125: A:30 B:63 C:62 AB:0 BC:1 CA:0
Smoothing: 2
Face 126: A:31 B:16 C:48 AB:1 BC:0 CA:0
Smoothing: 2
Face 127: A:31 B:48 C:63 AB:0 BC:1 CA:0
Smoothing: 2
Page 6

View File

@@ -1,13 +1,10 @@
# $Id: Makefile.BeOS-R4,v 1.2 1999/09/17 00:08:31 brianp Exp $
# $Id: Makefile.BeOS-R4,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $
# Makefile for OpenGL Programming Guide programs for BeOS R4
# This file is in the public domain.
# $Log: Makefile.BeOS-R4,v $
# Revision 1.2 1999/09/17 00:08:31 brianp
# link with -lGLU -lGL instead of -lMesaGLU -lMesaGL
#
# Revision 1.1.1.1 1999/08/19 00:55:40 jtg
# Imported sources
#
@@ -21,7 +18,7 @@
INCDIR = ../include
LIBDIR = ../lib
GL_LIBS = -L$(LIBDIR) -L/boot/home/config/lib -Xlinker -rpath $(LIBDIR) -lbe -lglut -lGLU -lGL $(XLIBS)
GL_LIBS = -L$(LIBDIR) -L/boot/home/config/lib -Xlinker -rpath $(LIBDIR) -lbe -lglut -lMesaGLU -lMesaGL $(XLIBS)
LIB_DEP = $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(GLU_LIB) $(LIBDIR)/$(GLUT_LIB)

View File

@@ -1,4 +1,4 @@
# $Id: Makefile.X11,v 1.2 1999/10/27 10:09:53 brianp Exp $
# $Id: Makefile.X11,v 1.1.1.1 1999/08/19 00:55:40 jtg Exp $
# Mesa 3-D graphics library
# Version: 3.1
@@ -12,7 +12,7 @@
INCDIR = ../include
LIBDIR = ../lib
GL_LIBS = -L$(LIBDIR) -lglut -lGLU -lGL $(XLIBS)
GL_LIBS = -L$(LIBDIR) -lglut -lGLU -lGL -lm $(XLIBS)
LIB_DEP = $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(GLU_LIB) $(LIBDIR)/$(GLUT_LIB)

View File

@@ -3,14 +3,14 @@
/*
* (c) Copyright 1993, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and this permission notice appear in supporting documentation, and that
* and this permission notice appear in supporting documentation, and that
* the name of Silicon Graphics, Inc. not be used in advertising
* or publicity pertaining to distribution of the software without specific,
* written prior permission.
* written prior permission.
*
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
@@ -24,8 +24,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
* US Government Users Restricted Rights
*
* US Government Users Restricted Rights
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
@@ -57,7 +57,7 @@ void myinit(void)
glMaterialf(GL_FRONT, GL_SHININESS, 50.0);
glLightfv(GL_LIGHT0, GL_POSITION, light_position);
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lm_ambient);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glDepthFunc(GL_LESS);
@@ -68,25 +68,25 @@ void myinit(void)
glClearAccum(0.0, 0.0, 0.0, 0.0);
}
void displayObjects(void)
void displayObjects(void)
{
GLfloat torus_diffuse[] = { 0.7, 0.7, 0.0, 1.0 };
GLfloat cube_diffuse[] = { 0.0, 0.7, 0.7, 1.0 };
GLfloat sphere_diffuse[] = { 0.7, 0.0, 0.7, 1.0 };
GLfloat octa_diffuse[] = { 0.7, 0.4, 0.4, 1.0 };
glPushMatrix ();
glRotatef (30.0, 1.0, 0.0, 0.0);
glPushMatrix ();
glTranslatef (-0.80, 0.35, 0.0);
glTranslatef (-0.80, 0.35, 0.0);
glRotatef (100.0, 1.0, 0.0, 0.0);
glMaterialfv(GL_FRONT, GL_DIFFUSE, torus_diffuse);
glutSolidTorus (0.275, 0.85, 16, 16);
glPopMatrix ();
glPushMatrix ();
glTranslatef (-0.75, -0.50, 0.0);
glTranslatef (-0.75, -0.50, 0.0);
glRotatef (45.0, 0.0, 0.0, 1.0);
glRotatef (45.0, 1.0, 0.0, 0.0);
glMaterialfv(GL_FRONT, GL_DIFFUSE, cube_diffuse);
@@ -94,14 +94,14 @@ void displayObjects(void)
glPopMatrix ();
glPushMatrix ();
glTranslatef (0.75, 0.60, 0.0);
glTranslatef (0.75, 0.60, 0.0);
glRotatef (30.0, 1.0, 0.0, 0.0);
glMaterialfv(GL_FRONT, GL_DIFFUSE, sphere_diffuse);
glutSolidSphere (1.0, 16, 16);
glPopMatrix ();
glPushMatrix ();
glTranslatef (0.70, -0.90, 0.25);
glTranslatef (0.70, -0.90, 0.25);
glMaterialfv(GL_FRONT, GL_DIFFUSE, octa_diffuse);
glutSolidOctahedron ();
glPopMatrix ();
@@ -124,7 +124,7 @@ void display(void)
glPushMatrix ();
/* Note that 4.5 is the distance in world space between
* left and right and bottom and top.
* This formula converts fractional pixel movement to
* This formula converts fractional pixel movement to
* world coordinates.
*/
glTranslatef (j8[jitter].x*4.5/viewport[2],
@@ -142,28 +142,15 @@ void myReshape(int w, int h)
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
if (w <= h)
if (w <= h)
glOrtho (-2.25, 2.25, -2.25*h/w, 2.25*h/w, -10.0, 10.0);
else
else
glOrtho (-2.25*w/h, 2.25*w/h, -2.25, 2.25, -10.0, 10.0);
glMatrixMode(GL_MODELVIEW);
}
static void
key(unsigned char k, int x, int y)
{
switch (k) {
case 27: /* Escape */
exit(0);
break;
default:
return;
}
glutPostRedisplay();
}
/* Main Loop
* Open window with initial window size, title bar,
* Open window with initial window size, title bar,
* RGBA display mode, and handle input events.
*/
int main(int argc, char** argv)
@@ -176,7 +163,6 @@ int main(int argc, char** argv)
myinit();
glutReshapeFunc (myReshape);
glutDisplayFunc(display);
glutKeyboardFunc(key);
glutMainLoop();
return 0; /* ANSI C requires main to return int. */
}

View File

@@ -3,14 +3,14 @@
/*
* (c) Copyright 1993, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and this permission notice appear in supporting documentation, and that
* and this permission notice appear in supporting documentation, and that
* the name of Silicon Graphics, Inc. not be used in advertising
* or publicity pertaining to distribution of the software without specific,
* written prior permission.
* written prior permission.
*
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
@@ -24,8 +24,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
* US Government Users Restricted Rights
*
* US Government Users Restricted Rights
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
@@ -45,8 +45,8 @@
#include <stdio.h>
#include <GL/glut.h>
/* Initialize antialiasing for RGBA mode, including alpha
* blending, hint, and line width. Print out implementation
/* Initialize antialiasing for RGBA mode, including alpha
* blending, hint, and line width. Print out implementation
* specific info on line width granularity and width.
*/
void myinit(void)
@@ -56,7 +56,7 @@ void myinit(void)
printf ("GL_LINE_WIDTH_GRANULARITY value is %3.1f\n", values[0]);
glGetFloatv (GL_LINE_WIDTH_RANGE, values);
printf ("GL_LINE_WIDTH_RANGE values are %3.1f %3.1f\n",
printf ("GL_LINE_WIDTH_RANGE values are %3.1f %3.1f\n",
values[0], values[1]);
glEnable (GL_LINE_SMOOTH);
@@ -93,21 +93,8 @@ void myReshape(int w, int h)
glTranslatef (0.0, 0.0, -4.0); /* move object into view */
}
static void
key(unsigned char k, int x, int y)
{
switch (k) {
case 27: /* Escape */
exit(0);
break;
default:
return;
}
glutPostRedisplay();
}
/* Main Loop
* Open window with initial window size, title bar,
* Open window with initial window size, title bar,
* RGBA display mode, and handle input events.
*/
int main(int argc, char** argv)
@@ -118,7 +105,7 @@ int main(int argc, char** argv)
myinit();
glutReshapeFunc (myReshape);
glutDisplayFunc(display);
glutKeyboardFunc(key);
glutMainLoop();
return 0; /* ANSI C requires main to return int. */
}

View File

@@ -3,14 +3,14 @@
/**
* (c) Copyright 1993, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and this permission notice appear in supporting documentation, and that
* and this permission notice appear in supporting documentation, and that
* the name of Silicon Graphics, Inc. not be used in advertising
* or publicity pertaining to distribution of the software without specific,
* written prior permission.
* written prior permission.
*
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
@@ -24,8 +24,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
* US Government Users Restricted Rights
*
* US Government Users Restricted Rights
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
@@ -68,7 +68,7 @@ GLfloat ctrlpoints[4][4][3] =
{1.5, 1.5, -1.0}}
};
void
void
initlights(void)
{
GLfloat ambient[] =
@@ -93,7 +93,7 @@ initlights(void)
glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess);
}
void
void
display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -104,7 +104,7 @@ display(void)
glFlush();
}
void
void
myinit(void)
{
glClearColor(0.0, 0.0, 0.0, 1.0);
@@ -118,7 +118,7 @@ myinit(void)
initlights(); /* for lighted version only */
}
void
void
myReshape(int w, int h)
{
glViewport(0, 0, w, h);
@@ -134,20 +134,7 @@ myReshape(int w, int h)
glLoadIdentity();
}
static void
key(unsigned char k, int x, int y)
{
switch (k) {
case 27: /* Escape */
exit(0);
break;
default:
return;
}
glutPostRedisplay();
}
int
int
main(int argc, char **argv)
{
glutInit(&argc, argv);
@@ -156,7 +143,6 @@ main(int argc, char **argv)
myinit();
glutReshapeFunc(myReshape);
glutDisplayFunc(display);
glutKeyboardFunc(key);
glutMainLoop();
return 0; /* ANSI C requires main to return int. */
}

View File

@@ -3,14 +3,14 @@
/*
* (c) Copyright 1993, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and this permission notice appear in supporting documentation, and that
* and this permission notice appear in supporting documentation, and that
* the name of Silicon Graphics, Inc. not be used in advertising
* or publicity pertaining to distribution of the software without specific,
* written prior permission.
* written prior permission.
*
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
@@ -24,8 +24,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
* US Government Users Restricted Rights
*
* US Government Users Restricted Rights
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
@@ -52,10 +52,10 @@ GLubyte checkImage[checkImageWidth][checkImageHeight][3];
void makeCheckImage(void)
{
int i, j, c;
for (i = 0; i < checkImageWidth; i++) {
for (j = 0; j < checkImageHeight; j++) {
c = ((((i&0x8)==0)^((j&0x8)==0)))*255;
c = ((((i&0x8)==0)^((j&0x8))==0))*255;
checkImage[i][j][0] = (GLubyte) c;
checkImage[i][j][1] = (GLubyte) c;
checkImage[i][j][2] = (GLubyte) c;
@@ -64,15 +64,15 @@ void makeCheckImage(void)
}
void myinit(void)
{
{
glClearColor (0.0, 0.0, 0.0, 0.0);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LESS);
makeCheckImage();
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glTexImage2D(GL_TEXTURE_2D, 0, 3, checkImageWidth,
checkImageHeight, 0, GL_RGB, GL_UNSIGNED_BYTE,
glTexImage2D(GL_TEXTURE_2D, 0, 3, checkImageWidth,
checkImageHeight, 0, GL_RGB, GL_UNSIGNED_BYTE,
&checkImage[0][0][0]);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
@@ -111,19 +111,6 @@ void myReshape(int w, int h)
glTranslatef(0.0, 0.0, -3.6);
}
static void
key(unsigned char k, int x, int y)
{
switch (k) {
case 27: /* Escape */
exit(0);
break;
default:
return;
}
glutPostRedisplay();
}
int
main(int argc, char** argv)
{
@@ -133,7 +120,6 @@ main(int argc, char** argv)
myinit();
glutReshapeFunc (myReshape);
glutDisplayFunc(display);
glutKeyboardFunc(key);
glutMainLoop();
return 0; /* ANSI C requires main to return int. */
}

View File

@@ -3,14 +3,14 @@
/*
* (c) Copyright 1993, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and this permission notice appear in supporting documentation, and that
* and this permission notice appear in supporting documentation, and that
* the name of Silicon Graphics, Inc. not be used in advertising
* or publicity pertaining to distribution of the software without specific,
* written prior permission.
* written prior permission.
*
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
@@ -24,8 +24,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
* US Government Users Restricted Rights
*
* US Government Users Restricted Rights
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
@@ -39,7 +39,7 @@
*/
/*
* depthcue.c
* This program draws a wireframe model, which uses
* This program draws a wireframe model, which uses
* intensity (brightness) to give clues to distance.
* Fog is used to achieve this effect.
*/
@@ -86,19 +86,6 @@ void myReshape(int w, int h)
glTranslatef (0.0, 0.0, -4.0); /* move object into view */
}
static void
key(unsigned char k, int x, int y)
{
switch (k) {
case 27: /* Escape */
exit(0);
break;
default:
return;
}
glutPostRedisplay();
}
/* Main Loop
*/
int main(int argc, char** argv)
@@ -109,7 +96,7 @@ int main(int argc, char** argv)
myinit();
glutReshapeFunc(myReshape);
glutDisplayFunc(display);
glutKeyboardFunc(key);
glutMainLoop();
return 0; /* ANSI C requires main to return int. */
}

View File

@@ -3,14 +3,14 @@
/*
* (c) Copyright 1993, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and this permission notice appear in supporting documentation, and that
* and this permission notice appear in supporting documentation, and that
* the name of Silicon Graphics, Inc. not be used in advertising
* or publicity pertaining to distribution of the software without specific,
* written prior permission.
* written prior permission.
*
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
@@ -24,8 +24,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
* US Government Users Restricted Rights
*
* US Government Users Restricted Rights
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
@@ -55,35 +55,35 @@
/* accFrustum()
* The first 6 arguments are identical to the glFrustum() call.
*
* pixdx and pixdy are anti-alias jitter in pixels.
*
* pixdx and pixdy are anti-alias jitter in pixels.
* Set both equal to 0.0 for no anti-alias jitter.
* eyedx and eyedy are depth-of field jitter in pixels.
* eyedx and eyedy are depth-of field jitter in pixels.
* Set both equal to 0.0 for no depth of field effects.
*
* focus is distance from eye to plane in focus.
* focus is distance from eye to plane in focus.
* focus must be greater than, but not equal to 0.0.
*
* Note that accFrustum() calls glTranslatef(). You will
* probably want to insure that your ModelView matrix has been
* Note that accFrustum() calls glTranslatef(). You will
* probably want to insure that your ModelView matrix has been
* initialized to identity before calling accFrustum().
*/
void accFrustum(GLdouble left, GLdouble right, GLdouble bottom,
GLdouble top, GLdouble nnear, GLdouble ffar, GLdouble pixdx,
void accFrustum(GLdouble left, GLdouble right, GLdouble bottom,
GLdouble top, GLdouble nnear, GLdouble ffar, GLdouble pixdx,
GLdouble pixdy, GLdouble eyedx, GLdouble eyedy, GLdouble focus)
{
GLdouble xwsize, ywsize;
GLdouble xwsize, ywsize;
GLdouble dx, dy;
GLint viewport[4];
glGetIntegerv (GL_VIEWPORT, viewport);
xwsize = right - left;
ywsize = top - bottom;
dx = -(pixdx*xwsize/(GLdouble) viewport[2] + eyedx*nnear/focus);
dy = -(pixdy*ywsize/(GLdouble) viewport[3] + eyedy*nnear/focus);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum (left + dx, right + dx, bottom + dy, top + dy, nnear, ffar);
@@ -93,20 +93,20 @@ void accFrustum(GLdouble left, GLdouble right, GLdouble bottom,
}
/* accPerspective()
*
*
* The first 4 arguments are identical to the gluPerspective() call.
* pixdx and pixdy are anti-alias jitter in pixels.
* pixdx and pixdy are anti-alias jitter in pixels.
* Set both equal to 0.0 for no anti-alias jitter.
* eyedx and eyedy are depth-of field jitter in pixels.
* eyedx and eyedy are depth-of field jitter in pixels.
* Set both equal to 0.0 for no depth of field effects.
*
* focus is distance from eye to plane in focus.
* focus is distance from eye to plane in focus.
* focus must be greater than, but not equal to 0.0.
*
* Note that accPerspective() calls accFrustum().
*/
void accPerspective(GLdouble fovy, GLdouble aspect,
GLdouble nnear, GLdouble ffar, GLdouble pixdx, GLdouble pixdy,
void accPerspective(GLdouble fovy, GLdouble aspect,
GLdouble nnear, GLdouble ffar, GLdouble pixdx, GLdouble pixdy,
GLdouble eyedx, GLdouble eyedy, GLdouble focus)
{
GLdouble fov2,left,right,bottom,top;
@@ -128,7 +128,7 @@ void myinit(void)
GLfloat ambient[] = { 0.0, 0.0, 0.0, 1.0 };
GLfloat diffuse[] = { 1.0, 1.0, 1.0, 1.0 };
GLfloat position[] = { 0.0, 3.0, 3.0, 0.0 };
GLfloat lmodel_ambient[] = { 0.2, 0.2, 0.2, 1.0 };
GLfloat local_view[] = { 0.0 };
@@ -138,7 +138,7 @@ void myinit(void)
glLightfv(GL_LIGHT0, GL_AMBIENT, ambient);
glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse);
glLightfv(GL_LIGHT0, GL_POSITION, position);
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient);
glLightModelfv(GL_LIGHT_MODEL_LOCAL_VIEWER, local_view);
@@ -155,18 +155,18 @@ void myinit(void)
glClearAccum(0.0, 0.0, 0.0, 0.0);
}
void renderTeapot (GLfloat x, GLfloat y, GLfloat z,
GLfloat ambr, GLfloat ambg, GLfloat ambb,
GLfloat difr, GLfloat difg, GLfloat difb,
void renderTeapot (GLfloat x, GLfloat y, GLfloat z,
GLfloat ambr, GLfloat ambg, GLfloat ambb,
GLfloat difr, GLfloat difg, GLfloat difb,
GLfloat specr, GLfloat specg, GLfloat specb, GLfloat shine)
{
float mat[4];
glPushMatrix();
glTranslatef (x, y, z);
mat[0] = ambr; mat[1] = ambg; mat[2] = ambb; mat[3] = 1.0;
mat[0] = ambr; mat[1] = ambg; mat[2] = ambb; mat[3] = 1.0;
glMaterialfv (GL_FRONT, GL_AMBIENT, mat);
mat[0] = difr; mat[1] = difg; mat[2] = difb;
mat[0] = difr; mat[1] = difg; mat[2] = difb;
glMaterialfv (GL_FRONT, GL_DIFFUSE, mat);
mat[0] = specr; mat[1] = specg; mat[2] = specb;
glMaterialfv (GL_FRONT, GL_SPECULAR, mat);
@@ -175,9 +175,9 @@ void renderTeapot (GLfloat x, GLfloat y, GLfloat z,
glPopMatrix();
}
/* display() draws 5 teapots into the accumulation buffer
/* display() draws 5 teapots into the accumulation buffer
* several times; each time with a jittered perspective.
* The focal point is at z = 5.0, so the gold teapot will
* The focal point is at z = 5.0, so the gold teapot will
* stay in focus. The amount of jitter is adjusted by the
* magnitude of the accPerspective() jitter; in this example, 0.33.
* In this example, the teapots are drawn 8 times. See jitter.h
@@ -192,8 +192,8 @@ void display(void)
for (jitter = 0; jitter < 8; jitter++) {
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
accPerspective (45.0,
(GLdouble) viewport[2]/(GLdouble) viewport[3],
accPerspective (45.0,
(GLdouble) viewport[2]/(GLdouble) viewport[3],
1.0, 15.0, 0.0, 0.0,
0.33*j8[jitter].x, 0.33*j8[jitter].y, 5.0);
/* ruby, gold, silver, emerald, and cyan teapots */
@@ -203,9 +203,9 @@ void display(void)
0.75164, 0.60648, 0.22648, 0.628281, 0.555802, 0.366065, 0.4);
renderTeapot (0.2, -0.5, -5.5, 0.19225, 0.19225, 0.19225,
0.50754, 0.50754, 0.50754, 0.508273, 0.508273, 0.508273, 0.4);
renderTeapot (1.0, -0.5, -6.0, 0.0215, 0.1745, 0.0215,
renderTeapot (1.0, -0.5, -6.0, 0.0215, 0.1745, 0.0215,
0.07568, 0.61424, 0.07568, 0.633, 0.727811, 0.633, 0.6);
renderTeapot (1.8, -0.5, -6.5, 0.0, 0.1, 0.06, 0.0, 0.50980392,
renderTeapot (1.8, -0.5, -6.5, 0.0, 0.1, 0.06, 0.0, 0.50980392,
0.50980392, 0.50196078, 0.50196078, 0.50196078, .25);
glAccum (GL_ACCUM, 0.125);
}
@@ -219,21 +219,8 @@ void myReshape(int w, int h)
glViewport(0, 0, w, h);
}
static void
key(unsigned char k, int x, int y)
{
switch (k) {
case 27: /* Escape */
exit(0);
break;
default:
return;
}
glutPostRedisplay();
}
/* Main Loop
* Open window with initial window size, title bar,
* Open window with initial window size, title bar,
* RGBA display mode, depth buffer, and handle input events.
*/
int main(int argc, char** argv)
@@ -245,7 +232,7 @@ int main(int argc, char** argv)
myinit();
glutReshapeFunc(myReshape);
glutDisplayFunc(display);
glutKeyboardFunc(key);
glutMainLoop();
return 0; /* ANSI C requires main to return int. */
}

View File

@@ -1,13 +1,13 @@
/*
* Copyright (c) 1993-1997, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and this permission notice appear in supporting documentation, and that
* and this permission notice appear in supporting documentation, and that
* the name of Silicon Graphics, Inc. not be used in advertising
* or publicity pertaining to distribution of the software without specific,
* written prior permission.
* written prior permission.
*
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
@@ -21,8 +21,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
* US Government Users Restricted Rights
*
* US Government Users Restricted Rights
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
@@ -66,7 +66,7 @@ void spinDisplay(void)
glutPostRedisplay();
}
void init(void)
void init(void)
{
glClearColor (0.0, 0.0, 0.0, 0.0);
glShadeModel (GL_FLAT);
@@ -83,7 +83,7 @@ void reshape(int w, int h)
}
/* ARGSUSED2 */
void mouse(int button, int state, int x, int y)
void mouse(int button, int state, int x, int y)
{
switch (button) {
case GLUT_LEFT_BUTTON:
@@ -98,21 +98,8 @@ void mouse(int button, int state, int x, int y)
break;
}
}
static void
key(unsigned char k, int x, int y)
{
switch (k) {
case 27: /* Escape */
exit(0);
break;
default:
return;
}
glutPostRedisplay();
}
/*
/*
* Request double buffer display mode.
* Register mouse input callback functions
*/
@@ -120,14 +107,13 @@ int main(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB);
glutInitWindowSize (250, 250);
glutInitWindowSize (250, 250);
glutInitWindowPosition (100, 100);
glutCreateWindow (argv[0]);
init ();
glutDisplayFunc(display);
glutReshapeFunc(reshape);
glutDisplayFunc(display);
glutReshapeFunc(reshape);
glutMouseFunc(mouse);
glutKeyboardFunc(key);
glutMainLoop();
return 0; /* ANSI C requires main to return int. */
}

View File

@@ -3,14 +3,14 @@
/**
* (c) Copyright 1993, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and this permission notice appear in supporting documentation, and that
* and this permission notice appear in supporting documentation, and that
* the name of Silicon Graphics, Inc. not be used in advertising
* or publicity pertaining to distribution of the software without specific,
* written prior permission.
* written prior permission.
*
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
@@ -24,8 +24,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
* US Government Users Restricted Rights
*
* US Government Users Restricted Rights
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
@@ -39,11 +39,11 @@
*/
/*
* fog.c
* This program draws 5 red teapots, each at a different
* z distance from the eye, in different types of fog.
* Pressing the left mouse button chooses between 3 types of
* fog: exponential, exponential squared, and linear.
* In this program, there is a fixed density value, as well
* This program draws 5 red teapots, each at a different
* z distance from the eye, in different types of fog.
* Pressing the left mouse button chooses between 3 types of
* fog: exponential, exponential squared, and linear.
* In this program, there is a fixed density value, as well
* as fixed start and end values for the linear fog.
*/
#include <stdlib.h>
@@ -52,7 +52,7 @@
GLint fogMode;
void
void
selectFog(int mode)
{
switch(mode) {
@@ -70,10 +70,10 @@ selectFog(int mode)
}
}
/* Initialize z-buffer, projection matrix, light source,
/* Initialize z-buffer, projection matrix, light source,
* and lighting model. Do not specify a material property here.
*/
void
void
myinit(void)
{
GLfloat position[] =
@@ -106,7 +106,7 @@ myinit(void)
}
}
void
void
renderRedTeapot(GLfloat x, GLfloat y, GLfloat z)
{
float mat[4];
@@ -133,7 +133,7 @@ renderRedTeapot(GLfloat x, GLfloat y, GLfloat z)
/* display() draws 5 teapots at different z positions.
*/
void
void
display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -145,7 +145,7 @@ display(void)
glFlush();
}
void
void
myReshape(int w, int h)
{
glViewport(0, 0, w, h);
@@ -161,24 +161,11 @@ myReshape(int w, int h)
glLoadIdentity();
}
static void
key(unsigned char k, int x, int y)
{
switch (k) {
case 27: /* Escape */
exit(0);
break;
default:
return;
}
glutPostRedisplay();
}
/* Main Loop
* Open window with initial window size, title bar,
* Open window with initial window size, title bar,
* RGBA display mode, depth buffer, and handle input events.
*/
int
int
main(int argc, char **argv)
{
glutInit(&argc, argv);
@@ -194,7 +181,6 @@ main(int argc, char **argv)
glutAddMenuEntry("Fog LINEAR", GL_LINEAR);
glutAddMenuEntry("Quit", 0);
glutAttachMenu(GLUT_RIGHT_BUTTON);
glutKeyboardFunc(key);
glutMainLoop();
return 0; /* ANSI C requires main to return int. */
}

View File

@@ -3,14 +3,14 @@
/*
* (c) Copyright 1993, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and this permission notice appear in supporting documentation, and that
* and this permission notice appear in supporting documentation, and that
* the name of Silicon Graphics, Inc. not be used in advertising
* or publicity pertaining to distribution of the software without specific,
* written prior permission.
* written prior permission.
*
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
@@ -24,8 +24,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
* US Government Users Restricted Rights
*
* US Government Users Restricted Rights
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
@@ -39,21 +39,21 @@
*/
/*
* fogindex.c
* This program demonstrates fog in color index mode.
* Three cones are drawn at different z values in a linear
* fog. 32 contiguous colors (from 16 to 47) are loaded
* This program demonstrates fog in color index mode.
* Three cones are drawn at different z values in a linear
* fog. 32 contiguous colors (from 16 to 47) are loaded
* with a color ramp.
*/
#include <stdlib.h>
#include <GL/glut.h>
/* Initialize color map and fog. Set screen clear color
/* Initialize color map and fog. Set screen clear color
* to end of color ramp.
*/
#define NUM_COLORS 32
#define RAMPSTART 16
void
void
myinit(void)
{
int i;
@@ -77,7 +77,7 @@ myinit(void)
/* display() renders 3 cones at different z positions.
*/
void
void
display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -104,7 +104,7 @@ display(void)
glFlush();
}
void
void
myReshape(int w, int h)
{
glViewport(0, 0, w, h);
@@ -120,24 +120,11 @@ myReshape(int w, int h)
glLoadIdentity();
}
static void
key(unsigned char k, int x, int y)
{
switch (k) {
case 27: /* Escape */
exit(0);
break;
default:
return;
}
glutPostRedisplay();
}
/* Main Loop
* Open window with initial window size, title bar,
* Open window with initial window size, title bar,
* RGBA display mode, depth buffer, and handle input events.
*/
int
int
main(int argc, char **argv)
{
glutInit(&argc, argv);
@@ -146,7 +133,6 @@ main(int argc, char **argv)
myinit();
glutReshapeFunc(myReshape);
glutDisplayFunc(display);
glutKeyboardFunc(key);
glutMainLoop();
return 0; /* ANSI C requires main to return int. */
}

View File

@@ -1,13 +1,13 @@
/*
* Copyright (c) 1993-1997, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and this permission notice appear in supporting documentation, and that
* and this permission notice appear in supporting documentation, and that
* the name of Silicon Graphics, Inc. not be used in advertising
* or publicity pertaining to distribution of the software without specific,
* written prior permission.
* written prior permission.
*
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
@@ -21,8 +21,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
* US Government Users Restricted Rights
*
* US Government Users Restricted Rights
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
@@ -47,7 +47,7 @@ void display(void)
glClear (GL_COLOR_BUFFER_BIT);
/* draw white polygon (rectangle) with corners at
* (0.25, 0.25, 0.0) and (0.75, 0.75, 0.0)
* (0.25, 0.25, 0.0) and (0.75, 0.75, 0.0)
*/
glColor3f (1.0, 1.0, 1.0);
glBegin(GL_POLYGON);
@@ -57,13 +57,13 @@ void display(void)
glVertex3f (0.25, 0.75, 0.0);
glEnd();
/* don't wait!
* start processing buffered OpenGL routines
/* don't wait!
* start processing buffered OpenGL routines
*/
glFlush ();
}
void init (void)
void init (void)
{
/* select clearing color */
glClearColor (0.0, 0.0, 0.0, 0.0);
@@ -74,20 +74,7 @@ void init (void)
glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0);
}
static void
key(unsigned char k, int x, int y)
{
switch (k) {
case 27: /* Escape */
exit(0);
break;
default:
return;
}
glutPostRedisplay();
}
/*
/*
* Declare initial window size, position, and display mode
* (single buffer and RGBA). Open window with "hello"
* in its title bar. Call initialization routines.
@@ -98,12 +85,11 @@ int main(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize (250, 250);
glutInitWindowSize (250, 250);
glutInitWindowPosition (100, 100);
glutCreateWindow ("hello");
init ();
glutDisplayFunc(display);
glutKeyboardFunc(key);
glutDisplayFunc(display);
glutMainLoop();
return 0; /* ANSI C requires main to return int. */
}

View File

@@ -64,7 +64,7 @@ void makeCheckImage(void)
for (i = 0; i < checkImageHeight; i++) {
for (j = 0; j < checkImageWidth; j++) {
c = (((i&0x8)==0)^((j&0x8)==0))*255;
c = ((((i&0x8)==0)^((j&0x8))==0))*255;
checkImage[i][j][0] = (GLubyte) c;
checkImage[i][j][1] = (GLubyte) c;
checkImage[i][j][2] = (GLubyte) c;

View File

@@ -3,14 +3,14 @@
/*
* (c) Copyright 1993, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and this permission notice appear in supporting documentation, and that
* and this permission notice appear in supporting documentation, and that
* the name of Silicon Graphics, Inc. not be used in advertising
* or publicity pertaining to distribution of the software without specific,
* written prior permission.
* written prior permission.
*
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
@@ -24,8 +24,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
* US Government Users Restricted Rights
*
* US Government Users Restricted Rights
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
@@ -46,7 +46,7 @@
#include <stdlib.h>
#include <GL/glut.h>
/* Initialize z-buffer, projection matrix, light source,
/* Initialize z-buffer, projection matrix, light source,
* and lighting model. Do not specify a material property here.
*/
void myinit(void)
@@ -72,7 +72,7 @@ void myinit(void)
glClearColor(0.0, 0.1, 0.1, 0.0);
}
/* Draw twelve spheres in 3 rows with 4 columns.
/* Draw twelve spheres in 3 rows with 4 columns.
* The spheres in the first row have materials with no ambient reflection.
* The second row has materials with significant ambient reflection.
* The third row has materials with colored ambient reflection.
@@ -102,7 +102,7 @@ void display(void)
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
/* draw sphere in first row, first column
* diffuse reflection only; no ambient or specular
* diffuse reflection only; no ambient or specular
*/
glPushMatrix();
glTranslatef (-3.75, 3.0, 0.0);
@@ -154,7 +154,7 @@ void display(void)
glPopMatrix();
/* draw sphere in second row, first column
* ambient and diffuse reflection; no specular
* ambient and diffuse reflection; no specular
*/
glPushMatrix();
glTranslatef (-3.75, 0.0, 0.0);
@@ -206,7 +206,7 @@ void display(void)
glPopMatrix();
/* draw sphere in third row, first column
* colored ambient and diffuse reflection; no specular
* colored ambient and diffuse reflection; no specular
*/
glPushMatrix();
glTranslatef (-3.75, -3.0, 0.0);
@@ -266,29 +266,16 @@ void myReshape(int w, int h)
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
if (w <= (h * 2))
glOrtho (-6.0, 6.0, -3.0*((GLfloat)h*2)/(GLfloat)w,
glOrtho (-6.0, 6.0, -3.0*((GLfloat)h*2)/(GLfloat)w,
3.0*((GLfloat)h*2)/(GLfloat)w, -10.0, 10.0);
else
glOrtho (-6.0*(GLfloat)w/((GLfloat)h*2),
glOrtho (-6.0*(GLfloat)w/((GLfloat)h*2),
6.0*(GLfloat)w/((GLfloat)h*2), -3.0, 3.0, -10.0, 10.0);
glMatrixMode(GL_MODELVIEW);
}
static void
key(unsigned char k, int x, int y)
{
switch (k) {
case 27: /* Escape */
exit(0);
break;
default:
return;
}
glutPostRedisplay();
}
/* Main Loop
* Open window with initial window size, title bar,
* Open window with initial window size, title bar,
* RGBA display mode, and handle input events.
*/
int main(int argc, char** argv)
@@ -300,7 +287,7 @@ int main(int argc, char** argv)
myinit();
glutReshapeFunc(myReshape);
glutDisplayFunc(display);
glutKeyboardFunc(key);
glutMainLoop();
return 0; /* ANSI C requires main to return int. */
}

View File

@@ -3,14 +3,14 @@
/*
* (c) Copyright 1993, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and this permission notice appear in supporting documentation, and that
* and this permission notice appear in supporting documentation, and that
* the name of Silicon Graphics, Inc. not be used in advertising
* or publicity pertaining to distribution of the software without specific,
* written prior permission.
* written prior permission.
*
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
@@ -24,8 +24,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
* US Government Users Restricted Rights
*
* US Government Users Restricted Rights
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
@@ -57,7 +57,7 @@ GLubyte mipmapImage1[1][1][3];
void makeImages(void)
{
int i, j;
for (i = 0; i < 32; i++) {
for (j = 0; j < 32; j++) {
mipmapImage32[i][j][0] = 255;
@@ -99,7 +99,7 @@ void makeImages(void)
}
void myinit(void)
{
{
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LESS);
glShadeModel(GL_FLAT);
@@ -122,7 +122,7 @@ void myinit(void)
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
GL_NEAREST_MIPMAP_NEAREST);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
glEnable(GL_TEXTURE_2D);
@@ -150,19 +150,6 @@ void myReshape(int w, int h)
glLoadIdentity();
}
static void
key(unsigned char k, int x, int y)
{
switch (k) {
case 27: /* Escape */
exit(0);
break;
default:
return;
}
glutPostRedisplay();
}
int main(int argc, char** argv)
{
glutInit(&argc, argv);
@@ -172,7 +159,7 @@ int main(int argc, char** argv)
myinit();
glutReshapeFunc (myReshape);
glutDisplayFunc(display);
glutKeyboardFunc(key);
glutMainLoop();
return 0; /* ANSI C requires main to return int. */
}

View File

@@ -3,14 +3,14 @@
/*
* (c) Copyright 1993, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and this permission notice appear in supporting documentation, and that
* and this permission notice appear in supporting documentation, and that
* the name of Silicon Graphics, Inc. not be used in advertising
* or publicity pertaining to distribution of the software without specific,
* written prior permission.
* written prior permission.
*
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
@@ -24,8 +24,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
* US Government Users Restricted Rights
*
* US Government Users Restricted Rights
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
@@ -46,10 +46,10 @@
#include <GL/glut.h>
#define S_NUMPOINTS 13
#define S_ORDER 3
#define S_ORDER 3
#define S_NUMKNOTS (S_NUMPOINTS + S_ORDER)
#define T_NUMPOINTS 3
#define T_ORDER 3
#define T_ORDER 3
#define T_NUMKNOTS (T_NUMPOINTS + T_ORDER)
#define SQRT2 1.41421356237309504880
@@ -86,7 +86,7 @@ GLfloat ctlpoints[S_NUMPOINTS][T_NUMPOINTS][4] = {
GLUnurbsObj *theNurb;
/* Initialize material property, light source, lighting model,
/* Initialize material property, light source, lighting model,
* and depth buffer.
*/
void myinit(void)
@@ -133,12 +133,12 @@ void display(void)
glTranslatef (-4., -4.5, -2.5);
gluBeginSurface(theNurb);
gluNurbsSurface(theNurb,
gluNurbsSurface(theNurb,
S_NUMKNOTS, sknots,
T_NUMKNOTS, tknots,
4 * T_NUMPOINTS,
4,
&ctlpoints[0][0][0],
&ctlpoints[0][0][0],
S_ORDER, T_ORDER,
GL_MAP2_VERTEX_4);
gluEndSurface(theNurb);
@@ -159,21 +159,8 @@ void myReshape(int w, int h)
gluLookAt(7.0,4.5,4.0, 4.5,4.5,2.0, 6.0,-3.0,2.0);
}
static void
key(unsigned char k, int x, int y)
{
switch (k) {
case 27: /* Escape */
exit(0);
break;
default:
return;
}
glutPostRedisplay();
}
/* Main Loop
* Open window with initial window size, title bar,
* Open window with initial window size, title bar,
* RGBA display mode, and handle input events.
*/
int main(int argc, char** argv)
@@ -184,7 +171,6 @@ int main(int argc, char** argv)
myinit();
glutReshapeFunc (myReshape);
glutDisplayFunc(display);
glutKeyboardFunc(key);
glutMainLoop();
return 0; /* ANSI C requires main to return int. */
}

View File

@@ -3,14 +3,14 @@
/*
* (c) Copyright 1993, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and this permission notice appear in supporting documentation, and that
* and this permission notice appear in supporting documentation, and that
* the name of Silicon Graphics, Inc. not be used in advertising
* or publicity pertaining to distribution of the software without specific,
* written prior permission.
* written prior permission.
*
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
@@ -24,8 +24,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
* US Government Users Restricted Rights
*
* US Government Users Restricted Rights
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
@@ -39,19 +39,19 @@
*/
/*
* pickdepth.c
* Picking is demonstrated in this program. In
* rendering mode, three overlapping rectangles are
* drawn. When the left mouse button is pressed,
* selection mode is entered with the picking matrix.
* Picking is demonstrated in this program. In
* rendering mode, three overlapping rectangles are
* drawn. When the left mouse button is pressed,
* selection mode is entered with the picking matrix.
* Rectangles which are drawn under the cursor position
* are "picked." Pay special attention to the depth
* are "picked." Pay special attention to the depth
* value range, which is returned.
*/
#include <stdlib.h>
#include <stdio.h>
#include <GL/glut.h>
void
void
myinit(void)
{
glClearColor(0.0, 0.0, 0.0, 0.0);
@@ -61,11 +61,11 @@ myinit(void)
glDepthRange(0.0, 1.0); /* The default z mapping */
}
/* The three rectangles are drawn. In selection mode,
* each rectangle is given the same name. Note that
/* The three rectangles are drawn. In selection mode,
* each rectangle is given the same name. Note that
* each rectangle is drawn with a different z value.
*/
void
void
drawRects(GLenum mode)
{
if (mode == GL_SELECT)
@@ -97,10 +97,10 @@ drawRects(GLenum mode)
glEnd();
}
/* processHits() prints out the contents of the
/* processHits() prints out the contents of the
* selection array.
*/
void
void
processHits(GLint hits, GLuint buffer[])
{
unsigned int i, j;
@@ -125,13 +125,13 @@ processHits(GLint hits, GLuint buffer[])
}
}
/* pickRects() sets up selection mode, name stack,
* and projection matrix for picking. Then the objects
/* pickRects() sets up selection mode, name stack,
* and projection matrix for picking. Then the objects
* are drawn.
*/
#define BUFSIZE 512
void
void
pickRects(int button, int state, int x, int y)
{
GLuint selectBuf[BUFSIZE];
@@ -164,7 +164,7 @@ pickRects(int button, int state, int x, int y)
processHits(hits, selectBuf);
}
void
void
display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -172,7 +172,7 @@ display(void)
glutSwapBuffers();
}
void
void
myReshape(int w, int h)
{
glViewport(0, 0, w, h);
@@ -183,21 +183,8 @@ myReshape(int w, int h)
glLoadIdentity();
}
static void
key(unsigned char k, int x, int y)
{
switch (k) {
case 27: /* Escape */
exit(0);
break;
default:
return;
}
glutPostRedisplay();
}
/* Main Loop
* Open window with initial window size, title bar,
* Open window with initial window size, title bar,
* RGBA display mode, depth buffer, and handle input events.
*/
int
@@ -211,7 +198,6 @@ main(int argc, char **argv)
glutMouseFunc(pickRects);
glutReshapeFunc(myReshape);
glutDisplayFunc(display);
glutKeyboardFunc(key);
glutMainLoop();
return 0; /* ANSI C requires main to return int. */
}

View File

@@ -3,14 +3,14 @@
/*
* (c) Copyright 1993, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and this permission notice appear in supporting documentation, and that
* and this permission notice appear in supporting documentation, and that
* the name of Silicon Graphics, Inc. not be used in advertising
* or publicity pertaining to distribution of the software without specific,
* written prior permission.
* written prior permission.
*
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
@@ -24,8 +24,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
* US Government Users Restricted Rights
*
* US Government Users Restricted Rights
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
@@ -39,7 +39,7 @@
*/
/*
* plane.c
* This program demonstrates the use of local versus
* This program demonstrates the use of local versus
* infinite lighting on a flat plane.
*/
#include <stdlib.h>
@@ -130,30 +130,17 @@ void myReshape(int w, int h)
glViewport (0, 0, w, h);
glMatrixMode (GL_PROJECTION);
glLoadIdentity ();
if (w <= h)
glOrtho (-1.5, 1.5, -1.5*(GLdouble)h/(GLdouble)w,
if (w <= h)
glOrtho (-1.5, 1.5, -1.5*(GLdouble)h/(GLdouble)w,
1.5*(GLdouble)h/(GLdouble)w, -10.0, 10.0);
else
glOrtho (-1.5*(GLdouble)w/(GLdouble)h,
else
glOrtho (-1.5*(GLdouble)w/(GLdouble)h,
1.5*(GLdouble)w/(GLdouble)h, -1.5, 1.5, -10.0, 10.0);
glMatrixMode (GL_MODELVIEW);
}
static void
key(unsigned char k, int x, int y)
{
switch (k) {
case 27: /* Escape */
exit(0);
break;
default:
return;
}
glutPostRedisplay();
}
/* Main Loop
* Open window with initial window size, title bar,
* Open window with initial window size, title bar,
* RGBA display mode, and handle input events.
*/
int main(int argc, char** argv)
@@ -165,7 +152,6 @@ int main(int argc, char** argv)
myinit();
glutReshapeFunc (myReshape);
glutDisplayFunc(display);
glutKeyboardFunc(key);
glutMainLoop();
return 0; /* ANSI C requires main to return int. */
}

View File

@@ -1,13 +1,13 @@
/*
* Copyright (c) 1993-1997, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and this permission notice appear in supporting documentation, and that
* and this permission notice appear in supporting documentation, and that
* the name of Silicon Graphics, Inc. not be used in advertising
* or publicity pertaining to distribution of the software without specific,
* written prior permission.
* written prior permission.
*
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
@@ -21,8 +21,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
* US Government Users Restricted Rights
*
* US Government Users Restricted Rights
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
@@ -89,7 +89,7 @@ void display (void)
}
/* specify initial properties
* create display list with sphere
* create display list with sphere
* initialize lighting and depth buffer
*/
void gfxinit (void)
@@ -137,7 +137,7 @@ void mouse(int button, int state, int x, int y) {
case GLUT_LEFT_BUTTON:
switch (state) {
case GLUT_DOWN:
spinx = (spinx + 5) % 360;
spinx = (spinx + 5) % 360;
glutPostRedisplay();
break;
default:
@@ -147,7 +147,7 @@ void mouse(int button, int state, int x, int y) {
case GLUT_MIDDLE_BUTTON:
switch (state) {
case GLUT_DOWN:
spiny = (spiny + 5) % 360;
spiny = (spiny + 5) % 360;
glutPostRedisplay();
break;
default:
@@ -209,21 +209,8 @@ void keyboard (unsigned char key, int x, int y)
}
}
static void
key(unsigned char k, int x, int y)
{
switch (k) {
case 27: /* Escape */
exit(0);
break;
default:
return;
}
glutPostRedisplay();
}
/* Main Loop
* Open window with initial window size, title bar,
* Open window with initial window size, title bar,
* RGBA display mode, and handle input events.
*/
int main(int argc, char** argv)
@@ -236,7 +223,6 @@ int main(int argc, char** argv)
glutMouseFunc(mouse);
glutKeyboardFunc(keyboard);
gfxinit();
glutKeyboardFunc(key);
glutMainLoop();
return 0;
}

View File

@@ -3,14 +3,14 @@
/*
* (c) Copyright 1993, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and this permission notice appear in supporting documentation, and that
* and this permission notice appear in supporting documentation, and that
* the name of Silicon Graphics, Inc. not be used in advertising
* or publicity pertaining to distribution of the software without specific,
* written prior permission.
* written prior permission.
*
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
@@ -24,8 +24,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
* US Government Users Restricted Rights
*
* US Government Users Restricted Rights
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
@@ -76,7 +76,7 @@ void display(void)
/* draw all polygons in white */
glColor3f (1.0, 1.0, 1.0);
/* draw one solid, unstippled rectangle, */
/* draw one solid, unstippled rectangle, */
/* then two stippled rectangles */
glRectf (25.0, 25.0, 125.0, 125.0);
glEnable (GL_POLYGON_STIPPLE);
@@ -89,11 +89,11 @@ void display(void)
glFlush ();
}
void myinit (void)
void myinit (void)
{
/* clear background to black */
glClearColor (0.0, 0.0, 0.0, 0.0);
glShadeModel (GL_FLAT);
glShadeModel (GL_FLAT);
}
static void reshape(GLsizei w, GLsizei h)
@@ -106,21 +106,8 @@ static void reshape(GLsizei w, GLsizei h)
glLoadIdentity();
}
static void
key(unsigned char k, int x, int y)
{
switch (k) {
case 27: /* Escape */
exit(0);
break;
default:
return;
}
glutPostRedisplay();
}
/* Main Loop
* Open window with initial window size, title bar,
* Open window with initial window size, title bar,
* RGBA display mode, and handle input events.
*/
int main(int argc, char** argv)
@@ -132,7 +119,6 @@ int main(int argc, char** argv)
myinit ();
glutDisplayFunc(display);
glutReshapeFunc(reshape);
glutKeyboardFunc(key);
glutMainLoop();
return 0; /* ANSI C requires main to return int. */
}

View File

@@ -3,14 +3,14 @@
/*
* (c) Copyright 1993, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and this permission notice appear in supporting documentation, and that
* and this permission notice appear in supporting documentation, and that
* the name of Silicon Graphics, Inc. not be used in advertising
* or publicity pertaining to distribution of the software without specific,
* written prior permission.
* written prior permission.
*
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
@@ -24,8 +24,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
* US Government Users Restricted Rights
*
* US Government Users Restricted Rights
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
@@ -39,9 +39,9 @@
*/
/*
* sccolorlight.c
* This program demonstrates the use of a colored
* (magenta, in this example) light source. Objects
* are drawn using a grey material characteristic.
* This program demonstrates the use of a colored
* (magenta, in this example) light source. Objects
* are drawn using a grey material characteristic.
* A single light source illuminates the objects.
*/
#include <stdlib.h>
@@ -61,7 +61,7 @@ void myinit(void)
glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse);
glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular);
glLightfv(GL_LIGHT0, GL_POSITION, light_position);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glDepthFunc(GL_LESS);
@@ -75,19 +75,19 @@ void display(void)
glRotatef (20.0, 1.0, 0.0, 0.0);
glPushMatrix ();
glTranslatef (-0.75, 0.5, 0.0);
glTranslatef (-0.75, 0.5, 0.0);
glRotatef (90.0, 1.0, 0.0, 0.0);
glutSolidTorus (0.275, 0.85, 20, 20);
glPopMatrix ();
glPushMatrix ();
glTranslatef (-0.75, -0.5, 0.0);
glTranslatef (-0.75, -0.5, 0.0);
glRotatef (270.0, 1.0, 0.0, 0.0);
glutSolidCone (1.0, 2.0, 20, 20);
glPopMatrix ();
glPushMatrix ();
glTranslatef (0.75, 0.0, -1.0);
glTranslatef (0.75, 0.0, -1.0);
glutSolidSphere (1.0, 20, 20);
glPopMatrix ();
@@ -100,30 +100,17 @@ void myReshape(int w, int h)
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
if (w <= h)
glOrtho (-2.5, 2.5, -2.5*(GLfloat)h/(GLfloat)w,
if (w <= h)
glOrtho (-2.5, 2.5, -2.5*(GLfloat)h/(GLfloat)w,
2.5*(GLfloat)h/(GLfloat)w, -10.0, 10.0);
else
glOrtho (-2.5*(GLfloat)w/(GLfloat)h,
else
glOrtho (-2.5*(GLfloat)w/(GLfloat)h,
2.5*(GLfloat)w/(GLfloat)h, -2.5, 2.5, -10.0, 10.0);
glMatrixMode(GL_MODELVIEW);
}
static void
key(unsigned char k, int x, int y)
{
switch (k) {
case 27: /* Escape */
exit(0);
break;
default:
return;
}
glutPostRedisplay();
}
/* Main Loop
* Open window with initial window size, title bar,
* Open window with initial window size, title bar,
* RGBA display mode, and handle input events.
*/
int main(int argc, char** argv)
@@ -135,7 +122,6 @@ int main(int argc, char** argv)
myinit();
glutReshapeFunc (myReshape);
glutDisplayFunc(display);
glutKeyboardFunc(key);
glutMainLoop();
return 0; /* ANSI C requires main to return int. */
}

View File

@@ -3,14 +3,14 @@
/*
* (c) Copyright 1993, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and this permission notice appear in supporting documentation, and that
* and this permission notice appear in supporting documentation, and that
* the name of Silicon Graphics, Inc. not be used in advertising
* or publicity pertaining to distribution of the software without specific,
* written prior permission.
* written prior permission.
*
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
@@ -24,8 +24,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
* US Government Users Restricted Rights
*
* US Government Users Restricted Rights
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
@@ -40,7 +40,7 @@
/*
* scene.c
* This program demonstrates the use of the GL lighting model.
* Objects are drawn using a grey material characteristic.
* Objects are drawn using a grey material characteristic.
* A single light source illuminates the objects.
*/
#include <stdlib.h>
@@ -60,7 +60,7 @@ void myinit (void)
glLightfv (GL_LIGHT0, GL_DIFFUSE, light_diffuse);
glLightfv (GL_LIGHT0, GL_SPECULAR, light_specular);
glLightfv (GL_LIGHT0, GL_POSITION, light_position);
glEnable (GL_LIGHTING);
glEnable (GL_LIGHT0);
glDepthFunc(GL_LESS);
@@ -75,19 +75,19 @@ void display (void)
glRotatef (20.0, 1.0, 0.0, 0.0);
glPushMatrix ();
glTranslatef (-0.75, 0.5, 0.0);
glTranslatef (-0.75, 0.5, 0.0);
glRotatef (90.0, 1.0, 0.0, 0.0);
glutSolidTorus (0.275, 0.85, 15, 15);
glPopMatrix ();
glPushMatrix ();
glTranslatef (-0.75, -0.5, 0.0);
glTranslatef (-0.75, -0.5, 0.0);
glRotatef (270.0, 1.0, 0.0, 0.0);
glutSolidCone (1.0, 2.0, 15, 15);
glPopMatrix ();
glPushMatrix ();
glTranslatef (0.75, 0.0, -1.0);
glTranslatef (0.75, 0.0, -1.0);
glutSolidSphere (1.0, 15, 15);
glPopMatrix ();
@@ -100,30 +100,17 @@ void myReshape(int w, int h)
glViewport (0, 0, w, h);
glMatrixMode (GL_PROJECTION);
glLoadIdentity ();
if (w <= h)
glOrtho (-2.5, 2.5, -2.5*(GLfloat)h/(GLfloat)w,
if (w <= h)
glOrtho (-2.5, 2.5, -2.5*(GLfloat)h/(GLfloat)w,
2.5*(GLfloat)h/(GLfloat)w, -10.0, 10.0);
else
glOrtho (-2.5*(GLfloat)w/(GLfloat)h,
else
glOrtho (-2.5*(GLfloat)w/(GLfloat)h,
2.5*(GLfloat)w/(GLfloat)h, -2.5, 2.5, -10.0, 10.0);
glMatrixMode (GL_MODELVIEW);
}
static void
key(unsigned char k, int x, int y)
{
switch (k) {
case 27: /* Escape */
exit(0);
break;
default:
return;
}
glutPostRedisplay();
}
/* Main Loop
* Open window with initial window size, title bar,
* Open window with initial window size, title bar,
* RGBA display mode, and handle input events.
*/
int main(int argc, char** argv)
@@ -135,7 +122,6 @@ int main(int argc, char** argv)
myinit ();
glutReshapeFunc (myReshape);
glutDisplayFunc(display);
glutKeyboardFunc(key);
glutMainLoop();
return 0; /* ANSI C requires main to return int. */
}

View File

@@ -3,14 +3,14 @@
/*
* (c) Copyright 1993, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and this permission notice appear in supporting documentation, and that
* and this permission notice appear in supporting documentation, and that
* the name of Silicon Graphics, Inc. not be used in advertising
* or publicity pertaining to distribution of the software without specific,
* written prior permission.
* written prior permission.
*
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
@@ -24,8 +24,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
* US Government Users Restricted Rights
*
* US Government Users Restricted Rights
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
@@ -39,7 +39,7 @@
*/
/*
* scenebamb.c
* This program demonstrates use of a blue ambient light
* This program demonstrates use of a blue ambient light
* source.
*/
#include <stdlib.h>
@@ -59,7 +59,7 @@ void myinit(void)
glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse);
glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular);
glLightfv(GL_LIGHT0, GL_POSITION, light_position);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glDepthFunc(GL_LESS);
@@ -74,19 +74,19 @@ void display(void)
glRotatef (20.0, 1.0, 0.0, 0.0);
glPushMatrix ();
glTranslatef (-0.75, 0.5, 0.0);
glTranslatef (-0.75, 0.5, 0.0);
glRotatef (90.0, 1.0, 0.0, 0.0);
glutSolidTorus (0.275, 0.85, 15, 15);
glPopMatrix ();
glPushMatrix ();
glTranslatef (-0.75, -0.5, 0.0);
glTranslatef (-0.75, -0.5, 0.0);
glRotatef (270.0, 1.0, 0.0, 0.0);
glutSolidCone (1.0, 2.0, 15, 15);
glPopMatrix ();
glPushMatrix ();
glTranslatef (0.75, 0.0, -1.0);
glTranslatef (0.75, 0.0, -1.0);
glutSolidSphere (1.0, 15, 15);
glPopMatrix ();
@@ -99,30 +99,17 @@ void myReshape(int w, int h)
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
if (w <= h)
glOrtho (-2.5, 2.5, -2.5*(GLfloat)h/(GLfloat)w,
if (w <= h)
glOrtho (-2.5, 2.5, -2.5*(GLfloat)h/(GLfloat)w,
2.5*(GLfloat)h/(GLfloat)w, -10.0, 10.0);
else
glOrtho (-2.5*(GLfloat)w/(GLfloat)h,
else
glOrtho (-2.5*(GLfloat)w/(GLfloat)h,
2.5*(GLfloat)w/(GLfloat)h, -2.5, 2.5, -10.0, 10.0);
glMatrixMode(GL_MODELVIEW);
}
static void
key(unsigned char k, int x, int y)
{
switch (k) {
case 27: /* Escape */
exit(0);
break;
default:
return;
}
glutPostRedisplay();
}
/* Main Loop
* Open window with initial window size, title bar,
* Open window with initial window size, title bar,
* RGBA display mode, and handle input events.
*/
int main(int argc, char** argv)
@@ -134,7 +121,6 @@ int main(int argc, char** argv)
myinit();
glutReshapeFunc (myReshape);
glutDisplayFunc(display);
glutKeyboardFunc(key);
glutMainLoop();
return 0; /* ANSI C requires main to return int. */
}

View File

@@ -3,14 +3,14 @@
/*
* (c) Copyright 1993, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and this permission notice appear in supporting documentation, and that
* and this permission notice appear in supporting documentation, and that
* the name of Silicon Graphics, Inc. not be used in advertising
* or publicity pertaining to distribution of the software without specific,
* written prior permission.
* written prior permission.
*
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
@@ -24,8 +24,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
* US Government Users Restricted Rights
*
* US Government Users Restricted Rights
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
@@ -58,7 +58,7 @@ void myinit(void)
glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse);
glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular);
glLightfv(GL_LIGHT0, GL_POSITION, light_position);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glDepthFunc(GL_LESS);
@@ -74,19 +74,19 @@ void display(void)
glRotatef (20.0, 1.0, 0.0, 0.0);
glPushMatrix ();
glTranslatef (-0.75, 0.5, 0.0);
glTranslatef (-0.75, 0.5, 0.0);
glRotatef (90.0, 1.0, 0.0, 0.0);
glutSolidTorus (0.275, 0.85, 15, 15);
glPopMatrix ();
glPushMatrix ();
glTranslatef (-0.75, -0.5, 0.0);
glTranslatef (-0.75, -0.5, 0.0);
glRotatef (270.0, 1.0, 0.0, 0.0);
glutSolidCone (1.0, 2.0, 15, 15);
glPopMatrix ();
glPushMatrix ();
glTranslatef (0.75, 0.0, -1.0);
glTranslatef (0.75, 0.0, -1.0);
glutSolidSphere (1.0, 15, 15);
glPopMatrix ();
@@ -99,30 +99,17 @@ void myReshape(int w, int h)
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
if (w <= h)
glOrtho (-2.5, 2.5, -2.5*(GLfloat)h/(GLfloat)w,
if (w <= h)
glOrtho (-2.5, 2.5, -2.5*(GLfloat)h/(GLfloat)w,
2.5*(GLfloat)h/(GLfloat)w, -10.0, 10.0);
else
glOrtho (-2.5*(GLfloat)w/(GLfloat)h,
else
glOrtho (-2.5*(GLfloat)w/(GLfloat)h,
2.5*(GLfloat)w/(GLfloat)h, -2.5, 2.5, -10.0, 10.0);
glMatrixMode(GL_MODELVIEW);
}
static void
key(unsigned char k, int x, int y)
{
switch (k) {
case 27: /* Escape */
exit(0);
break;
default:
return;
}
glutPostRedisplay();
}
/* Main Loop
* Open window with initial window size, title bar,
* Open window with initial window size, title bar,
* RGBA display mode, and handle input events.
*/
int main(int argc, char** argv)
@@ -134,7 +121,6 @@ int main(int argc, char** argv)
myinit();
glutReshapeFunc (myReshape);
glutDisplayFunc(display);
glutKeyboardFunc(key);
glutMainLoop();
return 0; /* ANSI C requires main to return int. */
}

View File

@@ -3,14 +3,14 @@
/*
* (c) Copyright 1993, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and this permission notice appear in supporting documentation, and that
* and this permission notice appear in supporting documentation, and that
* the name of Silicon Graphics, Inc. not be used in advertising
* or publicity pertaining to distribution of the software without specific,
* written prior permission.
* written prior permission.
*
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
@@ -24,8 +24,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
* US Government Users Restricted Rights
*
* US Government Users Restricted Rights
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
@@ -38,9 +38,9 @@
* OpenGL(TM) is a trademark of Silicon Graphics, Inc.
*/
/* stencil.c
* This program draws two rotated tori in a window.
* A diamond in the center of the window masks out part
* of the scene. Within this mask, a different model
* This program draws two rotated tori in a window.
* A diamond in the center of the window masks out part
* of the scene. Within this mask, a different model
* (a sphere) is drawn in a different color.
*/
#include <stdlib.h>
@@ -49,7 +49,7 @@
#define YELLOWMAT 1
#define BLUEMAT 2
void myinit (void)
void myinit (void)
{
GLfloat yellow_diffuse[] = { 0.7, 0.7, 0.0, 1.0 };
GLfloat yellow_specular[] = { 1.0, 1.0, 1.0, 1.0 };
@@ -112,7 +112,7 @@ void display(void)
glFlush();
}
/* Whenever the window is reshaped, redefine the
/* Whenever the window is reshaped, redefine the
* coordinate system and redraw the stencil area.
*/
void myReshape(int w, int h)
@@ -144,21 +144,8 @@ void myReshape(int w, int h)
glTranslatef(0.0, 0.0, -5.0);
}
static void
key(unsigned char k, int x, int y)
{
switch (k) {
case 27: /* Escape */
exit(0);
break;
default:
return;
}
glutPostRedisplay();
}
/* Main Loop
* Open window with initial window size, title bar,
* Open window with initial window size, title bar,
* RGBA display mode, and handle input events.
*/
int main(int argc, char** argv)
@@ -170,7 +157,6 @@ int main(int argc, char** argv)
myinit ();
glutReshapeFunc (myReshape);
glutDisplayFunc(display);
glutKeyboardFunc(key);
glutMainLoop();
return 0; /* ANSI C requires main to return int. */
}

View File

@@ -3,14 +3,14 @@
/*
* (c) Copyright 1993, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and this permission notice appear in supporting documentation, and that
* and this permission notice appear in supporting documentation, and that
* the name of Silicon Graphics, Inc. not be used in advertising
* or publicity pertaining to distribution of the software without specific,
* written prior permission.
* written prior permission.
*
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
@@ -24,8 +24,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
* US Government Users Restricted Rights
*
* US Government Users Restricted Rights
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
@@ -38,10 +38,10 @@
* OpenGL(TM) is a trademark of Silicon Graphics, Inc.
*/
/*
* stroke.c
* This program demonstrates some characters of a
* stroke.c
* This program demonstrates some characters of a
* stroke (vector) font. The characters are represented
* by display lists, which are given numbers which
* by display lists, which are given numbers which
* correspond to the ASCII values of the characters.
* Use of glCallLists() is demonstrated.
*/
@@ -59,7 +59,7 @@ typedef struct charpoint {
} CP;
CP Adata[] = {
{ 0, 0, PT}, {0, 9, PT}, {1, 10, PT}, {4, 10, PT},
{ 0, 0, PT}, {0, 9, PT}, {1, 10, PT}, {4, 10, PT},
{5, 9, PT}, {5, 0, STROKE}, {0, 5, PT}, {5, 5, END}
};
@@ -69,18 +69,18 @@ CP Edata[] = {
};
CP Pdata[] = {
{0, 0, PT}, {0, 10, PT}, {4, 10, PT}, {5, 9, PT}, {5, 6, PT},
{0, 0, PT}, {0, 10, PT}, {4, 10, PT}, {5, 9, PT}, {5, 6, PT},
{4, 5, PT}, {0, 5, END}
};
CP Rdata[] = {
{0, 0, PT}, {0, 10, PT}, {4, 10, PT}, {5, 9, PT}, {5, 6, PT},
{0, 0, PT}, {0, 10, PT}, {4, 10, PT}, {5, 9, PT}, {5, 6, PT},
{4, 5, PT}, {0, 5, STROKE}, {3, 5, PT}, {5, 0, END}
};
CP Sdata[] = {
{0, 1, PT}, {1, 0, PT}, {4, 0, PT}, {5, 1, PT}, {5, 4, PT},
{4, 5, PT}, {1, 5, PT}, {0, 6, PT}, {0, 9, PT}, {1, 10, PT},
{0, 1, PT}, {1, 0, PT}, {4, 0, PT}, {5, 1, PT}, {5, 4, PT},
{4, 5, PT}, {1, 5, PT}, {0, 6, PT}, {0, 9, PT}, {1, 10, PT},
{4, 10, PT}, {5, 9, END}
};
@@ -163,21 +163,8 @@ static void reshape(GLsizei w, GLsizei h)
glLoadIdentity();
}
static void
key(unsigned char k, int x, int y)
{
switch (k) {
case 27: /* Escape */
exit(0);
break;
default:
return;
}
glutPostRedisplay();
}
/* Main Loop
* Open window with initial window size, title bar,
* Open window with initial window size, title bar,
* RGBA display mode, and handle input events.
*/
int main(int argc, char** argv)
@@ -189,7 +176,6 @@ int main(int argc, char** argv)
myinit ();
glutDisplayFunc(display);
glutReshapeFunc(reshape);
glutKeyboardFunc(key);
glutMainLoop();
return 0; /* ANSI C requires main to return int. */
}

View File

@@ -2,14 +2,14 @@
/**
* (c) Copyright 1993, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and this permission notice appear in supporting documentation, and that
* and this permission notice appear in supporting documentation, and that
* the name of Silicon Graphics, Inc. not be used in advertising
* or publicity pertaining to distribution of the software without specific,
* written prior permission.
* written prior permission.
*
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
@@ -23,8 +23,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
* US Government Users Restricted Rights
*
* US Government Users Restricted Rights
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
@@ -38,7 +38,7 @@
*/
/**
* surface.c
* This program draws a NURBS surface in the shape of a
* This program draws a NURBS surface in the shape of a
* symmetrical hill.
*/
#include <GL/glut.h>
@@ -65,9 +65,9 @@ void init_surface(void)
else
ctlpoints[u][v][2] = -3.0;
}
}
}
}
}
/* Initialize material property and depth buffer.
*/
void myinit(void)
@@ -111,12 +111,12 @@ void display(void)
glScalef (0.25, 0.25, 0.25);
gluBeginSurface(theNurb);
gluNurbsSurface(theNurb,
gluNurbsSurface(theNurb,
8, knots,
8, knots,
4 * 3,
3,
&ctlpoints[0][0][0],
&ctlpoints[0][0][0],
4, 4,
GL_MAP2_VERTEX_3);
gluEndSurface(theNurb);
@@ -134,7 +134,7 @@ void display(void)
glEnd();
glEnable(GL_LIGHTING);
}
glPopMatrix();
glutSwapBuffers();
}
@@ -194,19 +194,6 @@ mouse(int button, int state, int x, int y)
}
}
static void
key(unsigned char k, int x, int y)
{
switch (k) {
case 27: /* Escape */
exit(0);
break;
default:
return;
}
glutPostRedisplay();
}
/* Main Loop */
int
main(int argc, char** argv)
@@ -225,7 +212,6 @@ main(int argc, char** argv)
glutAttachMenu(GLUT_RIGHT_BUTTON);
glutMouseFunc(mouse);
glutMotionFunc(motion);
glutKeyboardFunc(key);
glutMainLoop();
return 0; /* ANSI C requires main to return int. */
}

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