summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuc Verhaegen <libv@skynet.be>2010-03-06 23:45:52 +0100
committerLuc Verhaegen <libv@skynet.be>2010-03-06 23:45:52 +0100
commit9c927f2639598e59bb4cf68a32ee80606f2dd56a (patch)
tree66f5f4874f86681b0179d4ff1e2ceb5e50728234
parent35fe0e56e6f6b45ceea0c3d43be7596c1ea44e00 (diff)
Import ubuntu's 7.2-1ubuntu2 mesa version.debian-7.2-1ubuntu2
Found on intrepid 8/10.
-rw-r--r--[-rwxr-xr-x]autogen.sh0
-rw-r--r--[-rwxr-xr-x]bin/confdiff.sh0
-rw-r--r--[-rwxr-xr-x]bin/installmesa0
-rw-r--r--configs/.gitignore2
-rw-r--r--configs/autoconf107
-rw-r--r--configs/debian-default17
-rw-r--r--configs/debian-dri-amd649
-rw-r--r--configs/debian-dri-any9
-rw-r--r--configs/debian-dri-default36
-rw-r--r--configs/debian-dri-i3869
-rw-r--r--configs/debian-dri-i386-i68614
-rw-r--r--configs/debian-dri-optimized-default13
-rw-r--r--configs/debian-indirect-default7
-rw-r--r--configs/debian-indirect-hurd-i3869
-rw-r--r--configs/debian-osmesa9
-rw-r--r--configs/debian-osmesa-default10
-rw-r--r--configs/debian-osmesa-static9
-rw-r--r--configs/debian-osmesa1610
-rw-r--r--configs/debian-osmesa16-static10
-rw-r--r--configs/debian-osmesa3210
-rw-r--r--configs/debian-osmesa32-static10
-rw-r--r--configs/debian-swx11+glu-alpha-ev512
-rw-r--r--configs/debian-swx11+glu-amd6410
-rw-r--r--configs/debian-swx11+glu-any9
-rw-r--r--configs/debian-swx11+glu-default14
-rw-r--r--configs/debian-swx11+glu-i38610
-rw-r--r--configs/debian-swx11+glu-i386-i68614
-rw-r--r--configs/debian-swx11+glu-powerpc-60313
-rw-r--r--configs/debian-swx11+glu-ppc6411
-rw-r--r--configs/debian-swx11+glu-sparc10
-rw-r--r--configs/debian-swx11+glu-sparc-ultrasparc13
-rw-r--r--configs/debian-swx11+glu-static-amd6410
-rw-r--r--configs/debian-swx11+glu-static-any10
-rw-r--r--configs/debian-swx11+glu-static-i38610
-rw-r--r--configs/debian-swx11+glu-static-ppc6411
-rw-r--r--configs/default-bp75
-rw-r--r--configs/linux-osmesa-static15
-rw-r--r--configs/linux-osmesa32-static13
-rw-r--r--debian/Xsession.d_65mesa-check-x86-6415
-rw-r--r--debian/changelog1617
-rw-r--r--debian/compat1
-rw-r--r--debian/control370
-rw-r--r--debian/copyright444
-rw-r--r--debian/glxdemo.115
-rw-r--r--debian/glxgears.129
-rw-r--r--debian/glxheads.130
-rw-r--r--debian/glxinfo.141
-rw-r--r--debian/libgl1-mesa-dev.install2
-rw-r--r--debian/libgl1-mesa-dri-i686.install1
-rw-r--r--debian/libgl1-mesa-dri.install2
-rw-r--r--debian/libgl1-mesa-glx-i686.install1
-rw-r--r--debian/libgl1-mesa-glx.install1
-rw-r--r--debian/libgl1-mesa-glx.shlibs1
-rw-r--r--debian/libgl1-mesa-swx11-dev.install2
-rw-r--r--debian/libgl1-mesa-swx11-i686.install1
-rw-r--r--debian/libgl1-mesa-swx11-i686.shlibs1
-rw-r--r--debian/libgl1-mesa-swx11.install1
-rw-r--r--debian/libgl1-mesa-swx11.shlibs1
-rw-r--r--debian/libglu1-mesa-dev.install4
-rw-r--r--debian/libglu1-mesa.install1
-rw-r--r--debian/libglu1-mesa.shlibs1
-rw-r--r--debian/libglw1-mesa-dev.install3
-rw-r--r--debian/libglw1-mesa.install1
-rw-r--r--debian/libglw1-mesa.shlibs1
-rw-r--r--debian/libosmesa6-dev.install7
-rw-r--r--debian/libosmesa6.install3
-rw-r--r--debian/libosmesa6.shlibs3
-rw-r--r--debian/mesa-common-dev.docs8
-rw-r--r--debian/mesa-common-dev.install5
-rw-r--r--debian/mesa-utils.install4
-rw-r--r--debian/mesa-utils.manpages4
-rw-r--r--debian/patches/01_disable-intel-classic-warn.diff14
-rw-r--r--debian/patches/02_use-ieee-fp-on-s390-and-m68k.patch19
-rw-r--r--debian/patches/03_optional-progs-and-install.patch55
-rw-r--r--debian/patches/04_osmesa_version.diff22
-rw-r--r--debian/patches/101_ubuntu_hidden_glname.patch12
-rw-r--r--debian/patches/102_dont_vblank.patch13
-rw-r--r--debian/patches/103_fix-crash-in-i830_emit_state.dpatch23
-rw-r--r--debian/patches/series7
-rwxr-xr-xdebian/rules258
-rw-r--r--debian/scripts/choose-configs58
-rw-r--r--debian/scripts/install-source.sh46
-rw-r--r--debian/watch2
-rw-r--r--docs/gears.pngbin1608 -> 0 bytes
-rw-r--r--doxygen/.gitignore15
-rw-r--r--doxygen/Makefile33
-rw-r--r--doxygen/README10
-rw-r--r--doxygen/common.doxy1153
-rw-r--r--doxygen/core_subset.doxy226
-rw-r--r--doxygen/doxy.bat19
-rw-r--r--doxygen/glapi.doxy49
-rw-r--r--doxygen/header.html17
-rw-r--r--doxygen/header_subset.html11
-rw-r--r--doxygen/main.doxy50
-rw-r--r--doxygen/math.doxy49
-rw-r--r--doxygen/math_subset.doxy177
-rw-r--r--doxygen/miniglx.doxy179
-rw-r--r--doxygen/radeon_subset.doxy203
-rw-r--r--doxygen/shader.doxy49
-rw-r--r--doxygen/swrast.doxy48
-rw-r--r--doxygen/swrast_setup.doxy49
-rw-r--r--doxygen/tnl.doxy50
-rw-r--r--doxygen/tnl_dd.doxy49
-rw-r--r--doxygen/vbo.doxy50
-rw-r--r--include/GLES/egl.h320
-rw-r--r--include/GLES/egltypes.h45
-rw-r--r--progs/beos/.gitignore3
-rw-r--r--progs/demos/.gitignore63
-rw-r--r--progs/demos/Windows/all.dsp101
-rw-r--r--progs/demos/Windows/bounce.dsp112
-rw-r--r--progs/demos/Windows/clearspd.dsp112
-rw-r--r--progs/demos/Windows/cubemap.dsp112
-rw-r--r--progs/demos/Windows/demos.dsw782
-rw-r--r--progs/demos/Windows/drawpix.dsp112
-rw-r--r--progs/demos/Windows/fire.dsp112
-rw-r--r--progs/demos/Windows/gears.dsp112
-rw-r--r--progs/demos/Windows/geartrain.dsp112
-rw-r--r--progs/demos/Windows/glinfo.dsp112
-rw-r--r--progs/demos/Windows/gloss.dsp112
-rw-r--r--progs/demos/Windows/gltestperf.dsp112
-rw-r--r--progs/demos/Windows/glutfx.dsp112
-rw-r--r--progs/demos/Windows/ipers.dsp112
-rw-r--r--progs/demos/Windows/isosurf.dsp112
-rw-r--r--progs/demos/Windows/loadbias.dsp112
-rw-r--r--progs/demos/Windows/morph3d.dsp112
-rw-r--r--progs/demos/Windows/multiarb.dsp112
-rw-r--r--progs/demos/Windows/occlude.dsp112
-rw-r--r--progs/demos/Windows/osdemo.dsp112
-rw-r--r--progs/demos/Windows/paltex.dsp112
-rw-r--r--progs/demos/Windows/pixeltex.dsp112
-rw-r--r--progs/demos/Windows/pointblast.dsp112
-rw-r--r--progs/demos/Windows/rain.dsp112
-rw-r--r--progs/demos/Windows/ray.dsp112
-rw-r--r--progs/demos/Windows/readpix.dsp112
-rw-r--r--progs/demos/Windows/reflect.dsp112
-rw-r--r--progs/demos/Windows/renormal.dsp112
-rw-r--r--progs/demos/Windows/shadowtex.dsp112
-rw-r--r--progs/demos/Windows/spectex.dsp112
-rw-r--r--progs/demos/Windows/spriteblast.dsp112
-rw-r--r--progs/demos/Windows/stex3d.dsp112
-rw-r--r--progs/demos/Windows/teapot.dsp112
-rw-r--r--progs/demos/Windows/terrain.dsp112
-rw-r--r--progs/demos/Windows/tessdemo.dsp112
-rw-r--r--progs/demos/Windows/texcyl.dsp112
-rw-r--r--progs/demos/Windows/texdown.dsp112
-rw-r--r--progs/demos/Windows/texenv.dsp112
-rw-r--r--progs/demos/Windows/texobj.dsp112
-rw-r--r--progs/demos/Windows/trispd.dsp112
-rw-r--r--progs/demos/Windows/tunnel.dsp112
-rw-r--r--progs/demos/Windows/tunnel2.dsp112
-rw-r--r--progs/demos/Windows/winpos.dsp112
-rw-r--r--progs/demos/extfuncs.h162
-rw-r--r--progs/demos/readtex.c454
-rw-r--r--progs/demos/readtex.h26
-rw-r--r--progs/demos/showbuffer.c198
-rw-r--r--progs/demos/showbuffer.h36
-rw-r--r--progs/demos/trackball.c338
-rw-r--r--progs/demos/trackball.h84
-rw-r--r--progs/directfb/.gitignore4
-rw-r--r--progs/directfb/Makefile38
-rw-r--r--progs/directfb/df_gears.c480
-rw-r--r--progs/directfb/df_morph3d.c1013
-rw-r--r--progs/directfb/df_reflect.c489
-rw-r--r--progs/directfb/multi_window.c240
-rw-r--r--progs/egl/.gitignore5
-rw-r--r--progs/egl/Makefile65
-rw-r--r--progs/egl/demo1.c145
-rw-r--r--progs/egl/demo2.c190
-rw-r--r--progs/egl/demo3.c636
-rw-r--r--progs/egl/eglgears.c475
-rw-r--r--progs/egl/eglinfo.c166
-rw-r--r--progs/fbdev/.gitignore1
-rw-r--r--progs/fp/.gitignore42
-rw-r--r--progs/fp/Makefile128
-rw-r--r--progs/fp/point-position.c119
-rw-r--r--progs/fp/tri-abs.c107
-rw-r--r--progs/fp/tri-add.c110
-rw-r--r--progs/fp/tri-cmp.c110
-rw-r--r--progs/fp/tri-cos.c113
-rw-r--r--progs/fp/tri-depth.c111
-rw-r--r--progs/fp/tri-depth2.c116
-rw-r--r--progs/fp/tri-depthwrite.c107
-rw-r--r--progs/fp/tri-depthwrite2.c107
-rw-r--r--progs/fp/tri-dp3.c109
-rw-r--r--progs/fp/tri-dp4.c109
-rw-r--r--progs/fp/tri-dph.c109
-rw-r--r--progs/fp/tri-dst.c109
-rw-r--r--progs/fp/tri-ex2.c110
-rw-r--r--progs/fp/tri-flr.c110
-rw-r--r--progs/fp/tri-fp.c109
-rw-r--r--progs/fp/tri-frc.c111
-rw-r--r--progs/fp/tri-inv.c109
-rw-r--r--progs/fp/tri-kil.c111
-rw-r--r--progs/fp/tri-lg2.c110
-rw-r--r--progs/fp/tri-lit.c111
-rw-r--r--progs/fp/tri-lrp.c109
-rw-r--r--progs/fp/tri-mad.c109
-rw-r--r--progs/fp/tri-max.c109
-rw-r--r--progs/fp/tri-min.c109
-rw-r--r--progs/fp/tri-mov.c102
-rw-r--r--progs/fp/tri-mul.c109
-rw-r--r--progs/fp/tri-param.c114
-rw-r--r--progs/fp/tri-position.c109
-rw-r--r--progs/fp/tri-pow.c109
-rw-r--r--progs/fp/tri-rcp.c110
-rw-r--r--progs/fp/tri-rsq.c110
-rw-r--r--progs/fp/tri-scs.c111
-rw-r--r--progs/fp/tri-sge.c109
-rw-r--r--progs/fp/tri-sge2.c114
-rw-r--r--progs/fp/tri-sin.c114
-rw-r--r--progs/fp/tri-slt.c109
-rw-r--r--progs/fp/tri-sub.c109
-rw-r--r--progs/fp/tri-swz.c109
-rw-r--r--progs/fp/tri-swz2.c109
-rw-r--r--progs/fp/tri-tex.c130
-rw-r--r--progs/fp/tri-xpd.c108
-rw-r--r--progs/glsl/.gitignore17
-rw-r--r--progs/glsl/readtex.c454
-rw-r--r--progs/glsl/readtex.h26
-rw-r--r--progs/glsl/shaderutil.c162
-rw-r--r--progs/miniglx/.gitignore6
-rw-r--r--progs/miniglx/Makefile60
-rw-r--r--progs/miniglx/glfbdevtest.c478
-rw-r--r--progs/miniglx/manytex.c382
-rw-r--r--progs/miniglx/miniglxsample.c128
-rw-r--r--progs/miniglx/miniglxtest.c272
-rw-r--r--progs/miniglx/sample_server.c112
-rw-r--r--progs/miniglx/sample_server2.c229
-rw-r--r--progs/miniglx/texline.c268
-rw-r--r--progs/osdemos/.gitignore8
-rw-r--r--progs/redbook/.gitignore64
-rw-r--r--progs/redbook/Windows/redbook.dsw29
-rw-r--r--progs/redbook/Windows/teapots.dsp112
-rw-r--r--progs/samples/.gitignore47
-rw-r--r--progs/samples/readtex.c454
-rw-r--r--progs/slang/.gitignore3
-rw-r--r--progs/slang/Makefile57
-rw-r--r--progs/slang/README7
-rw-r--r--progs/slang/cltest.c253
-rw-r--r--progs/slang/cltest.txt1615
-rw-r--r--progs/slang/framework.c145
-rw-r--r--progs/slang/framework.h82
-rw-r--r--progs/slang/sotest.c439
-rw-r--r--progs/slang/vstest.c340
-rw-r--r--progs/slang/vstest.txt68
-rw-r--r--progs/slang/windows/vc60/cltest.dsp94
-rw-r--r--progs/slang/windows/vc60/framework.dsp92
-rw-r--r--progs/slang/windows/vc60/slang.dsw74
-rw-r--r--progs/slang/windows/vc60/sotest.dsp90
-rw-r--r--progs/slang/windows/vc60/vstest.dsp93
-rw-r--r--progs/tests/.gitignore81
-rw-r--r--progs/tests/Makefile179
-rw-r--r--progs/tests/Makefile.win44
-rw-r--r--progs/tests/afsmultiarb.c469
-rw-r--r--progs/tests/antialias.c237
-rw-r--r--progs/tests/api_speed.c146
-rwxr-xr-xprogs/tests/api_speed.py143
-rw-r--r--progs/tests/arbfpspec.c192
-rw-r--r--progs/tests/arbfptest1.c210
-rw-r--r--progs/tests/arbfptexture.c153
-rw-r--r--progs/tests/arbfptrig.c156
-rw-r--r--progs/tests/arbnpot-mipmap.c184
-rw-r--r--progs/tests/arbnpot.c197
-rw-r--r--progs/tests/arbvptest1.c164
-rw-r--r--progs/tests/arbvptest3.c127
-rw-r--r--progs/tests/arbvptorus.c186
-rw-r--r--progs/tests/arbvpwarpmesh.c246
-rw-r--r--progs/tests/arraytexture.c337
-rw-r--r--progs/tests/auxbuffer.c499
-rw-r--r--progs/tests/blendminmax.c209
-rw-r--r--progs/tests/blendsquare.c178
-rw-r--r--progs/tests/bufferobj.c371
-rw-r--r--progs/tests/bug_3050.c162
-rw-r--r--progs/tests/bug_3101.c128
-rw-r--r--progs/tests/bug_3195.c275
-rw-r--r--progs/tests/copypixrate.c259
-rw-r--r--progs/tests/crossbar.c235
-rw-r--r--progs/tests/cva.c160
-rw-r--r--progs/tests/debugger.c733
-rw-r--r--progs/tests/descrip.mms84
-rw-r--r--progs/tests/dinoshade.c910
-rw-r--r--progs/tests/drawbuffers.c303
-rw-r--r--progs/tests/exactrast.c200
-rw-r--r--progs/tests/ext422square.c258
-rw-r--r--progs/tests/fbotest1.c206
-rw-r--r--progs/tests/fbotest2.c202
-rw-r--r--progs/tests/fbotexture.c451
-rw-r--r--progs/tests/floattex.c169
-rw-r--r--progs/tests/fog.c199
-rw-r--r--progs/tests/fogcoord.c102
-rw-r--r--progs/tests/fptest1.c225
-rw-r--r--progs/tests/fptexture.c151
-rw-r--r--progs/tests/getprocaddress.c556
-rw-r--r--progs/tests/getprocaddress.py93
-rw-r--r--progs/tests/interleave.c406
-rw-r--r--progs/tests/invert.c195
-rw-r--r--progs/tests/jkrahntest.c181
-rw-r--r--progs/tests/lineclip.c175
-rw-r--r--progs/tests/manytex.c382
-rw-r--r--progs/tests/minmag.c198
-rw-r--r--progs/tests/mipmap_limits.c270
-rw-r--r--progs/tests/multipal.c373
-rw-r--r--progs/tests/multitexarray.c238
-rw-r--r--progs/tests/multiwindow.c169
-rw-r--r--progs/tests/no_s3tc.c97
-rw-r--r--progs/tests/packedpixels.c342
-rw-r--r--progs/tests/pbo.c296
-rw-r--r--progs/tests/prog_parameter.c285
-rw-r--r--progs/tests/projtex.c1028
-rw-r--r--progs/tests/random.c457
-rw-r--r--progs/tests/readrate.c285
-rw-r--r--progs/tests/seccolor.c145
-rw-r--r--progs/tests/shader_api.c337
-rw-r--r--progs/tests/sharedtex.c440
-rw-r--r--progs/tests/stencil_twoside.c299
-rw-r--r--progs/tests/stencil_wrap.c257
-rw-r--r--progs/tests/stencilwrap.c281
-rw-r--r--progs/tests/subtexrate.c350
-rw-r--r--progs/tests/tex1d.c139
-rw-r--r--progs/tests/texcmp.c414
-rw-r--r--progs/tests/texcompress2.c273
-rw-r--r--progs/tests/texfilt.c398
-rw-r--r--progs/tests/texgenmix.c640
-rw-r--r--progs/tests/texline.c279
-rw-r--r--progs/tests/texobjshare.c219
-rw-r--r--progs/tests/texrect.c360
-rw-r--r--progs/tests/texwrap.c304
-rw-r--r--progs/tests/unfilledclip.c205
-rw-r--r--progs/tests/vao-01.c177
-rw-r--r--progs/tests/vao-02.c205
-rw-r--r--progs/tests/vparray.c294
-rw-r--r--progs/tests/vpeval.c231
-rw-r--r--progs/tests/vptest1.c170
-rw-r--r--progs/tests/vptest2.c151
-rw-r--r--progs/tests/vptest3.c120
-rw-r--r--progs/tests/vptorus.c174
-rw-r--r--progs/tests/vpwarpmesh.c236
-rw-r--r--progs/tests/yuvrect.c193
-rw-r--r--progs/tests/yuvsquare.c232
-rw-r--r--progs/tests/zreaddraw.c116
-rw-r--r--progs/tools/trace/.gitignore1
-rw-r--r--progs/tools/trace/Makefile30
-rw-r--r--progs/tools/trace/README23
-rwxr-xr-xprogs/tools/trace/gltrace82
-rw-r--r--progs/tools/trace/gltrace.py189
-rw-r--r--progs/tools/trace/gltrace_support.cc193
-rw-r--r--progs/tools/trace/gltrace_support.h65
-rw-r--r--progs/trivial/.gitignore65
-rw-r--r--progs/trivial/Makefile144
-rw-r--r--progs/trivial/clear.c126
-rw-r--r--progs/trivial/dlist-dangling.c149
-rw-r--r--progs/trivial/dlist-edgeflag-dangling.c154
-rw-r--r--progs/trivial/dlist-edgeflag.c158
-rw-r--r--progs/trivial/drawarrays.c127
-rw-r--r--progs/trivial/drawelements.c120
-rw-r--r--progs/trivial/drawrange.c118
-rw-r--r--progs/trivial/line-clip.c140
-rw-r--r--progs/trivial/line-cull.c136
-rw-r--r--progs/trivial/line-userclip-clip.c142
-rw-r--r--progs/trivial/line-userclip-nop-clip.c142
-rw-r--r--progs/trivial/line-userclip-nop.c142
-rw-r--r--progs/trivial/line-userclip.c142
-rw-r--r--progs/trivial/line.c140
-rw-r--r--progs/trivial/lineloop-clip.c136
-rw-r--r--progs/trivial/lineloop.c136
-rw-r--r--progs/trivial/point-clip.c138
-rw-r--r--progs/trivial/point-param.c156
-rw-r--r--progs/trivial/point-wide.c140
-rw-r--r--progs/trivial/point.c138
-rw-r--r--progs/trivial/poly-flat.c140
-rw-r--r--progs/trivial/poly-unfilled.c139
-rw-r--r--progs/trivial/poly.c138
-rw-r--r--progs/trivial/quad-clip-all-vertices.c138
-rw-r--r--progs/trivial/quad-clip-nearplane.c151
-rw-r--r--progs/trivial/quad-clip.c138
-rw-r--r--progs/trivial/quad-degenerate.c143
-rw-r--r--progs/trivial/quad-flat.c148
-rw-r--r--progs/trivial/quad-offset-factor.c167
-rw-r--r--progs/trivial/quad-offset-unfilled.c167
-rw-r--r--progs/trivial/quad-offset-units.c166
-rw-r--r--progs/trivial/quad-tex-2d.c169
-rw-r--r--progs/trivial/quad-tex-3d.c177
-rw-r--r--progs/trivial/quad-tex-pbo.c181
-rw-r--r--progs/trivial/quad-unfilled.c139
-rw-r--r--progs/trivial/quad.c138
-rw-r--r--progs/trivial/quads.c156
-rw-r--r--progs/trivial/quadstrip-flat.c150
-rw-r--r--progs/trivial/quadstrip.c144
-rw-r--r--progs/trivial/tri-blend.c144
-rw-r--r--progs/trivial/tri-clip.c137
-rw-r--r--progs/trivial/tri-cull.c136
-rw-r--r--progs/trivial/tri-dlist.c150
-rw-r--r--progs/trivial/tri-edgeflag.c141
-rw-r--r--progs/trivial/tri-flat-clip.c137
-rw-r--r--progs/trivial/tri-flat.c137
-rw-r--r--progs/trivial/tri-tex-3d.c170
-rw-r--r--progs/trivial/tri-unfilled-clip.c137
-rw-r--r--progs/trivial/tri-unfilled-smooth.c150
-rw-r--r--progs/trivial/tri-unfilled-userclip.c141
-rw-r--r--progs/trivial/tri-unfilled.c138
-rw-r--r--progs/trivial/tri-userclip.c140
-rw-r--r--progs/trivial/tri.c139
-rw-r--r--progs/trivial/tristrip-clip.c138
-rw-r--r--progs/trivial/tristrip.c138
-rw-r--r--progs/trivial/vbo-drawarrays.c133
-rw-r--r--progs/trivial/vbo-drawelements.c137
-rw-r--r--progs/trivial/vbo-drawrange.c145
-rw-r--r--progs/trivial/vp-array.c117
-rw-r--r--progs/trivial/vp-clip.c102
-rw-r--r--progs/trivial/vp-line-clip.c116
-rw-r--r--progs/trivial/vp-tri.c104
-rw-r--r--progs/trivial/vp-unfilled.c104
-rw-r--r--progs/vp/.gitignore1
-rw-r--r--progs/vp/Makefile53
-rw-r--r--progs/vp/abs.txt7
-rw-r--r--progs/vp/add.txt6
-rw-r--r--progs/vp/arl.txt9
-rw-r--r--progs/vp/dp3.txt5
-rw-r--r--progs/vp/dp4.txt5
-rw-r--r--progs/vp/dph.txt5
-rw-r--r--progs/vp/dst.txt5
-rw-r--r--progs/vp/ex2.txt6
-rw-r--r--progs/vp/flr.txt6
-rw-r--r--progs/vp/frc.txt6
-rw-r--r--progs/vp/lg2.txt6
-rw-r--r--progs/vp/lit.txt6
-rw-r--r--progs/vp/mad.txt5
-rw-r--r--progs/vp/max.txt5
-rw-r--r--progs/vp/min.txt5
-rw-r--r--progs/vp/mov.txt5
-rw-r--r--progs/vp/mul.txt5
-rw-r--r--progs/vp/pow.txt5
-rw-r--r--progs/vp/rcp.txt7
-rw-r--r--progs/vp/rsq.txt7
-rw-r--r--progs/vp/sge.txt5
-rw-r--r--progs/vp/slt.txt5
-rw-r--r--progs/vp/sub.txt5
-rw-r--r--progs/vp/swz.txt5
-rw-r--r--progs/vp/swz2.txt5
-rw-r--r--progs/vp/vp-tris.c216
-rw-r--r--progs/vp/xpd.txt5
-rw-r--r--progs/xdemos/.gitignore25
-rw-r--r--src/glut/os2/src-glut_os2pm.zipbin141239 -> 0 bytes
-rw-r--r--src/mesa/.gitignore2
-rw-r--r--src/mesa/drivers/dri/common/xmlpool/.gitignore5
-rw-r--r--src/mesa/drivers/dri/r200/.gitignore3
-rw-r--r--src/mesa/drivers/dri/r300/.gitignore4
-rw-r--r--[-rwxr-xr-x]src/mesa/drivers/dri/r300/Lindent0
-rw-r--r--src/mesa/drivers/ggi/default/.gitignore1
-rw-r--r--src/mesa/drivers/ggi/display/.gitignore1
-rw-r--r--src/mesa/glapi/.gitignore11
-rw-r--r--[-rwxr-xr-x]src/mesa/glapi/next_available_offset.sh0
452 files changed, 6102 insertions, 56758 deletions
diff --git a/autogen.sh b/autogen.sh
index 19e5b55fcf..19e5b55fcf 100755..100644
--- a/autogen.sh
+++ b/autogen.sh
diff --git a/bin/confdiff.sh b/bin/confdiff.sh
index 568fcd6d56..568fcd6d56 100755..100644
--- a/bin/confdiff.sh
+++ b/bin/confdiff.sh
diff --git a/bin/installmesa b/bin/installmesa
index 1e24c05cad..1e24c05cad 100755..100644
--- a/bin/installmesa
+++ b/bin/installmesa
diff --git a/configs/.gitignore b/configs/.gitignore
deleted file mode 100644
index 97ac5b7326..0000000000
--- a/configs/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-current
-autoconf
diff --git a/configs/autoconf b/configs/autoconf
new file mode 100644
index 0000000000..6065997ea2
--- /dev/null
+++ b/configs/autoconf
@@ -0,0 +1,107 @@
+# Autoconf configuration
+
+# Pull in the defaults
+include $(TOP)/configs/default
+
+# This is generated by configure
+CONFIG_NAME = autoconf
+
+# Compiler and flags
+CC = gcc
+CXX = g++
+OPT_FLAGS =
+ARCH_FLAGS =
+ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
+PIC_FLAGS = -fPIC
+DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DGLX_DIRECT_RENDERING
+CFLAGS = -g -O2 -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing \
+ $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
+CXXFLAGS = -g -O2 -Wall -fno-strict-aliasing \
+ $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
+LDFLAGS =
+EXTRA_LIB_PATH =
+
+# Assembler
+ASM_SOURCES = $(X86_SOURCES)
+ASM_API = $(X86_API)
+
+# Misc tools and flags
+MAKE = make
+SHELL = /bin/bash
+MKLIB_OPTIONS =
+MKDEP = /usr/bin/makedepend
+MKDEP_OPTIONS = -fdepend -I/usr/lib/gcc/i486-linux-gnu/4.3.2/include
+
+# Python and flags (generally only needed by the developers)
+PYTHON2 = python
+PYTHON_FLAGS = -t -O -O
+
+# Library names (base name)
+GL_LIB = GL
+GLU_LIB = GLU
+GLUT_LIB = glut
+GLW_LIB = GLw
+OSMESA_LIB = OSMesa
+
+# Library names (actual file names)
+GL_LIB_NAME = lib$(GL_LIB).so
+GLU_LIB_NAME = lib$(GLU_LIB).so
+GLUT_LIB_NAME = lib$(GLUT_LIB).so
+GLW_LIB_NAME = lib$(GLW_LIB).so
+OSMESA_LIB_NAME = lib$(OSMESA_LIB).so
+
+# Directories to build
+LIB_DIR = lib
+SRC_DIRS = glx/x11 mesa glu glw glut/glx
+GLU_DIRS = sgi
+DRIVER_DIRS = dri
+# Which subdirs under $(TOP)/progs/ to enter:
+PROGRAM_DIRS = xdemos demos redbook samples glsl
+
+# Driver specific build vars
+DRI_DIRS = i965
+WINDOW_SYSTEM = dri
+USING_EGL = 0
+
+# Dependencies
+X11_INCLUDES =
+
+# GLw motif setup
+GLW_SOURCES = GLwDrawA.c
+MOTIF_CFLAGS =
+
+# Library/program dependencies
+GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes -ldrm -lm -lpthread -ldl
+OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) \
+ $(EXTRA_LIB_PATH)
+GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) \
+ $(EXTRA_LIB_PATH) -lm
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) \
+ $(EXTRA_LIB_PATH) -lX11 -lXmu -lXi -lm
+GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) \
+ $(EXTRA_LIB_PATH) -lXt -lX11 -lSM -lICE
+APP_LIB_DEPS = $(EXTRA_LIB_PATH) -lm
+
+# DRI dependencies
+DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -ldrm -lexpat -lm -lpthread -ldl
+LIBDRM_CFLAGS = -I/usr/include/drm
+LIBDRM_LIB = -ldrm
+DRI2PROTO_CFLAGS =
+EXPAT_INCLUDES =
+
+# Autoconf directories
+prefix = /usr/local
+exec_prefix = ${prefix}
+libdir = ${exec_prefix}/lib
+includedir = ${prefix}/include
+
+# Installation directories (for make install)
+INSTALL_DIR = $(prefix)
+INSTALL_LIB_DIR = $(libdir)
+INSTALL_INC_DIR = $(includedir)
+
+# DRI installation directories
+DRI_DRIVER_INSTALL_DIR = ${libdir}/dri
+
+# Where libGL will look for DRI hardware drivers
+DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
diff --git a/configs/debian-default b/configs/debian-default
new file mode 100644
index 0000000000..8d1b785ee0
--- /dev/null
+++ b/configs/debian-default
@@ -0,0 +1,17 @@
+# Define Debian-specific defaults.
+
+CONFIG_NAME = debian-default
+
+OPT_FLAGS = -O2 -g
+
+# override settings in configs/linux-x86-64
+LIB_DIR = lib
+EXTRA_LIB_PATH =
+
+SRC_DIRS = mesa
+PROGRAM_DIRS =
+
+INSTALL_DIR = /usr
+
+# vim: ft=make
+
diff --git a/configs/debian-dri-amd64 b/configs/debian-dri-amd64
new file mode 100644
index 0000000000..ff4232b120
--- /dev/null
+++ b/configs/debian-dri-amd64
@@ -0,0 +1,9 @@
+# Configuration for building the DRI drivers on i386.
+
+include $(TOP)/configs/linux-dri-x86-64
+include $(TOP)/configs/debian-dri-default
+
+CONFIG_NAME = debian-dri-amd64
+
+# vim: ft=make
+
diff --git a/configs/debian-dri-any b/configs/debian-dri-any
new file mode 100644
index 0000000000..c4b65b0c48
--- /dev/null
+++ b/configs/debian-dri-any
@@ -0,0 +1,9 @@
+# Configuration for building the DRI drivers on the build architecture.
+
+include $(TOP)/configs/linux-dri
+include $(TOP)/configs/debian-dri-default
+
+CONFIG_NAME = debian-dri-any
+
+# vim: ft=make
+
diff --git a/configs/debian-dri-default b/configs/debian-dri-default
new file mode 100644
index 0000000000..f92c7eddd0
--- /dev/null
+++ b/configs/debian-dri-default
@@ -0,0 +1,36 @@
+# Configuration defaults for building the DRI drivers and DRI/GLX-enabled
+# libGL.
+
+include $(TOP)/configs/debian-default
+
+CONFIG_NAME = debian-dri-default
+
+SRC_DIRS = glx/x11 mesa progs
+DRIVER_DIRS = dri
+PROGRAM_DIRS = xdemos
+PROGS = glxdemo \
+ glxgears \
+ glxheads \
+ glxinfo
+
+LIB_DIR = lib/glx
+
+DRI_DRIVER_INSTALL_DIR = $(INSTALL_DIR)/lib/dri
+DRI_DRIVER_SEARCH_DIR = /usr/lib/dri
+
+DRI_DIRS = mach64 mga r128 r200 r300 radeon s3v savage tdfx trident
+
+ARCH_X86 = i386 amd64
+
+ifneq ($(findstring $(DEB_BUILD_ARCH), $(ARCH_X86)),)
+ DRI_DIRS += i810 i915 i915tex i965 sis unichrome
+endif
+
+ifeq ($(DEB_BUILD_ARCH), sparc)
+ DRI_DIRS += ffb
+endif
+
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
+
+# vim: ft=make
+
diff --git a/configs/debian-dri-i386 b/configs/debian-dri-i386
new file mode 100644
index 0000000000..7a0aaa487d
--- /dev/null
+++ b/configs/debian-dri-i386
@@ -0,0 +1,9 @@
+# Configuration for building the DRI drivers on i386.
+
+include $(TOP)/configs/linux-dri-x86
+include $(TOP)/configs/debian-dri-default
+
+CONFIG_NAME = debian-dri-i386
+
+# vim: ft=make
+
diff --git a/configs/debian-dri-i386-i686 b/configs/debian-dri-i386-i686
new file mode 100644
index 0000000000..b15cd77a03
--- /dev/null
+++ b/configs/debian-dri-i386-i686
@@ -0,0 +1,14 @@
+# Configuration for building the DRI drivers on i386.
+
+include $(TOP)/configs/linux-dri-x86
+include $(TOP)/configs/debian-dri-optimized-default
+
+CONFIG_NAME = debian-dri-i386-i686
+
+ARCH_FLAGS = -march=i686
+LIB_DIR = lib/glx/i686/cmov
+
+DRI_DRIVER_INSTALL_DIR = $(INSTALL_DIR)/lib/dri/i686/cmov
+
+# vim: ft=make
+
diff --git a/configs/debian-dri-optimized-default b/configs/debian-dri-optimized-default
new file mode 100644
index 0000000000..9c3f68dde7
--- /dev/null
+++ b/configs/debian-dri-optimized-default
@@ -0,0 +1,13 @@
+# Configuration defaults for CPU-optimized builds of the DRI drivers and
+# DRI/GLX-enabled libGL.
+
+include $(TOP)/configs/debian-dri-default
+
+CONFIG_NAME = debian-dri-optimized-default
+
+# override so that the utility programs are not rebuilt with CPU-specific
+# optimizations
+SRC_DIRS = glx/x11 mesa
+
+# vim: ft=make
+
diff --git a/configs/debian-indirect-default b/configs/debian-indirect-default
new file mode 100644
index 0000000000..a6926c95fc
--- /dev/null
+++ b/configs/debian-indirect-default
@@ -0,0 +1,7 @@
+# Configuration defaults for building GLX-enabled libGL.
+
+include $(TOP)/configs/debian-dri-default
+
+CONFIG_NAME = debian-indirect-default
+
+DRI_DIRS =
diff --git a/configs/debian-indirect-hurd-i386 b/configs/debian-indirect-hurd-i386
new file mode 100644
index 0000000000..dd4bb07ca5
--- /dev/null
+++ b/configs/debian-indirect-hurd-i386
@@ -0,0 +1,9 @@
+# Configuration for building the DRI drivers on the build architecture.
+
+include $(TOP)/configs/linux-indirect
+include $(TOP)/configs/debian-indirect-default
+
+CONFIG_NAME = debian-indirect-hurd-i386
+
+# vim: ft=make
+
diff --git a/configs/debian-osmesa b/configs/debian-osmesa
new file mode 100644
index 0000000000..9b7fc7b2af
--- /dev/null
+++ b/configs/debian-osmesa
@@ -0,0 +1,9 @@
+# Configuration for building only OSMesa on Debian.
+
+include $(TOP)/configs/linux-osmesa
+include $(TOP)/configs/debian-osmesa-default
+
+CONFIG_NAME = debian-osmesa
+
+# vim: ft=make
+
diff --git a/configs/debian-osmesa-default b/configs/debian-osmesa-default
new file mode 100644
index 0000000000..ef5a5ba0c7
--- /dev/null
+++ b/configs/debian-osmesa-default
@@ -0,0 +1,10 @@
+# Configuration defaults for building OSMesa.
+
+include $(TOP)/configs/debian-default
+
+CONFIG_NAME = debian-osmesa-default
+
+DRIVER_DIRS = osmesa
+
+# vim: ft=make
+
diff --git a/configs/debian-osmesa-static b/configs/debian-osmesa-static
new file mode 100644
index 0000000000..03fe8b5f20
--- /dev/null
+++ b/configs/debian-osmesa-static
@@ -0,0 +1,9 @@
+# Configuration for building only OSMesa (static version) on Debian.
+
+include $(TOP)/configs/linux-osmesa-static
+include $(TOP)/configs/debian-osmesa-default
+
+CONFIG_NAME = debian-osmesa-static
+
+# vim: ft=make
+
diff --git a/configs/debian-osmesa16 b/configs/debian-osmesa16
new file mode 100644
index 0000000000..0077930188
--- /dev/null
+++ b/configs/debian-osmesa16
@@ -0,0 +1,10 @@
+# Configuration for building OSMesa with support for 16 bits per color
+# channel.
+
+include $(TOP)/configs/linux-osmesa16
+include $(TOP)/configs/debian-osmesa-default
+
+CONFIG_NAME = debian-osmesa16
+
+# vim: ft=make
+
diff --git a/configs/debian-osmesa16-static b/configs/debian-osmesa16-static
new file mode 100644
index 0000000000..6ff399e627
--- /dev/null
+++ b/configs/debian-osmesa16-static
@@ -0,0 +1,10 @@
+# Configuration for building a static version of OSMesa with support for 16
+# bits per color channel.
+
+include $(TOP)/configs/linux-osmesa16-static
+include $(TOP)/configs/debian-osmesa-default
+
+CONFIG_NAME = debian-osmesa16-static
+
+# vim: ft=make
+
diff --git a/configs/debian-osmesa32 b/configs/debian-osmesa32
new file mode 100644
index 0000000000..de3b3277c2
--- /dev/null
+++ b/configs/debian-osmesa32
@@ -0,0 +1,10 @@
+# Configuration for building OSMesa with support for 32 bits per color
+# channel.
+
+include $(TOP)/configs/linux-osmesa32
+include $(TOP)/configs/debian-osmesa-default
+
+CONFIG_NAME = debian-osmesa32
+
+# vim: ft=make
+
diff --git a/configs/debian-osmesa32-static b/configs/debian-osmesa32-static
new file mode 100644
index 0000000000..7fdfcef401
--- /dev/null
+++ b/configs/debian-osmesa32-static
@@ -0,0 +1,10 @@
+# Configuration for building a static version of OSMesa with support for 32
+# bits per color channel.
+
+include $(TOP)/configs/linux-osmesa32-static
+include $(TOP)/configs/debian-osmesa-default
+
+CONFIG_NAME = debian-osmesa32-static
+
+# vim: ft=make
+
diff --git a/configs/debian-swx11+glu-alpha-ev5 b/configs/debian-swx11+glu-alpha-ev5
new file mode 100644
index 0000000000..fd16e49e37
--- /dev/null
+++ b/configs/debian-swx11+glu-alpha-ev5
@@ -0,0 +1,12 @@
+# Configuration for building Mesa (swx11 and GLU) on alpha (ev5 optimized).
+
+include $(TOP)/configs/linux-alpha
+include $(TOP)/configs/debian-swx11+glu-default
+
+CONFIG_NAME = debian-swx11+glu-alpha-ev5
+
+SRC_DIRS = mesa
+LIB_DIR = lib/ev5/cmov
+
+# vim: ft=make
+
diff --git a/configs/debian-swx11+glu-amd64 b/configs/debian-swx11+glu-amd64
new file mode 100644
index 0000000000..4bd7e51443
--- /dev/null
+++ b/configs/debian-swx11+glu-amd64
@@ -0,0 +1,10 @@
+# Configuration for building Mesa (swx11 and GLU) with runtime-detected
+# assembler optimizations on amd64.
+
+include $(TOP)/configs/linux-x86-64
+include $(TOP)/configs/debian-swx11+glu-default
+
+CONFIG_NAME = debian-swx11+glu-amd64
+
+# vim: ft=make
+
diff --git a/configs/debian-swx11+glu-any b/configs/debian-swx11+glu-any
new file mode 100644
index 0000000000..884c9f9f23
--- /dev/null
+++ b/configs/debian-swx11+glu-any
@@ -0,0 +1,9 @@
+# Configuration for building Mesa (swx11 and GLU) on the build architecture.
+
+include $(TOP)/configs/linux
+include $(TOP)/configs/debian-swx11+glu-default
+
+CONFIG_NAME = debian-swx11+glu-any
+
+# vim: ft=make
+
diff --git a/configs/debian-swx11+glu-default b/configs/debian-swx11+glu-default
new file mode 100644
index 0000000000..ccf827639c
--- /dev/null
+++ b/configs/debian-swx11+glu-default
@@ -0,0 +1,14 @@
+# Configuration defaults for building Mesa (swx11 and GLU).
+
+include $(TOP)/configs/debian-default
+
+CONFIG_NAME = debian-swx11+glu-default
+
+SRC_DIRS = mesa glu glw
+DRIVER_DIRS = x11
+
+GLW_SOURCES += GLwMDrawA.c
+GLW_LIB_DEPS += -lXm
+
+# vim: ft=make
+
diff --git a/configs/debian-swx11+glu-i386 b/configs/debian-swx11+glu-i386
new file mode 100644
index 0000000000..0b800c64bb
--- /dev/null
+++ b/configs/debian-swx11+glu-i386
@@ -0,0 +1,10 @@
+# Configuration for building Mesa (swx11 and GLU) with runtime-detected
+# assembler optimizations on i386.
+
+include $(TOP)/configs/linux-x86
+include $(TOP)/configs/debian-swx11+glu-default
+
+CONFIG_NAME = debian-swx11+glu-i386
+
+# vim: ft=make
+
diff --git a/configs/debian-swx11+glu-i386-i686 b/configs/debian-swx11+glu-i386-i686
new file mode 100644
index 0000000000..c6969b3f83
--- /dev/null
+++ b/configs/debian-swx11+glu-i386-i686
@@ -0,0 +1,14 @@
+# Configuration for building Mesa (swx11 and GLU) with runtime-detected
+# assembler optimizations on i386 (i686 optimized).
+
+include $(TOP)/configs/linux-x86
+include $(TOP)/configs/debian-swx11+glu-default
+
+CONFIG_NAME = debian-swx11+glu-i386-i686
+
+ARCH_FLAGS += -march=i686
+SRC_DIRS = mesa
+LIB_DIR = lib/i686/cmov
+
+# vim: ft=make
+
diff --git a/configs/debian-swx11+glu-powerpc-603 b/configs/debian-swx11+glu-powerpc-603
new file mode 100644
index 0000000000..86b3580e38
--- /dev/null
+++ b/configs/debian-swx11+glu-powerpc-603
@@ -0,0 +1,13 @@
+# Configuration for building Mesa (swx11 and GLU) with runtime-detected
+# assembler optimizations on powerpc (603 optimized).
+
+include $(TOP)/configs/linux-ppc
+include $(TOP)/configs/debian-swx11+glu-default
+
+CONFIG_NAME = debian-swx11+glu-powerpc-603
+
+SRC_DIRS = mesa
+LIB_DIR = lib/603/cmov
+
+# vim: ft=make
+
diff --git a/configs/debian-swx11+glu-ppc64 b/configs/debian-swx11+glu-ppc64
new file mode 100644
index 0000000000..67c59b6eef
--- /dev/null
+++ b/configs/debian-swx11+glu-ppc64
@@ -0,0 +1,11 @@
+# Configuration for building Mesa (swx11 and GLU) with runtime-detected
+# assembler optimizations on ppc64.
+
+include $(TOP)/configs/debian-swx11+glu-any
+
+CONFIG_NAME = debian-swx11+glu-ppc64
+
+LIB_DIR = lib64
+
+# vim: ft=make
+
diff --git a/configs/debian-swx11+glu-sparc b/configs/debian-swx11+glu-sparc
new file mode 100644
index 0000000000..8854b40d4f
--- /dev/null
+++ b/configs/debian-swx11+glu-sparc
@@ -0,0 +1,10 @@
+# Configuration for building Mesa (swx11 and GLU) with runtime-detected
+# assembler optimizations on sparc.
+
+include $(TOP)/configs/linux-sparc
+include $(TOP)/configs/debian-swx11+glu-default
+
+CONFIG_NAME = debian-swx11+glu-sparc
+
+# vim: ft=make
+
diff --git a/configs/debian-swx11+glu-sparc-ultrasparc b/configs/debian-swx11+glu-sparc-ultrasparc
new file mode 100644
index 0000000000..14e38018c4
--- /dev/null
+++ b/configs/debian-swx11+glu-sparc-ultrasparc
@@ -0,0 +1,13 @@
+# Configuration for building Mesa (swx11 and GLU) with runtime-detected
+# assembler optimizations on sparc (ultrasparc-optimized).
+
+include $(TOP)/configs/linux-ultrasparc
+include $(TOP)/configs/debian-swx11+glu-default
+
+CONFIG_NAME = debian-swx11+glu-sparc-ultrasparc
+
+SRC_DIRS = mesa
+LIB_DIR = lib/ultrasparc/cmov
+
+# vim: ft=make
+
diff --git a/configs/debian-swx11+glu-static-amd64 b/configs/debian-swx11+glu-static-amd64
new file mode 100644
index 0000000000..2976fbe66f
--- /dev/null
+++ b/configs/debian-swx11+glu-static-amd64
@@ -0,0 +1,10 @@
+# Configuration for building static versions of the libraries (swx11 and GLU)
+# on amd64.
+
+include $(TOP)/configs/linux-x86-64-static
+include $(TOP)/configs/debian-swx11+glu-default
+
+CONFIG_NAME = debian-swx11+glu-static-amd64
+
+# vim: ft=make
+
diff --git a/configs/debian-swx11+glu-static-any b/configs/debian-swx11+glu-static-any
new file mode 100644
index 0000000000..82f794d28d
--- /dev/null
+++ b/configs/debian-swx11+glu-static-any
@@ -0,0 +1,10 @@
+# Configuration for building static versions of the libraries (swx11 and GLU)
+# on the build architecture.
+
+include $(TOP)/configs/linux-static
+include $(TOP)/configs/debian-swx11+glu-default
+
+CONFIG_NAME = debian-swx11+glu-static-any
+
+# vim: ft=make
+
diff --git a/configs/debian-swx11+glu-static-i386 b/configs/debian-swx11+glu-static-i386
new file mode 100644
index 0000000000..62859e4254
--- /dev/null
+++ b/configs/debian-swx11+glu-static-i386
@@ -0,0 +1,10 @@
+# Configuration for building static versions of the libraries (swx11 and GLU)
+# on i386.
+
+include $(TOP)/configs/linux-x86-static
+include $(TOP)/configs/debian-swx11+glu-default
+
+CONFIG_NAME = debian-swx11+glu-static-i386
+
+# vim: ft=make
+
diff --git a/configs/debian-swx11+glu-static-ppc64 b/configs/debian-swx11+glu-static-ppc64
new file mode 100644
index 0000000000..a9ea4a95b3
--- /dev/null
+++ b/configs/debian-swx11+glu-static-ppc64
@@ -0,0 +1,11 @@
+# Configuration for building static versions of the libraries (swx11 and GLU)
+# on ppc64.
+
+include $(TOP)/configs/debian-swx11+glu-static-any
+
+CONFIG_NAME = debian-swx11+glu-static-ppc64
+
+LIB_DIR = lib64
+
+# vim: ft=make
+
diff --git a/configs/default-bp b/configs/default-bp
new file mode 100644
index 0000000000..29faceed81
--- /dev/null
+++ b/configs/default-bp
@@ -0,0 +1,75 @@
+# Default/template configuration
+
+# This is included by other config files which may override some
+# of these variables.
+
+CONFIG_NAME = default
+
+# Version info
+MESA_MAJOR=6
+MESA_MINOR=3
+MESA_TINY=0
+
+# external projects
+#DRM_SOURCE_PATH=$(TOP)/../drm
+DRM_SOURCE_PATH=/home/projects/DRI-freedesktop/drm
+
+# Compiler and flags
+CC = cc
+CXX = CC
+CFLAGS = -O
+CXXFLAGS = -O
+GLU_CFLAGS =
+
+# Misc tools and flags
+MKLIB_OPTIONS =
+MKDEP = makedepend
+MKDEP_OPTIONS = -fdepend
+MAKE = make
+
+# Library names (base name)
+GL_LIB = GL
+GLU_LIB = GLU
+GLUT_LIB = glut
+GLW_LIB = GLw
+OSMESA_LIB = OSMesa
+
+
+# Library names (actual file names)
+GL_LIB_NAME = lib$(GL_LIB).so
+GLU_LIB_NAME = lib$(GLU_LIB).so
+GLUT_LIB_NAME = lib$(GLUT_LIB).so
+GLW_LIB_NAME = lib$(GLW_LIB).so
+OSMESA_LIB_NAME = lib$(OSMesa).so
+
+
+# Optional assembly language optimization files for libGL
+ASM_SOURCES =
+
+# GLw widget sources (Append "GLwMDrawA.c" here and add -lXm to GLW_LIB_DEPS in
+# order to build the Motif widget too)
+GLW_SOURCES = GLwDrawA.c
+
+
+# Directories
+LIB_DIR = $(TOP)/lib
+INSTALL_PREFIX = /usr/local
+SRC_DIRS = mesa glu glut/glx glw
+GLU_DIRS = sgi
+DRIVER_DIRS = x11 osmesa
+# Which subdirs under $(TOP)/progs/ to enter:
+PROGRAM_DIRS = demos redbook samples xdemos
+
+
+# Library/program dependencies
+GL_LIB_DEPS = -lX11 -lXext -lm -lpthread
+OSMESA_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB)
+GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXt -lXi -lm
+GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lXt -lX11
+APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
+
+
+# Shading language support (set to 0 or 1)
+SHADING_LANGUAGE = 0
+
diff --git a/configs/linux-osmesa-static b/configs/linux-osmesa-static
new file mode 100644
index 0000000000..eb3575f424
--- /dev/null
+++ b/configs/linux-osmesa-static
@@ -0,0 +1,15 @@
+# Configuration for building only libOSMesa on Linux, no Xlib driver
+# This doesn't really have any Linux dependencies, so it should be usable
+# on other (gcc-based) systems.
+
+include $(TOP)/configs/linux-osmesa
+
+CONFIG_NAME = linux-osmesa-static
+
+# Compiler and flags
+MKLIB_OPTIONS = -static
+PIC_FLAGS =
+
+# Library names
+OSMESA_LIB_NAME = lib$(OSMESA_LIB).a
+
diff --git a/configs/linux-osmesa32-static b/configs/linux-osmesa32-static
new file mode 100644
index 0000000000..ecbb72ecfd
--- /dev/null
+++ b/configs/linux-osmesa32-static
@@ -0,0 +1,13 @@
+# Configuration for 32 bits/channel OSMesa library on Linux
+
+include $(TOP)/configs/linux-osmesa32
+
+CONFIG_NAME = linux-osmesa32-static
+
+# Compiler and flags
+MKLIB_OPTIONS = -static
+PIC_FLAGS =
+
+# Library names
+OSMESA_LIB_NAME = lib$(OSMESA_LIB).a
+
diff --git a/debian/Xsession.d_65mesa-check-x86-64 b/debian/Xsession.d_65mesa-check-x86-64
new file mode 100644
index 0000000000..f0df1de827
--- /dev/null
+++ b/debian/Xsession.d_65mesa-check-x86-64
@@ -0,0 +1,15 @@
+:
+# /etc/X11/Xsession.d/65mesa-check-x86-64
+
+# This file is sourced by Xsession(5), not executed.
+
+# If we are running the 64-bit mesa code, we need to disable ASM
+# optimizations if we are on a non-AMD processor without 3dnow instructions
+# (until this get fixed in the mesa libraries)
+
+if [ `dpkg --print-architecture` = "amd64" ] &&
+ ! grep -q "^flags.*3dnow" /proc/cpuinfo
+then
+ MESA_NO_ASM=1
+ export MESA_NO_ASM
+fi
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000000..b36705209c
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,1617 @@
+mesa (7.2-1ubuntu2) intrepid; urgency=low
+
+ * debian/patches/103_fix-crash-in-i830_emit_state.dpatch:
+ - Apply upstream commit to fix a crash in i830_emit_state
+ (LP: #277709)
+
+ -- Chris Coulson <chrisccoulson@googlemail.com> Tue, 21 Oct 2008 17:55:10 +0100
+
+mesa (7.2-1ubuntu1) intrepid; urgency=low
+
+ * Merge from Debian experimental.
+
+ -- Timo Aaltonen <tepsipakki@ubuntu.com> Wed, 24 Sep 2008 21:00:38 +0300
+
+mesa (7.2-1) experimental; urgency=low
+
+ [ Brice Goglin ]
+ * Fix grammar and punctuation in glxinfo(1), thanks Sam Hocevar,
+ closes: #498595.
+
+ [ Timo Aaltonen ]
+ * New upstream release.
+ * Refresh patch 04_osmesa_version.diff
+
+ [ Julien Cristau ]
+ * Remove the build-dep on dri2proto, DRI2 support has been removed.
+ * intel: don't warn about TTM init failure.
+
+ -- Julien Cristau <jcristau@debian.org> Wed, 24 Sep 2008 14:28:21 +0200
+
+mesa (7.1-1ubuntu3) intrepid; urgency=low
+
+ * debian/rules: Build i915 and i965 DRI drivers on lpia. (LP: #270106)
+
+ -- Timo Aaltonen <tepsipakki@ubuntu.com> Tue, 16 Sep 2008 13:07:02 +0300
+
+mesa (7.1-1ubuntu2) intrepid; urgency=low
+
+ * 102_dont_vblank.patch
+ - Revert the commit which defaults to vblank on intel. It breaks
+ DPMS with compiz, resulting in a hang. (LP: 262605)
+
+ -- Timo Aaltonen <tepsipakki@ubuntu.com> Fri, 12 Sep 2008 11:25:01 +0300
+
+mesa (7.1-1ubuntu1) intrepid; urgency=low
+
+ * Merge from debian experimental, remaining changes:
+ - debian/control
+ + Change maintainer address to Ubuntu.
+ + Drop lesstif-dev from Build-Depends since it's a universe component
+ that Ubuntu doesn't want in main due to security concerns about it
+ (it's a large codebase without active development - last release >2
+ yrs ago).
+ + Comment out GLw libs since it depends on lesstif-dev.
+ + Add lpia to -dri and -dri-dbg package in.
+ + Add Pre-Depends: dpkg (>= 1.14.12ubuntu3) to ensure dpkg
+ support for lzma.
+ - debian/rules
+ + Unexport LDFLAGS (amd64 FTBFS).
+ + Add Xsession hook to disable ASM optimizations when running on
+ 64-but processors that don't support them
+ (LP: 87661, Deb: 484180, fdo: 8724)
+ + use --disable-glw for swx11 targets too.
+ + Build .debs with lzma compression.
+ - debian/patches
+ + Add 101_ubuntu_hidden_glname.patch.
+
+ -- Timo Aaltonen <tepsipakki@ubuntu.com> Thu, 28 Aug 2008 01:18:35 +0300
+
+mesa (7.1-1) experimental; urgency=low
+
+ * Add parallel build support.
+ * New upstream development release
+ + libGLU now only exports its public interface (closes: #319388)
+ * Some more parallel build updates.
+
+ -- Julien Cristau <jcristau@debian.org> Wed, 27 Aug 2008 19:52:24 +0200
+
+mesa (7.1~rc3-1ubuntu4) intrepid; urgency=low
+
+ * debian/control: Add Pre-Depends: dpkg (>= 1.14.12ubuntu3) to ensure dpkg
+ support for lzma.
+
+ -- Martin Pitt <martin.pitt@ubuntu.com> Sun, 11 May 2008 10:42:54 +0200
+
+mesa (7.1~rc3-1ubuntu3) intrepid; urgency=low
+
+ * Build .debs with lzma compression to reduce libgl1-mesa-dri from 13.2 to
+ 2.8 MB.
+
+ -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 12 Aug 2008 09:31:01 +0200
+
+mesa (7.1~rc3-1ubuntu2) intrepid; urgency=low
+
+ * 102_fix-fdo-14441.diff: fix tfp on i965. (LP: #245888)
+
+ -- Timo Aaltonen <tepsipakki@ubuntu.com> Fri, 01 Aug 2008 16:08:01 +0300
+
+mesa (7.1~rc3-1ubuntu1) intrepid; urgency=low
+
+ * merged with debian-experimental
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 15 Jul 2008 15:07:41 +0100
+
+mesa (7.1~rc3-1) experimental; urgency=low
+
+ [ Julien Cristau ]
+ * New upstream release candidate (updated to git commit 4fab47b1).
+ * Build against libdrm >= 2.3.1.
+ * 04_osmesa_version.diff: fix libOSMesa versioning, to revert accidental
+ SONAME bump.
+
+ [ Timo Aaltonen ]
+ * Refresh patches, and drop obsolete 00_create-libdir.patch and
+ 01_fix-makefile.patch.
+ * Build-depend on x11proto-dri2-dev.
+ * Drop mesa-swx11-source.
+ * Add dri_interface.h to mesa-common-dev.
+ * Add gl.pc to libgl1-mesa-dev
+ * rules: Replace the old build system with the new autotools-based
+ system.
+ * Run autoreconf before building the various flavours..
+ * Add automake & autoconf to build-deps.
+ * Use --enable-glx-tls for dri.
+
+ -- Julien Cristau <jcristau@debian.org> Sun, 13 Jul 2008 19:41:42 +0200
+
+mesa (7.1~rc1-0ubuntu2) intrepid; urgency=low
+
+ * Merge with debian git, fixes FTBFS on sparc/hppa/ia64.
+
+ -- Timo Aaltonen <tepsipakki@ubuntu.com> Mon, 07 Jul 2008 11:12:26 +0300
+
+mesa (7.1~rc1-0ubuntu1) intrepid; urgency=low
+
+ [ Bryce Harrington ]
+ * Merge from git.debian.org, remaining changes:
+ - Change maintainer address to Ubuntu.
+ - Drop lesstif-dev from Build-Depends since it's a universe component
+ that Ubuntu doesn't want in main due to security concerns about it
+ (it's a large codebase without active development - last release >2
+ yrs ago).
+ - Comment out GLw libs from control since it depends on lesstif-dev.
+ - Add lpia to -dri and -dri-dbg package in debian/control.
+ - Add Xsession hook to disable ASM optimizations when running on
+ 64-but processors that don't support them
+ (LP: 87661, Deb: 484180, fdo: 8724)
+ - Add 101_ubuntu_hidden_glname.patch.
+
+ [ Timo Aaltonen ]
+ * Dropped patches
+ 102_ubuntu_no_glw.patch:
+ - the new build system handles this better
+ 103_dlopen_in_driveropen.diff and 104_fix_driveropen.diff:
+ - upstream
+ * debian/rules: use --disable-glw for swx11 targets too.
+ * Unexport LDFLAGS (amd64 FTBFS).
+
+ -- Timo Aaltonen <tepsipakki@ubuntu.com> Fri, 04 Jul 2008 13:19:57 +0300
+
+mesa (7.0.3-4) unstable; urgency=low
+
+ * Pull from mesa_7_0_branch (2ac4919d).
+ * Put back our configs/ changes into the .diff.gz since choose-configs
+ needs them before quilt is invoked. Put 04_cleanup-osmesa-configs.patch
+ there as well for #485161.
+
+ -- Brice Goglin <bgoglin@debian.org> Wed, 18 Jun 2008 20:59:14 +0200
+
+mesa (7.0.3-3ubuntu1) intrepid; urgency=low
+
+ * Merge from debian unstable, remaining changes:
+ - Change maintainer address to Ubuntu.
+ - Drop lesstif-dev from Build-Depends since it's a universe component
+ that Ubuntu doesn't want in main due to security concerns about it
+ (it's a large codebase without active development - last release >2
+ yrs ago).
+ - Comment out GLw libs from control since it depends on lesstif-dev.
+ - Add lpia to -dri and -dri-dbg package in debian/control.
+ - Add lpia to ARCH_X86 in configs/debian-dri-default.
+ - Add 101_ubuntu_hidden_glname.patch
+ - Add 102_ubuntu_no_glw.patch to remove lesstif build depends since
+ its a universe component.
+ - Add 103_dlopen_in_driveropen.diff and 104_fix_driveropen.diff from
+ upstream; "Always call dlopen in DriverOpen".
+ (LP: 189580, fdo: 13541)
+ - Add Xsession hook to disable ASM optimizations when running on
+ 64-but processors that don't support them
+ (LP: 87661, Deb: 484180, fdo: 8724)
+
+ -- Bryce Harrington <bryce@ubuntu.com> Tue, 17 Jun 2008 16:47:35 -0700
+
+mesa (7.0.3-3) unstable; urgency=low
+
+ * Pull from mesa_7_0_branch (718724de).
+ + Fix intel_batchbuffer_space on i965, closes: #455817.
+ + Fix busy error in i915_wait_irq for real now, closes: #467319.
+ * Move our configs/ changes from the .diff.gz into our quilt patches,
+ with 04_cleanup-osmesa-configs.patch renamed into 04_debian-configs.patch,
+ closes: #485161.
+
+ -- Brice Goglin <bgoglin@debian.org> Tue, 17 Jun 2008 20:00:51 +0200
+
+mesa (7.0.3-2) unstable; urgency=low
+
+ * Pull from mesa_7_0_branch (03447de3).
+ * Set right cliprects for the current draw region on Intel, closes: #467319.
+ * Use BRW_TEXCOORDMODE_CLAMP instead of BRW_TEXCOORDMODE_CLAMP_BORDER
+ to implement GL_CLAMP on i965, closes: #478880.
+ * Fix segment fault with BASE_LEVEL set to 5 for MipMap on i915,
+ closes: #451339.
+ * Disable low impact fallback on r300 by default, closes: #440868.
+
+ -- Brice Goglin <bgoglin@debian.org> Fri, 13 Jun 2008 06:53:29 +0200
+
+mesa (7.0.3-1ubuntu2) intrepid; urgency=low
+
+ * Add Xsession hook to disable ASM optimizations when running on
+ 64-but processors that don't support them (LP: #87661)
+
+ -- Tormod Volden <debian.tormod@gmail.com> Thu, 05 Jun 2008 12:41:25 +0200
+
+mesa (7.0.3-1ubuntu1) intrepid; urgency=low
+
+ * Merge from debian unstable, remaining changes:
+ - Change maintainer address.
+ - Drop lesstif-dev from Build-Depends.
+ - Comment out GLw libs from control.
+ - Add lpia to -dri and -dri-dbg package in debian/control.
+ - Add lpia to ARCH_X86 in configs/debian-dri-default.
+ - Add 101_ubuntu_hidden_glname.patch
+ - Add 102_ubuntu_no_glw.patch
+ - Add 103_dlopen_in_driveropen.diff and 104_fix_driveropen.diff from
+ upstream; "Always call dlopen in DriverOpen". (LP: #189580)
+
+ -- Timo Aaltonen <tepsipakki@ubuntu.com> Wed, 04 Jun 2008 18:38:43 +0300
+
+mesa (7.0.3-1) unstable; urgency=low
+
+ * New upstream release.
+ * Only call ProgramStringNotify if program parsing succeeded,
+ closes: #473551.
+
+ -- Brice Goglin <bgoglin@debian.org> Fri, 11 Apr 2008 08:42:37 +0200
+
+mesa (7.0.3~rc2-2) unstable; urgency=low
+
+ * Pull from mesa_7_0_branch (1e83d70b).
+ * Fixes regression in the i965 dri driver (closes: #470984, #470084)
+ * Update 02_use-ieee-fp-on-s390-and-m68k.patch.
+ * Change libgl1-mesa-swx11-i686's pre-dependency on libgl1-mesa-swx11 to a
+ regular versioned dependency, and add ${shlibs:Depends}.
+
+ -- Julien Cristau <jcristau@debian.org> Mon, 31 Mar 2008 16:47:31 +0200
+
+mesa (7.0.3~rc2-1ubuntu3) hardy; urgency=low
+
+ * debian/patches/107_fix_-ve_rhw_regression.patch: Fixes regression
+ introduced upstream where a -ve rhw workaround is being applied only
+ for IGD systems, when it should be applied only for *non*-IGD systems.
+ This resulted in rendering issues in 3D games and drawing programs.
+ (LP: #199823, #206287)
+
+ -- Bryce Harrington <bryce@ubuntu.com> Fri, 04 Apr 2008 19:46:40 -0700
+
+mesa (7.0.3~rc2-1ubuntu2) hardy; urgency=low
+
+ [ Laurent Bigonville ]
+ * debian/patches/105_vblank_fix.patch: Fix "drmWaitVBlank returned -1" error
+ (LP: #186764)
+
+ [ Timo Aaltonen ]
+ * Add 106_i965_wine_fix.diff from upstream, "Only call
+ ProgramStringNotify if program parsing succeeded". (LP: #178292)
+
+ -- Timo Aaltonen <tepsipakki@ubuntu.com> Wed, 12 Mar 2008 12:33:41 +0200
+
+mesa (7.0.3~rc2-1ubuntu1) hardy; urgency=low
+
+ * Merge from debian unstable (LP: #189167), remaining changes:
+ - Change maintainer address.
+ - Drop lesstif-dev from Build-Depends.
+ - Comment out GLw libs from control.
+ - Add lpia to -dri and -dri-dbg package in debian/control.
+ - Add lpia to ARCH_X86 in configs/debian-dri-default.
+ - Add 101_ubuntu_hidden_glname.patch
+ - Add 102_ubuntu_no_glw.patch
+ * Drop patch 103_fix_rv410se.diff, applied upstream.
+ * Add 103_dlopen_in_driveropen.diff and 104_fix_driveropen.diff from
+ upstream; "Always call dlopen in DriverOpen". (LP: #189580)
+
+ -- Timo Aaltonen <tepsipakki@ubuntu.com> Tue, 26 Feb 2008 13:07:45 +0200
+
+mesa (7.0.3~rc2-1) unstable; urgency=low
+
+ * New upstream release candidate.
+ + enable user-defined clip planes for R300 (closes: #408679)
+ + 03_optional-progs-and-install.patch: partly applied upstream, fixed up
+ * Stop building with -O0 on hppa. Bug #451047 should be fixed in recent gcc
+ versions.
+
+ -- Julien Cristau <jcristau@debian.org> Sun, 24 Feb 2008 10:22:54 +0100
+
+mesa (7.0.2-4ubuntu2) hardy; urgency=low
+
+ * 103_fix_rv410se.diff:
+ - patch from upstream; "Fix rendering on x700 SE chips."
+ (LP: #151974)
+
+ -- Timo Aaltonen <tepsipakki@ubuntu.com> Wed, 30 Jan 2008 13:18:23 +0200
+
+mesa (7.0.2-4ubuntu1) hardy; urgency=low
+
+ * Merge from debian unstable (LP: #151974), remaining changes:
+ - Change maintainer address.
+ - Drop lesstif-dev from Build-Depends.
+ - Comment out GLw libs from control.
+ - Add lpia to -dri and -dri-dbg package in debian/control.
+ - Add lpia to ARCH_X86 in configs/debian-dri-default.
+ - Add 101_ubuntu_hidden_glname.patch
+ - Add 102_ubuntu_no_glw.patch
+
+ -- Timo Aaltonen <tepsipakki@ubuntu.com> Tue, 29 Jan 2008 12:09:30 +0200
+
+mesa (7.0.2-4) unstable; urgency=low
+
+ * Update to mesa_7_0_branch head (commit 48ae5cf0).
+ * Add Vcs-Git, Vcs-Browser and Homepage fields in debian/control.
+
+ -- Julien Cristau <jcristau@debian.org> Thu, 17 Jan 2008 22:23:06 +0100
+
+mesa (7.0.2-3ubuntu1) hardy; urgency=low
+
+ * Merge from debian unstable, remaining changes:
+ - Change maintainer address.
+ - Drop lesstif-dev from Build-Depends.
+ - Comment out GLw libs from control.
+ - Add lpia to -dri and -dri-dbg package in debian/control.
+ - Add lpia to ARCH_X86 in configs/debian-dri-default.
+ - Add 101_ubuntu_hidden_glname.patch
+ - Add 102_ubuntu_no_glw.patch
+ * debian/control: Do not build-depend on gcc-3.4 anymore.
+ * Drop 110_ubuntu_use_gcc-3.4_for_i965.patch
+
+ -- Timo Aaltonen <tepsipakki@ubuntu.com> Sat, 05 Jan 2008 00:45:31 +0200
+
+mesa (7.0.2-3) unstable; urgency=low
+
+ * Update to mesa_7_0_branch head (commit 0107acde).
+ * Bump Standards-Version to 3.7.3.
+ * Move libgl1-mesa-swx11-dbg, mesa-common-dev and libosmesa6-dev to section
+ libdevel.
+ * libgl1-mesa-swx11 conflicts with libgl1-mesa-glx. Move it and
+ libgl1-mesa-swx11-dev to priority extra.
+ * Fix typo in mesa-common-dev's long description.
+
+ -- Julien Cristau <jcristau@debian.org> Tue, 18 Dec 2007 19:13:18 +0100
+
+mesa (7.0.2-2ubuntu1) hardy; urgency=low
+
+ * Merge from debian unstable, remaining changes:
+ - Change maintainer address.
+ - Add gcc-3.4 as a build dependency for amd64, i386 and lpia.
+ - Drop lesstif-dev from Build-Depends.
+ - Comment out GLw libs from control.
+ - Add lpia to -dri and -dri-dbg package in debian/control.
+ - Add lpia to ARCH_X86 in configs/debian-dri-default.
+ - Add 101_ubuntu_hidden_glname.patch
+ - Add 102_ubuntu_no_glw.patch
+ - Add 110_ubuntu_use_gcc-3.4_for_i965.patch
+
+ -- Timo Aaltonen <tepsipakki@ubuntu.com> Fri, 16 Nov 2007 09:00:24 +0200
+
+mesa (7.0.2-2) unstable; urgency=low
+
+ [ Julien Cristau ]
+ * Don't set -fno-strict-aliasing in configs/debian-default. It is set
+ upstream now.
+ * Workaround gcc ICE on hppa: build libOSMesa with -O0 (see bug#451047).
+ * Add build-dep on libxext-dev. Thanks, Timo Aaltonen!
+
+ -- Brice Goglin <bgoglin@debian.org> Tue, 13 Nov 2007 21:43:40 +0100
+
+mesa (7.0.2-1ubuntu2) hardy; urgency=low
+
+ * Add libxext-dev to Build-Depends.
+
+ -- Timo Aaltonen <tepsipakki@ubuntu.com> Mon, 12 Nov 2007 14:50:38 +0200
+
+mesa (7.0.2-1ubuntu1) hardy; urgency=low
+
+ * Merge from debian unstable, remaining changes:
+ - Change maintainer address.
+ - Add gcc-3.4 as a build dependency for amd64, i386 and lpia.
+ - Drop lesstif-dev from Build-Depends.
+ - Comment out GLw libs from control.
+ - Add lpia to -dri and -dri-dbg package in debian/control.
+ - Add lpia to ARCH_X86 in configs/debian-dri-default.
+ - Add 101_ubuntu_hidden_glname.patch
+ - Add 102_ubuntu_no_glw.patch
+ - Add 110_ubuntu_use_gcc-3.4_for_i965.patch
+
+ -- Timo Aaltonen <tepsipakki@ubuntu.com> Mon, 12 Nov 2007 12:55:33 +0200
+
+mesa (7.0.2-1) unstable; urgency=low
+
+ * New upstream release.
+ + Fix Blender crash in triangle_twoside(), closes: #439668, #446315.
+ + Fix crash in _generic_read_RGBA_span_RGB565_MMX(), closes: #445313.
+ + Fix the new __gluInvertMatrix() function, closes: #440137 ,#441071.
+ + Refresh 03_optional-progs-and-install.patch since libGLU is not
+ built when building progs/xdemos.
+ + Refresh 04_cleanup-osmesa-configs.patch.
+ + Drop 05_static-nonpic.patch,, applied upstream.
+ + Remove DESTDIR from INSTALL_DIR in configs/debian-default since
+ the upstream Makefiles now support DESTDIR.
+ * Add myself to Uploaders.
+
+ -- Brice Goglin <bgoglin@debian.org> Sun, 11 Nov 2007 11:53:26 +0100
+
+mesa (7.0.1-2) unstable; urgency=low
+
+ * Update to latest git (from mesa_7_0_branch)
+ + adds support for some new intel chipsets (i915 and i915_tex dri drivers)
+ (closes: #437333)
+ + broken inline asm in dri drivers fixed (closes: #423739)
+
+ -- Julien Cristau <jcristau@debian.org> Tue, 28 Aug 2007 12:11:30 +0200
+
+mesa (7.0.1-1ubuntu3) gutsy; urgency=low
+
+ * Add lpia to -dri and -dri-dbg package in debian/control.
+ * Add lpa top ARCH_X86 in configs/debian-dri-default.
+
+ -- Tollef Fog Heen <tfheen@ubuntu.com> Fri, 12 Oct 2007 14:12:21 +0200
+
+mesa (7.0.1-1ubuntu2) gutsy; urgency=low
+
+ * Add fix-965-vblank.patch, pulled from upstream
+ b3fc9a1585f390274fa26b3e3f80bc6d16f4388a which fixes missed vbl
+ interrupts on Intel i965 hardware.
+
+ -- Kyle McMartin <kyle@ubuntu.com> Wed, 3 Oct 2007 11:11:22 -0400
+
+mesa (7.0.1-1ubuntu1) gutsy; urgency=low
+
+ * Merge from debian unstable, remaining changes:
+ - Change maintainer to Ubuntu
+ - Add gcc-3.4 as a build dependency for lpia.
+ - Add support for Intel 945GME, G33, Q33, Q35
+ + 200_945gme.patch, upstream a74eec5af5397b612d60dd4b0d81666027f19bb0,
+ ad6351a994fd14af9d07da4f06837a7f9b9d0de4
+ + 201_g33.patch, upstream 8331d9d7aa7cde7126d38d4e1eb5fe8a168077f3
+ - Comment out GLw libs from control file
+ - Dropped Ubuntu addition of conflicts of libgl1-mesa-glx against
+ libgl1-mesa-swx11, since Debian has hadded a shlibs file for
+ libgl1-mesa-swx11-i686
+
+ -- Bryce Harrington <bryce@ubuntu.com> Wed, 15 Aug 2007 15:08:32 -0700
+
+mesa (7.0.1-1) unstable; urgency=low
+
+ * New upstream release.
+ * Upload to unstable.
+
+ -- Julien Cristau <jcristau@debian.org> Thu, 09 Aug 2007 11:56:16 +0200
+
+mesa (7.0.1~rc2-1) experimental; urgency=low
+
+ [ David Nusinow ]
+ * New upstream release candidate
+ * Bite the bullet and add myself to uploaders
+
+ [ Julien Cristau ]
+ * Modify the short descriptions of various packages so they fit in .changes
+ files without being cut off. Thanks, Marc 'HE' Brockschmidt!
+ * Add a shlibs file for libgl1-mesa-swx11-i686.
+
+ -- Julien Cristau <jcristau@debian.org> Fri, 27 Jul 2007 20:17:48 +0200
+
+mesa (7.0.0-0ubuntu3) gutsy; urgency=low
+
+ * Add gcc-3.4 as a build dependency for lpia.
+
+ -- Matthias Klose <doko@ubuntu.com> Tue, 07 Aug 2007 17:15:37 +0000
+
+mesa (7.0.0-0ubuntu2) gutsy; urgency=low
+
+ [ Kyle McMartin ]
+ * Add support for Intel 945GME, G33, Q33, Q35
+ - 200_945gme.patch, upstream a74eec5af5397b612d60dd4b0d81666027f19bb0,
+ ad6351a994fd14af9d07da4f06837a7f9b9d0de4
+ - 201_g33.patch, upstream 8331d9d7aa7cde7126d38d4e1eb5fe8a168077f3
+
+ -- Kyle McMartin <kyle@ubuntu.com> Tue, 03 Jul 2007 19:32:39 +0000
+
+mesa (7.0.0-0ubuntu1) gutsy; urgency=low
+
+ [ Bryce Harrington ]
+ * New upstream release
+ - Adds OpenGL 2.0 and 2.1 API support.
+ - Fixed a few fog-related bugs.
+ - Fixed broken GLSL mix() function.
+ - Fixed broken GLSL exp() functions.
+ - Fixed GLSL mod4(vec4, vec4) bug.
+ - Implemented GLSL asin(), acos(), atan() functions.
+ - Fixed an R300 driver bug that caused Xorg composite manager to
+ crash
+ - Fixed R300 vertex program/matrix bug (fdo# 10848)
+ - GLSL dFdx() and dFdy() work for fragment program inputs now
+ (texcoords)
+ - Fixed potential crash when specifying an invalid texture unit as a
+ sampler
+ - Fixed incorrect GLX protocol request for glXDestroyPBuffer()
+ (fdo# 10983)
+ - ARB vp state.light[n].half value was incorrect (fdo# 10987)
+ - Fixed a positional light source bug (fdo# 11009)
+ - Fixed point size attenuation problem (fdo# 11042)
+ - Fixed problem where glPopAttrib didn't restore texture object's
+ LOD bias (fdo# 11049)
+ - Fixed a TLS / TEXTREL problem (fdo# 7459)
+ - Some texture code consolidation and simplifiction
+ - R300 driver clean-ups.
+
+ [ Sarah Hobbs ]
+ * Added a conflicts of libgl1-mesa-glx against libgl1-mesa-swx11, and vice
+ versa
+
+ -- Sarah Hobbs <hobbsee@ubuntu.com> Tue, 26 Jun 2007 15:32:00 +1000
+
+mesa (6.5.3-1ubuntu1) gutsy; urgency=low
+
+ * Update Maintainer for Ubuntu
+
+ [ Kyle McMartin ]
+ * Merge with Debian experimental:
+ - Remove lesstif-dev from Build-Depends (Timo Aaltonen)
+ - Comment out GLw libs from control file
+ - Add 102_ubuntu_no_glw.patch to remove lesstif build depends
+ - Add libxext-dev to Build-Depends (Paul Sladen)
+ - Add gcc-3.4 [i386 amd64] to Build-Depends (Ben Collins)
+ - Add 110_ubuntu_use_gcc-3.4_for_i965.patch (Timo Aaltonen)
+ - Add 101_ubuntu_hidden_glname.patch
+ - Add 112_fedora-hush-synthetic-visual-warning.patch (Adam Jackson)
+
+ * Dropped patches:
+ - 103_ubuntu_fd.org-9686-fog.patch merged upstream
+ - 104_r300_call_radeonsetcliprects.patch merged upstream
+ - 105_radeon_call_radeonsetcliprects.patch merged upstream
+ - 106_r200_call_radeonsetcliprects.patch merged upstream
+ - 107_r200_simplify_r200setcliprects.patch merged upstream
+ - 111_unichrome_remove_xdrawoffset.patch merged upstream
+
+ -- Kyle McMartin <kyle@ubuntu.com> Fri, 25 May 2007 16:43:31 +0000
+
+mesa (6.5.3-1) experimental; urgency=low
+
+ [ David Nusinow ]
+ * New upstream release
+
+ [ Julien Cristau ]
+ * Cherry-pick commit 65faf023679988f93da82b4c7ebdc689f2094459 by Michel
+ Dänzer to fix r300 crash.
+
+ -- Julien Cristau <jcristau@debian.org> Mon, 21 May 2007 11:34:51 +0200
+
+mesa (6.5.3~rc3-1) experimental; urgency=low
+
+ [ Brice Goglin ]
+ * Split out libGLw libs and headers from libgl1-mesa-swx11 and ship both
+ static and shared libraries, creating libglw1-mesa and libglw1-mesa-dev
+ (closes: #374904).
+
+ [ Julien Cristau ]
+ * New upstream release candidate.
+ + 06_fix_texture_data_corruption.patch,
+ 07_call_radeonSetCliprects_from_radeonMakeCurrent.patch,
+ 08_r300_update_window_state_when_bound_but_stamp_changed.patch,
+ 09_i915_always_enable_pixel_fog.patch: remove, included upstream.
+ + 01_fix-makefile.patch, 02_use-ieee-fp-on-s390-and-m68k.patch: refresh.
+ * Add build-dependencies on libxdamage-dev and libxfixes-dev.
+ * Resync debian/scripts/install-source.sh.
+ * Build mesa-swx11-source only in binary-indep.
+ * Update from upstream git (commit
+ dee1b0d5bbe91f83854813cbbcd3090327bcb5c2).
+
+ -- Julien Cristau <jcristau@debian.org> Wed, 25 Apr 2007 10:36:50 +0200
+
+mesa (6.5.2-7) unstable; urgency=low
+
+ [ Brice Goglin ]
+ * libgl1-mesa-dev does not need to depend on libgl1-mesa-dri,
+ libgl1-mesa-glx is enough (since their split in 6.4.1-0.1);
+ closes: #432081. Thanks, Samuel Thibault!
+
+ [ Julien Cristau ]
+ * libgl1-mesa-dev Depends on libgl1-mesa-glx (>= ${source:Upstream-Version})
+ instead of >= ${Source-Version}. This way it's still installable on
+ architectures where mesa isn't built yet when a minor revision is
+ uploaded.
+
+ -- Julien Cristau <jcristau@debian.org> Wed, 11 Jul 2007 05:50:45 +0200
+
+mesa (6.5.2-6) unstable; urgency=low
+
+ * libgl1-mesa-swx11 needs to depend on libosmesa6 (>= 6.5.2-1) because
+ it used to contain libOSMesa.so.6. This means that programs linked
+ against this lib got a dependency on -swx11 which was broken since
+ 6.5.2-1.
+ * Fix build on hurd-i386 (build libgl1-mesa-glx without dri support and
+ don't build the dri drivers); closes: #420403. Thanks, Samuel Thibault!
+
+ -- Julien Cristau <jcristau@debian.org> Thu, 05 Jul 2007 00:56:35 +0200
+
+mesa (6.5.2-5) unstable; urgency=low
+
+ [ Brice Goglin ]
+ * Add 07_call_radeonSetCliprects_from_radeonMakeCurrent.patch
+ (closes: #420164). Thanks to Christian Ohm.
+ * Add 08_r300_update_window_state_when_bound_but_stamp_changed.patch
+ * Add 09_i915_always_enable_pixel_fog.patch
+
+ -- Julien Cristau <jcristau@debian.org> Fri, 18 May 2007 13:36:25 +0200
+
+mesa (6.5.2-4) unstable; urgency=low
+
+ [ Julien Cristau ]
+ * debian/control: libgl1-mesa-dri now suggests libglide3, with an
+ explanation in the description (closes: #387339).
+ * Upload to unstable.
+
+ [ Brice Goglin ]
+ * Add 06_fix_texture_data_corruption.patch (closes: #412346).
+
+ -- Julien Cristau <jcristau@debian.org> Fri, 20 Apr 2007 05:57:35 +0200
+
+mesa (6.5.2-3) experimental; urgency=low
+
+ * Set LIB_DIR and EXTRA_LIB_PATH in configs/debian-default to override
+ settings in configs/linux-x86-64. This fixes a FTBFS on amd64, thanks to
+ Marc 'HE' Brockschmidt for the report (closes: #410118).
+
+ -- Julien Cristau <jcristau@debian.org> Wed, 7 Feb 2007 23:04:28 +0100
+
+mesa (6.5.2-2) experimental; urgency=low
+
+ * Sync Section/Priority for all packages with the override.
+ * Build the arch:all debs in binary-indep, and use the debhelper -s option
+ for commands in binary-arch, to fix FTBFS on non-i386 archs, thanks to
+ Marc 'HE' Brockschmidt (closes: #409638).
+ * Add myself to Uploaders.
+
+ -- Julien Cristau <jcristau@debian.org> Sun, 4 Feb 2007 21:14:02 +0100
+
+mesa (6.5.2-1) experimental; urgency=low
+
+ [ Thierry Reding ]
+ * New upstream release.
+ * Set the Debian X Strike Force as maintainer.
+ * Add myself to uploaders.
+ * Build the i915tex DRI module on the i386 and amd64 architectures.
+ * Add patch 04_cleanup-osmesa-configs that makes the OSMesa configurations
+ behave as expected.
+ * Add patch 05_static-nonpic to build static libraries without -fPIC.
+ * Make debugging symbol packages depend on the corresponding binary package
+ and put them into the libdevel section.
+ * Bump shlibs file for the libosmesa6 package to account for added symbols.
+ Thanks Julien Cristau.
+ * Build the DRI modules with the default optimization flags. Thanks Julien
+ Cristau.
+ * mesa-common-dev now ships the GLX header files so it needs to replace
+ libgl1-mesa-swx11-dev and libgl1-mesa-dev. Thanks Julien Cristau.
+ * All OSMesa libraries were moved to the libosmesa6 and libosmesa6-dev
+ package, so have them replace libgl1-mesa-swx11, libgl1-mesa-swx11-dev and
+ mesa-common-dev respectively. Thanks Julien Cristau.
+
+ [ Julien Cristau ]
+ * Drop obsolete depends on xlibs.
+
+ -- Thierry Reding <thierry@gilfi.de> Thu, 11 Jan 2007 15:06:52 +0100
+
+mesa (6.5.2~rc3-0.1) experimental; urgency=low
+
+ * Non-maintainer upload.
+ * Update to latest upstream release candidate.
+
+ -- Thierry Reding <thierry@gilfi.de> Fri, 1 Dec 2006 01:06:28 +0100
+
+mesa (6.5.2~rc2-0.1) experimental; urgency=low
+
+ * Non-maintainer upload.
+ * New upstream release candidate:
+ + Refresh 02_use-ieee-fp-on-s390-and-m68k.patch.
+ * Add manual pages for the glxdemo, glxgears, glxheads and glxinfo
+ utilities (Closes: #385463).
+
+ -- Thierry Reding <thierry@gilfi.de> Wed, 22 Nov 2006 20:49:06 +0100
+
+mesa (6.5.2~rc1-0.1) experimental; urgency=low
+
+ * Non-maintainer upload.
+ * New upstream release candidate.
+ * Update patches:
+ + Drop hunk #2 of 01_fix-makefile.patch, applied upstream.
+ + Drop 03_handle-sync-and-dont-unlock-display.patch, applied upstream.
+ * Bump build-dependency on libdrm-dev (>= 2.2.0).
+ * Use the new upstream minstall utility to install files and directories.
+ Using /usr/bin/install would result in a symlink's target being copied
+ instead of the symlink.
+
+ -- Thierry Reding <thierry@gilfi.de> Sat, 18 Nov 2006 22:23:04 +0100
+
+mesa (6.5.1-0.6) experimental; urgency=low
+
+ * Non-maintainer upload.
+ * Rewrote the debian/rules file to make it easier to understand.
+ * Provide i686 optimized versions in libgl1-mesa-swx11-i686 instead of in
+ libgl1-mesa-swx11.
+ * Statically link libOSMesa with the software rasterization code from libGL
+ so that it works independently of the installed libGL. (Closes: #387706)
+ * Make libosmesa6-dev depend on mesa-common-dev because it only needs the
+ gl.h header file and no libGL anymore.
+ * Move glx*.h headers from libgl1-mesa(-swx11)-dev into mesa-common-dev
+ because both packages provide identical files.
+ * Add debugging symbol packages for libgl1-mesa-swx11, libgl1-mesa-glx and
+ libgl1-mesa-dri.
+ * Repack the contents of the three Mesa tarballs (MesaDemos, MesaGLUT and
+ MesaLib) as the original source tarball. (Closes: #392715)
+ * Make mesa-common-dev depend on libx11-dev.
+ * Provide a new package: mesa-utils. These utilities are shipped in the
+ MesaDemos package so mesa is the right package to provide them.
+
+ -- Thierry Reding <thierry@gilfi.de> Sat, 18 Nov 2006 18:50:07 +0100
+
+mesa (6.5.1-0.5) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Build with -fno-strict-aliasing to fix misbuild of i965_dri.so
+ (closes: #394311). Thanks to Michel Dänzer for the fix, and to Ryan
+ Richter for the report and testing.
+
+ -- Julien Cristau <julien.cristau@ens-lyon.org> Wed, 3 Jan 2007 13:48:20 +0100
+
+mesa (6.5.1-0.4) unstable; urgency=medium
+
+ * Non-maintainer upload (and brown paper bag release).
+ * _Depend_ on libx11-dev from libgl1-mesa-dev; revert previous change.
+ Fixes FTBFS in other packages. (Really Closes: #396498)
+
+ -- Steinar H. Gunderson <sesse@debian.org> Sat, 11 Nov 2006 13:55:20 +0100
+
+mesa (6.5.1-0.3) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Build-depend on libx11-dev; fixes FTBFS. (Closes: #396498)
+
+ -- Steinar H. Gunderson <sesse@debian.org> Wed, 8 Nov 2006 20:58:40 +0100
+
+mesa (6.5.1-0.2) unstable; urgency=low
+
+ * Non-maintainer upload
+ * Disable generation of SSE instructions (closes: #390560)
+ * Remove duplicate and unused build configurations
+ * Remove extra source files left from CVS snapshots (closes: #389283)
+ * Enable i965 DRI driver on i386 and amd64. Thanks to Ryan Richter
+ for the patch. (closes: #392030)
+ * Enable Unichrome DRI driver on amd64 (closes: #391900)
+ * Enable FFB DRI driver on sparc, not i386 (closes: #388025)
+ * Consistently compile C sources as C99 (closes: #373623)
+ * Fix X display locking error in GLX. Thanks to Josh Triplett for
+ the patch. (closes: #391681)
+
+ -- Ben Hutchings <ben@decadent.org.uk> Fri, 13 Oct 2006 02:25:52 +0100
+
+mesa (6.5.1-0.1) unstable; urgency=low
+
+ * New upstream version
+ * Build-dep on x11proto-gl-dev >= 1.4.8
+ * Stuff not in the upstream tarballs
+ + os2 glut stuff
+ + docs/gears.png
+ * Bump libdrm-dev build-dep to >= 2.0.2
+ * Add libdrm cflags to the debian-dri config. This allows the build system
+ to find drm.h
+ * Make sure that libGl looks for the dri drivers in the proper location. Do
+ this by setting the appropriate variables in the debian config
+ * Re-add s390 and m68k to the USE_IEEE test in src/mesa/main/imports.h. This
+ package seriously needs to store patches somewhere that are easy to find
+ and re-apply.
+ * Add patch from Cyril Brulebois to allow package to build on HURD, which
+ lacks DRI and directfb. This includes not using lib-directfb in the
+ build-depends for hurd-i386. It also creates a new debian config,
+ debian-indirect, which is used when building for HURD. This config is
+ invoked in the debian-dri config on hurd-i386. Thanks to Cyril Brulebois
+ for the patch, Michael Banck, Michel Dänzer, and Samuel Thibault for
+ input on an appropriate fix. (closes: #358065)
+
+ -- David Nusinow <dnusinow@debian.org> Mon, 25 Sep 2006 21:21:47 -0400
+
+mesa (6.5.0.cvs.20060524-1.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Upload mesa 6.5 cvs to unstable, because we need it for Xorg 7.1.
+ * Upload with medium urgency instead of high, since this is a new
+ upstream that should get some testing in unstable in spite of the
+ multiple RC bugfixes.
+ * Update debian/copyright with the full text of the SGI Free B and SGI
+ MIT-style licenses in use in the package, and take a stab at
+ cleaning up the list of paths and licenses.
+ Closes: #368562.
+ * Make mesa-common-dev Replaces: xlibosmesa-dev from sarge.
+ Closes: #384057.
+ * Fix libgl1-mesa-glx to not Provides: libgl1-mesa-dri, since it
+ definitely doesn't provide DRI support and this Provides: breaks
+ upgrades from sarge. Closes: #384282.
+ * debian/libgl1-mesa-swx11.shlibs: create a static shlibs file,
+ because libOSMesa.so.6 is not provided by all implementations of
+ libGL and so needs a separate shlibs declaration. Also make
+ libgl1-mesa-glx the default alternative instead of libgl1-mesa-swx11
+ for consistency even when building against libgl1-mesa-swx11,
+ because to the extent these are interchangeable (i.e., 99%...),
+ there should be no reason to prefer one over the other -- and to the
+ extent that they aren't interchangeable, it's wrong to list libgl1
+ as an alternative dependency at all. Closes: #386185.
+ * Don't provide shlibs at all for libgl1-mesa-swx11-dbg; this is an
+ unnecessary duplication of the existing libgl1-mesa-swx11 shlibs
+ since packages should not really be linking against /usr/lib/debug/
+ separately.
+ * src/mesa/tnl/t_vb_render.c: Drop a pointless printf() in the
+ RENDER_LINE macro, getting rid of copious debug output on console.
+ Closes: #369895.
+ * libgl1-mesa-swx11 has no reason to depend on libglu, anything that
+ wants libglu will have its own dependency on it; drop this
+ hard-coded dependency from debian/control.
+ * Have libglu1-mesa-dev Provides: xlibmesa-glu-dev, since it's the
+ successor to that package and xlibmesa-glu-dev is still referenced
+ in a number of places and this makes for more reliable builds than
+ depending on alternatives without requiring another dummy -dev
+ package from xorg.
+ * Replace references to Source-Version in debian/control with either
+ binary:Version or source:Version, depending on whether the
+ relationship references an arch: any or arch: all package, making
+ mesa binNMU-safe; add build-depends on dpkg-dev (>= 1.13.19) to
+ ensure these substvars are available.
+
+ -- Steve Langasek <vorlon@debian.org> Fri, 15 Sep 2006 15:51:16 -0700
+
+mesa (6.5.0.cvs.20060524-1) experimental; urgency=low
+
+ * The "-O666 -fwater-c00ling -DBE_F4ST" release
+ * New pull from CVS
+ * Merge back and forth with 6.4.2-1
+ * configs/debian*_i386: disabled, optimized build fuxxored.
+
+ -- Marcelo E. Magallon <mmagallo@debian.org> Wed, 24 May 2006 14:12:13 -0600
+
+mesa (6.5.0.cvs.20060512-0.0.1) experimental; urgency=low
+
+ * New upstream release (6.5.0)
+ * Pulled CVS as of 2006-05-12
+ * debian/control: remove DirectFB packages
+
+ -- Marcelo E. Magallon <mmagallo@debian.org> Fri, 12 May 2006 15:23:49 -0600
+
+mesa (6.4.2-1) unstable; urgency=low
+
+ * The "please, please, please don't hate me" release.
+ * New upstream release.
+ * Ack NMUs
+ * debian/control: mesa-common-dev Replaces xlibmesa-gl-dev (<< 1:7)
+ AGAINST MY BETTER JUDGEMENT. The problem here is gratuitous package
+ renames within a system that does not support them. (closes:
+ bug#362063)
+ * debian/control: hurd-i386 doesn't have drm. Doesn't fix #358065,
+ yet.
+ * bin/mklib: fix from Robert Millan to support hurd-i386 and
+ GNU/kFreeBSD. Thanks Robert. (closes: bug#358066)
+ * src/glx/x11/indirect_vertex_array.c, src/mesa/main/glheader.h,
+ src/mesa/drivers/dri/common/glcontextmodes.c: fix broken indirect
+ rendering on 64-bit platforms. Thanks Aaron M. Ucko. (closes:
+ bug#364228)
+ * debian/control: b-d on x11proto-gl-dev. Please don't hate me!
+ * debian/control: Standards-Version: 3.7.2
+ * debian/rules: export DEB_HOST_ARCH
+ * configs/debian-dri: use DEB_HOST_ARCH to decide if certain DRI drivers
+ should be built or not.
+ + Built only for i386: i810 i830 sis.
+ Rationale: integrated chipsets available only for i386 processors.
+ + Built only for i386: ffb.
+ Rationale: Michel Dänzer said so, no idea why.
+ + Built only for i386, amd64: i915.
+ Rationale: Apparently this is available in the 64-bit Intel chipset.
+ Please file a bug report stating which drivers should be included/excluded
+ for which architectures. Positive lists are preferred. If possible state
+ why.
+ * debian/mesa-swx11-source.install: nuke this abomination. Dinamically
+ generate the list at build time.
+ * debian/drivers.map: add gl-debian-dri_i386
+ * debian/README.build: updated, add big friendly letters in short sentences.
+ Perhaps I can read it myself this way...
+ * debian/rules, configs/debian, configs/debian-dri, configs/debian_i386,
+ configs/debian-dri_i386, debian/libdir.map, debian/drivers.map: hack in
+ support for variable driver's dir. If you want this for your pet
+ architecture please provide BOTH configs/debian_arch and
+ configs/debian-dri_arch. If you just want to include/exclude DRI drivers
+ on your architecture look in configs/debian-dri.
+ * configs/debian*_i386: disabled, optimized build fuxxored.
+ * debian/rules: remove misguided Perl construct, replace by something
+ simpler in shell. I actually meant to do something else with the Perl
+ thing, but got distracted and forgot about it. Thanks Aaron M. Ucko!
+ * debian/rules: make it work like debian/README.build says it works wrt to
+ building optimized targets.
+
+ -- Marcelo E. Magallon <mmagallo@debian.org> Tue, 16 May 2006 18:07:53 -0600
+
+mesa (6.4.1-0.4) unstable; urgency=low
+
+ * NMU
+ * Add versioned conflict between libgl1-mesa-dri and xlibmesa-dri so that
+ the xlibmesa-dri transitional upgrade package works
+
+ -- David Nusinow <dnusinow@debian.org> Mon, 6 Mar 2006 21:46:18 -0500
+
+mesa (6.4.1-0.3) unstable; urgency=low
+
+ * NMU
+ * Add s390 and m68k to the USE_IEEE test in src/mesa/main/imports.h.
+ (closes: #349437)
+
+ -- David Nusinow <dnusinow@debian.org> Sat, 11 Feb 2006 17:59:26 -0500
+
+mesa (6.4.1-0.2) unstable; urgency=low
+
+ * NMU
+ * Re-add dh_installdirs call to binary-indep target so that we get
+ arch-specific dirs for the mesa-swx11-source package
+ * Remove makedepend from build-depends. Now we'll just build-dep on xutils
+ to get the app, which will translate over to our own xorg 7.0 plans.
+
+ -- David Nusinow <dnusinow@debian.org> Tue, 31 Jan 2006 19:21:12 -0500
+
+mesa (6.4.1-0.1) unstable; urgency=low
+
+ [ Marcelo E. Magallon <mmagallo@debian.org> ]
+ * debian/control: build-depend on xutils
+ * include/GL/glx{int,proto,md,tokens}.h: missing upstream (closes: bug#326466)
+ * debian/libgl1-mesa-dri-dev.install: install GLX include files here, too.
+ * debian/rules: GLU and GLW don't have arch-specific targets.
+
+ [ Daniel Stone <daniels@debian.org> ]
+ * New upstream version, incorporating changes from Ubuntu 6.3 packaging.
+ * Rename packages:
+ - mesag3 -> libgl1-mesa-swrast
+ - mesag-dev -> libgl1-mesa-swrast-dev
+ - libgl1-mesa-dri -> libgl1-mesa
+ - libgl1-mesa-dri-dev -> libgl1-mesa-dev
+ - libgl1-mesa-dri still exists, but now contains the DRI modules only.
+ * Drop dependency *from* mesa-common-dev on libgl1-mesa-dev and
+ libglu1-mesa-dev; it should be the other way around. (closes: #336565)
+ * Add Build-Depends on pkg-config to get flags from libdrm, and libexpat-dev
+ for DRI configuration. Break out xlibs-dev Build-Depends to the
+ individual libraries required.
+ * Bump libdrm-dev Build-Depends to >> 1.0.5, in order to get new
+ via_drm.h to build the unichrome DRI driver.
+ * Configs: pare DRI drivers down to a sensible set for each architecture.
+ * Remove completely broken Glide target, which caused FTBFS.
+ * Add mesa-swrast-source package, providing the source for the software
+ rasteriser for libGLcore in the X server.
+ * Drop tight libosmesa6 -> libgl1-mesa-swrast Depends, replace with
+ shlibs:Depends.
+
+ [ David Nusinow <dnusinow@debian.org> ]
+ * New upstream version (6.4.1) (closes: #232665)
+ * Merge changes from Ubuntu version 6.4.1-0ubuntu1.
+ (closes: #341479, #340168, #334742)
+ + Add new files required by xorg-server GL build to mesa-swrast-source.
+ * NMU to begin getting Xorg 7.0 in to Debian
+ * Change libgl1-mesa-swrast Depends on libx11-6-dev to libx11-dev.
+ * Change libgl1-mesa-swrast to be named libgl1-mesa-swx11
+ * Change libgl1-mesa to be named libgl1-mesa-glx
+ * mesa-swrast-src.install stop looking for the swx11 dir and look for swrast
+
+ -- David Nusinow <dnusinow@debian.org> Sat, 21 Jan 2006 21:43:37 -0500
+
+mesa (6.3.2-2.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Adjust Build-Depends:
+ + xlibs transition (Closes: #347129).
+ + xutils, xlibmesa-gl-dev (Closes: #326466).
+ * mesag-dev: Depends: libx11-dev (Closes: #347205).
+
+ -- Christoph Berg <myon@debian.org> Fri, 20 Jan 2006 20:45:43 +0100
+
+mesa (6.3.2-2) unstable; urgency=low
+
+ * debian/rules: build only whatever needs to be build according to
+ debian/control.
+ * debian/libdir.map: it's usr/lib/debug not usr/lib/dbg
+ * debian/rules: select optimized targets for the current host architecture
+ only (thanks Michel!)
+ * debian/README.build: reword some of the directions, add more info.
+ * debian/control: forgot to add CPR relationships in the new packages
+ (thanks Michel!)
+ * debian/control: Set maintainer to pkg-mesa-devel, add myself as uploader
+
+ -- Marcelo E. Magallon <mmagallo@debian.org> Sun, 28 Aug 2005 14:41:15 -0600
+
+mesa (6.3.2-1) unstable; urgency=low
+
+ * New upstream
+ * configs/debian-dri: new target
+ * debian/control: add build-depends on libdrm-dev
+ * debian/rules: pass SRC_DIRS instead of SUBDIRS on the command line.
+ This allows for configurations to override the command line in a
+ sane way.
+ * configs/debian-dri: override SRC_DIRS
+ * configs/debian: add -D_GNU_SOURCE (required by dri drivers)
+ * debian/control, debian/rules: drop glide out of this package, it
+ will be moved to the mesa-legacy package, forked from 6.2.1-7.
+ * debian/drivers.map, debian/rules: take into account that some
+ drivers have external components.
+ + To be fixed: debian/drivers.map hardcodes locations
+ * debian/control: libgl1-mesa-dri, libgl1-mesa-directfb: new drivers
+ * dh_makeshlibs for libgl1-mesa-dri and libgl1-mesa-directfb
+ * debian/control: priority is optional... again...
+
+ -- Marcelo E. Magallon <mmagallo@debian.org> Sun, 21 Aug 2005 17:13:19 -0600
+
+mesa (6.2.1-7) unstable; urgency=low
+
+ * Previous upload got lost somewhere
+ + bin/mklib: add GNU/kFreeBSD, patch from Aurelien Jarno (closes:
+ bug#307154)
+ + recompile with newer g++
+
+ -- Marcelo E. Magallon <mmagallo@debian.org> Tue, 02 Aug 2005 06:47:20 -0600
+
+mesa (6.2.1-6) unstable; urgency=low
+
+ * bin/mklib: add GNU/kFreeBSD, patch from Aurelien Jarno (closes:
+ bug#307154)
+ * recompile with newer g++
+
+ -- Marcelo E. Magallon <mmagallo@debian.org> Sun, 24 Jul 2005 11:47:16 -0600
+
+mesa (6.2.1-5) unstable; urgency=low
+
+ * debian/rules: big mess up, files are not being moved to their proper
+ places. I naively assumed that command-line options to debhelper
+ commands would override DH_OPTIONS, that is, that having
+ DH_OPTIONS=-i (as suggested in the documentation) would mean
+ something like "use -i unless -p is passed on the command line". It
+ actually means "use -i in addition to -p passed on the command
+ line", which does not make any sense, but is consistent with the
+ wording in the documentation. (closes: bug#306499, bug#306918,
+ bug#307095)
+
+ -- Marcelo E. Magallon <mmagallo@debian.org> Sun, 01 May 2005 09:45:12 -0600
+
+mesa (6.2.1-4) unstable; urgency=low
+
+ * debian/control: fix description to reflect the exact content and
+ purpose of package (libosmesa-dev, mesag-dev).
+ * debian/rules: DH_OPTIONS=-s added to binary-arch target. (closes:
+ bug#306091)
+
+ -- Marcelo E. Magallon <mmagallo@debian.org> Sat, 26 Mar 2005 08:03:44 -0600
+
+mesa (6.2.1-3) unstable; urgency=low
+
+ * debian/control: try to match the override file. If mesa is "extra"
+ (for whatever reason), all the packages should be extra.
+ * debian/rules: quick workaround for left-over libGL.so in GLU -dev
+ package.
+
+ -- Marcelo E. Magallon <mmagallo@debian.org> Thu, 24 Mar 2005 19:35:34 -0600
+
+mesa (6.2.1-2) unstable; urgency=low
+
+ * The "thank you so much, I'm still voting against you" release.
+ * debian/rules: correct artifact of me not having had a proper
+ pbuilder environment to build stuff on and the repackaging from the
+ previous release. The -glu- and -glw- targets now explicitly depend
+ on the matching -gl- target, and symlinks are placed in the build
+ directories in order to actually have a libGL.so to make ld happy
+ when creating the libraries.
+ * debian/rules: uncomment dh_install :-\ There was a reason why I had
+ commented that out...
+ * First change closes: bug#298922
+ * Second change closes: bug#300302, bug#300284, bug#300430
+ * debian/control: "An X", whatever, I've been corrected multiple times
+ in both ways (translators beware). (closes: bug#300012)
+
+ -- Marcelo E. Magallon <mmagallo@debian.org> Sun, 20 Mar 2005 22:03:29 -0600
+
+mesa (6.2.1-1) unstable; urgency=low
+
+ * The "autobuilders, please please please don't hate me" release.
+ * New upstream.
+ * Repackage:
+ + Fall prey to debhelper
+ + Entries below this one preserved for historical reasons or
+ sentimental value, pick as many as you want. They bear NO
+ relation to the actual packages!
+ * configs/debian, configs/debian-debug, configs/debian-debug-i386,
+ configs/debian-glide, configs/debian-glide-i386, configs/debian-i386,
+ configs/debian-osmesa16, configs/debian-osmesa16-static,
+ configs/debian-osmesa32, configs/debian-osmesa32-static,
+ configs/debian-static, configs/debian-static-i386: new files.
+ * configs/debian-sparc: Dave Miller confirmed that the sparc assembly
+ files do work on Linux. I don't know where to install the optimized
+ libraries, so the file doesn't actually exist. Please read
+ debian/README.build if you want to have a sparc-optimized library.
+ * debian/control: GGI and glide2 are gone. glide is glide3.
+ * debian/rules: modify shlibs file for the glide3 target to require glide3
+ and only glide3 because that library exports functions not available in
+ other libGLs. Rationale: if someone is compiling a Debian package and
+ uses the glide target either he doesn't know what he is doing or he knows
+ exactly what he is doing. In the first case the package should not be
+ installable and in the second case the package requires this particular
+ version.
+ * debian/control: libgl1-mesa-glide3-dev does NOT provide a proper OpenGL
+ development environment (see above).
+ * PCR is bound to be wrong... *sigh*
+
+ -- Marcelo E. Magallon <mmagallo@debian.org> Sat, 25 Dec 2004 14:50:02 -0600
+
+mesa (6.0.1-1) unstable; urgency=low
+
+ * New upstream release.
+ * debian/rules: redid a bunch of stuff in order to support new build system
+ without autoconf and automake stuff. The next version is going to change
+ this _again_.
+
+ -- Marcelo E. Magallon <mmagallo@debian.org> Sun, 11 Apr 2004 07:00:19 -0600
+
+mesa (5.0.0-5.1) unstable; urgency=low
+
+ * Non-Maintainer Upload.
+ * Rename "GGIMesa"-references in src/GGI/default/Makefile.am to
+ "MesaGGI", which makes the package build again with newer libtool.
+ (Closes: #213836)
+
+ -- Steinar H. Gunderson <sesse@debian.org> Sun, 15 Feb 2004 17:37:08 +0100
+
+mesa (5.0.0-5) unstable; urgency=low
+
+ * debian/control: yank and put error? Remove hard-coded
+ nvidia-glx-dev from mesag-glide2-dev dependencies.
+
+ -- Marcelo E. Magallon <mmagallo@debian.org> Sun, 09 Feb 2003 10:31:51 +0100
+
+mesa (5.0.0-4) unstable; urgency=low
+
+ * debian/rules: fix typo in definition of GLIDE_ARCHS. (closes: bug#179622)
+
+ -- Marcelo E. Magallon <mmagallo@debian.org> Mon, 03 Feb 2003 20:19:12 +0100
+
+mesa (5.0.0-3) unstable; urgency=low
+
+ * The "it's amazing how people pick severities" release
+ * debian/control: mesa-common-dev conflicts with xlibmesa-dev. Actually put
+ dependency of mesa-common-dev on the mesa-*-dev packages to avoid having
+ to track other libgl-dev packages popping up. IMO this is less error
+ prone. You can't install mesa-common-dev without installing mesa-*-dev,
+ and those packages conflict with other libgl-dev packages. (closes:
+ bug#177996)
+ * Rename libglu1c102 to libglu1-mesa; the libglu1c102 is incorrent since
+ this library does not export C++ functions. Sorry about the mess.
+ * Rename libglu1-dev to libglu1-mesa-dev to be consistent
+ * debian/rules: use grep-dctrl to extract architectures from debian/control
+ * debian/control: add grep-dctrl to build-depends
+ * debian/shlibs.libglu: libglu1-mesa | libglu1
+ * debian/rules: install include/GL/xmesa.h in /usr/include/GL/xmesa.h; I'm
+ not 100% sure this is the right thing to do, but it's a niche so I don't
+ think it will actually make trouble (closes: bug#148866)
+ * debian/rules: install include/GL/glx*.h in the common package. (closes:
+ bug#178562)
+ * debian/rules: nasty hack to work arround libtool's idea of how libraries
+ should be linked (closes: bug#178514)
+ * debian/rules: even nastier hack. Getting environment variables to
+ percolate thru all the make calls isn't getting anywhere.
+ * si-glu/Makefile.am: export only glu.* symbols
+ * si-glu/Makefile.am: add -lm to link line
+ * src/Makefile.am: god damm it. If you use libm link to it!
+ * debian/control: mesa-common-dev depends on libglu1-mesa-dev to satisfy
+ libgl-dev's requirements
+
+ -- Marcelo E. Magallon <mmagallo@debian.org> Mon, 27 Jan 2003 17:15:25 +0100
+
+mesa (5.0.0-2) unstable; urgency=low
+
+ * debian/control: Not funny, I'm sure I put lesstif and xlibs-dev in the
+ build-depends. CVS says I didn't. (closes: bug#176730)
+ * debian/control, debian/rules: regenerate auto-stuff (closes: bug#176729)
+ * debian/control, debian/rules: GCC C++ 3.2 transition (libglu1c102 -- ugly!)
+ * remove Makefile.in from CVS control
+ * si-glu/libnurbs/interface/Makefile.am: fix INCLUDES macro
+
+ -- Marcelo E. Magallon <mmagallo@debian.org> Sun, 19 Jan 2003 00:48:32 +0100
+
+mesa (5.0.0-1) unstable; urgency=low
+
+ * New upstream release, it looks like glide and GGI are in working
+ condition again.
+ * FX patches from previous releases gone. They'll be back later.
+ * debian/rules: some clean ups.
+ * debian/control: add libglu1 packages
+ * debian/control: Standards-Version: 3.5.8
+ * debian/rules: Build Xt widgets (if you need this stuff, you need to depend
+ on mesag-dev, libgl-dev is not enough)
+ * debian/control, debian/rules: add mesa-common-dev package
+ * debian/control, debian/rules: add osmesa packages.
+
+ -- Marcelo E. Magallon <mmagallo@debian.org> Sun, 15 Dec 2002 12:28:49 +0100
+
+mesa (4.0.3-1) unstable; urgency=low
+
+ * New (and long delayed) upstream version
+ * Redid a bunch of FX patches, probably broke.
+
+ -- Marcelo E. Magallon <mmagallo@debian.org> Thu, 03 Oct 2002 11:27:29 +0200
+
+mesa (3.5-1) unstable; urgency=low
+
+ * New upstream version.
+ * Redid patches.
+ * Disabled building GGI target. Someone with a good understanding of GGI
+ needs to write a driver for mesa. The old version doesn't cut it
+ anymore.
+ * Most makefiles won't work. Copied them out of CVS.
+ * src/Makefile.am: add -lm to library list. (closes: bug#102717)
+ * configure.in: adjust GLU's version info to match previous release.
+
+ -- Marcelo E. Magallon <mmagallo@debian.org> Mon, 25 Jun 2001 22:13:40 +0200
+
+mesa3 (3.4.2.1-4) unstable; urgency=low
+
+ * So, here's the deal: the 3Dfx backend is going nowhere in 4.x and 5.x is
+ just arround the corner. Same thing for the GGI stuff. In order to leave
+ the people who need this stuff with _something_ to work with, I'll compile
+ those targets out of the mesa3 source package and the mesa package will
+ stuck to plain old X.
+ * debian/control, debian/rules: strip out all the parts concerning to mesa3g
+ and mesa3g-dev
+ * debian/control: update GGI architectures, let's see what happens
+ * debian/rules: special case alpha for stripping options. Chris, did you
+ ever figure out what the problem actually is? (closes: bug#99284)
+ * debian/rules: hereby I decree that everything in etc is a conffile. Die
+ future bugs, die!.
+ * configure: fix ggi_libdir, ggi_confdir (closes: bug#139598)
+
+ -- Marcelo E. Magallon <mmagallo@debian.org> Sun, 29 Sep 2002 11:21:00 +0200
+
+mesa (3.4.2.1-3) unstable; urgency=low
+
+ * Actually install widgets on the mesag-dev package (closes: bug#98988)
+
+ -- Marcelo E. Magallon <mmagallo@debian.org> Sat, 9 Jun 2001 16:39:36 +0200
+
+mesa (3.4.2.1-2) unstable; urgency=low
+
+ * src/X/xmesa1.c: I knew it, I knew it. This was bound to break. Stupid
+ typo. Restored MESA_GLX_FX (got renamed to GLX_FX accidentally, if you
+ have to know) (closes: bug#94114)
+
+ -- Marcelo E. Magallon <mmagallo@debian.org> Mon, 21 May 2001 08:52:07 +0200
+
+mesa (3.4.2.1-1) unstable; urgency=low
+
+ * Upstream released 3.4.2.
+ * Hmmm... thought about it on my way home. The code to parse 3dfx.conf
+ is wrong. Redid. Still not tested. (closes: bug#94114)
+ * debian/README.Debian: document 3dfx.conf
+
+ -- Marcelo E. Magallon <mmagallo@debian.org> Sat, 19 May 2001 11:57:33 +0200
+
+mesa (3.4.2-1) unstable; urgency=low
+
+ * New upstream version.
+ * debian/config.guess, debian/config.sub: newest versions from
+ http://subversions.gnu.org/cgi-bin/cvsweb/config (closes: bug#95338)
+ * GAAAAAAARGGH! src/X/xmesa1.c: horrible hack to use /etc/mesa/3dfx.conf
+ if there's no MESA_GLX_FX environment variable defined. I. Hate.
+ This. I'll make a deal with you: you find another of these things,
+ and you send me a nice tested patch. I don't have a 3DFX card and I
+ *HATE* uploading stuff I can't fully test. (closes: bug#94114)
+ * debian/rules: use the new files
+ * debian/rules: s/TMPDIR/DTEMPDIR/g
+ * gl3DfxSetDitherModeEXT from Zephaniah (closes: bug#65860)
+ * Disable GL_EXT_shared_texture_palette per default. Patch looks funny,
+ but I'll blindly trust Zephaniah.
+ * Hmmm... I hope Zephaniah tested this, because it broke in a rather silly
+ way at compile time.
+ * Fancy what people regard as "pretty important".
+
+ -- Marcelo E. Magallon <mmagallo@debian.org> Fri, 18 May 2001 09:23:49 +0200
+
+mesa (3.4.1-3) unstable; urgency=low
+
+ * PLEASE SUBMIT NMUs TO THE BTS, DAMN IT!
+ * debian/control: exclude m68k from libggi2-dev build-dependency.
+
+ -- Marcelo E. Magallon <mmagallo@debian.org> Sat, 17 Mar 2001 19:45:09 +0100
+
+mesa (3.4.1-2) unstable; urgency=low
+
+ * debian/control: add missing dependency on xlibs-dev and corrected the
+ one for libglide2-dev
+
+ -- Marcelo E. Magallon <mmagallo@debian.org> Wed, 14 Mar 2001 00:21:42 +0100
+
+mesa (3.4.1-1) unstable; urgency=low
+
+ * New upstream version.
+ * New maintainer. (closes: bug#81139)
+ * Some fixes to get it to compile.
+ * debian/rules: some reorganization happened to allow me test different
+ builds better.
+ * debian/control: nuked widgets package, if you miss it, you are doing
+ something wrong.
+ * debian/rules: -dev packages will be missing some garbage they used to
+ install. If you miss any of those files, I'm fairly confident you
+ are doing something wrong.
+ * configure, ltmain.sh, aclocal.m4, acinclude.m4, ...: vicious hacks to
+ allow the GGI version to compile.
+ * TODO: add the widgets to the packages
+ * TODO: make OSmesa packages
+
+ -- Marcelo E. Magallon <mmagallo@debian.org> Sat, 10 Feb 2001 18:34:13 +0100
+
+mesa (3.2.1-1) unstable; urgency=low
+
+ * New upstream version.
+
+ -- James A. Treacy <treacy@debian.org> Mon, 31 Jul 2000 15:13:34 -0400
+
+mesa (3.2-2) frozen unstable; urgency=low
+
+ * add MMX and 3Dnow opts for x86.
+
+ -- James A. Treacy <treacy@debian.org> Fri, 7 Jul 2000 16:06:43 -0400
+
+mesa (3.2-1) frozen unstable; urgency=low
+
+ * New upstream version.
+ * Made minor changes to README.3DFX. Closes bug#56827
+ * Added symlinks for mesa widget libraries. Closes bug#63115
+
+ -- James A. Treacy <treacy@debian.org> Wed, 28 Jun 2000 11:21:09 -0400
+
+mesa (3.1-17) frozen unstable; urgency=low
+
+ * Fixed Makefile for demos in mesag-widgets-dev. Closes bug#62674
+
+ -- James A. Treacy <treacy@debian.org> Fri, 19 May 2000 13:23:00 -0400
+
+mesa (3.1-16) frozen unstable; urgency=low
+
+ * Add --prefix=/usr to ggi build. Closes bug#61705, #61486
+
+ -- James A. Treacy <treacy@debian.org> Wed, 12 Apr 2000 15:12:48 -0400
+
+mesa (3.1-15) frozen unstable; urgency=low
+
+ * Remove ggi from the build on m68k. Closes bug#59273
+
+ -- James A. Treacy <treacy@debian.org> Mon, 6 Mar 2000 13:20:29 -0500
+
+mesa (3.1-14) frozen unstable; urgency=low
+
+ * Fixed hard-coded location of config file in library. This is release
+ critical, even though no bug was filed (relates to bug#58267).
+
+ -- James A. Treacy <treacy@debian.org> Mon, 28 Feb 2000 10:58:34 -0500
+
+mesa (3.1-13) frozen unstable; urgency=low
+
+ * Add missing ggi libraries. Closes bug#58267, #57760
+
+ -- James A. Treacy <treacy@debian.org> Thu, 24 Feb 2000 00:59:30 -0500
+
+mesa (3.1-12) frozen unstable; urgency=low
+
+ * Dependencies are now computed in a more intelligent way. Closes: bug#55861
+
+ -- James A. Treacy <treacy@debian.org> Fri, 21 Jan 2000 16:26:40 -0500
+
+mesa (3.1-11) frozen unstable; urgency=low
+
+ * Remove svgalib support from the software only package of mesa
+
+ -- James A. Treacy <treacy@debian.org> Sat, 22 Jan 2000 05:33:13 +0000
+
+mesa (3.1-10) frozen unstable; urgency=low
+
+ * Fix the mesag3-glide2 postinst. Closes bug#55462
+
+ -- James A. Treacy <treacy@debian.org> Sat, 22 Jan 2000 02:06:27 +0000
+
+mesa (3.1-9) frozen unstable; urgency=low
+
+ * The ggi based packages are now built with the other versions of mesa. Closes: bug#49218, #55221
+
+ -- James A. Treacy <treacy@debian.org> Sat, 15 Jan 2000 22:24:13 -0500
+
+mesa (3.1-8) unstable; urgency=low
+
+ * fixed the postinst and prerm for the glide packages
+ * added Provides: mesag-dev to the mesag-glide2-dev package to maintain
+ backwards compatability
+
+ -- James A. Treacy <treacy@debian.org> Sat, 15 Jan 2000 01:01:58 -0500
+
+mesa (3.1-7) unstable; urgency=low
+
+ * Fix version number for soname in the shlib file. Closes: bug#54926
+
+ -- James A. Treacy <treacy@debian.org> Thu, 13 Jan 2000 01:37:03 -0500
+
+mesa (3.1-6) unstable; urgency=low
+
+ * Include docs/README.3DFX in mesag3-glide2 package. Closes: bug#54625
+ * Remove Provides: libgl1 from mesag3-widgets. Closes: bug#54774
+ * conflicts with older versions of mesa. Closes: bug#54831
+
+ -- James A. Treacy <treacy@debian.org> Mon, 10 Jan 2000 11:50:49 -0500
+
+mesa (3.1-5) unstable; urgency=low
+
+ * now Conflicts: libgl1
+ * remove extra '.' in library name
+
+ -- James A. Treacy <treacy@debian.org> Sun, 9 Jan 2000 20:47:31 -0500
+
+mesa (3.1-4) unstable; urgency=low
+
+ * Added links libGL.so.1 <- libMesaGL.so.3 so existing progs don't break
+ * Copyright changed for version 3.1
+
+ -- James A. Treacy <treacy@debian.org> Thu, 6 Jan 2000 17:11:11 -0500
+
+mesa (3.1-3) unstable; urgency=low
+
+ * copyright file now refers to /usr/share/common-license/LGPL.
+
+ -- James A. Treacy <treacy@debian.org> Tue, 4 Jan 2000 11:50:45 -0500
+
+mesa (3.1-2) unstable; urgency=low
+
+ * Second try. Fixed shlibs file.
+
+ -- James A. Treacy <treacy@debian.org> Tue, 4 Jan 2000 00:00:29 -0500
+
+mesa (3.1-1) unstable; urgency=low
+
+ * New upstream version.
+ * glide version of packages added, since glide is now under the GPL.
+ * mesa widget libraries are now in a separate package
+ * library names are changed to lib{GL,GLU}.*
+
+ -- James A. Treacy <treacy@debian.org> Tue, 14 Dec 1999 10:06:14 -0500
+
+mesa (3.0-2) unstable; urgency=low
+
+ * added symlinks from libMesaGL* -> libGL*. Fixes bug #37160
+ * added lines (commented out) for building a glide version of mesa. Fixes bug #39758
+
+ -- James A. Treacy <treacy@debian.org> Thu, 13 May 1999 01:02:42 -0400
+
+mesa (3.0-1) unstable; urgency=low
+
+ * mesa libs moved to /usr/lib. Fixes bug #26874
+ * motif widget library libMesaGLwM added (compiled using headers from lesstif). Fixes bug #25380
+
+ -- James A. Treacy <treacy@debian.org> Thu, 6 Aug 1998 13:49:37 -0400
+
+mesa (2.6-4) unstable; urgency=low
+
+ * call to ldconfig in postinst put back in. Fixes bug #20552
+ * changelog.Debian file created for the mesa-doc package.
+ * deleted miscellaneous files. Fixes bug #21481
+
+ -- James A. Treacy <treacy@debian.org> Sat, 23 May 1998 23:41:34 -0400
+
+mesa (2.6-3) frozen unstable; urgency=low
+
+ * No changes. Just trying (again) to get this back in the distribution
+
+ -- James A. Treacy <treacy@debian.org> Tue, 24 Mar 1998 00:53:09 -0500
+
+mesa (2.6-2) unstable frozen; urgency=low
+
+ * point copyright to LPGL in /usr/doc/copyright. Fixes bug #19633
+
+ -- James A. Treacy <treacy@debian.org> Sun, 15 Mar 1998 14:00:33 -0500
+
+mesa (2.6-1) unstable; urgency=low
+
+ * New upstream Release
+ * strip static lib with --strip-debug and shared with strip--unneeded: Fixes bug#17301
+ * create doc package in build-indep: Fixes bug#16090
+ * added widgets-mesa library to package: Fixes bug#15729
+ * created mesa-glide* packages
+
+ -- James A. Treacy <treacy@debian.org> Mon, 19 Jan 1998 23:45:50 -0500
+
+mesa (2.5-2) unstable; urgency=low
+
+ * Corrected i386 specific debian/rules file: Fixes bug#15640
+
+ -- James A. Treacy <treacy@debian.org> Fri, 5 Nov 1997 11:46:13 -0500
+
+mesa (2.5-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- James A. Treacy <treacy@debian.org> Sun, 23 Nov 1997 20:46:13 -0500
+
+mesa (2.4-1) unstable; urgency=low
+
+ * New upstream release.
+ * New maintainer.
+ * libc6 release.
+
+ -- James A. Treacy <treacy@debian.org> Mon, 3 Nov 1997 01:11:34 -0500
+
+mesa (2.2-2) unstable; urgency=low
+
+ * debian/control: mesa-doc no longer depends on mesa (bug #8840).
+
+ -- Karl Sackett <krs@debian.org> Wed, 30 Apr 1997 10:25:25 -0500
+
+mesa (2.2-1) unstable; urgency=low
+
+ * New upstream release.
+ * Make-config: linux-elf libraries compiled with -D_REENTRANT.
+
+ -- Karl Sackett <krs@debian.org> Wed, 19 Mar 1997 09:10:22 -0600
+
+mesa (2.1-4) unstable; urgency=low
+
+ * debian/control: lib packages moved from 'graphics' to 'libs'.
+ * debian/rules: headers moved from /usr/include/mesa to /usr/include
+ (no more -I/usr/include/mesa).
+
+ -- Karl Sackett <krs@debian.org> Tue, 25 Feb 1997 09:30:23 -0600
+
+mesa (2.1-3) unstable; urgency=low
+
+ * debian/control: mesa2 provides mesa and conflicts with mesa
+ (bug #7394).
+
+ -- Karl Sackett <krs@debian.org> Mon, 17 Feb 1997 09:25:42 -0600
+
+mesa (2.1-2) unstable; urgency=low
+
+ * debian/rules: install gmesa.h, osmesa.h, FooMesa.h in mesa-dev
+ (bug #6864).
+
+ -- Karl Sackett <krs@debian.org> Tue, 28 Jan 1997 09:37:41 -0600
+
+mesa (2.1-1) unstable; urgency=low
+
+ * New upstream release.
+ * Added soname to mesa and mesa-widgets.
+ * Moved static libraries to mesa2-dbg.
+ * debian/postinst, postinst-widgets: call ldconfig without explicit
+ pathname (bugs #6176, 6180).
+
+ -- Karl Sackett <krs@debian.org> Mon, 6 Jan 1997 09:30:10 -0600
+
+mesa (2.0-2) unstable; urgency=low
+
+ * Created mesa-widgets and mesa-widgets-dev (Bug #5029).
+
+ -- Karl Sackett <krs@debian.org> Wed, 30 Oct 1996 08:44:19 -0600
+
+mesa (2.0-1) unstable; urgency=low
+
+ * src/draw.c: replaced with upstream patch.
+ * Make-config: linux-elf target builds libMesaGLw.so library, looks
+ for XLIBS in /usr/X11R6/lib, removed -mieee-mp from CFLAGS.
+ * widgets-sgi/Makefile: builds libMesaGlw.a library
+ * New upstream release.
+ * Converted to new package standard.
+ * Maintainer address changed.
+
+ -- Karl Sackett <krs@debian.org> Mon, 14 Oct 1996 15:37:19 -0500
+
+1.2.8-3
+ * Package split into runtime, development, and documentation
+ packages.
+ * widgets now made as a sharable library.
+ * GLUT removed. This will be released as a separate package.
+
+1.2.8-2
+ * Support files now architecture-independent
+
+1.2.8-1
+ * Upgrade to latest release
+ * Brought support files up to latest packaging requirements
+ * mondello/Makefile: fixed error in realclean target
+
+1.2.7-2
+ * debian.rules: clean all Makefiles out of widgets directory
+ * debian.postrm: remove /usr/lib/mesa entry from /etc/ld.so.config
+ (bug #2817)
+
+1.2.7-1
+ * Added Debian support files
+ * Included the GLUT OpenGL Utility Toolkit
+ * Makefile - disable building programs in demos, samples, and book
+ directories
+ * mklib.linux - disabled building *.a libraries
+ * widgets/Makefile.in - disabled building demo programs
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000000..7ed6ff82de
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+5
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000000..aa8788cfec
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,370 @@
+Source: mesa
+Section: graphics
+Priority: optional
+Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
+XSBC-Original-Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
+Uploaders: Thierry Reding <thierry@gilfi.de>, Julien Cristau <jcristau@debian.org>, David Nusinow <dnusinow@debian.org>, Brice Goglin <bgoglin@debian.org>
+Standards-Version: 3.7.3
+Build-Depends: debhelper (>= 5), quilt (>= 0.40), pkg-config,
+ libdrm-dev (>= 2.3.1) [!hurd-i386], libx11-dev, xutils-dev,
+ x11proto-gl-dev (>= 1.4.8), libxxf86vm-dev,
+ libexpat1-dev, dpkg-dev (>= 1.13.19), libxfixes-dev,
+ libxdamage-dev, libxext-dev, autoconf, automake
+Vcs-Git: git://git.debian.org/git/pkg-xorg/lib/mesa
+Vcs-Browser: http://git.debian.org/?p=pkg-xorg/lib/mesa.git
+Homepage: http://mesa3d.sourceforge.net/
+
+Package: libgl1-mesa-swx11
+Section: libs
+Priority: extra
+Architecture: any
+Pre-Depends: dpkg (>= 1.14.12ubuntu3)
+Depends: ${shlibs:Depends}, libosmesa6 (>= 6.5.2-1)
+Conflicts: mesag3-glide, mesag3-glide2, mesag3+ggi, libgl1, nvidia-glx, mesag3, libgl1-mesa-swrast
+Provides: libgl1, mesag3, libgl1-mesa-swrast
+Replaces: libgl1, mesag3, libgl1-mesa-swrast
+Description: A free implementation of the OpenGL API -- runtime
+ Mesa is a 3-D graphics library with an API which is very similar to
+ that of OpenGL. To the extent that Mesa utilizes the OpenGL command
+ syntax or state machine, it is being used with authorization from
+ Silicon Graphics, Inc. However, the author makes no claim that Mesa
+ is in any way a compatible replacement for OpenGL or associated with
+ Silicon Graphics, Inc.
+ .
+ This library provides a pure software rasteriser; it does not provide
+ a direct rendering-capable library, or one which uses GLX. For that,
+ please see libgl1-mesa-glx.
+ .
+ On Linux, this library is also known as libGL or libGL.so.1.
+
+Package: libgl1-mesa-swx11-dbg
+Section: libdevel
+Priority: extra
+Architecture: any
+Pre-Depends: dpkg (>= 1.14.12ubuntu3)
+Depends: libgl1-mesa-swx11 (= ${binary:Version})
+Conflicts: libgl1-mesa-swrast-dbg
+Provides: libgl1-mesa-swrast-dbg
+Replaces: libgl1-mesa-swrast-dbg
+Description: A free implementation of the OpenGL API -- debugging symbols
+ Mesa is a 3-D graphics library with an API which is very similar to
+ that of OpenGL. To the extent that Mesa utilizes the OpenGL command
+ syntax or state machine, it is being used with authorization from
+ Silicon Graphics, Inc. However, the author makes no claim that Mesa
+ is in any way a compatible replacement for OpenGL or associated with
+ Silicon Graphics, Inc.
+ .
+ This library provides a pure software rasteriser; it does not provide
+ a direct rendering-capable library, or one which uses GLX. For that,
+ please see libgl1-mesa-glx.
+ .
+ On Linux, this library is also known as libGL or libGL.so.1.
+ .
+ This package contains debugging symbols for the software rasterization GL
+ library.
+
+Package: libgl1-mesa-swx11-i686
+Section: libs
+Priority: extra
+Architecture: i386
+Pre-Depends: dpkg (>= 1.14.12ubuntu3)
+Depends: libgl1-mesa-swx11 (= ${binary:Version}), ${shlibs:Depends}
+Description: Mesa OpenGL runtime [i686 optimized]
+ Mesa is a 3-D graphics library with an API which is very similar to
+ that of OpenGL. To the extent that Mesa utilizes the OpenGL command
+ syntax or state machine, it is being used with authorization from
+ Silicon Graphics, Inc. However, the author makes no claim that Mesa
+ is in any way a compatible replacement for OpenGL or associated with
+ Silicon Graphics, Inc.
+ .
+ This library provides a pure software rasteriser; it does not provide
+ a direct rendering-capable library, or one which uses GLX. For that,
+ please see libgl1-mesa-glx.
+ .
+ On Linux, this library is also known as libGL or libGL.so.1.
+ .
+ This set of libraries is optimized for i686 machines and will only be used if
+ you are running a 2.6 kernel on an i686 class CPU. This includes Pentium Pro,
+ Pentium II/II/IV, Celeron CPU's and similar class CPU's (including clones
+ such as AMD Athlon/Opteron, VIA C3 Nehemiah, but not VIA C3 Ezla).
+
+Package: libgl1-mesa-swx11-dev
+Section: libdevel
+Priority: extra
+Architecture: any
+Pre-Depends: dpkg (>= 1.14.12ubuntu3)
+Depends: libgl1-mesa-swx11 (= ${binary:Version}), libc6-dev, libx11-dev, libxext6, mesa-common-dev (= ${source:Version})
+Provides: libgl-dev, mesag-dev, libgl1-mesa-swrast-dev
+Conflicts: mesa-dev, libgl-dev, mesag3 (<< 3.1-1), nvidia-glx-dev, mesag-dev, libgl1-mesa-swrast-dev
+Replaces: libgl-dev, mesag-dev, libgl1-mesa-swrast-dev
+Description: A free implementation of the OpenGL API -- development files
+ This package provides the development environment required for
+ compiling programs with Mesa. For a complete description of Mesa,
+ please look at the libgl1-mesa-swx11 package.
+ .
+ This library provides a pure software rasteriser; it does not provide
+ a direct rendering-capable library, or one which uses GLX. For that,
+ please see libgl1-mesa-dev.
+
+Package: libgl1-mesa-glx
+Section: libs
+Architecture: any
+Pre-Depends: dpkg (>= 1.14.12ubuntu3)
+Depends: ${shlibs:Depends}
+Conflicts: libgl1, libgl1-mesa-dri (<< 6.4.0)
+Replaces: libgl1, libgl1-mesa-dri (<< 6.4.0)
+Provides: libgl1
+Description: A free implementation of the OpenGL API -- GLX runtime
+ This version of Mesa provides GLX and DRI capabilities: it is capable of
+ both direct and indirect rendering. For direct rendering, it can use DRI
+ modules from the libgl1-mesa-dri package to accelerate drawing.
+ .
+ This package does not include the modules themselves: these can be found
+ in the libgl1-mesa-dri package.
+ .
+ For a complete description of Mesa, please look at the
+ libgl1-mesa-swx11 package.
+
+Package: libgl1-mesa-glx-dbg
+Section: libdevel
+Priority: extra
+Architecture: any
+Pre-Depends: dpkg (>= 1.14.12ubuntu3)
+Depends: libgl1-mesa-glx (= ${binary:Version})
+Description: Debugging symbols for the Mesa GLX runtime
+ This version of Mesa provides GLX and DRI capabilities: it is capable of
+ both direct and indirect rendering. For direct rendering, it can use DRI
+ modules from the libgl1-mesa-dri package to accelerate drawing.
+ .
+ This package does not include the modules themselves: these can be found
+ in the libgl1-mesa-dri package.
+ .
+ For a complete description of Mesa, please look at the
+ libgl1-mesa-swx11 package.
+ .
+ This package contains debugging symbols for the GL library with GLX and DRI
+ capabilities.
+
+#Package: libgl1-mesa-glx-i686
+#Section: libs
+#Priority: extra
+#Architecture: i386
+#Pre-Depends: libgl1-mesa-glx, dpkg (>= 1.14.12ubuntu3)
+#Description: A free implementation of the OpenGL API -- GLX runtime [i686 optimized]
+# This version of Mesa provides GLX and DRI capabilities: it is capable of
+# both direct and indirect rendering. For direct rendering, it can use DRI
+# modules from the libgl1-mesa-dri package to accelerate drawing.
+# .
+# This package does not include the modules themselves: these can be found
+# in the libgl1-mesa-dri package.
+# .
+# For a complete description of Mesa, please look at the
+# libgl1-mesa-swx11 package.
+# .
+# This set of libraries is optimized for i686 machines and will only be used if
+# you are running a 2.6 kernel on an i686 class CPU. This includes Pentium Pro,
+# Pentium II/II/IV, Celeron CPU's and similar class CPU's (including clones
+# such as AMD Athlon/Opteron, VIA C3 Nehemiah, but not VIA C3 Ezla).
+
+Package: libgl1-mesa-dri
+Section: libs
+Priority: optional
+Architecture: alpha amd64 arm armeb armel hppa i386 ia64 kfreebsd-i386 kfreebsd-amd64 lpia m68k mips mipsel powerpc s390 sparc
+Pre-Depends: dpkg (>= 1.14.12ubuntu3)
+Depends: ${shlibs:Depends}, libgl1-mesa-glx (= ${binary:Version})
+Suggests: libglide3
+Conflicts: xlibmesa-dri (<< 1:7.0.0)
+Replaces: xlibmesa-dri (<< 1:7.0.0)
+Description: A free implementation of the OpenGL API -- DRI modules
+ This version of Mesa provides GLX and DRI capabilities: it is capable of
+ both direct and indirect rendering. For direct rendering, it can use DRI
+ modules from the libgl1-mesa-dri package to accelerate drawing.
+ .
+ This package does not include the OpenGL library itself, only the DRI
+ modules for accelerating direct rendering.
+ .
+ For a complete description of Mesa, please look at the
+ libgl1-mesa-swx11 package.
+ .
+ The tdfx DRI module needs libglide3 to enable direct rendering.
+
+Package: libgl1-mesa-dri-dbg
+Section: libdevel
+Priority: extra
+Architecture: alpha amd64 arm armeb armel hppa i386 ia64 kfreebsd-i386 kfreebsd-amd64 lpia m68k mips mipsel powerpc s390 sparc
+Pre-Depends: dpkg (>= 1.14.12ubuntu3)
+Depends: libgl1-mesa-dri (= ${binary:Version})
+Description: Debugging symbols for the Mesa DRI modules
+ This version of Mesa provides GLX and DRI capabilities: it is capable of
+ both direct and indirect rendering. For direct rendering, it can use DRI
+ modules from the libgl1-mesa-dri package to accelerate drawing.
+ .
+ This package does not include the OpenGL library itself, only the DRI
+ modules for accelerating direct rendering.
+ .
+ For a complete description of Mesa, please look at the
+ libgl1-mesa-swx11 package.
+ .
+ This package contains debugging symbols for the DRI modules.
+
+#Package: libgl1-mesa-dri-i686
+#Section: libs
+#Priority: extra
+#Architecture: i386
+#Pre-Depends: libgl1-mesa-dri, dpkg (>= 1.14.12ubuntu3)
+#Description: A free implementation of the OpenGL API -- DRI modules [i686 optimized]
+# This version of Mesa provides GLX and DRI capabilities: it is capable of
+# both direct and indirect rendering. For direct rendering, it can use DRI
+# modules from the libgl1-mesa-dri package to accelerate drawing.
+# .
+# This package does not include the OpenGL library itself, only the DRI
+# modules for accelerating direct rendering.
+# .
+# For a complete description of Mesa, please look at the
+# libgl1-mesa-swx11 package.
+# .
+# This set of libraries is optimized for i686 machines and will only be used if
+# you are running a 2.6 kernel on an i686 class CPU. This includes Pentium Pro,
+# Pentium II/II/IV, Celeron CPU's and similar class CPU's (including clones
+# such as AMD Athlon/Opteron, VIA C3 Nehemiah, but not VIA C3 Ezla).
+
+Package: libgl1-mesa-dev
+Section: libdevel
+Architecture: all
+Pre-Depends: dpkg (>= 1.14.12ubuntu3)
+Depends: libc6-dev, mesa-common-dev (= ${source:Version}), libgl1-mesa-glx (>= ${source:Upstream-Version})
+Conflicts: libgl-dev, libgl1-mesa-dri-dev
+Replaces: libgl-dev, libgl1-mesa-dri-dev
+Provides: libgl-dev, libgl1-mesa-dri-dev
+Description: A free implementation of the OpenGL API -- GLX development files
+ This version of Mesa provides GLX and DRI capabilities: it is capable of
+ both direct and indirect rendering. For direct rendering, it can use DRI
+ modules from the libgl1-mesa-dri package to accelerate drawing.
+ .
+ This package includes headers and static libraries for compiling
+ programs with Mesa.
+ .
+ For a complete description of Mesa, please look at the libgl1-mesa-swx11
+ package.
+
+Package: mesa-common-dev
+Section: libdevel
+Architecture: all
+Replaces: xlibmesa-gl-dev (<< 1:7), xlibosmesa-dev, libgl1-mesa-swx11-dev (<< 6.5.2), libgl1-mesa-dev (<< 6.5.2)
+Pre-Depends: dpkg (>= 1.14.12ubuntu3)
+Depends: libx11-dev
+Description: Developer documentation for Mesa
+ This package includes the specifications for the Mesa-specific OpenGL
+ extensions, the complete set of release notes and the development header
+ files common to all Mesa packages.
+
+Package: libosmesa6
+Section: libs
+Architecture: any
+Pre-Depends: dpkg (>= 1.14.12ubuntu3)
+Depends: ${shlibs:Depends}
+Replaces: libgl1-mesa-swx11 (<< 6.5.2)
+Description: Mesa Off-screen rendering extension
+ OSmesa is a Mesa extension that allows programs to render to an
+ off-screen buffer using the OpenGL API without having to create a
+ rendering context on an X Server. It uses a pure software renderer.
+ .
+ This package provides both 16-bit and 32-bit versions of the off-screen
+ renderer which do not require external libraries to work.
+
+Package: libosmesa6-dev
+Section: libdevel
+Architecture: any
+Pre-Depends: dpkg (>= 1.14.12ubuntu3)
+Depends: libosmesa6 (= ${binary:Version}), mesa-common-dev (= ${source:Version}) | libgl-dev
+Conflicts: xlibosmesa-dev, libosmesa4-dev, libosmesa-dev
+Replaces: xlibosmesa-dev, libosmesa-dev, libgl1-mesa-swx11-dev (<< 6.5.2), mesa-common-dev (<< 6.5.2)
+Provides: xlibosmesa-dev, libosmesa-dev
+Description: Mesa Off-screen rendering extension -- development files
+ This package provides the required environment for developing programs
+ that use the off-screen rendering extension of Mesa.
+ .
+ For more information on OSmesa see the libosmesa6 package.
+
+Package: libglu1-mesa
+Section: libs
+Architecture: any
+Pre-Depends: dpkg (>= 1.14.12ubuntu3)
+Depends: ${shlibs:Depends}, libgl1-mesa-glx | libgl1
+Provides: libglu1
+Conflicts: mesag3 (<< 5.0.0-1), xlibmesa3, libglu1
+Replaces: libglu1
+Description: The OpenGL utility library (GLU)
+ GLU offers simple interfaces for building mipmaps; checking for the
+ presence of extensions in the OpenGL (or other libraries which follow
+ the same conventions for advertising extensions); drawing
+ piecewise-linear curves, NURBS, quadrics and other primitives
+ (including, but not limited to, teapots); tesselating surfaces; setting
+ up projection matrices and unprojecting screen coordinates to world
+ coordinates.
+ .
+ On Linux, this library is also known as libGLU or libGLU.so.1.
+ .
+ This package provides the SGI implementation of GLU shipped with the
+ Mesa package (ergo the "-mesa" suffix).
+
+Package: libglu1-mesa-dev
+Section: libdevel
+Architecture: any
+Pre-Depends: dpkg (>= 1.14.12ubuntu3)
+Depends: libglu1-mesa (= ${binary:Version}), libgl1-mesa-dev | libgl-dev
+Provides: libglu-dev, xlibmesa-glu-dev
+Conflicts: mesag-dev (<< 5.0.0-1), mesa-glide2-dev (<< 5.0.0-1), mesag3+ggi-dev (<< 5.0.0-1), xlibmesa-dev
+Replaces: libglu-dev
+Description: The OpenGL utility library -- development files
+ Includes headers and static libraries for compiling programs with GLU.
+ .
+ For a complete description of GLU, please look at the libglu1-mesa
+ package.
+
+#Package: libglw1-mesa
+#Section: libs
+#Architecture: any
+#Pre-Depends: dpkg (>= 1.14.12ubuntu3)
+#Depends: ${shlibs:Depends}
+#Provides: libglw1
+#Description: A free implementation of the OpenGL API -- runtime
+# Mesa is a 3-D graphics library with an API which is very similar to
+# that of OpenGL. To the extent that Mesa utilizes the OpenGL command
+# syntax or state machine, it is being used with authorization from
+# Silicon Graphics, Inc. However, the author makes no claim that Mesa
+# is in any way a compatible replacement for OpenGL or associated with
+# Silicon Graphics, Inc.
+# .
+# This package provides a simple widgets library, libGLw, which
+# allows Motif-based applications to embed an OpenGL drawing context.
+# .
+# On Linux, this library is also known as libGLw or libGLw.so.1.
+
+#Package: libglw1-mesa-dev
+#Section: libdevel
+#Architecture: any
+#Pre-Depends: dpkg (>= 1.14.12ubuntu3)
+#Depends: libglw1-mesa (= ${binary:Version}), libc6-dev, libx11-dev, libxext6, mesa-common-dev (= ${source:Version})
+#Provides: mesag3-widgets, mesag-widgets-dev, libglw-dev
+#Conflicts: libglw-dev, libgl1-mesa-swx11-dev (<< 6.5.2-4)
+#Replaces: libglw-dev
+#Description: A free implementation of the OpenGL API -- development files
+# This package provides the development environment required for
+# compiling programs with the Mesa widgets library, libGLw, which
+# allows Motif-based applications to embed an OpenGL drawing context.
+# The headers and static libraries for compiling programs that use this
+# library are included.
+
+Package: mesa-utils
+Section: x11
+Priority: optional
+Architecture: any
+Pre-Depends: dpkg (>= 1.14.12ubuntu3)
+Depends: ${shlibs:Depends}
+Replaces: xbase-clients (<< 6.8.2-38)
+Description: Miscellaneous Mesa GL utilities
+ This package provides several basic GL utilities built by Mesa, including
+ glxinfo and glxgears.
+
+# vim: tw=0
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000000..03ac1d5b8c
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,444 @@
+This package was debianized by James A. Treacy treacy@debian.org on Thu,
+6 Jan 2000 01:11:34 -0500. It was newly debianized by Marcelo E.
+Magallon <mmagallo@debian.org> on Sat, 25 Dec 2004 14:50:02 -0600. It was
+again debianized by Thierry Reding <thierry@gilfi.de> on Sat, 14 Oct 2006
+02:01:12 +0200.
+
+It was downloaded from http://www.mesa3d.org/download.html
+
+For more information see:
+
+ http://www.mesa3d.org/
+
+Copyright:
+
+Upstream Author: Brian Paul <brian.paul@tungstengraphics.com>
+
+License:
+
+ License / Copyright Information
+
+ The Mesa distribution consists of several components. Different
+ copyrights and licenses apply to different components. For
+ example, GLUT is copyrighted by Mark Kilgard, some demo programs
+ are copyrighted by SGI, some of the Mesa device drivers are
+ copyrighted by their authors. See below for a list of Mesa's
+ components and the copyright/license for each.
+
+ The core Mesa library is licensed according to the terms of the
+ XFree86 copyright (an MIT-style license). This allows integration
+ with the XFree86/DRI project. Unless otherwise stated, the Mesa
+ source code and documentation is licensed as follows:
+
+ Copyright (C) 1999-2003 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.
+
+ Attention, Contributors
+
+ When contributing to the Mesa project you must agree to relinquish
+ your work to the holder of the copyright for the particular
+ component you're contributing to. That is, you can't put your own
+ copyright on the code, unless it's a modular piece that can be
+ omitted from Mesa (like a new device driver). If for example, you
+ contribute a bug fix to Mesa's texture mapping code, your code
+ will become a part of the body of work which is copyrighted by
+ Brian Paul and licensed by the above terms.
+
+----------------------------------------------------------------------
+
+Some files, as listed below, are made available under the SGI Free B
+license. This license is as follows:
+
+ SGI FREE SOFTWARE LICENSE B (Version 1.1 [02/22/2000])
+
+1. Definitions.
+
+1.1. "Additional Notice Provisions" means such additional provisions as
+ appear in the Notice in Original Code under the heading "Additional
+ Notice Provisions."
+
+1.2. "Covered Code" means the Original Code or Modifications, or any
+ combination thereof.
+
+1.3. "Hardware" means any physical device that accepts input, processes
+ input, stores the results of processing, and/or provides output.
+
+1.4. "Larger Work" means a work that combines Covered Code or portions
+ thereof with code not governed by the terms of this License.
+
+1.5. "Licensable" means having the right to grant, to the maximum extent
+ possible, whether at the time of the initial grant or subsequently
+ acquired, any and all of the rights conveyed herein.
+
+1.6. "License" means this document.
+
+1.7. "Licensed Patents" means patent claims Licensable by SGI that are
+ infringed by the use or sale of Original Code or any Modifications
+ provided by SGI, or any combination thereof.
+
+1.8. "Modifications" means any addition to or deletion from the
+ substance or structure of the Original Code or any previous
+ Modifications. When Covered Code is released as a series of files,
+ a Modification is:
+
+ A. Any addition to the contents of a file containing Original Code
+ and/or addition to or deletion from the contents of a file
+ containing previous Modifications.
+
+ B. Any new file that contains any part of the Original Code or
+ previous Modifications.
+
+1.9. "Notice" means any notice in Original Code or Covered Code, as
+ required by and in compliance with this License.
+
+1.10. "Original Code" means source code of computer software code that
+ is described in the source code Notice required by Exhibit A as
+ Original Code, and updates and error corrections specifically
+ thereto.
+
+1.11. "Recipient" means an individual or a legal entity exercising
+ rights under, and complying with all of the terms of, this License
+ or a future version of this License issued under Section 8. For
+ legal entities, "Recipient" includes any entity that controls, is
+ controlled by, or is under common control with Recipient. For
+ purposes of this definition, "control" of an entity means (a) the
+ power, direct or indirect, to direct or manage such entity, or (b)
+ ownership of fifty percent (50%) or more of the outstanding shares
+ or beneficial ownership of such entity.
+
+1.12. "Recipient Patents" means patent claims Licensable by a Recipient
+ that are infringed by the use or sale of Original Code or any
+ Modifications provided by SGI, or any combination thereof.
+
+1.13. "SGI" means Silicon Graphics, Inc.
+
+1.14. "SGI Patents" means patent claims Licensable by SGI other than the
+ Licensed Patents.
+
+2. License Grant and Restrictions.
+
+2.1. SGI License Grant. Subject to the terms of this License and any
+ third party intellectual property claims, for the duration of
+ intellectual property protections inherent in the Original Code,
+ SGI hereby grants Recipient a worldwide, royalty-free,
+ non-exclusive license, to do the following: (i) under copyrights
+ Licensable by SGI, to reproduce, distribute, create derivative
+ works from, and, to the extent applicable, display and perform the
+ Original Code and/or any Modifications provided by SGI alone and/or
+ as part of a Larger Work; and (ii) under any Licensable Patents, to
+ make, have made, use, sell, offer for sale, import and/or otherwise
+ transfer the Original Code and/or any Modifications provided by
+ SGI. Recipient accepts the terms and conditions of this License by
+ undertaking any of the aforementioned actions. The patent license
+ shall apply to the Covered Code if, at the time any related
+ Modification is added, such addition of the Modification causes
+ such combination to be covered by the Licensed Patents. The patent
+ license in Section 2.1(ii) shall not apply to any other
+ combinations that include the Modification. No patent license is
+ provided under SGI Patents for infringements of SGI Patents by
+ Modifications not provided by SGI or combinations of Original Code
+ and Modifications not provided by SGI.
+
+2.2. Recipient License Grant. Subject to the terms of this License and
+ any third party intellectual property claims, Recipient hereby
+ grants SGI and any other Recipients a worldwide, royalty-free,
+ non-exclusive license, under any Recipient Patents, to make, have
+ made, use, sell, offer for sale, import and/or otherwise transfer
+ the Original Code and/or any Modifications provided by SGI.
+
+2.3. No License For Hardware Implementations. The licenses granted in
+ Section 2.1 and 2.2 are not applicable to implementation in
+ Hardware of the algorithms embodied in the Original Code or any
+ Modifications provided by SGI .
+
+3. Redistributions.
+
+3.1. Retention of Notice/Copy of License. The Notice set forth in
+ Exhibit A, below, must be conspicuously retained or included in any
+ and all redistributions of Covered Code. For distributions of the
+ Covered Code in source code form, the Notice must appear in every
+ file that can include a text comments field; in executable form,
+ the Notice and a copy of this License must appear in related
+ documentation or collateral where the Recipient’s rights relating
+ to Covered Code are described. Any Additional Notice Provisions
+ which actually appears in the Original Code must also be retained
+ or included in any and all redistributions of Covered Code.
+
+3.2. Alternative License. Provided that Recipient is in compliance with
+ the terms of this License, Recipient may, so long as without
+ derogation of any of SGI’s rights in and to the Original Code,
+ distribute the source code and/or executable version(s) of Covered
+ Code under (1) this License; (2) a license identical to this
+ License but for only such changes as are necessary in order to
+ clarify Recipient’s role as licensor of Modifications; and/or (3) a
+ license of Recipient’s choosing, containing terms different from
+ this License, provided that the license terms include this Section
+ 3 and Sections 4, 6, 7, 10, 12, and 13, which terms may not be
+ modified or superseded by any other terms of such license. If
+ Recipient elects to use any license other than this License,
+ Recipient must make it absolutely clear that any of its terms which
+ differ from this License are offered by Recipient alone, and not by
+ SGI. It is emphasized that this License is a limited license, and,
+ regardless of the license form employed by Recipient in accordance
+ with this Section 3.2, Recipient may relicense only such rights, in
+ Original Code and Modifications by SGI, as it has actually been
+ granted by SGI in this License.
+
+3.3. Indemnity. Recipient hereby agrees to indemnify SGI for any
+ liability incurred by SGI as a result of any such alternative
+ license terms Recipient offers.
+
+4. Termination. This License and the rights granted hereunder will
+ terminate automatically if Recipient breaches any term herein and
+ fails to cure such breach within 30 days thereof. Any sublicense to
+ the Covered Code that is properly granted shall survive any
+ termination of this License, absent termination by the terms of such
+ sublicense. Provisions that, by their nature, must remain in effect
+ beyond the termination of this License, shall survive.
+
+5. No Trademark Or Other Rights. This License does not grant any rights
+ to: (i) any software apart from the Covered Code, nor shall any
+ other rights or licenses not expressly granted hereunder arise by
+ implication, estoppel or otherwise with respect to the Covered Code;
+ (ii) any trade name, trademark or service mark whatsoever, including
+ without limitation any related right for purposes of endorsement or
+ promotion of products derived from the Covered Code, without prior
+ written permission of SGI; or (iii) any title to or ownership of the
+ Original Code, which shall at all times remains with SGI. All rights
+ in the Original Code not expressly granted under this License are
+ reserved.
+
+6. Compliance with Laws; Non-Infringement. There are various worldwide
+ laws, regulations, and executive orders applicable to dispositions
+ of Covered Code, including without limitation export, re-export, and
+ import control laws, regulations, and executive orders, of the U.S.
+ government and other countries, and Recipient is reminded it is
+ obliged to obey such laws, regulations, and executive orders.
+ Recipient may not distribute Covered Code that (i) in any way
+ infringes (directly or contributorily) any intellectual property
+ rights of any kind of any other person or entity or (ii) breaches
+ any representation or warranty, express, implied or statutory, to
+ which, under any applicable law, it might be deemed to have been
+ subject.
+
+7. Claims of Infringement. If Recipient learns of any third party claim
+ that any disposition of Covered Code and/or functionality wholly or
+ partially infringes the third party's intellectual property rights,
+ Recipient will promptly notify SGI of such claim.
+
+8. Versions of the License. SGI may publish revised and/or new versions
+ of the License from time to time, each with a distinguishing version
+ number. Once Covered Code has been published under a particular
+ version of the License, Recipient may, for the duration of the
+ license, continue to use it under the terms of that version, or
+ choose to use such Covered Code under the terms of any subsequent
+ version published by SGI. Subject to the provisions of Sections 3
+ and 4 of this License, only SGI may modify the terms applicable to
+ Covered Code created under this License.
+
+9. DISCLAIMER OF WARRANTY. COVERED CODE IS PROVIDED "AS IS." ALL
+ EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS ARE DISCLAIMED,
+ INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS
+ OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR
+ PURPOSE, AND NON-INFRINGEMENT. SGI ASSUMES NO RISK AS TO THE QUALITY
+ AND PERFORMANCE OF THE SOFTWARE. SHOULD THE SOFTWARE PROVE DEFECTIVE
+ IN ANY RESPECT, SGI ASSUMES NO COST OR LIABILITY FOR SERVICING,
+ REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY IS AN ESSENTIAL
+ PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED
+ HEREUNDER EXCEPT SUBJECT TO THIS DISCLAIMER.
+
+10. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES NOR LEGAL THEORY,
+ WHETHER TORT (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE OR STRICT
+ LIABILITY), CONTRACT, OR OTHERWISE, SHALL SGI OR ANY SGI LICENSOR
+ BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR
+ CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
+ LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, LOSS OF
+ DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
+ COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
+ INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
+ LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
+ RESULTING FROM SGI's NEGLIGENCE TO THE EXTENT APPLICABLE LAW
+ PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
+ EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
+ THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO RECIPIENT.
+
+11. Indemnity. Recipient shall be solely responsible for damages
+ arising, directly or indirectly, out of its utilization of rights
+ under this License. Recipient will defend, indemnify and hold
+ harmless Silicon Graphics, Inc. from and against any loss,
+ liability, damages, costs or expenses (including the payment of
+ reasonable attorneys fees) arising out of Recipient's use,
+ modification, reproduction and distribution of the Covered Code or
+ out of any representation or warranty made by Recipient.
+
+12. U.S. Government End Users. The Covered Code is a "commercial item"
+ consisting of "commercial computer software" as such terms are
+ defined in title 48 of the Code of Federal Regulations and all U.S.
+ Government End Users acquire only the rights set forth in this
+ License and are subject to the terms of this License.
+
+13. Miscellaneous. This License represents the complete agreement
+ concerning the its subject matter. If any provision of this License
+ is held to be unenforceable, such provision shall be reformed so as
+ to achieve as nearly as possible the same legal and economic effect
+ as the original provision and the remainder of this License will
+ remain in effect. This License shall be governed by and construed
+ in accordance with the laws of the United States and the State of
+ California as applied to agreements entered into and to be
+ performed entirely within California between California residents.
+ Any litigation relating to this License shall be subject to the
+ exclusive jurisdiction of the Federal Courts of the Northern
+ District of California (or, absent subject matter jurisdiction in
+ such courts, the courts of the State of California), with venue
+ lying exclusively in Santa Clara County, California, with the
+ losing party responsible for costs, including without limitation,
+ court costs and reasonable attorneys fees and expenses. The
+ application of the United Nations Convention on Contracts for the
+ International Sale of Goods is expressly excluded. Any law or
+ regulation that provides that the language of a contract shall be
+ construed against the drafter shall not apply to this License.
+
+Exhibit A
+
+License Applicability. Except to the extent portions of this file are
+made subject to an alternative license as permitted in the SGI Free
+Software License B, Version 1.1 (the "License"), the contents of this
+file are subject only to the provisions of the License. You may not use
+this file except in compliance with the License. You may obtain a copy
+of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
+Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
+
+http://oss.sgi.com/projects/FreeB
+
+Note that, as provided in the License, the Software is distributed on an
+"AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
+DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
+CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
+PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
+
+Original Code. The Original Code is: [name of software, version number,
+and release date], developed by Silicon Graphics, Inc. The Original Code
+is Copyright (c) [dates of first publication, as appearing in the Notice
+in the Original Code] Silicon Graphics, Inc. Copyright in any portions
+created by third parties is as indicated elsewhere herein. All Rights
+Reserved.
+
+Additional Notice Provisions: [such additional provisions, if any, as
+appear in the Notice in the Original Code under the heading "Additional
+Notice Provisions"]
+
+--------------------------------------------------------------------------
+
+Some other files listed below are made available from Silicon Graphics,
+Inc. under a more liberal, MIT-style license, as follows:
+
+ 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
+ the name of Silicon Graphics, Inc. not be used in advertising
+ or publicity pertaining to distribution of the software without specific,
+ 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
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
+ FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
+ SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
+ KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
+ LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
+ THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN
+ 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
+ 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
+ clause at DFARS 252.227-7013 and/or in similar or successor
+ clauses in the FAR or the DOD or NASA FAR Supplement.
+ Unpublished-- rights reserved under the copyright laws of the
+ United States. Contractor/manufacturer is Silicon Graphics,
+ Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311.
+
+--------------------------------------------------------------------------
+
+ Mesa Component Licenses:
+
+ Component Files Primary Author License
+ ----------------------------------------------------------------------------
+ core Mesa code src/*.[ch] Brian Paul Mesa
+ include/GL/gl.h
+
+ GLX driver src/X/* Brian Paul Mesa
+ include/GL/glx.h
+ include/GL/xmesa.h
+
+ OS/Mesa driver src/OSmesa/* Brian Paul Mesa
+ include/GL/osmesa.h
+
+ 3Dfx driver src/FX/* David Bucciarelli Mesa
+ include/GL/fxmesa.h
+
+ BeOS R4 driver mesa/drivers/beos/ Brian Paul Mesa
+
+ MGL driver include/GL/mglmesa.h SciTech, Inc GNU LGPL
+
+ Windows driver mesa/drivers/windows/ Li Wei GNU LGPL
+ include/GL/wmesa.h
+
+ SVGA driver mesa/drivers/svga/ Brian Paul GNU LGPL
+ include/GL/svgamesa.h
+
+ DOS driver mesa/drivers/dos/ Charlie Wallace GNU LGPL
+ include/GL/dosmesa.h
+
+ GGI driver mesa/drivers/ggi/ Uwe Maurer GNU LGPL
+ include/GL/ggimesa.h
+
+ GLUT src/glut/* Mark Kilgard Mark's copyright
+ include/GL/*glut*.h
+
+ GLU library src/glu/* Brian Paul GNU LGPL
+
+ SGI GLU library src/glu/sgi/* SGI SGI Free B
+ include/GL/glu.h
+
+ Ext registry include/GL/glext.h SGI SGI Free B
+ include/GL/glxext.h
+
+ demo programs progs/demos/* various see source files
+
+ X demos progs/xdemos/* Brian Paul see source files
+
+ SGI demos progs/samples/* SGI SGI MIT-style
+
+ RedBook demos progs/redbook/* SGI SGI MIT-style
+
+
+On Debian systems the full text of the GNU LGPL license is found in
+/usr/share/common-licenses/LGPL.
+
+------------------------------------------------------------------------------
+
+The Debian packaging is (C) 2006, Thierry Reding <thierry@gilfi.de> and
+is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
+
diff --git a/debian/glxdemo.1 b/debian/glxdemo.1
new file mode 100644
index 0000000000..fdfed7133e
--- /dev/null
+++ b/debian/glxdemo.1
@@ -0,0 +1,15 @@
+.TH glxdemo 1 "2006-11-29"
+.SH NAME
+glxdemo \- a demonstration of the GLX functions
+.SH SYNOPSIS
+.B glxdemo
+.SH DESCRIPTION
+The \fIglxdemo\fP program shows how to use the GLX functions in order to
+create an OpenGL program running on top of an X server. This program is most
+useful when studied in its source code form.
+.SH AUTHOR
+glxdemo was written by Brian Paul <brian.paul@tungstengraphics.com>.
+.PP
+This manual page was written by Thierry Reding <thierry@gilfi.de>, for the
+Debian project (but may be used by others).
+
diff --git a/debian/glxgears.1 b/debian/glxgears.1
new file mode 100644
index 0000000000..92c4f7a432
--- /dev/null
+++ b/debian/glxgears.1
@@ -0,0 +1,29 @@
+.TH glxgears 1 "2006-11-29"
+.SH NAME
+glxgears \- ``gears'' demo for GLX
+.SH SYNOPSIS
+.B glxgears
+.RI [ options ]
+.SH DESCRIPTION
+The \fIglxgears\fP program is a port of the ``gears'' demo to GLX. It displays
+a set of rotating gears and prints out the frame rate at regular intervals. It
+has become quite popular as basic benchmarking tool.
+.SH OPTIONS
+.TP 8
+.B \-display \fIdisplay\fP
+Specify which X display to run on.
+.TP 8
+.B \-info
+Display OpenGL renderer information.
+.TP 8
+.B \-stereo
+Use a stereo enabled GLX visual.
+.TP 8
+.B \-fullscreen
+Run in fullscreen mode.
+.SH AUTHOR
+glxgears was written by Brian Paul <brian.paul@tungstengraphics.com>.
+.PP
+This manual page was written by Thierry Reding <thierry@gilfi.de>, for the
+Debian project (but may be used by others).
+
diff --git a/debian/glxheads.1 b/debian/glxheads.1
new file mode 100644
index 0000000000..9502556901
--- /dev/null
+++ b/debian/glxheads.1
@@ -0,0 +1,30 @@
+.TH glxheads 1 "2006-11-29"
+.SH NAME
+glxheads \- exercise multiple GLX connections
+.SH SYNOPSIS
+.B glxheads
+[\fIdisplay\fP ...]
+.SH DESCRIPTION
+The \fIglxheads\fP program will try to open GLX connections on multiple X
+displays as specified on the command-line. If a connection can be made it will
+try to create a direct GLX context (and fallback to using indirect contexts if
+that fails) and open a window displaying a spinning green triangle.
+.PP
+If no display names are specified, \fIglxheads\fP will default to opening a
+single local connection on display 0.
+.SH EXAMPLE
+To open a local connection on display 0 and two remote connections to the
+hosts \fImars\fP (display 0) and \fIvenus\fP (display 1), run glxheads with
+the following command-line:
+.PP
+.RS 3n
+.nf
+$ glxheads :0 mars:0 venus:1
+.fi
+.RE
+.SH AUTHOR
+glxheads was written by Brian Paul <brian.paul@tungstengraphics.com>.
+.PP
+This manual page was written by Thierry Reding <thierry@gilfi.de> for the
+Debian project (but may be used by others).
+
diff --git a/debian/glxinfo.1 b/debian/glxinfo.1
new file mode 100644
index 0000000000..7a3732e17e
--- /dev/null
+++ b/debian/glxinfo.1
@@ -0,0 +1,41 @@
+.TH glxinfo 1 "2006-11-29"
+.SH NAME
+glxinfo \- show information about the GLX implementation
+.SH SYNOPSIS
+.B glxinfo
+.RI [ options ]
+.SH DESCRIPTION
+The \fIglxinfo\fP program shows information about the OpenGL and GLX
+implementations running on a given X display.
+.PP
+The information includes details about the server- and client-side GLX
+implementation, the OpenGL and GLU implementations as well as a list
+of available GLX visuals.
+.SH OPTIONS
+.TP 8
+.B \-v
+Print visuals info in verbose form.
+.TP 8
+.B \-t
+Print verbose table.
+.TP 8
+.B \-display \fIdisplay\fP
+Specify the X display to interrogate.
+.TP 8
+.B \-h
+Print usage information.
+.TP 8
+.B \-i
+Force an indirect rendering context.
+.TP 8
+.B \-b
+Find the "best" visual and print its number.
+.TP 8
+.B \-l
+Print interesting OpenGL limits.
+.SH AUTHOR
+glxinfo was written by Brian Paul <brian.paul@tungstengraphics.com>.
+.PP
+This manual page was written by Thierry Reding <thierry@gilfi.de>, for the
+Debian project (but may be used by others).
+
diff --git a/debian/libgl1-mesa-dev.install b/debian/libgl1-mesa-dev.install
new file mode 100644
index 0000000000..dac5ebda19
--- /dev/null
+++ b/debian/libgl1-mesa-dev.install
@@ -0,0 +1,2 @@
+usr/lib/libGL.so
+usr/lib/pkgconfig/gl.pc
diff --git a/debian/libgl1-mesa-dri-i686.install b/debian/libgl1-mesa-dri-i686.install
new file mode 100644
index 0000000000..44b5c55214
--- /dev/null
+++ b/debian/libgl1-mesa-dri-i686.install
@@ -0,0 +1 @@
+usr/lib/dri/i686/cmov/*.so
diff --git a/debian/libgl1-mesa-dri.install b/debian/libgl1-mesa-dri.install
new file mode 100644
index 0000000000..4d61dbe5e3
--- /dev/null
+++ b/debian/libgl1-mesa-dri.install
@@ -0,0 +1,2 @@
+usr/lib/dri/*.so
+etc/X11/Xsession.d/65mesa-check-x86-64
diff --git a/debian/libgl1-mesa-glx-i686.install b/debian/libgl1-mesa-glx-i686.install
new file mode 100644
index 0000000000..4c8ef3b34b
--- /dev/null
+++ b/debian/libgl1-mesa-glx-i686.install
@@ -0,0 +1 @@
+usr/lib/glx/i686/cmov/libGL.so.* usr/lib/i686/cmov
diff --git a/debian/libgl1-mesa-glx.install b/debian/libgl1-mesa-glx.install
new file mode 100644
index 0000000000..1a30ecd7cb
--- /dev/null
+++ b/debian/libgl1-mesa-glx.install
@@ -0,0 +1 @@
+usr/lib/glx/libGL.so.* usr/lib
diff --git a/debian/libgl1-mesa-glx.shlibs b/debian/libgl1-mesa-glx.shlibs
new file mode 100644
index 0000000000..b8e0fbaaaa
--- /dev/null
+++ b/debian/libgl1-mesa-glx.shlibs
@@ -0,0 +1 @@
+libGL 1 libgl1-mesa-glx | libgl1
diff --git a/debian/libgl1-mesa-swx11-dev.install b/debian/libgl1-mesa-swx11-dev.install
new file mode 100644
index 0000000000..f353c5923d
--- /dev/null
+++ b/debian/libgl1-mesa-swx11-dev.install
@@ -0,0 +1,2 @@
+usr/lib/libGL.a
+usr/lib/libGL.so
diff --git a/debian/libgl1-mesa-swx11-i686.install b/debian/libgl1-mesa-swx11-i686.install
new file mode 100644
index 0000000000..2177b0cf15
--- /dev/null
+++ b/debian/libgl1-mesa-swx11-i686.install
@@ -0,0 +1 @@
+usr/lib/i686/cmov/libGL.so.*
diff --git a/debian/libgl1-mesa-swx11-i686.shlibs b/debian/libgl1-mesa-swx11-i686.shlibs
new file mode 100644
index 0000000000..b8e0fbaaaa
--- /dev/null
+++ b/debian/libgl1-mesa-swx11-i686.shlibs
@@ -0,0 +1 @@
+libGL 1 libgl1-mesa-glx | libgl1
diff --git a/debian/libgl1-mesa-swx11.install b/debian/libgl1-mesa-swx11.install
new file mode 100644
index 0000000000..6d70d0f9f9
--- /dev/null
+++ b/debian/libgl1-mesa-swx11.install
@@ -0,0 +1 @@
+usr/lib/libGL.so.*
diff --git a/debian/libgl1-mesa-swx11.shlibs b/debian/libgl1-mesa-swx11.shlibs
new file mode 100644
index 0000000000..b8e0fbaaaa
--- /dev/null
+++ b/debian/libgl1-mesa-swx11.shlibs
@@ -0,0 +1 @@
+libGL 1 libgl1-mesa-glx | libgl1
diff --git a/debian/libglu1-mesa-dev.install b/debian/libglu1-mesa-dev.install
new file mode 100644
index 0000000000..78ac2b01ed
--- /dev/null
+++ b/debian/libglu1-mesa-dev.install
@@ -0,0 +1,4 @@
+usr/include/GL/glu.h
+usr/include/GL/glu_mangle.h
+usr/lib/libGLU.a
+usr/lib/libGLU.so
diff --git a/debian/libglu1-mesa.install b/debian/libglu1-mesa.install
new file mode 100644
index 0000000000..9ad0953c1c
--- /dev/null
+++ b/debian/libglu1-mesa.install
@@ -0,0 +1 @@
+usr/lib/libGLU.so.*
diff --git a/debian/libglu1-mesa.shlibs b/debian/libglu1-mesa.shlibs
new file mode 100644
index 0000000000..647fc5be38
--- /dev/null
+++ b/debian/libglu1-mesa.shlibs
@@ -0,0 +1 @@
+libGLU 1 libglu1-mesa | libglu1
diff --git a/debian/libglw1-mesa-dev.install b/debian/libglw1-mesa-dev.install
new file mode 100644
index 0000000000..7c03280c33
--- /dev/null
+++ b/debian/libglw1-mesa-dev.install
@@ -0,0 +1,3 @@
+usr/include/GL/GLw*A.h
+usr/lib/libGLw.a
+usr/lib/libGLw.so
diff --git a/debian/libglw1-mesa.install b/debian/libglw1-mesa.install
new file mode 100644
index 0000000000..9d299c81a5
--- /dev/null
+++ b/debian/libglw1-mesa.install
@@ -0,0 +1 @@
+usr/lib/libGLw.so.*
diff --git a/debian/libglw1-mesa.shlibs b/debian/libglw1-mesa.shlibs
new file mode 100644
index 0000000000..488d4da327
--- /dev/null
+++ b/debian/libglw1-mesa.shlibs
@@ -0,0 +1 @@
+libGLw 1 libglw1-mesa | libglw1
diff --git a/debian/libosmesa6-dev.install b/debian/libosmesa6-dev.install
new file mode 100644
index 0000000000..149a1bd789
--- /dev/null
+++ b/debian/libosmesa6-dev.install
@@ -0,0 +1,7 @@
+usr/include/GL/osmesa.h
+usr/lib/libOSMesa.a
+usr/lib/libOSMesa.so
+usr/lib/libOSMesa16.a
+usr/lib/libOSMesa16.so
+usr/lib/libOSMesa32.a
+usr/lib/libOSMesa32.so
diff --git a/debian/libosmesa6.install b/debian/libosmesa6.install
new file mode 100644
index 0000000000..d1e25b2ffe
--- /dev/null
+++ b/debian/libosmesa6.install
@@ -0,0 +1,3 @@
+usr/lib/libOSMesa.so.*
+usr/lib/libOSMesa16.so.*
+usr/lib/libOSMesa32.so.*
diff --git a/debian/libosmesa6.shlibs b/debian/libosmesa6.shlibs
new file mode 100644
index 0000000000..3c9ae1a14b
--- /dev/null
+++ b/debian/libosmesa6.shlibs
@@ -0,0 +1,3 @@
+libOSMesa 6 libosmesa6 (>= 6.5.2-1) | libgl1-mesa-glide3
+libOSMesa16 6 libosmesa6 (>= 6.5.2-1)
+libOSMesa32 6 libosmesa6 (>= 6.5.2-1)
diff --git a/debian/mesa-common-dev.docs b/debian/mesa-common-dev.docs
new file mode 100644
index 0000000000..834e887e4f
--- /dev/null
+++ b/debian/mesa-common-dev.docs
@@ -0,0 +1,8 @@
+docs/bugs.html
+docs/debugging.html
+docs/envvars.html
+docs/faq.html
+docs/osmesa.html
+docs/RELNOTES-*
+docs/relnotes*
+docs/*.spec
diff --git a/debian/mesa-common-dev.install b/debian/mesa-common-dev.install
new file mode 100644
index 0000000000..f4181b91b0
--- /dev/null
+++ b/debian/mesa-common-dev.install
@@ -0,0 +1,5 @@
+usr/include/GL/gl.h
+usr/include/GL/glext.h
+usr/include/GL/gl_mangle.h
+usr/include/GL/glx*.h
+usr/include/GL/internal/dri_interface.h
diff --git a/debian/mesa-utils.install b/debian/mesa-utils.install
new file mode 100644
index 0000000000..4d4d07e3f0
--- /dev/null
+++ b/debian/mesa-utils.install
@@ -0,0 +1,4 @@
+usr/bin/glxdemo
+usr/bin/glxgears
+usr/bin/glxheads
+usr/bin/glxinfo
diff --git a/debian/mesa-utils.manpages b/debian/mesa-utils.manpages
new file mode 100644
index 0000000000..a3cb2dbb5d
--- /dev/null
+++ b/debian/mesa-utils.manpages
@@ -0,0 +1,4 @@
+debian/glxdemo.1
+debian/glxgears.1
+debian/glxheads.1
+debian/glxinfo.1
diff --git a/debian/patches/01_disable-intel-classic-warn.diff b/debian/patches/01_disable-intel-classic-warn.diff
new file mode 100644
index 0000000000..0725ffe09f
--- /dev/null
+++ b/debian/patches/01_disable-intel-classic-warn.diff
@@ -0,0 +1,14 @@
+Index: mesa/src/mesa/drivers/dri/intel/intel_context.c
+===================================================================
+--- mesa.orig/src/mesa/drivers/dri/intel/intel_context.c
++++ mesa/src/mesa/drivers/dri/intel/intel_context.c
+@@ -490,9 +490,6 @@
+ if (intel->bufmgr == NULL) {
+ if (ttm_disable) {
+ fprintf(stderr, "TTM buffer manager disabled. Using classic.\n");
+- } else {
+- fprintf(stderr, "Failed to initialize TTM buffer manager. "
+- "Falling back to classic.\n");
+ }
+
+ if (intelScreen->tex.size == 0) {
diff --git a/debian/patches/02_use-ieee-fp-on-s390-and-m68k.patch b/debian/patches/02_use-ieee-fp-on-s390-and-m68k.patch
new file mode 100644
index 0000000000..6d12ffff62
--- /dev/null
+++ b/debian/patches/02_use-ieee-fp-on-s390-and-m68k.patch
@@ -0,0 +1,19 @@
+Patch that fixes Debian bug #349437.
+
+This patch by David Nusinow.
+
+Index: mesa/src/mesa/main/imports.h
+===================================================================
+--- mesa.orig/src/mesa/main/imports.h 2008-07-01 15:26:57.000000000 +0300
++++ mesa/src/mesa/main/imports.h 2008-07-01 15:45:49.000000000 +0300
+@@ -158,8 +158,9 @@
+ *** USE_IEEE: Determine if we're using IEEE floating point
+ ***/
+ #if defined(__i386__) || defined(__386__) || defined(__sparc__) || \
+- defined(__s390x__) || defined(__powerpc__) || \
++ defined(__s390__) || defined(__s390x__) || defined(__powerpc__) || \
+ defined(__x86_64__) || \
++ defined(__m68k__) || \
+ defined(ia64) || defined(__ia64__) || \
+ defined(__hppa__) || defined(hpux) || \
+ defined(__mips) || defined(_MIPS_ARCH) || \
diff --git a/debian/patches/03_optional-progs-and-install.patch b/debian/patches/03_optional-progs-and-install.patch
new file mode 100644
index 0000000000..211c7a9fb7
--- /dev/null
+++ b/debian/patches/03_optional-progs-and-install.patch
@@ -0,0 +1,55 @@
+Allow the programs that are to be built to be defined in the build
+configuration.
+
+Provide an install target for installing the programs in $(INSTALL_DIR)/bin.
+
+This patch by Thierry Reding.
+Not submitted to Mesa.
+--
+Also remove references to GLU library since it is not required
+and we don't actually build it at this point.
+
+
+Index: mesa/progs/xdemos/Makefile
+===================================================================
+--- mesa.orig/progs/xdemos/Makefile 2008-07-01 15:26:56.000000000 +0300
++++ mesa/progs/xdemos/Makefile 2008-07-01 15:48:47.000000000 +0300
+@@ -10,7 +10,7 @@
+
+ LIBS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(APP_LIB_DEPS)
+
+-PROGS = \
++PROGS ?= \
+ corender \
+ glthreads \
+ glxdemo \
+@@ -60,6 +60,11 @@
+ extra: $(EXTRA_PROGS)
+
+
++install: $(PROGS)
++ $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/bin
++ $(INSTALL) -m 755 $(PROGS) $(DESTDIR)$(INSTALL_DIR)/bin
++
++
+ clean:
+ -rm -f $(PROGS) $(EXTRA_PROGS)
+ -rm -f *.o *~
+Index: mesa/progs/Makefile
+===================================================================
+--- mesa.orig/progs/Makefile 2008-07-01 15:26:56.000000000 +0300
++++ mesa/progs/Makefile 2008-07-01 15:48:07.000000000 +0300
+@@ -21,8 +21,12 @@
+ fi \
+ done
+
+-# Dummy install target
+ install:
++ @for dir in $(SUBDIRS) ; do \
++ if [ -d $$dir ] ; then \
++ (cd $$dir ; $(MAKE) install) ; \
++ fi \
++ done
+
+ clean:
+ -@for dir in $(SUBDIRS) tests ; do \
diff --git a/debian/patches/04_osmesa_version.diff b/debian/patches/04_osmesa_version.diff
new file mode 100644
index 0000000000..573439702c
--- /dev/null
+++ b/debian/patches/04_osmesa_version.diff
@@ -0,0 +1,22 @@
+Index: mesa/src/mesa/drivers/osmesa/Makefile
+===================================================================
+--- mesa.orig/src/mesa/drivers/osmesa/Makefile 2008-09-12 10:44:02.000000000 +0300
++++ mesa/src/mesa/drivers/osmesa/Makefile 2008-09-23 16:07:40.000000000 +0300
+@@ -46,7 +46,7 @@
+
+ $(TOP)/lib/$(OSMESA_LIB_NAME): $(OBJECTS)
+ $(MKLIB) -o $(OSMESA_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
+- -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
++ -major 6 -minor 5 -patch 3 \
+ -install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
+ -id $(INSTALL_LIB_DIR)/lib$(OSMESA_LIB).$(MESA_MAJOR).dylib \
+ $(OSMESA_LIB_DEPS) $(OBJECTS)
+@@ -58,7 +58,7 @@
+ # with all the other Mesa sources (compiled with -DCHAN_BITS=16/32
+ osmesa16: $(OBJECTS) $(CORE_MESA)
+ $(MKLIB) -o $(OSMESA_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
+- -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
++ -major 6 -minor 5 -patch 3 \
+ -install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
+ -id $(INSTALL_LIB_DIR)/lib$(OSMESA_LIB).$(MESA_MAJOR).dylib \
+ $(OSMESA_LIB_DEPS) $(OBJECTS) $(CORE_MESA)
diff --git a/debian/patches/101_ubuntu_hidden_glname.patch b/debian/patches/101_ubuntu_hidden_glname.patch
new file mode 100644
index 0000000000..1d1d066c7e
--- /dev/null
+++ b/debian/patches/101_ubuntu_hidden_glname.patch
@@ -0,0 +1,12 @@
+Index: mesa-6.5.2/src/mesa/x86/glapi_x86.S
+===================================================================
+--- mesa-6.5.2.orig/src/mesa/x86/glapi_x86.S 2006-11-04 01:44:40.000000000 +0200
++++ mesa-6.5.2/src/mesa/x86/glapi_x86.S 2007-02-09 20:25:45.000000000 +0200
+@@ -139,7 +139,6 @@
+
+ ALIGNTEXT16
+ GLOBL GLNAME(gl_dispatch_functions_start)
+- HIDDEN(GLNAME(gl_dispatch_functions_start))
+ GLNAME(gl_dispatch_functions_start):
+
+ GL_STUB(NewList, _gloffset_NewList, NewList@8)
diff --git a/debian/patches/102_dont_vblank.patch b/debian/patches/102_dont_vblank.patch
new file mode 100644
index 0000000000..99000f2f81
--- /dev/null
+++ b/debian/patches/102_dont_vblank.patch
@@ -0,0 +1,13 @@
+diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
+index 5233e58..5dded4b 100644
+--- a/src/mesa/drivers/dri/intel/intel_screen.c
++++ b/src/mesa/drivers/dri/intel/intel_screen.c
+@@ -55,7 +55,7 @@ PUBLIC const char __driConfigOptions[] =
+ DRI_CONF_BEGIN
+ DRI_CONF_SECTION_PERFORMANCE
+ DRI_CONF_FTHROTTLE_MODE(DRI_CONF_FTHROTTLE_IRQS)
+- DRI_CONF_VBLANK_MODE(DRI_CONF_VBLANK_ALWAYS_SYNC)
++ DRI_CONF_VBLANK_MODE(DRI_CONF_VBLANK_DEF_INTERVAL_0)
+ /* Options correspond to DRI_CONF_BO_REUSE_DISABLED,
+ * DRI_CONF_BO_REUSE_ALL
+ */
diff --git a/debian/patches/103_fix-crash-in-i830_emit_state.dpatch b/debian/patches/103_fix-crash-in-i830_emit_state.dpatch
new file mode 100644
index 0000000000..736cdf0c53
--- /dev/null
+++ b/debian/patches/103_fix-crash-in-i830_emit_state.dpatch
@@ -0,0 +1,23 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 103_fix-crash-in-i830_emit_state.dpatch by Chris Coulson <chrisccoulson@googlemail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: This patch fixes a crash in i830_emit_state.
+## DP: Upstream commit - 48c29b60a899877c76d643b9cd06d5277cd97b9c
+## DP: Upstream bug report - https://bugs.freedesktop.org/show_bug.cgi?id=17766
+## DP: Ubuntu bug report - https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/277709
+
+@DPATCH@
+diff -urNad mesa-7.2~/src/mesa/drivers/dri/i915/i830_vtbl.c mesa-7.2/src/mesa/drivers/dri/i915/i830_vtbl.c
+--- mesa-7.2~/src/mesa/drivers/dri/i915/i830_vtbl.c 2008-08-25 15:49:40.000000000 +0100
++++ mesa-7.2/src/mesa/drivers/dri/i915/i830_vtbl.c 2008-10-21 17:43:44.000000000 +0100
+@@ -444,7 +444,8 @@
+ ret = 0;
+ if (dirty & I830_UPLOAD_BUFFERS) {
+ ret |= dri_bufmgr_check_aperture_space(state->draw_region->buffer);
+- ret |= dri_bufmgr_check_aperture_space(state->depth_region->buffer);
++ if (state->depth_region)
++ ret |= dri_bufmgr_check_aperture_space(state->depth_region->buffer);
+ }
+
+ for (i = 0; i < I830_TEX_UNITS; i++)
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000000..a4f71e9e95
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,7 @@
+01_disable-intel-classic-warn.diff
+02_use-ieee-fp-on-s390-and-m68k.patch
+03_optional-progs-and-install.patch
+04_osmesa_version.diff
+101_ubuntu_hidden_glname.patch
+102_dont_vblank.patch
+103_fix-crash-in-i830_emit_state.dpatch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000000..73d937ef1c
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,258 @@
+#!/usr/bin/make -f
+# debian/rules for the Debian mesa package
+# Copyright © 2006 Thierry Reding <thierry@gilfi.de>
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+unexport LDFLAGS
+
+CFLAGS = -Wall -g
+ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+ NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+ MAKEFLAGS += -j$(NUMJOBS)
+endif
+
+DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
+DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_HOST_GNU_CPU ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
+DEB_BUILD_DIR ?= $(CURDIR)/obj-$(DEB_BUILD_GNU_TYPE)
+ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
+ confflags += --build=$(DEB_HOST_GNU_TYPE)
+else
+ confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
+endif
+
+export DEB_BUILD_ARCH
+
+# choose which configurations to build
+include debian/scripts/choose-configs
+
+# build the following configurations by default
+CONFIGS = $(SWX11_GLU_CONFIGS) \
+ dri \
+ osmesa \
+ osmesa-static \
+ osmesa16 \
+ osmesa16-static \
+ osmesa32 \
+ osmesa32-static
+
+STAMP_DIR = debian/stamp
+STAMP = $(STAMP_DIR)/$(DEB_BUILD_GNU_TYPE)
+BUILD_STAMPS = $(addprefix $(STAMP)-build-, $(CONFIGS))
+INSTALL_TARGETS = $(addprefix install-, $(CONFIGS))
+
+QUILT_STAMPFN = $(STAMP_DIR)/patch
+include /usr/share/quilt/quilt.make
+
+confflags-common = \
+ --disable-glu \
+ --disable-glut \
+ --disable-glw \
+ CFLAGS="$(CFLAGS)"
+
+DRI_DRIVERS = swrast
+
+# hurd doesn't do direct rendering
+ifeq ($(DEB_HOST_ARCH_OS), hurd)
+ DIRECT_RENDERING = --disable-driglx-direct
+else
+ DIRECT_RENDERING = --enable-driglx-direct
+ DRI_DRIVERS += mach64 mga r128 r200 r300 radeon s3v savage tdfx trident
+endif
+
+ifeq ($(DEB_HOST_GNU_CPU), i486)
+ DRI_DRIVERS += i810 i915 i965 sis unichrome
+else ifeq ($(DEB_HOST_GNU_CPU), x86_64)
+ DRI_DRIVERS += i915 i965 sis unichrome
+else ifeq ($(DEB_HOST_ARCH), sparc)
+ DRI_DRIVERS += ffb
+else ifeq ($(DEB_HOST_ARCH), lpia)
+ DRI_DRIVERS = i915 i965
+endif
+
+confflags-dri = \
+ --with-driver=dri \
+ --with-dri-drivers="$(DRI_DRIVERS)" \
+ --with-demos=xdemos \
+ --libdir=/usr/lib/glx \
+ --with-dri-driverdir=/usr/lib/dri \
+ --enable-glx-tls \
+ $(DIRECT_RENDERING) \
+ $(confflags-common)
+
+confflags-osmesa = \
+ --with-driver=osmesa \
+ --with-demos= \
+ $(confflags-common)
+
+confflags-osmesa-static = \
+ --with-driver=osmesa \
+ --enable-static \
+ --with-demos= \
+ $(confflags-common)
+
+confflags-osmesa16 = \
+ --with-driver=osmesa \
+ --with-osmesa-bits=16 \
+ --with-demos= \
+ $(confflags-common)
+
+confflags-osmesa16-static = \
+ --with-driver=osmesa \
+ --with-osmesa-bits=16 \
+ --enable-static \
+ --with-demos= \
+ $(confflags-common)
+
+confflags-osmesa32 = \
+ --with-driver=osmesa \
+ --with-osmesa-bits=32 \
+ --with-demos= \
+ $(confflags-common)
+
+confflags-osmesa32-static = \
+ --with-driver=osmesa \
+ --with-osmesa-bits=32 \
+ --enable-static \
+ --with-demos= \
+ $(confflags-common)
+
+confflags-swx11+glu = \
+ --with-driver=xlib \
+ --disable-gl-osmesa \
+ --with-demos= \
+ --disable-glut \
+ --disable-glw \
+ CFLAGS="$(CFLAGS)"
+
+confflags-swx11+glu-static = \
+ --with-driver=xlib \
+ --disable-gl-osmesa \
+ --enable-static \
+ --with-demos= \
+ --disable-glut \
+ --disable-glw \
+ CFLAGS="$(CFLAGS)"
+
+confflags-swx11+glu-i386-i686 = \
+ --with-driver=xlib \
+ --disable-gl-osmesa \
+ --with-demos= \
+ --disable-glut \
+ --disable-glw \
+ --libdir=/usr/lib/i686/cmov \
+ CFLAGS="$(CFLAGS) -march=i686"
+
+configure: $(QUILT_STAMPFN) configure.ac
+ autoreconf -vfi
+
+# list the configurations that will built
+configs:
+ @echo Building the following configurations: $(CONFIGS)
+
+$(STAMP_DIR)/stamp:
+ dh_testdir
+ mkdir -p $(STAMP_DIR)
+ >$@
+
+$(QUILT_STAMPFN): $(STAMP_DIR)/stamp
+
+build: $(BUILD_STAMPS)
+
+$(STAMP)-build-%: configure
+ dh_testdir
+
+ mkdir -p $(DEB_BUILD_DIR)/$*
+ find $(CURDIR)/* -maxdepth 0 -not -path '$(DEB_BUILD_DIR)*' | \
+ xargs cp -rlf -t $(DEB_BUILD_DIR)/$*
+ cd $(DEB_BUILD_DIR)/$* && \
+ ../../configure --prefix=/usr --mandir=\$${prefix}/share/man \
+ --infodir=\$${prefix}/share/info --sysconfdir=/etc \
+ --localstatedir=/var $(confflags) $(confflags-$*)
+ cd $(DEB_BUILD_DIR)/$* && $(MAKE)
+
+ touch $@
+
+install:
+ # Add here commands to install the package into debian/tmp
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ $(MAKE) -f debian/rules $(INSTALL_TARGETS)
+
+install-%: $(STAMP)-build-%
+ cd $(DEB_BUILD_DIR)/$* && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
+ mkdir -p debian/tmp/etc/X11/Xsession.d
+ cp debian/Xsession.d_65mesa-check-x86-64 \
+ debian/tmp/etc/X11/Xsession.d/65mesa-check-x86-64
+ touch $@
+
+clean: unpatch
+ dh_testdir
+ dh_testroot
+ rm -rf .pc
+
+ rm -f config.cache config.log config.status
+ rm -f */config.cache */config.log */config.status
+ rm -f conftest* */conftest*
+ rm -rf autom4te.cache */autom4te.cache
+ rm -rf obj-*
+ rm -rf configure config.guess config.sub config.h.in
+ rm -rf $$(find -name Makefile.in)
+ rm -rf aclocal.m4 missing depcomp install-sh ltmain.sh
+ rm -rf $(STAMP_DIR)
+
+ dh_clean
+
+# Build architecture-independent files here.
+binary-indep: install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs -i
+ dh_installdocs -i
+ dh_installexamples -i
+ dh_install --sourcedir=debian/tmp --list-missing -i
+ dh_installman -i
+ dh_link -i
+ dh_compress -i
+ dh_fixperms -i
+ dh_installdeb -i
+ dh_gencontrol -i
+ dh_md5sums -i
+ dh_builddeb -i
+
+# Build architecture-dependent files here.
+binary-arch: install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs -s
+ dh_installdocs -s
+ dh_installexamples -s
+ dh_install -s --sourcedir=debian/tmp --list-missing
+ dh_installman -s
+ dh_link -s
+ dh_strip -plibgl1-mesa-swx11 --dbg-package=libgl1-mesa-swx11-dbg
+ dh_strip -plibgl1-mesa-glx --dbg-package=libgl1-mesa-glx-dbg
+ dh_strip -plibgl1-mesa-dri --dbg-package=libgl1-mesa-dri-dbg
+ dh_strip -s
+ dh_compress -s
+ dh_fixperms -s
+ dh_makeshlibs -s
+ dh_installdeb -s
+ dh_shlibdeps -s
+ dh_gencontrol -s
+ dh_md5sums -s
+ dh_builddeb -s -- -Zlzma
+
+binary: binary-indep binary-arch
+.PHONY: configs build clean binary-indep binary-arch binary install
diff --git a/debian/scripts/choose-configs b/debian/scripts/choose-configs
new file mode 100644
index 0000000000..96050ecadc
--- /dev/null
+++ b/debian/scripts/choose-configs
@@ -0,0 +1,58 @@
+# Script to choose which configurations are to be built depending on the value
+# of the DEB_BUILD_ARCH variable.
+#
+# Copyright © 2006 Thierry Reding <thierry@gilfi.de>
+
+##############################################################################
+## architecture-specific configurations ######################################
+
+# choose an architecture-specific build of swx11 and GLU if a matching
+# configuration exists
+#ifneq ($(wildcard configs/debian-swx11+glu-$(DEB_BUILD_ARCH)),)
+# SWX11_GLU_CONFIGS := debian-swx11+glu-$(DEB_BUILD_ARCH)
+#else
+# SWX11_GLU_CONFIGS := debian-swx11+glu-any
+#endif
+
+# same for static builds
+#ifneq ($(wildcard configs/debian-swx11+glu-static-$(DEB_BUILD_ARCH)),)
+# SWX11_GLU_CONFIGS += debian-swx11+glu-static-$(DEB_BUILD_ARCH)
+#else
+# SWX11_GLU_CONFIGS += debian-swx11+glu-static-any
+#endif
+
+SWX11_GLU_CONFIGS := swx11+glu swx11+glu-static
+
+# and for the GLX/DRI-enabled libGL
+ifneq ($(wildcard configs/debian-indirect-$(DEB_BUILD_ARCH)),)
+ DRI_CONFIGS := debian-indirect-$(DEB_BUILD_ARCH)
+else
+ ifneq ($(wildcard configs/debian-dri-$(DEB_BUILD_ARCH)),)
+ DRI_CONFIGS := debian-dri-$(DEB_BUILD_ARCH)
+ else
+ DRI_CONFIGS := debian-dri-any
+ endif
+endif
+
+##############################################################################
+## CPU-optimized configurations ##############################################
+
+ifeq ($(DEB_BUILD_ARCH), i386)
+ SWX11_GLU_CONFIGS += swx11+glu-i386-i686
+# DRI_CONFIGS += debian-dri-i386-i686
+endif
+
+#ifeq ($(DEB_BUILD_ARCH), alpha)
+# SWX11_GLU_CONFIGS += debian-swx11+glu-alpha-ev5
+#endif
+
+#ifeq ($(DEB_BUILD_ARCH), powerpc)
+# SWX11_GLU_CONFIGS += debian-swx11+glu-powerpc-603
+#endif
+
+#ifeq ($(DEB_BUILD_ARCH), sparc)
+# SWX11_GLU_CONFIGS += debian-swx11+glu-sparc-ultrasparc
+#endif
+
+# vim: ft=make
+
diff --git a/debian/scripts/install-source.sh b/debian/scripts/install-source.sh
new file mode 100644
index 0000000000..5b1dcfb057
--- /dev/null
+++ b/debian/scripts/install-source.sh
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+if [ -n "$1" ]; then
+ TOP="$1"
+else
+ TOP=`pwd`
+fi
+
+SOURCE_DIRS='
+ include/GL/internal
+ src/glx/x11
+ src/mesa/drivers/common
+ src/mesa/drivers/dri/common
+ src/mesa/drivers/dri/glcore
+ src/mesa/drivers/x11
+ src/mesa/glapi
+ src/mesa/main
+ src/mesa/math
+ src/mesa/ppc
+ src/mesa/shader
+ src/mesa/sparc
+ src/mesa/swrast_setup
+ src/mesa/swrast
+ src/mesa/tnl_dd
+ src/mesa/tnl
+ src/mesa/vbo
+ src/mesa/x86-64
+ src/mesa/x86
+'
+
+FILTER="-not -path '*/.svn*'"
+TARGET=${TOP}/debian/tmp/usr/share/mesa-source
+
+(
+ find $SOURCE_DIRS $FILTER -name '*.[ch]';
+ find include/GL $FILTER -name 'xmesa*.h';
+) | \
+ while read x; do
+ DIRNAME=`dirname "$x"`
+ mkdir -p "$TARGET/$DIRNAME"
+ cp -lf "$x" "$TARGET/$DIRNAME"
+ done
+
+# fix permissions
+find "$TARGET" -type f | xargs chmod 0644
+
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000000..75441ad9de
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://sf.net/mesa3d/MesaLib-(.*)\.tar\.gz
diff --git a/docs/gears.png b/docs/gears.png
deleted file mode 100644
index 4052b30ed0..0000000000
--- a/docs/gears.png
+++ /dev/null
Binary files differ
diff --git a/doxygen/.gitignore b/doxygen/.gitignore
deleted file mode 100644
index 1b0edf90a6..0000000000
--- a/doxygen/.gitignore
+++ /dev/null
@@ -1,15 +0,0 @@
-*.tag
-agpgart
-array_cache
-core
-core_subset
-math
-math_subset
-miniglx
-radeon_subset
-radeondrm
-radeonfb
-swrast
-swrast_setup
-tnl
-tnl_dd
diff --git a/doxygen/Makefile b/doxygen/Makefile
deleted file mode 100644
index 15ade4043b..0000000000
--- a/doxygen/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-
-default: full
-
-all: full subset
-
-%.tag: %.doxy
- doxygen $<
-
-FULL = \
- main.doxy \
- math.doxy \
- vbo.doxy \
- glapi.doxy \
- shader.doxy \
- swrast.doxy \
- swrast_setup.doxy \
- tnl.doxy \
- tnl_dd.doxy
-
-full: $(FULL:.doxy=.tag)
- $(foreach FILE,$(FULL),doxygen $(FILE);)
-
-SUBSET = \
- main.doxy \
- math.doxy \
- miniglx.doxy
-
-subset: $(SUBSET:.doxy=.tag)
- $(foreach FILE,$(SUBSET),doxygen $(FILE);)
-
-clean:
- -rm -rf $(FULL:.doxy=) $(SUBSET:.doxy=)
- -rm -rf *.tag
diff --git a/doxygen/README b/doxygen/README
deleted file mode 100644
index 9b820041d1..0000000000
--- a/doxygen/README
+++ /dev/null
@@ -1,10 +0,0 @@
-
-This directory is for doxygen (a source code documentation system).
-
-See http://www.doxygen.org/ for more info.
-
-Either run 'make' (Unix) or 'doxy.bat' (Windows) to run doxygen
-and generate souce code documentation.
-
-Then, load either doxygen/main/index.html or doxygen/core_subset/index.html into
-your web browser.
diff --git a/doxygen/common.doxy b/doxygen/common.doxy
deleted file mode 100644
index 48f0c95d6d..0000000000
--- a/doxygen/common.doxy
+++ /dev/null
@@ -1,1153 +0,0 @@
-# Doxyfile 1.3.8
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-# TAG = value [value, ...]
-# For lists items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
-# by quotes) that should identify the project.
-
-PROJECT_NAME = Mesa
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
-
-PROJECT_NUMBER = 6.5
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY =
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of source
-# files, where putting all generated files in the same directory would otherwise
-# cause performance problems for the file system.
-
-CREATE_SUBDIRS = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish,
-# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese,
-# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish,
-# Swedish, and Ukrainian.
-
-OUTPUT_LANGUAGE = English
-
-# This tag can be used to specify the encoding used in the generated output.
-# The encoding is not always determined by the language that is chosen,
-# but also whether or not the output is meant for Windows or non-Windows users.
-# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES
-# forces the Windows encoding (this is the default for the Windows binary),
-# whereas setting the tag to NO uses a Unix-style encoding (the default for
-# all platforms other than Windows).
-
-USE_WINDOWS_ENCODING = NO
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is used
-# as the annotated text. Otherwise, the brief description is used as-is. If left
-# blank, the following values are used ("$name" is automatically replaced with the
-# name of the entity): "The $name class" "The $name widget" "The $name file"
-# "is" "provides" "specifies" "contains" "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF =
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited
-# members of a class in the documentation of that class as if those members were
-# ordinary class members. Constructors, destructors and assignment operators of
-# the base classes will not be shown.
-
-INLINE_INHERITED_MEMB = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip.
-
-STRIP_FROM_PATH =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful is your file systems
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like the Qt-style comments (thus requiring an
-# explicit @brief command for a brief description.
-
-JAVADOC_AUTOBRIEF = YES
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the DETAILS_AT_TOP tag is set to YES then Doxygen
-# will output the detailed description near the top, like JavaDoc.
-# If set to NO, the detailed description appears after the member
-# documentation.
-
-DETAILS_AT_TOP = YES
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
-INHERIT_DOCS = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE = 8
-
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
-# only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C = YES
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources
-# only. Doxygen will then generate output that is more tailored for Java.
-# For instance, namespaces will be presented as packages, qualified scopes
-# will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
-SUBGROUPING = YES
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL = YES
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
-
-EXTRACT_PRIVATE = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
-
-EXTRACT_STATIC = YES
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES = YES
-
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS = NO
-
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
-
-SHOW_INCLUDE_FILES = YES
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
-
-INLINE_INFO = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
-
-SORT_MEMBER_DOCS = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
-
-SORT_BRIEF_DOCS = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
-
-GENERATE_TODOLIST = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
-
-GENERATE_TESTLIST = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
-
-GENERATE_BUGLIST = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or define consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and defines in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
-WARNINGS = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR = YES
-
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text.
-
-WARN_FORMAT = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
-
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
-
-INPUT =
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp
-# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm
-
-FILE_PATTERNS =
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
-
-RECURSIVE = NO
-
-# The EXCLUDE tag can be used to specify files and/or directories that should
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE =
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories
-# that are symbolic links (a Unix filesystem feature) are excluded from the input.
-
-EXCLUDE_SYMLINKS = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories.
-
-EXCLUDE_PATTERNS =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
-
-EXAMPLE_PATH =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
-
-EXAMPLE_PATTERNS =
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
-
-IMAGE_PATH =
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command <filter> <input-file>, where <filter>
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output. If FILTER_PATTERNS is specified, this tag will be
-# ignored.
-
-INPUT_FILTER =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis. Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match. The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
-# is applied to all files.
-
-FILTER_PATTERNS =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES (the default)
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = YES
-
-# If the REFERENCES_RELATION tag is set to YES (the default)
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION = YES
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX = NO
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX = 5
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
-
-GENERATE_HTML = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header.
-
-HTML_HEADER = header.html
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
-
-HTML_FOOTER =
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET =
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-# files or namespaces will be aligned in HTML using tables. If set to
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS = YES
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND = NO
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it.
-
-DISABLE_INDEX = NO
-
-# This tag can be used to set the number of enum values (range [1..20])
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE = 4
-
-# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
-# generated containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
-# probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW = NO
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
-TREEVIEW_WIDTH = 250
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
-
-GENERATE_LATEX = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-
-LATEX_CMD_NAME = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
-
-MAKEINDEX_CMD_NAME = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_LATEX = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, a4wide, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS = NO
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
-# higher quality PDF documentation.
-
-USE_PDFLATEX = NO
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
-
-LATEX_HIDE_INDICES = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_RTF = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT = man
-
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD =
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
-GENERATE_PERLMOD = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader. This is useful
-# if you want to understand what is going on. On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
-
-ENABLE_PREPROCESSING = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_PREDEFINED tags.
-
-EXPAND_ONLY_PREDEF = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
-
-INCLUDE_PATH = ../include
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
-
-INCLUDE_FILE_PATTERNS =
-
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed.
-
-PREDEFINED =
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all function-like macros that are alone
-# on a line, have an all uppercase name, and do not end with a semicolon. Such
-# function macros are typically used for boiler-plate code, and will confuse the
-# parser if not removed.
-
-SKIP_FUNCTION_MACROS = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles.
-# Optionally an initial location of the external documentation
-# can be added for each tagfile. The format of a tag file without
-# this location is as follows:
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths or
-# URLs. If a location is present for each tag, the installdox tool
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE =
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
-ALLEXTERNALS = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
-EXTERNAL_GROUPS = NO
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or
-# super classes. Setting the tag to NO turns the diagrams off. Note that this
-# option is superseded by the HAVE_DOT option below. This is only a fallback. It is
-# recommended to install and use dot, since it yields more powerful graphs.
-
-CLASS_DIAGRAMS = YES
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT = NO
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
-UML_LOOK = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
-INCLUDE_GRAPH = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH = YES
-
-# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will
-# generate a call dependency graph for every global function or class method.
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable call graphs for selected
-# functions only using the \callgraph command.
-
-CALL_GRAPH = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found on the path.
-
-DOT_PATH =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
-
-DOTFILE_DIRS =
-
-# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than
-# this value, doxygen will try to truncate the graph, so that it fits within
-# the specified constraint. Beware that most browsers cannot cope with very
-# large images.
-
-MAX_DOT_GRAPH_WIDTH = 1024
-
-# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than
-# this value, doxygen will try to truncate the graph, so that it fits within
-# the specified constraint. Beware that most browsers cannot cope with very
-# large images.
-
-MAX_DOT_GRAPH_HEIGHT = 1024
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes that
-# lay further from the root node will be omitted. Note that setting this option to
-# 1 or 2 may greatly reduce the computation time needed for large code bases. Also
-# note that a graph may be further truncated if the graph's image dimensions are
-# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT).
-# If 0 is used for the depth value (the default), the graph is not depth-constrained.
-
-MAX_DOT_GRAPH_DEPTH = 0
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
-DOT_CLEANUP = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine
-#---------------------------------------------------------------------------
-
-# The SEARCHENGINE tag specifies whether or not a search engine should be
-# used. If set to NO the values of all tags below this one will be ignored.
-
-SEARCHENGINE = NO
diff --git a/doxygen/core_subset.doxy b/doxygen/core_subset.doxy
deleted file mode 100644
index 35faf565dc..0000000000
--- a/doxygen/core_subset.doxy
+++ /dev/null
@@ -1,226 +0,0 @@
-# Doxyfile 0.1
-
-#---------------------------------------------------------------------------
-# General configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = "Mesa Main"
-PROJECT_NUMBER =
-OUTPUT_DIRECTORY =
-OUTPUT_LANGUAGE = English
-EXTRACT_ALL = NO
-EXTRACT_PRIVATE = NO
-EXTRACT_STATIC = YES
-EXTRACT_LOCAL_CLASSES = YES
-HIDE_UNDOC_MEMBERS = NO
-HIDE_UNDOC_CLASSES = NO
-BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = YES
-ALWAYS_DETAILED_SEC = NO
-INLINE_INHERITED_MEMB = NO
-FULL_PATH_NAMES = NO
-STRIP_FROM_PATH =
-INTERNAL_DOCS = YES
-STRIP_CODE_COMMENTS = YES
-CASE_SENSE_NAMES = YES
-SHORT_NAMES = NO
-HIDE_SCOPE_NAMES = NO
-VERBATIM_HEADERS = YES
-SHOW_INCLUDE_FILES = YES
-JAVADOC_AUTOBRIEF = NO
-INHERIT_DOCS = YES
-INLINE_INFO = YES
-SORT_MEMBER_DOCS = NO
-DISTRIBUTE_GROUP_DOC = NO
-TAB_SIZE = 8
-GENERATE_TODOLIST = YES
-GENERATE_TESTLIST = YES
-GENERATE_BUGLIST = YES
-ALIASES =
-ENABLED_SECTIONS = subset
-MAX_INITIALIZER_LINES = 30
-OPTIMIZE_OUTPUT_FOR_C = NO
-SHOW_USED_FILES = YES
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = YES
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = NO
-WARN_FORMAT =
-WARN_LOGFILE =
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = ../src/mesa/main/
-FILE_PATTERNS = \
- accum.h \
- attrib.h \
- blend.[ch] \
- buffers.[ch] \
- dd.h \
- debug.h \
- depth.h \
- dlist.h \
- context.[ch] \
- config.h \
- colormac.h \
- colortab.h \
- enable.h \
- enums.h \
- eval.h \
- extensions.h \
- feedback.[ch] \
- fog.h \
- get.h \
- glheader.h \
- glthread.h \
- hash.[ch] \
- hint.h \
- histogram.h \
- image.[ch] \
- imports.[ch] \
- lines.[ch] \
- light.h \
- matrix.[ch] \
- macros.h \
- mmath.h \
- mtypes.h \
- pixel.h \
- points.[ch] \
- polygon.[ch] \
- rastpos.[ch] \
- simple_list.h \
- state.[ch] \
- stencil.[ch] \
- subset_*.c \
- texformat.h \
- teximage.h \
- texstate.h \
- texstore.h \
- texobj.[ch] \
- texutil_tmp.h \
- varray.h
-RECURSIVE = NO
-EXCLUDE =
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_SOURCE_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = YES
-INLINE_SOURCES = NO
-REFERENCED_BY_RELATION = YES
-REFERENCES_RELATION = YES
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX = NO
-COLS_IN_ALPHA_INDEX = 5
-IGNORE_PREFIX =
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML = YES
-HTML_OUTPUT = core_subset
-HTML_HEADER = header_subset.html
-HTML_FOOTER =
-HTML_STYLESHEET =
-HTML_ALIGN_MEMBERS = YES
-GENERATE_HTMLHELP = NO
-GENERATE_CHI = NO
-BINARY_TOC = NO
-TOC_EXPAND = NO
-DISABLE_INDEX = NO
-ENUM_VALUES_PER_LINE = 4
-GENERATE_TREEVIEW = NO
-TREEVIEW_WIDTH = 250
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX = NO
-LATEX_OUTPUT =
-COMPACT_LATEX = NO
-PAPER_TYPE = a4wide
-EXTRA_PACKAGES =
-LATEX_HEADER =
-PDF_HYPERLINKS = NO
-USE_PDFLATEX = NO
-LATEX_BATCHMODE = NO
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF = NO
-RTF_OUTPUT =
-COMPACT_RTF = NO
-RTF_HYPERLINKS = NO
-RTF_STYLESHEET_FILE =
-RTF_EXTENSIONS_FILE =
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN = NO
-MAN_OUTPUT =
-MAN_EXTENSION =
-MAN_LINKS = NO
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML = NO
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF = NO
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = NO
-EXPAND_ONLY_PREDEF = NO
-SEARCH_INCLUDES = YES
-INCLUDE_PATH = ../include/
-INCLUDE_FILE_PATTERNS =
-PREDEFINED =
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration::addtions related to external references
-#---------------------------------------------------------------------------
-TAGFILES = \
- math_subset.tag=../math_subset \
- miniglx.tag=../miniglx
-GENERATE_TAGFILE = core_subset.tag
-ALLEXTERNALS = NO
-PERL_PATH =
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS = NO
-HAVE_DOT = NO
-CLASS_GRAPH = YES
-COLLABORATION_GRAPH = YES
-TEMPLATE_RELATIONS = YES
-HIDE_UNDOC_RELATIONS = YES
-INCLUDE_GRAPH = YES
-INCLUDED_BY_GRAPH = YES
-GRAPHICAL_HIERARCHY = YES
-DOT_PATH =
-DOTFILE_DIRS =
-MAX_DOT_GRAPH_WIDTH = 1024
-MAX_DOT_GRAPH_HEIGHT = 1024
-GENERATE_LEGEND = YES
-DOT_CLEANUP = YES
-#---------------------------------------------------------------------------
-# Configuration::addtions related to the search engine
-#---------------------------------------------------------------------------
-SEARCHENGINE = NO
-CGI_NAME =
-CGI_URL =
-DOC_URL =
-DOC_ABSPATH =
-BIN_ABSPATH =
-EXT_DOC_PATHS =
diff --git a/doxygen/doxy.bat b/doxygen/doxy.bat
deleted file mode 100644
index 331b931928..0000000000
--- a/doxygen/doxy.bat
+++ /dev/null
@@ -1,19 +0,0 @@
-doxygen tnl_dd.doxy
-doxygen vbo.doxy
-doxygen math.doxy
-doxygen swrast.doxy
-doxygen swrast_setup.doxy
-doxygen tnl.doxy
-doxygen core.doxy
-doxygen glapi.doxy
-doxygen shader.doxy
-
-echo Building again, to resolve tags
-doxygen tnl_dd.doxy
-doxygen vbo.doxy
-doxygen math.doxy
-doxygen swrast.doxy
-doxygen swrast_setup.doxy
-doxygen tnl.doxy
-doxygen glapi.doxy
-doxygen shader.doxy
diff --git a/doxygen/glapi.doxy b/doxygen/glapi.doxy
deleted file mode 100644
index 3290f8455a..0000000000
--- a/doxygen/glapi.doxy
+++ /dev/null
@@ -1,49 +0,0 @@
-# Doxyfile 0.1
-
-@INCLUDE = common.doxy
-
-#---------------------------------------------------------------------------
-# General configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = "Mesa GL API dispatcher"
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = ../src/mesa/glapi/
-FILE_PATTERNS = *.c *.h
-RECURSIVE = NO
-EXCLUDE =
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_SOURCE_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-HTML_OUTPUT = glapi
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = NO
-EXPAND_ONLY_PREDEF = NO
-SEARCH_INCLUDES = YES
-INCLUDE_PATH = ../include/
-INCLUDE_FILE_PATTERNS =
-PREDEFINED =
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration::addtions related to external references
-#---------------------------------------------------------------------------
-TAGFILES = main.tag=../core \
- math.tag=../math \
- tnl_dd.tag=../tnl_dd \
- swrast.tag=../swrast \
- swrast_setup.tag=../swrast_setup \
- tnl.tag=../tnl \
- vbo.tag=vbo
-GENERATE_TAGFILE = swrast.tag
diff --git a/doxygen/header.html b/doxygen/header.html
deleted file mode 100644
index 378dc9490c..0000000000
--- a/doxygen/header.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<html>
-<head>
-<title>Mesa Source Code Documentation</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css">
-</head>
-<body>
-<div class="qindex">
-<a class="qindex" href="../main/index.html">core</a> |
-<a class="qindex" href="../glapi/index.html">glapi</a> |
-<a class="qindex" href="../vbo/index.html">vbo</a> |
-<a class="qindex" href="../math/index.html">math</a> |
-<a class="qindex" href="../shader/index.html">shader</a> |
-<a class="qindex" href="../swrast/index.html">swrast</a> |
-<a class="qindex" href="../swrast_setup/index.html">swrast_setup</a> |
-<a class="qindex" href="../tnl/index.html">tnl</a> |
-<a class="qindex" href="../tnl_dd/index.html">tnl_dd</a>
-</div>
diff --git a/doxygen/header_subset.html b/doxygen/header_subset.html
deleted file mode 100644
index f9a698db84..0000000000
--- a/doxygen/header_subset.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html>
-<head><title>Mesa Source Code Documentation</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css">
-</head>
-<body>
-<div class="qindex">
-<a class="qindex" href="../core_subset/index.html">Mesa Core</a> |
-<a class="qindex" href="../math_subset/index.html">math</a> |
-<a class="qindex" href="../miniglx/index.html">MiniGLX</a> |
-<a class="qindex" href="../radeon_subset/index.html">radeon_subset</a>
-</div>
diff --git a/doxygen/main.doxy b/doxygen/main.doxy
deleted file mode 100644
index 416b4338e8..0000000000
--- a/doxygen/main.doxy
+++ /dev/null
@@ -1,50 +0,0 @@
-# Doxyfile 0.1
-
-@INCLUDE = common.doxy
-
-#---------------------------------------------------------------------------
-# General configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = "Mesa Main"
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = ../src/mesa/main/
-FILE_PATTERNS = *.c *.h
-RECURSIVE = NO
-EXCLUDE = ../src/glapitemp.h ../src/glapioffsets.h
-EXCLUDE_PATTERNS = subset_*
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_SOURCE_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-HTML_OUTPUT = main
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = YES
-EXPAND_ONLY_PREDEF = YES
-SEARCH_INCLUDES = YES
-INCLUDE_PATH = ../include/
-INCLUDE_FILE_PATTERNS =
-PREDEFINED = _HAVE_FULL_GL=1
-EXPAND_AS_DEFINED = _glthread_DECLARE_STATIC_MUTEX
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration::addtions related to external references
-#---------------------------------------------------------------------------
-TAGFILES = tnl_dd.tag=../tnl_dd \
- vbo.tag=../vbo \
- glapi.tag=../glapi \
- math.tag=../math \
- shader.tag=../shader \
- swrast.tag=../swrast \
- swrast_setup.tag=../swrast_setup \
- tnl.tag=../tnl
-GENERATE_TAGFILE = main.tag
diff --git a/doxygen/math.doxy b/doxygen/math.doxy
deleted file mode 100644
index 388af40fe5..0000000000
--- a/doxygen/math.doxy
+++ /dev/null
@@ -1,49 +0,0 @@
-# Doxyfile 0.1
-
-@INCLUDE = common.doxy
-
-#---------------------------------------------------------------------------
-# General configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = "Mesa math module"
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = ../src/mesa/math/
-FILE_PATTERNS = *.c \
- *.h
-RECURSIVE = NO
-EXCLUDE =
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_SOURCE_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-HTML_OUTPUT = math
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = NO
-EXPAND_ONLY_PREDEF = NO
-SEARCH_INCLUDES = YES
-INCLUDE_PATH =
-INCLUDE_FILE_PATTERNS =
-PREDEFINED =
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration::addtions related to external references
-#---------------------------------------------------------------------------
-TAGFILES = tnl_dd.tag=../tnl_dd \
- main.tag=../core \
- swrast.tag=../swrast \
- swrast_setup.tag=../swrast_setup \
- tnl.tag=../tnl \
- vbo.tag=../vbo
-GENERATE_TAGFILE = math.tag
diff --git a/doxygen/math_subset.doxy b/doxygen/math_subset.doxy
deleted file mode 100644
index 9f6e95ff62..0000000000
--- a/doxygen/math_subset.doxy
+++ /dev/null
@@ -1,177 +0,0 @@
-# Doxyfile 0.1
-
-#---------------------------------------------------------------------------
-# General configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = "Mesa math module"
-PROJECT_NUMBER =
-OUTPUT_DIRECTORY = .
-OUTPUT_LANGUAGE = English
-EXTRACT_ALL = NO
-EXTRACT_PRIVATE = NO
-EXTRACT_STATIC = YES
-EXTRACT_LOCAL_CLASSES = YES
-HIDE_UNDOC_MEMBERS = NO
-HIDE_UNDOC_CLASSES = NO
-BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = YES
-ALWAYS_DETAILED_SEC = NO
-INLINE_INHERITED_MEMB = NO
-FULL_PATH_NAMES = NO
-STRIP_FROM_PATH =
-INTERNAL_DOCS = NO
-STRIP_CODE_COMMENTS = YES
-CASE_SENSE_NAMES = YES
-SHORT_NAMES = NO
-HIDE_SCOPE_NAMES = NO
-VERBATIM_HEADERS = YES
-SHOW_INCLUDE_FILES = YES
-JAVADOC_AUTOBRIEF = NO
-INHERIT_DOCS = YES
-INLINE_INFO = YES
-SORT_MEMBER_DOCS = NO
-DISTRIBUTE_GROUP_DOC = NO
-TAB_SIZE = 8
-GENERATE_TODOLIST = YES
-GENERATE_TESTLIST = YES
-GENERATE_BUGLIST = YES
-ALIASES =
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 30
-OPTIMIZE_OUTPUT_FOR_C = YES
-SHOW_USED_FILES = YES
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = YES
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = NO
-WARN_FORMAT =
-WARN_LOGFILE =
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = ../src/mesa/math/
-FILE_PATTERNS = m_matrix.[ch]
-RECURSIVE = NO
-EXCLUDE =
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_SOURCE_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = NO
-INLINE_SOURCES = NO
-REFERENCED_BY_RELATION = YES
-REFERENCES_RELATION = YES
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX = NO
-COLS_IN_ALPHA_INDEX = 5
-IGNORE_PREFIX =
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML = YES
-HTML_OUTPUT = math_subset
-HTML_HEADER = header_subset.html
-HTML_FOOTER =
-HTML_STYLESHEET =
-HTML_ALIGN_MEMBERS = YES
-GENERATE_HTMLHELP = NO
-GENERATE_CHI = NO
-BINARY_TOC = NO
-TOC_EXPAND = NO
-DISABLE_INDEX = NO
-ENUM_VALUES_PER_LINE = 4
-GENERATE_TREEVIEW = NO
-TREEVIEW_WIDTH = 250
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX = NO
-LATEX_OUTPUT =
-COMPACT_LATEX = NO
-PAPER_TYPE = a4wide
-EXTRA_PACKAGES =
-LATEX_HEADER =
-PDF_HYPERLINKS = NO
-USE_PDFLATEX = NO
-LATEX_BATCHMODE = NO
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF = NO
-RTF_OUTPUT =
-COMPACT_RTF = NO
-RTF_HYPERLINKS = NO
-RTF_STYLESHEET_FILE =
-RTF_EXTENSIONS_FILE =
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN = NO
-MAN_OUTPUT =
-MAN_EXTENSION =
-MAN_LINKS = NO
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML = NO
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF = NO
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = NO
-EXPAND_ONLY_PREDEF = NO
-SEARCH_INCLUDES = YES
-INCLUDE_PATH =
-INCLUDE_FILE_PATTERNS =
-PREDEFINED =
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration::addtions related to external references
-#---------------------------------------------------------------------------
-TAGFILES = core_subset.tag=../core_subset
-GENERATE_TAGFILE = math_subset.tag
-ALLEXTERNALS = NO
-PERL_PATH =
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS = YES
-HAVE_DOT = NO
-CLASS_GRAPH = YES
-COLLABORATION_GRAPH = YES
-TEMPLATE_RELATIONS = YES
-HIDE_UNDOC_RELATIONS = YES
-INCLUDE_GRAPH = YES
-INCLUDED_BY_GRAPH = YES
-GRAPHICAL_HIERARCHY = YES
-DOT_PATH =
-DOTFILE_DIRS =
-MAX_DOT_GRAPH_WIDTH = 1024
-MAX_DOT_GRAPH_HEIGHT = 1024
-GENERATE_LEGEND = YES
-DOT_CLEANUP = YES
-#---------------------------------------------------------------------------
-# Configuration::addtions related to the search engine
-#---------------------------------------------------------------------------
-SEARCHENGINE = NO
-CGI_NAME =
-CGI_URL =
-DOC_URL =
-DOC_ABSPATH =
-BIN_ABSPATH =
-EXT_DOC_PATHS =
diff --git a/doxygen/miniglx.doxy b/doxygen/miniglx.doxy
deleted file mode 100644
index 61c376caf2..0000000000
--- a/doxygen/miniglx.doxy
+++ /dev/null
@@ -1,179 +0,0 @@
-# Doxyfile 0.1
-
-#---------------------------------------------------------------------------
-# General configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = "MiniGLX"
-PROJECT_NUMBER =
-OUTPUT_DIRECTORY =
-OUTPUT_LANGUAGE = English
-EXTRACT_ALL = NO
-EXTRACT_PRIVATE = NO
-EXTRACT_STATIC = YES
-EXTRACT_LOCAL_CLASSES = YES
-HIDE_UNDOC_MEMBERS = NO
-HIDE_UNDOC_CLASSES = NO
-BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = YES
-ALWAYS_DETAILED_SEC = NO
-INLINE_INHERITED_MEMB = NO
-FULL_PATH_NAMES = NO
-STRIP_FROM_PATH =
-INTERNAL_DOCS = YES
-STRIP_CODE_COMMENTS = YES
-CASE_SENSE_NAMES = YES
-SHORT_NAMES = NO
-HIDE_SCOPE_NAMES = NO
-VERBATIM_HEADERS = NO
-SHOW_INCLUDE_FILES = NO
-JAVADOC_AUTOBRIEF = NO
-INHERIT_DOCS = YES
-INLINE_INFO = YES
-SORT_MEMBER_DOCS = NO
-DISTRIBUTE_GROUP_DOC = NO
-TAB_SIZE = 8
-GENERATE_TODOLIST = YES
-GENERATE_TESTLIST = YES
-GENERATE_BUGLIST = YES
-ALIASES =
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 30
-OPTIMIZE_OUTPUT_FOR_C = NO
-SHOW_USED_FILES = YES
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = YES
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = NO
-WARN_FORMAT =
-WARN_LOGFILE =
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = ../src/glx/mini/ ../include/GL/miniglx.h
-FILE_PATTERNS = *.h *.c
-RECURSIVE = NO
-EXCLUDE = ../src/glx/mini/glapi.c
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_SOURCE_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = NO
-INLINE_SOURCES = NO
-REFERENCED_BY_RELATION = YES
-REFERENCES_RELATION = YES
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX = NO
-COLS_IN_ALPHA_INDEX = 5
-IGNORE_PREFIX =
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML = YES
-HTML_OUTPUT = miniglx
-HTML_HEADER = header_subset.html
-HTML_FOOTER =
-HTML_STYLESHEET =
-HTML_ALIGN_MEMBERS = YES
-GENERATE_HTMLHELP = NO
-GENERATE_CHI = NO
-BINARY_TOC = NO
-TOC_EXPAND = NO
-DISABLE_INDEX = NO
-ENUM_VALUES_PER_LINE = 4
-GENERATE_TREEVIEW = NO
-TREEVIEW_WIDTH = 250
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX = NO
-LATEX_OUTPUT =
-COMPACT_LATEX = NO
-PAPER_TYPE = a4wide
-EXTRA_PACKAGES =
-LATEX_HEADER =
-PDF_HYPERLINKS = NO
-USE_PDFLATEX = NO
-LATEX_BATCHMODE = NO
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF = NO
-RTF_OUTPUT =
-COMPACT_RTF = NO
-RTF_HYPERLINKS = NO
-RTF_STYLESHEET_FILE =
-RTF_EXTENSIONS_FILE =
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN = NO
-MAN_OUTPUT =
-MAN_EXTENSION =
-MAN_LINKS = NO
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML = NO
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF = NO
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = NO
-EXPAND_ONLY_PREDEF = NO
-SEARCH_INCLUDES = YES
-INCLUDE_PATH = ../include/
-INCLUDE_FILE_PATTERNS =
-PREDEFINED =
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration::addtions related to external references
-#---------------------------------------------------------------------------
-TAGFILES = \
- core_subset.tag=../core_subset \
- math_subset.tag=../math_subset
-GENERATE_TAGFILE = miniglx.tag
-ALLEXTERNALS = NO
-PERL_PATH =
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS = NO
-HAVE_DOT = NO
-CLASS_GRAPH = YES
-COLLABORATION_GRAPH = YES
-TEMPLATE_RELATIONS = YES
-HIDE_UNDOC_RELATIONS = YES
-INCLUDE_GRAPH = YES
-INCLUDED_BY_GRAPH = YES
-GRAPHICAL_HIERARCHY = YES
-DOT_PATH =
-DOTFILE_DIRS =
-MAX_DOT_GRAPH_WIDTH = 1024
-MAX_DOT_GRAPH_HEIGHT = 1024
-GENERATE_LEGEND = YES
-DOT_CLEANUP = YES
-#---------------------------------------------------------------------------
-# Configuration::addtions related to the search engine
-#---------------------------------------------------------------------------
-SEARCHENGINE = NO
-CGI_NAME =
-CGI_URL =
-DOC_URL =
-DOC_ABSPATH =
-BIN_ABSPATH =
-EXT_DOC_PATHS =
diff --git a/doxygen/radeon_subset.doxy b/doxygen/radeon_subset.doxy
deleted file mode 100644
index fb9d0e9535..0000000000
--- a/doxygen/radeon_subset.doxy
+++ /dev/null
@@ -1,203 +0,0 @@
-# Doxyfile 0.1
-
-#---------------------------------------------------------------------------
-# General configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = "Radeon Subset Driver"
-PROJECT_NUMBER =
-OUTPUT_DIRECTORY =
-OUTPUT_LANGUAGE = English
-EXTRACT_ALL = NO
-EXTRACT_PRIVATE = NO
-EXTRACT_STATIC = YES
-EXTRACT_LOCAL_CLASSES = YES
-HIDE_UNDOC_MEMBERS = NO
-HIDE_UNDOC_CLASSES = NO
-BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = YES
-ALWAYS_DETAILED_SEC = NO
-INLINE_INHERITED_MEMB = NO
-FULL_PATH_NAMES = NO
-STRIP_FROM_PATH =
-INTERNAL_DOCS = YES
-STRIP_CODE_COMMENTS = YES
-CASE_SENSE_NAMES = YES
-SHORT_NAMES = NO
-HIDE_SCOPE_NAMES = NO
-VERBATIM_HEADERS = NO
-SHOW_INCLUDE_FILES = NO
-JAVADOC_AUTOBRIEF = NO
-INHERIT_DOCS = YES
-INLINE_INFO = YES
-SORT_MEMBER_DOCS = NO
-DISTRIBUTE_GROUP_DOC = NO
-TAB_SIZE = 8
-GENERATE_TODOLIST = YES
-GENERATE_TESTLIST = YES
-GENERATE_BUGLIST = YES
-ALIASES =
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 30
-OPTIMIZE_OUTPUT_FOR_C = NO
-SHOW_USED_FILES = YES
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = YES
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = NO
-WARN_FORMAT =
-WARN_LOGFILE =
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = \
- ../src/mesa/drivers/dri/common/mm.c \
- ../src/mesa/drivers/dri/common/mm.h \
- ../src/mesa/drivers/dri/radeon/radeon_context.c \
- ../src/mesa/drivers/dri/radeon/radeon_context.h \
- ../src/mesa/drivers/dri/radeon/radeon_ioctl.c \
- ../src/mesa/drivers/dri/radeon/radeon_ioctl.h \
- ../src/mesa/drivers/dri/radeon/radeon_lock.c \
- ../src/mesa/drivers/dri/radeon/radeon_lock.h \
- ../src/mesa/drivers/dri/radeon/radeon_screen.c \
- ../src/mesa/drivers/dri/radeon/radeon_screen.h \
- ../src/mesa/drivers/dri/radeon/radeon_state.c \
- ../src/mesa/drivers/dri/radeon/radeon_state.h \
- ../src/mesa/drivers/dri/radeon/radeon_state_init.c \
- ../src/mesa/drivers/dri/radeon/radeon_subset.h \
- ../src/mesa/drivers/dri/radeon/radeon_subset_bitmap.c \
- ../src/mesa/drivers/dri/radeon/radeon_subset_readpix.c \
- ../src/mesa/drivers/dri/radeon/radeon_subset_select.c \
- ../src/mesa/drivers/dri/radeon/radeon_subset_tex.c \
- ../src/mesa/drivers/dri/radeon/radeon_subset_vtx.c \
- ../src/mesa/drivers/dri/radeon/radeon_tcl.h \
- ../src/mesa/drivers/dri/radeon/radeon_tex.h \
- ../src/mesa/drivers/dri/radeon/radeon_vtxfmt.h \
- ../src/mesa/drivers/dri/radeon/server
-FILE_PATTERNS = *.h *.c
-RECURSIVE = NO
-EXCLUDE =
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_SOURCE_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = NO
-INLINE_SOURCES = NO
-REFERENCED_BY_RELATION = YES
-REFERENCES_RELATION = YES
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX = NO
-COLS_IN_ALPHA_INDEX = 5
-IGNORE_PREFIX =
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML = YES
-HTML_OUTPUT = radeon_subset
-HTML_HEADER = header_subset.html
-HTML_FOOTER =
-HTML_STYLESHEET =
-HTML_ALIGN_MEMBERS = YES
-GENERATE_HTMLHELP = NO
-GENERATE_CHI = NO
-BINARY_TOC = NO
-TOC_EXPAND = NO
-DISABLE_INDEX = NO
-ENUM_VALUES_PER_LINE = 4
-GENERATE_TREEVIEW = NO
-TREEVIEW_WIDTH = 250
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX = NO
-LATEX_OUTPUT =
-COMPACT_LATEX = NO
-PAPER_TYPE = a4wide
-EXTRA_PACKAGES =
-LATEX_HEADER =
-PDF_HYPERLINKS = NO
-USE_PDFLATEX = NO
-LATEX_BATCHMODE = NO
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF = NO
-RTF_OUTPUT =
-COMPACT_RTF = NO
-RTF_HYPERLINKS = NO
-RTF_STYLESHEET_FILE =
-RTF_EXTENSIONS_FILE =
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN = NO
-MAN_OUTPUT =
-MAN_EXTENSION =
-MAN_LINKS = NO
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML = NO
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF = NO
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = NO
-EXPAND_ONLY_PREDEF = NO
-SEARCH_INCLUDES = YES
-INCLUDE_PATH = ../include/
-INCLUDE_FILE_PATTERNS =
-PREDEFINED =
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration::addtions related to external references
-#---------------------------------------------------------------------------
-TAGFILES = \
- core_subset.tag=../core_subset \
- math_subset.tag=../math_subset \
- miniglx.tag=../miniglx
-GENERATE_TAGFILE = radeon_subset.tag
-ALLEXTERNALS = NO
-PERL_PATH =
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS = NO
-HAVE_DOT = NO
-CLASS_GRAPH = YES
-COLLABORATION_GRAPH = YES
-TEMPLATE_RELATIONS = YES
-HIDE_UNDOC_RELATIONS = YES
-INCLUDE_GRAPH = YES
-INCLUDED_BY_GRAPH = YES
-GRAPHICAL_HIERARCHY = YES
-DOT_PATH =
-DOTFILE_DIRS =
-MAX_DOT_GRAPH_WIDTH = 1024
-MAX_DOT_GRAPH_HEIGHT = 1024
-GENERATE_LEGEND = YES
-DOT_CLEANUP = YES
-#---------------------------------------------------------------------------
-# Configuration::addtions related to the search engine
-#---------------------------------------------------------------------------
-SEARCHENGINE = NO
-CGI_NAME =
-CGI_URL =
-DOC_URL =
-DOC_ABSPATH =
-BIN_ABSPATH =
-EXT_DOC_PATHS =
diff --git a/doxygen/shader.doxy b/doxygen/shader.doxy
deleted file mode 100644
index d8ad14cc76..0000000000
--- a/doxygen/shader.doxy
+++ /dev/null
@@ -1,49 +0,0 @@
-# Doxyfile 0.1
-
-@INCLUDE = common.doxy
-
-#---------------------------------------------------------------------------
-# General configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = "Mesa Vertex and Fragment Program code"
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = ../src/mesa/shader/
-FILE_PATTERNS = *.c *.h
-RECURSIVE = NO
-EXCLUDE =
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_SOURCE_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-HTML_OUTPUT = shader
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = NO
-EXPAND_ONLY_PREDEF = NO
-SEARCH_INCLUDES = YES
-INCLUDE_PATH = ../include/
-INCLUDE_FILE_PATTERNS =
-PREDEFINED =
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration::addtions related to external references
-#---------------------------------------------------------------------------
-TAGFILES = main.tag=../core \
- math.tag=../math \
- tnl_dd.tag=../tnl_dd \
- swrast.tag=../swrast \
- swrast_setup.tag=../swrast_setup \
- tnl.tag=../tnl \
- vbo.tag=vbo
-GENERATE_TAGFILE = swrast.tag
diff --git a/doxygen/swrast.doxy b/doxygen/swrast.doxy
deleted file mode 100644
index fa07afd594..0000000000
--- a/doxygen/swrast.doxy
+++ /dev/null
@@ -1,48 +0,0 @@
-# Doxyfile 0.1
-
-@INCLUDE = common.doxy
-
-#---------------------------------------------------------------------------
-# General configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = "Mesa Software Rasterization (swrast)"
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = ../src/mesa/swrast/
-FILE_PATTERNS = *.c *.h
-RECURSIVE = NO
-EXCLUDE =
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_SOURCE_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-HTML_OUTPUT = swrast
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = NO
-EXPAND_ONLY_PREDEF = NO
-SEARCH_INCLUDES = YES
-INCLUDE_PATH = ../include/
-INCLUDE_FILE_PATTERNS =
-PREDEFINED =
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration::addtions related to external references
-#---------------------------------------------------------------------------
-TAGFILES = main.tag=../core \
- math.tag=../math \
- tnl_dd.tag=../tnl_dd \
- swrast_setup.tag=../swrast_setup \
- tnl.tag=../tnl \
- vbo.tag=vbo
-GENERATE_TAGFILE = swrast.tag
diff --git a/doxygen/swrast_setup.doxy b/doxygen/swrast_setup.doxy
deleted file mode 100644
index ee6f3ffdc8..0000000000
--- a/doxygen/swrast_setup.doxy
+++ /dev/null
@@ -1,49 +0,0 @@
-# Doxyfile 0.1
-
-@INCLUDE = common.doxy
-
-#---------------------------------------------------------------------------
-# General configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = "Mesa swrast_setup"
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = ../src/mesa/swrast_setup/
-FILE_PATTERNS = *.c \
- *.h
-RECURSIVE = NO
-EXCLUDE =
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_SOURCE_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-HTML_OUTPUT = swrast_setup
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = NO
-EXPAND_ONLY_PREDEF = NO
-SEARCH_INCLUDES = YES
-INCLUDE_PATH =
-INCLUDE_FILE_PATTERNS =
-PREDEFINED =
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration::addtions related to external references
-#---------------------------------------------------------------------------
-TAGFILES = tnl_dd.tag=../tnl_dd \
- main.tag=../core \
- math.tag=../math \
- swrast.tag=../swrast \
- tnl.tag=../tnl \
- vbo.tag=../vbo
-GENERATE_TAGFILE = swrast_setup.tag
diff --git a/doxygen/tnl.doxy b/doxygen/tnl.doxy
deleted file mode 100644
index a4f76a2953..0000000000
--- a/doxygen/tnl.doxy
+++ /dev/null
@@ -1,50 +0,0 @@
-# Doxyfile 0.1
-
-@INCLUDE = common.doxy
-
-#---------------------------------------------------------------------------
-# General configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = "Mesa Transform and Lighting (tnl)"
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = ../src/mesa/tnl/
-FILE_PATTERNS = *.c \
- *.h
-RECURSIVE = NO
-EXCLUDE =
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_SOURCE_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-HTML_OUTPUT = tnl
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = NO
-EXPAND_ONLY_PREDEF = NO
-SEARCH_INCLUDES = YES
-INCLUDE_PATH =
-INCLUDE_FILE_PATTERNS =
-PREDEFINED =
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration::addtions related to external references
-#---------------------------------------------------------------------------
-TAGFILES = tnl_dd.tag=../tnl \
- main.tag=../core \
- math.tag=../math \
- shader.tag=../shader \
- swrast.tag=../swrast \
- swrast_setup.tag=swrast_setup \
- vbo.tag=vbo
-GENERATE_TAGFILE = tnl.tag
diff --git a/doxygen/tnl_dd.doxy b/doxygen/tnl_dd.doxy
deleted file mode 100644
index b241f67f4b..0000000000
--- a/doxygen/tnl_dd.doxy
+++ /dev/null
@@ -1,49 +0,0 @@
-# Doxyfile 0.1
-
-@INCLUDE = common.doxy
-
-#---------------------------------------------------------------------------
-# General configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = "Mesa tnl_dd"
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = ../src/mesa/tnl_dd/
-FILE_PATTERNS = *.c *.h
-RECURSIVE = YES
-EXCLUDE =
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_SOURCE_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-HTML_OUTPUT = tnl_dd
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = NO
-EXPAND_ONLY_PREDEF = NO
-SEARCH_INCLUDES = YES
-INCLUDE_PATH =
-INCLUDE_FILE_PATTERNS =
-PREDEFINED =
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration::addtions related to external references
-#---------------------------------------------------------------------------
-TAGFILES = main.tag=../core \
- math.tag=../math \
- shader.tag=../shader \
- swrast.tag=../swrast \
- swrast_setup.tag=../swrast_setup \
- tnl.tag=../tnl \
- vbo.tag=vbo
-GENERATE_TAGFILE = tnl_dd.tag
diff --git a/doxygen/vbo.doxy b/doxygen/vbo.doxy
deleted file mode 100644
index 6dfb21cf4f..0000000000
--- a/doxygen/vbo.doxy
+++ /dev/null
@@ -1,50 +0,0 @@
-# Doxyfile 0.1
-
-@INCLUDE = common.doxy
-
-#---------------------------------------------------------------------------
-# General configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = "Mesa vbo"
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = ../src/mesa/vbo/
-FILE_PATTERNS = *.c \
- *.h
-RECURSIVE = NO
-EXCLUDE =
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_SOURCE_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-HTML_OUTPUT = vbo
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = NO
-EXPAND_ONLY_PREDEF = NO
-SEARCH_INCLUDES = YES
-INCLUDE_PATH =
-INCLUDE_FILE_PATTERNS =
-PREDEFINED =
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration::addtions related to external references
-#---------------------------------------------------------------------------
-TAGFILES = main.tag=../core \
- math.tag=../math \
- shader.tag=../shader \
- swrast.tag=../swrast \
- swrast_setup.tag=../swrast_setup \
- tnl.tag=../tnl \
- tnl_dd.tag=../tnl_dd
-GENERATE_TAGFILE = vbo.tag
diff --git a/include/GLES/egl.h b/include/GLES/egl.h
deleted file mode 100644
index 61a2cc3c9b..0000000000
--- a/include/GLES/egl.h
+++ /dev/null
@@ -1,320 +0,0 @@
-#ifndef _EGL_H
-#define _EGL_H
-
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * 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
- * SILICON GRAPHICS, INC. 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.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#if 0/*XXX TEMPORARY HACK*/
-#include <GLES/gl.h>
-#else
-#include <GL/gl.h>
-#endif
-#include <GLES/egltypes.h>
-
-/* XXX should go in eglext.h */
-#define GL_OES_VERSION_1_0 1
-#define GL_OES_read_format 1
-#define GL_OES_compressed_paletted_texture 1
-#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
-#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
-#define GL_PALETTE4_RGB8_OES 0x8B90
-#define GL_PALETTE4_RGBA8_OES 0x8B91
-#define GL_PALETTE4_R5_G6_B5_OES 0x8B92
-#define GL_PALETTE4_RGBA4_OES 0x8B93
-#define GL_PALETTE4_RGB5_A1_OES 0x8B94
-#define GL_PALETTE8_RGB8_OES 0x8B95
-#define GL_PALETTE8_RGBA8_OES 0x8B96
-#define GL_PALETTE8_R5_G6_B5_OES 0x8B97
-#define GL_PALETTE8_RGBA4_OES 0x8B98
-#define GL_PALETTE8_RGB5_A1_OES 0x8B99
-/* XXX */
-
-/*
-** Versioning and extensions
-*/
-#define EGL_VERSION_1_0 1
-#define EGL_VERSION_1_1 1
-
-/*
-** Boolean
-*/
-#define EGL_FALSE 0
-#define EGL_TRUE 1
-
-/*
-** Errors
-*/
-#define EGL_SUCCESS 0x3000
-#define EGL_NOT_INITIALIZED 0x3001
-#define EGL_BAD_ACCESS 0x3002
-#define EGL_BAD_ALLOC 0x3003
-#define EGL_BAD_ATTRIBUTE 0x3004
-#define EGL_BAD_CONFIG 0x3005
-#define EGL_BAD_CONTEXT 0x3006
-#define EGL_BAD_CURRENT_SURFACE 0x3007
-#define EGL_BAD_DISPLAY 0x3008
-#define EGL_BAD_MATCH 0x3009
-#define EGL_BAD_NATIVE_PIXMAP 0x300A
-#define EGL_BAD_NATIVE_WINDOW 0x300B
-#define EGL_BAD_PARAMETER 0x300C
-#define EGL_BAD_SURFACE 0x300D
-#define EGL_CONTEXT_LOST 0x300E
-/* 0x300F - 0x301F reserved for additional errors. */
-
-/*
-** Config attributes
-*/
-#define EGL_BUFFER_SIZE 0x3020
-#define EGL_ALPHA_SIZE 0x3021
-#define EGL_BLUE_SIZE 0x3022
-#define EGL_GREEN_SIZE 0x3023
-#define EGL_RED_SIZE 0x3024
-#define EGL_DEPTH_SIZE 0x3025
-#define EGL_STENCIL_SIZE 0x3026
-#define EGL_CONFIG_CAVEAT 0x3027
-#define EGL_CONFIG_ID 0x3028
-#define EGL_LEVEL 0x3029
-#define EGL_MAX_PBUFFER_HEIGHT 0x302A
-#define EGL_MAX_PBUFFER_PIXELS 0x302B
-#define EGL_MAX_PBUFFER_WIDTH 0x302C
-#define EGL_NATIVE_RENDERABLE 0x302D
-#define EGL_NATIVE_VISUAL_ID 0x302E
-#define EGL_NATIVE_VISUAL_TYPE 0x302F
-/*#define EGL_PRESERVED_RESOURCES 0x3030*/
-#define EGL_SAMPLES 0x3031
-#define EGL_SAMPLE_BUFFERS 0x3032
-#define EGL_SURFACE_TYPE 0x3033
-#define EGL_TRANSPARENT_TYPE 0x3034
-#define EGL_TRANSPARENT_BLUE_VALUE 0x3035
-#define EGL_TRANSPARENT_GREEN_VALUE 0x3036
-#define EGL_TRANSPARENT_RED_VALUE 0x3037
-#define EGL_NONE 0x3038 /* Also a config value */
-#define EGL_BIND_TO_TEXTURE_RGB 0x3039
-#define EGL_BIND_TO_TEXTURE_RGBA 0x303A
-#define EGL_MIN_SWAP_INTERVAL 0x303B
-#define EGL_MAX_SWAP_INTERVAL 0x303C
-
-/*
-** Config values
-*/
-#define EGL_DONT_CARE ((EGLint) -1)
-
-#define EGL_SLOW_CONFIG 0x3050 /* EGL_CONFIG_CAVEAT value */
-#define EGL_NON_CONFORMANT_CONFIG 0x3051 /* " */
-#define EGL_TRANSPARENT_RGB 0x3052 /* EGL_TRANSPARENT_TYPE value */
-#define EGL_NO_TEXTURE 0x305C /* EGL_TEXTURE_FORMAT/TARGET value */
-#define EGL_TEXTURE_RGB 0x305D /* EGL_TEXTURE_FORMAT value */
-#define EGL_TEXTURE_RGBA 0x305E /* " */
-#define EGL_TEXTURE_2D 0x305F /* EGL_TEXTURE_TARGET value */
-
-/*
-** Config attribute mask bits
-*/
-#define EGL_PBUFFER_BIT 0x01 /* EGL_SURFACE_TYPE mask bit */
-#define EGL_PIXMAP_BIT 0x02 /* " */
-#define EGL_WINDOW_BIT 0x04 /* " */
-
-/*
-** String names
-*/
-#define EGL_VENDOR 0x3053 /* eglQueryString target */
-#define EGL_VERSION 0x3054 /* " */
-#define EGL_EXTENSIONS 0x3055 /* " */
-
-/*
-** Surface attributes
-*/
-#define EGL_HEIGHT 0x3056
-#define EGL_WIDTH 0x3057
-#define EGL_LARGEST_PBUFFER 0x3058
-#define EGL_TEXTURE_FORMAT 0x3080 /* For pbuffers bound as textures */
-#define EGL_TEXTURE_TARGET 0x3081 /* " */
-#define EGL_MIPMAP_TEXTURE 0x3082 /* " */
-#define EGL_MIPMAP_LEVEL 0x3083 /* " */
-
-/*
-** BindTexImage / ReleaseTexImage buffer target
-*/
-#define EGL_BACK_BUFFER 0x3084
-
-/*
-** Current surfaces
-*/
-#define EGL_DRAW 0x3059
-#define EGL_READ 0x305A
-
-/*
-** Engines
-*/
-#define EGL_CORE_NATIVE_ENGINE 0x305B
-
-/* 0x305C-0x3FFFF reserved for future use */
-
-/*
-** Functions
-*/
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-GLAPI EGLint APIENTRY eglGetError (void);
-
-GLAPI EGLDisplay APIENTRY eglGetDisplay (NativeDisplayType display);
-GLAPI EGLBoolean APIENTRY eglInitialize (EGLDisplay dpy, EGLint *major, EGLint *minor);
-GLAPI EGLBoolean APIENTRY eglTerminate (EGLDisplay dpy);
-GLAPI const char * APIENTRY eglQueryString (EGLDisplay dpy, EGLint name);
-GLAPI void (* APIENTRY eglGetProcAddress (const char *procname))(void);
-
-GLAPI EGLBoolean APIENTRY eglGetConfigs (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config);
-GLAPI EGLBoolean APIENTRY eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);
-GLAPI EGLBoolean APIENTRY eglGetConfigAttrib (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value);
-
-GLAPI EGLSurface APIENTRY eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, NativeWindowType window, const EGLint *attrib_list);
-GLAPI EGLSurface APIENTRY eglCreatePixmapSurface (EGLDisplay dpy, EGLConfig config, NativePixmapType pixmap, const EGLint *attrib_list);
-GLAPI EGLSurface APIENTRY eglCreatePbufferSurface (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);
-GLAPI EGLBoolean APIENTRY eglDestroySurface (EGLDisplay dpy, EGLSurface surface);
-GLAPI EGLBoolean APIENTRY eglQuerySurface (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value);
-
-/* EGL 1.1 render-to-texture APIs */
-GLAPI EGLBoolean APIENTRY eglSurfaceAttrib (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value);
-GLAPI EGLBoolean APIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
-GLAPI EGLBoolean APIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
-
-/* EGL 1.1 swap control API */
-GLAPI EGLBoolean APIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval);
-
-GLAPI EGLContext APIENTRY eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_list, const EGLint *attrib_list);
-GLAPI EGLBoolean APIENTRY eglDestroyContext (EGLDisplay dpy, EGLContext ctx);
-GLAPI EGLBoolean APIENTRY eglMakeCurrent (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx);
-GLAPI EGLContext APIENTRY eglGetCurrentContext (void);
-GLAPI EGLSurface APIENTRY eglGetCurrentSurface (EGLint readdraw);
-GLAPI EGLDisplay APIENTRY eglGetCurrentDisplay (void);
-GLAPI EGLBoolean APIENTRY eglQueryContext (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value);
-
-GLAPI EGLBoolean APIENTRY eglWaitGL (void);
-GLAPI EGLBoolean APIENTRY eglWaitNative (EGLint engine);
-GLAPI EGLBoolean APIENTRY eglSwapBuffers (EGLDisplay dpy, EGLSurface draw);
-GLAPI EGLBoolean APIENTRY eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, NativePixmapType target);
-
-
-
-/* EGL_MESA_screen extension >>> PRELIMINARY <<< */
-#ifndef EGL_MESA_screen_surface
-#define EGL_MESA_screen_surface 1
-
-#define EGL_BAD_SCREEN_MESA 0x4000
-#define EGL_BAD_MODE_MESA 0x4001
-#define EGL_SCREEN_COUNT_MESA 0x4002
-#define EGL_SCREEN_POSITION_MESA 0x4003
-#define EGL_SCREEN_POSITION_GRANULARITY_MESA 0x4004
-#define EGL_MODE_ID_MESA 0x4005
-#define EGL_REFRESH_RATE_MESA 0x4006
-#define EGL_OPTIMAL_MESA 0x4007
-#define EGL_INTERLACED_MESA 0x4008
-#define EGL_SCREEN_BIT_MESA 0x08
-
-GLAPI EGLBoolean APIENTRY eglChooseModeMESA(EGLDisplay dpy, EGLScreenMESA screen, const EGLint *attrib_list, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes);
-GLAPI EGLBoolean APIENTRY eglGetModesMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes);
-GLAPI EGLBoolean APIENTRY eglGetModeAttribMESA(EGLDisplay dpy, EGLModeMESA mode, EGLint attribute, EGLint *value);
-GLAPI EGLBoolean APIENTRY eglGetScreensMESA(EGLDisplay dpy, EGLScreenMESA *screens, EGLint max_screens, EGLint *num_screens);
-GLAPI EGLSurface APIENTRY eglCreateScreenSurfaceMESA(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);
-GLAPI EGLBoolean APIENTRY eglShowScreenSurfaceMESA(EGLDisplay dpy, EGLint screen, EGLSurface surface, EGLModeMESA mode);
-GLAPI EGLBoolean APIENTRY eglScreenPositionMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLint x, EGLint y);
-GLAPI EGLBoolean APIENTRY eglQueryScreenMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLint attribute, EGLint *value);
-GLAPI EGLBoolean APIENTRY eglQueryScreenSurfaceMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLSurface *surface);
-GLAPI EGLBoolean APIENTRY eglQueryScreenModeMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *mode);
-GLAPI const char * APIENTRY eglQueryModeStringMESA(EGLDisplay dpy, EGLModeMESA mode);
-
-#endif /* EGL_MESA_screen_surface */
-
-
-#ifndef EGL_MESA_copy_context
-#define EGL_MESA_copy_context 1
-
-GLAPI EGLBoolean APIENTRY eglCopyContextMESA(EGLDisplay dpy, EGLContext source, EGLContext dest, EGLint mask);
-
-#endif /* EGL_MESA_copy_context */
-
-
-/* XXX this is preliminary! */
-#ifndef EGL_VERSION_1_2
-#define EGL_VERSION_1_2 1
-
-typedef int EGLenum;
-typedef int EGLClientBuffer;
-
-#define EGL_DISPLAY_SCALING 10000
-#define EGL_UNKNOWN ((EGLint)-1)
-
-#define EGL_OPENGL_ES_BIT 0x1
-#define EGL_OPENVG_BIT 0x2
-
-#define EGL_OPENGL_ES_API 0x30A0
-#define EGL_OPENVG_API 0x30A1
-
-#define EGL_LUMINANCE_SIZE 0x303D
-#define EGL_ALPHA_MASK_SIZE 0x303E
-#define EGL_COLOR_BUFFER_TYPE 0x303F
-#define EGL_RENDERABLE_TYPE 0x3040
-
-#define EGL_SINGLE_BUFFER 0x3085
-#define EGL_RENDER_BUFFER 0x3086
-#define EGL_COLORSPACE 0x3087
-#define EGL_ALPHA_FORMAT 0x3088
-#define EGL_COLORSPACE_sRGB 0x3089
-#define EGL_COLORSPACE_LINEAR 0x308A
-#define EGL_ALPHA_FORMAT_NONPRE 0x308B
-#define EGL_ALPHA_FORMAT_PRE 0x308C
-#define EGL_CLIENT_APIS 0x308D
-#define EGL_RGB_BUFFER 0x308E
-#define EGL_LUMINANCE_BUFFER 0x308F
-#define EGL_HORIZONTAL_RESOLUTION 0x3090
-#define EGL_VERTICAL_RESOLUTION 0x3091
-#define EGL_PIXEL_ASPECT_RATIO 0x3092
-#define EGL_SWAP_BEHAVIOR 0x3093
-#define EGL_BUFFER_PRESERVED 0x3094
-#define EGL_BUFFER_DESTROYED 0x3095
-#define EGL_OPENVG_IMAGE 0x3096
-#define EGL_CONTEXT_CLIENT_TYPE 0x3097
-
-GLAPI EGLBoolean APIENTRY eglBindAPI(EGLenum api);
-GLAPI EGLenum APIENTRY eglQueryAPI(void);
-GLAPI EGLBoolean APIENTRY eglWaitClient(void);
-GLAPI EGLBoolean APIENTRY eglReleaseThread(void);
-GLAPI EGLSurface APIENTRY eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list);
-
-#endif /* EGL_VERSION_1_2 */
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _EGL_H */
diff --git a/include/GLES/egltypes.h b/include/GLES/egltypes.h
deleted file mode 100644
index 65cba8d579..0000000000
--- a/include/GLES/egltypes.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-** egltypes.h for Mesa
-**
-** ONLY egl.h SHOULD INCLUDE THIS FILE!
-**
-** See comments about egltypes.h in the standard egl.h file.
-*/
-
-
-#include <sys/types.h>
-
-
-/*
-** These opaque EGL types are implemented as unsigned 32-bit integers:
-*/
-typedef u_int32_t EGLDisplay;
-typedef u_int32_t EGLConfig;
-typedef u_int32_t EGLSurface;
-typedef u_int32_t EGLContext;
-
-/* EGL_MESA_screen_surface */
-typedef u_int32_t EGLModeMESA;
-typedef u_int32_t EGLScreenMESA;
-
-
-/*
-** Other basic EGL types:
-*/
-typedef u_int8_t EGLBoolean;
-typedef int32_t EGLint;
-
-typedef void * NativeDisplayType;
-typedef int NativePixmapType;
-typedef int NativeWindowType;
-
-/*
-** EGL and native handle null values:
-*/
-#define EGL_DEFAULT_DISPLAY ((NativeDisplayType) 0)
-#define EGL_NO_CONTEXT ((EGLContext) 0)
-#define EGL_NO_DISPLAY ((EGLDisplay) 0)
-#define EGL_NO_SURFACE ((EGLSurface) 0)
-
-/* EGL_MESA_screen_surface */
-#define EGL_NO_MODE_MESA ((EGLModeMESA) 0)
diff --git a/progs/beos/.gitignore b/progs/beos/.gitignore
deleted file mode 100644
index 53011ca2e6..0000000000
--- a/progs/beos/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-demo
-GLInfo
-sample
diff --git a/progs/demos/.gitignore b/progs/demos/.gitignore
deleted file mode 100644
index ab836eb834..0000000000
--- a/progs/demos/.gitignore
+++ /dev/null
@@ -1,63 +0,0 @@
-.cvsignore
-arbfplight
-arbfslight
-arbocclude
-bounce
-clearspd
-copypix
-cubemap
-drawpix
-engine
-extfuncs.h
-fire
-fogcoord
-fplight
-fslight
-gamma
-gearbox
-gears
-geartrain
-glinfo
-gloss
-glslnoise
-gltestperf
-glutfx
-ipers
-isosurf
-lodbias
-morph3d
-multiarb
-occlude
-osdemo
-paltex
-pixeltex
-pointblast
-rain
-ray
-readpix
-readtex.c
-readtex.h
-reflect
-renormal
-shadowtex
-showbuffer.c
-showbuffer.h
-singlebuffer
-spectex
-spriteblast
-stex3d
-streaming_rect
-teapot
-terrain
-tessdemo
-texcyl
-texdown
-texenv
-texobj
-trackball.c
-trackball.h
-trispd
-tunnel
-tunnel2
-vao_demo
-winpos
diff --git a/progs/demos/Windows/all.dsp b/progs/demos/Windows/all.dsp
deleted file mode 100644
index b47283c588..0000000000
--- a/progs/demos/Windows/all.dsp
+++ /dev/null
@@ -1,101 +0,0 @@
-# Microsoft Developer Studio Project File - Name="all" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Application" 0x0101
-
-CFG=all - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "all.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "all.mak" CFG="all - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "all - Win32 Release" (based on "Win32 (x86) Application")
-!MESSAGE "all - Win32 Debug" (based on "Win32 (x86) Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "all - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
-
-!ELSEIF "$(CFG)" == "all - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "all - Win32 Release"
-# Name "all - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/bounce.dsp b/progs/demos/Windows/bounce.dsp
deleted file mode 100644
index 0510e77d99..0000000000
--- a/progs/demos/Windows/bounce.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="bounce" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=bounce - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "bounce.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "bounce.mak" CFG="bounce - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "bounce - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "bounce - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "bounce - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../bounce.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "bounce - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../bounce.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "bounce - Win32 Release"
-# Name "bounce - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\bounce.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/clearspd.dsp b/progs/demos/Windows/clearspd.dsp
deleted file mode 100644
index 440c7ae64e..0000000000
--- a/progs/demos/Windows/clearspd.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="clearspd" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=clearspd - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "clearspd.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "clearspd.mak" CFG="clearspd - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "clearspd - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "clearspd - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "clearspd - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../clearspd.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "clearspd - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../clearspd.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "clearspd - Win32 Release"
-# Name "clearspd - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\clearspd.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/cubemap.dsp b/progs/demos/Windows/cubemap.dsp
deleted file mode 100644
index 220a3a0df6..0000000000
--- a/progs/demos/Windows/cubemap.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="cubemap" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=cubemap - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "cubemap.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "cubemap.mak" CFG="cubemap - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "cubemap - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "cubemap - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "cubemap - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../cubemap.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "cubemap - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../cubemap.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "cubemap - Win32 Release"
-# Name "cubemap - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\cubemap.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/demos.dsw b/progs/demos/Windows/demos.dsw
deleted file mode 100644
index 2d6f629e07..0000000000
--- a/progs/demos/Windows/demos.dsw
+++ /dev/null
@@ -1,782 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "all"=".\all.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name bounce
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name clearspd
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name cubemap
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name drawpix
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name fire
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name gears
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name geartrain
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name glinfo
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name gloss
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name gltestperf
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name glutfx
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name ipers
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name isosurf
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name lodbias
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name morph3d
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name multiarb
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name occlude
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name osdemo
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name paltex
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name pixeltex
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name pointblast
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name rain
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name ray
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name readpix
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name reflect
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name renormal
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name shadowtex
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name spectex
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name stex3d
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name teapot
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name terrain
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name tessdemo
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name texcyl
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name texdown
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name texenv
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name texobj
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name trispd
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name tunnel
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name tunnel2
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name winpos
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name spriteblast
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "bounce"=".\bounce.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "clearspd"=".\clearspd.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "cubemap"=".\cubemap.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "drawpix"=".\drawpix.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "fire"=".\fire.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "gears"=".\gears.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "geartrain"=".\geartrain.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "glinfo"=".\glinfo.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "gloss"=".\gloss.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "gltestperf"=".\gltestperf.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "glut"="..\..\..\src\glut\glx\glut.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "glutfx"=".\glutfx.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "ipers"=".\ipers.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "isosurf"=".\isosurf.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "lodbias"=".\loadbias.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "morph3d"=".\morph3d.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "multiarb"=".\multiarb.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "occlude"=".\occlude.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "osdemo"=".\osdemo.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "paltex"=".\paltex.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "pixeltex"=".\pixeltex.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "pointblast"=".\pointblast.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "rain"=".\rain.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "ray"=".\ray.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "readpix"=".\readpix.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "reflect"=".\reflect.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "renormal"=".\renormal.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "shadowtex"=".\shadowtex.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "spectex"=".\spectex.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "spriteblast"=".\spriteblast.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "stex3d"=".\stex3d.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "teapot"=".\teapot.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "terrain"=".\terrain.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tessdemo"=".\tessdemo.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "texcyl"=".\texcyl.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "texdown"=".\texdown.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "texenv"=".\texenv.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "texobj"=".\texobj.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "trispd"=".\trispd.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tunnel"=".\tunnel.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tunnel2"=".\tunnel2.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "winpos"=".\winpos.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name glut
- End Project Dependency
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/progs/demos/Windows/drawpix.dsp b/progs/demos/Windows/drawpix.dsp
deleted file mode 100644
index 57003e616b..0000000000
--- a/progs/demos/Windows/drawpix.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="drawpix" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=drawpix - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "drawpix.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "drawpix.mak" CFG="drawpix - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "drawpix - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "drawpix - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "drawpix - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../../../include" /I "../../util" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../drawpix.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "drawpix - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../drawpix.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "drawpix - Win32 Release"
-# Name "drawpix - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\drawpix.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/fire.dsp b/progs/demos/Windows/fire.dsp
deleted file mode 100644
index f8a536d334..0000000000
--- a/progs/demos/Windows/fire.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="fire" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=fire - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "fire.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "fire.mak" CFG="fire - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "fire - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "fire - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "fire - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../fire.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "fire - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../fire.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "fire - Win32 Release"
-# Name "fire - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\fire.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/gears.dsp b/progs/demos/Windows/gears.dsp
deleted file mode 100644
index 43a588dc68..0000000000
--- a/progs/demos/Windows/gears.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="gears" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=gears - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "gears.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "gears.mak" CFG="gears - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "gears - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "gears - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "gears - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../gears.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "gears - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../gears.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "gears - Win32 Release"
-# Name "gears - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\gears.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/geartrain.dsp b/progs/demos/Windows/geartrain.dsp
deleted file mode 100644
index 8dee77de4d..0000000000
--- a/progs/demos/Windows/geartrain.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="geartrain" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=geartrain - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "geartrain.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "geartrain.mak" CFG="geartrain - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "geartrain - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "geartrain - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "geartrain - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../geartrain.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "geartrain - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../geartrain.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "geartrain - Win32 Release"
-# Name "geartrain - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\geartrain.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/glinfo.dsp b/progs/demos/Windows/glinfo.dsp
deleted file mode 100644
index d9d61eb424..0000000000
--- a/progs/demos/Windows/glinfo.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="glinfo" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=glinfo - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "glinfo.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "glinfo.mak" CFG="glinfo - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "glinfo - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "glinfo - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "glinfo - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../glinfo.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "glinfo - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../glinfo.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "glinfo - Win32 Release"
-# Name "glinfo - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\glinfo.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/gloss.dsp b/progs/demos/Windows/gloss.dsp
deleted file mode 100644
index 402d291f4d..0000000000
--- a/progs/demos/Windows/gloss.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="gloss" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=gloss - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "gloss.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "gloss.mak" CFG="gloss - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "gloss - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "gloss - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "gloss - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../gloss.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "gloss - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../gloss.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "gloss - Win32 Release"
-# Name "gloss - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\gloss.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/gltestperf.dsp b/progs/demos/Windows/gltestperf.dsp
deleted file mode 100644
index e506620152..0000000000
--- a/progs/demos/Windows/gltestperf.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="gltestperf" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=gltestperf - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "gltestperf.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "gltestperf.mak" CFG="gltestperf - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "gltestperf - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "gltestperf - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "gltestperf - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../gltestperf.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "gltestperf - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../gltestperf.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "gltestperf - Win32 Release"
-# Name "gltestperf - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\gltestperf.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/glutfx.dsp b/progs/demos/Windows/glutfx.dsp
deleted file mode 100644
index 90eca930d2..0000000000
--- a/progs/demos/Windows/glutfx.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="glutfx" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=glutfx - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "glutfx.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "glutfx.mak" CFG="glutfx - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "glutfx - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "glutfx - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "glutfx - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../glutfx.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "glutfx - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../glutfx.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "glutfx - Win32 Release"
-# Name "glutfx - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\glutfx.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/ipers.dsp b/progs/demos/Windows/ipers.dsp
deleted file mode 100644
index 430f1b6258..0000000000
--- a/progs/demos/Windows/ipers.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="ipers" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=ipers - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "ipers.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "ipers.mak" CFG="ipers - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "ipers - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "ipers - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "ipers - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../ipers.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "ipers - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../ipers.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "ipers - Win32 Release"
-# Name "ipers - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\ipers.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/isosurf.dsp b/progs/demos/Windows/isosurf.dsp
deleted file mode 100644
index 1c59d40081..0000000000
--- a/progs/demos/Windows/isosurf.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="isosurf" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=isosurf - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "isosurf.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "isosurf.mak" CFG="isosurf - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "isosurf - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "isosurf - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "isosurf - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../isosurf.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "isosurf - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../isosurf.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "isosurf - Win32 Release"
-# Name "isosurf - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\isosurf.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/loadbias.dsp b/progs/demos/Windows/loadbias.dsp
deleted file mode 100644
index ed51960e49..0000000000
--- a/progs/demos/Windows/loadbias.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="lodbias" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=lodbias - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "lodbias.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "lodbias.mak" CFG="lodbias - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "lodbias - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "lodbias - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "lodbias - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../lodbias.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "lodbias - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../lodbias.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "lodbias - Win32 Release"
-# Name "lodbias - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\lodbias.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/morph3d.dsp b/progs/demos/Windows/morph3d.dsp
deleted file mode 100644
index 247dbf03d7..0000000000
--- a/progs/demos/Windows/morph3d.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="morph3d" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=morph3d - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "morph3d.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "morph3d.mak" CFG="morph3d - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "morph3d - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "morph3d - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "morph3d - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../morph3d.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "morph3d - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../morph3d.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "morph3d - Win32 Release"
-# Name "morph3d - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\morph3d.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/multiarb.dsp b/progs/demos/Windows/multiarb.dsp
deleted file mode 100644
index 57c32deb29..0000000000
--- a/progs/demos/Windows/multiarb.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="multiarb" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=multiarb - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "multiarb.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "multiarb.mak" CFG="multiarb - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "multiarb - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "multiarb - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "multiarb - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../multiarb.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "multiarb - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../multiarb.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "multiarb - Win32 Release"
-# Name "multiarb - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\multiarb.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/occlude.dsp b/progs/demos/Windows/occlude.dsp
deleted file mode 100644
index ca4afa579e..0000000000
--- a/progs/demos/Windows/occlude.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="occlude" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=occlude - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "occlude.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "occlude.mak" CFG="occlude - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "occlude - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "occlude - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "occlude - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../occlude.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "occlude - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../occlude.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "occlude - Win32 Release"
-# Name "occlude - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\occlude.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/osdemo.dsp b/progs/demos/Windows/osdemo.dsp
deleted file mode 100644
index ccaa6d2b42..0000000000
--- a/progs/demos/Windows/osdemo.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="osdemo" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=osdemo - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "osdemo.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "osdemo.mak" CFG="osdemo - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "osdemo - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "osdemo - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "osdemo - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB ../../../lib/OSMESA32.LIB /nologo /subsystem:console /machine:I386 /out:"../osdemo.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "osdemo - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB ../../../lib/OSMESA32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../osdemo.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "osdemo - Win32 Release"
-# Name "osdemo - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\osdemo.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/paltex.dsp b/progs/demos/Windows/paltex.dsp
deleted file mode 100644
index efc6384211..0000000000
--- a/progs/demos/Windows/paltex.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="paltex" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=paltex - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "paltex.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "paltex.mak" CFG="paltex - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "paltex - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "paltex - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "paltex - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../paltex.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "paltex - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../paltex.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "paltex - Win32 Release"
-# Name "paltex - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\paltex.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/pixeltex.dsp b/progs/demos/Windows/pixeltex.dsp
deleted file mode 100644
index d09f9f312c..0000000000
--- a/progs/demos/Windows/pixeltex.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="pixeltex" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=pixeltex - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "pixeltex.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "pixeltex.mak" CFG="pixeltex - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "pixeltex - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "pixeltex - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "pixeltex - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../pixeltex.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "pixeltex - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../pixeltex.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "pixeltex - Win32 Release"
-# Name "pixeltex - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\pixeltex.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/pointblast.dsp b/progs/demos/Windows/pointblast.dsp
deleted file mode 100644
index 7be695839f..0000000000
--- a/progs/demos/Windows/pointblast.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="pointblast" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=pointblast - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "pointblast.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "pointblast.mak" CFG="pointblast - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "pointblast - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "pointblast - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "pointblast - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../pointblast.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "pointblast - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../pointblast.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "pointblast - Win32 Release"
-# Name "pointblast - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\pointblast.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/rain.dsp b/progs/demos/Windows/rain.dsp
deleted file mode 100644
index 7e380e66aa..0000000000
--- a/progs/demos/Windows/rain.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="rain" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=rain - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "rain.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "rain.mak" CFG="rain - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "rain - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "rain - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "rain - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../rain.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "rain - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../rain.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "rain - Win32 Release"
-# Name "rain - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\rain.cxx
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/ray.dsp b/progs/demos/Windows/ray.dsp
deleted file mode 100644
index dfa26e7755..0000000000
--- a/progs/demos/Windows/ray.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="ray" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=ray - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "ray.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "ray.mak" CFG="ray - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "ray - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "ray - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "ray - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../ray.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "ray - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../ray.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "ray - Win32 Release"
-# Name "ray - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\ray.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/readpix.dsp b/progs/demos/Windows/readpix.dsp
deleted file mode 100644
index 8097d10625..0000000000
--- a/progs/demos/Windows/readpix.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="readpix" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=readpix - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "readpix.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "readpix.mak" CFG="readpix - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "readpix - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "readpix - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "readpix - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../readpix.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "readpix - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../readpix.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "readpix - Win32 Release"
-# Name "readpix - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\readpix.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/reflect.dsp b/progs/demos/Windows/reflect.dsp
deleted file mode 100644
index fa09700afe..0000000000
--- a/progs/demos/Windows/reflect.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="reflect" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=reflect - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "reflect.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "reflect.mak" CFG="reflect - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "reflect - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "reflect - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "reflect - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../reflect.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "reflect - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../reflect.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "reflect - Win32 Release"
-# Name "reflect - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\reflect.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/renormal.dsp b/progs/demos/Windows/renormal.dsp
deleted file mode 100644
index 4d72e88d8e..0000000000
--- a/progs/demos/Windows/renormal.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="renormal" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=renormal - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "renormal.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "renormal.mak" CFG="bounce - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "renormal - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "renormal - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "renormal - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../renormal.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "renormal - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../renormal.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "renormal - Win32 Release"
-# Name "renormal - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\renormal.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/shadowtex.dsp b/progs/demos/Windows/shadowtex.dsp
deleted file mode 100644
index 419ec24138..0000000000
--- a/progs/demos/Windows/shadowtex.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="shadowtex" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=shadowtex - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "shadowtex.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "shadowtex.mak" CFG="bounce - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "shadowtex - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "shadowtex - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "shadowtex - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../shadowtex.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "shadowtex - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../shadowtex.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "shadowtex - Win32 Release"
-# Name "shadowtex - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\shadowtex.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/spectex.dsp b/progs/demos/Windows/spectex.dsp
deleted file mode 100644
index d1960b3d13..0000000000
--- a/progs/demos/Windows/spectex.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="spectex" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=spectex - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "spectex.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "spectex.mak" CFG="bounce - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "spectex - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "spectex - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "spectex - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../spectex.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "spectex - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../spectex.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "spectex - Win32 Release"
-# Name "spectex - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\spectex.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/spriteblast.dsp b/progs/demos/Windows/spriteblast.dsp
deleted file mode 100644
index 8a02ed50d3..0000000000
--- a/progs/demos/Windows/spriteblast.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="spriteblast" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=spriteblast - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "spriteblast.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "spriteblast.mak" CFG="bounce - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "spriteblast - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "spriteblast - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "spriteblast - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../spriteblast.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "spriteblast - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../spriteblast.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "spriteblast - Win32 Release"
-# Name "spriteblast - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\spriteblast.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/stex3d.dsp b/progs/demos/Windows/stex3d.dsp
deleted file mode 100644
index 7c112d62ca..0000000000
--- a/progs/demos/Windows/stex3d.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="stex3d" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=stex3d - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "stex3d.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "stex3d.mak" CFG="bounce - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "stex3d - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "stex3d - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "stex3d - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../stex3d.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "stex3d - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../stex3d.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "stex3d - Win32 Release"
-# Name "stex3d - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\stex3d.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/teapot.dsp b/progs/demos/Windows/teapot.dsp
deleted file mode 100644
index 3260e635a4..0000000000
--- a/progs/demos/Windows/teapot.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="teapot" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=teapot - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "teapot.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "teapot.mak" CFG="gloss - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "teapot - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "teapot - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "teapot - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../teapot.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "teapot - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../teapot.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "teapot - Win32 Release"
-# Name "teapot - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\teapot.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/terrain.dsp b/progs/demos/Windows/terrain.dsp
deleted file mode 100644
index 9fe490db81..0000000000
--- a/progs/demos/Windows/terrain.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="terrain" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=terrain - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "terrain.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "terrain.mak" CFG="bounce - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "terrain - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "terrain - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "terrain - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../terrain.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "terrain - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../terrain.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "terrain - Win32 Release"
-# Name "terrain - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\terrain.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/tessdemo.dsp b/progs/demos/Windows/tessdemo.dsp
deleted file mode 100644
index 61345c79e6..0000000000
--- a/progs/demos/Windows/tessdemo.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="tessdemo" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=tessdemo - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "tessdemo.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "tessdemo.mak" CFG="bounce - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "tessdemo - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "tessdemo - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "tessdemo - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../tessdemo.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "tessdemo - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../tessdemo.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "tessdemo - Win32 Release"
-# Name "tessdemo - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\tessdemo.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/texcyl.dsp b/progs/demos/Windows/texcyl.dsp
deleted file mode 100644
index b227e02c29..0000000000
--- a/progs/demos/Windows/texcyl.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="texcyl" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=texcyl - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "texcyl.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "texcyl.mak" CFG="gloss - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "texcyl - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "texcyl - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "texcyl - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../texcyl.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "texcyl - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../texcyl.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "texcyl - Win32 Release"
-# Name "texcyl - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\texcyl.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/texdown.dsp b/progs/demos/Windows/texdown.dsp
deleted file mode 100644
index acea7666af..0000000000
--- a/progs/demos/Windows/texdown.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="texdown" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=texdown - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "texdown.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "texdown.mak" CFG="bounce - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "texdown - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "texdown - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "texdown - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../texdown.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "texdown - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../texdown.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "texdown - Win32 Release"
-# Name "texdown - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\texdown.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/texenv.dsp b/progs/demos/Windows/texenv.dsp
deleted file mode 100644
index 3eb7eecdb7..0000000000
--- a/progs/demos/Windows/texenv.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="texenv" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=texenv - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "texenv.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "texenv.mak" CFG="bounce - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "texenv - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "texenv - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "texenv - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../texenv.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "texenv - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../texenv.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "texenv - Win32 Release"
-# Name "texenv - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\texenv.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/texobj.dsp b/progs/demos/Windows/texobj.dsp
deleted file mode 100644
index 5db5f2ee79..0000000000
--- a/progs/demos/Windows/texobj.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="texobj" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=texobj - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "texobj.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "texobj.mak" CFG="bounce - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "texobj - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "texobj - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "texobj - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../texobj.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "texobj - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../texobj.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "texobj - Win32 Release"
-# Name "texobj - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\texobj.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/trispd.dsp b/progs/demos/Windows/trispd.dsp
deleted file mode 100644
index 7e27cf3d04..0000000000
--- a/progs/demos/Windows/trispd.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="trispd" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=trispd - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "trispd.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "trispd.mak" CFG="bounce - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "trispd - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "trispd - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "trispd - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../trispd.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "trispd - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../trispd.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "trispd - Win32 Release"
-# Name "trispd - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\trispd.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/tunnel.dsp b/progs/demos/Windows/tunnel.dsp
deleted file mode 100644
index 965f109c33..0000000000
--- a/progs/demos/Windows/tunnel.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="tunnel" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=tunnel - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "tunnel.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "tunnel.mak" CFG="gloss - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "tunnel - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "tunnel - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "tunnel - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../tunnel.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "tunnel - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../tunnel.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "tunnel - Win32 Release"
-# Name "tunnel - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\tunnel.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/tunnel2.dsp b/progs/demos/Windows/tunnel2.dsp
deleted file mode 100644
index 3ae2800a04..0000000000
--- a/progs/demos/Windows/tunnel2.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="tunnel2" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=tunnel2 - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "tunnel2.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "tunnel2.mak" CFG="gloss - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "tunnel2 - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "tunnel2 - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "tunnel2 - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../tunnel2.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "tunnel2 - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../tunnel2.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "tunnel2 - Win32 Release"
-# Name "tunnel2 - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\tunnel2.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/Windows/winpos.dsp b/progs/demos/Windows/winpos.dsp
deleted file mode 100644
index b7b569e640..0000000000
--- a/progs/demos/Windows/winpos.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="winpos" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=winpos - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "winpos.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "winpos.mak" CFG="gloss - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "winpos - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "winpos - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "winpos - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../util" /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../winpos.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "winpos - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../util" /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../winpos.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "winpos - Win32 Release"
-# Name "winpos - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\winpos.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/demos/extfuncs.h b/progs/demos/extfuncs.h
new file mode 100644
index 0000000000..cf6b29d0e3
--- /dev/null
+++ b/progs/demos/extfuncs.h
@@ -0,0 +1,162 @@
+/**
+ * Utility for getting OpenGL extension function pointers
+ * Meant to be #included.
+ */
+
+/* OpenGL 2.0 */
+static PFNGLATTACHSHADERPROC glAttachShader_func = NULL;
+static PFNGLBINDATTRIBLOCATIONPROC glBindAttribLocation_func = NULL;
+static PFNGLCOMPILESHADERPROC glCompileShader_func = NULL;
+static PFNGLCREATEPROGRAMPROC glCreateProgram_func = NULL;
+static PFNGLCREATESHADERPROC glCreateShader_func = NULL;
+static PFNGLDELETEPROGRAMPROC glDeleteProgram_func = NULL;
+static PFNGLDELETESHADERPROC glDeleteShader_func = NULL;
+static PFNGLGETACTIVEATTRIBPROC glGetActiveAttrib_func = NULL;
+static PFNGLGETACTIVEUNIFORMPROC glGetActiveUniform_func = NULL;
+static PFNGLGETATTACHEDSHADERSPROC glGetAttachedShaders_func = NULL;
+static PFNGLGETATTRIBLOCATIONPROC glGetAttribLocation_func = NULL;
+static PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog_func = NULL;
+static PFNGLGETSHADERINFOLOGPROC glGetShaderInfoLog_func = NULL;
+static PFNGLGETSHADERIVPROC glGetShaderiv_func = NULL;
+static PFNGLGETPROGRAMIVPROC glGetProgramiv_func = NULL;
+static PFNGLGETSHADERSOURCEPROC glGetShaderSource_func = NULL;
+static PFNGLGETUNIFORMFVPROC glGetUniformfv_func = NULL;
+static PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation_func = NULL;
+static PFNGLISPROGRAMPROC glIsProgram_func = NULL;
+static PFNGLISSHADERPROC glIsShader_func = NULL;
+static PFNGLLINKPROGRAMPROC glLinkProgram_func = NULL;
+static PFNGLSHADERSOURCEPROC glShaderSource_func = NULL;
+static PFNGLUNIFORM1IPROC glUniform1i_func = NULL;
+static PFNGLUNIFORM2IPROC glUniform2i_func = NULL;
+static PFNGLUNIFORM3IPROC glUniform3i_func = NULL;
+static PFNGLUNIFORM4IPROC glUniform4i_func = NULL;
+static PFNGLUNIFORM1FPROC glUniform1f_func = NULL;
+static PFNGLUNIFORM2FPROC glUniform2f_func = NULL;
+static PFNGLUNIFORM3FPROC glUniform3f_func = NULL;
+static PFNGLUNIFORM4FPROC glUniform4f_func = NULL;
+static PFNGLUNIFORM1FVPROC glUniform1fv_func = NULL;
+static PFNGLUNIFORM2FVPROC glUniform2fv_func = NULL;
+static PFNGLUNIFORM3FVPROC glUniform3fv_func = NULL;
+static PFNGLUNIFORM4FVPROC glUniform4fv_func = NULL;
+static PFNGLUNIFORMMATRIX2FVPROC glUniformMatrix2fv_func = NULL;
+static PFNGLUNIFORMMATRIX3FVPROC glUniformMatrix3fv_func = NULL;
+static PFNGLUNIFORMMATRIX4FVPROC glUniformMatrix4fv_func = NULL;
+static PFNGLUSEPROGRAMPROC glUseProgram_func = NULL;
+static PFNGLVERTEXATTRIB1FPROC glVertexAttrib1f_func = NULL;
+static PFNGLVERTEXATTRIB2FPROC glVertexAttrib2f_func = NULL;
+static PFNGLVERTEXATTRIB3FPROC glVertexAttrib3f_func = NULL;
+static PFNGLVERTEXATTRIB4FPROC glVertexAttrib4f_func = NULL;
+
+/* OpenGL 2.1 */
+static PFNGLUNIFORMMATRIX2X3FVPROC glUniformMatrix2x3fv_func = NULL;
+static PFNGLUNIFORMMATRIX3X2FVPROC glUniformMatrix3x2fv_func = NULL;
+static PFNGLUNIFORMMATRIX2X4FVPROC glUniformMatrix2x4fv_func = NULL;
+static PFNGLUNIFORMMATRIX4X2FVPROC glUniformMatrix4x2fv_func = NULL;
+static PFNGLUNIFORMMATRIX3X4FVPROC glUniformMatrix3x4fv_func = NULL;
+static PFNGLUNIFORMMATRIX4X3FVPROC glUniformMatrix4x3fv_func = NULL;
+
+/* OpenGL 1.4 */
+static PFNGLPOINTPARAMETERFVPROC glPointParameterfv_func = NULL;
+static PFNGLSECONDARYCOLOR3FVPROC glSecondaryColor3fv_func = NULL;
+
+/* GL_ARB_vertex/fragment_program */
+static PFNGLBINDPROGRAMARBPROC glBindProgramARB_func = NULL;
+static PFNGLDELETEPROGRAMSARBPROC glDeleteProgramsARB_func = NULL;
+static PFNGLGENPROGRAMSARBPROC glGenProgramsARB_func = NULL;
+static PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC glGetProgramLocalParameterdvARB_func = NULL;
+static PFNGLISPROGRAMARBPROC glIsProgramARB_func = NULL;
+static PFNGLPROGRAMLOCALPARAMETER4DARBPROC glProgramLocalParameter4dARB_func = NULL;
+static PFNGLPROGRAMLOCALPARAMETER4FVARBPROC glProgramLocalParameter4fvARB_func = NULL;
+static PFNGLPROGRAMSTRINGARBPROC glProgramStringARB_func = NULL;
+static PFNGLVERTEXATTRIB1FARBPROC glVertexAttrib1fARB_func = NULL;
+
+/* GL_APPLE_vertex_array_object */
+static PFNGLBINDVERTEXARRAYAPPLEPROC glBindVertexArrayAPPLE_func = NULL;
+static PFNGLDELETEVERTEXARRAYSAPPLEPROC glDeleteVertexArraysAPPLE_func = NULL;
+static PFNGLGENVERTEXARRAYSAPPLEPROC glGenVertexArraysAPPLE_func = NULL;
+static PFNGLISVERTEXARRAYAPPLEPROC glIsVertexArrayAPPLE_func = NULL;
+
+/* GL_EXT_stencil_two_side */
+static PFNGLACTIVESTENCILFACEEXTPROC glActiveStencilFaceEXT_func = NULL;
+
+
+static void
+GetExtensionFuncs(void)
+{
+ /* OpenGL 2.0 */
+ glAttachShader_func = (PFNGLATTACHSHADERPROC) glutGetProcAddress("glAttachShader");
+ glBindAttribLocation_func = (PFNGLBINDATTRIBLOCATIONPROC) glutGetProcAddress("glBindAttribLocation");
+ glCompileShader_func = (PFNGLCOMPILESHADERPROC) glutGetProcAddress("glCompileShader");
+ glCreateProgram_func = (PFNGLCREATEPROGRAMPROC) glutGetProcAddress("glCreateProgram");
+ glCreateShader_func = (PFNGLCREATESHADERPROC) glutGetProcAddress("glCreateShader");
+ glDeleteProgram_func = (PFNGLDELETEPROGRAMPROC) glutGetProcAddress("glDeleteProgram");
+ glDeleteShader_func = (PFNGLDELETESHADERPROC) glutGetProcAddress("glDeleteShader");
+ glGetActiveAttrib_func = (PFNGLGETACTIVEATTRIBPROC) glutGetProcAddress("glGetActiveAttrib");
+ glGetActiveUniform_func = (PFNGLGETACTIVEUNIFORMPROC) glutGetProcAddress("glGetActiveUniform");
+ glGetAttachedShaders_func = (PFNGLGETATTACHEDSHADERSPROC) glutGetProcAddress("glGetAttachedShaders");
+ glGetAttribLocation_func = (PFNGLGETATTRIBLOCATIONPROC) glutGetProcAddress("glGetAttribLocation");
+ glGetProgramInfoLog_func = (PFNGLGETPROGRAMINFOLOGPROC) glutGetProcAddress("glGetProgramInfoLog");
+ glGetShaderInfoLog_func = (PFNGLGETSHADERINFOLOGPROC) glutGetProcAddress("glGetShaderInfoLog");
+ glGetProgramiv_func = (PFNGLGETPROGRAMIVPROC) glutGetProcAddress("glGetProgramiv");
+ glGetShaderiv_func = (PFNGLGETSHADERIVPROC) glutGetProcAddress("glGetShaderiv");
+ glGetShaderSource_func = (PFNGLGETSHADERSOURCEPROC) glutGetProcAddress("glGetShaderSource");
+ glGetUniformLocation_func = (PFNGLGETUNIFORMLOCATIONPROC) glutGetProcAddress("glGetUniformLocation");
+ glGetUniformfv_func = (PFNGLGETUNIFORMFVPROC) glutGetProcAddress("glGetUniformfv");
+ glIsProgram_func = (PFNGLISPROGRAMPROC) glutGetProcAddress("glIsProgram");
+ glIsShader_func = (PFNGLISSHADERPROC) glutGetProcAddress("glIsShader");
+ glLinkProgram_func = (PFNGLLINKPROGRAMPROC) glutGetProcAddress("glLinkProgram");
+ glShaderSource_func = (PFNGLSHADERSOURCEPROC) glutGetProcAddress("glShaderSource");
+ glUniform1i_func = (PFNGLUNIFORM1IPROC) glutGetProcAddress("glUniform1i");
+ glUniform2i_func = (PFNGLUNIFORM2IPROC) glutGetProcAddress("glUniform2i");
+ glUniform3i_func = (PFNGLUNIFORM3IPROC) glutGetProcAddress("glUniform3i");
+ glUniform4i_func = (PFNGLUNIFORM4IPROC) glutGetProcAddress("glUniform3i");
+ glUniform1f_func = (PFNGLUNIFORM1FPROC) glutGetProcAddress("glUniform1f");
+ glUniform2f_func = (PFNGLUNIFORM2FPROC) glutGetProcAddress("glUniform2f");
+ glUniform3f_func = (PFNGLUNIFORM3FPROC) glutGetProcAddress("glUniform3f");
+ glUniform4f_func = (PFNGLUNIFORM4FPROC) glutGetProcAddress("glUniform4f");
+ glUniform1fv_func = (PFNGLUNIFORM1FVPROC) glutGetProcAddress("glUniform1fv");
+ glUniform2fv_func = (PFNGLUNIFORM2FVPROC) glutGetProcAddress("glUniform2fv");
+ glUniform3fv_func = (PFNGLUNIFORM3FVPROC) glutGetProcAddress("glUniform3fv");
+ glUniform4fv_func = (PFNGLUNIFORM3FVPROC) glutGetProcAddress("glUniform4fv");
+ glUniformMatrix2fv_func = (PFNGLUNIFORMMATRIX2FVPROC) glutGetProcAddress("glUniformMatrix2fv");
+ glUniformMatrix3fv_func = (PFNGLUNIFORMMATRIX3FVPROC) glutGetProcAddress("glUniformMatrix3fv");
+ glUniformMatrix4fv_func = (PFNGLUNIFORMMATRIX4FVPROC) glutGetProcAddress("glUniformMatrix4fv");
+ glUseProgram_func = (PFNGLUSEPROGRAMPROC) glutGetProcAddress("glUseProgram");
+ glVertexAttrib1f_func = (PFNGLVERTEXATTRIB1FPROC) glutGetProcAddress("glVertexAttrib1f");
+ glVertexAttrib2f_func = (PFNGLVERTEXATTRIB2FPROC) glutGetProcAddress("glVertexAttrib2f");
+ glVertexAttrib3f_func = (PFNGLVERTEXATTRIB3FPROC) glutGetProcAddress("glVertexAttrib3f");
+ glVertexAttrib4f_func = (PFNGLVERTEXATTRIB4FPROC) glutGetProcAddress("glVertexAttrib4f");
+
+ /* OpenGL 2.1 */
+ glUniformMatrix2x3fv_func = (PFNGLUNIFORMMATRIX2X3FVPROC) glutGetProcAddress("glUniformMatrix2x3fv");
+ glUniformMatrix3x2fv_func = (PFNGLUNIFORMMATRIX3X2FVPROC) glutGetProcAddress("glUniformMatrix3x2fv");
+ glUniformMatrix2x4fv_func = (PFNGLUNIFORMMATRIX2X4FVPROC) glutGetProcAddress("glUniformMatrix2x4fv");
+ glUniformMatrix4x2fv_func = (PFNGLUNIFORMMATRIX4X2FVPROC) glutGetProcAddress("glUniformMatrix4x2fv");
+ glUniformMatrix3x4fv_func = (PFNGLUNIFORMMATRIX3X4FVPROC) glutGetProcAddress("glUniformMatrix3x4fv");
+ glUniformMatrix4x3fv_func = (PFNGLUNIFORMMATRIX4X3FVPROC) glutGetProcAddress("glUniformMatrix4x3fv");
+
+ /* OpenGL 1.4 */
+ glPointParameterfv_func = (PFNGLPOINTPARAMETERFVPROC) glutGetProcAddress("glPointParameterfv");
+ glSecondaryColor3fv_func = (PFNGLSECONDARYCOLOR3FVPROC) glutGetProcAddress("glSecondaryColor3fv");
+
+ /* GL_ARB_vertex/fragment_program */
+ glBindProgramARB_func = (PFNGLBINDPROGRAMARBPROC) glutGetProcAddress("glBindProgramARB");
+ glDeleteProgramsARB_func = (PFNGLDELETEPROGRAMSARBPROC) glutGetProcAddress("glDeleteProgramsARB");
+ glGenProgramsARB_func = (PFNGLGENPROGRAMSARBPROC) glutGetProcAddress("glGenProgramsARB");
+ glGetProgramLocalParameterdvARB_func = (PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) glutGetProcAddress("glGetProgramLocalParameterdvARB");
+ glIsProgramARB_func = (PFNGLISPROGRAMARBPROC) glutGetProcAddress("glIsProgramARB");
+ glProgramLocalParameter4dARB_func = (PFNGLPROGRAMLOCALPARAMETER4DARBPROC) glutGetProcAddress("glProgramLocalParameter4dARB");
+ glProgramLocalParameter4fvARB_func = (PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) glutGetProcAddress("glProgramLocalParameter4fvARB");
+ glProgramStringARB_func = (PFNGLPROGRAMSTRINGARBPROC) glutGetProcAddress("glProgramStringARB");
+ glVertexAttrib1fARB_func = (PFNGLVERTEXATTRIB1FARBPROC) glutGetProcAddress("glVertexAttrib1fARB");
+
+ /* GL_APPLE_vertex_array_object */
+ glBindVertexArrayAPPLE_func = (PFNGLBINDVERTEXARRAYAPPLEPROC) glutGetProcAddress("glBindVertexArrayAPPLE");
+ glDeleteVertexArraysAPPLE_func = (PFNGLDELETEVERTEXARRAYSAPPLEPROC) glutGetProcAddress("glDeleteVertexArraysAPPLE");
+ glGenVertexArraysAPPLE_func = (PFNGLGENVERTEXARRAYSAPPLEPROC) glutGetProcAddress("glGenVertexArraysAPPLE");
+ glIsVertexArrayAPPLE_func = (PFNGLISVERTEXARRAYAPPLEPROC) glutGetProcAddress("glIsVertexArrayAPPLE");
+
+ /* GL_EXT_stencil_two_side */
+ glActiveStencilFaceEXT_func = (PFNGLACTIVESTENCILFACEEXTPROC) glutGetProcAddress("glActiveStencilFaceEXT");
+}
+
diff --git a/progs/demos/readtex.c b/progs/demos/readtex.c
new file mode 100644
index 0000000000..37d5fcd0d3
--- /dev/null
+++ b/progs/demos/readtex.c
@@ -0,0 +1,454 @@
+/* readtex.c */
+
+/*
+ * Read an SGI .rgb image file and generate a mipmap texture set.
+ * Much of this code was borrowed from SGI's tk OpenGL toolkit.
+ */
+
+
+
+#include <GL/gl.h>
+#include <GL/glu.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "readtex.h"
+
+
+#ifndef SEEK_SET
+# define SEEK_SET 0
+#endif
+
+
+/*
+** RGB Image Structure
+*/
+
+typedef struct _TK_RGBImageRec {
+ GLint sizeX, sizeY;
+ GLint components;
+ unsigned char *data;
+} TK_RGBImageRec;
+
+
+
+/******************************************************************************/
+
+typedef struct _rawImageRec {
+ unsigned short imagic;
+ unsigned short type;
+ unsigned short dim;
+ unsigned short sizeX, sizeY, sizeZ;
+ unsigned long min, max;
+ unsigned long wasteBytes;
+ char name[80];
+ unsigned long colorMap;
+ FILE *file;
+ unsigned char *tmp, *tmpR, *tmpG, *tmpB, *tmpA;
+ unsigned long rleEnd;
+ GLuint *rowStart;
+ GLint *rowSize;
+} rawImageRec;
+
+/******************************************************************************/
+
+static void ConvertShort(unsigned short *array, long length)
+{
+ unsigned long b1, b2;
+ unsigned char *ptr;
+
+ ptr = (unsigned char *)array;
+ while (length--) {
+ b1 = *ptr++;
+ b2 = *ptr++;
+ *array++ = (unsigned short) ((b1 << 8) | (b2));
+ }
+}
+
+static void ConvertLong(GLuint *array, long length)
+{
+ unsigned long b1, b2, b3, b4;
+ unsigned char *ptr;
+
+ ptr = (unsigned char *)array;
+ while (length--) {
+ b1 = *ptr++;
+ b2 = *ptr++;
+ b3 = *ptr++;
+ b4 = *ptr++;
+ *array++ = (b1 << 24) | (b2 << 16) | (b3 << 8) | (b4);
+ }
+}
+
+static rawImageRec *RawImageOpen(const char *fileName)
+{
+ union {
+ int testWord;
+ char testByte[4];
+ } endianTest;
+ rawImageRec *raw;
+ GLenum swapFlag;
+ int x;
+
+ endianTest.testWord = 1;
+ if (endianTest.testByte[0] == 1) {
+ swapFlag = GL_TRUE;
+ } else {
+ swapFlag = GL_FALSE;
+ }
+
+ raw = (rawImageRec *)calloc(1, sizeof(rawImageRec));
+ if (raw == NULL) {
+ fprintf(stderr, "Out of memory!\n");
+ return NULL;
+ }
+ if ((raw->file = fopen(fileName, "rb")) == NULL) {
+ perror(fileName);
+ return NULL;
+ }
+
+ fread(raw, 1, 12, raw->file);
+
+ if (swapFlag) {
+ ConvertShort(&raw->imagic, 6);
+ }
+
+ raw->tmp = (unsigned char *)malloc(raw->sizeX*256);
+ raw->tmpR = (unsigned char *)malloc(raw->sizeX*256);
+ raw->tmpG = (unsigned char *)malloc(raw->sizeX*256);
+ raw->tmpB = (unsigned char *)malloc(raw->sizeX*256);
+ if (raw->sizeZ==4) {
+ raw->tmpA = (unsigned char *)malloc(raw->sizeX*256);
+ }
+ if (raw->tmp == NULL || raw->tmpR == NULL || raw->tmpG == NULL ||
+ raw->tmpB == NULL) {
+ fprintf(stderr, "Out of memory!\n");
+ return NULL;
+ }
+
+ if ((raw->type & 0xFF00) == 0x0100) {
+ x = raw->sizeY * raw->sizeZ * sizeof(GLuint);
+ raw->rowStart = (GLuint *)malloc(x);
+ raw->rowSize = (GLint *)malloc(x);
+ if (raw->rowStart == NULL || raw->rowSize == NULL) {
+ fprintf(stderr, "Out of memory!\n");
+ return NULL;
+ }
+ raw->rleEnd = 512 + (2 * x);
+ fseek(raw->file, 512, SEEK_SET);
+ fread(raw->rowStart, 1, x, raw->file);
+ fread(raw->rowSize, 1, x, raw->file);
+ if (swapFlag) {
+ ConvertLong(raw->rowStart, (long) (x/sizeof(GLuint)));
+ ConvertLong((GLuint *)raw->rowSize, (long) (x/sizeof(GLint)));
+ }
+ }
+ return raw;
+}
+
+static void RawImageClose(rawImageRec *raw)
+{
+ fclose(raw->file);
+ free(raw->tmp);
+ free(raw->tmpR);
+ free(raw->tmpG);
+ free(raw->tmpB);
+ if (raw->rowStart)
+ free(raw->rowStart);
+ if (raw->rowSize)
+ free(raw->rowSize);
+ if (raw->sizeZ>3) {
+ free(raw->tmpA);
+ }
+ free(raw);
+}
+
+static void RawImageGetRow(rawImageRec *raw, unsigned char *buf, int y, int z)
+{
+ unsigned char *iPtr, *oPtr, pixel;
+ int count, done = 0;
+
+ if ((raw->type & 0xFF00) == 0x0100) {
+ fseek(raw->file, (long) raw->rowStart[y+z*raw->sizeY], SEEK_SET);
+ fread(raw->tmp, 1, (unsigned int)raw->rowSize[y+z*raw->sizeY],
+ raw->file);
+
+ iPtr = raw->tmp;
+ oPtr = buf;
+ while (!done) {
+ pixel = *iPtr++;
+ count = (int)(pixel & 0x7F);
+ if (!count) {
+ done = 1;
+ return;
+ }
+ if (pixel & 0x80) {
+ while (count--) {
+ *oPtr++ = *iPtr++;
+ }
+ } else {
+ pixel = *iPtr++;
+ while (count--) {
+ *oPtr++ = pixel;
+ }
+ }
+ }
+ } else {
+ fseek(raw->file, 512+(y*raw->sizeX)+(z*raw->sizeX*raw->sizeY),
+ SEEK_SET);
+ fread(buf, 1, raw->sizeX, raw->file);
+ }
+}
+
+
+static void RawImageGetData(rawImageRec *raw, TK_RGBImageRec *final)
+{
+ unsigned char *ptr;
+ int i, j;
+
+ final->data = (unsigned char *)malloc((raw->sizeX+1)*(raw->sizeY+1)*4);
+ if (final->data == NULL) {
+ fprintf(stderr, "Out of memory!\n");
+ }
+
+ ptr = final->data;
+ for (i = 0; i < (int)(raw->sizeY); i++) {
+ RawImageGetRow(raw, raw->tmpR, i, 0);
+ RawImageGetRow(raw, raw->tmpG, i, 1);
+ RawImageGetRow(raw, raw->tmpB, i, 2);
+ if (raw->sizeZ>3) {
+ RawImageGetRow(raw, raw->tmpA, i, 3);
+ }
+ for (j = 0; j < (int)(raw->sizeX); j++) {
+ *ptr++ = *(raw->tmpR + j);
+ *ptr++ = *(raw->tmpG + j);
+ *ptr++ = *(raw->tmpB + j);
+ if (raw->sizeZ>3) {
+ *ptr++ = *(raw->tmpA + j);
+ }
+ }
+ }
+}
+
+
+static TK_RGBImageRec *tkRGBImageLoad(const char *fileName)
+{
+ rawImageRec *raw;
+ TK_RGBImageRec *final;
+
+ raw = RawImageOpen(fileName);
+ if (!raw) {
+ fprintf(stderr, "File not found\n");
+ return NULL;
+ }
+ final = (TK_RGBImageRec *)malloc(sizeof(TK_RGBImageRec));
+ if (final == NULL) {
+ fprintf(stderr, "Out of memory!\n");
+ return NULL;
+ }
+ final->sizeX = raw->sizeX;
+ final->sizeY = raw->sizeY;
+ final->components = raw->sizeZ;
+ RawImageGetData(raw, final);
+ RawImageClose(raw);
+ return final;
+}
+
+
+static void FreeImage( TK_RGBImageRec *image )
+{
+ free(image->data);
+ free(image);
+}
+
+
+/*
+ * Load an SGI .rgb file and generate a set of 2-D mipmaps from it.
+ * Input: imageFile - name of .rgb to read
+ * intFormat - internal texture format to use, or number of components
+ * Return: GL_TRUE if success, GL_FALSE if error.
+ */
+GLboolean LoadRGBMipmaps( const char *imageFile, GLint intFormat )
+{
+ GLint w, h;
+ return LoadRGBMipmaps2( imageFile, GL_TEXTURE_2D, intFormat, &w, &h );
+}
+
+
+
+GLboolean LoadRGBMipmaps2( const char *imageFile, GLenum target,
+ GLint intFormat, GLint *width, GLint *height )
+{
+ GLint error;
+ GLenum format;
+ TK_RGBImageRec *image;
+
+ image = tkRGBImageLoad( imageFile );
+ if (!image) {
+ return GL_FALSE;
+ }
+
+ if (image->components==3) {
+ format = GL_RGB;
+ }
+ else if (image->components==4) {
+ format = GL_RGBA;
+ }
+ else {
+ /* not implemented */
+ fprintf(stderr,
+ "Error in LoadRGBMipmaps %d-component images not implemented\n",
+ image->components );
+ return GL_FALSE;
+ }
+
+ error = gluBuild2DMipmaps( target,
+ intFormat,
+ image->sizeX, image->sizeY,
+ format,
+ GL_UNSIGNED_BYTE,
+ image->data );
+
+ *width = image->sizeX;
+ *height = image->sizeY;
+
+ FreeImage(image);
+
+ return error ? GL_FALSE : GL_TRUE;
+}
+
+
+
+/*
+ * Load an SGI .rgb file and return a pointer to the image data.
+ * Input: imageFile - name of .rgb to read
+ * Output: width - width of image
+ * height - height of image
+ * format - format of image (GL_RGB or GL_RGBA)
+ * Return: pointer to image data or NULL if error
+ */
+GLubyte *LoadRGBImage( const char *imageFile, GLint *width, GLint *height,
+ GLenum *format )
+{
+ TK_RGBImageRec *image;
+ GLint bytes;
+ GLubyte *buffer;
+
+ image = tkRGBImageLoad( imageFile );
+ if (!image) {
+ return NULL;
+ }
+
+ if (image->components==3) {
+ *format = GL_RGB;
+ }
+ else if (image->components==4) {
+ *format = GL_RGBA;
+ }
+ else {
+ /* not implemented */
+ fprintf(stderr,
+ "Error in LoadRGBImage %d-component images not implemented\n",
+ image->components );
+ return NULL;
+ }
+
+ *width = image->sizeX;
+ *height = image->sizeY;
+
+ bytes = image->sizeX * image->sizeY * image->components;
+ buffer = (GLubyte *) malloc(bytes);
+ if (!buffer)
+ return NULL;
+
+ memcpy( (void *) buffer, (void *) image->data, bytes );
+
+ FreeImage(image);
+
+ return buffer;
+}
+
+#define CLAMP( X, MIN, MAX ) ( (X)<(MIN) ? (MIN) : ((X)>(MAX) ? (MAX) : (X)) )
+
+
+static void ConvertRGBtoYUV(GLint w, GLint h, GLint texel_bytes,
+ const GLubyte *src,
+ GLushort *dest)
+{
+ GLint i, j;
+
+ for (i = 0; i < h; i++) {
+ for (j = 0; j < w; j++) {
+ const GLfloat r = (src[0]) / 255.0;
+ const GLfloat g = (src[1]) / 255.0;
+ const GLfloat b = (src[2]) / 255.0;
+ GLfloat y, cr, cb;
+ GLint iy, icr, icb;
+
+ y = r * 65.481 + g * 128.553 + b * 24.966 + 16;
+ cb = r * -37.797 + g * -74.203 + b * 112.0 + 128;
+ cr = r * 112.0 + g * -93.786 + b * -18.214 + 128;
+ /*printf("%f %f %f -> %f %f %f\n", r, g, b, y, cb, cr);*/
+ iy = (GLint) CLAMP(y, 0, 254);
+ icb = (GLint) CLAMP(cb, 0, 254);
+ icr = (GLint) CLAMP(cr, 0, 254);
+
+ if (j & 1) {
+ /* odd */
+ *dest = (iy << 8) | icr;
+ }
+ else {
+ /* even */
+ *dest = (iy << 8) | icb;
+ }
+ dest++;
+ src += texel_bytes;
+ }
+ }
+}
+
+
+/*
+ * Load an SGI .rgb file and return a pointer to the image data, converted
+ * to 422 yuv.
+ *
+ * Input: imageFile - name of .rgb to read
+ * Output: width - width of image
+ * height - height of image
+ * Return: pointer to image data or NULL if error
+ */
+GLushort *LoadYUVImage( const char *imageFile, GLint *width, GLint *height )
+{
+ TK_RGBImageRec *image;
+ GLushort *buffer;
+
+ image = tkRGBImageLoad( imageFile );
+ if (!image) {
+ return NULL;
+ }
+
+ if (image->components != 3 && image->components !=4 ) {
+ /* not implemented */
+ fprintf(stderr,
+ "Error in LoadYUVImage %d-component images not implemented\n",
+ image->components );
+ return NULL;
+ }
+
+ *width = image->sizeX;
+ *height = image->sizeY;
+
+ buffer = (GLushort *) malloc( image->sizeX * image->sizeY * 2 );
+
+ if (buffer)
+ ConvertRGBtoYUV( image->sizeX,
+ image->sizeY,
+ image->components,
+ image->data,
+ buffer );
+
+
+ FreeImage(image);
+ return buffer;
+}
+
diff --git a/progs/demos/readtex.h b/progs/demos/readtex.h
new file mode 100644
index 0000000000..6c9a3828d3
--- /dev/null
+++ b/progs/demos/readtex.h
@@ -0,0 +1,26 @@
+/* readtex.h */
+
+#ifndef READTEX_H
+#define READTEX_H
+
+
+#include <GL/gl.h>
+
+
+extern GLboolean
+LoadRGBMipmaps( const char *imageFile, GLint intFormat );
+
+
+extern GLboolean
+LoadRGBMipmaps2( const char *imageFile, GLenum target,
+ GLint intFormat, GLint *width, GLint *height );
+
+
+extern GLubyte *
+LoadRGBImage( const char *imageFile,
+ GLint *width, GLint *height, GLenum *format );
+
+extern GLushort *
+LoadYUVImage( const char *imageFile, GLint *width, GLint *height );
+
+#endif
diff --git a/progs/demos/showbuffer.c b/progs/demos/showbuffer.c
new file mode 100644
index 0000000000..b0cedea217
--- /dev/null
+++ b/progs/demos/showbuffer.c
@@ -0,0 +1,198 @@
+/* showbuffer.c */
+
+
+/*
+ * Copy the depth buffer to the color buffer as a grayscale image.
+ * Useful for inspecting the depth buffer values.
+ *
+ * This program is in the public domain.
+ *
+ * Brian Paul November 4, 1998
+ */
+
+
+#include <assert.h>
+#include <stdlib.h>
+#include <GL/gl.h>
+#include "showbuffer.h"
+
+
+
+/*
+ * Copy the depth buffer values into the current color buffer as a
+ * grayscale image.
+ * Input: winWidth, winHeight - size of the window
+ * zBlack - the Z value which should map to black (usually 1)
+ * zWhite - the Z value which should map to white (usually 0)
+ */
+void
+ShowDepthBuffer( GLsizei winWidth, GLsizei winHeight,
+ GLfloat zBlack, GLfloat zWhite )
+{
+ GLfloat *depthValues;
+
+ assert(zBlack >= 0.0);
+ assert(zBlack <= 1.0);
+ assert(zWhite >= 0.0);
+ assert(zWhite <= 1.0);
+ assert(zBlack != zWhite);
+
+ glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+ glPixelStorei(GL_PACK_ALIGNMENT, 1);
+
+ /* Read depth values */
+ depthValues = (GLfloat *) malloc(winWidth * winHeight * sizeof(GLfloat));
+ assert(depthValues);
+ glReadPixels(0, 0, winWidth, winHeight, GL_DEPTH_COMPONENT,
+ GL_FLOAT, depthValues);
+
+ /* Map Z values from [zBlack, zWhite] to gray levels in [0, 1] */
+ /* Not using glPixelTransfer() because it's broke on some systems! */
+ if (zBlack != 0.0 || zWhite != 1.0) {
+ GLfloat scale = 1.0 / (zWhite - zBlack);
+ GLfloat bias = -zBlack * scale;
+ int n = winWidth * winHeight;
+ int i;
+ for (i = 0; i < n; i++)
+ depthValues[i] = depthValues[i] * scale + bias;
+ }
+
+ /* save GL state */
+ glPushAttrib(GL_CURRENT_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT |
+ GL_TRANSFORM_BIT | GL_VIEWPORT_BIT);
+
+ /* setup raster pos for glDrawPixels */
+ glMatrixMode(GL_PROJECTION);
+ glPushMatrix();
+ glLoadIdentity();
+
+ glOrtho(0.0, (GLdouble) winWidth, 0.0, (GLdouble) winHeight, -1.0, 1.0);
+ glMatrixMode(GL_MODELVIEW);
+ glPushMatrix();
+ glLoadIdentity();
+
+ glViewport(0, 0, winWidth, winHeight);
+
+ glDisable(GL_STENCIL_TEST);
+ glDisable(GL_DEPTH_TEST);
+ glRasterPos2f(0, 0);
+
+ glDrawPixels(winWidth, winHeight, GL_LUMINANCE, GL_FLOAT, depthValues);
+
+ glPopMatrix();
+ glMatrixMode(GL_PROJECTION);
+ glPopMatrix();
+ free(depthValues);
+
+ glPopAttrib();
+}
+
+
+
+
+/*
+ * Copy the alpha channel values into the current color buffer as a
+ * grayscale image.
+ * Input: winWidth, winHeight - size of the window
+ */
+void
+ShowAlphaBuffer( GLsizei winWidth, GLsizei winHeight )
+{
+ GLubyte *alphaValues;
+
+ glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+ glPixelStorei(GL_PACK_ALIGNMENT, 1);
+
+ /* Read alpha values */
+ alphaValues = (GLubyte *) malloc(winWidth * winHeight * sizeof(GLubyte));
+ assert(alphaValues);
+ glReadPixels(0, 0, winWidth, winHeight, GL_ALPHA, GL_UNSIGNED_BYTE, alphaValues);
+
+ /* save GL state */
+ glPushAttrib(GL_CURRENT_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL |
+ GL_TRANSFORM_BIT | GL_VIEWPORT_BIT);
+
+ /* setup raster pos for glDrawPixels */
+ glMatrixMode(GL_PROJECTION);
+ glPushMatrix();
+ glLoadIdentity();
+
+ glOrtho(0.0, (GLdouble) winWidth, 0.0, (GLdouble) winHeight, -1.0, 1.0);
+ glMatrixMode(GL_MODELVIEW);
+ glPushMatrix();
+ glLoadIdentity();
+
+ glViewport(0, 0, winWidth, winHeight);
+
+ glDisable(GL_STENCIL_TEST);
+ glDisable(GL_DEPTH_TEST);
+ glRasterPos2f(0, 0);
+
+ glDrawPixels(winWidth, winHeight, GL_LUMINANCE, GL_UNSIGNED_BYTE, alphaValues);
+
+ glPopMatrix();
+ glMatrixMode(GL_PROJECTION);
+ glPopMatrix();
+ free(alphaValues);
+
+ glPopAttrib();
+}
+
+
+
+/*
+ * Copy the stencil buffer values into the current color buffer as a
+ * grayscale image.
+ * Input: winWidth, winHeight - size of the window
+ * scale, bias - scale and bias to apply to stencil values for display
+ */
+void
+ShowStencilBuffer( GLsizei winWidth, GLsizei winHeight,
+ GLfloat scale, GLfloat bias )
+{
+ GLubyte *stencilValues;
+
+ glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+ glPixelStorei(GL_PACK_ALIGNMENT, 1);
+
+ /* Read stencil values */
+ stencilValues = (GLubyte *) malloc(winWidth * winHeight * sizeof(GLubyte));
+ assert(stencilValues);
+ glReadPixels(0, 0, winWidth, winHeight, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, stencilValues);
+
+ /* save GL state */
+ glPushAttrib(GL_CURRENT_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT |
+ GL_PIXEL_MODE_BIT | GL_TRANSFORM_BIT | GL_VIEWPORT_BIT);
+
+ /* setup raster pos for glDrawPixels */
+ glMatrixMode(GL_PROJECTION);
+ glPushMatrix();
+ glLoadIdentity();
+
+ glOrtho(0.0, (GLdouble) winWidth, 0.0, (GLdouble) winHeight, -1.0, 1.0);
+ glMatrixMode(GL_MODELVIEW);
+ glPushMatrix();
+ glLoadIdentity();
+
+ glViewport(0, 0, winWidth, winHeight);
+
+ glDisable(GL_STENCIL_TEST);
+ glDisable(GL_DEPTH_TEST);
+ glRasterPos2f(0, 0);
+
+ glPixelTransferf(GL_RED_SCALE, scale);
+ glPixelTransferf(GL_RED_BIAS, bias);
+ glPixelTransferf(GL_GREEN_SCALE, scale);
+ glPixelTransferf(GL_GREEN_BIAS, bias);
+ glPixelTransferf(GL_BLUE_SCALE, scale);
+ glPixelTransferf(GL_BLUE_BIAS, bias);
+
+ glDrawPixels(winWidth, winHeight, GL_LUMINANCE, GL_UNSIGNED_BYTE, stencilValues);
+
+ glPopMatrix();
+ glMatrixMode(GL_PROJECTION);
+ glPopMatrix();
+ free(stencilValues);
+
+ glPopAttrib();
+}
diff --git a/progs/demos/showbuffer.h b/progs/demos/showbuffer.h
new file mode 100644
index 0000000000..63533d8e9b
--- /dev/null
+++ b/progs/demos/showbuffer.h
@@ -0,0 +1,36 @@
+/* showbuffer. h*/
+
+/*
+ * Copy the depth buffer to the color buffer as a grayscale image.
+ * Useful for inspecting the depth buffer values.
+ *
+ * This program is in the public domain.
+ *
+ * Brian Paul November 4, 1998
+ */
+
+
+#ifndef SHOWBUFFER_H
+#define SHOWBUFFER_H
+
+
+#include <GL/gl.h>
+
+
+
+extern void
+ShowDepthBuffer( GLsizei winWidth, GLsizei winHeight,
+ GLfloat zBlack, GLfloat zWhite );
+
+
+extern void
+ShowAlphaBuffer( GLsizei winWidth, GLsizei winHeight );
+
+
+extern void
+ShowStencilBuffer( GLsizei winWidth, GLsizei winHeight,
+ GLfloat scale, GLfloat bias );
+
+
+
+#endif
diff --git a/progs/demos/trackball.c b/progs/demos/trackball.c
new file mode 100644
index 0000000000..a6c4c60d06
--- /dev/null
+++ b/progs/demos/trackball.c
@@ -0,0 +1,338 @@
+#include <stdio.h>
+/*
+ * (c) Copyright 1993, 1994, Silicon Graphics, Inc.
+ * 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
+ * the name of Silicon Graphics, Inc. not be used in advertising
+ * or publicity pertaining to distribution of the software without specific,
+ * 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,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
+ * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
+ * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
+ * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
+ * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
+ * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN
+ * 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
+ * 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
+ * clause at DFARS 252.227-7013 and/or in similar or successor
+ * clauses in the FAR or the DOD or NASA FAR Supplement.
+ * Unpublished-- rights reserved under the copyright laws of the
+ * United States. Contractor/manufacturer is Silicon Graphics,
+ * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311.
+ *
+ * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
+ */
+/*
+ * Trackball code:
+ *
+ * Implementation of a virtual trackball.
+ * Implemented by Gavin Bell, lots of ideas from Thant Tessman and
+ * the August '88 issue of Siggraph's "Computer Graphics," pp. 121-129.
+ *
+ * Vector manip code:
+ *
+ * Original code from:
+ * David M. Ciemiewicz, Mark Grossman, Henry Moreton, and Paul Haeberli
+ *
+ * Much mucking with by:
+ * Gavin Bell
+ */
+#if defined(_WIN32)
+#pragma warning (disable:4244) /* disable bogus conversion warnings */
+#endif
+#include <math.h>
+#include "trackball.h"
+
+/*
+ * This size should really be based on the distance from the center of
+ * rotation to the point on the object underneath the mouse. That
+ * point would then track the mouse as closely as possible. This is a
+ * simple example, though, so that is left as an Exercise for the
+ * Programmer.
+ */
+#define TRACKBALLSIZE (0.8f)
+
+/*
+ * Local function prototypes (not defined in trackball.h)
+ */
+static float tb_project_to_sphere(float, float, float);
+static void normalize_quat(float [4]);
+
+static void
+vzero(float v[3])
+{
+ v[0] = 0.0;
+ v[1] = 0.0;
+ v[2] = 0.0;
+}
+
+static void
+vset(float v[3], float x, float y, float z)
+{
+ v[0] = x;
+ v[1] = y;
+ v[2] = z;
+}
+
+static void
+vsub(const float src1[3], const float src2[3], float dst[3])
+{
+ dst[0] = src1[0] - src2[0];
+ dst[1] = src1[1] - src2[1];
+ dst[2] = src1[2] - src2[2];
+}
+
+static void
+vcopy(const float v1[3], float v2[3])
+{
+ register int i;
+ for (i = 0 ; i < 3 ; i++)
+ v2[i] = v1[i];
+}
+
+static void
+vcross(const float v1[3], const float v2[3], float cross[3])
+{
+ float temp[3];
+
+ temp[0] = (v1[1] * v2[2]) - (v1[2] * v2[1]);
+ temp[1] = (v1[2] * v2[0]) - (v1[0] * v2[2]);
+ temp[2] = (v1[0] * v2[1]) - (v1[1] * v2[0]);
+ vcopy(temp, cross);
+}
+
+static float
+vlength(const float v[3])
+{
+ return sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
+}
+
+static void
+vscale(float v[3], float div)
+{
+ v[0] *= div;
+ v[1] *= div;
+ v[2] *= div;
+}
+
+static void
+vnormal(float v[3])
+{
+ vscale(v,1.0/vlength(v));
+}
+
+static float
+vdot(const float v1[3], const float v2[3])
+{
+ return v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2];
+}
+
+static void
+vadd(const float src1[3], const float src2[3], float dst[3])
+{
+ dst[0] = src1[0] + src2[0];
+ dst[1] = src1[1] + src2[1];
+ dst[2] = src1[2] + src2[2];
+}
+
+/*
+ * Ok, simulate a track-ball. Project the points onto the virtual
+ * trackball, then figure out the axis of rotation, which is the cross
+ * product of P1 P2 and O P1 (O is the center of the ball, 0,0,0)
+ * Note: This is a deformed trackball-- is a trackball in the center,
+ * but is deformed into a hyperbolic sheet of rotation away from the
+ * center. This particular function was chosen after trying out
+ * several variations.
+ *
+ * It is assumed that the arguments to this routine are in the range
+ * (-1.0 ... 1.0)
+ */
+void
+trackball(float q[4], float p1x, float p1y, float p2x, float p2y)
+{
+ float a[3]; /* Axis of rotation */
+ float phi; /* how much to rotate about axis */
+ float p1[3], p2[3], d[3];
+ float t;
+
+ if (p1x == p2x && p1y == p2y) {
+ /* Zero rotation */
+ vzero(q);
+ q[3] = 1.0;
+ return;
+ }
+
+ /*
+ * First, figure out z-coordinates for projection of P1 and P2 to
+ * deformed sphere
+ */
+ vset(p1,p1x,p1y,tb_project_to_sphere(TRACKBALLSIZE,p1x,p1y));
+ vset(p2,p2x,p2y,tb_project_to_sphere(TRACKBALLSIZE,p2x,p2y));
+
+ /*
+ * Now, we want the cross product of P1 and P2
+ */
+ vcross(p2,p1,a);
+
+ /*
+ * Figure out how much to rotate around that axis.
+ */
+ vsub(p1,p2,d);
+ t = vlength(d) / (2.0*TRACKBALLSIZE);
+
+ /*
+ * Avoid problems with out-of-control values...
+ */
+ if (t > 1.0) t = 1.0;
+ if (t < -1.0) t = -1.0;
+ phi = 2.0 * asin(t);
+
+ axis_to_quat(a,phi,q);
+}
+
+/*
+ * Given an axis and angle, compute quaternion.
+ */
+void
+axis_to_quat(const float a[3], float phi, float q[4])
+{
+ vcopy(a,q);
+ vnormal(q);
+ vscale(q, sin(phi/2.0));
+ q[3] = cos(phi/2.0);
+}
+
+/*
+ * Project an x,y pair onto a sphere of radius r OR a hyperbolic sheet
+ * if we are away from the center of the sphere.
+ */
+static float
+tb_project_to_sphere(float r, float x, float y)
+{
+ float d, t, z;
+
+ d = sqrt(x*x + y*y);
+ if (d < r * 0.70710678118654752440) { /* Inside sphere */
+ z = sqrt(r*r - d*d);
+ } else { /* On hyperbola */
+ t = r / 1.41421356237309504880;
+ z = t*t / d;
+ }
+ return z;
+}
+
+/*
+ * Given two rotations, e1 and e2, expressed as quaternion rotations,
+ * figure out the equivalent single rotation and stuff it into dest.
+ *
+ * This routine also normalizes the result every RENORMCOUNT times it is
+ * called, to keep error from creeping in.
+ *
+ * NOTE: This routine is written so that q1 or q2 may be the same
+ * as dest (or each other).
+ */
+
+#define RENORMCOUNT 97
+
+void
+add_quats(const float q1[4], const float q2[4], float dest[4])
+{
+ static int count=0;
+ float t1[4], t2[4], t3[4];
+ float tf[4];
+
+#if 0
+printf("q1 = %f %f %f %f\n", q1[0], q1[1], q1[2], q1[3]);
+printf("q2 = %f %f %f %f\n", q2[0], q2[1], q2[2], q2[3]);
+#endif
+
+ vcopy(q1,t1);
+ vscale(t1,q2[3]);
+
+ vcopy(q2,t2);
+ vscale(t2,q1[3]);
+
+ vcross(q2,q1,t3);
+ vadd(t1,t2,tf);
+ vadd(t3,tf,tf);
+ tf[3] = q1[3] * q2[3] - vdot(q1,q2);
+
+#if 0
+printf("tf = %f %f %f %f\n", tf[0], tf[1], tf[2], tf[3]);
+#endif
+
+ dest[0] = tf[0];
+ dest[1] = tf[1];
+ dest[2] = tf[2];
+ dest[3] = tf[3];
+
+ if (++count > RENORMCOUNT) {
+ count = 0;
+ normalize_quat(dest);
+ }
+}
+
+/*
+ * Quaternions always obey: a^2 + b^2 + c^2 + d^2 = 1.0
+ * If they don't add up to 1.0, dividing by their magnitued will
+ * renormalize them.
+ *
+ * Note: See the following for more information on quaternions:
+ *
+ * - Shoemake, K., Animating rotation with quaternion curves, Computer
+ * Graphics 19, No 3 (Proc. SIGGRAPH'85), 245-254, 1985.
+ * - Pletinckx, D., Quaternion calculus as a basic tool in computer
+ * graphics, The Visual Computer 5, 2-13, 1989.
+ */
+static void
+normalize_quat(float q[4])
+{
+ int i;
+ float mag;
+
+ mag = sqrt(q[0]*q[0] + q[1]*q[1] + q[2]*q[2] + q[3]*q[3]);
+ for (i = 0; i < 4; i++)
+ q[i] /= mag;
+}
+
+/*
+ * Build a rotation matrix, given a quaternion rotation.
+ *
+ */
+void
+build_rotmatrix(float m[4][4], const float q[4])
+{
+ m[0][0] = 1.0 - 2.0 * (q[1] * q[1] + q[2] * q[2]);
+ m[0][1] = 2.0 * (q[0] * q[1] - q[2] * q[3]);
+ m[0][2] = 2.0 * (q[2] * q[0] + q[1] * q[3]);
+ m[0][3] = 0.0;
+
+ m[1][0] = 2.0 * (q[0] * q[1] + q[2] * q[3]);
+ m[1][1]= 1.0 - 2.0 * (q[2] * q[2] + q[0] * q[0]);
+ m[1][2] = 2.0 * (q[1] * q[2] - q[0] * q[3]);
+ m[1][3] = 0.0;
+
+ m[2][0] = 2.0 * (q[2] * q[0] - q[1] * q[3]);
+ m[2][1] = 2.0 * (q[1] * q[2] + q[0] * q[3]);
+ m[2][2] = 1.0 - 2.0 * (q[1] * q[1] + q[0] * q[0]);
+ m[2][3] = 0.0;
+
+ m[3][0] = 0.0;
+ m[3][1] = 0.0;
+ m[3][2] = 0.0;
+ m[3][3] = 1.0;
+}
+
diff --git a/progs/demos/trackball.h b/progs/demos/trackball.h
new file mode 100644
index 0000000000..9b278640e1
--- /dev/null
+++ b/progs/demos/trackball.h
@@ -0,0 +1,84 @@
+/*
+ * (c) Copyright 1993, 1994, Silicon Graphics, Inc.
+ * 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
+ * the name of Silicon Graphics, Inc. not be used in advertising
+ * or publicity pertaining to distribution of the software without specific,
+ * 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,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
+ * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
+ * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
+ * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
+ * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
+ * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN
+ * 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
+ * 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
+ * clause at DFARS 252.227-7013 and/or in similar or successor
+ * clauses in the FAR or the DOD or NASA FAR Supplement.
+ * Unpublished-- rights reserved under the copyright laws of the
+ * United States. Contractor/manufacturer is Silicon Graphics,
+ * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311.
+ *
+ * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
+ */
+/*
+ * trackball.h
+ * A virtual trackball implementation
+ * Written by Gavin Bell for Silicon Graphics, November 1988.
+ */
+
+#ifndef TRACKBALL_H
+#define TRACKBALL_H
+
+
+/*
+ * Pass the x and y coordinates of the last and current positions of
+ * the mouse, scaled so they are from (-1.0 ... 1.0).
+ *
+ * The resulting rotation is returned as a quaternion rotation in the
+ * first paramater.
+ */
+void
+trackball(float q[4], float p1x, float p1y, float p2x, float p2y);
+
+/*
+ * Given two quaternions, add them together to get a third quaternion.
+ * Adding quaternions to get a compound rotation is analagous to adding
+ * translations to get a compound translation. When incrementally
+ * adding rotations, the first argument here should be the new
+ * rotation, the second and third the total rotation (which will be
+ * over-written with the resulting new total rotation).
+ */
+void
+add_quats(const float q1[4], const float q2[4], float dest[4]);
+
+/*
+ * A useful function, builds a rotation matrix in Matrix based on
+ * given quaternion.
+ */
+void
+build_rotmatrix(float m[4][4], const float q[4]);
+
+/*
+ * This function computes a quaternion based on an axis (defined by
+ * the given vector) and an angle about which to rotate. The angle is
+ * expressed in radians. The result is put into the third argument.
+ */
+void
+axis_to_quat(const float a[3], float phi, float q[4]);
+
+
+#endif /* TRACKBALL_H */
diff --git a/progs/directfb/.gitignore b/progs/directfb/.gitignore
deleted file mode 100644
index 55d65fb5b0..0000000000
--- a/progs/directfb/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-df_gears
-df_morph3d
-df_reflect
-multi_window
diff --git a/progs/directfb/Makefile b/progs/directfb/Makefile
deleted file mode 100644
index 93c2a7df14..0000000000
--- a/progs/directfb/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-# progs/directfb/Makefile
-
-TOP = ../..
-include $(TOP)/configs/current
-
-
-INCDIR = $(TOP)/include -I$(TOP)/progs
-
-LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME)
-
-CFLAGS += $(shell pkg-config --cflags directfb)
-APP_LIB_DEPS += $(shell pkg-config --libs directfb)
-
-LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
-
-PROGS = df_gears \
- df_reflect \
- df_morph3d \
- multi_window
-
-##### RULES #####
-
-.SUFFIXES:
-.SUFFIXES: .c
-
-.c: $(LIB_DEP)
- $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
-
-
-##### TARGETS #####
-
-default: $(PROGS)
-
-
-clean:
- -rm -f $(PROGS)
- -rm -f *.o *~
-
diff --git a/progs/directfb/df_gears.c b/progs/directfb/df_gears.c
deleted file mode 100644
index c480767bd3..0000000000
--- a/progs/directfb/df_gears.c
+++ /dev/null
@@ -1,480 +0,0 @@
-/*
- (c) Copyright 2001 convergence integrated media GmbH.
- All rights reserved.
-
- Written by Denis Oliver Kropp <dok@convergence.de> and
- Andreas Hundt <andi@convergence.de>.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-*/
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <math.h>
-
-#include <directfb.h>
-#include <directfbgl.h>
-
-#include <GL/gl.h>
-
-
-/* the super interface */
-IDirectFB *dfb;
-
-/* the primary surface (surface of primary layer) */
-IDirectFBSurface *primary;
-
-/* the GL context */
-IDirectFBGL *primary_gl;
-
-/* our font */
-IDirectFBFont *font;
-
-/* event buffer */
-IDirectFBEventBuffer *events;
-
-/* macro for a safe call to DirectFB functions */
-#define DFBCHECK(x...) \
- { \
- err = x; \
- if (err != DFB_OK) { \
- fprintf( stderr, "%s <%d>:\n\t", __FILE__, __LINE__ ); \
- DirectFBErrorFatal( #x, err ); \
- } \
- }
-
-static int screen_width, screen_height;
-
-static unsigned long T0 = 0;
-static GLint Frames = 0;
-static GLfloat fps = 0;
-
-static inline unsigned long get_millis()
-{
- struct timeval tv;
-
- gettimeofday (&tv, NULL);
- return (tv.tv_sec * 1000 + tv.tv_usec / 1000);
-}
-
-
-#ifndef M_PI
-#define M_PI 3.14159265
-#endif
-
-/**
-
- 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 GLfloat inc_rotx = 0, inc_roty = 0, inc_rotz = 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();
-}
-
-/* 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(int argc, char *argv[])
-{
- 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};
- GLint i;
-
- 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);
-
- for ( i=1; i<argc; i++ ) {
- if (strcmp(argv[i], "-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[] )
-{
- int quit = 0;
- DFBResult err;
- DFBSurfaceDescription dsc;
-
- DFBCHECK(DirectFBInit( &argc, &argv ));
-
- /* create the super interface */
- DFBCHECK(DirectFBCreate( &dfb ));
-
- /* create an event buffer for all devices with these caps */
- DFBCHECK(dfb->CreateInputEventBuffer( dfb, DICAPS_KEYS | DICAPS_AXES,
- DFB_FALSE, &events ));
-
- /* set our cooperative level to DFSCL_FULLSCREEN
- for exclusive access to the primary layer */
- dfb->SetCooperativeLevel( dfb, DFSCL_FULLSCREEN );
-
- /* get the primary surface, i.e. the surface of the
- primary layer we have exclusive access to */
- dsc.flags = DSDESC_CAPS;
- dsc.caps = DSCAPS_PRIMARY | DSCAPS_DOUBLE;
-
- DFBCHECK(dfb->CreateSurface( dfb, &dsc, &primary ));
-
- /* get the size of the surface and fill it */
- DFBCHECK(primary->GetSize( primary, &screen_width, &screen_height ));
- DFBCHECK(primary->FillRectangle( primary, 0, 0,
- screen_width, screen_height ));
- primary->Flip( primary, NULL, 0 );
-
- /* create the default font and set it */
- DFBCHECK(dfb->CreateFont( dfb, NULL, NULL, &font ));
- DFBCHECK(primary->SetFont( primary, font ));
-
- /* get the GL context */
- DFBCHECK(primary->GetGL( primary, &primary_gl ));
-
- DFBCHECK(primary_gl->Lock( primary_gl ));
-
- init(argc, argv);
- reshape(screen_width, screen_height);
-
- DFBCHECK(primary_gl->Unlock( primary_gl ));
-
- T0 = get_millis();
-
- while (!quit) {
- DFBInputEvent evt;
- unsigned long t;
-
- DFBCHECK(primary_gl->Lock( primary_gl ));
-
- draw();
-
- DFBCHECK(primary_gl->Unlock( primary_gl ));
-
- if (fps) {
- char buf[64];
-
- snprintf(buf, 64, "%4.1f FPS\n", fps);
-
- primary->SetColor( primary, 0xff, 0, 0, 0xff );
- primary->DrawString( primary, buf, -1, screen_width - 5, 5, DSTF_TOPRIGHT );
- }
-
- primary->Flip( primary, NULL, 0 );
- Frames++;
-
-
- t = get_millis();
- if (t - T0 >= 2000) {
- GLfloat seconds = (t - T0) / 1000.0;
-
- fps = Frames / seconds;
-
- T0 = t;
- Frames = 0;
- }
-
-
- while (events->GetEvent( events, DFB_EVENT(&evt) ) == DFB_OK) {
- switch (evt.type) {
- case DIET_KEYPRESS:
- switch (evt.key_symbol) {
- case DIKS_ESCAPE:
- quit = 1;
- break;
- case DIKS_CURSOR_UP:
- inc_rotx = 5.0;
- break;
- case DIKS_CURSOR_DOWN:
- inc_rotx = -5.0;
- break;
- case DIKS_CURSOR_LEFT:
- inc_roty = 5.0;
- break;
- case DIKS_CURSOR_RIGHT:
- inc_roty = -5.0;
- break;
- case DIKS_PAGE_UP:
- inc_rotz = 5.0;
- break;
- case DIKS_PAGE_DOWN:
- inc_rotz = -5.0;
- break;
- default:
- ;
- }
- break;
- case DIET_KEYRELEASE:
- switch (evt.key_symbol) {
- case DIKS_CURSOR_UP:
- inc_rotx = 0;
- break;
- case DIKS_CURSOR_DOWN:
- inc_rotx = 0;
- break;
- case DIKS_CURSOR_LEFT:
- inc_roty = 0;
- break;
- case DIKS_CURSOR_RIGHT:
- inc_roty = 0;
- break;
- case DIKS_PAGE_UP:
- inc_rotz = 0;
- break;
- case DIKS_PAGE_DOWN:
- inc_rotz = 0;
- break;
- default:
- ;
- }
- break;
- case DIET_AXISMOTION:
- if (evt.flags & DIEF_AXISREL) {
- switch (evt.axis) {
- case DIAI_X:
- view_roty += evt.axisrel / 2.0;
- break;
- case DIAI_Y:
- view_rotx += evt.axisrel / 2.0;
- break;
- case DIAI_Z:
- view_rotz += evt.axisrel / 2.0;
- break;
- default:
- ;
- }
- }
- break;
- default:
- ;
- }
- }
-
- angle += 2.0;
-
- view_rotx += inc_rotx;
- view_roty += inc_roty;
- view_rotz += inc_rotz;
- }
-
- /* release our interfaces to shutdown DirectFB */
- primary_gl->Release( primary_gl );
- primary->Release( primary );
- font->Release( font );
- events->Release( events );
- dfb->Release( dfb );
-
- return 0;
-}
-
diff --git a/progs/directfb/df_morph3d.c b/progs/directfb/df_morph3d.c
deleted file mode 100644
index 2730fa6156..0000000000
--- a/progs/directfb/df_morph3d.c
+++ /dev/null
@@ -1,1013 +0,0 @@
-/*
- (c) Copyright 2001 convergence integrated media GmbH.
- All rights reserved.
-
- Written by Denis Oliver Kropp <dok@convergence.de> and
- Andreas Hundt <andi@convergence.de>.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-*/
-
-/*-
- * morph3d.c - Shows 3D morphing objects
- *
- * Converted to GLUT by brianp on 1/1/98
- *
- * This program was inspired on a WindowsNT(R)'s screen saver. It was written
- * from scratch and it was not based on any other source code.
- *
- * Porting it to xlock (the final objective of this code since the moment I
- * decided to create it) was possible by comparing the original Mesa's gear
- * demo with it's ported version, so thanks for Danny Sung for his indirect
- * help (look at gear.c in xlock source tree). NOTE: At the moment this code
- * was sent to Brian Paul for package inclusion, the XLock Version was not
- * available. In fact, I'll wait it to appear on the next Mesa release (If you
- * are reading this, it means THIS release) to send it for xlock package
- * inclusion). It will probably there be a GLUT version too.
- *
- * Thanks goes also to Brian Paul for making it possible and inexpensive
- * to use OpenGL at home.
- *
- * Since I'm not a native english speaker, my apologies for any gramatical
- * mistake.
- *
- * My e-mail addresses are
- *
- * vianna@cat.cbpf.br
- * and
- * marcelo@venus.rdc.puc-rio.br
- *
- * Marcelo F. Vianna (Feb-13-1997)
- */
-
-/*
-This document is VERY incomplete, but tries to describe the mathematics used
-in the program. At this moment it just describes how the polyhedra are
-generated. On futhurer versions, this document will be probabbly improved.
-
-Since I'm not a native english speaker, my apologies for any gramatical
-mistake.
-
-Marcelo Fernandes Vianna
-- Undergraduate in Computer Engeneering at Catholic Pontifical University
-- of Rio de Janeiro (PUC-Rio) Brasil.
-- e-mail: vianna@cat.cbpf.br or marcelo@venus.rdc.puc-rio.br
-- Feb-13-1997
-
-POLYHEDRA GENERATION
-
-For the purpose of this program it's not sufficient to know the polyhedra
-vertexes coordinates. Since the morphing algorithm applies a nonlinear
-transformation over the surfaces (faces) of the polyhedron, each face has
-to be divided into smaller ones. The morphing algorithm needs to transform
-each vertex of these smaller faces individually. It's a very time consoming
-task.
-
-In order to reduce calculation overload, and since all the macro faces of
-the polyhedron are transformed by the same way, the generation is made by
-creating only one face of the polyhedron, morphing it and then rotating it
-around the polyhedron center.
-
-What we need to know is the face radius of the polyhedron (the radius of
-the inscribed sphere) and the angle between the center of two adjacent
-faces using the center of the sphere as the angle's vertex.
-
-The face radius of the regular polyhedra are known values which I decided
-to not waste my time calculating. Following is a table of face radius for
-the regular polyhedra with edge length = 1:
-
- TETRAHEDRON : 1/(2*sqrt(2))/sqrt(3)
- CUBE : 1/2
- OCTAHEDRON : 1/sqrt(6)
- DODECAHEDRON : T^2 * sqrt((T+2)/5) / 2 -> where T=(sqrt(5)+1)/2
- ICOSAHEDRON : (3*sqrt(3)+sqrt(15))/12
-
-I've not found any reference about the mentioned angles, so I needed to
-calculate them, not a trivial task until I figured out how :)
-Curiously these angles are the same for the tetrahedron and octahedron.
-A way to obtain this value is inscribing the tetrahedron inside the cube
-by matching their vertexes. So you'll notice that the remaining unmatched
-vertexes are in the same straight line starting in the cube/tetrahedron
-center and crossing the center of each tetrahedron's face. At this point
-it's easy to obtain the bigger angle of the isosceles triangle formed by
-the center of the cube and two opposite vertexes on the same cube face.
-The edges of this triangle have the following lenghts: sqrt(2) for the base
-and sqrt(3)/2 for the other two other edges. So the angle we want is:
- +-----------------------------------------------------------+
- | 2*ARCSIN(sqrt(2)/sqrt(3)) = 109.47122063449069174 degrees |
- +-----------------------------------------------------------+
-For the cube this angle is obvious, but just for formality it can be
-easily obtained because we also know it's isosceles edge lenghts:
-sqrt(2)/2 for the base and 1/2 for the other two edges. So the angle we
-want is:
- +-----------------------------------------------------------+
- | 2*ARCSIN((sqrt(2)/2)/1) = 90.000000000000000000 degrees |
- +-----------------------------------------------------------+
-For the octahedron we use the same idea used for the tetrahedron, but now
-we inscribe the cube inside the octahedron so that all cubes's vertexes
-matches excatly the center of each octahedron's face. It's now clear that
-this angle is the same of the thetrahedron one:
- +-----------------------------------------------------------+
- | 2*ARCSIN(sqrt(2)/sqrt(3)) = 109.47122063449069174 degrees |
- +-----------------------------------------------------------+
-For the dodecahedron it's a little bit harder because it's only relationship
-with the cube is useless to us. So we need to solve the problem by another
-way. The concept of Face radius also exists on 2D polygons with the name
-Edge radius:
- Edge Radius For Pentagon (ERp)
- ERp = (1/2)/TAN(36 degrees) * VRp = 0.6881909602355867905
- (VRp is the pentagon's vertex radio).
- Face Radius For Dodecahedron
- FRd = T^2 * sqrt((T+2)/5) / 2 = 1.1135163644116068404
-Why we need ERp? Well, ERp and FRd segments forms a 90 degrees angle,
-completing this triangle, the lesser angle is a half of the angle we are
-looking for, so this angle is:
- +-----------------------------------------------------------+
- | 2*ARCTAN(ERp/FRd) = 63.434948822922009981 degrees |
- +-----------------------------------------------------------+
-For the icosahedron we can use the same method used for dodecahedron (well
-the method used for dodecahedron may be used for all regular polyhedra)
- Edge Radius For Triangle (this one is well known: 1/3 of the triangle height)
- ERt = sin(60)/3 = sqrt(3)/6 = 0.2886751345948128655
- Face Radius For Icosahedron
- FRi= (3*sqrt(3)+sqrt(15))/12 = 0.7557613140761707538
-So the angle is:
- +-----------------------------------------------------------+
- | 2*ARCTAN(ERt/FRi) = 41.810314895778596167 degrees |
- +-----------------------------------------------------------+
-
-*/
-
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <math.h>
-#include <unistd.h>
-
-#include <directfb.h>
-#include <directfbgl.h>
-
-#include <GL/gl.h>
-
-
-/* the super interface */
-IDirectFB *dfb;
-
-/* the primary surface (surface of primary layer) */
-IDirectFBSurface *primary;
-
-/* the GL context */
-IDirectFBGL *primary_gl;
-
-/* our font */
-IDirectFBFont *font;
-
-/* event buffer */
-IDirectFBEventBuffer *events;
-
-/* macro for a safe call to DirectFB functions */
-#define DFBCHECK(x...) \
- { \
- err = x; \
- if (err != DFB_OK) { \
- fprintf( stderr, "%s <%d>:\n\t", __FILE__, __LINE__ ); \
- DirectFBErrorFatal( #x, err ); \
- } \
- }
-
-static int screen_width, screen_height;
-
-static unsigned long T0 = 0;
-static GLint Frames = 0;
-static GLfloat fps = 0;
-
-static inline unsigned long get_millis()
-{
- struct timeval tv;
-
- gettimeofday (&tv, NULL);
- return (tv.tv_sec * 1000 + tv.tv_usec / 1000);
-}
-
-
-
-#define Scale 0.3
-
-#define VectMul(X1,Y1,Z1,X2,Y2,Z2) (Y1)*(Z2)-(Z1)*(Y2),(Z1)*(X2)-(X1)*(Z2),(X1)*(Y2)-(Y1)*(X2)
-#define sqr(A) ((A)*(A))
-
-/* Increasing this values produces better image quality, the price is speed. */
-/* Very low values produces erroneous/incorrect plotting */
-#define tetradivisions 23
-#define cubedivisions 20
-#define octadivisions 21
-#define dodecadivisions 10
-#define icodivisions 15
-
-#define tetraangle 109.47122063449069174
-#define cubeangle 90.000000000000000000
-#define octaangle 109.47122063449069174
-#define dodecaangle 63.434948822922009981
-#define icoangle 41.810314895778596167
-
-#ifndef Pi
-#define Pi 3.1415926535897932385
-#endif
-#define SQRT2 1.4142135623730951455
-#define SQRT3 1.7320508075688771932
-#define SQRT5 2.2360679774997898051
-#define SQRT6 2.4494897427831778813
-#define SQRT15 3.8729833462074170214
-#define cossec36_2 0.8506508083520399322
-#define cos72 0.3090169943749474241
-#define sin72 0.9510565162951535721
-#define cos36 0.8090169943749474241
-#define sin36 0.5877852522924731292
-
-/*************************************************************************/
-
-static int mono=0;
-static int smooth=1;
-static GLint WindH, WindW;
-static GLfloat step=0;
-static GLfloat seno;
-static int object;
-static int edgedivisions;
-static void (*draw_object)( void );
-static float Magnitude;
-static float *MaterialColor[20];
-
-static float front_shininess[] = {60.0};
-static float front_specular[] = { 0.7, 0.7, 0.7, 1.0 };
-static float ambient[] = { 0.0, 0.0, 0.0, 1.0 };
-static float diffuse[] = { 1.0, 1.0, 1.0, 1.0 };
-static float position0[] = { 1.0, 1.0, 1.0, 0.0 };
-static float position1[] = {-1.0,-1.0, 1.0, 0.0 };
-static float lmodel_ambient[] = { 0.5, 0.5, 0.5, 1.0 };
-static float lmodel_twoside[] = {GL_TRUE};
-
-static float MaterialRed[] = { 0.7, 0.0, 0.0, 1.0 };
-static float MaterialGreen[] = { 0.1, 0.5, 0.2, 1.0 };
-static float MaterialBlue[] = { 0.0, 0.0, 0.7, 1.0 };
-static float MaterialCyan[] = { 0.2, 0.5, 0.7, 1.0 };
-static float MaterialYellow[] = { 0.7, 0.7, 0.0, 1.0 };
-static float MaterialMagenta[] = { 0.6, 0.2, 0.5, 1.0 };
-static float MaterialWhite[] = { 0.7, 0.7, 0.7, 1.0 };
-static float MaterialGray[] = { 0.2, 0.2, 0.2, 1.0 };
-
-#define TRIANGLE(Edge, Amp, Divisions, Z) \
-{ \
- GLfloat Xf,Yf,Xa,Yb,Xf2,Yf2; \
- GLfloat Factor,Factor1,Factor2; \
- GLfloat VertX,VertY,VertZ,NeiAX,NeiAY,NeiAZ,NeiBX,NeiBY,NeiBZ; \
- GLfloat Ax,Ay,Bx; \
- int Ri,Ti; \
- GLfloat Vr=(Edge)*SQRT3/3; \
- GLfloat AmpVr2=(Amp)/sqr(Vr); \
- GLfloat Zf=(Edge)*(Z); \
- \
- Ax=(Edge)*(+0.5/(Divisions)), Ay=(Edge)*(-SQRT3/(2*Divisions)); \
- Bx=(Edge)*(-0.5/(Divisions)); \
- \
- for (Ri=1; Ri<=(Divisions); Ri++) { \
- glBegin(GL_TRIANGLE_STRIP); \
- for (Ti=0; Ti<Ri; Ti++) { \
- Xf=(float)(Ri-Ti)*Ax + (float)Ti*Bx; \
- Yf=Vr+(float)(Ri-Ti)*Ay + (float)Ti*Ay; \
- Xa=Xf+0.001; Yb=Yf+0.001; \
- Factor=1-(((Xf2=sqr(Xf))+(Yf2=sqr(Yf)))*AmpVr2); \
- Factor1=1-((sqr(Xa)+Yf2)*AmpVr2); \
- Factor2=1-((Xf2+sqr(Yb))*AmpVr2); \
- VertX=Factor*Xf; VertY=Factor*Yf; VertZ=Factor*Zf; \
- NeiAX=Factor1*Xa-VertX; NeiAY=Factor1*Yf-VertY; NeiAZ=Factor1*Zf-VertZ; \
- NeiBX=Factor2*Xf-VertX; NeiBY=Factor2*Yb-VertY; NeiBZ=Factor2*Zf-VertZ; \
- glNormal3f(VectMul(NeiAX, NeiAY, NeiAZ, NeiBX, NeiBY, NeiBZ)); \
- glVertex3f(VertX, VertY, VertZ); \
- \
- Xf=(float)(Ri-Ti-1)*Ax + (float)Ti*Bx; \
- Yf=Vr+(float)(Ri-Ti-1)*Ay + (float)Ti*Ay; \
- Xa=Xf+0.001; Yb=Yf+0.001; \
- Factor=1-(((Xf2=sqr(Xf))+(Yf2=sqr(Yf)))*AmpVr2); \
- Factor1=1-((sqr(Xa)+Yf2)*AmpVr2); \
- Factor2=1-((Xf2+sqr(Yb))*AmpVr2); \
- VertX=Factor*Xf; VertY=Factor*Yf; VertZ=Factor*Zf; \
- NeiAX=Factor1*Xa-VertX; NeiAY=Factor1*Yf-VertY; NeiAZ=Factor1*Zf-VertZ; \
- NeiBX=Factor2*Xf-VertX; NeiBY=Factor2*Yb-VertY; NeiBZ=Factor2*Zf-VertZ; \
- glNormal3f(VectMul(NeiAX, NeiAY, NeiAZ, NeiBX, NeiBY, NeiBZ)); \
- glVertex3f(VertX, VertY, VertZ); \
- \
- } \
- Xf=(float)Ri*Bx; \
- Yf=Vr+(float)Ri*Ay; \
- Xa=Xf+0.001; Yb=Yf+0.001; \
- Factor=1-(((Xf2=sqr(Xf))+(Yf2=sqr(Yf)))*AmpVr2); \
- Factor1=1-((sqr(Xa)+Yf2)*AmpVr2); \
- Factor2=1-((Xf2+sqr(Yb))*AmpVr2); \
- VertX=Factor*Xf; VertY=Factor*Yf; VertZ=Factor*Zf; \
- NeiAX=Factor1*Xa-VertX; NeiAY=Factor1*Yf-VertY; NeiAZ=Factor1*Zf-VertZ; \
- NeiBX=Factor2*Xf-VertX; NeiBY=Factor2*Yb-VertY; NeiBZ=Factor2*Zf-VertZ; \
- glNormal3f(VectMul(NeiAX, NeiAY, NeiAZ, NeiBX, NeiBY, NeiBZ)); \
- glVertex3f(VertX, VertY, VertZ); \
- glEnd(); \
- } \
-}
-
-#define SQUARE(Edge, Amp, Divisions, Z) \
-{ \
- int Xi,Yi; \
- GLfloat Xf,Yf,Y,Xf2,Yf2,Y2,Xa,Yb; \
- GLfloat Factor,Factor1,Factor2; \
- GLfloat VertX,VertY,VertZ,NeiAX,NeiAY,NeiAZ,NeiBX,NeiBY,NeiBZ; \
- GLfloat Zf=(Edge)*(Z); \
- GLfloat AmpVr2=(Amp)/sqr((Edge)*SQRT2/2); \
- \
- for (Yi=0; Yi<(Divisions); Yi++) { \
- Yf=-((Edge)/2.0) + ((float)Yi)/(Divisions)*(Edge); \
- Yf2=sqr(Yf); \
- Y=Yf+1.0/(Divisions)*(Edge); \
- Y2=sqr(Y); \
- glBegin(GL_QUAD_STRIP); \
- for (Xi=0; Xi<=(Divisions); Xi++) { \
- Xf=-((Edge)/2.0) + ((float)Xi)/(Divisions)*(Edge); \
- Xf2=sqr(Xf); \
- \
- Xa=Xf+0.001; Yb=Y+0.001; \
- Factor=1-((Xf2+Y2)*AmpVr2); \
- Factor1=1-((sqr(Xa)+Y2)*AmpVr2); \
- Factor2=1-((Xf2+sqr(Yb))*AmpVr2); \
- VertX=Factor*Xf; VertY=Factor*Y; VertZ=Factor*Zf; \
- NeiAX=Factor1*Xa-VertX; NeiAY=Factor1*Y-VertY; NeiAZ=Factor1*Zf-VertZ; \
- NeiBX=Factor2*Xf-VertX; NeiBY=Factor2*Yb-VertY; NeiBZ=Factor2*Zf-VertZ; \
- glNormal3f(VectMul(NeiAX, NeiAY, NeiAZ, NeiBX, NeiBY, NeiBZ)); \
- glVertex3f(VertX, VertY, VertZ); \
- \
- Xa=Xf+0.001; Yb=Yf+0.001; \
- Factor=1-((Xf2+Yf2)*AmpVr2); \
- Factor1=1-((sqr(Xa)+Yf2)*AmpVr2); \
- Factor2=1-((Xf2+sqr(Yb))*AmpVr2); \
- VertX=Factor*Xf; VertY=Factor*Yf; VertZ=Factor*Zf; \
- NeiAX=Factor1*Xa-VertX; NeiAY=Factor1*Yf-VertY; NeiAZ=Factor1*Zf-VertZ; \
- NeiBX=Factor2*Xf-VertX; NeiBY=Factor2*Yb-VertY; NeiBZ=Factor2*Zf-VertZ; \
- glNormal3f(VectMul(NeiAX, NeiAY, NeiAZ, NeiBX, NeiBY, NeiBZ)); \
- glVertex3f(VertX, VertY, VertZ); \
- } \
- glEnd(); \
- } \
-}
-
-#define PENTAGON(Edge, Amp, Divisions, Z) \
-{ \
- int Ri,Ti,Fi; \
- GLfloat Xf,Yf,Xa,Yb,Xf2,Yf2; \
- GLfloat x[6],y[6]; \
- GLfloat Factor,Factor1,Factor2; \
- GLfloat VertX,VertY,VertZ,NeiAX,NeiAY,NeiAZ,NeiBX,NeiBY,NeiBZ; \
- GLfloat Zf=(Edge)*(Z); \
- GLfloat AmpVr2=(Amp)/sqr((Edge)*cossec36_2); \
- \
- for(Fi=0;Fi<6;Fi++) { \
- x[Fi]=-cos( Fi*2*Pi/5 + Pi/10 )/(Divisions)*cossec36_2*(Edge); \
- y[Fi]=sin( Fi*2*Pi/5 + Pi/10 )/(Divisions)*cossec36_2*(Edge); \
- } \
- \
- for (Ri=1; Ri<=(Divisions); Ri++) { \
- for (Fi=0; Fi<5; Fi++) { \
- glBegin(GL_TRIANGLE_STRIP); \
- for (Ti=0; Ti<Ri; Ti++) { \
- Xf=(float)(Ri-Ti)*x[Fi] + (float)Ti*x[Fi+1]; \
- Yf=(float)(Ri-Ti)*y[Fi] + (float)Ti*y[Fi+1]; \
- Xa=Xf+0.001; Yb=Yf+0.001; \
- Factor=1-(((Xf2=sqr(Xf))+(Yf2=sqr(Yf)))*AmpVr2); \
- Factor1=1-((sqr(Xa)+Yf2)*AmpVr2); \
- Factor2=1-((Xf2+sqr(Yb))*AmpVr2); \
- VertX=Factor*Xf; VertY=Factor*Yf; VertZ=Factor*Zf; \
- NeiAX=Factor1*Xa-VertX; NeiAY=Factor1*Yf-VertY; NeiAZ=Factor1*Zf-VertZ; \
- NeiBX=Factor2*Xf-VertX; NeiBY=Factor2*Yb-VertY; NeiBZ=Factor2*Zf-VertZ; \
- glNormal3f(VectMul(NeiAX, NeiAY, NeiAZ, NeiBX, NeiBY, NeiBZ)); \
- glVertex3f(VertX, VertY, VertZ); \
- \
- Xf=(float)(Ri-Ti-1)*x[Fi] + (float)Ti*x[Fi+1]; \
- Yf=(float)(Ri-Ti-1)*y[Fi] + (float)Ti*y[Fi+1]; \
- Xa=Xf+0.001; Yb=Yf+0.001; \
- Factor=1-(((Xf2=sqr(Xf))+(Yf2=sqr(Yf)))*AmpVr2); \
- Factor1=1-((sqr(Xa)+Yf2)*AmpVr2); \
- Factor2=1-((Xf2+sqr(Yb))*AmpVr2); \
- VertX=Factor*Xf; VertY=Factor*Yf; VertZ=Factor*Zf; \
- NeiAX=Factor1*Xa-VertX; NeiAY=Factor1*Yf-VertY; NeiAZ=Factor1*Zf-VertZ; \
- NeiBX=Factor2*Xf-VertX; NeiBY=Factor2*Yb-VertY; NeiBZ=Factor2*Zf-VertZ; \
- glNormal3f(VectMul(NeiAX, NeiAY, NeiAZ, NeiBX, NeiBY, NeiBZ)); \
- glVertex3f(VertX, VertY, VertZ); \
- \
- } \
- Xf=(float)Ri*x[Fi+1]; \
- Yf=(float)Ri*y[Fi+1]; \
- Xa=Xf+0.001; Yb=Yf+0.001; \
- Factor=1-(((Xf2=sqr(Xf))+(Yf2=sqr(Yf)))*AmpVr2); \
- Factor1=1-((sqr(Xa)+Yf2)*AmpVr2); \
- Factor2=1-((Xf2+sqr(Yb))*AmpVr2); \
- VertX=Factor*Xf; VertY=Factor*Yf; VertZ=Factor*Zf; \
- NeiAX=Factor1*Xa-VertX; NeiAY=Factor1*Yf-VertY; NeiAZ=Factor1*Zf-VertZ; \
- NeiBX=Factor2*Xf-VertX; NeiBY=Factor2*Yb-VertY; NeiBZ=Factor2*Zf-VertZ; \
- glNormal3f(VectMul(NeiAX, NeiAY, NeiAZ, NeiBX, NeiBY, NeiBZ)); \
- glVertex3f(VertX, VertY, VertZ); \
- glEnd(); \
- } \
- } \
-}
-
-static void draw_tetra( void )
-{
- GLuint list;
-
- list = glGenLists( 1 );
- glNewList( list, GL_COMPILE );
- TRIANGLE(2,seno,edgedivisions,0.5/SQRT6);
- glEndList();
-
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[0]);
- glCallList(list);
- glPushMatrix();
- glRotatef(180,0,0,1);
- glRotatef(-tetraangle,1,0,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[1]);
- glCallList(list);
- glPopMatrix();
- glPushMatrix();
- glRotatef(180,0,1,0);
- glRotatef(-180+tetraangle,0.5,SQRT3/2,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[2]);
- glCallList(list);
- glPopMatrix();
- glRotatef(180,0,1,0);
- glRotatef(-180+tetraangle,0.5,-SQRT3/2,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[3]);
- glCallList(list);
-
- glDeleteLists(list,1);
-}
-
-static void draw_cube( void )
-{
- GLuint list;
-
- list = glGenLists( 1 );
- glNewList( list, GL_COMPILE );
- SQUARE(2, seno, edgedivisions, 0.5)
- glEndList();
-
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[0]);
- glCallList(list);
- glRotatef(cubeangle,1,0,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[1]);
- glCallList(list);
- glRotatef(cubeangle,1,0,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[2]);
- glCallList(list);
- glRotatef(cubeangle,1,0,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[3]);
- glCallList(list);
- glRotatef(cubeangle,0,1,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[4]);
- glCallList(list);
- glRotatef(2*cubeangle,0,1,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[5]);
- glCallList(list);
-
- glDeleteLists(list,1);
-}
-
-static void draw_octa( void )
-{
- GLuint list;
-
- list = glGenLists( 1 );
- glNewList( list, GL_COMPILE );
- TRIANGLE(2,seno,edgedivisions,1/SQRT6);
- glEndList();
-
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[0]);
- glCallList(list);
- glPushMatrix();
- glRotatef(180,0,0,1);
- glRotatef(-180+octaangle,1,0,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[1]);
- glCallList(list);
- glPopMatrix();
- glPushMatrix();
- glRotatef(180,0,1,0);
- glRotatef(-octaangle,0.5,SQRT3/2,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[2]);
- glCallList(list);
- glPopMatrix();
- glPushMatrix();
- glRotatef(180,0,1,0);
- glRotatef(-octaangle,0.5,-SQRT3/2,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[3]);
- glCallList(list);
- glPopMatrix();
- glRotatef(180,1,0,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[4]);
- glCallList(list);
- glPushMatrix();
- glRotatef(180,0,0,1);
- glRotatef(-180+octaangle,1,0,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[5]);
- glCallList(list);
- glPopMatrix();
- glPushMatrix();
- glRotatef(180,0,1,0);
- glRotatef(-octaangle,0.5,SQRT3/2,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[6]);
- glCallList(list);
- glPopMatrix();
- glRotatef(180,0,1,0);
- glRotatef(-octaangle,0.5,-SQRT3/2,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[7]);
- glCallList(list);
-
- glDeleteLists(list,1);
-}
-
-static void draw_dodeca( void )
-{
- GLuint list;
-
-#define TAU ((SQRT5+1)/2)
-
- list = glGenLists( 1 );
- glNewList( list, GL_COMPILE );
- PENTAGON(1,seno,edgedivisions,sqr(TAU) * sqrt((TAU+2)/5) / 2);
- glEndList();
-
- glPushMatrix();
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[0]);
- glCallList(list);
- glRotatef(180,0,0,1);
- glPushMatrix();
- glRotatef(-dodecaangle,1,0,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[1]);
- glCallList(list);
- glPopMatrix();
- glPushMatrix();
- glRotatef(-dodecaangle,cos72,sin72,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[2]);
- glCallList(list);
- glPopMatrix();
- glPushMatrix();
- glRotatef(-dodecaangle,cos72,-sin72,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[3]);
- glCallList(list);
- glPopMatrix();
- glPushMatrix();
- glRotatef(dodecaangle,cos36,-sin36,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[4]);
- glCallList(list);
- glPopMatrix();
- glRotatef(dodecaangle,cos36,sin36,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[5]);
- glCallList(list);
- glPopMatrix();
- glRotatef(180,1,0,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[6]);
- glCallList(list);
- glRotatef(180,0,0,1);
- glPushMatrix();
- glRotatef(-dodecaangle,1,0,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[7]);
- glCallList(list);
- glPopMatrix();
- glPushMatrix();
- glRotatef(-dodecaangle,cos72,sin72,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[8]);
- glCallList(list);
- glPopMatrix();
- glPushMatrix();
- glRotatef(-dodecaangle,cos72,-sin72,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[9]);
- glCallList(list);
- glPopMatrix();
- glPushMatrix();
- glRotatef(dodecaangle,cos36,-sin36,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[10]);
- glCallList(list);
- glPopMatrix();
- glRotatef(dodecaangle,cos36,sin36,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[11]);
- glCallList(list);
-
- glDeleteLists(list,1);
-}
-
-static void draw_ico( void )
-{
- GLuint list;
-
- list = glGenLists( 1 );
- glNewList( list, GL_COMPILE );
- TRIANGLE(1.5,seno,edgedivisions,(3*SQRT3+SQRT15)/12);
- glEndList();
-
- glPushMatrix();
-
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[0]);
- glCallList(list);
- glPushMatrix();
- glRotatef(180,0,0,1);
- glRotatef(-icoangle,1,0,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[1]);
- glCallList(list);
- glPushMatrix();
- glRotatef(180,0,1,0);
- glRotatef(-180+icoangle,0.5,SQRT3/2,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[2]);
- glCallList(list);
- glPopMatrix();
- glRotatef(180,0,1,0);
- glRotatef(-180+icoangle,0.5,-SQRT3/2,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[3]);
- glCallList(list);
- glPopMatrix();
- glPushMatrix();
- glRotatef(180,0,1,0);
- glRotatef(-180+icoangle,0.5,SQRT3/2,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[4]);
- glCallList(list);
- glPushMatrix();
- glRotatef(180,0,1,0);
- glRotatef(-180+icoangle,0.5,SQRT3/2,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[5]);
- glCallList(list);
- glPopMatrix();
- glRotatef(180,0,0,1);
- glRotatef(-icoangle,1,0,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[6]);
- glCallList(list);
- glPopMatrix();
- glRotatef(180,0,1,0);
- glRotatef(-180+icoangle,0.5,-SQRT3/2,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[7]);
- glCallList(list);
- glPushMatrix();
- glRotatef(180,0,1,0);
- glRotatef(-180+icoangle,0.5,-SQRT3/2,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[8]);
- glCallList(list);
- glPopMatrix();
- glRotatef(180,0,0,1);
- glRotatef(-icoangle,1,0,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[9]);
- glCallList(list);
- glPopMatrix();
- glRotatef(180,1,0,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[10]);
- glCallList(list);
- glPushMatrix();
- glRotatef(180,0,0,1);
- glRotatef(-icoangle,1,0,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[11]);
- glCallList(list);
- glPushMatrix();
- glRotatef(180,0,1,0);
- glRotatef(-180+icoangle,0.5,SQRT3/2,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[12]);
- glCallList(list);
- glPopMatrix();
- glRotatef(180,0,1,0);
- glRotatef(-180+icoangle,0.5,-SQRT3/2,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[13]);
- glCallList(list);
- glPopMatrix();
- glPushMatrix();
- glRotatef(180,0,1,0);
- glRotatef(-180+icoangle,0.5,SQRT3/2,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[14]);
- glCallList(list);
- glPushMatrix();
- glRotatef(180,0,1,0);
- glRotatef(-180+icoangle,0.5,SQRT3/2,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[15]);
- glCallList(list);
- glPopMatrix();
- glRotatef(180,0,0,1);
- glRotatef(-icoangle,1,0,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[16]);
- glCallList(list);
- glPopMatrix();
- glRotatef(180,0,1,0);
- glRotatef(-180+icoangle,0.5,-SQRT3/2,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[17]);
- glCallList(list);
- glPushMatrix();
- glRotatef(180,0,1,0);
- glRotatef(-180+icoangle,0.5,-SQRT3/2,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[18]);
- glCallList(list);
- glPopMatrix();
- glRotatef(180,0,0,1);
- glRotatef(-icoangle,1,0,0);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[19]);
- glCallList(list);
-
- glDeleteLists(list,1);
-}
-
-static void draw ( void ) {
- glClear( /*GL_COLOR_BUFFER_BIT |*/ GL_DEPTH_BUFFER_BIT );
-
- glPushMatrix();
-
- glTranslatef( 0.0, 0.0, -10.0 );
- glScalef( Scale*WindH/WindW, Scale, Scale );
- glTranslatef(2.5*WindW/WindH*sin(step*1.11),2.5*cos(step*1.25*1.11),0);
- glRotatef(step*100,1,0,0);
- glRotatef(step*95,0,1,0);
- glRotatef(step*90,0,0,1);
-
- seno=(sin(step)+1.0/3.0)*(4.0/5.0)*Magnitude;
-
- draw_object();
-
- glPopMatrix();
-
- glFlush();
-
- step+=0.05;
-}
-
-static void reshape( int width, int height )
-{
- glViewport(0, 0, WindW=(GLint)width, WindH=(GLint)height);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 15.0 );
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void pinit(void)
-{
- switch(object) {
- case 1:
- draw_object=draw_tetra;
- MaterialColor[0]=MaterialRed;
- MaterialColor[1]=MaterialGreen;
- MaterialColor[2]=MaterialBlue;
- MaterialColor[3]=MaterialWhite;
- edgedivisions=tetradivisions;
- Magnitude=2.5;
- break;
- case 2:
- draw_object=draw_cube;
- MaterialColor[0]=MaterialRed;
- MaterialColor[1]=MaterialGreen;
- MaterialColor[2]=MaterialCyan;
- MaterialColor[3]=MaterialMagenta;
- MaterialColor[4]=MaterialYellow;
- MaterialColor[5]=MaterialBlue;
- edgedivisions=cubedivisions;
- Magnitude=2.0;
- break;
- case 3:
- draw_object=draw_octa;
- MaterialColor[0]=MaterialRed;
- MaterialColor[1]=MaterialGreen;
- MaterialColor[2]=MaterialBlue;
- MaterialColor[3]=MaterialWhite;
- MaterialColor[4]=MaterialCyan;
- MaterialColor[5]=MaterialMagenta;
- MaterialColor[6]=MaterialGray;
- MaterialColor[7]=MaterialYellow;
- edgedivisions=octadivisions;
- Magnitude=2.5;
- break;
- case 4:
- draw_object=draw_dodeca;
- MaterialColor[ 0]=MaterialRed;
- MaterialColor[ 1]=MaterialGreen;
- MaterialColor[ 2]=MaterialCyan;
- MaterialColor[ 3]=MaterialBlue;
- MaterialColor[ 4]=MaterialMagenta;
- MaterialColor[ 5]=MaterialYellow;
- MaterialColor[ 6]=MaterialGreen;
- MaterialColor[ 7]=MaterialCyan;
- MaterialColor[ 8]=MaterialRed;
- MaterialColor[ 9]=MaterialMagenta;
- MaterialColor[10]=MaterialBlue;
- MaterialColor[11]=MaterialYellow;
- edgedivisions=dodecadivisions;
- Magnitude=2.0;
- break;
- case 5:
- draw_object=draw_ico;
- MaterialColor[ 0]=MaterialRed;
- MaterialColor[ 1]=MaterialGreen;
- MaterialColor[ 2]=MaterialBlue;
- MaterialColor[ 3]=MaterialCyan;
- MaterialColor[ 4]=MaterialYellow;
- MaterialColor[ 5]=MaterialMagenta;
- MaterialColor[ 6]=MaterialRed;
- MaterialColor[ 7]=MaterialGreen;
- MaterialColor[ 8]=MaterialBlue;
- MaterialColor[ 9]=MaterialWhite;
- MaterialColor[10]=MaterialCyan;
- MaterialColor[11]=MaterialYellow;
- MaterialColor[12]=MaterialMagenta;
- MaterialColor[13]=MaterialRed;
- MaterialColor[14]=MaterialGreen;
- MaterialColor[15]=MaterialBlue;
- MaterialColor[16]=MaterialCyan;
- MaterialColor[17]=MaterialYellow;
- MaterialColor[18]=MaterialMagenta;
- MaterialColor[19]=MaterialGray;
- edgedivisions=icodivisions;
- Magnitude=2.5;
- break;
- }
- if (mono) {
- int loop;
- for (loop=0; loop<20; loop++) MaterialColor[loop]=MaterialGray;
- }
- if (smooth) {
- glShadeModel( GL_SMOOTH );
- } else {
- glShadeModel( GL_FLAT );
- }
-
-}
-
-static void init(void)
-{
- printf("Morph 3D - Shows morphing platonic polyhedra\n");
- printf("Author: Marcelo Fernandes Vianna (vianna@cat.cbpf.br)\n\n");
- printf(" [1] - Tetrahedron\n");
- printf(" [2] - Hexahedron (Cube)\n");
- printf(" [3] - Octahedron\n");
- printf(" [4] - Dodecahedron\n");
- printf(" [5] - Icosahedron\n");
- printf("[SPACE] - Toggle colored faces\n");
- printf("[RETURN] - Toggle smooth/flat shading\n");
- printf(" [ESC] - Quit\n");
-
- object=1;
-
- glClearDepth(1.0);
- glClearColor( 0.0, 0.0, 0.0, 0.0 );
- glColor3f( 1.0, 1.0, 1.0 );
-
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
- glFlush();
- primary->Flip( primary, NULL, 0 );
-
- glLightfv(GL_LIGHT0, GL_AMBIENT, ambient);
- glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse);
- glLightfv(GL_LIGHT0, GL_POSITION, position0);
- glLightfv(GL_LIGHT1, GL_AMBIENT, ambient);
- glLightfv(GL_LIGHT1, GL_DIFFUSE, diffuse);
- glLightfv(GL_LIGHT1, GL_POSITION, position1);
- glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient);
- glLightModelfv(GL_LIGHT_MODEL_TWO_SIDE, lmodel_twoside);
- glEnable(GL_LIGHTING);
- glEnable(GL_LIGHT0);
- glEnable(GL_LIGHT1);
- glEnable(GL_DEPTH_TEST);
- glEnable(GL_NORMALIZE);
-
- glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, front_shininess);
- glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, front_specular);
-
- glHint(GL_FOG_HINT, GL_FASTEST);
- glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);
- glHint(GL_POLYGON_SMOOTH_HINT, GL_FASTEST);
-
- pinit();
-}
-
-int main( int argc, char *argv[] )
-{
- int quit = 0;
- DFBResult err;
- DFBSurfaceDescription dsc;
-
- DFBCHECK(DirectFBInit( &argc, &argv ));
-
- /* create the super interface */
- DFBCHECK(DirectFBCreate( &dfb ));
-
- /* create an event buffer for all devices with these caps */
- DFBCHECK(dfb->CreateInputEventBuffer( dfb, DICAPS_KEYS, DFB_FALSE, &events ));
-
- /* set our cooperative level to DFSCL_FULLSCREEN
- for exclusive access to the primary layer */
- dfb->SetCooperativeLevel( dfb, DFSCL_FULLSCREEN );
-
- /* get the primary surface, i.e. the surface of the
- primary layer we have exclusive access to */
- dsc.flags = DSDESC_CAPS;
- dsc.caps = DSCAPS_PRIMARY | DSCAPS_DOUBLE;
-
- DFBCHECK(dfb->CreateSurface( dfb, &dsc, &primary ));
-
- /* get the size of the surface and fill it */
- DFBCHECK(primary->GetSize( primary, &screen_width, &screen_height ));
- DFBCHECK(primary->FillRectangle( primary, 0, 0,
- screen_width, screen_height ));
-
- /* create the default font and set it */
- DFBCHECK(dfb->CreateFont( dfb, NULL, NULL, &font ));
- DFBCHECK(primary->SetFont( primary, font ));
-
- /* get the GL context */
- DFBCHECK(primary->GetGL( primary, &primary_gl ));
-
- DFBCHECK(primary_gl->Lock( primary_gl ));
-
- init();
- reshape(screen_width, screen_height);
-
- DFBCHECK(primary_gl->Unlock( primary_gl ));
-
- T0 = get_millis();
-
- while (!quit) {
- DFBInputEvent evt;
- unsigned long t;
-
- primary->Clear( primary, 0, 0, 0, 0 );
-
- DFBCHECK(primary_gl->Lock( primary_gl ));
-
- draw();
-
- DFBCHECK(primary_gl->Unlock( primary_gl ));
-
- if (fps) {
- char buf[64];
-
- sprintf(buf, "%4.1f FPS\n", fps);
- primary->SetColor( primary, 0xff, 0, 0, 0xff );
- primary->DrawString( primary, buf, -1, screen_width - 5, 5, DSTF_TOPRIGHT );
- }
-
- primary->Flip( primary, NULL, 0 );
- Frames++;
-
-
- t = get_millis();
- if (t - T0 >= 1000) {
- GLfloat seconds = (t - T0) / 1000.0;
-
- fps = Frames / seconds;
-
- T0 = t;
- Frames = 0;
- }
-
-
- while (events->GetEvent( events, DFB_EVENT(&evt) ) == DFB_OK) {
- switch (evt.type) {
- case DIET_KEYPRESS:
- switch (evt.key_symbol) {
- case DIKS_ESCAPE:
- quit = 1;
- break;
- case DIKS_1: object=1; break;
- case DIKS_2: object=2; break;
- case DIKS_3: object=3; break;
- case DIKS_4: object=4; break;
- case DIKS_5: object=5; break;
- case DIKS_SPACE: mono^=1; break;
- case DIKS_ENTER: smooth^=1; break;
- default:
- ;
- }
- pinit();
- break;
- default:
- ;
- }
- }
- }
-
- /* release our interfaces to shutdown DirectFB */
- primary_gl->Release( primary_gl );
- primary->Release( primary );
- font->Release( font );
- events->Release( events );
- dfb->Release( dfb );
-
- return 0;
-}
-
diff --git a/progs/directfb/df_reflect.c b/progs/directfb/df_reflect.c
deleted file mode 100644
index a0e789c387..0000000000
--- a/progs/directfb/df_reflect.c
+++ /dev/null
@@ -1,489 +0,0 @@
-/*
- (c) Copyright 2001 convergence integrated media GmbH.
- All rights reserved.
-
- Written by Denis Oliver Kropp <dok@convergence.de> and
- Andreas Hundt <andi@convergence.de>.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-*/
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <math.h>
-
-#include <directfb.h>
-#include <directfbgl.h>
-
-#include <GL/glu.h>
-
-#include "util/showbuffer.c"
-#include "util/readtex.c"
-
-
-/* the super interface */
-IDirectFB *dfb;
-
-/* the primary surface (surface of primary layer) */
-IDirectFBSurface *primary;
-
-/* the GL context */
-IDirectFBGL *primary_gl;
-
-/* our font */
-IDirectFBFont *font;
-
-/* event buffer */
-IDirectFBEventBuffer *events;
-
-/* macro for a safe call to DirectFB functions */
-#define DFBCHECK(x...) \
- { \
- err = x; \
- if (err != DFB_OK) { \
- fprintf( stderr, "%s <%d>:\n\t", __FILE__, __LINE__ ); \
- DirectFBErrorFatal( #x, err ); \
- } \
- }
-
-static int screen_width, screen_height;
-
-static unsigned long T0 = 0;
-static GLint Frames = 0;
-static GLfloat fps = 0;
-
-static inline unsigned long get_millis()
-{
- struct timeval tv;
-
- gettimeofday (&tv, NULL);
- return (tv.tv_sec * 1000 + tv.tv_usec / 1000);
-}
-
-/*******************************/
-
-#define DEG2RAD (3.14159/180.0)
-
-#define TABLE_TEXTURE "../images/tile.rgb"
-
-static GLint ImgWidth, ImgHeight;
-static GLenum ImgFormat;
-static GLubyte *Image = NULL;
-
-#define MAX_OBJECTS 2
-static GLint table_list;
-static GLint objects_list[MAX_OBJECTS];
-
-static GLfloat xrot, yrot;
-static GLfloat spin;
-
-static GLint Width = 400, Height = 300;
-static GLenum ShowBuffer = GL_NONE;
-
-
-static void make_table( void )
-{
- static GLfloat table_mat[] = { 1.0, 1.0, 1.0, 0.6 };
- static GLfloat gray[] = { 0.4, 0.4, 0.4, 1.0 };
-
- table_list = glGenLists(1);
- glNewList( table_list, GL_COMPILE );
-
- /* load table's texture */
- glMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, table_mat );
-/* glMaterialfv( GL_FRONT, GL_EMISSION, gray );*/
- glMaterialfv( GL_FRONT, GL_DIFFUSE, table_mat );
- glMaterialfv( GL_FRONT, GL_AMBIENT, gray );
-
- /* draw textured square for the table */
- glPushMatrix();
- glScalef( 4.0, 4.0, 4.0 );
- glBegin( GL_POLYGON );
- glNormal3f( 0.0, 1.0, 0.0 );
- glTexCoord2f( 0.0, 0.0 ); glVertex3f( -1.0, 0.0, 1.0 );
- glTexCoord2f( 1.0, 0.0 ); glVertex3f( 1.0, 0.0, 1.0 );
- glTexCoord2f( 1.0, 1.0 ); glVertex3f( 1.0, 0.0, -1.0 );
- glTexCoord2f( 0.0, 1.0 ); glVertex3f( -1.0, 0.0, -1.0 );
- glEnd();
- glPopMatrix();
-
- glDisable( GL_TEXTURE_2D );
-
- glEndList();
-}
-
-
-static void make_objects( void )
-{
- GLUquadricObj *q;
-
- static GLfloat cyan[] = { 0.0, 1.0, 1.0, 1.0 };
- static GLfloat green[] = { 0.2, 1.0, 0.2, 1.0 };
- static GLfloat black[] = { 0.0, 0.0, 0.0, 0.0 };
-
- q = gluNewQuadric();
- gluQuadricDrawStyle( q, GLU_FILL );
- gluQuadricNormals( q, GLU_SMOOTH );
-
- objects_list[0] = glGenLists(1);
- glNewList( objects_list[0], GL_COMPILE );
- glMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, cyan );
- glMaterialfv( GL_FRONT, GL_EMISSION, black );
- gluCylinder( q, 0.5, 0.5, 1.0, 15, 1 );
- glEndList();
-
- objects_list[1] = glGenLists(1);
- glNewList( objects_list[1], GL_COMPILE );
- glMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green );
- glMaterialfv( GL_FRONT, GL_EMISSION, black );
- gluCylinder( q, 1.5, 0.0, 2.5, 15, 1 );
- glEndList();
-}
-
-
-static void init( void )
-{
- make_table();
- make_objects();
-
- Image = LoadRGBImage( TABLE_TEXTURE, &ImgWidth, &ImgHeight, &ImgFormat );
- if (!Image) {
- printf("Couldn't read %s\n", TABLE_TEXTURE);
- exit(0);
- }
-
- gluBuild2DMipmaps(GL_TEXTURE_2D, 3, ImgWidth, ImgHeight,
- ImgFormat, GL_UNSIGNED_BYTE, Image);
-
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
-
- xrot = 30.0;
- yrot = 50.0;
- spin = 0.0;
-
- glShadeModel( GL_FLAT );
-
- glEnable( GL_LIGHT0 );
- glEnable( GL_LIGHTING );
-
- glClearColor( 0.5, 0.5, 0.9, 0.0 );
-
- glEnable( GL_NORMALIZE );
-}
-
-
-
-static void reshape(int w, int h)
-{
- GLfloat yAspect = 2.5;
- GLfloat xAspect = yAspect * (float) w / (float) h;
- Width = w;
- Height = h;
- glViewport(0, 0, w, h);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glFrustum( -xAspect, xAspect, -yAspect, yAspect, 10.0, 30.0 );
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
-}
-
-
-
-static void draw_objects( GLfloat eyex, GLfloat eyey, GLfloat eyez )
-{
- (void) eyex;
- (void) eyey;
- (void) eyez;
-#ifndef USE_ZBUFFER
- if (eyex<0.5) {
-#endif
- glPushMatrix();
- glTranslatef( 1.0, 1.5, 0.0 );
- glRotatef( spin, 1.0, 0.5, 0.0 );
- glRotatef( 0.5*spin, 0.0, 0.5, 1.0 );
- glCallList( objects_list[0] );
- glPopMatrix();
-
- glPushMatrix();
- glTranslatef( -1.0, 0.85+3.0*fabs( cos(0.01*spin) ), 0.0 );
- glRotatef( 0.5*spin, 0.0, 0.5, 1.0 );
- glRotatef( spin, 1.0, 0.5, 0.0 );
- glScalef( 0.5, 0.5, 0.5 );
- glCallList( objects_list[1] );
- glPopMatrix();
-#ifndef USE_ZBUFFER
- }
- else {
- glPushMatrix();
- glTranslatef( -1.0, 0.85+3.0*fabs( cos(0.01*spin) ), 0.0 );
- glRotatef( 0.5*spin, 0.0, 0.5, 1.0 );
- glRotatef( spin, 1.0, 0.5, 0.0 );
- glScalef( 0.5, 0.5, 0.5 );
- glCallList( objects_list[1] );
- glPopMatrix();
-
- glPushMatrix();
- glTranslatef( 1.0, 1.5, 0.0 );
- glRotatef( spin, 1.0, 0.5, 0.0 );
- glRotatef( 0.5*spin, 0.0, 0.5, 1.0 );
- glCallList( objects_list[0] );
- glPopMatrix();
- }
-#endif
-}
-
-
-
-static void draw_table( void )
-{
- glCallList( table_list );
-}
-
-
-
-static void draw( void )
-{
- static GLfloat light_pos[] = { 0.0, 20.0, 0.0, 1.0 };
- GLfloat dist = 20.0;
- GLfloat eyex, eyey, eyez;
-
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
-
-
- eyex = dist * cos(yrot*DEG2RAD) * cos(xrot*DEG2RAD);
- eyez = dist * sin(yrot*DEG2RAD) * cos(xrot*DEG2RAD);
- eyey = dist * sin(xrot*DEG2RAD);
-
- /* view from top */
- glPushMatrix();
- gluLookAt( eyex, eyey, eyez, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0 );
-
- glLightfv( GL_LIGHT0, GL_POSITION, light_pos );
-
- /* draw table into stencil planes */
- glDisable( GL_DEPTH_TEST );
- glEnable( GL_STENCIL_TEST );
- glStencilFunc( GL_ALWAYS, 1, 0xffffffff );
- glStencilOp( GL_REPLACE, GL_REPLACE, GL_REPLACE );
- glColorMask( GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE );
- draw_table();
- glColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE );
-
- glEnable( GL_DEPTH_TEST );
-
- /* render view from below (reflected viewport) */
- /* only draw where stencil==1 */
- if (eyey>0.0) {
- glPushMatrix();
-
- glStencilFunc( GL_EQUAL, 1, 0xffffffff ); /* draw if ==1 */
- glStencilOp( GL_KEEP, GL_KEEP, GL_KEEP );
- glScalef( 1.0, -1.0, 1.0 );
-
- /* Reposition light in reflected space. */
- glLightfv(GL_LIGHT0, GL_POSITION, light_pos);
-
- draw_objects(eyex, eyey, eyez);
- glPopMatrix();
-
- /* Restore light's original unreflected position. */
- glLightfv(GL_LIGHT0, GL_POSITION, light_pos);
- }
-
- glDisable( GL_STENCIL_TEST );
-
- glEnable( GL_BLEND );
- glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
-
- glEnable( GL_TEXTURE_2D );
- draw_table();
- glDisable( GL_TEXTURE_2D );
- glDisable( GL_BLEND );
-
- /* view from top */
- glPushMatrix();
-
- draw_objects(eyex, eyey, eyez);
-
- glPopMatrix();
-
- glPopMatrix();
-
- if (ShowBuffer == GL_DEPTH) {
- ShowDepthBuffer(Width, Height, 1.0, 0.0);
- }
- else if (ShowBuffer == GL_STENCIL) {
- ShowStencilBuffer(Width, Height, 255.0, 0.0);
- }
- else if (ShowBuffer == GL_ALPHA) {
- ShowAlphaBuffer(Width, Height);
- }
-}
-
-/*******************************/
-
-int main( int argc, char *argv[] )
-{
- int quit = 0;
- DFBResult err;
- DFBSurfaceDescription dsc;
-
- DFBCHECK(DirectFBInit( &argc, &argv ));
-
- /* create the super interface */
- DFBCHECK(DirectFBCreate( &dfb ));
-
- /* create an event buffer for all devices with these caps */
- DFBCHECK(dfb->CreateInputEventBuffer( dfb, DICAPS_ALL, DFB_FALSE, &events ));
-
- /* set our cooperative level to DFSCL_FULLSCREEN
- for exclusive access to the primary layer */
- dfb->SetCooperativeLevel( dfb, DFSCL_FULLSCREEN );
-
- /* get the primary surface, i.e. the surface of the
- primary layer we have exclusive access to */
- dsc.flags = DSDESC_CAPS;
- dsc.caps = (DFBSurfaceCapabilities)(DSCAPS_PRIMARY | DSCAPS_DOUBLE);
-
- DFBCHECK(dfb->CreateSurface( dfb, &dsc, &primary ));
-
- /* get the size of the surface and fill it */
- DFBCHECK(primary->GetSize( primary, &screen_width, &screen_height ));
- DFBCHECK(primary->FillRectangle( primary, 0, 0,
- screen_width, screen_height ));
-
- /* create the default font and set it */
- DFBCHECK(dfb->CreateFont( dfb, NULL, NULL, &font ));
- DFBCHECK(primary->SetFont( primary, font ));
-
- /* get the GL context */
- DFBCHECK(primary->GetGL( primary, &primary_gl ));
-
- DFBCHECK(primary_gl->Lock( primary_gl ));
-
- init();
- reshape(screen_width, screen_height);
-
- DFBCHECK(primary_gl->Unlock( primary_gl ));
-
- T0 = get_millis();
-
- while (!quit) {
- DFBInputEvent evt;
- unsigned long t;
-
- DFBCHECK(primary_gl->Lock( primary_gl ));
-
- draw();
-
- DFBCHECK(primary_gl->Unlock( primary_gl ));
-
- if (fps) {
- char buf[64];
-
- sprintf(buf, "%4.1f FPS\n", fps);
- primary->SetColor( primary, 0xff, 0, 0, 0xff );
- primary->DrawString( primary, buf, -1, screen_width - 5, 5, DSTF_TOPRIGHT );
- }
-
- primary->Flip( primary, NULL, (DFBSurfaceFlipFlags)0 );
- Frames++;
-
-
- t = get_millis();
- if (t - T0 >= 1000) {
- GLfloat seconds = (t - T0) / 1000.0;
-
- fps = Frames / seconds;
-
- T0 = t;
- Frames = 0;
- }
-
-
- while (events->GetEvent( events, DFB_EVENT(&evt) ) == DFB_OK) {
- switch (evt.type) {
- case DIET_KEYPRESS:
- switch (DFB_LOWER_CASE(evt.key_symbol)) {
- case DIKS_ESCAPE:
- quit = 1;
- break;
- case DIKS_CURSOR_UP:
- xrot += 3.0;
- if ( xrot > 85 )
- xrot = 85;
- break;
- case DIKS_CURSOR_DOWN:
- xrot -= 3.0;
- if ( xrot < 5 )
- xrot = 5;
- break;
- case DIKS_CURSOR_LEFT:
- yrot += 3.0;
- break;
- case DIKS_CURSOR_RIGHT:
- yrot -= 3.0;
- break;
- case DIKS_SMALL_D:
- ShowBuffer = GL_DEPTH;
- break;
- case DIKS_SMALL_S:
- ShowBuffer = GL_STENCIL;
- break;
- case DIKS_SMALL_A:
- ShowBuffer = GL_ALPHA;
- break;
- default:
- ShowBuffer = GL_NONE;
- }
- break;
- case DIET_AXISMOTION:
- if (evt.flags & DIEF_AXISREL) {
- switch (evt.axis) {
- case DIAI_X:
- yrot += evt.axisrel / 2.0;
- break;
- case DIAI_Y:
- xrot += evt.axisrel / 2.0;
- break;
- default:
- ;
- }
- }
- break;
- default:
- ;
- }
- }
-
- spin += 2.0;
- yrot += 3.0;
- }
-
- /* release our interfaces to shutdown DirectFB */
- primary_gl->Release( primary_gl );
- primary->Release( primary );
- font->Release( font );
- events->Release( events );
- dfb->Release( dfb );
-
- return 0;
-}
-
diff --git a/progs/directfb/multi_window.c b/progs/directfb/multi_window.c
deleted file mode 100644
index 9bb0e4be8e..0000000000
--- a/progs/directfb/multi_window.c
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- (c) Copyright 2001 convergence integrated media GmbH.
- All rights reserved.
-
- Written by Denis Oliver Kropp <dok@convergence.de> and
- Andreas Hundt <andi@convergence.de>.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-*/
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <math.h>
-
-#include <GL/gl.h>
-#include <GL/glu.h>
-
-#include <directfb.h>
-#include <directfbgl.h>
-
-
-typedef struct {
- IDirectFBWindow *window;
- IDirectFBSurface *surface;
- IDirectFBGL *gl;
-
- int width;
- int height;
-
- unsigned long last_time;
- int frames;
- float fps;
-} Context;
-
-static const GLfloat blue[4] = {0.2, 0.2, 1.0, 1.0};
-
-static IDirectFB *dfb;
-static IDirectFBDisplayLayer *layer;
-static IDirectFBFont *font;
-static IDirectFBEventBuffer *events = NULL;
-
-/* macro for a safe call to DirectFB functions */
-#define DFBCHECK(x...) \
- do { \
- ret = x; \
- if (ret != DFB_OK) { \
- fprintf( stderr, "%s <%d>:\n\t", __FILE__, __LINE__ ); \
- DirectFBErrorFatal( #x, ret ); \
- } \
- } while (0)
-
-
-static inline unsigned long get_millis()
-{
- struct timeval tv;
-
- gettimeofday (&tv, NULL);
- return (tv.tv_sec * 1000 + tv.tv_usec / 1000);
-}
-
-
-static void
-setup( Context *context )
-{
- GLfloat pos[4] = {5.0, 5.0, 10.0, 0.0};
-
- context->surface->GetSize( context->surface,
- &context->width, &context->height );
-
- context->gl->Lock( context->gl );
-
- glLightfv(GL_LIGHT0, GL_POSITION, pos);
- glEnable(GL_CULL_FACE);
- glEnable(GL_LIGHTING);
- glEnable(GL_LIGHT0);
- glEnable(GL_DEPTH_TEST);
-
- glViewport(0, 0, context->width, context->height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- gluPerspective(70.0, context->width / (float) context->height, 1.0, 80.0);
-
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- glTranslatef(0.0, 0.0, -40.0);
-
- context->gl->Unlock( context->gl );
-}
-
-static void
-update( Context *context )
-{
- unsigned long t;
- IDirectFBSurface *surface = context->surface;
- static __u8 r = 0, g = 0, b = 0;
-
-
- context->gl->Lock( context->gl );
-
- glClearColor( r++/255.0, g++/255.0, b++/255.0, 1.0 );
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- context->gl->Unlock( context->gl );
-
- if (context->fps) {
- char buf[16];
-
- snprintf(buf, sizeof(buf), "%.1f FPS\n", context->fps);
-
- surface->SetColor( surface, 0xff, 0x00, 0x00, 0xff );
- surface->DrawString( surface, buf, -1,
- context->width - 5, 5, DSTF_TOPRIGHT );
- }
-
- surface->Flip( surface, NULL, 0 );
-
- context->frames++;
-
- t = get_millis();
- if (t - context->last_time >= 2000) {
- float seconds = (t - context->last_time) / 1000.0f;
-
- context->fps = context->frames / seconds;
-
- context->last_time = t;
- context->frames = 0;
- }
-}
-
-int
-main( int argc, char *argv[] )
-{
- DFBResult ret;
- int i;
- int quit = 0;
- const int num = 2;
- Context contexts[num];
-
- DFBCHECK(DirectFBInit( &argc, &argv ));
-
- /* create the super interface */
- DFBCHECK(DirectFBCreate( &dfb ));
-
- DFBCHECK(dfb->GetDisplayLayer( dfb, DLID_PRIMARY, &layer ));
-
- /* create the default font */
- DFBCHECK(dfb->CreateFont( dfb, NULL, NULL, &font ));
-
- for (i=0; i<num; i++) {
- IDirectFBWindow *window;
- IDirectFBSurface *surface;
- IDirectFBGL *gl;
- DFBWindowDescription desc;
-
- desc.flags = DWDESC_POSX | DWDESC_POSY |
- DWDESC_WIDTH | DWDESC_HEIGHT;
- desc.posx = (i%3) * 200 + 10;
- desc.posy = (i/3) * 200 + 10;
- desc.width = 180;
- desc.height = 180;
-
- DFBCHECK(layer->CreateWindow( layer, &desc, &window ));
- DFBCHECK(window->GetSurface( window, &surface ));
- DFBCHECK(surface->GetGL( surface, &gl ));
-
- contexts[i].window = window;
- contexts[i].surface = surface;
- contexts[i].gl = gl;
-
- contexts[i].last_time = get_millis();
- contexts[i].frames = 0;
- contexts[i].fps = 0;
-
- setup( &contexts[i] );
-
- if (events)
- DFBCHECK(window->AttachEventBuffer( window, events ));
- else
- DFBCHECK(window->CreateEventBuffer( window, &events ));
-
- DFBCHECK(surface->SetFont( surface, font ));
-
- window->SetOpacity( window, 0xff );
- }
-
- while (!quit) {
- DFBWindowEvent evt;
-
- for (i=0; i<num; i++)
- update( &contexts[i] );
-
- while (events->GetEvent( events, DFB_EVENT(&evt) ) == DFB_OK) {
- switch (evt.type) {
- case DWET_KEYDOWN:
- switch (evt.key_symbol) {
- case DIKS_ESCAPE:
- quit = 1;
- break;
-
- default:
- break;
- }
- break;
-
- default:
- break;
- }
- }
- }
-
- events->Release( events );
-
- for (i=0; i<num; i++) {
- contexts[i].gl->Release( contexts[i].gl );
- contexts[i].surface->Release( contexts[i].surface );
- contexts[i].window->Release( contexts[i].window );
- }
-
- font->Release( font );
- layer->Release( layer );
- dfb->Release( dfb );
-
- return 0;
-}
-
diff --git a/progs/egl/.gitignore b/progs/egl/.gitignore
deleted file mode 100644
index 1751108235..0000000000
--- a/progs/egl/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-demo1
-demo2
-demo3
-eglgears
-eglinfo
diff --git a/progs/egl/Makefile b/progs/egl/Makefile
deleted file mode 100644
index 416d2c04b2..0000000000
--- a/progs/egl/Makefile
+++ /dev/null
@@ -1,65 +0,0 @@
-# progs/egl/Makefile
-
-TOP = ../..
-include $(TOP)/configs/current
-
-
-INCLUDE_DIRS = -I$(TOP)/include
-
-HEADERS = $(TOP)/include/GLES/egl.h
-
-PROGRAMS = \
- demo1 \
- demo2 \
- demo3 \
- eglinfo \
- eglgears
-
-
-.c.o:
- $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
-
-
-
-default: $(PROGRAMS)
-
-
-demo1: demo1.o $(TOP)/$(LIB_DIR)/libEGL.so
- $(CC) $(CFLAGS) $(LDFLAGS) demo1.o -L$(TOP)/$(LIB_DIR) -lEGL $(LIBDRM_LIB) -o $@
-
-demo1.o: demo1.c $(HEADERS)
- $(CC) -c $(CFLAGS) -I$(TOP)/include demo1.c
-
-
-demo2: demo2.o $(TOP)/$(LIB_DIR)/libEGL.so
- $(CC) $(CFLAGS) $(LDFLAGS) demo2.o -L$(TOP)/$(LIB_DIR) -lEGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
-
-demo2.o: demo2.c $(HEADERS)
- $(CC) -c $(CFLAGS) -I$(TOP)/include demo2.c
-
-
-demo3: demo3.o $(TOP)/$(LIB_DIR)/libEGL.so
- $(CC) $(CFLAGS) $(LDFLAGS) demo3.o -L$(TOP)/$(LIB_DIR) -lEGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
-
-demo3.o: demo3.c $(HEADERS)
- $(CC) -c $(CFLAGS) -I$(TOP)/include demo3.c
-
-
-eglinfo: eglinfo.o $(TOP)/$(LIB_DIR)/libEGL.so
- $(CC) $(CFLAGS) $(LDFLAGS) eglinfo.o -L$(TOP)/$(LIB_DIR) -lEGL $(LIBDRM_LIB) -o $@
-
-eglinfo.o: eglinfo.c $(HEADERS)
- $(CC) -c $(CFLAGS) -I$(TOP)/include eglinfo.c
-
-
-eglgears: eglgears.o $(TOP)/$(LIB_DIR)/libEGL.so
- $(CC) $(CFLAGS) $(LDFLAGS) eglgears.o -L$(TOP)/$(LIB_DIR) -lEGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
-
-eglgears.o: eglgears.c $(HEADERS)
- $(CC) -c $(CFLAGS) -I$(TOP)/include eglgears.c
-
-
-clean:
- -rm -f *.o *~
- -rm -f *.so
- -rm -f $(PROGRAMS)
diff --git a/progs/egl/demo1.c b/progs/egl/demo1.c
deleted file mode 100644
index 9ef17e38b7..0000000000
--- a/progs/egl/demo1.c
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Exercise EGL API functions
- */
-
-#include <GLES/egl.h>
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-
-/**
- * Test EGL_MESA_screen_surface functions
- */
-static void
-TestScreens(EGLDisplay dpy)
-{
-#define MAX 8
- EGLScreenMESA screens[MAX];
- EGLint numScreens;
- EGLint i;
-
- eglGetScreensMESA(dpy, screens, MAX, &numScreens);
- printf("Found %d screens\n", numScreens);
- for (i = 0; i < numScreens; i++) {
- printf(" Screen %d handle: %d\n", i, (int) screens[i]);
- }
-}
-
-/**
- * Print table of all available configurations.
- */
-static void
-PrintConfigs(EGLDisplay d)
-{
- EGLConfig *configs;
- EGLint numConfigs, i;
-
- eglGetConfigs(d, NULL, 0, &numConfigs);
- configs = malloc(sizeof(*configs) *numConfigs);
- eglGetConfigs(d, configs, numConfigs, &numConfigs);
-
- printf("Configurations:\n");
- printf(" bf lv d st colorbuffer dp st supported \n");
- printf(" id sz l b ro r g b a th cl surfaces \n");
- printf("----------------------------------------------\n");
- for (i = 0; i < numConfigs; i++) {
- EGLint id, size, level;
- EGLint red, green, blue, alpha;
- EGLint depth, stencil;
- EGLint surfaces;
- EGLint doubleBuf = 1, stereo = 0;
- char surfString[100] = "";
-
- eglGetConfigAttrib(d, configs[i], EGL_CONFIG_ID, &id);
- eglGetConfigAttrib(d, configs[i], EGL_BUFFER_SIZE, &size);
- eglGetConfigAttrib(d, configs[i], EGL_LEVEL, &level);
-
- eglGetConfigAttrib(d, configs[i], EGL_RED_SIZE, &red);
- eglGetConfigAttrib(d, configs[i], EGL_GREEN_SIZE, &green);
- eglGetConfigAttrib(d, configs[i], EGL_BLUE_SIZE, &blue);
- eglGetConfigAttrib(d, configs[i], EGL_ALPHA_SIZE, &alpha);
- eglGetConfigAttrib(d, configs[i], EGL_DEPTH_SIZE, &depth);
- eglGetConfigAttrib(d, configs[i], EGL_STENCIL_SIZE, &stencil);
- eglGetConfigAttrib(d, configs[i], EGL_SURFACE_TYPE, &surfaces);
-
- if (surfaces & EGL_WINDOW_BIT)
- strcat(surfString, "win,");
- if (surfaces & EGL_PBUFFER_BIT)
- strcat(surfString, "pb,");
- if (surfaces & EGL_PIXMAP_BIT)
- strcat(surfString, "pix,");
- if (strlen(surfString) > 0)
- surfString[strlen(surfString) - 1] = 0;
-
- printf("0x%02x %2d %2d %c %c %2d %2d %2d %2d %2d %2d %-12s\n",
- id, size, level,
- doubleBuf ? 'y' : '.',
- stereo ? 'y' : '.',
- red, green, blue, alpha,
- depth, stencil, surfString);
- }
- free(configs);
-}
-
-
-
-int
-main(int argc, char *argv[])
-{
- int maj, min;
- EGLContext ctx;
- EGLSurface pbuffer;
- EGLConfig configs[10];
- EGLBoolean b;
- const EGLint pbufAttribs[] = {
- EGL_WIDTH, 500,
- EGL_HEIGHT, 500,
- EGL_NONE
- };
-
- /*
- EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY);
- */
- EGLDisplay d = eglGetDisplay("!fb_dri");
- assert(d);
-
- if (!eglInitialize(d, &maj, &min)) {
- printf("demo: eglInitialize failed\n");
- exit(1);
- }
-
- printf("EGL version = %d.%d\n", maj, min);
- printf("EGL_VENDOR = %s\n", eglQueryString(d, EGL_VENDOR));
-
- PrintConfigs(d);
-
- ctx = eglCreateContext(d, configs[0], EGL_NO_CONTEXT, NULL);
- if (ctx == EGL_NO_CONTEXT) {
- printf("failed to create context\n");
- return 0;
- }
-
- pbuffer = eglCreatePbufferSurface(d, configs[0], pbufAttribs);
- if (pbuffer == EGL_NO_SURFACE) {
- printf("failed to create pbuffer\n");
- return 0;
- }
-
- b = eglMakeCurrent(d, pbuffer, pbuffer, ctx);
- if (!b) {
- printf("make current failed\n");
- return 0;
- }
-
- b = eglMakeCurrent(d, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
-
- TestScreens(d);
-
- eglDestroySurface(d, pbuffer);
- eglDestroyContext(d, ctx);
- eglTerminate(d);
-
- return 0;
-}
diff --git a/progs/egl/demo2.c b/progs/egl/demo2.c
deleted file mode 100644
index 17bbca6158..0000000000
--- a/progs/egl/demo2.c
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * Exercise EGL API functions
- */
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#include <GLES/egl.h>
-
-/*#define FRONTBUFFER*/
-
-static void _subset_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
-{
- glBegin( GL_QUADS );
- glVertex2f( x1, y1 );
- glVertex2f( x2, y1 );
- glVertex2f( x2, y2 );
- glVertex2f( x1, y2 );
- glEnd();
-}
-
-
-static void redraw(EGLDisplay dpy, EGLSurface surf, int rot)
-{
- printf("Redraw event\n");
-
-#ifdef FRONTBUFFER
- glDrawBuffer( GL_FRONT );
-#else
- glDrawBuffer( GL_BACK );
-#endif
-
- glClearColor( rand()/(float)RAND_MAX,
- rand()/(float)RAND_MAX,
- rand()/(float)RAND_MAX,
- 1);
-
- glClear( GL_COLOR_BUFFER_BIT );
-
- glColor3f( rand()/(float)RAND_MAX,
- rand()/(float)RAND_MAX,
- rand()/(float)RAND_MAX );
- glPushMatrix();
- glRotatef(rot, 0, 0, 1);
- glScalef(.5, .5, .5);
- _subset_Rectf( -1, -1, 1, 1 );
- glPopMatrix();
-
-#ifdef FRONTBUFFER
- glFlush();
-#else
- eglSwapBuffers( dpy, surf );
-#endif
- glFinish();
-}
-
-
-/**
- * Test EGL_MESA_screen_surface functions
- */
-static void
-TestScreens(EGLDisplay dpy)
-{
-#define MAX 8
- EGLScreenMESA screens[MAX];
- EGLint numScreens;
- EGLint i;
-
- eglGetScreensMESA(dpy, screens, MAX, &numScreens);
- printf("Found %d screens\n", numScreens);
- for (i = 0; i < numScreens; i++) {
- printf(" Screen %d handle: %d\n", i, (int) screens[i]);
- }
-}
-
-
-int
-main(int argc, char *argv[])
-{
- int maj, min;
- EGLContext ctx;
- EGLSurface pbuffer, screen_surf;
- EGLConfig configs[10];
- EGLint numConfigs, i;
- EGLBoolean b;
- const EGLint pbufAttribs[] = {
- EGL_WIDTH, 500,
- EGL_HEIGHT, 500,
- EGL_NONE
- };
- const EGLint screenAttribs[] = {
- EGL_WIDTH, 1024,
- EGL_HEIGHT, 768,
- EGL_NONE
- };
- EGLModeMESA mode;
- EGLScreenMESA screen;
- EGLint count;
-
- /*
- EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY);
- */
- EGLDisplay d = eglGetDisplay("!fb_dri");
- assert(d);
-
- if (!eglInitialize(d, &maj, &min)) {
- printf("demo: eglInitialize failed\n");
- exit(1);
- }
-
- printf("EGL version = %d.%d\n", maj, min);
- printf("EGL_VENDOR = %s\n", eglQueryString(d, EGL_VENDOR));
-
- eglGetConfigs(d, configs, 10, &numConfigs);
- printf("Got %d EGL configs:\n", numConfigs);
- for (i = 0; i < numConfigs; i++) {
- EGLint id, red, depth;
- eglGetConfigAttrib(d, configs[i], EGL_CONFIG_ID, &id);
- eglGetConfigAttrib(d, configs[i], EGL_RED_SIZE, &red);
- eglGetConfigAttrib(d, configs[i], EGL_DEPTH_SIZE, &depth);
- printf("%2d: Red Size = %d Depth Size = %d\n", id, red, depth);
- }
-
- eglGetScreensMESA(d, &screen, 1, &count);
- eglGetModesMESA(d, screen, &mode, 1, &count);
-
- ctx = eglCreateContext(d, configs[0], EGL_NO_CONTEXT, NULL);
- if (ctx == EGL_NO_CONTEXT) {
- printf("failed to create context\n");
- return 0;
- }
-
- pbuffer = eglCreatePbufferSurface(d, configs[0], pbufAttribs);
- if (pbuffer == EGL_NO_SURFACE) {
- printf("failed to create pbuffer\n");
- return 0;
- }
-
- b = eglMakeCurrent(d, pbuffer, pbuffer, ctx);
- if (!b) {
- printf("make current failed\n");
- return 0;
- }
-
- b = eglMakeCurrent(d, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
-
- screen_surf = eglCreateScreenSurfaceMESA(d, configs[0], screenAttribs);
- if (screen_surf == EGL_NO_SURFACE) {
- printf("failed to create screen surface\n");
- return 0;
- }
-
- eglShowScreenSurfaceMESA(d, screen, screen_surf, mode);
-
- b = eglMakeCurrent(d, screen_surf, screen_surf, ctx);
- if (!b) {
- printf("make current failed\n");
- return 0;
- }
-
- glViewport(0, 0, 1024, 768);
- glDrawBuffer( GL_FRONT );
-
- glClearColor( 0,
- 1.0,
- 0,
- 1);
-
- glClear( GL_COLOR_BUFFER_BIT );
-
-
- TestScreens(d);
-
- glShadeModel( GL_FLAT );
-
- for (i = 0; i < 6; i++) {
- redraw(d, screen_surf, i*10 );
-
- printf("sleep(1)\n");
- sleep(1);
- }
-
- eglDestroySurface(d, pbuffer);
- eglDestroyContext(d, ctx);
- eglTerminate(d);
-
- return 0;
-}
diff --git a/progs/egl/demo3.c b/progs/egl/demo3.c
deleted file mode 100644
index 9edf7c952b..0000000000
--- a/progs/egl/demo3.c
+++ /dev/null
@@ -1,636 +0,0 @@
-/*
- * Exercise EGL API functions
- */
-
-#include <GLES/egl.h>
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-
-
-#define PIXEL_CENTER(x) ((long)(x) + 0.5)
-
-#define GAP 10
-#define ROWS 3
-#define COLS 4
-
-#define OPENGL_WIDTH 48
-#define OPENGL_HEIGHT 13
-
-
-GLenum rgb, doubleBuffer, windType;
-GLint windW, windH;
-
-GLenum mode1, mode2;
-GLint boxW, boxH;
-GLubyte OpenGL_bits[] = {
- 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
- 0x7f, 0xfb, 0xff, 0xff, 0xff, 0x01,
- 0x7f, 0xfb, 0xff, 0xff, 0xff, 0x01,
- 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
- 0x3e, 0x8f, 0xb7, 0xf9, 0xfc, 0x01,
- 0x63, 0xdb, 0xb0, 0x8d, 0x0d, 0x00,
- 0x63, 0xdb, 0xb7, 0x8d, 0x0d, 0x00,
- 0x63, 0xdb, 0xb6, 0x8d, 0x0d, 0x00,
- 0x63, 0x8f, 0xf3, 0xcc, 0x0d, 0x00,
- 0x63, 0x00, 0x00, 0x0c, 0x4c, 0x0a,
- 0x63, 0x00, 0x00, 0x0c, 0x4c, 0x0e,
- 0x63, 0x00, 0x00, 0x8c, 0xed, 0x0e,
- 0x3e, 0x00, 0x00, 0xf8, 0x0c, 0x00,
-};
-
-
-static void Init(void)
-{
-
- mode1 = GL_TRUE;
- mode2 = GL_TRUE;
-}
-
-static void Reshape(int width, int height)
-{
-
- windW = (GLint)width;
- windH = (GLint)height;
-}
-
-#if 0
-static void RotateColorMask(void)
-{
- static GLint rotation = 0;
-
- rotation = (rotation + 1) & 0x3;
- switch (rotation) {
- case 0:
- glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
- glIndexMask( 0xff );
- break;
- case 1:
- glColorMask(GL_FALSE, GL_TRUE, GL_TRUE, GL_TRUE);
- glIndexMask(0xFE);
- break;
- case 2:
- glColorMask(GL_TRUE, GL_FALSE, GL_TRUE, GL_TRUE);
- glIndexMask(0xFD);
- break;
- case 3:
- glColorMask(GL_TRUE, GL_TRUE, GL_FALSE, GL_TRUE);
- glIndexMask(0xFB);
- break;
- }
-}
-#endif
-
-static void Viewport(GLint row, GLint column)
-{
- GLint x, y;
-
- boxW = (windW - (COLS + 1) * GAP) / COLS;
- boxH = (windH - (ROWS + 1) * GAP) / ROWS;
-
- x = GAP + column * (boxW + GAP);
- y = GAP + row * (boxH + GAP);
-
- glViewport(x, y, boxW, boxH);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-boxW/2, boxW/2, -boxH/2, boxH/2, 0.0, 1.0);
- glMatrixMode(GL_MODELVIEW);
-
- glEnable(GL_SCISSOR_TEST);
- glScissor(x, y, boxW, boxH);
-}
-
-enum {
- COLOR_BLACK = 0,
- COLOR_RED,
- COLOR_GREEN,
- COLOR_YELLOW,
- COLOR_BLUE,
- COLOR_MAGENTA,
- COLOR_CYAN,
- COLOR_WHITE
-};
-
-static float RGBMap[9][3] = {
- {0, 0, 0},
- {1, 0, 0},
- {0, 1, 0},
- {1, 1, 0},
- {0, 0, 1},
- {1, 0, 1},
- {0, 1, 1},
- {1, 1, 1},
- {0.5, 0.5, 0.5}
-};
-
-static void SetColor(int c)
-{
- glColor3fv(RGBMap[c]);
-}
-
-static void Point(void)
-{
- GLint i;
-
- glBegin(GL_POINTS);
- SetColor(COLOR_WHITE);
- glVertex2i(0, 0);
- for (i = 1; i < 8; i++) {
- GLint j = i * 2;
- SetColor(COLOR_BLACK+i);
- glVertex2i(-j, -j);
- glVertex2i(-j, 0);
- glVertex2i(-j, j);
- glVertex2i(0, j);
- glVertex2i(j, j);
- glVertex2i(j, 0);
- glVertex2i(j, -j);
- glVertex2i(0, -j);
- }
- glEnd();
-}
-
-static void Lines(void)
-{
- GLint i;
-
- glPushMatrix();
-
- glTranslatef(-12, 0, 0);
- for (i = 1; i < 8; i++) {
- SetColor(COLOR_BLACK+i);
- glBegin(GL_LINES);
- glVertex2i(-boxW/4, -boxH/4);
- glVertex2i(boxW/4, boxH/4);
- glEnd();
- glTranslatef(4, 0, 0);
- }
-
- glPopMatrix();
-
- glBegin(GL_LINES);
- glVertex2i(0, 0);
- glEnd();
-}
-
-static void LineStrip(void)
-{
-
- glBegin(GL_LINE_STRIP);
- SetColor(COLOR_RED);
- glVertex2f(PIXEL_CENTER(-boxW/4), PIXEL_CENTER(-boxH/4));
- SetColor(COLOR_GREEN);
- glVertex2f(PIXEL_CENTER(-boxW/4), PIXEL_CENTER(boxH/4));
- SetColor(COLOR_BLUE);
- glVertex2f(PIXEL_CENTER(boxW/4), PIXEL_CENTER(boxH/4));
- SetColor(COLOR_WHITE);
- glVertex2f(PIXEL_CENTER(boxW/4), PIXEL_CENTER(-boxH/4));
- glEnd();
-
- glBegin(GL_LINE_STRIP);
- glVertex2i(0, 0);
- glEnd();
-}
-
-static void LineLoop(void)
-{
-
- glBegin(GL_LINE_LOOP);
- SetColor(COLOR_RED);
- glVertex2f(PIXEL_CENTER(-boxW/4), PIXEL_CENTER(-boxH/4));
- SetColor(COLOR_GREEN);
- glVertex2f(PIXEL_CENTER(-boxW/4), PIXEL_CENTER(boxH/4));
- SetColor(COLOR_BLUE);
- glVertex2f(PIXEL_CENTER(boxW/4), PIXEL_CENTER(boxH/4));
- SetColor(COLOR_WHITE);
- glVertex2f(PIXEL_CENTER(boxW/4), PIXEL_CENTER(-boxH/4));
- glEnd();
-
- glEnable(GL_LOGIC_OP);
- glLogicOp(GL_XOR);
-
- glEnable(GL_BLEND);
- glBlendFunc(GL_ONE, GL_ONE);
-
- SetColor(COLOR_MAGENTA);
- glBegin(GL_LINE_LOOP);
- glVertex2f(PIXEL_CENTER(-boxW/8), PIXEL_CENTER(-boxH/8));
- glVertex2f(PIXEL_CENTER(-boxW/8), PIXEL_CENTER(boxH/8));
- glEnd();
- glBegin(GL_LINE_LOOP);
- glVertex2f(PIXEL_CENTER(-boxW/8), PIXEL_CENTER(boxH/8+5));
- glVertex2f(PIXEL_CENTER(boxW/8), PIXEL_CENTER(boxH/8+5));
- glEnd();
- glDisable(GL_LOGIC_OP);
- glDisable(GL_BLEND);
-
- SetColor(COLOR_GREEN);
- glBegin(GL_POINTS);
- glVertex2i(0, 0);
- glEnd();
-
- glBegin(GL_LINE_LOOP);
- glVertex2i(0, 0);
- glEnd();
-}
-
-static void Bitmap(void)
-{
-
- glBegin(GL_LINES);
- SetColor(COLOR_GREEN);
- glVertex2i(-boxW/2, 0);
- glVertex2i(boxW/2, 0);
- glVertex2i(0, -boxH/2);
- glVertex2i(0, boxH/2);
- SetColor(COLOR_RED);
- glVertex2i(0, -3);
- glVertex2i(0, -3+OPENGL_HEIGHT);
- SetColor(COLOR_BLUE);
- glVertex2i(0, -3);
- glVertex2i(OPENGL_WIDTH, -3);
- glEnd();
-
- SetColor(COLOR_GREEN);
-
- glPixelStorei(GL_UNPACK_LSB_FIRST, GL_TRUE);
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-
- glRasterPos2i(0, 0);
- glBitmap(OPENGL_WIDTH, OPENGL_HEIGHT, 0, 3, 0.0, 0.0, OpenGL_bits);
-}
-
-static void Triangles(void)
-{
-
- glBegin(GL_TRIANGLES);
- SetColor(COLOR_GREEN);
- glVertex2i(-boxW/4, -boxH/4);
- SetColor(COLOR_RED);
- glVertex2i(-boxW/8, -boxH/16);
- SetColor(COLOR_BLUE);
- glVertex2i(boxW/8, -boxH/16);
-
- SetColor(COLOR_GREEN);
- glVertex2i(-boxW/4, boxH/4);
- SetColor(COLOR_RED);
- glVertex2i(-boxW/8, boxH/16);
- SetColor(COLOR_BLUE);
- glVertex2i(boxW/8, boxH/16);
- glEnd();
-
- glBegin(GL_TRIANGLES);
- glVertex2i(0, 0);
- glVertex2i(-100, 100);
- glEnd();
-}
-
-static void TriangleStrip(void)
-{
-
- glBegin(GL_TRIANGLE_STRIP);
- SetColor(COLOR_GREEN);
- glVertex2i(-boxW/4, -boxH/4);
- SetColor(COLOR_RED);
- glVertex2i(-boxW/4, boxH/4);
- SetColor(COLOR_BLUE);
- glVertex2i(0, -boxH/4);
- SetColor(COLOR_WHITE);
- glVertex2i(0, boxH/4);
- SetColor(COLOR_CYAN);
- glVertex2i(boxW/4, -boxH/4);
- SetColor(COLOR_YELLOW);
- glVertex2i(boxW/4, boxH/4);
- glEnd();
-
- glBegin(GL_TRIANGLE_STRIP);
- glVertex2i(0, 0);
- glVertex2i(-100, 100);
- glEnd();
-}
-
-static void TriangleFan(void)
-{
- GLint vx[8][2];
- GLint x0, y0, x1, y1, x2, y2, x3, y3;
- GLint i;
-
- y0 = -boxH/4;
- y1 = y0 + boxH/2/3;
- y2 = y1 + boxH/2/3;
- y3 = boxH/4;
- x0 = -boxW/4;
- x1 = x0 + boxW/2/3;
- x2 = x1 + boxW/2/3;
- x3 = boxW/4;
-
- vx[0][0] = x0; vx[0][1] = y1;
- vx[1][0] = x0; vx[1][1] = y2;
- vx[2][0] = x1; vx[2][1] = y3;
- vx[3][0] = x2; vx[3][1] = y3;
- vx[4][0] = x3; vx[4][1] = y2;
- vx[5][0] = x3; vx[5][1] = y1;
- vx[6][0] = x2; vx[6][1] = y0;
- vx[7][0] = x1; vx[7][1] = y0;
-
- glBegin(GL_TRIANGLE_FAN);
- SetColor(COLOR_WHITE);
- glVertex2i(0, 0);
- for (i = 0; i < 8; i++) {
- SetColor(COLOR_WHITE-i);
- glVertex2iv(vx[i]);
- }
- glEnd();
-
- glBegin(GL_TRIANGLE_FAN);
- glVertex2i(0, 0);
- glVertex2i(-100, 100);
- glEnd();
-}
-
-static void Rect(void)
-{
-
- SetColor(COLOR_GREEN);
- glRecti(-boxW/4, -boxH/4, boxW/4, boxH/4);
-}
-
-static void PolygonFunc(void)
-{
- GLint vx[8][2];
- GLint x0, y0, x1, y1, x2, y2, x3, y3;
- GLint i;
-
- y0 = -boxH/4;
- y1 = y0 + boxH/2/3;
- y2 = y1 + boxH/2/3;
- y3 = boxH/4;
- x0 = -boxW/4;
- x1 = x0 + boxW/2/3;
- x2 = x1 + boxW/2/3;
- x3 = boxW/4;
-
- vx[0][0] = x0; vx[0][1] = y1;
- vx[1][0] = x0; vx[1][1] = y2;
- vx[2][0] = x1; vx[2][1] = y3;
- vx[3][0] = x2; vx[3][1] = y3;
- vx[4][0] = x3; vx[4][1] = y2;
- vx[5][0] = x3; vx[5][1] = y1;
- vx[6][0] = x2; vx[6][1] = y0;
- vx[7][0] = x1; vx[7][1] = y0;
-
- glBegin(GL_POLYGON);
- for (i = 0; i < 8; i++) {
- SetColor(COLOR_WHITE-i);
- glVertex2iv(vx[i]);
- }
- glEnd();
-
- glBegin(GL_POLYGON);
- glVertex2i(0, 0);
- glVertex2i(100, 100);
- glEnd();
-}
-
-static void Quads(void)
-{
-
- glBegin(GL_QUADS);
- SetColor(COLOR_GREEN);
- glVertex2i(-boxW/4, -boxH/4);
- SetColor(COLOR_RED);
- glVertex2i(-boxW/8, -boxH/16);
- SetColor(COLOR_BLUE);
- glVertex2i(boxW/8, -boxH/16);
- SetColor(COLOR_WHITE);
- glVertex2i(boxW/4, -boxH/4);
-
- SetColor(COLOR_GREEN);
- glVertex2i(-boxW/4, boxH/4);
- SetColor(COLOR_RED);
- glVertex2i(-boxW/8, boxH/16);
- SetColor(COLOR_BLUE);
- glVertex2i(boxW/8, boxH/16);
- SetColor(COLOR_WHITE);
- glVertex2i(boxW/4, boxH/4);
- glEnd();
-
- glBegin(GL_QUADS);
- glVertex2i(0, 0);
- glVertex2i(100, 100);
- glVertex2i(-100, 100);
- glEnd();
-}
-
-static void QuadStrip(void)
-{
-
- glBegin(GL_QUAD_STRIP);
- SetColor(COLOR_GREEN);
- glVertex2i(-boxW/4, -boxH/4);
- SetColor(COLOR_RED);
- glVertex2i(-boxW/4, boxH/4);
- SetColor(COLOR_BLUE);
- glVertex2i(0, -boxH/4);
- SetColor(COLOR_WHITE);
- glVertex2i(0, boxH/4);
- SetColor(COLOR_CYAN);
- glVertex2i(boxW/4, -boxH/4);
- SetColor(COLOR_YELLOW);
- glVertex2i(boxW/4, boxH/4);
- glEnd();
-
- glBegin(GL_QUAD_STRIP);
- glVertex2i(0, 0);
- glVertex2i(100, 100);
- glVertex2i(-100, 100);
- glEnd();
-}
-
-static void Draw(EGLDisplay dpy, EGLSurface surf)
-{
-
- glViewport(0, 0, windW, windH);
- glDisable(GL_SCISSOR_TEST);
-
- glPushAttrib(GL_COLOR_BUFFER_BIT);
-
- glColorMask(1, 1, 1, 1);
- glIndexMask(~0);
-
- glClearColor(0.0, 0.0, 0.0, 0.0);
- glClear(GL_COLOR_BUFFER_BIT);
-
- glPopAttrib();
-
- if (mode1) {
- glShadeModel(GL_SMOOTH);
- } else {
- glShadeModel(GL_FLAT);
- }
-
- if (mode2) {
- glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
- } else {
- glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
- }
-
- Viewport(0, 0); Point();
- Viewport(0, 1); Lines();
- Viewport(0, 2); LineStrip();
- Viewport(0, 3); LineLoop();
-
- Viewport(1, 0); Bitmap();
-
- Viewport(1, 1); TriangleFan();
- Viewport(1, 2); Triangles();
- Viewport(1, 3); TriangleStrip();
-
- Viewport(2, 0); Rect();
- Viewport(2, 1); PolygonFunc();
- Viewport(2, 2); Quads();
- Viewport(2, 3); QuadStrip();
-
- glFlush();
-
- if (doubleBuffer) {
- eglSwapBuffers(dpy, surf);
- }
-}
-
-static void
-write_ppm(const char *filename, const GLubyte *buffer, int width, int height)
-{
- const int binary = 0;
- FILE *f = fopen( filename, "w" );
- if (f) {
- int i, x, y;
- const GLubyte *ptr = buffer;
- if (binary) {
- fprintf(f,"P6\n");
- fprintf(f,"# ppm-file created by osdemo.c\n");
- fprintf(f,"%i %i\n", width,height);
- fprintf(f,"255\n");
- fclose(f);
- f = fopen( filename, "ab" ); /* reopen in binary append mode */
- for (y=height-1; y>=0; y--) {
- for (x=0; x<width; x++) {
- i = (y*width + x) * 4;
- fputc(ptr[i], f); /* write red */
- fputc(ptr[i+1], f); /* write green */
- fputc(ptr[i+2], f); /* write blue */
- }
- }
- }
- else {
- /*ASCII*/
- int counter = 0;
- fprintf(f,"P3\n");
- fprintf(f,"# ascii ppm file created by osdemo.c\n");
- fprintf(f,"%i %i\n", width, height);
- fprintf(f,"255\n");
- for (y=height-1; y>=0; y--) {
- for (x=0; x<width; x++) {
- i = (y*width + x) * 4;
- fprintf(f, " %3d %3d %3d", ptr[i], ptr[i+1], ptr[i+2]);
- counter++;
- if (counter % 5 == 0)
- fprintf(f, "\n");
- }
- }
- }
- fclose(f);
- }
-}
-
-#include "../src/egl/main/egldisplay.h"
-
-typedef struct fb_display
-{
- _EGLDisplay Base; /* base class/object */
- void *pFB;
-} fbDisplay;
-
-
-int
-main(int argc, char *argv[])
-{
- int maj, min;
- EGLContext ctx;
- EGLSurface screen_surf;
- EGLConfig configs[10];
- EGLScreenMESA screen;
- EGLModeMESA mode;
- EGLint numConfigs, count;
- EGLBoolean b;
- const EGLint screenAttribs[] = {
- EGL_WIDTH, 1024,
- EGL_HEIGHT, 768,
- EGL_NONE
- };
-
- /*
- EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY);
- */
- EGLDisplay d = eglGetDisplay(":0");
- assert(d);
-
- if (!eglInitialize(d, &maj, &min)) {
- printf("demo: eglInitialize failed\n");
- exit(1);
- }
-
- printf("EGL version = %d.%d\n", maj, min);
- printf("EGL_VENDOR = %s\n", eglQueryString(d, EGL_VENDOR));
-
- eglGetConfigs(d, configs, 10, &numConfigs);
- eglGetScreensMESA(d, &screen, 1, &count);
- eglGetModesMESA(d, screen, &mode, 1, &count);
-
- ctx = eglCreateContext(d, configs[0], EGL_NO_CONTEXT, NULL);
- if (ctx == EGL_NO_CONTEXT) {
- printf("failed to create context\n");
- return 0;
- }
-
- screen_surf = eglCreateScreenSurfaceMESA(d, configs[0], screenAttribs);
- if (screen_surf == EGL_NO_SURFACE) {
- printf("failed to create screen surface\n");
- return 0;
- }
-
- eglShowScreenSurfaceMESA(d, screen, screen_surf, mode);
-
- b = eglMakeCurrent(d, screen_surf, screen_surf, ctx);
- if (!b) {
- printf("make current failed\n");
- return 0;
- }
- glViewport(0, 0, 1024, 768);
-
-
- Init();
- Reshape(1024, 768);
-
- glDrawBuffer( GL_FRONT );
- glClearColor( 0, 1.0, 0, 1);
-
- glClear( GL_COLOR_BUFFER_BIT );
-
- doubleBuffer = 1;
- glDrawBuffer( GL_BACK );
-
- Draw(d, screen_surf);
-
- write_ppm("dump.ppm", ((struct fb_display *)_eglLookupDisplay(d))->pFB, 1024, 768);
-
- eglDestroySurface(d, screen_surf);
- eglDestroyContext(d, ctx);
- eglTerminate(d);
-
- return 0;
-}
diff --git a/progs/egl/eglgears.c b/progs/egl/eglgears.c
deleted file mode 100644
index 9feee20d88..0000000000
--- a/progs/egl/eglgears.c
+++ /dev/null
@@ -1,475 +0,0 @@
-/*
- * Copyright (C) 1999-2001 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.
- */
-
-/*
- * This is a port of the infamous "glxgears" demo to straight EGL
- * Port by Dane Rushton 10 July 2005
- *
- * No command line options.
- * Program runs for 5 seconds then exits, outputing framerate to console
- */
-
-#include <math.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <GL/gl.h>
-#include <GLES/egl.h>
-#include <assert.h>
-
-#define MAX_CONFIGS 10
-#define MAX_MODES 100
-
-#define BENCHMARK
-
-#ifdef BENCHMARK
-
-/* XXX this probably isn't very portable */
-
-#include <sys/time.h>
-#include <unistd.h>
-
-/* return current time (in seconds) */
-static double
-current_time(void)
-{
- struct timeval tv;
-#ifdef __VMS
- (void) gettimeofday(&tv, NULL );
-#else
- struct timezone tz;
- (void) gettimeofday(&tv, &tz);
-#endif
- return (double) tv.tv_sec + tv.tv_usec / 1000000.0;
-}
-
-#else /*BENCHMARK*/
-
-/* dummy */
-static double
-current_time(void)
-{
- /* update this function for other platforms! */
- static double t = 0.0;
- static int warn = 1;
- if (warn) {
- fprintf(stderr, "Warning: current_time() not implemented!!\n");
- warn = 0;
- }
- return t += 1.0;
-}
-
-#endif /*BENCHMARK*/
-
-
-#ifndef M_PI
-#define M_PI 3.14159265
-#endif
-
-
-static GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 0.0;
-static GLint gear1, gear2, gear3;
-static GLfloat angle = 0.0;
-
-#if 0
-static GLfloat eyesep = 5.0; /* Eye separation. */
-static GLfloat fix_point = 40.0; /* Fixation point distance. */
-static GLfloat left, right, asp; /* Stereo frustum params. */
-#endif
-
-
-/*
- *
- * 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 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();
-}
-
-
-/* new window size or exposure */
-static void
-reshape(int width, int height)
-{
- glViewport(0, 0, (GLint) width, (GLint) height);
-
- GLfloat h = (GLfloat) height / (GLfloat) width;
-
- 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);
-}
-
-
-
-
-static void run_gears(EGLDisplay dpy, EGLSurface surf, int ttr)
-{
- double st = current_time();
- double ct = st;
- int frames = 0;
- while (ct - st < ttr)
- {
- double tt = current_time();
- double dt = tt - ct;
- ct = tt;
-
- /* advance rotation for next frame */
- angle += 70.0 * dt; /* 70 degrees per second */
- if (angle > 3600.0)
- angle -= 3600.0;
-
- draw();
-
- eglSwapBuffers(dpy, surf);
-
-
- frames++;
- }
-
- GLfloat seconds = ct - st;
- GLfloat fps = frames / seconds;
- printf("%d frames in %3.1f seconds = %6.3f FPS\n", frames, seconds, fps);
-
-}
-
-
-int
-main(int argc, char *argv[])
-{
- int maj, min;
- EGLContext ctx;
- EGLSurface screen_surf;
- EGLConfig configs[MAX_CONFIGS];
- EGLint numConfigs, i;
- EGLBoolean b;
- EGLDisplay d;
- EGLint screenAttribs[10];
- EGLModeMESA mode[MAX_MODES];
- EGLScreenMESA screen;
- EGLint count, chosenMode;
- GLboolean printInfo = GL_FALSE;
- EGLint width = 0, height = 0;
-
- /* parse cmd line args */
- for (i = 1; i < argc; i++)
- {
- if (strcmp(argv[i], "-info") == 0)
- {
- printInfo = GL_TRUE;
- }
- else
- printf("Warning: unknown parameter: %s\n", argv[i]);
- }
-
- /* DBR : Create EGL context/surface etc */
- d = eglGetDisplay(":0");
- assert(d);
-
- if (!eglInitialize(d, &maj, &min)) {
- printf("eglgears: eglInitialize failed\n");
- exit(1);
- }
-
- printf("eglgears: EGL version = %d.%d\n", maj, min);
- printf("eglgears: EGL_VENDOR = %s\n", eglQueryString(d, EGL_VENDOR));
-
- /* XXX use ChooseConfig */
- eglGetConfigs(d, configs, MAX_CONFIGS, &numConfigs);
- eglGetScreensMESA(d, &screen, 1, &count);
-
- if (!eglGetModesMESA(d, screen, mode, MAX_MODES, &count) || count == 0) {
- printf("eglgears: eglGetModesMESA failed!\n");
- return 0;
- }
-
- /* Print list of modes, and find the one to use */
- printf("eglgears: Found %d modes:\n", count);
- for (i = 0; i < count; i++) {
- EGLint w, h;
- eglGetModeAttribMESA(d, mode[i], EGL_WIDTH, &w);
- eglGetModeAttribMESA(d, mode[i], EGL_HEIGHT, &h);
- printf("%3d: %d x %d\n", i, w, h);
- if (w > width && h > height && w <= 1280 && h <= 1024) {
- width = w;
- height = h;
- chosenMode = i;
- }
- }
- printf("eglgears: Using screen mode/size %d: %d x %d\n", chosenMode, width, height);
-
- ctx = eglCreateContext(d, configs[0], EGL_NO_CONTEXT, NULL);
- if (ctx == EGL_NO_CONTEXT) {
- printf("eglgears: failed to create context\n");
- return 0;
- }
-
- /* build up screenAttribs array */
- i = 0;
- screenAttribs[i++] = EGL_WIDTH;
- screenAttribs[i++] = width;
- screenAttribs[i++] = EGL_HEIGHT;
- screenAttribs[i++] = height;
- screenAttribs[i++] = EGL_NONE;
-
- screen_surf = eglCreateScreenSurfaceMESA(d, configs[0], screenAttribs);
- if (screen_surf == EGL_NO_SURFACE) {
- printf("eglgears: failed to create screen surface\n");
- return 0;
- }
-
- b = eglShowScreenSurfaceMESA(d, screen, screen_surf, mode[chosenMode]);
- if (!b) {
- printf("eglgears: show surface failed\n");
- return 0;
- }
-
- b = eglMakeCurrent(d, screen_surf, screen_surf, ctx);
- if (!b) {
- printf("eglgears: make current failed\n");
- return 0;
- }
-
- 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));
- }
-
- init();
- reshape(width, height);
-
- glDrawBuffer( GL_BACK );
-
- run_gears(d, screen_surf, 5.0);
-
- eglDestroySurface(d, screen_surf);
- eglDestroyContext(d, ctx);
- eglTerminate(d);
-
- return 0;
-}
diff --git a/progs/egl/eglinfo.c b/progs/egl/eglinfo.c
deleted file mode 100644
index f9c2475445..0000000000
--- a/progs/egl/eglinfo.c
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * eglinfo - like glxinfo but for EGL
- *
- * Brian Paul
- * 11 March 2005
- *
- * Copyright (C) 2005 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.
- */
-
-
-#include <GLES/egl.h>
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define MAX_CONFIGS 1000
-#define MAX_MODES 1000
-#define MAX_SCREENS 10
-
-
-/**
- * Print table of all available configurations.
- */
-static void
-PrintConfigs(EGLDisplay d)
-{
- EGLConfig configs[MAX_CONFIGS];
- EGLint numConfigs, i;
-
- eglGetConfigs(d, configs, MAX_CONFIGS, &numConfigs);
-
- printf("Configurations:\n");
- printf(" bf lv d st colorbuffer dp st supported\n");
- printf(" id sz l b ro r g b a th cl surfaces \n");
- printf("---------------------------------------------------\n");
- for (i = 0; i < numConfigs; i++) {
- EGLint id, size, level;
- EGLint red, green, blue, alpha;
- EGLint depth, stencil;
- EGLint surfaces;
- EGLint doubleBuf = 1, stereo = 0;
- char surfString[100] = "";
-
- eglGetConfigAttrib(d, configs[i], EGL_CONFIG_ID, &id);
- eglGetConfigAttrib(d, configs[i], EGL_BUFFER_SIZE, &size);
- eglGetConfigAttrib(d, configs[i], EGL_LEVEL, &level);
-
- eglGetConfigAttrib(d, configs[i], EGL_RED_SIZE, &red);
- eglGetConfigAttrib(d, configs[i], EGL_GREEN_SIZE, &green);
- eglGetConfigAttrib(d, configs[i], EGL_BLUE_SIZE, &blue);
- eglGetConfigAttrib(d, configs[i], EGL_ALPHA_SIZE, &alpha);
- eglGetConfigAttrib(d, configs[i], EGL_DEPTH_SIZE, &depth);
- eglGetConfigAttrib(d, configs[i], EGL_STENCIL_SIZE, &stencil);
- eglGetConfigAttrib(d, configs[i], EGL_SURFACE_TYPE, &surfaces);
-
- if (surfaces & EGL_WINDOW_BIT)
- strcat(surfString, "win,");
- if (surfaces & EGL_PBUFFER_BIT)
- strcat(surfString, "pb,");
- if (surfaces & EGL_PIXMAP_BIT)
- strcat(surfString, "pix,");
-#ifdef EGL_MESA_screen_surface
- if (surfaces & EGL_SCREEN_BIT_MESA)
- strcat(surfString, "scrn,");
-#endif
- if (strlen(surfString) > 0)
- surfString[strlen(surfString) - 1] = 0;
-
- printf("0x%02x %2d %2d %c %c %2d %2d %2d %2d %2d %2d %-12s\n",
- id, size, level,
- doubleBuf ? 'y' : '.',
- stereo ? 'y' : '.',
- red, green, blue, alpha,
- depth, stencil, surfString);
- }
-}
-
-
-/**
- * Print table of all available configurations.
- */
-static void
-PrintModes(EGLDisplay d)
-{
-#ifdef EGL_MESA_screen_surface
- const char *extensions = eglQueryString(d, EGL_EXTENSIONS);
- if (strstr(extensions, "EGL_MESA_screen_surface")) {
- EGLScreenMESA screens[MAX_SCREENS];
- EGLint numScreens = 1, scrn;
- EGLModeMESA modes[MAX_MODES];
-
- eglGetScreensMESA(d, screens, MAX_SCREENS, &numScreens);
- printf("Number of Screens: %d\n\n", numScreens);
-
- for (scrn = 0; scrn < numScreens; scrn++) {
- EGLint numModes, i;
-
- eglGetModesMESA(d, screens[scrn], modes, MAX_MODES, &numModes);
-
- printf("Screen %d Modes:\n", scrn);
- printf(" id width height refresh name\n");
- printf("-----------------------------------------\n");
- for (i = 0; i < numModes; i++) {
- EGLint id, w, h, r;
- const char *str;
- eglGetModeAttribMESA(d, modes[i], EGL_MODE_ID_MESA, &id);
- eglGetModeAttribMESA(d, modes[i], EGL_WIDTH, &w);
- eglGetModeAttribMESA(d, modes[i], EGL_HEIGHT, &h);
- eglGetModeAttribMESA(d, modes[i], EGL_REFRESH_RATE_MESA, &r);
- str = eglQueryModeStringMESA(d, modes[i]);
- printf("0x%02x %5d %5d %.3f %s\n", id, w, h, r / 1000.0, str);
- }
- }
- }
-#endif
-}
-
-
-
-int
-main(int argc, char *argv[])
-{
- int maj, min;
- /*EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY);*/
- EGLDisplay d = eglGetDisplay(":0");
-
- if (!eglInitialize(d, &maj, &min)) {
- printf("eglinfo: eglInitialize failed\n");
- exit(1);
- }
-
- printf("EGL API version: %d.%d\n", maj, min);
- printf("EGL vendor string: %s\n", eglQueryString(d, EGL_VENDOR));
- printf("EGL version string: %s\n", eglQueryString(d, EGL_VERSION));
- printf("EGL extensions string:\n");
- printf(" %s\n", eglQueryString(d, EGL_EXTENSIONS));
- printf("\n");
-
- PrintConfigs(d);
-
- printf("\n");
-
- PrintModes(d);
-
- eglTerminate(d);
-
- return 0;
-}
diff --git a/progs/fbdev/.gitignore b/progs/fbdev/.gitignore
deleted file mode 100644
index b9ddf559fd..0000000000
--- a/progs/fbdev/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-glfbdevtest
diff --git a/progs/fp/.gitignore b/progs/fp/.gitignore
deleted file mode 100644
index b265f1fed7..0000000000
--- a/progs/fp/.gitignore
+++ /dev/null
@@ -1,42 +0,0 @@
-point-position
-readtex.c
-readtex.h
-tri-abs
-tri-add
-tri-cmp
-tri-cos
-tri-depth
-tri-depth2
-tri-depthwrite
-tri-depthwrite2
-tri-dp3
-tri-dp4
-tri-dph
-tri-dst
-tri-ex2
-tri-flr
-tri-frc
-tri-kil
-tri-lg2
-tri-lit
-tri-lrp
-tri-mad
-tri-max
-tri-min
-tri-mov
-tri-mul
-tri-param
-tri-position
-tri-pow
-tri-rcp
-tri-rsq
-tri-scs
-tri-sge
-tri-sge2
-tri-sin
-tri-slt
-tri-sub
-tri-swz
-tri-swz2
-tri-tex
-tri-xpd
diff --git a/progs/fp/Makefile b/progs/fp/Makefile
deleted file mode 100644
index 3e52474777..0000000000
--- a/progs/fp/Makefile
+++ /dev/null
@@ -1,128 +0,0 @@
-# progs/tests/Makefile
-
-
-# These programs aren't intended to be included with the normal distro.
-# They're not too interesting but they're good for testing.
-
-TOP = ../..
-include $(TOP)/configs/current
-
-
-LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
-
-SOURCES = \
- tri-abs.c \
- tri-add.c \
- tri-cmp.c \
- tri-cos.c \
- tri-dp3.c \
- tri-dp4.c \
- tri-dph.c \
- tri-dst.c \
- tri-ex2.c \
- tri-flr.c \
- tri-frc.c \
- tri-kil.c \
- tri-lg2.c \
- tri-lit.c \
- tri-lrp.c \
- tri-mad.c \
- tri-max.c \
- tri-min.c \
- tri-mov.c \
- tri-mul.c \
- tri-pow.c \
- tri-param.c \
- tri-rcp.c \
- tri-rsq.c \
- tri-scs.c \
- tri-sge.c \
- tri-sge2.c \
- tri-sin.c \
- tri-slt.c \
- tri-sub.c \
- tri-swz.c \
- tri-swz2.c \
- tri-tex.c \
- tri-xpd.c \
- tri-position.c \
- point-position.c \
- tri-depth.c \
- tri-depth2.c \
- tri-depthwrite.c \
- tri-depthwrite2.c \
-
-NOTDONE=\
- tri-txb.c \
- tri-txp.c \
- tri-depthwrite.c \
- tri-fogoption.c
-
-
-PROGS = $(SOURCES:%.c=%)
-
-INCLUDES = -I. -I$(TOP)/include -I../samples
-
-UTIL_FILES = readtex.h readtex.c
-
-
-##### RULES #####
-
-.SUFFIXES:
-.SUFFIXES: .c
-
-.c:
- $(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
-
-.c.o:
- $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
-
-.S.o:
- $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
-
-
-##### TARGETS #####
-
-default: $(UTIL_FILES) $(PROGS)
-
-clean:
- -rm -f $(PROGS)
- -rm -f *.o
- -rm -f getproclist.h
-
-
-# auto code generation
-getprocaddress: getprocaddress.c getproclist.h
-
-getproclist.h: $(TOP)/src/mesa/glapi/gl_API.xml getprocaddress.c getprocaddress.py
- python getprocaddress.py > getproclist.h
-
-
-texrect: texrect.o readtex.o
- $(CC) $(CFLAGS) $(LDFLAGS) texrect.o readtex.o $(LIBS) -o $@
-
-texrect.o: texrect.c readtex.h
- $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
-
-invert: invert.o readtex.o
- $(CC) $(CFLAGS) $(LDFLAGS) invert.o readtex.o $(LIBS) -o $@
-
-invert.o: invert.c readtex.h
- $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
-
-readtex.o: readtex.c
- $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
-
-
-readtex.h: $(TOP)/progs/util/readtex.h
- ln -s $(TOP)/progs/util/readtex.h .
-
-readtex.c: $(TOP)/progs/util/readtex.c
- ln -s $(TOP)/progs/util/readtex.c .
-
-
-
-
-# Emacs tags
-tags:
- etags `find . -name \*.[ch]` `find ../include`
diff --git a/progs/fp/point-position.c b/progs/fp/point-position.c
deleted file mode 100644
index c352a939cb..0000000000
--- a/progs/fp/point-position.c
+++ /dev/null
@@ -1,119 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "MUL result.color, fragment.position, {.005}.x; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
-#if 0
- glBegin(GL_QUADS);
- glTexCoord2f(1,0);
- glVertex3f( 0.9, -0.9, -30.0);
- glTexCoord2f(1,1);
- glVertex3f( 0.9, 0.9, -30.0);
- glTexCoord2f(0,1);
- glVertex3f(-0.9, 0.9, -30.0);
- glTexCoord2f(0,0);
- glVertex3f(-0.9, -0.9, -30.0);
- glEnd();
-#else
- glPointSize(100);
- glBegin(GL_POINTS);
- glColor3f(0,0,1);
- glVertex3f( 0, 0, -30.0);
- glEnd();
-#endif
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-abs.c b/progs/fp/tri-abs.c
deleted file mode 100644
index 44aa2cfa3a..0000000000
--- a/progs/fp/tri-abs.c
+++ /dev/null
@@ -1,107 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "TEMP R0;\n"
- "SUB R0, {0.5}.x, fragment.color; \n"
- "ABS result.color, R0; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-}
-
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-add.c b/progs/fp/tri-add.c
deleted file mode 100644
index b086126c86..0000000000
--- a/progs/fp/tri-add.c
+++ /dev/null
@@ -1,110 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "TEMP R0;\n"
- "ADD R0, fragment.color, fragment.color; \n"
- "ADD result.color, R0, R0; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-cmp.c b/progs/fp/tri-cmp.c
deleted file mode 100644
index 968b67f3d9..0000000000
--- a/progs/fp/tri-cmp.c
+++ /dev/null
@@ -1,110 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "TEMP R0;\n"
- "SUB R0, {0.5}.x, fragment.color; \n"
- "CMP result.color, R0, fragment.color, {0.0}.x; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-cos.c b/progs/fp/tri-cos.c
deleted file mode 100644
index 7ea2453218..0000000000
--- a/progs/fp/tri-cos.c
+++ /dev/null
@@ -1,113 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "TEMP R0; \n"
- "MUL R0, fragment.color, {3.14}.x; \n"
- "COS result.color.x, R0.x; \n"
- "COS result.color.y, R0.y; \n"
- "COS result.color.z, R0.z; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-depth.c b/progs/fp/tri-depth.c
deleted file mode 100644
index a1f0579c8e..0000000000
--- a/progs/fp/tri-depth.c
+++ /dev/null
@@ -1,111 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
- /* scale of 10.0 gives me a visible result on nv hardware.
- */
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "MUL result.color, fragment.position.z, {10.0}.x; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -40.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -40.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -25.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-depth2.c b/progs/fp/tri-depth2.c
deleted file mode 100644
index f309628283..0000000000
--- a/progs/fp/tri-depth2.c
+++ /dev/null
@@ -1,116 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
- /* scale of 10.0 gives me a visible result on nv hardware.
- */
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "TEMP R0;\n"
- "MUL R0, fragment.position.z, {10.0}.x;\n"
- "MOV result.color, R0; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
- glEnable(GL_DEPTH_TEST);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glVertex3f( 0.9, 0.9, -30.0);
- glVertex3f(-0.9, 0.0, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, -0.9, -40.0);
- glVertex3f(-0.9, 0.9, -40.0);
- glVertex3f( 0.9, 0.0, -25.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB | GLUT_DEPTH;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-depthwrite.c b/progs/fp/tri-depthwrite.c
deleted file mode 100644
index fedeec4577..0000000000
--- a/progs/fp/tri-depthwrite.c
+++ /dev/null
@@ -1,107 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-static void Init(void)
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "MUL result.depth.z, fragment.color.z, {.1}.x; \n"
- "MOV result.color.xy, fragment.color; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
- glEnable(GL_DEPTH_TEST);
-
-
- glBegin(GL_TRIANGLES);
- glColor4f(.8,0,.5,0);
- glVertex3f( 0.9, -0.9, -30.0);
- glVertex3f( 0.9, 0.9, -30.0);
- glVertex3f(-0.9, 0.0, -30.0);
-
- glColor4f(0,.8,.7,0);
- glVertex3f(-0.9, -0.9, -40.0);
- glColor4f(0,.8,.7,0);
- glVertex3f(-0.9, 0.9, -40.0);
- glColor4f(0,.8,.3,0);
- glVertex3f( 0.9, 0.0, -40.0);
- glEnd();
-
- glFlush();
-}
-
-
-int main(int argc, char **argv)
-{
- glutInit(&argc, argv);
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 300, 300);
-
- glutInitDisplayMode(GLUT_DEPTH | GLUT_RGB | GLUT_SINGLE);
-
- if (glutCreateWindow("Depth Test") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-depthwrite2.c b/progs/fp/tri-depthwrite2.c
deleted file mode 100644
index 5547092ec9..0000000000
--- a/progs/fp/tri-depthwrite2.c
+++ /dev/null
@@ -1,107 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-static void Init(void)
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "MUL result.depth.z, fragment.color.z, {.1}.x; \n"
- "MOV result.color, fragment.color.z; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
- glEnable(GL_DEPTH_TEST);
-
-
- glBegin(GL_TRIANGLES);
- glColor4f(.8,0,.5,0);
- glVertex3f( 0.9, -0.9, -30.0);
- glVertex3f( 0.9, 0.9, -30.0);
- glVertex3f(-0.9, 0.0, -30.0);
-
- glColor4f(0,.8,.7,0);
- glVertex3f(-0.9, -0.9, -40.0);
- glColor4f(0,.8,.7,0);
- glVertex3f(-0.9, 0.9, -40.0);
- glColor4f(0,.8,.3,0);
- glVertex3f( 0.9, 0.0, -40.0);
- glEnd();
-
- glFlush();
-}
-
-
-int main(int argc, char **argv)
-{
- glutInit(&argc, argv);
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 300, 300);
-
- glutInitDisplayMode(GLUT_DEPTH | GLUT_RGB | GLUT_SINGLE);
-
- if (glutCreateWindow("Depth Test") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-dp3.c b/progs/fp/tri-dp3.c
deleted file mode 100644
index 0e18de2dc4..0000000000
--- a/progs/fp/tri-dp3.c
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "TEMP R0;\n"
- "DP3 result.color, fragment.color, fragment.color; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-dp4.c b/progs/fp/tri-dp4.c
deleted file mode 100644
index 400bbf4da2..0000000000
--- a/progs/fp/tri-dp4.c
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "TEMP R0;\n"
- "DP4 result.color, fragment.color.xxxx, fragment.color; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-dph.c b/progs/fp/tri-dph.c
deleted file mode 100644
index 958073c413..0000000000
--- a/progs/fp/tri-dph.c
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "TEMP R0;\n"
- "DPH result.color, fragment.color, fragment.color.xyzx; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-dst.c b/progs/fp/tri-dst.c
deleted file mode 100644
index 3d85e85643..0000000000
--- a/progs/fp/tri-dst.c
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "DST result.color, fragment.color, fragment.color; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-ex2.c b/progs/fp/tri-ex2.c
deleted file mode 100644
index f09b1d7846..0000000000
--- a/progs/fp/tri-ex2.c
+++ /dev/null
@@ -1,110 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "TEMP R0;\n"
- "EX2 R0, fragment.color.x; \n"
- "SUB result.color, R0, {1.0}.x; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-flr.c b/progs/fp/tri-flr.c
deleted file mode 100644
index 059f6b6754..0000000000
--- a/progs/fp/tri-flr.c
+++ /dev/null
@@ -1,110 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "TEMP R0;\n"
- "ADD R0, fragment.color, {0.5}.x; \n"
- "FLR result.color, R0; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-fp.c b/progs/fp/tri-fp.c
deleted file mode 100644
index 4148a8def3..0000000000
--- a/progs/fp/tri-fp.c
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "SLT result.color, {0.5}.x, fragment.color; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-frc.c b/progs/fp/tri-frc.c
deleted file mode 100644
index 8d60c9dc20..0000000000
--- a/progs/fp/tri-frc.c
+++ /dev/null
@@ -1,111 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "TEMP R0; \n"
- "MUL R0, fragment.color, {3.0}.x; \n"
- "FRC result.color, R0; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-inv.c b/progs/fp/tri-inv.c
deleted file mode 100644
index e902332386..0000000000
--- a/progs/fp/tri-inv.c
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "TEMP R0;\n"
- "INV result.color, fragment.color; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-kil.c b/progs/fp/tri-kil.c
deleted file mode 100644
index 47dbd04964..0000000000
--- a/progs/fp/tri-kil.c
+++ /dev/null
@@ -1,111 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "TEMP R0;\n"
- "SUB R0, fragment.color, {0.5,0,0,0}; \n"
- "KIL R0;"
- "MOV result.color, R0;"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-lg2.c b/progs/fp/tri-lg2.c
deleted file mode 100644
index c7eec46974..0000000000
--- a/progs/fp/tri-lg2.c
+++ /dev/null
@@ -1,110 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "TEMP R0;\n"
- "MUL R0, fragment.color, {4.0}.x; \n"
- "LG2 result.color, R0.x; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-lit.c b/progs/fp/tri-lit.c
deleted file mode 100644
index 21e3b6f216..0000000000
--- a/progs/fp/tri-lit.c
+++ /dev/null
@@ -1,111 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "TEMP R0;\n"
- "SUB R0, {0.5}.x, fragment.color; \n"
- "LIT result.color, R0; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-lrp.c b/progs/fp/tri-lrp.c
deleted file mode 100644
index a5659eed60..0000000000
--- a/progs/fp/tri-lrp.c
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "TEMP R0, R1;\n"
- "LRP result.color, fragment.color.z, {1,0,0,1}, {0,1,0,1}; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-mad.c b/progs/fp/tri-mad.c
deleted file mode 100644
index b46d139fb3..0000000000
--- a/progs/fp/tri-mad.c
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "TEMP R0, R1;\n"
- "MAD result.color, fragment.color.z, {1,0,0,1}, fragment.color; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-max.c b/progs/fp/tri-max.c
deleted file mode 100644
index 481a067916..0000000000
--- a/progs/fp/tri-max.c
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "MAX result.color, {0.5}.x, fragment.color; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-min.c b/progs/fp/tri-min.c
deleted file mode 100644
index 7bb722f85f..0000000000
--- a/progs/fp/tri-min.c
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "MIN result.color, {0.5}.x, fragment.color; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-mov.c b/progs/fp/tri-mov.c
deleted file mode 100644
index 40b5b66f5c..0000000000
--- a/progs/fp/tri-mov.c
+++ /dev/null
@@ -1,102 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "MOV result.color, fragment.color; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB | GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-mul.c b/progs/fp/tri-mul.c
deleted file mode 100644
index 61dd3e0458..0000000000
--- a/progs/fp/tri-mul.c
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "MUL result.color, fragment.color, fragment.color; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-param.c b/progs/fp/tri-param.c
deleted file mode 100644
index f3e55af3f1..0000000000
--- a/progs/fp/tri-param.c
+++ /dev/null
@@ -1,114 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "MOV result.color, program.local[32]; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
- glProgramLocalParameter4fARB(GL_FRAGMENT_PROGRAM_ARB, 32, 0.25, .5, 0.25, 1);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.0, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glProgramLocalParameter4fARB(GL_FRAGMENT_PROGRAM_ARB, 32, 0.25, 0, 0.25, 1);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, 0.0, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB | GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-position.c b/progs/fp/tri-position.c
deleted file mode 100644
index 18e8182a68..0000000000
--- a/progs/fp/tri-position.c
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "MUL result.color, fragment.position, {.005}.x; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-pow.c b/progs/fp/tri-pow.c
deleted file mode 100644
index ef91e43e99..0000000000
--- a/progs/fp/tri-pow.c
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "TEMP R0;\n"
- "POW result.color, fragment.color.x, fragment.color.y; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-rcp.c b/progs/fp/tri-rcp.c
deleted file mode 100644
index e2a2704934..0000000000
--- a/progs/fp/tri-rcp.c
+++ /dev/null
@@ -1,110 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "TEMP R0;\n"
- "ADD R0, fragment.color.x, fragment.color.x; \n"
- "RCP result.color, R0.x; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-rsq.c b/progs/fp/tri-rsq.c
deleted file mode 100644
index c5b2c1b32e..0000000000
--- a/progs/fp/tri-rsq.c
+++ /dev/null
@@ -1,110 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "TEMP R0;\n"
- "MUL R0, fragment.color, {3.0}.x; \n"
- "RSQ result.color, R0.x; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-scs.c b/progs/fp/tri-scs.c
deleted file mode 100644
index ce7c0062c3..0000000000
--- a/progs/fp/tri-scs.c
+++ /dev/null
@@ -1,111 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "TEMP R0; \n"
- "MUL R0, fragment.color, {3.14}.x; \n"
- "SCS result.color, R0.x; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-sge.c b/progs/fp/tri-sge.c
deleted file mode 100644
index 6a360ca932..0000000000
--- a/progs/fp/tri-sge.c
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "SGE result.color, {0.5}.x, fragment.color; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-sge2.c b/progs/fp/tri-sge2.c
deleted file mode 100644
index c4330098ed..0000000000
--- a/progs/fp/tri-sge2.c
+++ /dev/null
@@ -1,114 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "TEMP R0;\n"
- "TEMP R1;\n"
- "SGE R0, fragment.color, fragment.color.yzxw; \n"
- "SGE R1, fragment.color, fragment.color.zxyw; \n"
- "MUL R0, R0, R1; \n"
- "MUL result.color, R0, fragment.color; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-sin.c b/progs/fp/tri-sin.c
deleted file mode 100644
index 772903e4b2..0000000000
--- a/progs/fp/tri-sin.c
+++ /dev/null
@@ -1,114 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "TEMP R0; \n"
- "MUL R0, fragment.color, {3.14}.x; \n"
- "MOV result.color, {0.0}.x; \n"
- "SIN result.color.x, R0.x; \n"
- "SIN result.color.y, R0.y; \n"
- "SIN result.color.z, R0.z; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-slt.c b/progs/fp/tri-slt.c
deleted file mode 100644
index 4148a8def3..0000000000
--- a/progs/fp/tri-slt.c
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "SLT result.color, {0.5}.x, fragment.color; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-sub.c b/progs/fp/tri-sub.c
deleted file mode 100644
index 6faa414550..0000000000
--- a/progs/fp/tri-sub.c
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "SUB result.color, fragment.color.yzxw, fragment.color; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-swz.c b/progs/fp/tri-swz.c
deleted file mode 100644
index 5f34f7a322..0000000000
--- a/progs/fp/tri-swz.c
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "SWZ result.color, fragment.color, 1,x,y,z; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-swz2.c b/progs/fp/tri-swz2.c
deleted file mode 100644
index fd76b58f53..0000000000
--- a/progs/fp/tri-swz2.c
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "TEMP R0, R1;\n"
- "SWZ result.color, fragment.color, 1, 0, 0, 1; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-tex.c b/progs/fp/tri-tex.c
deleted file mode 100644
index 87f63894ce..0000000000
--- a/progs/fp/tri-tex.c
+++ /dev/null
@@ -1,130 +0,0 @@
-
-#include <assert.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-#include "readtex.c"
-
-
-#define TEXTURE_FILE "../images/girl.rgb"
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "TEX result.color, fragment.color, texture[0], 2D; \n"
- "END"
- ;
- GLuint modulateProg;
- GLuint Texture;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
- assert(glIsProgramARB(modulateProg));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- /* Load texture */
- glGenTextures(1, &Texture);
- glBindTexture(GL_TEXTURE_2D, Texture);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- if (!LoadRGBMipmaps(TEXTURE_FILE, GL_RGB)) {
- printf("Error: couldn't load texture image file %s\n", TEXTURE_FILE);
- exit(1);
- }
- /* XXX this enable shouldn't really be needed!!! */
- glEnable(GL_TEXTURE_2D);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
-/* glTexCoord2f(1, 0); */
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
-/* glTexCoord2f(1, 1); */
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
-/* glTexCoord2f(0, .5); */
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-xpd.c b/progs/fp/tri-xpd.c
deleted file mode 100644
index 9aca46b2fa..0000000000
--- a/progs/fp/tri-xpd.c
+++ /dev/null
@@ -1,108 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "XPD result.color, fragment.color, {2,2,2,0}; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/glsl/.gitignore b/progs/glsl/.gitignore
deleted file mode 100644
index 1e0aecebef..0000000000
--- a/progs/glsl/.gitignore
+++ /dev/null
@@ -1,17 +0,0 @@
-bitmap
-brick
-bump
-deriv
-extfuncs.h
-mandelbrot
-multitex
-noise
-points
-readtex.c
-readtex.h
-shaderutil.c
-shaderutil.h
-texdemo1
-toyball
-trirast
-twoside
diff --git a/progs/glsl/readtex.c b/progs/glsl/readtex.c
new file mode 100644
index 0000000000..37d5fcd0d3
--- /dev/null
+++ b/progs/glsl/readtex.c
@@ -0,0 +1,454 @@
+/* readtex.c */
+
+/*
+ * Read an SGI .rgb image file and generate a mipmap texture set.
+ * Much of this code was borrowed from SGI's tk OpenGL toolkit.
+ */
+
+
+
+#include <GL/gl.h>
+#include <GL/glu.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "readtex.h"
+
+
+#ifndef SEEK_SET
+# define SEEK_SET 0
+#endif
+
+
+/*
+** RGB Image Structure
+*/
+
+typedef struct _TK_RGBImageRec {
+ GLint sizeX, sizeY;
+ GLint components;
+ unsigned char *data;
+} TK_RGBImageRec;
+
+
+
+/******************************************************************************/
+
+typedef struct _rawImageRec {
+ unsigned short imagic;
+ unsigned short type;
+ unsigned short dim;
+ unsigned short sizeX, sizeY, sizeZ;
+ unsigned long min, max;
+ unsigned long wasteBytes;
+ char name[80];
+ unsigned long colorMap;
+ FILE *file;
+ unsigned char *tmp, *tmpR, *tmpG, *tmpB, *tmpA;
+ unsigned long rleEnd;
+ GLuint *rowStart;
+ GLint *rowSize;
+} rawImageRec;
+
+/******************************************************************************/
+
+static void ConvertShort(unsigned short *array, long length)
+{
+ unsigned long b1, b2;
+ unsigned char *ptr;
+
+ ptr = (unsigned char *)array;
+ while (length--) {
+ b1 = *ptr++;
+ b2 = *ptr++;
+ *array++ = (unsigned short) ((b1 << 8) | (b2));
+ }
+}
+
+static void ConvertLong(GLuint *array, long length)
+{
+ unsigned long b1, b2, b3, b4;
+ unsigned char *ptr;
+
+ ptr = (unsigned char *)array;
+ while (length--) {
+ b1 = *ptr++;
+ b2 = *ptr++;
+ b3 = *ptr++;
+ b4 = *ptr++;
+ *array++ = (b1 << 24) | (b2 << 16) | (b3 << 8) | (b4);
+ }
+}
+
+static rawImageRec *RawImageOpen(const char *fileName)
+{
+ union {
+ int testWord;
+ char testByte[4];
+ } endianTest;
+ rawImageRec *raw;
+ GLenum swapFlag;
+ int x;
+
+ endianTest.testWord = 1;
+ if (endianTest.testByte[0] == 1) {
+ swapFlag = GL_TRUE;
+ } else {
+ swapFlag = GL_FALSE;
+ }
+
+ raw = (rawImageRec *)calloc(1, sizeof(rawImageRec));
+ if (raw == NULL) {
+ fprintf(stderr, "Out of memory!\n");
+ return NULL;
+ }
+ if ((raw->file = fopen(fileName, "rb")) == NULL) {
+ perror(fileName);
+ return NULL;
+ }
+
+ fread(raw, 1, 12, raw->file);
+
+ if (swapFlag) {
+ ConvertShort(&raw->imagic, 6);
+ }
+
+ raw->tmp = (unsigned char *)malloc(raw->sizeX*256);
+ raw->tmpR = (unsigned char *)malloc(raw->sizeX*256);
+ raw->tmpG = (unsigned char *)malloc(raw->sizeX*256);
+ raw->tmpB = (unsigned char *)malloc(raw->sizeX*256);
+ if (raw->sizeZ==4) {
+ raw->tmpA = (unsigned char *)malloc(raw->sizeX*256);
+ }
+ if (raw->tmp == NULL || raw->tmpR == NULL || raw->tmpG == NULL ||
+ raw->tmpB == NULL) {
+ fprintf(stderr, "Out of memory!\n");
+ return NULL;
+ }
+
+ if ((raw->type & 0xFF00) == 0x0100) {
+ x = raw->sizeY * raw->sizeZ * sizeof(GLuint);
+ raw->rowStart = (GLuint *)malloc(x);
+ raw->rowSize = (GLint *)malloc(x);
+ if (raw->rowStart == NULL || raw->rowSize == NULL) {
+ fprintf(stderr, "Out of memory!\n");
+ return NULL;
+ }
+ raw->rleEnd = 512 + (2 * x);
+ fseek(raw->file, 512, SEEK_SET);
+ fread(raw->rowStart, 1, x, raw->file);
+ fread(raw->rowSize, 1, x, raw->file);
+ if (swapFlag) {
+ ConvertLong(raw->rowStart, (long) (x/sizeof(GLuint)));
+ ConvertLong((GLuint *)raw->rowSize, (long) (x/sizeof(GLint)));
+ }
+ }
+ return raw;
+}
+
+static void RawImageClose(rawImageRec *raw)
+{
+ fclose(raw->file);
+ free(raw->tmp);
+ free(raw->tmpR);
+ free(raw->tmpG);
+ free(raw->tmpB);
+ if (raw->rowStart)
+ free(raw->rowStart);
+ if (raw->rowSize)
+ free(raw->rowSize);
+ if (raw->sizeZ>3) {
+ free(raw->tmpA);
+ }
+ free(raw);
+}
+
+static void RawImageGetRow(rawImageRec *raw, unsigned char *buf, int y, int z)
+{
+ unsigned char *iPtr, *oPtr, pixel;
+ int count, done = 0;
+
+ if ((raw->type & 0xFF00) == 0x0100) {
+ fseek(raw->file, (long) raw->rowStart[y+z*raw->sizeY], SEEK_SET);
+ fread(raw->tmp, 1, (unsigned int)raw->rowSize[y+z*raw->sizeY],
+ raw->file);
+
+ iPtr = raw->tmp;
+ oPtr = buf;
+ while (!done) {
+ pixel = *iPtr++;
+ count = (int)(pixel & 0x7F);
+ if (!count) {
+ done = 1;
+ return;
+ }
+ if (pixel & 0x80) {
+ while (count--) {
+ *oPtr++ = *iPtr++;
+ }
+ } else {
+ pixel = *iPtr++;
+ while (count--) {
+ *oPtr++ = pixel;
+ }
+ }
+ }
+ } else {
+ fseek(raw->file, 512+(y*raw->sizeX)+(z*raw->sizeX*raw->sizeY),
+ SEEK_SET);
+ fread(buf, 1, raw->sizeX, raw->file);
+ }
+}
+
+
+static void RawImageGetData(rawImageRec *raw, TK_RGBImageRec *final)
+{
+ unsigned char *ptr;
+ int i, j;
+
+ final->data = (unsigned char *)malloc((raw->sizeX+1)*(raw->sizeY+1)*4);
+ if (final->data == NULL) {
+ fprintf(stderr, "Out of memory!\n");
+ }
+
+ ptr = final->data;
+ for (i = 0; i < (int)(raw->sizeY); i++) {
+ RawImageGetRow(raw, raw->tmpR, i, 0);
+ RawImageGetRow(raw, raw->tmpG, i, 1);
+ RawImageGetRow(raw, raw->tmpB, i, 2);
+ if (raw->sizeZ>3) {
+ RawImageGetRow(raw, raw->tmpA, i, 3);
+ }
+ for (j = 0; j < (int)(raw->sizeX); j++) {
+ *ptr++ = *(raw->tmpR + j);
+ *ptr++ = *(raw->tmpG + j);
+ *ptr++ = *(raw->tmpB + j);
+ if (raw->sizeZ>3) {
+ *ptr++ = *(raw->tmpA + j);
+ }
+ }
+ }
+}
+
+
+static TK_RGBImageRec *tkRGBImageLoad(const char *fileName)
+{
+ rawImageRec *raw;
+ TK_RGBImageRec *final;
+
+ raw = RawImageOpen(fileName);
+ if (!raw) {
+ fprintf(stderr, "File not found\n");
+ return NULL;
+ }
+ final = (TK_RGBImageRec *)malloc(sizeof(TK_RGBImageRec));
+ if (final == NULL) {
+ fprintf(stderr, "Out of memory!\n");
+ return NULL;
+ }
+ final->sizeX = raw->sizeX;
+ final->sizeY = raw->sizeY;
+ final->components = raw->sizeZ;
+ RawImageGetData(raw, final);
+ RawImageClose(raw);
+ return final;
+}
+
+
+static void FreeImage( TK_RGBImageRec *image )
+{
+ free(image->data);
+ free(image);
+}
+
+
+/*
+ * Load an SGI .rgb file and generate a set of 2-D mipmaps from it.
+ * Input: imageFile - name of .rgb to read
+ * intFormat - internal texture format to use, or number of components
+ * Return: GL_TRUE if success, GL_FALSE if error.
+ */
+GLboolean LoadRGBMipmaps( const char *imageFile, GLint intFormat )
+{
+ GLint w, h;
+ return LoadRGBMipmaps2( imageFile, GL_TEXTURE_2D, intFormat, &w, &h );
+}
+
+
+
+GLboolean LoadRGBMipmaps2( const char *imageFile, GLenum target,
+ GLint intFormat, GLint *width, GLint *height )
+{
+ GLint error;
+ GLenum format;
+ TK_RGBImageRec *image;
+
+ image = tkRGBImageLoad( imageFile );
+ if (!image) {
+ return GL_FALSE;
+ }
+
+ if (image->components==3) {
+ format = GL_RGB;
+ }
+ else if (image->components==4) {
+ format = GL_RGBA;
+ }
+ else {
+ /* not implemented */
+ fprintf(stderr,
+ "Error in LoadRGBMipmaps %d-component images not implemented\n",
+ image->components );
+ return GL_FALSE;
+ }
+
+ error = gluBuild2DMipmaps( target,
+ intFormat,
+ image->sizeX, image->sizeY,
+ format,
+ GL_UNSIGNED_BYTE,
+ image->data );
+
+ *width = image->sizeX;
+ *height = image->sizeY;
+
+ FreeImage(image);
+
+ return error ? GL_FALSE : GL_TRUE;
+}
+
+
+
+/*
+ * Load an SGI .rgb file and return a pointer to the image data.
+ * Input: imageFile - name of .rgb to read
+ * Output: width - width of image
+ * height - height of image
+ * format - format of image (GL_RGB or GL_RGBA)
+ * Return: pointer to image data or NULL if error
+ */
+GLubyte *LoadRGBImage( const char *imageFile, GLint *width, GLint *height,
+ GLenum *format )
+{
+ TK_RGBImageRec *image;
+ GLint bytes;
+ GLubyte *buffer;
+
+ image = tkRGBImageLoad( imageFile );
+ if (!image) {
+ return NULL;
+ }
+
+ if (image->components==3) {
+ *format = GL_RGB;
+ }
+ else if (image->components==4) {
+ *format = GL_RGBA;
+ }
+ else {
+ /* not implemented */
+ fprintf(stderr,
+ "Error in LoadRGBImage %d-component images not implemented\n",
+ image->components );
+ return NULL;
+ }
+
+ *width = image->sizeX;
+ *height = image->sizeY;
+
+ bytes = image->sizeX * image->sizeY * image->components;
+ buffer = (GLubyte *) malloc(bytes);
+ if (!buffer)
+ return NULL;
+
+ memcpy( (void *) buffer, (void *) image->data, bytes );
+
+ FreeImage(image);
+
+ return buffer;
+}
+
+#define CLAMP( X, MIN, MAX ) ( (X)<(MIN) ? (MIN) : ((X)>(MAX) ? (MAX) : (X)) )
+
+
+static void ConvertRGBtoYUV(GLint w, GLint h, GLint texel_bytes,
+ const GLubyte *src,
+ GLushort *dest)
+{
+ GLint i, j;
+
+ for (i = 0; i < h; i++) {
+ for (j = 0; j < w; j++) {
+ const GLfloat r = (src[0]) / 255.0;
+ const GLfloat g = (src[1]) / 255.0;
+ const GLfloat b = (src[2]) / 255.0;
+ GLfloat y, cr, cb;
+ GLint iy, icr, icb;
+
+ y = r * 65.481 + g * 128.553 + b * 24.966 + 16;
+ cb = r * -37.797 + g * -74.203 + b * 112.0 + 128;
+ cr = r * 112.0 + g * -93.786 + b * -18.214 + 128;
+ /*printf("%f %f %f -> %f %f %f\n", r, g, b, y, cb, cr);*/
+ iy = (GLint) CLAMP(y, 0, 254);
+ icb = (GLint) CLAMP(cb, 0, 254);
+ icr = (GLint) CLAMP(cr, 0, 254);
+
+ if (j & 1) {
+ /* odd */
+ *dest = (iy << 8) | icr;
+ }
+ else {
+ /* even */
+ *dest = (iy << 8) | icb;
+ }
+ dest++;
+ src += texel_bytes;
+ }
+ }
+}
+
+
+/*
+ * Load an SGI .rgb file and return a pointer to the image data, converted
+ * to 422 yuv.
+ *
+ * Input: imageFile - name of .rgb to read
+ * Output: width - width of image
+ * height - height of image
+ * Return: pointer to image data or NULL if error
+ */
+GLushort *LoadYUVImage( const char *imageFile, GLint *width, GLint *height )
+{
+ TK_RGBImageRec *image;
+ GLushort *buffer;
+
+ image = tkRGBImageLoad( imageFile );
+ if (!image) {
+ return NULL;
+ }
+
+ if (image->components != 3 && image->components !=4 ) {
+ /* not implemented */
+ fprintf(stderr,
+ "Error in LoadYUVImage %d-component images not implemented\n",
+ image->components );
+ return NULL;
+ }
+
+ *width = image->sizeX;
+ *height = image->sizeY;
+
+ buffer = (GLushort *) malloc( image->sizeX * image->sizeY * 2 );
+
+ if (buffer)
+ ConvertRGBtoYUV( image->sizeX,
+ image->sizeY,
+ image->components,
+ image->data,
+ buffer );
+
+
+ FreeImage(image);
+ return buffer;
+}
+
diff --git a/progs/glsl/readtex.h b/progs/glsl/readtex.h
new file mode 100644
index 0000000000..6c9a3828d3
--- /dev/null
+++ b/progs/glsl/readtex.h
@@ -0,0 +1,26 @@
+/* readtex.h */
+
+#ifndef READTEX_H
+#define READTEX_H
+
+
+#include <GL/gl.h>
+
+
+extern GLboolean
+LoadRGBMipmaps( const char *imageFile, GLint intFormat );
+
+
+extern GLboolean
+LoadRGBMipmaps2( const char *imageFile, GLenum target,
+ GLint intFormat, GLint *width, GLint *height );
+
+
+extern GLubyte *
+LoadRGBImage( const char *imageFile,
+ GLint *width, GLint *height, GLenum *format );
+
+extern GLushort *
+LoadYUVImage( const char *imageFile, GLint *width, GLint *height );
+
+#endif
diff --git a/progs/glsl/shaderutil.c b/progs/glsl/shaderutil.c
new file mode 100644
index 0000000000..4f17dd7efa
--- /dev/null
+++ b/progs/glsl/shaderutil.c
@@ -0,0 +1,162 @@
+/**
+ * Utilities for OpenGL shading language
+ *
+ * Brian Paul
+ * 9 April 2008
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <GL/glut.h>
+#include "extfuncs.h"
+#include "shaderutil.h"
+
+
+static void
+Init(void)
+{
+ static GLboolean firstCall = GL_TRUE;
+ if (firstCall) {
+ GetExtensionFuncs();
+ firstCall = GL_FALSE;
+ }
+}
+
+
+GLboolean
+ShadersSupported(void)
+{
+ const char *version = (const char *) glGetString(GL_VERSION);
+ if (version[0] == '2' && version[1] == '.') {
+ return GL_TRUE;
+ }
+ else if (glutExtensionSupported("GL_ARB_vertex_shader")
+ && glutExtensionSupported("GL_ARB_fragment_shader")
+ && glutExtensionSupported("GL_ARB_shader_objects")) {
+ fprintf(stderr, "Warning: Trying ARB GLSL instead of OpenGL 2.x. This may not work.\n");
+ return GL_TRUE;
+ }
+ return GL_TRUE;
+}
+
+
+GLuint
+CompileShaderText(GLenum shaderType, const char *text)
+{
+ GLuint shader;
+ GLint stat;
+
+ Init();
+
+ shader = glCreateShader_func(shaderType);
+ glShaderSource_func(shader, 1, (const GLchar **) &text, NULL);
+ glCompileShader_func(shader);
+ glGetShaderiv_func(shader, GL_COMPILE_STATUS, &stat);
+ if (!stat) {
+ GLchar log[1000];
+ GLsizei len;
+ glGetShaderInfoLog_func(shader, 1000, &len, log);
+ fprintf(stderr, "Error: problem compiling shader: %s\n", log);
+ exit(1);
+ }
+ else {
+ /*printf("Shader compiled OK\n");*/
+ }
+ return shader;
+}
+
+
+/**
+ * Read a shader from a file.
+ */
+GLuint
+CompileShaderFile(GLenum shaderType, const char *filename)
+{
+ const int max = 100*1000;
+ int n;
+ char *buffer = (char*) malloc(max);
+ GLuint shader;
+
+ FILE *f = fopen(filename, "r");
+ if (!f) {
+ return 0;
+ }
+
+ n = fread(buffer, 1, max, f);
+ /*printf("read %d bytes from shader file %s\n", n, filename);*/
+ if (n > 0) {
+ buffer[n] = 0;
+ shader = CompileShaderText(shaderType, buffer);
+ }
+ else {
+ return 0;
+ }
+
+ fclose(f);
+ free(buffer);
+
+ return shader;
+}
+
+
+GLuint
+LinkShaders(GLuint vertShader, GLuint fragShader)
+{
+ GLuint program = glCreateProgram_func();
+
+ glAttachShader_func(program, fragShader);
+ glAttachShader_func(program, vertShader);
+ glLinkProgram_func(program);
+
+ /* check link */
+ {
+ GLint stat;
+ glGetProgramiv_func(program, GL_LINK_STATUS, &stat);
+ if (!stat) {
+ GLchar log[1000];
+ GLsizei len;
+ glGetProgramInfoLog_func(program, 1000, &len, log);
+ fprintf(stderr, "Shader link error:\n%s\n", log);
+ return 0;
+ }
+ }
+
+ return program;
+}
+
+
+void
+InitUniforms(GLuint program, struct uniform_info uniforms[])
+{
+ GLuint i;
+
+ for (i = 0; uniforms[i].name; i++) {
+ uniforms[i].location
+ = glGetUniformLocation_func(program, uniforms[i].name);
+
+ printf("Uniform %s location: %d\n", uniforms[i].name,
+ uniforms[i].location);
+
+ switch (uniforms[i].size) {
+ case 1:
+ if (uniforms[i].type == GL_INT)
+ glUniform1i_func(uniforms[i].location,
+ (GLint) uniforms[i].value[0]);
+ else
+ glUniform1fv_func(uniforms[i].location, 1, uniforms[i].value);
+ break;
+ case 2:
+ glUniform2fv_func(uniforms[i].location, 1, uniforms[i].value);
+ break;
+ case 3:
+ glUniform3fv_func(uniforms[i].location, 1, uniforms[i].value);
+ break;
+ case 4:
+ glUniform4fv_func(uniforms[i].location, 1, uniforms[i].value);
+ break;
+ default:
+ abort();
+ }
+ }
+}
diff --git a/progs/miniglx/.gitignore b/progs/miniglx/.gitignore
deleted file mode 100644
index f630f591f6..0000000000
--- a/progs/miniglx/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-manytex
-miniglxsample
-miniglxtest
-sample_server
-sample_server2
-texline
diff --git a/progs/miniglx/Makefile b/progs/miniglx/Makefile
deleted file mode 100644
index d5258b0a96..0000000000
--- a/progs/miniglx/Makefile
+++ /dev/null
@@ -1,60 +0,0 @@
-# Makefile for miniglx demo programs
-
-TOP = ../..
-
-include $(TOP)/configs/current
-
-
-SOURCES = miniglxtest.c \
- miniglxsample.c \
- sample_server.c \
- sample_server2.c \
- manytex.c \
- texline.c
-
-OBJECTS = $(SOURCES:.c=.o)
-
-PROGS = $(SOURCES:%.c=%)
-
-INCLUDES = \
- -I. \
- -I$(TOP)/include
-
-LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
-
-
-##### RULES #####
-
-.SUFFIXES:
-.SUFFIXES: .c
-
-.c:
- $(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
-
-.c.o:
- $(CC) -c $(INCLUDES) $(CFLAGS) $< -o $@
-
-.S.o:
- $(CC) -c $(INCLUDES) $(CFLAGS) $< -o $@
-
-
-##### TARGETS #####
-
-default: depend $(PROGS)
-
-clean:
- -rm -f $(PROGS)
- -rm -f *.o
-
-
-depend: $(SOURCES)
- touch depend
- $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) > /dev/null
-
-
-# Emacs tags
-tags:
- etags `find . -name \*.[ch]` `find ../include`
-
-
-include depend
diff --git a/progs/miniglx/glfbdevtest.c b/progs/miniglx/glfbdevtest.c
deleted file mode 100644
index c82ca6e5f6..0000000000
--- a/progs/miniglx/glfbdevtest.c
+++ /dev/null
@@ -1,478 +0,0 @@
-/* $Id: glfbdevtest.c,v 1.1 2003/08/06 17:47:15 keithw Exp $ */
-
-/*
- * Test the GLFBDev interface. Only tested with radeonfb driver!!!!
- */
-
-
-#include <assert.h>
-#include <errno.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/ioctl.h>
-#include <sys/mman.h>
-#include <sys/types.h>
-#include <linux/fb.h>
-#include <linux/kd.h>
-#include <linux/vt.h>
-#include <GL/glut.h>
-#include "GL/glfbdev.h"
-
-#define DEFAULT_DEPTH 8
-
-static struct fb_fix_screeninfo FixedInfo;
-static struct fb_var_screeninfo VarInfo, OrigVarInfo;
-static int DesiredDepth = 0;
-static int OriginalVT = -1;
-static int ConsoleFD = -1;
-static int FrameBufferFD = -1;
-static caddr_t FrameBuffer = (caddr_t) -1;
-static caddr_t MMIOAddress = (caddr_t) -1;
-
-
-static void
-print_fixed_info(const struct fb_fix_screeninfo *fixed, const char *s)
-{
- static const char *visuals[] = {
- "MONO01", "MONO10", "TRUECOLOR", "PSEUDOCOLOR",
- "DIRECTCOLOR", "STATIC_PSEUDOCOLOR"
- };
-
- printf("%s info -----------------------\n", s);
- printf("id = %16s\n", fixed->id);
- printf("smem_start = 0x%x\n", fixed->smem_start);
- printf("smem_len = %d (0x%x)\n", fixed->smem_len, fixed->smem_len);
- printf("type = 0x%x\n", fixed->type);
- printf("type_aux = 0x%x\n", fixed->type_aux);
- printf("visual = 0x%x (%s)\n", fixed->visual, visuals[fixed->visual]);
- printf("xpanstep = %d\n", fixed->xpanstep);
- printf("ypanstep = %d\n", fixed->ypanstep);
- printf("ywrapstep = %d\n", fixed->ywrapstep);
- printf("line_length = %d\n", fixed->line_length);
- printf("mmio_start = 0x%x\n", fixed->mmio_start);
- printf("mmio_len = %d (0x%x)\n", fixed->mmio_len, fixed->mmio_len);
- printf("accel = 0x%x\n", fixed->accel);
-}
-
-
-static void
-print_var_info(const struct fb_var_screeninfo *var, const char *s)
-{
- printf("%s info -----------------------\n", s);
- printf("xres = %d\n", var->xres);
- printf("yres = %d\n", var->yres);
- printf("xres_virtual = %d\n", var->xres_virtual);
- printf("yres_virtual = %d\n", var->yres_virtual);
- printf("xoffset = %d\n", var->xoffset);
- printf("yoffset = %d\n", var->yoffset);
- printf("bits_per_pixel = %d\n", var->bits_per_pixel);
- printf("grayscale = %d\n", var->grayscale);
-
- printf("red.offset = %d length = %d msb_right = %d\n",
- var->red.offset, var->red.length, var->red.msb_right);
- printf("green.offset = %d length = %d msb_right = %d\n",
- var->green.offset, var->green.length, var->green.msb_right);
- printf("blue.offset = %d length = %d msb_right = %d\n",
- var->blue.offset, var->blue.length, var->blue.msb_right);
- printf("transp.offset = %d length = %d msb_right = %d\n",
- var->transp.offset, var->transp.length, var->transp.msb_right);
-
- printf("nonstd = %d\n", var->nonstd);
- printf("activate = %d\n", var->activate);
- printf("height = %d mm\n", var->height);
- printf("width = %d mm\n", var->width);
- printf("accel_flags = 0x%x\n", var->accel_flags);
- printf("pixclock = %d\n", var->pixclock);
- printf("left_margin = %d\n", var->left_margin);
- printf("right_margin = %d\n", var->right_margin);
- printf("upper_margin = %d\n", var->upper_margin);
- printf("lower_margin = %d\n", var->lower_margin);
- printf("hsync_len = %d\n", var->hsync_len);
- printf("vsync_len = %d\n", var->vsync_len);
- printf("sync = %d\n", var->sync);
- printf("vmode = %d\n", var->vmode);
-}
-
-
-static void
-signal_handler(int signumber)
-{
- signal(signumber, SIG_IGN); /* prevent recursion! */
- fprintf(stderr, "error: got signal %d (exiting)\n", signumber);
- exit(1);
-}
-
-
-static void
-initialize_fbdev( void )
-{
- char ttystr[1000];
- int fd, vtnumber, ttyfd;
- int sz;
-
- if (geteuid()) {
- fprintf(stderr, "error: you need to be root\n");
- exit(1);
- }
-
-#if 1
- /* open the framebuffer device */
- FrameBufferFD = open("/dev/fb0", O_RDWR);
- if (FrameBufferFD < 0) {
- fprintf(stderr, "Error opening /dev/fb0: %s\n", strerror(errno));
- exit(1);
- }
-#endif
-
- /* open /dev/tty0 and get the vt number */
- if ((fd = open("/dev/tty0", O_WRONLY, 0)) < 0) {
- fprintf(stderr, "error opening /dev/tty0\n");
- exit(1);
- }
- if (ioctl(fd, VT_OPENQRY, &vtnumber) < 0 || vtnumber < 0) {
- fprintf(stderr, "error: couldn't get a free vt\n");
- exit(1);
- }
- close(fd);
-
- /* open the console tty */
- sprintf(ttystr, "/dev/tty%d", vtnumber); /* /dev/tty1-64 */
- ConsoleFD = open(ttystr, O_RDWR | O_NDELAY, 0);
- if (ConsoleFD < 0) {
- fprintf(stderr, "error couldn't open console fd\n");
- exit(1);
- }
-
- /* save current vt number */
- {
- struct vt_stat vts;
- if (ioctl(ConsoleFD, VT_GETSTATE, &vts) == 0)
- OriginalVT = vts.v_active;
- }
-
- /* disconnect from controlling tty */
- ttyfd = open("/dev/tty", O_RDWR);
- if (ttyfd >= 0) {
- ioctl(ttyfd, TIOCNOTTY, 0);
- close(ttyfd);
- }
-
- /* some magic to restore the vt when we exit */
- {
- struct vt_mode vt;
- if (ioctl(ConsoleFD, VT_ACTIVATE, vtnumber) != 0)
- printf("ioctl VT_ACTIVATE: %s\n", strerror(errno));
- if (ioctl(ConsoleFD, VT_WAITACTIVE, vtnumber) != 0)
- printf("ioctl VT_WAITACTIVE: %s\n", strerror(errno));
-
- if (ioctl(ConsoleFD, VT_GETMODE, &vt) < 0) {
- fprintf(stderr, "error: ioctl VT_GETMODE: %s\n", strerror(errno));
- exit(1);
- }
-
- vt.mode = VT_PROCESS;
- vt.relsig = SIGUSR1;
- vt.acqsig = SIGUSR1;
- if (ioctl(ConsoleFD, VT_SETMODE, &vt) < 0) {
- fprintf(stderr, "error: ioctl(VT_SETMODE) failed: %s\n",
- strerror(errno));
- exit(1);
- }
- }
-
- /* go into graphics mode */
- if (ioctl(ConsoleFD, KDSETMODE, KD_GRAPHICS) < 0) {
- fprintf(stderr, "error: ioctl(KDSETMODE, KD_GRAPHICS) failed: %s\n",
- strerror(errno));
- exit(1);
- }
-
-
-#if 0
- /* open the framebuffer device */
- FrameBufferFD = open("/dev/fb0", O_RDWR);
- if (FrameBufferFD < 0) {
- fprintf(stderr, "Error opening /dev/fb0: %s\n", strerror(errno));
- exit(1);
- }
-#endif
-
- /* Get the fixed screen info */
- if (ioctl(FrameBufferFD, FBIOGET_FSCREENINFO, &FixedInfo)) {
- fprintf(stderr, "error: ioctl(FBIOGET_FSCREENINFO) failed: %s\n",
- strerror(errno));
- exit(1);
- }
-
- print_fixed_info(&FixedInfo, "Fixed");
-
-
- /* get the variable screen info */
- if (ioctl(FrameBufferFD, FBIOGET_VSCREENINFO, &OrigVarInfo)) {
- fprintf(stderr, "error: ioctl(FBIOGET_VSCREENINFO) failed: %s\n",
- strerror(errno));
- exit(1);
- }
-
- print_var_info(&OrigVarInfo, "Orig Var");
-
- /* operate on a copy */
- VarInfo = OrigVarInfo;
-
- /* set the depth, resolution, etc */
- DesiredDepth = 32;
- if (DesiredDepth)
- VarInfo.bits_per_pixel = DesiredDepth;
-
- if (VarInfo.bits_per_pixel == 16) {
- VarInfo.red.offset = 11;
- VarInfo.green.offset = 5;
- VarInfo.blue.offset = 0;
- VarInfo.red.length = 5;
- VarInfo.green.length = 6;
- VarInfo.blue.length = 5;
- VarInfo.transp.offset = 0;
- VarInfo.transp.length = 0;
- }
- else if (VarInfo.bits_per_pixel == 32) {
- VarInfo.red.offset = 16;
- VarInfo.green.offset = 8;
- VarInfo.blue.offset = 0;
- VarInfo.transp.offset = 24;
- VarInfo.red.length = 8;
- VarInfo.green.length = 8;
- VarInfo.blue.length = 8;
- VarInfo.transp.length = 8;
- }
- /* timing values taken from /etc/fb.modes (1280x1024 @ 75Hz) */
- VarInfo.xres_virtual = VarInfo.xres = 1280;
- VarInfo.yres_virtual = VarInfo.yres = 1024;
- VarInfo.pixclock = 7408;
- VarInfo.left_margin = 248;
- VarInfo.right_margin = 16;
- VarInfo.upper_margin = 38;
- VarInfo.lower_margin = 1;
- VarInfo.hsync_len = 144;
- VarInfo.vsync_len = 3;
-
- VarInfo.xoffset = 0;
- VarInfo.yoffset = 0;
- VarInfo.nonstd = 0;
- VarInfo.vmode &= ~FB_VMODE_YWRAP; /* turn off scrolling */
-
- /* set new variable screen info */
- if (ioctl(FrameBufferFD, FBIOPUT_VSCREENINFO, &VarInfo)) {
- fprintf(stderr, "ioctl(FBIOPUT_VSCREENINFO failed): %s\n",
- strerror(errno));
- exit(1);
- }
-
- print_var_info(&VarInfo, "New Var");
-
- if (FixedInfo.visual != FB_VISUAL_TRUECOLOR &&
- FixedInfo.visual != FB_VISUAL_DIRECTCOLOR) {
- fprintf(stderr, "non-TRUE/DIRECT-COLOR visuals (0x%x) not supported by this demo.\n", FixedInfo.visual);
- exit(1);
- }
-
- /* initialize colormap */
- if (FixedInfo.visual == FB_VISUAL_DIRECTCOLOR) {
- struct fb_cmap cmap;
- unsigned short red[256], green[256], blue[256];
- int i;
-
- /* we're assuming 256 entries here */
- printf("initializing directcolor colormap\n");
- cmap.start = 0;
- cmap.len = 256;
- cmap.red = red;
- cmap.green = green;
- cmap.blue = blue;
- cmap.transp = NULL;
- for (i = 0; i < cmap.len; i++) {
- red[i] = green[i] = blue[i] = (i << 8) | i;
- }
- if (ioctl(FrameBufferFD, FBIOPUTCMAP, (void *) &cmap) < 0) {
- fprintf(stderr, "ioctl(FBIOPUTCMAP) failed [%d]\n", i);
- }
- }
-
- /*
- * fbdev says the frame buffer is at offset zero, and the mmio region
- * is immediately after.
- */
-
- /* mmap the framebuffer into our address space */
- FrameBuffer = (caddr_t) mmap(0, /* start */
- FixedInfo.smem_len, /* bytes */
- PROT_READ | PROT_WRITE, /* prot */
- MAP_SHARED, /* flags */
- FrameBufferFD, /* fd */
- 0 /* offset */);
- if (FrameBuffer == (caddr_t) - 1) {
- fprintf(stderr, "error: unable to mmap framebuffer: %s\n",
- strerror(errno));
- exit(1);
- }
- printf("FrameBuffer = %p\n", FrameBuffer);
-
-#if 1
- /* mmap the MMIO region into our address space */
- MMIOAddress = (caddr_t) mmap(0, /* start */
- FixedInfo.mmio_len, /* bytes */
- PROT_READ | PROT_WRITE, /* prot */
- MAP_SHARED, /* flags */
- FrameBufferFD, /* fd */
- FixedInfo.smem_len /* offset */);
- if (MMIOAddress == (caddr_t) - 1) {
- fprintf(stderr, "error: unable to mmap mmio region: %s\n",
- strerror(errno));
- }
- printf("MMIOAddress = %p\n", MMIOAddress);
-
- /* try out some simple MMIO register reads */
- if (1)
- {
- typedef unsigned int CARD32;
- typedef unsigned char CARD8;
-#define RADEON_CONFIG_MEMSIZE 0x00f8
-#define RADEON_MEM_SDRAM_MODE_REG 0x0158
-#define MMIO_IN32(base, offset) \
- *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset))
-#define INREG(addr) MMIO_IN32(MMIOAddress, addr)
- int sz, type;
- const char *typeStr[] = {"SDR", "DDR", "64-bit SDR"};
- sz = INREG(RADEON_CONFIG_MEMSIZE);
- type = INREG(RADEON_MEM_SDRAM_MODE_REG);
- printf("RADEON_CONFIG_MEMSIZE = %d (%d MB)\n", sz, sz / 1024 / 1024);
- printf("RADEON_MEM_SDRAM_MODE_REG >> 30 = %d (%s)\n",
- type >> 30, typeStr[type>>30]);
- }
-#endif
-
-}
-
-
-static void
-shutdown_fbdev( void )
-{
- struct vt_mode VT;
-
- printf("cleaning up...\n");
- /* restore original variable screen info */
- if (ioctl(FrameBufferFD, FBIOPUT_VSCREENINFO, &OrigVarInfo)) {
- fprintf(stderr, "ioctl(FBIOPUT_VSCREENINFO failed): %s\n",
- strerror(errno));
- exit(1);
- }
-
- munmap(MMIOAddress, FixedInfo.mmio_len);
- munmap(FrameBuffer, FixedInfo.smem_len);
- close(FrameBufferFD);
-
- /* restore text mode */
- ioctl(ConsoleFD, KDSETMODE, KD_TEXT);
-
- /* set vt */
- if (ioctl(ConsoleFD, VT_GETMODE, &VT) != -1) {
- VT.mode = VT_AUTO;
- ioctl(ConsoleFD, VT_SETMODE, &VT);
- }
-
- /* restore original vt */
- if (OriginalVT >= 0) {
- ioctl(ConsoleFD, VT_ACTIVATE, OriginalVT);
- OriginalVT = -1;
- }
-
- close(ConsoleFD);
-}
-
-
-static void
-gltest( void )
-{
- static const int attribs[] = {
- GLFBDEV_DOUBLE_BUFFER,
- GLFBDEV_DEPTH_SIZE, 16,
- GLFBDEV_NONE
- };
- GLFBDevContextPtr ctx;
- GLFBDevBufferPtr buf;
- GLFBDevVisualPtr vis;
- int bytes, r, g, b, a;
- float ang;
-
- printf("GLFBDEV_VENDOR = %s\n", glFBDevGetString(GLFBDEV_VENDOR));
- printf("GLFBDEV_VERSION = %s\n", glFBDevGetString(GLFBDEV_VERSION));
-
- /* framebuffer size */
- bytes = VarInfo.xres_virtual * VarInfo.yres_virtual * VarInfo.bits_per_pixel / 8;
-
- vis = glFBDevCreateVisual( &FixedInfo, &VarInfo, attribs );
- assert(vis);
-
- buf = glFBDevCreateBuffer( &FixedInfo, &VarInfo, vis, FrameBuffer, NULL, bytes );
- assert(buf);
-
- ctx = glFBDevCreateContext( vis, NULL );
- assert(buf);
-
- b = glFBDevMakeCurrent( ctx, buf, buf );
- assert(b);
-
- /*printf("GL_EXTENSIONS: %s\n", glGetString(GL_EXTENSIONS));*/
- glGetIntegerv(GL_RED_BITS, &r);
- glGetIntegerv(GL_GREEN_BITS, &g);
- glGetIntegerv(GL_BLUE_BITS, &b);
- glGetIntegerv(GL_ALPHA_BITS, &a);
- printf("RED_BITS=%d GREEN_BITS=%d BLUE_BITS=%d ALPHA_BITS=%d\n",
- r, g, b, a);
-
- glClearColor(0.5, 0.5, 1.0, 0);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glFrustum(-1, 1, -1, 1, 2, 30);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- glTranslatef(0, 0, -15);
- glViewport(0, 0, VarInfo.xres_virtual, VarInfo.yres_virtual);
- glEnable(GL_LIGHTING);
- glEnable(GL_LIGHT0);
- glEnable(GL_DEPTH_TEST);
-
- for (ang = 0; ang <= 180; ang += 15) {
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- glPushMatrix();
- glRotatef(ang, 1, 0, 0);
- glutSolidTorus(1, 3, 40, 20);
- glPopMatrix();
- glFBDevSwapBuffers(buf);
- }
-
- /* clean up */
- b = glFBDevMakeCurrent( NULL, NULL, NULL);
- assert(b);
-
- glFBDevDestroyContext(ctx);
- glFBDevDestroyBuffer(buf);
- glFBDevDestroyVisual(vis);
-}
-
-
-int
-main( int argc, char *argv[] )
-{
- signal(SIGUSR1, signal_handler); /* exit if someone tries a vt switch */
- signal(SIGSEGV, signal_handler); /* catch segfaults */
-
- initialize_fbdev();
- gltest();
- shutdown_fbdev();
-
- return 0;
-}
diff --git a/progs/miniglx/manytex.c b/progs/miniglx/manytex.c
deleted file mode 100644
index 36fa10d222..0000000000
--- a/progs/miniglx/manytex.c
+++ /dev/null
@@ -1,382 +0,0 @@
-/* $Id: manytex.c,v 1.2 2003/08/23 01:28:59 jonsmirl Exp $ */
-
-/*
- * test handling of many texture maps
- * Also tests texture priority and residency.
- *
- * Brian Paul
- * August 2, 2000
- */
-
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <GL/glut.h>
-
-
-static GLint NumTextures = 20;
-static GLuint *TextureID = NULL;
-static GLint *TextureWidth = NULL, *TextureHeight = NULL;
-static GLboolean *TextureResidency = NULL;
-static GLint TexWidth = 128, TexHeight = 128;
-static GLfloat Zrot = 0;
-static GLboolean Anim = GL_TRUE;
-static GLint WinWidth = 500, WinHeight = 400;
-static GLboolean MipMap = GL_FALSE;
-static GLboolean LinearFilter = GL_FALSE;
-static GLboolean RandomSize = GL_FALSE;
-static GLint Rows, Columns;
-static GLint LowPriorityCount = 0;
-
-
-static void Idle( void )
-{
- Zrot += 1.0;
- glutPostRedisplay();
-}
-
-
-static void Display( void )
-{
- GLfloat spacing = WinWidth / Columns;
- GLfloat size = spacing * 0.4;
- GLint i;
-
- /* test residency */
- if (0)
- {
- GLboolean b;
- GLint i, resident;
- b = glAreTexturesResident(NumTextures, TextureID, TextureResidency);
- if (b) {
- printf("all resident\n");
- }
- else {
- resident = 0;
- for (i = 0; i < NumTextures; i++) {
- if (TextureResidency[i]) {
- resident++;
- }
- }
- printf("%d of %d texture resident\n", resident, NumTextures);
- }
- }
-
- /* render the textured quads */
- glClear( GL_COLOR_BUFFER_BIT );
- for (i = 0; i < NumTextures; i++) {
- GLint row = i / Columns;
- GLint col = i % Columns;
- GLfloat x = col * spacing + spacing * 0.5;
- GLfloat y = row * spacing + spacing * 0.5;
-
- GLfloat maxDim = (TextureWidth[i] > TextureHeight[i])
- ? TextureWidth[i] : TextureHeight[i];
- GLfloat w = TextureWidth[i] / maxDim;
- GLfloat h = TextureHeight[i] / maxDim;
-
- glPushMatrix();
- glTranslatef(x, y, 0.0);
- glRotatef(Zrot, 0, 0, 1);
- glScalef(size, size, 1);
-
- glBindTexture(GL_TEXTURE_2D, TextureID[i]);
- glBegin(GL_POLYGON);
-#if 0
- glTexCoord2f(0, 0); glVertex2f(-1, -1);
- glTexCoord2f(1, 0); glVertex2f( 1, -1);
- glTexCoord2f(1, 1); glVertex2f( 1, 1);
- glTexCoord2f(0, 1); glVertex2f(-1, 1);
-#else
- glTexCoord2f(0, 0); glVertex2f(-w, -h);
- glTexCoord2f(1, 0); glVertex2f( w, -h);
- glTexCoord2f(1, 1); glVertex2f( w, h);
- glTexCoord2f(0, 1); glVertex2f(-w, h);
-#endif
- glEnd();
- glPopMatrix();
- }
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- WinWidth = width;
- WinHeight = height;
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glOrtho(0, width, 0, height, -1, 1);
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
-}
-
-
-/*
- * Return a random int in [min, max].
- */
-static int RandomInt(int min, int max)
-{
- int i = rand();
- int j = i % (max - min + 1);
- return min + j;
-}
-
-
-
-static void Init( void )
-{
- GLint i;
-
- if (RandomSize) {
- printf("Creating %d %s random-size textures, ", NumTextures,
- MipMap ? "Mipmapped" : "non-Mipmapped");
- }
- else {
- printf("Creating %d %s %d x %d textures, ", NumTextures,
- MipMap ? "Mipmapped" : "non-Mipmapped",
- TexWidth, TexHeight);
- }
-
- if (LinearFilter) {
- printf("bilinear filtering\n");
- }
- else {
- printf("nearest filtering\n");
- }
-
-
- /* compute number of rows and columns of rects */
- {
- GLfloat area = (GLfloat) (WinWidth * WinHeight) / (GLfloat) NumTextures;
- GLfloat edgeLen = sqrt(area);
-
- Columns = WinWidth / edgeLen;
- Rows = (NumTextures + Columns - 1) / Columns;
- printf("Rows: %d Cols: %d\n", Rows, Columns);
- }
-
-
- if (!TextureID) {
- TextureID = (GLuint *) malloc(sizeof(GLuint) * NumTextures);
- assert(TextureID);
- glGenTextures(NumTextures, TextureID);
- }
-
- if (!TextureResidency) {
- TextureResidency = (GLboolean *) malloc(sizeof(GLboolean) * NumTextures);
- assert(TextureResidency);
- }
-
- if (!TextureWidth) {
- TextureWidth = (GLint *) malloc(sizeof(GLint) * NumTextures);
- assert(TextureWidth);
- }
- if (!TextureHeight) {
- TextureHeight = (GLint *) malloc(sizeof(GLint) * NumTextures);
- assert(TextureHeight);
- }
-
- for (i = 0; i < NumTextures; i++) {
- GLubyte color[4];
- GLubyte *texImage;
- GLint j, row, col;
-
- row = i / Columns;
- col = i % Columns;
-
- glBindTexture(GL_TEXTURE_2D, TextureID[i]);
-
- if (i < LowPriorityCount)
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_PRIORITY, 0.5F);
-
- if (RandomSize) {
-#if 0
- int k = (glutGet(GLUT_ELAPSED_TIME) % 7) + 2;
- TexWidth = 1 << k;
- TexHeight = 1 << k;
-#else
- TexWidth = 1 << RandomInt(2, 7);
- TexHeight = 1 << RandomInt(2, 7);
- printf("Random size of %3d: %d x %d\n", i, TexWidth, TexHeight);
-#endif
- }
-
- TextureWidth[i] = TexWidth;
- TextureHeight[i] = TexHeight;
-
- texImage = (GLubyte*) malloc(4 * TexWidth * TexHeight * sizeof(GLubyte));
- assert(texImage);
-
- /* determine texture color */
- color[0] = (GLint) (255.0 * ((float) col / (Columns - 1)));
- color[1] = 127;
- color[2] = (GLint) (255.0 * ((float) row / (Rows - 1)));
- color[3] = 255;
-
- /* fill in solid-colored teximage */
- for (j = 0; j < TexWidth * TexHeight; j++) {
- texImage[j*4+0] = color[0];
- texImage[j*4+1] = color[1];
- texImage[j*4+2] = color[2];
- texImage[j*4+3] = color[3];
- }
-
- if (MipMap) {
- GLint level = 0;
- GLint w = TexWidth, h = TexHeight;
- while (1) {
- glTexImage2D(GL_TEXTURE_2D, level, GL_RGBA, w, h, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, texImage);
- if (w == 1 && h == 1)
- break;
- if (w > 1)
- w /= 2;
- if (h > 1)
- h /= 2;
- level++;
- /*printf("%d: %d x %d\n", level, w, h);*/
- }
- if (LinearFilter) {
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
- GL_LINEAR_MIPMAP_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- }
- else {
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
- GL_NEAREST_MIPMAP_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- }
- }
- else {
- /* Set corners to white */
- int k = 0;
- texImage[k+0] = texImage[k+1] = texImage[k+2] = texImage[k+3] = 255;
- k = (TexWidth - 1) * 4;
- texImage[k+0] = texImage[k+1] = texImage[k+2] = texImage[k+3] = 255;
- k = (TexWidth * TexHeight - TexWidth) * 4;
- texImage[k+0] = texImage[k+1] = texImage[k+2] = texImage[k+3] = 255;
- k = (TexWidth * TexHeight - 1) * 4;
- texImage[k+0] = texImage[k+1] = texImage[k+2] = texImage[k+3] = 255;
-
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, TexWidth, TexHeight, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, texImage);
- if (LinearFilter) {
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- }
- else {
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- }
- }
-
- free(texImage);
- }
-
- glEnable(GL_TEXTURE_2D);
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- const GLfloat step = 3.0;
- (void) x;
- (void) y;
- switch (key) {
- case 'a':
- Anim = !Anim;
- if (Anim)
- glutIdleFunc(Idle);
- else
- glutIdleFunc(NULL);
- break;
- case 's':
- Idle();
- break;
- case 'z':
- Zrot -= step;
- break;
- case 'Z':
- Zrot += step;
- break;
- case ' ':
- Init();
- break;
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-int main( int argc, char *argv[] )
-{
- GLint i;
-
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( WinWidth, WinHeight );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- if (Anim)
- glutIdleFunc(Idle);
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-n") == 0) {
- NumTextures = atoi(argv[i+1]);
- if (NumTextures <= 0) {
- printf("Error, bad number of textures\n");
- return 1;
- }
- i++;
- }
- else if (strcmp(argv[i], "-mipmap") == 0) {
- MipMap = GL_TRUE;
- }
- else if (strcmp(argv[i], "-linear") == 0) {
- LinearFilter = GL_TRUE;
- }
- else if (strcmp(argv[i], "-size") == 0) {
- TexWidth = atoi(argv[i+1]);
- TexHeight = atoi(argv[i+2]);
- assert(TexWidth >= 1);
- assert(TexHeight >= 1);
- i += 2;
- }
- else if (strcmp(argv[i], "-randomsize") == 0) {
- RandomSize = GL_TRUE;
- }
- else if (strcmp(argv[i], "-lowpri") == 0) {
- LowPriorityCount = atoi(argv[i+1]);
- i++;
- }
- else {
- printf("Usage:\n");
- printf(" manytex [options]\n");
- printf("Options:\n");
- printf(" -n <number of texture objects>\n");
- printf(" -size <width> <height> - specify texture size\n");
- printf(" -randomsize - use random size textures\n");
- printf(" -mipmap - generate mipmaps\n");
- printf(" -linear - use linear filtering instead of nearest\n");
- printf(" -lowpri <n> - Set lower priority on <n> textures\n");
- return 0;
- }
- }
-
- Init();
-
- glutMainLoop();
-
- return 0;
-}
diff --git a/progs/miniglx/miniglxsample.c b/progs/miniglx/miniglxsample.c
deleted file mode 100644
index d4d6729f93..0000000000
--- a/progs/miniglx/miniglxsample.c
+++ /dev/null
@@ -1,128 +0,0 @@
-
-#define USE_MINIGLX 1 /* 1 = use Mini GLX, 0 = use Xlib/GLX */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <GL/gl.h>
-
-#if USE_MINIGLX
-#include <GL/miniglx.h>
-#else
-#include <GL/glx.h>
-#include <X11/Xlib.h>
-#endif
-
-static void _subset_Rectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 )
-{
- glBegin( GL_QUADS );
- glVertex2f( x1, y1 );
- glVertex2f( x2, y1 );
- glVertex2f( x2, y2 );
- glVertex2f( x1, y2 );
- glEnd();
-}
-
-
-/*
- * Create a simple double-buffered RGBA window.
- */
-static Window
-MakeWindow(Display * dpy, unsigned int width, unsigned int height)
-{
- int visAttributes[] = {
- GLX_RGBA,
- GLX_RED_SIZE, 1,
- GLX_GREEN_SIZE, 1,
- GLX_BLUE_SIZE, 1,
- GLX_DOUBLEBUFFER,
- None
- };
- XSetWindowAttributes attr;
- unsigned long attrMask;
- Window root;
- Window win;
- GLXContext ctx;
- XVisualInfo *visinfo;
-
- root = RootWindow(dpy, 0);
-
- /* Choose GLX visual / pixel format */
- visinfo = glXChooseVisual(dpy, 0, visAttributes);
- if (!visinfo) {
- printf("Error: couldn't get an RGB, Double-buffered visual\n");
- exit(1);
- }
-
- /* Create the window */
- attr.background_pixel = 0;
- attr.border_pixel = 0;
- attr.colormap = XCreateColormap(dpy, root, visinfo->visual, AllocNone);
- attrMask = CWBackPixel | CWBorderPixel | CWColormap;
- win = XCreateWindow(dpy, root, 0, 0, width, height,
- 0, visinfo->depth, InputOutput,
- visinfo->visual, attrMask, &attr);
- if (!win) {
- printf("Error: XCreateWindow failed\n");
- exit(1);
- }
-
- /* Display the window */
- XMapWindow(dpy, win);
-
- /* Create GLX rendering context */
- ctx = glXCreateContext(dpy, visinfo, NULL, True);
- if (!ctx) {
- printf("Error: glXCreateContext failed\n");
- exit(1);
- }
-
- /* Bind the rendering context and window */
- glXMakeCurrent(dpy, win, ctx);
-
- glViewport(0, 0, width, height);
-
- return win;
-}
-
-
-/*
- * Draw a few frames of a rotating square.
- */
-static void
-DrawFrames(Display * dpy, Window win)
-{
- int angle;
- glShadeModel(GL_FLAT);
- glClearColor(0.5, 0.5, 0.5, 1.0);
- for (angle = 0; angle < 360; angle += 10) {
- glClear(GL_COLOR_BUFFER_BIT);
- glColor3f(1.0, 1.0, 0.0);
- glPushMatrix();
- glRotatef(angle, 0, 0, 1);
- _subset_Rectf(-0.8, -0.8, 0.8, 0.8);
- glPopMatrix();
- glXSwapBuffers(dpy, win);
- sleep(1);
- }
-}
-
-
-int
-main(int argc, char *argv[])
-{
- Display *dpy;
- Window win;
-
- dpy = XOpenDisplay(NULL);
- if (!dpy) {
- printf("Error: XOpenDisplay failed\n");
- return 1;
- }
-
- win = MakeWindow(dpy, 300, 300);
-
- DrawFrames(dpy, win);
-
- return 0;
-}
diff --git a/progs/miniglx/miniglxtest.c b/progs/miniglx/miniglxtest.c
deleted file mode 100644
index 85c25be4ed..0000000000
--- a/progs/miniglx/miniglxtest.c
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * Test the mini GLX interface.
- */
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <GL/gl.h>
-#define USE_MINI_GLX 1
-#if USE_MINI_GLX
-#include <GL/miniglx.h>
-#else
-#include <GL/glx.h>
-#endif
-
-static GLXContext ctx;
-
-static GLuint NumFrames = 100;
-static GLuint NumDisplays = 1;
-static GLboolean Texture = GL_FALSE;
-static GLboolean SingleBuffer = GL_FALSE;
-static GLboolean Sleeps = GL_TRUE;
-
-
-static void
-rect(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
-{
- glBegin(GL_QUADS);
- glTexCoord2f(0, 0); glColor3f(0, 0, 1); glVertex2f(x1, y1);
- glTexCoord2f(1, 0); glColor3f(1, 0, 0); glVertex2f(x2, y1);
- glTexCoord2f(1, 1); glColor3f(0, 1, 0); glVertex2f(x2, y2);
- glTexCoord2f(0, 1); glColor3f(0, 0, 0); glVertex2f(x1, y2);
- glEnd();
-}
-
-
-static void
-redraw(Display *dpy, Window w, int rot)
-{
- GLfloat a;
-
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- glPushMatrix();
- glRotatef(rot, 0, 0, 1);
- glScalef(.5, .5, .5);
- for (a = 0.0; a < 360.0; a += 30.0) {
- glPushMatrix();
- glRotatef(a, 0, 0, 1);
- glRotatef(40, 1, 0, 0);
- glColor3f(a / 360.0, 1-a/360.0, 0);
- rect(0.3, -0.25, 1.5, 0.25);
- glPopMatrix();
- }
- glPopMatrix();
-
- if (SingleBuffer)
- glFlush();
- else
- glXSwapBuffers(dpy, w);
-}
-
-
-static Window
-make_window(Display *dpy, unsigned int width, unsigned int height)
-{
- int attrib_single[] = { GLX_RGBA,
- GLX_RED_SIZE, 1,
- GLX_GREEN_SIZE, 1,
- GLX_BLUE_SIZE, 1,
- GLX_DEPTH_SIZE, 1,
- None };
- int attrib_double[] = { GLX_RGBA,
- GLX_RED_SIZE, 1,
- GLX_GREEN_SIZE, 1,
- GLX_BLUE_SIZE, 1,
- GLX_DEPTH_SIZE, 1,
- GLX_DOUBLEBUFFER,
- None };
- int *attrib = SingleBuffer ? attrib_single : attrib_double;
- int scrnum = 0;
- XSetWindowAttributes attr;
- unsigned long mask;
- Window root;
- Window win;
- XVisualInfo *visinfo;
-
- root = RootWindow(dpy, scrnum);
-
- if (!(visinfo = glXChooseVisual(dpy, scrnum, attrib))) {
- printf("Error: couldn't get an RGB, Double-buffered visual\n");
- exit(1);
- }
-
- if (!(ctx = glXCreateContext(dpy, visinfo, NULL, True))) {
- printf("Error: glXCreateContext failed\n");
- exit(1);
- }
-
- /* window attributes */
- attr.background_pixel = 0;
- attr.border_pixel = 0;
- attr.colormap = XCreateColormap(dpy, root, visinfo->visual, AllocNone);
- attr.event_mask = StructureNotifyMask | ExposureMask;
- mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask;
-
- win = XCreateWindow(dpy, root, 0, 0, width, height,
- 0, visinfo->depth, InputOutput,
- visinfo->visual, mask, &attr);
- if (!win) {
- printf("Error: XCreateWindow failed\n");
- exit(1);
- }
-
- glXMakeCurrent(dpy, win, ctx);
-
- glViewport(0, 0, width, height);
-
- return win;
-}
-
-
-static void
-event_loop(Display *dpy, Window win)
-{
- int i;
-
- printf("Drawing %d frames\n", NumFrames);
-
- for (i = 0; i < NumFrames; i++) {
- redraw(dpy, win, -i*2);
- if (Sleeps) {
- usleep(20000);
- }
- }
-}
-
-
-static int
-runtest(void)
-{
- Display *dpy;
- Window win;
-
- dpy = XOpenDisplay(NULL);
- if (!dpy) {
- printf("Error: XOpenDisplay failed\n");
- return 1;
- }
-
- win = make_window(dpy, 800, 600);
-
- srand(getpid());
-
- /* init GL state */
- glClearColor(0.5, 0.5, 0.5, 1.0);
- glEnable(GL_DEPTH_TEST);
- if (Texture) {
- GLubyte image[16][16][4];
- GLint i, j;
- for (i = 0; i < 16; i++) {
- for (j = 0; j < 16; j++) {
- if (((i / 2) ^ (j / 2)) & 1) {
- image[i][j][0] = 255;
- image[i][j][1] = 255;
- image[i][j][2] = 255;
- image[i][j][3] = 255;
- }
- else {
- image[i][j][0] = 128;
- image[i][j][1] = 128;
- image[i][j][2] = 128;
- image[i][j][3] = 128;
- }
- }
- }
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 16, 16, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, image);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glEnable(GL_TEXTURE_2D);
- }
- if (SingleBuffer) {
- glDrawBuffer(GL_FRONT);
- glReadBuffer(GL_FRONT);
- }
- else {
- glDrawBuffer(GL_BACK);
- }
-
- XMapWindow(dpy, win);
-
- /* wait for window to get mapped */
- {
- XEvent e;
- while (1) {
- XNextEvent(dpy, &e);
- if (e.type == MapNotify && e.xmap.window == win) {
- break;
- }
- }
- }
-
- event_loop(dpy, win);
-
- glXDestroyContext(dpy, ctx);
- XDestroyWindow(dpy, win);
-
- XCloseDisplay(dpy);
-
- return 0;
-}
-
-
-static void
-usage(void)
-{
- printf("Usage:\n");
- printf(" -f N render N frames (default %d)\n", NumFrames);
- printf(" -d N do N display cycles\n");
- printf(" -t texturing\n");
- printf(" -s single buffering\n");
- printf(" -n no usleep() delay\n");
-}
-
-
-static void
-parse_args(int argc, char *argv[])
-{
- int i;
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-f") == 0) {
- NumFrames = atoi(argv[i + 1]);
- i++;
- }
- else if (strcmp(argv[i], "-d") == 0) {
- NumDisplays = atoi(argv[i + 1]);
- i++;
- }
- else if (strcmp(argv[i], "-n") == 0) {
- Sleeps = GL_FALSE;
- }
- else if (strcmp(argv[i], "-s") == 0) {
- SingleBuffer = GL_TRUE;
- }
- else if (strcmp(argv[i], "-t") == 0) {
- Texture = GL_TRUE;
- }
- else {
- usage();
- exit(1);
- }
- }
-}
-
-
-int
-main(int argc, char *argv[])
-{
- int i;
-
- parse_args(argc, argv);
-
- for (i = 0; i < NumDisplays; i++) {
- if (runtest() != 0)
- break;
- }
-
- return 0;
-}
diff --git a/progs/miniglx/sample_server.c b/progs/miniglx/sample_server.c
deleted file mode 100644
index 039c04fa40..0000000000
--- a/progs/miniglx/sample_server.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/* $Id: sample_server.c,v 1.1 2003/08/06 17:47:15 keithw Exp $ */
-
-/*
- * Sample server that just keeps first available window mapped.
- */
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <GL/gl.h>
-#include <GL/miniglx.h>
-
-struct client {
- struct client *next;
- Window windowid;
- int mappable;
-};
-
-struct client *clients = 0, *mapped_client = 0;
-
-
-static struct client *find_client( Window id )
-{
- struct client *c;
-
- for (c = clients ; c ; c = c->next)
- if (c->windowid == id)
- return c;
-
- return 0;
-}
-
-int main( int argc, char *argv[] )
-{
- Display *dpy;
- XEvent ev;
-
- dpy = __miniglx_StartServer(NULL);
- if (!dpy) {
- fprintf(stderr, "Error: __miniglx_StartServer failed\n");
- return 1;
- }
-
- while (XNextEvent( dpy, &ev )) {
- struct client *c;
-
- switch (ev.type) {
- case MapRequest:
- fprintf(stderr, "MapRequest\n");
- c = find_client(ev.xmaprequest.window);
- if (!c) break;
- c->mappable = True;
- break;
-
- case UnmapNotify:
- fprintf(stderr, "UnmapNotify\n");
- c = find_client(ev.xunmap.window);
- if (!c) break;
- c->mappable = False;
- if (c == mapped_client)
- mapped_client = 0;
- break;
-
- case CreateNotify:
- fprintf(stderr, "CreateNotify\n");
- c = malloc(sizeof(*c));
- c->next = clients;
- c->windowid = ev.xcreatewindow.window;
- c->mappable = False;
- clients = c;
- break;
-
- case DestroyNotify:
- fprintf(stderr, "DestroyNotify\n");
- c = find_client(ev.xdestroywindow.window);
- if (!c) break;
- if (c == clients)
- clients = c->next;
- else {
- struct client *t;
- for (t = clients ; t->next != c ; t = t->next)
- ;
- t->next = c->next;
- }
-
- if (c == mapped_client)
- mapped_client = 0;
-
- free(c);
- break;
-
- default:
- break;
- }
-
- /* Search for first mappable client if none already mapped.
- */
- if (!mapped_client) {
- for (c = clients ; c ; c = c->next) {
- if (c->mappable) {
- XMapWindow( dpy, c->windowid );
- mapped_client = c;
- break;
- }
- }
- }
- }
-
- XCloseDisplay( dpy );
-
- return 0;
-}
diff --git a/progs/miniglx/sample_server2.c b/progs/miniglx/sample_server2.c
deleted file mode 100644
index 58effcf484..0000000000
--- a/progs/miniglx/sample_server2.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/* $Id: sample_server2.c,v 1.2 2003/08/23 01:28:59 jonsmirl Exp $ */
-
-/*
- * Sample server that just keeps first available window mapped.
- *
- * It also reads and echos anything that happens on stdin as an
- * example of tracking events from sources other than miniglx clients.
- *
- * It reads & writes without blocking, so that eg. piping a lot of
- * text to stdin and then hitting 'ctrl-S' on the output stream won't
- * cause it to stop handling miniglx events.
- *
- * See select_tut in the linux manual pages for a good overview of the
- * select(2) system call.
- */
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <GL/gl.h>
-#include <GL/miniglx.h>
-#include <errno.h>
-#include <assert.h>
-
-struct client {
- struct client *next;
- Window windowid;
- int mappable;
-};
-
-struct client *clients = 0, *mapped_client = 0;
-
-#define BUFSZ 4096
-char rbuf[BUFSZ];
-int rbuf_count;
-
-
-static struct client *find_client( Window id )
-{
- struct client *c;
-
- for (c = clients ; c ; c = c->next)
- if (c->windowid == id)
- return c;
-
- return 0;
-}
-
-int main( int argc, char *argv[] )
-{
- Display *dpy;
- XEvent ev;
- int autostart = 0;
-
- if (argc == 2 && strcmp(argv[1], "-autostart") == 0)
- autostart = 1;
-
- dpy = __miniglx_StartServer(NULL);
- if (!dpy) {
- fprintf(stderr, "Error: __miniglx_StartServer failed\n");
- return 1;
- }
-
- /* How is vt switching communicated through the XNextEvent interface?
- */
- while (1) {
- int r, n;
- struct timeval tv;
- fd_set rfds, wfds;
- int bored = 0;
-
- FD_ZERO(&rfds);
- FD_ZERO(&wfds);
- tv.tv_sec = 1;
- tv.tv_usec = 0;
-
- if (rbuf_count) {
- FD_SET( 1, &wfds ); /* notify when we can write out buffer */
- n = 1;
- }
- else {
- FD_SET( 0, &rfds ); /* else notify when new data to read */
- n = 0;
- }
-
- /* __miniglx_Select waits until any of these file groups becomes
- * readable/writable/etc (like regular select), until timeout
- * expires (like regular select), until a signal is received
- * (like regular select) or until an event is available for
- * XCheckMaskEvent().
- */
- r = __miniglx_Select( dpy, n+1, &rfds, &wfds, 0, &tv );
-
- /* This can happen if select() is interrupted by a signal:
- */
- if (r < 0 && errno != EINTR && errno != EAGAIN) {
- perror ("select()");
- exit (1);
- }
-
- if (tv.tv_sec == 0 && tv.tv_usec == 0)
- bored = 1;
-
- /* Check and handle events on our local file descriptors
- */
- if (FD_ISSET( 0, &rfds )) {
- /* Something on stdin */
- assert(rbuf_count == 0);
- r = read(0, rbuf, BUFSZ);
- if (r < 1) {
- perror("read");
- abort();
- }
- rbuf_count = r;
- }
-
- if (FD_ISSET( 1, &wfds )) {
- /* Can write to stdout */
- assert(rbuf_count > 0);
- r = write(1, rbuf, rbuf_count);
- if (r < 1) {
- perror("write");
- abort();
- }
- rbuf_count -= r;
- if (rbuf_count)
- memmove(rbuf + r, rbuf, rbuf_count);
- }
-
-
- /* Check and handle events generated by miniglx:
- */
- while (XCheckMaskEvent( dpy, ~0, &ev )) {
- struct client *c;
- bored = 0;
-
- fprintf(stderr, "Received event %d\n", ev.type);
-
- switch (ev.type) {
- case CreateNotify:
- fprintf(stderr, "CreateNotify -- new client\n");
- c = malloc(sizeof(*c));
- c->next = clients;
- c->windowid = ev.xcreatewindow.window;
- c->mappable = False;
- clients = c;
- break;
-
- case DestroyNotify:
- fprintf(stderr, "DestroyNotify\n");
- c = find_client(ev.xdestroywindow.window);
- if (!c) break;
- if (c == clients)
- clients = c->next;
- else {
- struct client *t;
- for (t = clients ; t->next != c ; t = t->next)
- ;
- t->next = c->next;
- }
-
- if (c == mapped_client)
- mapped_client = 0;
-
- free(c);
- break;
-
- case MapRequest:
- fprintf(stderr, "MapRequest\n");
- c = find_client(ev.xmaprequest.window);
- if (!c) break;
- c->mappable = True;
- break;
-
- case UnmapNotify:
- fprintf(stderr, "UnmapNotify\n");
- c = find_client(ev.xunmap.window);
- if (!c) break;
- c->mappable = False;
- if (c == mapped_client)
- mapped_client = 0;
- break;
-
- default:
- break;
- }
- }
-
-
- /* Search for first mappable client if none already mapped.
- */
- if (!mapped_client) {
- struct client *c;
- for (c = clients ; c ; c = c->next) {
- if (c->mappable) {
- XMapWindow( dpy, c->windowid );
- mapped_client = c;
- break;
- }
- }
- if (!clients && autostart) {
- system("nohup ./texline &");
- system("nohup ./manytex &");
- }
- }
- else if (bored) {
- struct client *c;
- /* bored of mapped client now, let's try & find another one */
- for (c = mapped_client->next ; c && !c->mappable ; c = c->next)
- ;
- if (!c)
- for (c = clients ; c && !c->mappable ; c = c->next)
- ;
- if (c && c != mapped_client) {
- XUnmapWindow( dpy, mapped_client->windowid );
- XMapWindow( dpy, c->windowid );
- mapped_client = c;
- }
- else
- fprintf(stderr, "I'm bored!\n");
- }
- }
-
- XCloseDisplay( dpy );
-
- return 0;
-}
diff --git a/progs/miniglx/texline.c b/progs/miniglx/texline.c
deleted file mode 100644
index d2a97d2876..0000000000
--- a/progs/miniglx/texline.c
+++ /dev/null
@@ -1,268 +0,0 @@
-/* $Id: texline.c,v 1.1 2003/08/06 17:47:15 keithw Exp $ */
-
-/*
- * Test textured lines.
- *
- * Brian Paul
- * September 2000
- */
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <GL/glut.h>
-#include "../util/readtex.c" /* I know, this is a hack. */
-
-#define TEXTURE_FILE "../images/girl.rgb"
-
-static GLboolean Antialias = GL_FALSE;
-static GLboolean Animate = GL_FALSE;
-static GLint Texture = 1;
-static GLboolean Stipple = GL_FALSE;
-static GLfloat LineWidth = 1.0;
-
-static GLfloat Xrot = -60.0, Yrot = 0.0, Zrot = 0.0;
-static GLfloat DYrot = 1.0;
-static GLboolean Points = GL_FALSE;
-static GLfloat Scale = 1.0;
-
-static void Idle( void )
-{
- if (Animate) {
- Zrot += DYrot;
- glutPostRedisplay();
- }
-}
-
-
-static void Display( void )
-{
- GLfloat x, y, s, t;
-
- glClear( GL_COLOR_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);
- glScalef(Scale, Scale, Scale);
-
- if (Texture)
- glColor3f(1, 1, 1);
-
- if (Points) {
- glBegin(GL_POINTS);
- for (t = 0.0; t <= 1.0; t += 0.025) {
- for (s = 0.0; s <= 1.0; s += 0.025) {
- x = s * 2.0 - 1.0;
- y = t * 2.0 - 1.0;
- if (!Texture)
- glColor3f(1, 0, 1);
- glMultiTexCoord2fARB(GL_TEXTURE1_ARB, t, s);
- glTexCoord2f(s, t);
- glVertex2f(x, y);
- }
- }
- glEnd();
- }
- else {
- glBegin(GL_LINES);
- for (t = 0.0; t <= 1.0; t += 0.025) {
- x = t * 2.0 - 1.0;
- if (!Texture)
- glColor3f(1, 0, 1);
- glTexCoord2f(t, 0.0);
- glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 0.0, t);
- glVertex2f(x, -1.0);
- if (!Texture)
- glColor3f(0, 1, 0);
- glTexCoord2f(t, 1.0);
- glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 1.0, t);
- glVertex2f(x, 1.0);
- }
- glEnd();
- }
-
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- GLfloat ar = (float) width / height;
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -ar, ar, -1.0, 1.0, 10.0, 100.0 );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -12.0 );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 'a':
- Antialias = !Antialias;
- if (Antialias) {
- glEnable(GL_LINE_SMOOTH);
- glEnable(GL_POINT_SMOOTH);
- glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- }
- else {
- glDisable(GL_LINE_SMOOTH);
- glDisable(GL_POINT_SMOOTH);
- glDisable(GL_BLEND);
- }
- break;
- case 't':
- Texture++;
- if (Texture > 2)
- Texture = 0;
- if (Texture == 0) {
- glActiveTextureARB(GL_TEXTURE0_ARB);
- glDisable(GL_TEXTURE_2D);
- glActiveTextureARB(GL_TEXTURE1_ARB);
- glDisable(GL_TEXTURE_2D);
- }
- else if (Texture == 1) {
- glActiveTextureARB(GL_TEXTURE0_ARB);
- glEnable(GL_TEXTURE_2D);
- glActiveTextureARB(GL_TEXTURE1_ARB);
- glDisable(GL_TEXTURE_2D);
- }
- else {
- glActiveTextureARB(GL_TEXTURE0_ARB);
- glEnable(GL_TEXTURE_2D);
- glActiveTextureARB(GL_TEXTURE1_ARB);
- glEnable(GL_TEXTURE_2D);
- }
- break;
- case 'w':
- LineWidth -= 0.25;
- if (LineWidth < 0.25)
- LineWidth = 0.25;
- glLineWidth(LineWidth);
- glPointSize(LineWidth);
- break;
- case 'W':
- LineWidth += 0.25;
- if (LineWidth > 8.0)
- LineWidth = 8.0;
- glLineWidth(LineWidth);
- glPointSize(LineWidth);
- break;
- case 'p':
- Points = !Points;
- break;
- case 's':
- Stipple = !Stipple;
- if (Stipple)
- glEnable(GL_LINE_STIPPLE);
- else
- glDisable(GL_LINE_STIPPLE);
- break;
- case ' ':
- Animate = !Animate;
- if (Animate)
- glutIdleFunc(Idle);
- else
- glutIdleFunc(NULL);
- break;
- case 27:
- exit(0);
- break;
- }
- printf("LineWidth, PointSize = %f\n", LineWidth);
- 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[] )
-{
- GLuint u;
- for (u = 0; u < 2; u++) {
- glActiveTextureARB(GL_TEXTURE0_ARB + u);
- glBindTexture(GL_TEXTURE_2D, 10+u);
- if (u == 0)
- glEnable(GL_TEXTURE_2D);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-
- if (u == 0)
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
- else
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD);
-
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- if (!LoadRGBMipmaps(TEXTURE_FILE, GL_RGB)) {
- printf("Error: couldn't load texture image\n");
- exit(1);
- }
- }
-
- glLineStipple(1, 0xff);
-
- 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( 400, 300 );
-
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
-
- glutCreateWindow(argv[0] );
-
- Init(argc, argv);
-
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutSpecialFunc( SpecialKey );
- glutDisplayFunc( Display );
- if (Animate)
- glutIdleFunc( Idle );
-
- glutMainLoop();
- return 0;
-}
diff --git a/progs/osdemos/.gitignore b/progs/osdemos/.gitignore
deleted file mode 100644
index 5c78f12481..0000000000
--- a/progs/osdemos/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-osdemo
-osdemo16
-osdemo32
-ostest1
-readtex.c
-readtex.h
-showbuffer.c
-showbuffer.h
diff --git a/progs/redbook/.gitignore b/progs/redbook/.gitignore
deleted file mode 100644
index 8ed3efe3e2..0000000000
--- a/progs/redbook/.gitignore
+++ /dev/null
@@ -1,64 +0,0 @@
-.cvsignore
-aaindex
-aapoly
-aargb
-accanti
-accpersp
-alpha
-alpha3D
-anti
-bezcurve
-bezmesh
-checker
-clip
-colormat
-cube
-depthcue
-dof
-double
-drawf
-feedback
-fog
-fogindex
-font
-hello
-image
-light
-lines
-list
-material
-mipmap
-model
-movelight
-nurbs
-pickdepth
-picksquare
-plane
-planet
-polyoff
-polys
-quadric
-robot
-sccolorlight
-scene
-scenebamb
-sceneflat
-select
-smooth
-stencil
-stroke
-surface
-teaambient
-teapots
-tess
-tesswind
-texbind
-texgen
-texprox
-texsub
-texturesurf
-torus
-trim
-unproject
-varray
-wrap
diff --git a/progs/redbook/Windows/redbook.dsw b/progs/redbook/Windows/redbook.dsw
deleted file mode 100644
index 71ba7e89e3..0000000000
--- a/progs/redbook/Windows/redbook.dsw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "teapots"=".\teapots.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/progs/redbook/Windows/teapots.dsp b/progs/redbook/Windows/teapots.dsp
deleted file mode 100644
index 4d39865810..0000000000
--- a/progs/redbook/Windows/teapots.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="teapots" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=teapots - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "teapots.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "teapots.mak" CFG="teapots - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "teapots - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "teapots - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "teapots - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /machine:I386 /out:"../teapots.exe"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "teapots - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../../lib/GLUT32.LIB ../../../lib/GLU32.LIB ../../../lib/OPENGL32.LIB /nologo /subsystem:console /debug /machine:I386 /out:"../teapots.exe" /pdbtype:sept
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Desc=Copy DLLs
-PostBuild_Cmds=copy ..\..\..\lib\*.dll ..
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "teapots - Win32 Release"
-# Name "teapots - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\teapots.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/progs/samples/.gitignore b/progs/samples/.gitignore
deleted file mode 100644
index f60d6e94ea..0000000000
--- a/progs/samples/.gitignore
+++ /dev/null
@@ -1,47 +0,0 @@
-.cvsignore
-accum
-anywin
-bdemo
-binfo
-bitmap1
-bitmap2
-blendeq
-blendxor
-bugger
-copy
-cursor
-demo
-depth
-eval
-ffset
-fog
-font
-font
-incopy
-line
-logo
-lthreads
-lxdemo
-lxgears
-lxheads
-lxinfo
-lxpixmap
-nurb
-oglinfo
-olympic
-overlay
-pend
-point
-prim
-quad
-readtex.c
-readtex.h
-select
-shape
-sphere
-star
-stencil
-stretch
-texture
-tri
-wave
diff --git a/progs/samples/readtex.c b/progs/samples/readtex.c
new file mode 100644
index 0000000000..37d5fcd0d3
--- /dev/null
+++ b/progs/samples/readtex.c
@@ -0,0 +1,454 @@
+/* readtex.c */
+
+/*
+ * Read an SGI .rgb image file and generate a mipmap texture set.
+ * Much of this code was borrowed from SGI's tk OpenGL toolkit.
+ */
+
+
+
+#include <GL/gl.h>
+#include <GL/glu.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "readtex.h"
+
+
+#ifndef SEEK_SET
+# define SEEK_SET 0
+#endif
+
+
+/*
+** RGB Image Structure
+*/
+
+typedef struct _TK_RGBImageRec {
+ GLint sizeX, sizeY;
+ GLint components;
+ unsigned char *data;
+} TK_RGBImageRec;
+
+
+
+/******************************************************************************/
+
+typedef struct _rawImageRec {
+ unsigned short imagic;
+ unsigned short type;
+ unsigned short dim;
+ unsigned short sizeX, sizeY, sizeZ;
+ unsigned long min, max;
+ unsigned long wasteBytes;
+ char name[80];
+ unsigned long colorMap;
+ FILE *file;
+ unsigned char *tmp, *tmpR, *tmpG, *tmpB, *tmpA;
+ unsigned long rleEnd;
+ GLuint *rowStart;
+ GLint *rowSize;
+} rawImageRec;
+
+/******************************************************************************/
+
+static void ConvertShort(unsigned short *array, long length)
+{
+ unsigned long b1, b2;
+ unsigned char *ptr;
+
+ ptr = (unsigned char *)array;
+ while (length--) {
+ b1 = *ptr++;
+ b2 = *ptr++;
+ *array++ = (unsigned short) ((b1 << 8) | (b2));
+ }
+}
+
+static void ConvertLong(GLuint *array, long length)
+{
+ unsigned long b1, b2, b3, b4;
+ unsigned char *ptr;
+
+ ptr = (unsigned char *)array;
+ while (length--) {
+ b1 = *ptr++;
+ b2 = *ptr++;
+ b3 = *ptr++;
+ b4 = *ptr++;
+ *array++ = (b1 << 24) | (b2 << 16) | (b3 << 8) | (b4);
+ }
+}
+
+static rawImageRec *RawImageOpen(const char *fileName)
+{
+ union {
+ int testWord;
+ char testByte[4];
+ } endianTest;
+ rawImageRec *raw;
+ GLenum swapFlag;
+ int x;
+
+ endianTest.testWord = 1;
+ if (endianTest.testByte[0] == 1) {
+ swapFlag = GL_TRUE;
+ } else {
+ swapFlag = GL_FALSE;
+ }
+
+ raw = (rawImageRec *)calloc(1, sizeof(rawImageRec));
+ if (raw == NULL) {
+ fprintf(stderr, "Out of memory!\n");
+ return NULL;
+ }
+ if ((raw->file = fopen(fileName, "rb")) == NULL) {
+ perror(fileName);
+ return NULL;
+ }
+
+ fread(raw, 1, 12, raw->file);
+
+ if (swapFlag) {
+ ConvertShort(&raw->imagic, 6);
+ }
+
+ raw->tmp = (unsigned char *)malloc(raw->sizeX*256);
+ raw->tmpR = (unsigned char *)malloc(raw->sizeX*256);
+ raw->tmpG = (unsigned char *)malloc(raw->sizeX*256);
+ raw->tmpB = (unsigned char *)malloc(raw->sizeX*256);
+ if (raw->sizeZ==4) {
+ raw->tmpA = (unsigned char *)malloc(raw->sizeX*256);
+ }
+ if (raw->tmp == NULL || raw->tmpR == NULL || raw->tmpG == NULL ||
+ raw->tmpB == NULL) {
+ fprintf(stderr, "Out of memory!\n");
+ return NULL;
+ }
+
+ if ((raw->type & 0xFF00) == 0x0100) {
+ x = raw->sizeY * raw->sizeZ * sizeof(GLuint);
+ raw->rowStart = (GLuint *)malloc(x);
+ raw->rowSize = (GLint *)malloc(x);
+ if (raw->rowStart == NULL || raw->rowSize == NULL) {
+ fprintf(stderr, "Out of memory!\n");
+ return NULL;
+ }
+ raw->rleEnd = 512 + (2 * x);
+ fseek(raw->file, 512, SEEK_SET);
+ fread(raw->rowStart, 1, x, raw->file);
+ fread(raw->rowSize, 1, x, raw->file);
+ if (swapFlag) {
+ ConvertLong(raw->rowStart, (long) (x/sizeof(GLuint)));
+ ConvertLong((GLuint *)raw->rowSize, (long) (x/sizeof(GLint)));
+ }
+ }
+ return raw;
+}
+
+static void RawImageClose(rawImageRec *raw)
+{
+ fclose(raw->file);
+ free(raw->tmp);
+ free(raw->tmpR);
+ free(raw->tmpG);
+ free(raw->tmpB);
+ if (raw->rowStart)
+ free(raw->rowStart);
+ if (raw->rowSize)
+ free(raw->rowSize);
+ if (raw->sizeZ>3) {
+ free(raw->tmpA);
+ }
+ free(raw);
+}
+
+static void RawImageGetRow(rawImageRec *raw, unsigned char *buf, int y, int z)
+{
+ unsigned char *iPtr, *oPtr, pixel;
+ int count, done = 0;
+
+ if ((raw->type & 0xFF00) == 0x0100) {
+ fseek(raw->file, (long) raw->rowStart[y+z*raw->sizeY], SEEK_SET);
+ fread(raw->tmp, 1, (unsigned int)raw->rowSize[y+z*raw->sizeY],
+ raw->file);
+
+ iPtr = raw->tmp;
+ oPtr = buf;
+ while (!done) {
+ pixel = *iPtr++;
+ count = (int)(pixel & 0x7F);
+ if (!count) {
+ done = 1;
+ return;
+ }
+ if (pixel & 0x80) {
+ while (count--) {
+ *oPtr++ = *iPtr++;
+ }
+ } else {
+ pixel = *iPtr++;
+ while (count--) {
+ *oPtr++ = pixel;
+ }
+ }
+ }
+ } else {
+ fseek(raw->file, 512+(y*raw->sizeX)+(z*raw->sizeX*raw->sizeY),
+ SEEK_SET);
+ fread(buf, 1, raw->sizeX, raw->file);
+ }
+}
+
+
+static void RawImageGetData(rawImageRec *raw, TK_RGBImageRec *final)
+{
+ unsigned char *ptr;
+ int i, j;
+
+ final->data = (unsigned char *)malloc((raw->sizeX+1)*(raw->sizeY+1)*4);
+ if (final->data == NULL) {
+ fprintf(stderr, "Out of memory!\n");
+ }
+
+ ptr = final->data;
+ for (i = 0; i < (int)(raw->sizeY); i++) {
+ RawImageGetRow(raw, raw->tmpR, i, 0);
+ RawImageGetRow(raw, raw->tmpG, i, 1);
+ RawImageGetRow(raw, raw->tmpB, i, 2);
+ if (raw->sizeZ>3) {
+ RawImageGetRow(raw, raw->tmpA, i, 3);
+ }
+ for (j = 0; j < (int)(raw->sizeX); j++) {
+ *ptr++ = *(raw->tmpR + j);
+ *ptr++ = *(raw->tmpG + j);
+ *ptr++ = *(raw->tmpB + j);
+ if (raw->sizeZ>3) {
+ *ptr++ = *(raw->tmpA + j);
+ }
+ }
+ }
+}
+
+
+static TK_RGBImageRec *tkRGBImageLoad(const char *fileName)
+{
+ rawImageRec *raw;
+ TK_RGBImageRec *final;
+
+ raw = RawImageOpen(fileName);
+ if (!raw) {
+ fprintf(stderr, "File not found\n");
+ return NULL;
+ }
+ final = (TK_RGBImageRec *)malloc(sizeof(TK_RGBImageRec));
+ if (final == NULL) {
+ fprintf(stderr, "Out of memory!\n");
+ return NULL;
+ }
+ final->sizeX = raw->sizeX;
+ final->sizeY = raw->sizeY;
+ final->components = raw->sizeZ;
+ RawImageGetData(raw, final);
+ RawImageClose(raw);
+ return final;
+}
+
+
+static void FreeImage( TK_RGBImageRec *image )
+{
+ free(image->data);
+ free(image);
+}
+
+
+/*
+ * Load an SGI .rgb file and generate a set of 2-D mipmaps from it.
+ * Input: imageFile - name of .rgb to read
+ * intFormat - internal texture format to use, or number of components
+ * Return: GL_TRUE if success, GL_FALSE if error.
+ */
+GLboolean LoadRGBMipmaps( const char *imageFile, GLint intFormat )
+{
+ GLint w, h;
+ return LoadRGBMipmaps2( imageFile, GL_TEXTURE_2D, intFormat, &w, &h );
+}
+
+
+
+GLboolean LoadRGBMipmaps2( const char *imageFile, GLenum target,
+ GLint intFormat, GLint *width, GLint *height )
+{
+ GLint error;
+ GLenum format;
+ TK_RGBImageRec *image;
+
+ image = tkRGBImageLoad( imageFile );
+ if (!image) {
+ return GL_FALSE;
+ }
+
+ if (image->components==3) {
+ format = GL_RGB;
+ }
+ else if (image->components==4) {
+ format = GL_RGBA;
+ }
+ else {
+ /* not implemented */
+ fprintf(stderr,
+ "Error in LoadRGBMipmaps %d-component images not implemented\n",
+ image->components );
+ return GL_FALSE;
+ }
+
+ error = gluBuild2DMipmaps( target,
+ intFormat,
+ image->sizeX, image->sizeY,
+ format,
+ GL_UNSIGNED_BYTE,
+ image->data );
+
+ *width = image->sizeX;
+ *height = image->sizeY;
+
+ FreeImage(image);
+
+ return error ? GL_FALSE : GL_TRUE;
+}
+
+
+
+/*
+ * Load an SGI .rgb file and return a pointer to the image data.
+ * Input: imageFile - name of .rgb to read
+ * Output: width - width of image
+ * height - height of image
+ * format - format of image (GL_RGB or GL_RGBA)
+ * Return: pointer to image data or NULL if error
+ */
+GLubyte *LoadRGBImage( const char *imageFile, GLint *width, GLint *height,
+ GLenum *format )
+{
+ TK_RGBImageRec *image;
+ GLint bytes;
+ GLubyte *buffer;
+
+ image = tkRGBImageLoad( imageFile );
+ if (!image) {
+ return NULL;
+ }
+
+ if (image->components==3) {
+ *format = GL_RGB;
+ }
+ else if (image->components==4) {
+ *format = GL_RGBA;
+ }
+ else {
+ /* not implemented */
+ fprintf(stderr,
+ "Error in LoadRGBImage %d-component images not implemented\n",
+ image->components );
+ return NULL;
+ }
+
+ *width = image->sizeX;
+ *height = image->sizeY;
+
+ bytes = image->sizeX * image->sizeY * image->components;
+ buffer = (GLubyte *) malloc(bytes);
+ if (!buffer)
+ return NULL;
+
+ memcpy( (void *) buffer, (void *) image->data, bytes );
+
+ FreeImage(image);
+
+ return buffer;
+}
+
+#define CLAMP( X, MIN, MAX ) ( (X)<(MIN) ? (MIN) : ((X)>(MAX) ? (MAX) : (X)) )
+
+
+static void ConvertRGBtoYUV(GLint w, GLint h, GLint texel_bytes,
+ const GLubyte *src,
+ GLushort *dest)
+{
+ GLint i, j;
+
+ for (i = 0; i < h; i++) {
+ for (j = 0; j < w; j++) {
+ const GLfloat r = (src[0]) / 255.0;
+ const GLfloat g = (src[1]) / 255.0;
+ const GLfloat b = (src[2]) / 255.0;
+ GLfloat y, cr, cb;
+ GLint iy, icr, icb;
+
+ y = r * 65.481 + g * 128.553 + b * 24.966 + 16;
+ cb = r * -37.797 + g * -74.203 + b * 112.0 + 128;
+ cr = r * 112.0 + g * -93.786 + b * -18.214 + 128;
+ /*printf("%f %f %f -> %f %f %f\n", r, g, b, y, cb, cr);*/
+ iy = (GLint) CLAMP(y, 0, 254);
+ icb = (GLint) CLAMP(cb, 0, 254);
+ icr = (GLint) CLAMP(cr, 0, 254);
+
+ if (j & 1) {
+ /* odd */
+ *dest = (iy << 8) | icr;
+ }
+ else {
+ /* even */
+ *dest = (iy << 8) | icb;
+ }
+ dest++;
+ src += texel_bytes;
+ }
+ }
+}
+
+
+/*
+ * Load an SGI .rgb file and return a pointer to the image data, converted
+ * to 422 yuv.
+ *
+ * Input: imageFile - name of .rgb to read
+ * Output: width - width of image
+ * height - height of image
+ * Return: pointer to image data or NULL if error
+ */
+GLushort *LoadYUVImage( const char *imageFile, GLint *width, GLint *height )
+{
+ TK_RGBImageRec *image;
+ GLushort *buffer;
+
+ image = tkRGBImageLoad( imageFile );
+ if (!image) {
+ return NULL;
+ }
+
+ if (image->components != 3 && image->components !=4 ) {
+ /* not implemented */
+ fprintf(stderr,
+ "Error in LoadYUVImage %d-component images not implemented\n",
+ image->components );
+ return NULL;
+ }
+
+ *width = image->sizeX;
+ *height = image->sizeY;
+
+ buffer = (GLushort *) malloc( image->sizeX * image->sizeY * 2 );
+
+ if (buffer)
+ ConvertRGBtoYUV( image->sizeX,
+ image->sizeY,
+ image->components,
+ image->data,
+ buffer );
+
+
+ FreeImage(image);
+ return buffer;
+}
+
diff --git a/progs/slang/.gitignore b/progs/slang/.gitignore
deleted file mode 100644
index 8a42b018e6..0000000000
--- a/progs/slang/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-cltest
-sotest
-vstest
diff --git a/progs/slang/Makefile b/progs/slang/Makefile
deleted file mode 100644
index f6f34fcd25..0000000000
--- a/progs/slang/Makefile
+++ /dev/null
@@ -1,57 +0,0 @@
-# progs/slang/Makefile
-
-TOP = ../..
-
-include $(TOP)/configs/current
-
-INCDIR = $(TOP)/include
-
-LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
-
-LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
-
-#
-# targets
-#
-
-.PHONY: default tests clean
-
-default: cltest sotest vstest
-
-tests: default
- ! ./sotest 2> /dev/null | (grep -e ^[*][*][*])
- ! ./vstest 2> /dev/null | (grep -e ^[*][*][*])
- ! ./cltest 2> /dev/null | (grep -e ^[*][*][*])
-
-clean:
- -rm -f cltest.o sotest.o vstest.o framework.o cltest sotest vstest
-
-#
-# executables
-#
-
-cltest: cltest.o framework.o $(LIB_DEP)
- $(CC) $(CFLAGS) $(LDFLAGS) cltest.o framework.o $(LIBS) -o cltest
-
-sotest: sotest.o framework.o $(LIB_DEP)
- $(CC) $(CFLAGS) $(LDFLAGS) sotest.o framework.o $(LIBS) -o sotest
-
-vstest: vstest.o framework.o $(LIB_DEP)
- $(CC) $(CFLAGS) $(LDFLAGS) vstest.o framework.o $(LIBS) -o vstest
-
-#
-# objects
-#
-
-framework.o: framework.c framework.h
- $(CC) -c -I$(INCDIR) $(CFLAGS) framework.c -o framework.o
-
-cltest.o: cltest.c framework.h
- $(CC) -c -I$(INCDIR) $(CFLAGS) cltest.c -o cltest.o
-
-sotest.o: sotest.c framework.h
- $(CC) -c -I$(INCDIR) $(CFLAGS) sotest.c -o sotest.o
-
-vstest.o: vstest.c framework.h
- $(CC) -c -I$(INCDIR) $(CFLAGS) vstest.c -o vstest.o
-
diff --git a/progs/slang/README b/progs/slang/README
deleted file mode 100644
index 13a6aaad34..0000000000
--- a/progs/slang/README
+++ /dev/null
@@ -1,7 +0,0 @@
-GLSL regression tests.
-
-Type "make" to build all test apps.
-
-Type "make tests" to build and run all test apps. If any
-error is detected, a line starting with *** is output.
-
diff --git a/progs/slang/cltest.c b/progs/slang/cltest.c
deleted file mode 100644
index 2753f59f85..0000000000
--- a/progs/slang/cltest.c
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * GL_ARB_shading_language_100 test application.
- *
- * Tests correctness of emited code. Runs multiple well-formed shaders and checks if
- * they produce valid results.
- *
- * Requires specific support on the GL implementation side. A special function printMESA()
- * must be supported in the language that prints current values of generic type
- * to the appropriate shader's info log, and optionally to the screen.
- *
- * Author: Michal Krol
- */
-
-#include "framework.h"
-
-#define EPSILON 0.0001f
-
-static GLhandleARB vert = 0;
-static GLhandleARB prog = 0;
-
-static int get_line (FILE *f, char *line, int size)
-{
- if (fgets (line, size, f) == NULL)
- return 0;
- if (line[strlen (line) - 1] == '\n')
- line[strlen (line) - 1] = '\0';
- return 1;
-}
-
-struct ATTRIB
-{
- char name[32];
- GLfloat value[64][4];
- GLuint count;
-};
-
-struct ATTRIBS
-{
- struct ATTRIB attrib[32];
- GLuint count;
-};
-
-struct SHADER
-{
- char code[16000];
- GLfloat output[1000];
- GLuint count;
-};
-
-enum SHADER_LOAD_STATE
-{
- SLS_NONE,
- SLS_CODE,
- SLS_OUTPUT
-};
-
-struct PROGRAM
-{
- struct PROGRAM *next;
- char name[256];
- struct ATTRIBS attribs;
- struct SHADER vertex;
-};
-
-enum PROGRAM_LOAD_STATE
-{
- PLS_NONE,
- PLS_ATTRIB,
- PLS_VERTEX
-};
-
-static struct PROGRAM *program = NULL;
-
-static void load_test_file (const char *filename, struct PROGRAM **program)
-{
- struct PROGRAM **currprog = program;
- FILE *f;
- char line[256];
- enum PROGRAM_LOAD_STATE pls = PLS_NONE;
- enum SHADER_LOAD_STATE sls = SLS_NONE;
-
- f = fopen (filename, "r");
- if (f == NULL)
- return;
-
- while (get_line (f, line, sizeof (line))) {
- if (line[0] == '$') {
- if (strncmp (line + 1, "program", 7) == 0) {
- if (*currprog != NULL)
- currprog = &(**currprog).next;
- *currprog = (struct PROGRAM *) (malloc (sizeof (struct PROGRAM)));
- if (*currprog == NULL)
- break;
- (**currprog).next = NULL;
- strcpy ((**currprog).name, line + 9);
- (**currprog).attribs.count = 0;
- (**currprog).vertex.code[0] = '\0';
- (**currprog).vertex.count = 0;
- pls = PLS_NONE;
- }
- else if (strncmp (line + 1, "attrib", 6) == 0) {
- if (*currprog == NULL)
- break;
- strcpy ((**currprog).attribs.attrib[(**currprog).attribs.count].name, line + 8);
- (**currprog).attribs.attrib[(**currprog).attribs.count].count = 0;
- (**currprog).attribs.count++;
- pls = PLS_ATTRIB;
- }
- else if (strcmp (line + 1, "vertex") == 0) {
- if (*currprog == NULL)
- break;
- pls = PLS_VERTEX;
- sls = SLS_NONE;
- }
- else if (strcmp (line + 1, "code") == 0) {
- if (*currprog == NULL || pls != PLS_VERTEX)
- break;
- sls = SLS_CODE;
- }
- else if (strcmp (line + 1, "output") == 0) {
- if (*currprog == NULL || pls != PLS_VERTEX)
- break;
- sls = SLS_OUTPUT;
- }
- }
- else {
- if ((*currprog == NULL || pls == PLS_NONE || sls == SLS_NONE) && line[0] != '\0')
- break;
- if (*currprog != NULL && pls == PLS_VERTEX) {
- if (sls == SLS_CODE) {
- strcat ((**currprog).vertex.code, line);
- strcat ((**currprog).vertex.code, "\n");
- }
- else if (sls == SLS_OUTPUT && line[0] != '\0') {
- if (strcmp (line, "true") == 0)
- (**currprog).vertex.output[(**currprog).vertex.count] = 1.0f;
- else if (strcmp (line, "false") == 0)
- (**currprog).vertex.output[(**currprog).vertex.count] = 0.0f;
- else
- sscanf (line, "%f", &(**currprog).vertex.output[(**currprog).vertex.count]);
- (**currprog).vertex.count++;
- }
- }
- else if (*currprog != NULL && pls == PLS_ATTRIB && line[0] != '\0') {
- struct ATTRIB *att = &(**currprog).attribs.attrib[(**currprog).attribs.count - 1];
- GLfloat *vec = att->value[att->count];
- sscanf (line, "%f %f %f %f", &vec[0], &vec[1], &vec[2], &vec[3]);
- att->count++;
- }
- }
- }
-
- fclose (f);
-}
-
-void InitScene (void)
-{
- prog = glCreateProgramObjectARB ();
- vert = glCreateShaderObjectARB (GL_VERTEX_SHADER_ARB);
- glAttachObjectARB (prog, vert);
- glDeleteObjectARB (vert);
- load_test_file ("cltest.txt", &program);
-}
-
-void RenderScene (void)
-{
- struct PROGRAM *nextprogram;
- char *code;
- GLint info_length, length;
- char output[65000], *p;
- GLuint i;
-
- if (program == NULL)
- exit (0);
-
- code = program->vertex.code;
- glShaderSourceARB (vert, 1, (const GLcharARB **) (&code), NULL);
- glCompileShaderARB (vert);
- CheckObjectStatus (vert);
-
- for (i = 0; i < program->attribs.count; i++) {
- const char *name = program->attribs.attrib[i].name;
- if (strcmp (name, "gl_Vertex") != 0)
- glBindAttribLocationARB (prog, i, name);
- }
-
- glLinkProgramARB (prog);
- CheckObjectStatus (prog);
- glUseProgramObjectARB (prog);
-
- printf ("\n--- %s\n", program->name);
-
- glGetObjectParameterivARB (vert, GL_OBJECT_INFO_LOG_LENGTH_ARB, &info_length);
-
- glBegin (GL_POINTS);
- if (program->attribs.count == 0) {
- glVertex2f (0.0f, 0.0f);
- }
- else {
- for (i = 0; i < program->attribs.attrib[0].count; i++) {
- GLuint j;
- for (j = 0; j < program->attribs.count; j++) {
- GLuint n = (j + 1) % program->attribs.count;
- GLfloat *vec = program->attribs.attrib[n].value[i];
- const char *name = program->attribs.attrib[n].name;
- if (strcmp (name, "gl_Vertex") == 0)
- glVertex4fv (vec);
- else
- glVertexAttrib4fvARB (n, vec);
- }
- }
- }
- glEnd ();
- glFlush ();
-
- glGetInfoLogARB (vert, sizeof (output), &length, output);
- p = output + info_length - 1;
- for (i = 0; i < program->vertex.count; i++) {
- GLfloat value;
- if (p == NULL) {
- printf ("*** %s\n", "I/O error");
- break;
- }
- if (strncmp (p, "true", 4) == 0)
- value = 1.0f;
- else if (strncmp (p, "false", 5) == 0)
- value = 0.0f;
- else if (sscanf (p, "%f", &value) != 1) {
- printf ("*** %s\n", "I/O error");
- break;
- }
- if (fabs (value - program->vertex.output[i]) > EPSILON) {
- printf ("*** Values are different, is %f, should be %f\n", value,
- program->vertex.output[i]);
- }
- p = strchr (p, '\n');
- if (p != NULL)
- p++;
- }
- if (*p != '\0')
- printf ("*** %s\n", "I/O error");
-
- nextprogram = program->next;
- free (program);
- program = nextprogram;
-}
-
-int main (int argc, char *argv[])
-{
- InitFramework (&argc, argv);
- return 0;
-}
-
diff --git a/progs/slang/cltest.txt b/progs/slang/cltest.txt
deleted file mode 100644
index 97cc177c9f..0000000000
--- a/progs/slang/cltest.txt
+++ /dev/null
@@ -1,1615 +0,0 @@
-$ /*
-$ Shader test script.
-$
-$ Author: Michal Krol
-$
-$ Comment line starts with dollar sign and white space.
-$
-$ $program <name> starts a new test program section called <name>. Contains all other sections.
-$
-$ $attrib <name> starts vertex data input section for attrib called <name>. Each line consists of
-$ four values that form single vertex attrib.
-$
-$ $vertex starts vertex shader section. Contains $code and &output sections.
-$
-$ $code starts source code section. All text in this section gets compiled into appropriate
-$ shader object.
-$
-$ $output starts shader execution results section. These are compared, value-by-value,
-$ with results of executing printMESA() functions within a shader.
-$ */
-
-
-$ /*
-$ --------------------------------------------------------------------------------------------------
-$ Test printMESA() function.
-$ */
-
-$program PRINT TEST
-
-$vertex
-
-$code
-
-#version 110
-
-#extension MESA_shader_debug: require
-
-void main () {
- gl_Position = gl_ModelViewMatrix * gl_Vertex;
- gl_FrontColor = vec4 (1.0);
-
- printMESA (11.1);
- printMESA (111);
- printMESA (true);
-
- printMESA (vec2 (22.1, 22.2));
- printMESA (vec3 (33.1, 33.2, 33.3));
- printMESA (vec4 (44.1, 44.2, 44.3, 44.4));
-
- printMESA (ivec2 (221, 222));
- printMESA (ivec3 (331, 332, 333));
- printMESA (ivec4 (441, 442, 443, 444));
-
- printMESA (bvec2 (false, true));
- printMESA (bvec3 (true, true, false));
- printMESA (bvec4 (true, false, true, false));
-
- printMESA (mat2 (55.11, 55.12, 55.21, 55.22));
- printMESA (mat3 (66.11, 66.12, 66.13,
- 66.21, 66.22, 66.23,
- 66.31, 66.32, 66.33));
- printMESA (mat4 (77.11, 77.12, 77.13, 77.14,
- 77.21, 77.22, 77.23, 77.24,
- 77.31, 77.32, 77.33, 77.34,
- 77.41, 77.42, 77.43, 77.44));
-}
-
-$output
-
-11.1
-111
-true
-
-22.1
-22.2
-33.1
-33.2
-33.3
-44.1
-44.2
-44.3
-44.4
-
-221
-222
-331
-332
-333
-441
-442
-443
-444
-
-false
-true
-true
-true
-false
-true
-false
-true
-false
-
-55.11
-55.12
-55.21
-55.22
-
-66.11
-66.12
-66.13
-66.21
-66.22
-66.23
-66.31
-66.32
-66.33
-
-77.11
-77.12
-77.13
-77.14
-77.21
-77.22
-77.23
-77.24
-77.31
-77.32
-77.33
-77.34
-77.41
-77.42
-77.43
-77.44
-
-
-$ /*
-$ --------------------------------------------------------------------------------------------------
-$ Test type casting.
-$ */
-
-$program TYPE CAST TEST
-
-$attrib gl_Vertex
-0.0 0.0 0.0 1.0
-
-$attrib _Zero
-0.0 0.0 0.0 0.0
-
-$attrib _One
-1.1 0.0 0.0 0.0
-
-$attrib _Two
-2.2 0.0 0.0 0.0
-
-$attrib _MinusThree
--3.3 0.0 0.0 0.0
-
-$vertex
-
-$code
-
-#version 110
-
-#extension MESA_shader_debug: require
-
-attribute float _Zero;
-attribute float _One;
-attribute float _Two;
-attribute float _MinusThree;
-
-void main () {
- gl_Position = gl_ModelViewMatrix * gl_Vertex;
- gl_FrontColor = vec4 (1.0);
-
- printMESA (_Zero);
- printMESA (_One);
- printMESA (_Two);
- printMESA (_MinusThree);
-
- printMESA (float (_Zero));
- printMESA (float (_One));
- printMESA (float (_Two));
- printMESA (float (_MinusThree));
- printMESA (float (45.99));
- printMESA (float (-6.17));
-
- printMESA (bool (_Zero));
- printMESA (bool (_One));
- printMESA (bool (_Two));
- printMESA (bool (_MinusThree));
- printMESA (bool (45.99));
- printMESA (bool (-6.17));
- printMESA (bool (0.0001));
- printMESA (bool (0.0));
-
- printMESA (int (_Zero));
- printMESA (int (_One));
- printMESA (int (_Two));
- printMESA (int (_MinusThree));
- printMESA (int (45.99));
- printMESA (int (45.22));
- printMESA (int (-6.17));
- printMESA (int (-6.87));
-}
-
-$output
-
-0.0
-1.1
-2.2
--3.3
-
-0.0
-1.1
-2.2
--3.3
-45.99
--6.17
-
-false
-true
-true
-true
-true
-true
-true
-false
-
-0
-1
-2
--3
-45
-45
--6
--6
-
-$ /*
-$ --------------------------------------------------------------------------------------------------
-$ Test vector swizzles.
-$ */
-
-$program SWIZZLE TEST
-
-$attrib gl_Vertex
-0.0 0.0 0.0 1.0
-
-$attrib _One
-1.1 1.2 1.3 1.4
-
-$attrib _Two
-2.1 2.2 2.3 2.4
-
-$vertex
-
-$code
-
-#version 110
-
-#extension MESA_shader_debug: require
-
-attribute vec4 _One;
-attribute vec4 _Two;
-
-void assign5678 (out vec4 v)
-{
- v.x = 5.5;
- v.y = 6.6;
- v.z = 7.7;
- v.w = 8.8;
-}
-
-void main () {
- gl_Position = gl_ModelViewMatrix * gl_Vertex;
- gl_FrontColor = vec4 (1.0);
-
- printMESA (_One);
- printMESA (_Two);
-
- printMESA (_One.x);
- printMESA (_One.y);
- printMESA (_One.z);
- printMESA (_One.w);
-
- printMESA (_Two.xy);
- printMESA (_Two.yx);
- printMESA (_Two.xw);
- printMESA (_Two.wx);
- printMESA (_Two.yz);
- printMESA (_Two.zy);
- printMESA (_Two.xz);
- printMESA (_Two.zx);
- printMESA (_Two.zw);
- printMESA (_Two.wz);
-
- printMESA (_One.xyz);
- printMESA (_One.yzx);
- printMESA (_One.zxy);
- printMESA (_One.xzy);
- printMESA (_One.yzw);
- printMESA (_One.zwx);
-
- printMESA (_Two.xyzw);
- printMESA (_Two.yzwx);
- printMESA (_Two.wzyx);
- printMESA (_Two.zwyx);
-
- printMESA (_One.xx);
- printMESA (_One.zz);
- printMESA (_One.ww);
-
- printMESA (_Two.xxx);
- printMESA (_Two.yyy);
- printMESA (_Two.www);
-
- printMESA (_One.xxxx);
- printMESA (_One.zzzz);
-
- printMESA (_Two.xxyy);
- printMESA (_Two.wwxx);
- printMESA (_Two.zxxw);
-
- vec4 v;
-
- v.zxwy = vec4 (5.5, 6.6, 7.7, 8.8);
- printMESA (v);
-
- assign5678 (v.ywxz);
- printMESA (v);
-}
-
-$output
-
-1.1
-1.2
-1.3
-1.4
-2.1
-2.2
-2.3
-2.4
-
-1.1
-1.2
-1.3
-1.4
-
-2.1
-2.2
-2.2
-2.1
-2.1
-2.4
-2.4
-2.1
-2.2
-2.3
-2.3
-2.2
-2.1
-2.3
-2.3
-2.1
-2.3
-2.4
-2.4
-2.3
-
-1.1
-1.2
-1.3
-1.2
-1.3
-1.1
-1.3
-1.1
-1.2
-1.1
-1.3
-1.2
-1.2
-1.3
-1.4
-1.3
-1.4
-1.1
-
-2.1
-2.2
-2.3
-2.4
-2.2
-2.3
-2.4
-2.1
-2.4
-2.3
-2.2
-2.1
-2.3
-2.4
-2.2
-2.1
-
-1.1
-1.1
-1.3
-1.3
-1.4
-1.4
-
-2.1
-2.1
-2.1
-2.2
-2.2
-2.2
-2.4
-2.4
-2.4
-
-1.1
-1.1
-1.1
-1.1
-1.3
-1.3
-1.3
-1.3
-
-2.1
-2.1
-2.2
-2.2
-2.4
-2.4
-2.1
-2.1
-2.3
-2.1
-2.1
-2.4
-
-6.6
-8.8
-5.5
-7.7
-
-7.7
-5.5
-8.8
-6.6
-
-
-$ /*
-$ --------------------------------------------------------------------------------------------------
-$ Test relational operators.
-$ */
-
-$program RELATIONAL OPERATOR TEST
-
-$attrib gl_Vertex
-0.0 0.0 0.0 1.0
-
-$attrib _Two
-2.0 0.0 0.0 0.0
-
-$attrib _Two2
-2.0 0.0 0.0 0.0
-
-$attrib _MinusThree
--3.0 0.0 0.0 0.0
-
-$vertex
-
-$code
-
-#version 110
-
-#extension MESA_shader_debug: require
-
-attribute float _Two;
-attribute float _Two2;
-attribute float _MinusThree;
-
-struct foo
-{
- float f;
- vec4 v4;
- vec3 v3;
- mat4 m4;
- int i;
- bool b;
-};
-
-void printMESA (const in foo bar)
-{
- printMESA (bar.f);
- printMESA (bar.v4);
- printMESA (bar.v3);
- printMESA (bar.m4);
- printMESA (bar.i);
- printMESA (bar.b);
-}
-
-void main () {
- gl_Position = gl_ModelViewMatrix * gl_Vertex;
- gl_FrontColor = vec4 (1.0);
-
- int iTwo = int (_Two);
- int iTwo2 = int (_Two2);
- int iMinusThree = int (_MinusThree);
-
- printMESA (_Two <= _Two);
- printMESA (_Two <= _Two2);
- printMESA (_Two <= _MinusThree);
- printMESA (_MinusThree <= _Two);
- printMESA (iTwo <= iTwo);
- printMESA (iTwo <= iTwo2);
- printMESA (iTwo <= iMinusThree);
- printMESA (iMinusThree <= iTwo);
-
- printMESA (_Two >= _Two);
- printMESA (_Two >= _Two2);
- printMESA (_Two >= _MinusThree);
- printMESA (_MinusThree >= _Two);
- printMESA (iTwo >= iTwo);
- printMESA (iTwo >= iTwo2);
- printMESA (iTwo >= iMinusThree);
- printMESA (iMinusThree >= iTwo);
-
- printMESA (_Two < _Two);
- printMESA (_Two < _Two2);
- printMESA (_Two < _MinusThree);
- printMESA (_MinusThree < _Two);
- printMESA (iTwo < iTwo);
- printMESA (iTwo < iTwo2);
- printMESA (iTwo < iMinusThree);
- printMESA (iMinusThree < iTwo);
-
- printMESA (_Two > _Two);
- printMESA (_Two > _Two2);
- printMESA (_Two > _MinusThree);
- printMESA (_MinusThree > _Two);
- printMESA (iTwo > iTwo);
- printMESA (iTwo > iTwo2);
- printMESA (iTwo > iMinusThree);
- printMESA (iMinusThree > iTwo);
-
- printMESA (_Two == _Two);
- printMESA (_Two == _Two2);
- printMESA (_Two == _MinusThree);
- printMESA (_MinusThree == _MinusThree);
- printMESA (iTwo == iTwo);
- printMESA (iTwo == iTwo2);
- printMESA (iTwo == iMinusThree);
- printMESA (iMinusThree == iMinusThree);
-
- printMESA (_Two != _Two);
- printMESA (_Two != _Two2);
- printMESA (_Two != _MinusThree);
- printMESA (_MinusThree != _MinusThree);
- printMESA (iTwo != iTwo);
- printMESA (iTwo != iTwo2);
- printMESA (iTwo != iMinusThree);
- printMESA (iMinusThree != iMinusThree);
-
- foo foo1;
- foo1.f = 13.31;
- foo1.v4 = vec4 (44.11, 44.22, 44.33, 44.44);
- foo1.v3 = vec3 (33.11, 33.22, 33.33);
- foo1.m4 = mat4 (17.88);
- foo1.i = 666;
- foo1.b = true;
- printMESA (foo1);
-
- // make foo2 the same as foo1
- foo foo2;
- foo2.f = 13.31;
- foo2.v4 = vec4 (44.11, 44.22, 44.33, 44.44);
- foo2.v3 = vec3 (33.11, 33.22, 33.33);
- foo2.m4 = mat4 (17.88);
- foo2.i = 666;
- foo2.b = true;
-
- printMESA (foo1 == foo2);
- printMESA (foo1 != foo2);
-
- // make them a little bit different
- foo2.m4[2].y = 333.333;
- printMESA (foo2);
-
- printMESA (foo1 == foo2);
- printMESA (foo1 != foo2);
-}
-
-$output
-
-true
-true
-false
-true
-true
-true
-false
-true
-
-true
-true
-true
-false
-true
-true
-true
-false
-
-false
-false
-false
-true
-false
-false
-false
-true
-
-false
-false
-true
-false
-false
-false
-true
-false
-
-true
-true
-false
-true
-true
-true
-false
-true
-
-false
-false
-true
-false
-false
-false
-true
-false
-
-13.31
-44.11
-44.22
-44.33
-44.44
-33.11
-33.22
-33.33
-17.88
-0.0
-0.0
-0.0
-0.0
-17.88
-0.0
-0.0
-0.0
-0.0
-17.88
-0.0
-0.0
-0.0
-0.0
-17.88
-666
-true
-
-true
-false
-
-13.31
-44.11
-44.22
-44.33
-44.44
-33.11
-33.22
-33.33
-17.88
-0.0
-0.0
-0.0
-0.0
-17.88
-0.0
-0.0
-0.0
-333.333
-17.88
-0.0
-0.0
-0.0
-0.0
-17.88
-666
-true
-
-false
-true
-
-
-$ /*
-$ --------------------------------------------------------------------------------------------------
-$ Test logical operators.
-$ */
-
-$program LOGICAL OPERATOR TEST
-
-$attrib gl_Vertex
-0.0 0.0 0.0 1.0
-
-$attrib _False
-0.0 0.0 0.0 0.0
-
-$attrib _True
-1.0 0.0 0.0 0.0
-
-$attrib _False2
-0.0 0.0 0.0 0.0
-
-$attrib _True2
-1.0 0.0 0.0 0.0
-
-$vertex
-
-$code
-
-#version 110
-
-#extension MESA_shader_debug: require
-
-attribute float _False;
-attribute float _True;
-attribute float _False2;
-attribute float _True2;
-
-void main () {
- gl_Position = gl_ModelViewMatrix * gl_Vertex;
- gl_FrontColor = vec4 (1.0);
-
- printMESA (_False);
- printMESA (_True);
- printMESA (_False2);
- printMESA (_True2);
-
- bool False = bool (_False);
- bool True = bool (_True);
- bool False2 = bool (_False2);
- bool True2 = bool (_True2);
-
- //
- // It is important to test each operator with the following argument types:
- // * Both arguments are different variables, even if they have the same values.
- // False and False2 are distinct attributes, but are the same in value.
- // * Both arguments may be the same variables. This case tests possible
- // optimizations, e.g. X && X --> X.
- // * Both arguments are constant. This tests constant folding.
- //
-
- printMESA (!False);
- printMESA (!True);
- printMESA (!false);
- printMESA (!true);
-
- printMESA (False ^^ False2);
- printMESA (False ^^ True2);
- printMESA (True ^^ False2);
- printMESA (True ^^ True2);
- printMESA (False ^^ False);
- printMESA (False ^^ True);
- printMESA (True ^^ False);
- printMESA (True ^^ True);
- printMESA (false ^^ false);
- printMESA (false ^^ true);
- printMESA (true ^^ false);
- printMESA (true ^^ true);
-
- printMESA (False && False2);
- printMESA (False && True2);
- printMESA (True && False2);
- printMESA (True && True2);
- printMESA (False && False);
- printMESA (False && True);
- printMESA (True && False);
- printMESA (True && True);
- printMESA (false && false);
- printMESA (false && true);
- printMESA (true && false);
- printMESA (true && true);
-
- printMESA (False || False2);
- printMESA (False || True2);
- printMESA (True || False2);
- printMESA (True || True2);
- printMESA (False || False);
- printMESA (False || True);
- printMESA (True || False);
- printMESA (True || True);
- printMESA (false || false);
- printMESA (false || true);
- printMESA (true || false);
- printMESA (true || true);
-
- //
- // Test short-circuit evaluation of && and ||. The right expression evaluation depends
- // on the value of the left expression. If the right expression has side effects, we
- // can easily test if it happened.
- //
-
- bool x;
-
- x = false;
- printMESA (x);
- printMESA (False && (x = true));
- printMESA (x);
-
- x = false;
- printMESA (x);
- printMESA (false && (x = true));
- printMESA (x);
-
- x = true;
- printMESA (x);
- printMESA (True || (x = false));
- printMESA (x);
-
- x = true;
- printMESA (x);
- printMESA (true || (x = false));
- printMESA (x);
-}
-
-$output
-
-0.0
-1.0
-0.0
-1.0
-
-true
-false
-true
-false
-
-false
-true
-true
-false
-false
-true
-true
-false
-false
-true
-true
-false
-
-false
-false
-false
-true
-false
-false
-false
-true
-false
-false
-false
-true
-
-false
-true
-true
-true
-false
-true
-true
-true
-false
-true
-true
-true
-
-false
-false
-false
-
-false
-false
-false
-
-true
-true
-true
-
-true
-true
-true
-
-
-$ /*
-$ --------------------------------------------------------------------------------------------------
-$ Test subscript operator/array access.
-$ */
-
-$program ARRAY ACCESS TEST
-
-$attrib gl_Vertex
-0.0 0.0 0.0 1.0
-
-$attrib _Zero
-0.0 0.0 0.0 0.0
-
-$attrib _One
-1.1 0.0 0.0 0.0
-
-$attrib _Two
-2.9 0.0 0.0 0.0
-
-$attrib _Vec
-11.11 22.22 33.33 44.44
-
-$vertex
-
-$code
-
-#version 110
-
-#extension MESA_shader_debug: require
-
-attribute float _Zero;
-attribute float _One;
-attribute float _Two;
-attribute vec4 _Vec;
-
-void main () {
- gl_Position = gl_ModelViewMatrix * gl_Vertex;
- gl_FrontColor = vec4 (1.0);
-
- printMESA (_Zero);
- printMESA (_One);
- printMESA (_Two);
- printMESA (_Vec);
-
- printMESA (_Vec[0]);
- printMESA (_Vec[1]);
- printMESA (_Vec[2]);
- printMESA (_Vec[3]);
-
- printMESA (_Vec[int (_Zero)]);
- printMESA (_Vec[int (_One)]);
- printMESA (_Vec[int (_Two)]);
-}
-
-$output
-
-0.0
-1.1
-2.9
-11.11
-22.22
-33.33
-44.44
-
-11.11
-22.22
-33.33
-44.44
-
-11.11
-22.22
-33.33
-
-
-$ /*
-$ --------------------------------------------------------------------------------------------------
-$ Test pre/post-increment/decrement operators.
-$ Note: assumes relational operators being correct.
-$ */
-
-$program PRE/POST-INC/DEC OPERATOR TEST
-
-$attrib gl_Vertex
-0.0 0.0 0.0 1.0
-
-$attrib _Zero
-0.0 0.0 0.0 0.0
-
-$attrib _One
-1.1 0.0 0.0 0.0
-
-$attrib _Two4
-2.1 2.2 2.3 2.4
-
-$vertex
-
-$code
-
-#version 110
-
-#extension MESA_shader_debug: require
-
-attribute float _Zero;
-attribute float _One;
-attribute vec4 _Two4;
-
-float fZero, fOne;
-vec4 fTwo4;
-int iZero, iOne;
-ivec4 iTwo4;
-
-void reset () {
- fZero = _Zero;
- fOne = _One;
- fTwo4 = _Two4;
- iZero = int (_Zero);
- iOne = int (_One);
- iTwo4 = ivec4 (_Two4);
-}
-
-void main () {
- gl_Position = gl_ModelViewMatrix * gl_Vertex;
- gl_FrontColor = vec4 (1.0);
-
- printMESA (_Zero);
- printMESA (_One);
- printMESA (_Two4);
-
- // pre-increment
- reset ();
- printMESA (++fZero);
- printMESA (++fOne);
- printMESA (++iZero);
- printMESA (++iOne);
- printMESA (fZero);
- printMESA (fOne);
- printMESA (iZero);
- printMESA (iOne);
- printMESA (++fTwo4 == _Two4 + 1.0);
- printMESA (++iTwo4 == ivec4 (_Two4) + 1);
-
- // pre-decrement
- reset ();
- printMESA (--fZero);
- printMESA (--fOne);
- printMESA (--iZero);
- printMESA (--iOne);
- printMESA (fZero);
- printMESA (fOne);
- printMESA (iZero);
- printMESA (iOne);
- printMESA (--fTwo4 == _Two4 - 1.0);
- printMESA (--iTwo4 == ivec4 (_Two4) - 1);
-
- // post-increment
- reset ();
- printMESA (fZero++);
- printMESA (fOne++);
- printMESA (iZero++);
- printMESA (iOne++);
- printMESA (fZero);
- printMESA (fOne);
- printMESA (iZero);
- printMESA (iOne);
- printMESA (fTwo4++ == _Two4);
- printMESA (iTwo4++ == ivec4 (_Two4));
-
- // post-decrement
- reset ();
- printMESA (fZero--);
- printMESA (fOne--);
- printMESA (iZero--);
- printMESA (iOne--);
- printMESA (fZero);
- printMESA (fOne);
- printMESA (iZero);
- printMESA (iOne);
- printMESA (fTwo4-- == _Two4);
- printMESA (iTwo4-- == ivec4 (_Two4));
-}
-
-$output
-
-0.0
-1.1
-2.1
-2.2
-2.3
-2.4
-
-1.0
-2.1
-1
-2
-1.0
-2.1
-1
-2
-true
-true
-
--1.0
-0.1
--1
-0
--1.0
-0.1
--1
-0
-true
-true
-
-0.0
-1.1
-0
-1
-1.0
-2.1
-1
-2
-true
-true
-
-0.0
-1.1
-0
-1
--1.0
-0.1
--1
-0
-true
-true
-
-
-$ /*
-$ --------------------------------------------------------------------------------------------------
-$ Test arithmetical operators.
-$ */
-
-$program ARITHMETICAL OPERATOR TEST
-
-$attrib gl_Vertex
-0.0 0.0 0.0 1.0
-
-$attrib _Zero
-0.0 0.0 0.0 0.0
-
-$attrib _One
-1.1 0.0 0.0 0.0
-
-$attrib _Two4
-2.1 2.2 2.3 2.4
-
-$vertex
-
-$code
-
-#version 110
-
-#extension MESA_shader_debug: require
-
-attribute float _Zero;
-attribute float _One;
-attribute vec4 _Two4;
-
-void main () {
- gl_Position = gl_ModelViewMatrix * gl_Vertex;
- gl_FrontColor = vec4 (1.0);
-
- printMESA (_Zero);
- printMESA (_One);
- printMESA (_Two4);
-
- int iZero = int (_Zero);
- int iOne = int (_One);
- ivec4 iTwo4 = ivec4 (_Two4);
-
- printMESA (-_Zero);
- printMESA (-_One);
- printMESA (-_Two4);
- printMESA (-_Two4.z);
-
- printMESA (_Zero + 0.0);
- printMESA (_One + 0.0);
- printMESA (_Two4 + 0.0);
- printMESA (_Two4.y + 0.0);
-
- printMESA (_Zero + _Zero);
- printMESA (_Zero + _One);
- printMESA (_Zero + _Two4);
- printMESA (_One + _Zero);
- printMESA (_One + _Two4);
- printMESA (_Two4 + _Two4);
-
- printMESA (_Zero - 0.0);
- printMESA (_One - 0.0);
- printMESA (_Two4 - 0.0);
- printMESA (_Two4.y - 0.0);
-
- printMESA (_Zero - _Zero);
- printMESA (_Zero - _One);
- printMESA (_Zero - _Two4);
- printMESA (_One - _Zero);
- printMESA (_One - _Two4);
- printMESA (_Two4 - _Two4);
-
- printMESA (_Zero * 1.0);
- printMESA (_One * 1.0);
- printMESA (_Two4 * 1.0);
- printMESA (_Two4.x * 1.0);
-
- printMESA (_Zero * _Zero);
- printMESA (_Zero * _One);
- printMESA (_Zero * _Two4);
- printMESA (_One * _Zero);
- printMESA (_One * _One);
- printMESA (_One * _Two4);
- printMESA (_Two4 * _Two4);
-
- printMESA (_Zero / 1.0);
- printMESA (_One / 1.0);
- printMESA (_Two4 / 1.0);
- printMESA (_Two4.x / 1.0);
-
- printMESA (_Zero / _One);
- printMESA (_Zero / _Two4);
- printMESA (_One / _One);
- printMESA (_One / _Two4);
- printMESA (_Two4 / _Two4);
-}
-
-$output
-
-0.0
-1.1
-2.1
-2.2
-2.3
-2.4
-
-0.0
--1.1
--2.1
--2.2
--2.3
--2.4
--2.3
-
-0.0
-1.1
-2.1
-2.2
-2.3
-2.4
-2.2
-
-0.0
-1.1
-2.1
-2.2
-2.3
-2.4
-1.1
-3.2
-3.3
-3.4
-3.5
-4.2
-4.4
-4.6
-4.8
-
-0.0
-1.1
-2.1
-2.2
-2.3
-2.4
-2.2
-
-0.0
--1.1
--2.1
--2.2
--2.3
--2.4
-1.1
--1.0
--1.1
--1.2
--1.3
-0.0
-0.0
-0.0
-0.0
-
-0.0
-1.1
-2.1
-2.2
-2.3
-2.4
-2.1
-
-0.0
-0.0
-0.0
-0.0
-0.0
-0.0
-0.0
-1.21
-2.31
-2.42
-2.53
-2.64
-4.41
-4.84
-5.29
-5.76
-
-0.0
-1.1
-2.1
-2.2
-2.3
-2.4
-2.1
-
-0.0
-0.0
-0.0
-0.0
-0.0
-1.0
-0.52381
-0.5
-0.47826
-0.45833
-1.0
-1.0
-1.0
-1.0
-
-
-$ /*
-$ --------------------------------------------------------------------------------------------------
-$ Test matrix operations.
-$ Note: assumes relational operators being correct.
-$ */
-
-$program MATRIX TEST
-
-$attrib gl_Vertex
-0.0 0.0 0.0 1.0
-
-$attrib _Zero
-0.0 0.0 0.0 0.0
-
-$attrib _One
-1.0 1.0 1.0 1.0
-
-$attrib _Two
-2.0 2.0 2.0 2.0
-
-$vertex
-
-$code
-
-#version 110
-
-#extension MESA_shader_debug: require
-
-attribute vec4 _Zero;
-attribute vec4 _One;
-attribute vec4 _Two;
-
-void main () {
- gl_Position = gl_ModelViewMatrix * gl_Vertex;
- gl_FrontColor = vec4 (1.0);
-
- printMESA (_Zero);
- printMESA (_One);
- printMESA (_Two);
-
- mat4 Identity = mat4 (_One.x);
-
- printMESA (Identity == mat4 (1.0, 0.0, 0.0, 0.0,
- 0.0, 1.0, 0.0, 0.0,
- 0.0, 0.0, 1.0, 0.0,
- 0.0, 0.0, 0.0, 1.0));
- printMESA (Identity * _Two == _Two);
-
- mat4 Matrix = mat4 (1.1, 1.2, 1.3, 1.4,
- 2.1, 2.2, 2.3, 2.4,
- 3.1, 3.2, 3.3, 3.4,
- 4.1, 4.2, 4.3, 4.4);
-
- printMESA (Matrix[2].y);
- printMESA (Matrix[1]);
-}
-
-$output
-
-0.0
-0.0
-0.0
-0.0
-1.0
-1.0
-1.0
-1.0
-2.0
-2.0
-2.0
-2.0
-true
-true
-3.2
-2.1
-2.2
-2.3
-2.4
-
-
-$ /*
-$ --------------------------------------------------------------------------------------------------
-$ Test vec4 extension operations.
-$ */
-
-$program VEC4 EXTENSION OPERATIONS
-
-$attrib gl_Vertex
-0.0 0.0 0.0 1.0
-
-$attrib _One
-1.1 0.0 0.0 0.0
-
-$attrib _Two4
-2.1 2.2 2.3 2.4
-
-$attrib _Three4
-3.1 3.2 3.3 3.4
-
-$vertex
-
-$code
-
-#version 110
-
-#extension MESA_shader_debug: require
-
-attribute float _One;
-attribute vec4 _Two4;
-attribute vec4 _Three4;
-
-void main () {
- gl_Position = gl_ModelViewMatrix * gl_Vertex;
- gl_FrontColor = vec4 (1.0);
-
- printMESA (_One);
- printMESA (_Two4);
- printMESA (_Three4);
-
- printMESA (vec4 (_One));
-
- printMESA (_Two4 + _Three4);
- printMESA (_Two4 - _Three4);
- printMESA (_Two4 * _Three4);
- printMESA (_Two4 / _Three4);
-
- printMESA (_Two4 + _One);
- printMESA (_Two4 - _One);
- printMESA (_Two4 * _One);
- printMESA (_Two4 / _One);
-
- printMESA (_One + _Two4);
- printMESA (_One - _Two4);
- printMESA (_One * _Two4);
- printMESA (_One / _Two4);
-
- printMESA (-_Three4);
-
- printMESA (dot (_Two4.xyz, _Three4.xyz));
- printMESA (dot (_Two4, _Three4));
-
- printMESA (length (_Two4.xyz));
- printMESA (length (_Three4));
-
- printMESA (normalize (_Two4.xyz));
- printMESA (normalize (_Three4));
-
- vec4 tmp = _Two4;
- printMESA (tmp);
-
- printMESA (_Two4 == _Three4);
- printMESA (_Two4 != _Three4);
- printMESA (_Two4 == _Two4);
- printMESA (_Three4 != _Three4);
- printMESA (_Two4 != vec4 (_Two4.xyz, 999.0));
- printMESA (_Two4 != vec4 (999.0, _Two4.yzw));
-}
-
-$output
-
-1.1
-2.1
-2.2
-2.3
-2.4
-3.1
-3.2
-3.3
-3.4
-
-1.1
-1.1
-1.1
-1.1
-
-5.2
-5.4
-5.6
-5.8
--1.0
--1.0
--1.0
--1.0
-6.51
-7.04
-7.59
-8.16
-0.677419
-0.6875
-0.69697
-0.705882
-
-3.2
-3.3
-3.4
-3.5
-1.0
-1.1
-1.2
-1.3
-2.31
-2.42
-2.53
-2.64
-1.909091
-2.0
-2.090909
-2.181818
-
-3.2
-3.3
-3.4
-3.5
--1.0
--1.1
--1.2
--1.3
-2.31
-2.42
-2.53
-2.64
-0.52381
-0.5
-0.478261
-0.458333
-
--3.1
--3.2
--3.3
--3.4
-
-21.14
-29.3
-
-3.813135
-6.503845
-
-0.550728
-0.576953
-0.603178
-0.476641
-0.492017
-0.507392
-0.522768
-
-2.1
-2.2
-2.3
-2.4
-
-false
-true
-true
-false
-true
-true
diff --git a/progs/slang/framework.c b/progs/slang/framework.c
deleted file mode 100644
index 692cef9c8c..0000000000
--- a/progs/slang/framework.c
+++ /dev/null
@@ -1,145 +0,0 @@
-#include "framework.h"
-
-/*
- * GL_ARB_multitexture
- */
-#ifndef GL_ARB_multitexture
-PFNGLCLIENTACTIVETEXTUREARBPROC glClientActiveTextureARB;
-PFNGLMULTITEXCOORD4FVARBPROC glMultiTexCoord4fvARB;
-#endif
-
-/*
- * GL_ARB_shader_objects
- */
-PFNGLDELETEOBJECTARBPROC glDeleteObjectARB;
-PFNGLGETHANDLEARBPROC glGetHandleARB;
-PFNGLDETACHOBJECTARBPROC glDetachObjectARB;
-PFNGLCREATESHADEROBJECTARBPROC glCreateShaderObjectARB;
-PFNGLSHADERSOURCEARBPROC glShaderSourceARB;
-PFNGLCOMPILESHADERARBPROC glCompileShaderARB;
-PFNGLCREATEPROGRAMOBJECTARBPROC glCreateProgramObjectARB;
-PFNGLATTACHOBJECTARBPROC glAttachObjectARB;
-PFNGLLINKPROGRAMARBPROC glLinkProgramARB;
-PFNGLUSEPROGRAMOBJECTARBPROC glUseProgramObjectARB;
-PFNGLGETOBJECTPARAMETERIVARBPROC glGetObjectParameterivARB;
-PFNGLGETINFOLOGARBPROC glGetInfoLogARB;
-PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocationARB;
-
-/*
- * GL_ARB_vertex_shader
- */
-PFNGLVERTEXATTRIB4FVARBPROC glVertexAttrib4fvARB;
-PFNGLVERTEXATTRIBPOINTERARBPROC glVertexAttribPointerARB;
-PFNGLENABLEVERTEXATTRIBARRAYARBPROC glEnableVertexAttribArrayARB;
-PFNGLDISABLEVERTEXATTRIBARRAYARBPROC glDisableVertexAttribArrayARB;
-PFNGLBINDATTRIBLOCATIONARBPROC glBindAttribLocationARB;
-PFNGLGETATTRIBLOCATIONARBPROC glGetAttribLocationARB;
-
-/*
- * GL_EXT_fog_coord
- */
-PFNGLFOGCOORDFVEXTPROC glFogCoordfvEXT;
-PFNGLFOGCOORDPOINTEREXTPROC glFogCoordPointerEXT;
-
-/*
- * GL_EXT_secondary_color
- */
-PFNGLSECONDARYCOLOR3FVEXTPROC glSecondaryColor3fvEXT;
-PFNGLSECONDARYCOLORPOINTEREXTPROC glSecondaryColorPointerEXT;
-
-static void Display (void)
-{
- glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- RenderScene ();
- glutSwapBuffers ();
-}
-
-static void Idle (void)
-{
- glutPostRedisplay ();
-}
-
-void InitFramework (int *argc, char *argv[])
-{
- glutInit (argc, argv);
- glutInitWindowPosition (0, 0);
- glutInitWindowSize (200, 200);
- glutInitDisplayMode (GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
- glutCreateWindow (argv[0]);
-
-#ifndef GL_ARB_multitexture
- GETPROCADDR(glClientActiveTextureARB, PFNGLCLIENTACTIVETEXTUREARBPROC);
- GETPROCADDR(glMultiTexCoord4fvARB, PFNGLMULTITEXCOORD4FVARBPROC);
-#endif
-
- GETPROCADDR(glDeleteObjectARB, PFNGLDELETEOBJECTARBPROC);
- GETPROCADDR(glGetHandleARB, PFNGLGETHANDLEARBPROC);
- GETPROCADDR(glDetachObjectARB, PFNGLDETACHOBJECTARBPROC);
- GETPROCADDR(glCreateShaderObjectARB, PFNGLCREATESHADEROBJECTARBPROC);
- GETPROCADDR(glShaderSourceARB, PFNGLSHADERSOURCEARBPROC);
- GETPROCADDR(glCompileShaderARB, PFNGLCOMPILESHADERARBPROC);
- GETPROCADDR(glCreateProgramObjectARB, PFNGLCREATEPROGRAMOBJECTARBPROC);
- GETPROCADDR(glAttachObjectARB, PFNGLATTACHOBJECTARBPROC);
- GETPROCADDR(glLinkProgramARB, PFNGLLINKPROGRAMARBPROC);
- GETPROCADDR(glUseProgramObjectARB, PFNGLUSEPROGRAMOBJECTARBPROC);
- GETPROCADDR(glGetObjectParameterivARB, PFNGLGETOBJECTPARAMETERIVARBPROC);
- GETPROCADDR(glGetInfoLogARB, PFNGLGETINFOLOGARBPROC);
- GETPROCADDR(glGetUniformLocationARB, PFNGLGETUNIFORMLOCATIONARBPROC);
-
- GETPROCADDR(glVertexAttrib4fvARB, PFNGLVERTEXATTRIB4FVARBPROC);
- GETPROCADDR(glVertexAttribPointerARB, PFNGLVERTEXATTRIBPOINTERARBPROC);
- GETPROCADDR(glEnableVertexAttribArrayARB, PFNGLENABLEVERTEXATTRIBARRAYARBPROC);
- GETPROCADDR(glDisableVertexAttribArrayARB, PFNGLDISABLEVERTEXATTRIBARRAYARBPROC);
- GETPROCADDR(glBindAttribLocationARB, PFNGLBINDATTRIBLOCATIONARBPROC);
- GETPROCADDR(glGetAttribLocationARB, PFNGLGETATTRIBLOCATIONARBPROC);
-
- GETPROCADDR(glFogCoordfvEXT, PFNGLFOGCOORDFVEXTPROC);
- GETPROCADDR(glFogCoordPointerEXT, PFNGLFOGCOORDPOINTEREXTPROC);
-
- GETPROCADDR(glSecondaryColor3fvEXT, PFNGLSECONDARYCOLOR3FVEXTPROC);
- GETPROCADDR(glSecondaryColorPointerEXT, PFNGLSECONDARYCOLORPOINTEREXTPROC);
-
- printf ("VENDOR: %s\n", glGetString (GL_VENDOR));
- printf ("RENDERER: %s\n", glGetString (GL_RENDERER));
-
- InitScene ();
-
- glutDisplayFunc (Display);
- glutIdleFunc (Idle);
- glutMainLoop ();
-}
-
-GLboolean CheckObjectStatus (GLhandleARB handle)
-{
- GLint type, status, length;
- GLcharARB *infolog;
-
- glGetObjectParameterivARB (handle, GL_OBJECT_TYPE_ARB, &type);
- if (type == GL_SHADER_OBJECT_ARB)
- glGetObjectParameterivARB (handle, GL_OBJECT_COMPILE_STATUS_ARB, &status);
- else if (type == GL_PROGRAM_OBJECT_ARB)
- glGetObjectParameterivARB (handle, GL_OBJECT_LINK_STATUS_ARB, &status);
- else {
- assert (0);
- return GL_FALSE;
- }
-
- if (status)
- return GL_TRUE;
-
- printf ("\n%s FAILED. INFO LOG FOLLOWS:\n",
- type == GL_SHADER_OBJECT_ARB ? "SHADER COMPILE" : "PROGRAM LINK");
-
- glGetObjectParameterivARB (handle, GL_OBJECT_INFO_LOG_LENGTH_ARB, &length);
- infolog = (GLcharARB *) (malloc (length));
- if (infolog != NULL) {
- glGetInfoLogARB (handle, length, NULL, infolog);
- printf ("%s", infolog);
- free (infolog);
- }
-
- printf ("\n");
-
- return GL_FALSE;
-}
-
diff --git a/progs/slang/framework.h b/progs/slang/framework.h
deleted file mode 100644
index e023f7da8a..0000000000
--- a/progs/slang/framework.h
+++ /dev/null
@@ -1,82 +0,0 @@
-#ifndef _FRAMEWORK_H_
-#define _FRAMEWORK_H_
-
-#ifdef WIN32
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#endif
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-#include <math.h>
-#include <GL/gl.h>
-#include <GL/glut.h>
-#include <GL/glext.h>
-
-#ifdef WIN32
-#define GETPROCADDRESS(x) wglGetProcAddress (x)
-#else
-#define GETPROCADDRESS(x) glutGetProcAddress (x)
-#endif
-
-#define GETPROCADDR(x,T) do { x = (T) (GETPROCADDRESS(#x)); assert (x != NULL); } while (0)
-
-/*
- * GL_ARB_multitexture
- */
-#ifndef GL_ARB_multitexture
-extern PFNGLCLIENTACTIVETEXTUREARBPROC glClientActiveTextureARB;
-extern PFNGLMULTITEXCOORD4FVARBPROC glMultiTexCoord4fvARB;
-#endif
-
-/*
- * GL_ARB_shader_objects
- */
-extern PFNGLDELETEOBJECTARBPROC glDeleteObjectARB;
-extern PFNGLGETHANDLEARBPROC glGetHandleARB;
-extern PFNGLDETACHOBJECTARBPROC glDetachObjectARB;
-extern PFNGLCREATESHADEROBJECTARBPROC glCreateShaderObjectARB;
-extern PFNGLSHADERSOURCEARBPROC glShaderSourceARB;
-extern PFNGLCOMPILESHADERARBPROC glCompileShaderARB;
-extern PFNGLCREATEPROGRAMOBJECTARBPROC glCreateProgramObjectARB;
-extern PFNGLATTACHOBJECTARBPROC glAttachObjectARB;
-extern PFNGLLINKPROGRAMARBPROC glLinkProgramARB;
-extern PFNGLUSEPROGRAMOBJECTARBPROC glUseProgramObjectARB;
-extern PFNGLGETOBJECTPARAMETERIVARBPROC glGetObjectParameterivARB;
-extern PFNGLGETINFOLOGARBPROC glGetInfoLogARB;
-extern PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocationARB;
-/*static PFNGLUNIFORM4FVARBPROC glUniform4fvARB = NULL;*/
-
-/*
- * GL_ARB_vertex_shader
- */
-extern PFNGLVERTEXATTRIB4FVARBPROC glVertexAttrib4fvARB;
-extern PFNGLVERTEXATTRIBPOINTERARBPROC glVertexAttribPointerARB;
-extern PFNGLENABLEVERTEXATTRIBARRAYARBPROC glEnableVertexAttribArrayARB;
-extern PFNGLDISABLEVERTEXATTRIBARRAYARBPROC glDisableVertexAttribArrayARB;
-extern PFNGLBINDATTRIBLOCATIONARBPROC glBindAttribLocationARB;
-extern PFNGLGETATTRIBLOCATIONARBPROC glGetAttribLocationARB;
-
-/*
- * GL_EXT_fog_coord
- */
-extern PFNGLFOGCOORDFVEXTPROC glFogCoordfvEXT;
-extern PFNGLFOGCOORDPOINTEREXTPROC glFogCoordPointerEXT;
-
-/*
- * GL_EXT_secondary_color
- */
-extern PFNGLSECONDARYCOLOR3FVEXTPROC glSecondaryColor3fvEXT;
-extern PFNGLSECONDARYCOLORPOINTEREXTPROC glSecondaryColorPointerEXT;
-
-extern void InitFramework (int *argc, char *argv[]);
-
-extern void InitScene (void);
-extern void RenderScene (void);
-
-extern GLboolean CheckObjectStatus (GLhandleARB);
-
-#endif
-
diff --git a/progs/slang/sotest.c b/progs/slang/sotest.c
deleted file mode 100644
index 4bd3bc23c9..0000000000
--- a/progs/slang/sotest.c
+++ /dev/null
@@ -1,439 +0,0 @@
-/*
- * GL_ARB_shader_objects & GL_ARB_vertex_shader interface test application.
- * Neither compiler nor executor is being tested here, although some simple shader
- * compilation tests are performed.
- *
- * Perfectly valid behaviour produces output that does not have a line
- * beginning with three stars (***).
- *
- * Author: Michal Krol
- */
-
-#include "framework.h"
-
-enum TEST_TYPE
-{
- TT_GETERROR_NOERROR,
- TT_GETERROR_INVALIDVALUE,
- TT_GETERROR_INVALIDOPERATION,
- TT_PARAM1_ZERO,
- TT_PARAM1_NONZERO
-};
-
-static enum TEST_TYPE current_test;
-
-static void begintest (enum TEST_TYPE type, const char *name)
-{
- current_test = type;
- printf ("\n BEGIN TEST: %s\n", name);
- while (glGetError () != GL_NO_ERROR)
- ;
-}
-
-static void endtest1 (GLuint param1)
-{
- const char *msg = NULL;
-
- switch (current_test)
- {
- case TT_GETERROR_NOERROR:
- if (glGetError () != GL_NO_ERROR)
- msg = "glGetError () does not return GL_NO_ERROR";
- break;
- case TT_GETERROR_INVALIDVALUE:
- if (glGetError () != GL_INVALID_VALUE)
- msg = "glGetError () does not return GL_INVALID_VALUE";
- break;
- case TT_GETERROR_INVALIDOPERATION:
- if (glGetError () != GL_INVALID_OPERATION)
- msg = "glGetError () does not return GL_INVALID_OPERATION";
- break;
- case TT_PARAM1_ZERO:
- if (param1)
- msg = "The parameter is not zero";
- break;
- case TT_PARAM1_NONZERO:
- if (!param1)
- msg = "The parameter is not non-zero";
- break;
- default:
- assert (0);
- }
-
- if (msg == NULL)
- printf (" OK\n");
- else
- printf ("*** %s\n", msg);
-
- while (glGetError () != GL_NO_ERROR)
- ;
-}
-
-static void endtest ()
-{
- endtest1 (0);
-}
-
-static GLhandleARB vert = 0;
-static GLhandleARB frag = 0;
-static GLhandleARB prog = 0;
-
-static GLhandleARB find_invalid_handle ()
-{
- GLhandleARB handle;
-
- for (handle = 1; handle < 16; handle++)
- if (handle != vert && handle != frag && handle != prog)
- return handle;
- assert (0);
- return 0;
-}
-
-static const char *invsynvertsrc =
- "void main () {\n"
- " gl_Position = gl_ModelViewMatrix ! gl_Vertex;\n" /* unexpected token */
- "}\n"
-;
-
-static const char *invsemvertsrc =
- "void main () {\n"
- " gl_Position = gl_ModelviewMatrix * gl_Vertex;\n" /* undeclared identifier */
- "}\n"
-;
-
-static const char *uniforms =
- "uniform vec4 CommonUniform;\n"
-;
-
-static const char *validvertsrc =
- "uniform vec4 VertexUniform;\n"
- "attribute vec4 FirstAttrib;\n"
- "attribute vec4 SecondAttrib;\n"
- "void main () {\n"
- " gl_Position = gl_ModelViewMatrix * gl_Vertex + CommonUniform + VertexUniform\n"
- " + FirstAttrib + SecondAttrib;\n"
- "}\n"
-;
-
-static const char *invsynfragsrc =
- "void main () {\n"
- " gl_FragColor = gl_Color\n" /* missing ; */
- "}\n"
-;
-
-static const char *invsemfragsrc =
- "void main () {\n"
- " gl_FragColor = gl_FrontColor;\n" /* gl_FrontColor only in vertex shader */
- "}\n"
-;
-
-static const char *validfragsrc =
- "uniform vec4 FragmentUniform;\n"
- "void main () {\n"
- " gl_FragColor = gl_Color + CommonUniform + FragmentUniform;\n"
- "}\n"
-;
-
-void InitScene (void)
-{
- GLint params[1];
- const char *tab[2];
-
- /*
- * GL should silently ignore calls that delete object 0.
- */
- begintest (TT_GETERROR_NOERROR, "glDeleteObject(0)");
- glDeleteObjectARB (0);
- endtest ();
-
- /*
- * GL generates an error on invalid object handle.
- */
- begintest (TT_GETERROR_INVALIDVALUE, "Pass invalid non-zero object handle");
- glDeleteObjectARB (find_invalid_handle ());
- endtest ();
- glUseProgramObjectARB (find_invalid_handle ());
- endtest ();
-
- /*
- * Create object. GL should return unique non-zero values.
- */
- begintest (TT_PARAM1_NONZERO, "Create object");
- vert = glCreateShaderObjectARB (GL_VERTEX_SHADER_ARB);
- endtest1 (vert);
- frag = glCreateShaderObjectARB (GL_FRAGMENT_SHADER_ARB);
- endtest1 (frag);
- prog = glCreateProgramObjectARB ();
- endtest1 (prog);
- endtest1 (vert != frag && frag != prog && prog != vert);
-
- /*
- * Link empty program.
- */
- begintest (TT_PARAM1_NONZERO, "Link empty program");
- glLinkProgramARB (prog);
- endtest1 (CheckObjectStatus (prog));
-
- /*
- * Use empty program object. Empty program objects are valid.
- */
- begintest (TT_GETERROR_NOERROR, "Use empty program object");
- glUseProgramObjectARB (prog);
- endtest ();
-
- /*
- * Attach invalid object handles. Program object 0 should not be accepted.
- */
- begintest (TT_GETERROR_INVALIDVALUE, "Attach invalid object handle");
- glAttachObjectARB (0, find_invalid_handle ());
- endtest ();
- glAttachObjectARB (0, frag);
- endtest ();
- glAttachObjectARB (find_invalid_handle (), find_invalid_handle ());
- endtest ();
- glAttachObjectARB (find_invalid_handle (), frag);
- endtest ();
- glAttachObjectARB (prog, find_invalid_handle ());
- endtest ();
-
- /*
- * Attach valid object handles with wrong semantics.
- */
- begintest (TT_GETERROR_INVALIDOPERATION, "Attach object badly");
- glAttachObjectARB (vert, frag);
- endtest ();
- glAttachObjectARB (vert, prog);
- endtest ();
- glAttachObjectARB (prog, prog);
- endtest ();
-
- /*
- * Detach non-attached object.
- */
- begintest (TT_GETERROR_INVALIDOPERATION, "Detach non-attached object");
- glDetachObjectARB (prog, vert);
- endtest ();
- glDetachObjectARB (prog, frag);
- endtest ();
-
- /*
- * Attach shader.
- */
- begintest (TT_GETERROR_NOERROR, "Attach shader to program object");
- glAttachObjectARB (prog, vert);
- endtest ();
- glAttachObjectARB (prog, frag);
- endtest ();
-
- /*
- * Attach object twice.
- */
- begintest (TT_GETERROR_INVALIDOPERATION, "Attach object twice");
- glAttachObjectARB (prog, vert);
- endtest ();
- glAttachObjectARB (prog, frag);
- endtest ();
-
- /*
- * Detach attached object.
- */
- begintest (TT_GETERROR_NOERROR, "Detach attached object");
- glDetachObjectARB (prog, vert);
- endtest ();
- glDetachObjectARB (prog, frag);
- endtest ();
-
- /*
- * Attach shader again.
- */
- begintest (TT_GETERROR_NOERROR, "Attach shader again");
- glAttachObjectARB (prog, vert);
- endtest ();
- glAttachObjectARB (prog, frag);
- endtest ();
-
- /*
- * Delete attached object.
- */
- begintest (TT_GETERROR_NOERROR, "Delete attached object");
- glDeleteObjectARB (vert);
- endtest ();
- glDeleteObjectARB (frag);
- endtest ();
-
- /*
- * Query delete status. It should return TRUE. Object handles are still valid
- * as they are referenced by program object container.
- */
- begintest (TT_PARAM1_NONZERO, "Query delete status");
- glGetObjectParameterivARB (vert, GL_OBJECT_DELETE_STATUS_ARB, params);
- endtest1 (params[0]);
- glGetObjectParameterivARB (frag, GL_OBJECT_DELETE_STATUS_ARB, params);
- endtest1 (params[0]);
-
- /*
- * Delete already deleted attached object. The behaviour is undefined, but we
- * check for no errors. The object still exists, so the handle value is okay.
- * In other words, these calls should be silently ignored by GL.
- */
- begintest (TT_GETERROR_NOERROR, "Delete already deleted attached object");
- glDeleteObjectARB (vert);
- endtest ();
- glDeleteObjectARB (frag);
- endtest ();
-
- /*
- * Compile shader source with syntax error.
- */
- begintest (TT_PARAM1_ZERO, "Compile shader source with syntax error");
- glShaderSourceARB (vert, 1, &invsynvertsrc, NULL);
- glCompileShaderARB (vert);
- endtest1 (CheckObjectStatus (vert));
- glShaderSourceARB (frag, 1, &invsynfragsrc, NULL);
- glCompileShaderARB (frag);
- endtest1 (CheckObjectStatus (frag));
-
- /*
- * Compile shader source with semantic error.
- */
- begintest (TT_PARAM1_ZERO, "Compile shader source with semantic error");
- glShaderSourceARB (vert, 1, &invsemvertsrc, NULL);
- glCompileShaderARB (vert);
- endtest1 (CheckObjectStatus (vert));
- glShaderSourceARB (frag, 1, &invsemfragsrc, NULL);
- glCompileShaderARB (frag);
- endtest1 (CheckObjectStatus (frag));
-
- /*
- * Link ill-formed vertex-fragment program.
- */
- begintest (TT_PARAM1_ZERO, "Link ill-formed vertex-fragment program");
- glLinkProgramARB (prog);
- endtest1 (CheckObjectStatus (prog));
-
- /*
- * Use badly linked program object.
- */
- begintest (TT_GETERROR_INVALIDOPERATION, "Use badly linked program object");
- glUseProgramObjectARB (prog);
- endtest ();
-
- /*
- * Compile well-formed shader source. Check if multi-string sources can be handled.
- */
- begintest (TT_PARAM1_NONZERO, "Compile well-formed shader source");
- tab[0] = uniforms;
- tab[1] = validvertsrc;
- glShaderSourceARB (vert, 2, tab, NULL);
- glCompileShaderARB (vert);
- endtest1 (CheckObjectStatus (vert));
- tab[0] = uniforms;
- tab[1] = validfragsrc;
- glShaderSourceARB (frag, 2, tab, NULL);
- glCompileShaderARB (frag);
- endtest1 (CheckObjectStatus (frag));
-
- /*
- * Link vertex-fragment program.
- */
- begintest (TT_PARAM1_NONZERO, "Link vertex-fragment program");
- glLinkProgramARB (prog);
- endtest1 (CheckObjectStatus (prog));
-
- /*
- * Use valid linked program object.
- */
- begintest (TT_GETERROR_NOERROR, "Use linked program object");
- glUseProgramObjectARB (prog);
- endtest ();
-
- /*
- * Get current program.
- */
- begintest (TT_PARAM1_NONZERO, "Get current program");
- endtest1 (glGetHandleARB (GL_PROGRAM_OBJECT_ARB) == prog);
-
- /*
- * Use 0 program object.
- */
- begintest (TT_GETERROR_NOERROR, "Use 0 program object");
- glUseProgramObjectARB (0);
- endtest ();
-
- /*
- * Query uniform location. Uniforms with gl_ prefix cannot be queried.
- */
- begintest (TT_PARAM1_NONZERO, "Query uniform location");
- endtest1 (glGetUniformLocationARB (prog, "gl_ModelViewMatrix") == -1);
- endtest1 (glGetUniformLocationARB (prog, "UniformThatDoesNotExist") == -1);
- endtest1 (glGetUniformLocationARB (prog, "") == -1);
- endtest1 (glGetUniformLocationARB (prog, "CommonUniform") != -1);
- endtest1 (glGetUniformLocationARB (prog, "VertexUniform") != -1);
- endtest1 (glGetUniformLocationARB (prog, "FragmentUniform") != -1);
-
- /*
- * Query attrib location. Attribs with gl_ prefix cannot be queried.
- * When gl_Vertex is used, none of the generic attribs can have index 0.
- */
- begintest (TT_PARAM1_NONZERO, "Query attrib location");
- endtest1 (glGetAttribLocationARB (prog, "gl_Vertex") == -1);
- endtest1 (glGetAttribLocationARB (prog, "AttribThatDoesNotExist") == -1);
- endtest1 (glGetAttribLocationARB (prog, "") == -1);
- endtest1 (glGetAttribLocationARB (prog, "FirstAttrib") > 0);
- endtest1 (glGetAttribLocationARB (prog, "SecondAttrib") > 0);
-
- /*
- * Bind attrib locations, link and check if locations are correct.
- */
- begintest (TT_PARAM1_NONZERO, "Bind attrib location #1");
- glBindAttribLocationARB (prog, 1, "FirstAttrib");
- glBindAttribLocationARB (prog, 2, "SecondAttrib");
- glLinkProgramARB (prog);
- endtest1 (CheckObjectStatus (prog));
- endtest1 (glGetAttribLocationARB (prog, "FirstAttrib") == 1);
- endtest1 (glGetAttribLocationARB (prog, "SecondAttrib") == 2);
-
- /*
- * Bind attrib locations in different order. Link and check if locations are correct.
- */
- begintest (TT_PARAM1_NONZERO, "Bind attrib location #2");
- glBindAttribLocationARB (prog, 1, "SecondAttrib");
- glBindAttribLocationARB (prog, 2, "FirstAttrib");
- glLinkProgramARB (prog);
- endtest1 (CheckObjectStatus (prog));
- endtest1 (glGetAttribLocationARB (prog, "SecondAttrib") == 1);
- endtest1 (glGetAttribLocationARB (prog, "FirstAttrib") == 2);
-
- /*
- * Detach deleted object.
- */
- begintest (TT_GETERROR_NOERROR, "Detach deleted object");
- glDetachObjectARB (prog, vert);
- endtest ();
- glDetachObjectARB (prog, frag);
- endtest ();
-
- /*
- * Delete deleted detached object.
- */
- begintest (TT_GETERROR_INVALIDVALUE, "Delete deleted detached object");
- glDeleteObjectARB (vert);
- endtest ();
- glDeleteObjectARB (frag);
- endtest ();
-
- exit (0);
-}
-
-void RenderScene (void)
-{
- /* never reached */
- assert (0);
-}
-
-int main (int argc, char *argv[])
-{
- InitFramework (&argc, argv);
- return 0;
-}
-
diff --git a/progs/slang/vstest.c b/progs/slang/vstest.c
deleted file mode 100644
index 5108d15742..0000000000
--- a/progs/slang/vstest.c
+++ /dev/null
@@ -1,340 +0,0 @@
-/*
- * GL_ARB_vertex_shader test application. Feeds a vertex shader with attributes that
- * that have magic values and check if the values received by the shader are the same.
- *
- * Requires specific support on the GL implementation side. A special function printMESA()
- * must be supported in the language that prints variable's current value of generic type
- * to the appropriate shader's info log, and optionally to the screen.
- *
- * Perfectly valid behaviour produces output that does not have a line
- * beginning with three stars (***).
- *
- * Author: Michal Krol
- */
-
-#include "framework.h"
-
-#define EPSILON 0.0001f
-
-static GLhandleARB vert = 0;
-static GLhandleARB prog = 0;
-
-enum SUBMIT_MODE
-{
- SM_IM,
- SM_VA,
- SM_IM_DL,
- SM_VA_DL,
- SM_MAX
-};
-
-static enum SUBMIT_MODE submit_method = SM_IM;
-
-#define C 0
-#define S 1
-#define N 2
-#define V 3
-#define T 4
-#define F 5
-#define A 6
-
-struct ATTRIB_DATA
-{
- const char *name;
- GLuint dispatch;
- GLint index;
- GLint bind;
- GLuint size;
- GLfloat data[4];
-};
-
-static struct ATTRIB_DATA attribs[] = {
- { "gl_Color", C, -1, -1, 4, { 4.2f, 0.56f, -2.1f, 0.29f } },
- { "gl_SecondaryColor", S, -1, -1, 4, { 0.38f, 2.0f, 0.99f, 1.0f } },
- { "gl_Normal", N, -1, -1, 3, { 54.0f, 77.0f, 1.15f, 0.0f } },
- { "gl_MultiTexCoord0", T, 0, -1, 4, { 11.1f, 11.2f, 11.3f, 11.4f } },
- { "gl_MultiTexCoord1", T, 1, -1, 4, { 22.1f, 22.2f, 22.3f, 22.4f } },
- { "gl_MultiTexCoord2", T, 2, -1, 4, { 33.1f, 33.2f, 33.3f, 33.4f } },
- { "gl_MultiTexCoord3", T, 3, -1, 4, { 44.1f, 44.2f, 44.3f, 44.4f } },
- { "gl_MultiTexCoord4", T, 4, -1, 4, { 55.1f, 55.2f, 55.3f, 55.4f } },
- { "gl_MultiTexCoord5", T, 5, -1, 4, { 66.1f, 66.2f, 66.3f, 66.4f } },
- { "gl_MultiTexCoord6", T, 6, -1, 4, { 77.1f, 77.2f, 77.3f, 77.4f } },
- { "gl_MultiTexCoord7", T, 7, -1, 4, { 88.1f, 88.2f, 88.3f, 88.4f } },
- { "gl_FogCoord", F, -1, -1, 1, { 0.63f, 0.0f, 0.0f, 0.0f } },
- { "Attribute1", A, 1, 1, 4, { 1.11f, 1.22f, 1.33f, 1.44f } },
- { "Attribute2", A, 2, 2, 4, { 2.11f, 2.22f, 2.33f, 2.44f } },
- { "Attribute3", A, 3, 3, 4, { 3.11f, 3.22f, 3.33f, 3.44f } },
- { "Attribute4", A, 4, 4, 1, { 4.11f, 0.0f, 0.0f, 0.0f } },
- { "Attribute5", A, 5, 5, 2, { 5.11f, 5.22f, 0.0f, 0.0f } },
- { "Attribute6", A, 6, 6, 3, { 6.11f, 6.22f, 6.33f, 0.0f } },
- { "Attribute7", A, 7, 7, 2, { 7.11f, 7.22f, 0.0f, 0.0f } },
- { "Attribute7", A, 8, -1, 2, { 8.11f, 8.22f, 0.0f, 0.0f } },
- { "Attribute9", A, 9, 9, 3, { 9.11f, 9.22f, 9.33f, 0.0f } },
- { "Attribute9", A, 10, -1, 3, { 10.11f, 10.22f, 10.33f, 0.0f } },
- { "Attribute9", A, 11, -1, 3, { 11.11f, 11.22f, 11.33f, 0.0f } },
- { "Attribute12", A, 12, 12, 4, { 12.11f, 12.22f, 12.33f, 12.44f } },
- { "Attribute12", A, 13, -1, 4, { 13.11f, 13.22f, 13.33f, 13.44f } },
- { "Attribute12", A, 14, -1, 4, { 14.11f, 14.22f, 14.33f, 14.44f } },
- { "Attribute12", A, 15, -1, 4, { 15.11f, 15.22f, 15.33f, 15.44f } },
- { "gl_Vertex", V, 16, -1, 4, { 0.25f, -0.14f, 0.01f, 1.0f } }
-};
-
-static void im_render ()
-{
- GLint i;
-
- glBegin (GL_POINTS);
- for (i = 0; i < sizeof (attribs) / sizeof (*attribs); i++) {
- struct ATTRIB_DATA *att = &attribs[i];
- switch (att->dispatch)
- {
- case C:
- glColor4fv (att->data);
- break;
- case S:
- glSecondaryColor3fvEXT (att->data);
- break;
- case N:
- glNormal3fv (att->data);
- break;
- case V:
- glVertex4fv (att->data);
- break;
- case T:
- assert (att->index >= 0 && att->index < 8);
- glMultiTexCoord4fvARB (GL_TEXTURE0_ARB + att->index, att->data);
- break;
- case F:
- glFogCoordfvEXT (att->data);
- break;
- case A:
- assert (att->index > 0 && att->index < 16);
- glVertexAttrib4fvARB (att->index, att->data);
- break;
- default:
- assert (0);
- }
- }
- glEnd ();
-}
-
-static void va_render ()
-{
- GLint i;
-
- for (i = 0; i < sizeof (attribs) / sizeof (*attribs); i++) {
- struct ATTRIB_DATA *att = &attribs[i];
- switch (att->dispatch)
- {
- case C:
- glColorPointer (4, GL_FLOAT, 0, att->data);
- glEnable (GL_COLOR_ARRAY);
- break;
- case S:
- glSecondaryColorPointerEXT (4, GL_FLOAT, 0, att->data);
- glEnable (GL_SECONDARY_COLOR_ARRAY_EXT);
- break;
- case N:
- glNormalPointer (GL_FLOAT, 0, att->data);
- glEnable (GL_NORMAL_ARRAY);
- break;
- case V:
- glVertexPointer (4, GL_FLOAT, 0, att->data);
- glEnable (GL_VERTEX_ARRAY);
- break;
- case T:
- assert (att->index >= 0 && att->index < 8);
- glClientActiveTextureARB (GL_TEXTURE0_ARB + att->index);
- glTexCoordPointer (4, GL_FLOAT, 0, att->data);
- glEnable (GL_TEXTURE_COORD_ARRAY);
- break;
- case F:
- glFogCoordPointerEXT (GL_FLOAT, 0, att->data);
- glEnable (GL_FOG_COORDINATE_ARRAY_EXT);
- break;
- case A:
- assert (att->index > 0 && att->index < 16);
- glVertexAttribPointerARB (att->index, 4, GL_FLOAT, GL_FALSE, 0, att->data);
- glEnableVertexAttribArrayARB (att->index);
- break;
- default:
- assert (0);
- }
- }
-
- glDrawArrays (GL_POINTS, 0, 1);
-
- for (i = 0; i < sizeof (attribs) / sizeof (*attribs); i++) {
- struct ATTRIB_DATA *att = &attribs[i];
- switch (att->dispatch)
- {
- case C:
- glDisable (GL_COLOR_ARRAY);
- break;
- case S:
- glDisable (GL_SECONDARY_COLOR_ARRAY_EXT);
- break;
- case N:
- glDisable (GL_NORMAL_ARRAY);
- break;
- case V:
- glDisable (GL_VERTEX_ARRAY);
- break;
- case T:
- glClientActiveTextureARB (GL_TEXTURE0_ARB + att->index);
- glDisable (GL_TEXTURE_COORD_ARRAY);
- break;
- case F:
- glDisable (GL_FOG_COORDINATE_ARRAY_EXT);
- break;
- case A:
- glDisableVertexAttribArrayARB (att->index);
- break;
- default:
- assert (0);
- }
- }
-}
-
-static void dl_start ()
-{
- glNewList (GL_COMPILE, 1);
-}
-
-static void dl_end ()
-{
- glEndList ();
- glCallList (1);
-}
-
-static void load_test_file (const char *filename)
-{
- FILE *f;
- GLint size;
- char *code;
- GLint i;
-
- f = fopen (filename, "r");
- if (f == NULL)
- return;
-
- fseek (f, 0, SEEK_END);
- size = ftell (f);
- fseek (f, 0, SEEK_SET);
-
- code = (char *) (malloc (size));
- if (code == NULL) {
- fclose (f);
- return;
- }
- size = fread (code, 1, size, f);
- fclose (f);
-
- glShaderSourceARB (vert, 1, (const GLcharARB **) (&code), &size);
- glCompileShaderARB (vert);
- if (!CheckObjectStatus (vert))
- exit (0);
-
- for (i = 0; i < sizeof (attribs) / sizeof (*attribs); i++)
- if (attribs[i].dispatch == A && attribs[i].bind != -1)
- glBindAttribLocationARB (prog, attribs[i].bind, attribs[i].name);
-}
-
-void InitScene (void)
-{
- prog = glCreateProgramObjectARB ();
- vert = glCreateShaderObjectARB (GL_VERTEX_SHADER_ARB);
- glAttachObjectARB (prog, vert);
- glDeleteObjectARB (vert);
- load_test_file ("vstest.txt");
- glLinkProgramARB (prog);
- if (!CheckObjectStatus (prog))
- exit (0);
- glUseProgramObjectARB (prog);
-}
-
-void RenderScene (void)
-{
- GLint info_length, length;
- char output[65000], *p;
- GLint i;
-
- if (submit_method == SM_MAX)
- exit (0);
-
- /*
- * Get the current size of the info log. Any text output produced by executed
- * shader will be appended to the end of log.
- */
- glGetObjectParameterivARB (vert, GL_OBJECT_INFO_LOG_LENGTH_ARB, &info_length);
-
- switch (submit_method)
- {
- case SM_IM:
- printf ("\n--- TESTING IMMEDIATE MODE\n");
- im_render ();
- break;
- case SM_VA:
- printf ("\n--- TESTING VERTEX ARRAY MODE\n");
- va_render ();
- break;
- case SM_IM_DL:
- printf ("\n--- TESTING IMMEDIATE + DISPLAY LIST MODE\n");
- dl_start ();
- im_render ();
- dl_end ();
- break;
- case SM_VA_DL:
- printf ("\n--- TESTING VERTEX ARRAY + DISPLAY LIST MODE\n");
- dl_start ();
- va_render ();
- dl_end ();
- break;
- default:
- assert (0);
- }
-
- glFlush ();
-
- /*
- * Get the info log and set the pointer to the beginning of the output.
- */
- glGetInfoLogARB (vert, sizeof (output), &length, output);
- p = output + info_length - 1;
-
- for (i = 0; i < sizeof (attribs) / sizeof (*attribs); i++) {
- GLuint j;
- for (j = 0; j < attribs[i].size; j++) {
- GLfloat value;
- if (p == NULL) {
- printf ("*** %s\n", "I/O error");
- break;
- }
- if (strncmp (p, "true", 4) == 0)
- value = 1.0f;
- else if (strncmp (p, "false", 5) == 0)
- value = 0.0f;
- else if (sscanf (p, "%f", &value) != 1) {
- printf ("*** %s\n", "I/O error");
- p = NULL;
- break;
- }
- if (fabs (value - attribs[i].data[j]) > EPSILON)
- printf ("*** %s, is %f, should be %f\n", "Values are different", value, attribs[i].data[j]);
- p = strchr (p, '\n');
- if (p != NULL)
- p++;
- }
- if (p == NULL)
- break;
- }
-
- submit_method++;
-}
-
-int main (int argc, char *argv[])
-{
- InitFramework (&argc, argv);
- return 0;
-}
-
diff --git a/progs/slang/vstest.txt b/progs/slang/vstest.txt
deleted file mode 100644
index 7f51d0bc81..0000000000
--- a/progs/slang/vstest.txt
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Vertex shader test.
- * Uses all conventional attributes and 15 generic attributes to print
- * their values, using printMESA() extension function, to the debugger
- * to compare them with the actual passed-in values.
- * Use different types for generic attributes to check matrix handling.
- *
- * Author: Michal Krol
- */
-
-#version 110
-
-#extension MESA_shader_debug: require
-
-attribute vec4 Attribute1;
-attribute vec4 Attribute2;
-attribute vec4 Attribute3;
-attribute float Attribute4;
-attribute vec2 Attribute5;
-attribute vec3 Attribute6;
-attribute mat2 Attribute7;
-attribute mat3 Attribute9;
-attribute mat4 Attribute12;
-
-void main ()
-{
- //
- // Do some legal stuff.
- //
- gl_Position = gl_ModelViewMatrix * gl_Vertex;
- gl_FrontColor = vec4 (1.0);
-
- //
- // Conventional attributes - except for gl_Vertex.
- //
- printMESA (gl_Color);
- printMESA (gl_SecondaryColor);
- printMESA (gl_Normal);
- printMESA (gl_MultiTexCoord0);
- printMESA (gl_MultiTexCoord1);
- printMESA (gl_MultiTexCoord2);
- printMESA (gl_MultiTexCoord3);
- printMESA (gl_MultiTexCoord4);
- printMESA (gl_MultiTexCoord5);
- printMESA (gl_MultiTexCoord6);
- printMESA (gl_MultiTexCoord7);
- printMESA (gl_FogCoord);
-
- //
- // Generic attributes - attrib with index 0 is not used because it would
- // alias with gl_Vertex, which is not allowed.
- //
- printMESA (Attribute1);
- printMESA (Attribute2);
- printMESA (Attribute3);
- printMESA (Attribute4);
- printMESA (Attribute5);
- printMESA (Attribute6);
- printMESA (Attribute7);
- printMESA (Attribute9);
- printMESA (Attribute12);
-
- //
- // Vertex position goes last.
- //
- printMESA (gl_Vertex);
-}
-
diff --git a/progs/slang/windows/vc60/cltest.dsp b/progs/slang/windows/vc60/cltest.dsp
deleted file mode 100644
index 4c0c2e26b4..0000000000
--- a/progs/slang/windows/vc60/cltest.dsp
+++ /dev/null
@@ -1,94 +0,0 @@
-# Microsoft Developer Studio Project File - Name="cltest" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=cltest - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "cltest.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "cltest.mak" CFG="cltest - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "cltest - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "cltest - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "cltest - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "cltest_release"
-# PROP Intermediate_Dir "cltest_release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x415 /d "NDEBUG"
-# ADD RSC /l 0x415 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "cltest - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "cltest_debug"
-# PROP Intermediate_Dir "cltest_debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x415 /d "_DEBUG"
-# ADD RSC /l 0x415 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "cltest - Win32 Release"
-# Name "cltest - Win32 Debug"
-# Begin Source File
-
-SOURCE=..\..\cltest.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\cltest.txt
-# End Source File
-# End Target
-# End Project
diff --git a/progs/slang/windows/vc60/framework.dsp b/progs/slang/windows/vc60/framework.dsp
deleted file mode 100644
index 76ed7d388c..0000000000
--- a/progs/slang/windows/vc60/framework.dsp
+++ /dev/null
@@ -1,92 +0,0 @@
-# Microsoft Developer Studio Project File - Name="framework" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=framework - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "framework.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "framework.mak" CFG="framework - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "framework - Win32 Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "framework - Win32 Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "framework - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "framework_release"
-# PROP Intermediate_Dir "framework_release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD BASE RSC /l 0x415 /d "NDEBUG"
-# ADD RSC /l 0x415 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF "$(CFG)" == "framework - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "framework_debug"
-# PROP Intermediate_Dir "framework_debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x415 /d "_DEBUG"
-# ADD RSC /l 0x415 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ENDIF
-
-# Begin Target
-
-# Name "framework - Win32 Release"
-# Name "framework - Win32 Debug"
-# Begin Source File
-
-SOURCE=..\..\framework.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\framework.h
-# End Source File
-# End Target
-# End Project
diff --git a/progs/slang/windows/vc60/slang.dsw b/progs/slang/windows/vc60/slang.dsw
deleted file mode 100644
index 60536c1b0d..0000000000
--- a/progs/slang/windows/vc60/slang.dsw
+++ /dev/null
@@ -1,74 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "cltest"=".\cltest.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name framework
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "framework"=".\framework.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "sotest"=".\sotest.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name framework
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "vstest"=".\vstest.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name framework
- End Project Dependency
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/progs/slang/windows/vc60/sotest.dsp b/progs/slang/windows/vc60/sotest.dsp
deleted file mode 100644
index 105924943b..0000000000
--- a/progs/slang/windows/vc60/sotest.dsp
+++ /dev/null
@@ -1,90 +0,0 @@
-# Microsoft Developer Studio Project File - Name="sotest" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=sotest - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "sotest.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "sotest.mak" CFG="sotest - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "sotest - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "sotest - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "sotest - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "sotest_release"
-# PROP Intermediate_Dir "sotest_release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x415 /d "NDEBUG"
-# ADD RSC /l 0x415 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "sotest - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "sotest_debug"
-# PROP Intermediate_Dir "sotest_debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x415 /d "_DEBUG"
-# ADD RSC /l 0x415 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "sotest - Win32 Release"
-# Name "sotest - Win32 Debug"
-# Begin Source File
-
-SOURCE=..\..\sotest.c
-# End Source File
-# End Target
-# End Project
diff --git a/progs/slang/windows/vc60/vstest.dsp b/progs/slang/windows/vc60/vstest.dsp
deleted file mode 100644
index a3a2c707f0..0000000000
--- a/progs/slang/windows/vc60/vstest.dsp
+++ /dev/null
@@ -1,93 +0,0 @@
-# Microsoft Developer Studio Project File - Name="vstest" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=vstest - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "vstest.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "vstest.mak" CFG="vstest - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "vstest - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "vstest - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "vstest - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "vstest_release"
-# PROP Intermediate_Dir "vstest_release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x415 /d "NDEBUG"
-# ADD RSC /l 0x415 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "vstest - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "vstest_debug"
-# PROP Intermediate_Dir "vstest_debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x415 /d "_DEBUG"
-# ADD RSC /l 0x415 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "vstest - Win32 Release"
-# Name "vstest - Win32 Debug"
-# Begin Source File
-
-SOURCE=..\..\vstest.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\vstest.txt
-# End Source File
-# End Target
-# End Project
diff --git a/progs/tests/.gitignore b/progs/tests/.gitignore
deleted file mode 100644
index 6505c315a6..0000000000
--- a/progs/tests/.gitignore
+++ /dev/null
@@ -1,81 +0,0 @@
-.cvsignore
-afsmultiarb
-antialias
-arbfpspec
-arbfptest1
-arbfptexture
-arbfptrig
-arbnpot
-arbnpot-mipmap
-arbvptest1
-arbvptest3
-arbvptorus
-arbvpwarpmesh
-arraytexture
-blendminmax
-blendsquare
-bufferobj
-bug_3050
-bug_3101
-bug_3195
-copypixrate
-crossbar
-cva
-dinoshade
-drawbuffers
-extfuncs.h
-exactrast
-fbotest1
-fbotest2
-fbotexture
-floattex
-fog
-fogcoord
-fptest1
-fptexture
-getprocaddress
-getproclist.h
-interleave
-invert
-jkrahntest
-lineclip
-manytex
-mipmap_limits
-multipal
-no_s3tc
-packedpixels
-pbo
-prog_parameter
-projtex
-random
-readrate
-readtex.c
-readtex.h
-seccolor
-sharedtex
-shader_api
-stencil_twoside
-stencil_wrap
-stencilwrap
-subtexrate
-tex1d
-texcmp
-texcompress2
-texfilt
-texgenmix
-texline
-texobjshare
-texrect
-texwrap
-unfilledclip
-vao-01
-vao-02
-vparray
-vptest1
-vptest2
-vptest3
-vptorus
-vpwarpmesh
-yuvrect
-yuvsquare
-zreaddraw
diff --git a/progs/tests/Makefile b/progs/tests/Makefile
deleted file mode 100644
index cf8e0bfc1e..0000000000
--- a/progs/tests/Makefile
+++ /dev/null
@@ -1,179 +0,0 @@
-# progs/tests/Makefile
-
-
-# These programs aren't intended to be included with the normal distro.
-# They're not too interesting but they're good for testing.
-
-TOP = ../..
-include $(TOP)/configs/current
-
-
-LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
-
-SOURCES = \
- afsmultiarb.c \
- antialias.c \
- arbfpspec.c \
- arbfptest1.c \
- arbfptexture.c \
- arbfptrig.c \
- arbnpot.c \
- arbnpot-mipmap.c \
- arbvptest1.c \
- arbvptest3.c \
- arbvptorus.c \
- arbvpwarpmesh.c \
- arraytexture.c \
- blendminmax.c \
- blendsquare.c \
- bufferobj.c \
- bug_3050.c \
- bug_3101.c \
- bug_3195.c \
- copypixrate.c \
- crossbar.c \
- cva.c \
- dinoshade.c \
- drawbuffers.c \
- exactrast.c \
- floattex.c \
- fbotest1.c \
- fbotest2.c \
- fbotexture.c \
- fog.c \
- fogcoord.c \
- fptest1.c \
- fptexture.c \
- getprocaddress.c \
- interleave.c \
- invert.c \
- jkrahntest.c \
- lineclip.c \
- manytex.c \
- minmag.c \
- mipmap_limits.c \
- multipal.c \
- no_s3tc.c \
- packedpixels.c \
- pbo.c \
- prog_parameter.c \
- projtex.c \
- random.c \
- readrate.c \
- seccolor.c \
- shader_api.c \
- sharedtex.c \
- stencil_twoside.c \
- stencilwrap.c \
- stencil_wrap.c \
- subtexrate.c \
- tex1d.c \
- texcompress2.c \
- texfilt.c \
- texline.c \
- texobjshare.c \
- texrect.c \
- texwrap.c \
- unfilledclip.c \
- vao-01.c \
- vao-02.c \
- vparray.c \
- vptest1.c \
- vptest2.c \
- vptest3.c \
- vptorus.c \
- vpwarpmesh.c \
- yuvrect.c \
- yuvsquare.c \
- zreaddraw.c
-
-PROGS = $(SOURCES:%.c=%)
-
-INCLUDES = -I. -I$(TOP)/include
-
-UTIL_FILES = readtex.h readtex.c
-
-
-##### TARGETS #####
-
-default: $(UTIL_FILES) $(PROGS)
-
-clean:
- -rm -f $(PROGS)
- -rm -f *.o
- -rm -f getproclist.h
-
-##### RULES #####
-
-.SUFFIXES:
-.SUFFIXES: .c
-
-.c:
- $(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
-
-.c.o:
- $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
-
-.S.o:
- $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
-
-# auto code generation
-getprocaddress: getprocaddress.c getproclist.h
-
-getproclist.h: $(TOP)/src/mesa/glapi/gl_API.xml getprocaddress.c getprocaddress.py
- python getprocaddress.py > getproclist.h
-
-arraytexture: arraytexture.o readtex.o
- $(CC) $(CFLAGS) arraytexture.o readtex.o $(LIBS) -o $@
-
-arraytexture.o: arraytexture.c readtex.h
- $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) arraytexture.c -o $@
-
-afsmultiarb: afsmultiarb.o readtex.o
- $(CC) $(CFLAGS) $(LDFLAGS) afsmultiarb.o readtex.o $(LIBS) -o $@
-
-afsmultiarb.o: afsmultiarb.c readtex.h
- $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) afsmultiarb.c -o $@
-
-drawbuffers: drawbuffers.o
- $(CC) $(CFLAGS) $(LDFLAGS) drawbuffers.o $(LIBS) -o $@
-
-drawbuffers.o: drawbuffers.c extfuncs.h
- $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) drawbuffers.c -o $@
-
-texrect: texrect.o readtex.o
- $(CC) $(CFLAGS) $(LDFLAGS) texrect.o readtex.o $(LIBS) -o $@
-
-texrect.o: texrect.c readtex.h
- $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) texrect.c -o $@
-
-bug_3195: bug_3195.o readtex.o
- $(CC) $(CFLAGS) $(LDFLAGS) bug_3195.o readtex.o $(LIBS) -o $@
-
-bug_3195.o: bug_3195.c readtex.h
- $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) bug_3195.c -o $@
-
-invert: invert.o readtex.o
- $(CC) $(CFLAGS) $(LDFLAGS) invert.o readtex.o $(LIBS) -o $@
-
-invert.o: invert.c readtex.h
- $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) invert.c -o $@
-
-readtex.o: readtex.c
- $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) readtex.c -o $@
-
-
-readtex.h: $(TOP)/progs/util/readtex.h
- ln -s $(TOP)/progs/util/readtex.h .
-
-readtex.c: $(TOP)/progs/util/readtex.c
- ln -s $(TOP)/progs/util/readtex.c .
-
-extfuncs.h: $(TOP)/progs/util/extfuncs.h
- ln -s $(TOP)/progs/util/extfuncs.h .
-
-
-
-# Emacs tags
-tags:
- etags `find . -name \*.[ch]` `find ../include`
diff --git a/progs/tests/Makefile.win b/progs/tests/Makefile.win
deleted file mode 100644
index 0de6c42e39..0000000000
--- a/progs/tests/Makefile.win
+++ /dev/null
@@ -1,44 +0,0 @@
-# $Id: Makefile.win,v 1.1 2002/01/16 01:03:25 kschultz Exp $
-
-# Mesa 3-D graphics library
-# Version: 3.5
-# Copyright (C) 1995-2001 Brian Paul
-
-# Makefile for GLUT-based demo programs for Windows
-
-!include <win32.mak>
-
-##### MACROS #####
-
-TOP = ..
-INCDIR = ..\include
-LIBDIR = ..\lib
-
-SRCS = cva.c \
- dinoshade.c \
- fogcoord.c \
- manytex.c \
- multipal.c \
- projtex.c \
- seccolor.c \
-# sharedtex.c \
- texline.c \
- texwrap.c \
- vptest1.c \
- vptest2.c \
- vptest3.c \
- vptorus.c \
- vpwarpmesh.c
-
-!include "../mesawin32.mak"
-
-##### TARGETS #####
-
-clean::
-
-clobber::
- @del readtex.c readtex.h
-
-$(EXES) :$*.obj
- @echo $@
- $(link) -out:$@ $* /LIBPATH:$(LIBDIR) $(LIBS)
diff --git a/progs/tests/afsmultiarb.c b/progs/tests/afsmultiarb.c
deleted file mode 100644
index c026ecd4ce..0000000000
--- a/progs/tests/afsmultiarb.c
+++ /dev/null
@@ -1,469 +0,0 @@
-/*
- * GL_ATI_fragment_shader test
- * Roland Scheidegger
- *
- * Command line options:
- * -info print GL implementation information
- */
-
-
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-#include "readtex.h"
-
-#define TEXTURE_1_FILE "../images/girl.rgb"
-#define TEXTURE_2_FILE "../images/reflect.rgb"
-
-#define TEX0 1
-#define TEX7 8
-#define ANIMATE 10
-#define SHADER 20
-#define QUIT 100
-
-static GLboolean Animate = GL_TRUE;
-static GLint NumUnits = 6;
-static GLboolean TexEnabled[8];
-static GLuint boringshaderID = 0;
-static GLuint boring2passID = 0;
-static GLboolean Shader = GL_FALSE;
-
-static GLfloat Drift = 0.0;
-static GLfloat drift_increment = 0.005;
-static GLfloat Xrot = 20.0, Yrot = 30.0, Zrot = 0.0;
-static GLfloat shaderconstant[4] = {0.5, 0.0, 0.0, 0.0};
-
-static void Idle( void )
-{
- if (Animate) {
- GLint i;
-
- Drift += drift_increment;
- if (Drift >= 1.0)
- Drift = 0.0;
-
- for (i = 0; i < NumUnits; i++) {
- glActiveTextureARB(GL_TEXTURE0_ARB + i);
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- if (i == 0) {
- glTranslatef(Drift, 0.0, 0.0);
- glScalef(2, 2, 1);
- }
- else if (i == 1) {
- glTranslatef(0.0, Drift, 0.0);
- }
- else {
- glTranslatef(0.5, 0.5, 0.0);
- glRotatef(180.0 * Drift, 0, 0, 1);
- glScalef(1.0/i, 1.0/i, 1.0/i);
- glTranslatef(-0.5, -0.5, 0.0);
- }
- }
- glMatrixMode(GL_MODELVIEW);
-
- glutPostRedisplay();
- }
-}
-
-
-static void DrawObject(void)
-{
- GLint i;
- GLint j;
- static const GLfloat tex_coords[] = { 0.0, 0.0, 1.0, 1.0, 0.0 };
- static const GLfloat vtx_coords[] = { -1.0, -1.0, 1.0, 1.0, -1.0 };
-
- if (!TexEnabled[0] && !TexEnabled[1])
- glColor3f(0.1, 0.1, 0.1); /* add onto this */
- else
- glColor3f(1, 1, 1); /* modulate this */
-
- glBegin(GL_QUADS);
-
- /* Toggle between the vector and scalar entry points. This is done purely
- * to hit multiple paths in the driver.
- */
- if ( Drift > 0.49 ) {
- for (j = 0; j < 4; j++ ) {
- for (i = 0; i < NumUnits; i++)
- glMultiTexCoord2fARB(GL_TEXTURE0_ARB + i,
- tex_coords[j], tex_coords[j+1]);
- glVertex2f( vtx_coords[j], vtx_coords[j+1] );
- }
- }
- else {
- for (j = 0; j < 4; j++ ) {
- for (i = 0; i < NumUnits; i++)
- glMultiTexCoord2fvARB(GL_TEXTURE0_ARB + i, & tex_coords[j]);
- glVertex2fv( & vtx_coords[j] );
- }
- }
-
- glEnd();
-}
-
-
-
-static void Display( void )
-{
- static GLint T0 = 0;
- static GLint Frames = 0;
- GLint t;
-
- glClear( GL_COLOR_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);
- glScalef(5.0, 5.0, 5.0);
- DrawObject();
- glPopMatrix();
-
- glutSwapBuffers();
-
- Frames++;
-
- t = glutGet(GLUT_ELAPSED_TIME);
- if (t - T0 >= 2500) {
- GLfloat seconds = (t - T0) / 1000.0;
- GLfloat fps = Frames / seconds;
- drift_increment = 2.2 * seconds / Frames;
- printf("%d frames in %6.3f seconds = %6.3f FPS\n", Frames, seconds, fps);
- T0 = t;
- Frames = 0;
- }
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -1.0, 1.0, -1.0, 1.0, 10.0, 100.0 );
- /*glOrtho( -6.0, 6.0, -6.0, 6.0, 10.0, 100.0 );*/
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -70.0 );
-}
-
-
-static void ModeMenu(int entry)
-{
- if (entry >= TEX0 && entry <= TEX7) {
- /* toggle */
- GLint i = entry - TEX0;
- TexEnabled[i] = !TexEnabled[i];
- glActiveTextureARB(GL_TEXTURE0_ARB + i);
- if (TexEnabled[i])
- glEnable(GL_TEXTURE_2D);
- else
- glDisable(GL_TEXTURE_2D);
- printf("Enabled: ");
- for (i = 0; i < NumUnits; i++)
- printf("%d ", (int) TexEnabled[i]);
- printf("\n");
- }
- else if (entry==ANIMATE) {
- Animate = !Animate;
- }
- else if (entry==SHADER) {
- Shader = !Shader;
- if (Shader) {
- fprintf(stderr, "using 2-pass shader\n");
- glBindFragmentShaderATI(boring2passID);
- }
- else {
- fprintf(stderr, "using 1-pass shader\n");
- glBindFragmentShaderATI(boringshaderID);
- }
- }
- else if (entry==QUIT) {
- exit(0);
- }
-
- glutPostRedisplay();
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- 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[] )
-{
- GLuint texObj[8];
- GLint size, i;
-
- const char *exten = (const char *) glGetString(GL_EXTENSIONS);
- if (!strstr(exten, "GL_ATI_fragment_shader")) {
- printf("Sorry, GL_ATI_fragment_shader not supported by this renderer.\n");
- exit(1);
- }
-
-
- glGetIntegerv(GL_MAX_TEXTURE_SIZE, &size);
- printf("%d x %d max texture size\n", size, size);
-
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-
- for (i = 0; i < NumUnits; i++) {
- if (i < 6)
- TexEnabled[i] = GL_TRUE;
- else
- TexEnabled[i] = GL_FALSE;
- }
-
- /* allocate two texture objects */
- glGenTextures(NumUnits, texObj);
-
- /* setup the texture objects */
- for (i = 0; i < NumUnits; i++) {
-
- glActiveTextureARB(GL_TEXTURE0_ARB + i);
- glBindTexture(GL_TEXTURE_2D, texObj[i]);
-
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-
- if (i == 0) {
- if (!LoadRGBMipmaps(TEXTURE_1_FILE, GL_RGB)) {
- printf("Error: couldn't load texture image\n");
- exit(1);
- }
- }
- else if (i == 1) {
- if (!LoadRGBMipmaps(TEXTURE_2_FILE, GL_RGB)) {
- printf("Error: couldn't load texture image\n");
- exit(1);
- }
- }
- else {
- /* checker */
- GLubyte image[8][8][3];
- GLint i, j;
- for (i = 0; i < 8; i++) {
- for (j = 0; j < 8; j++) {
- if ((i + j) & 1) {
- image[i][j][0] = 50;
- image[i][j][1] = 50;
- image[i][j][2] = 50;
- }
- else {
- image[i][j][0] = 25;
- image[i][j][1] = 25;
- image[i][j][2] = 25;
- }
- }
- }
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 8, 8, 0,
- GL_RGB, GL_UNSIGNED_BYTE, (GLvoid *) image);
- }
-
- /* Bind texObj[i] to ith texture unit */
-/* if (i < 2)
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
- else
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD);*/
-
- if (TexEnabled[i])
- glEnable(GL_TEXTURE_2D);
- }
-
- boringshaderID = glGenFragmentShadersATI(1);
- boring2passID = glGenFragmentShadersATI(1);
- if (boring2passID == 0)
- {
- fprintf(stderr, "couldn't get frag shader id\n");
- exit(1);
- }
- glBindFragmentShaderATI(boringshaderID);
-/* maybe not the most creative shader but at least I know how it should look like! */
- glBeginFragmentShaderATI();
- glSampleMapATI(GL_REG_0_ATI, GL_TEXTURE0_ARB, GL_SWIZZLE_STR_ATI);
- glSampleMapATI(GL_REG_1_ATI, GL_TEXTURE1_ARB, GL_SWIZZLE_STR_ATI);
- glSampleMapATI(GL_REG_2_ATI, GL_TEXTURE2_ARB, GL_SWIZZLE_STR_ATI);
- glSampleMapATI(GL_REG_3_ATI, GL_TEXTURE3_ARB, GL_SWIZZLE_STR_ATI);
- glSampleMapATI(GL_REG_4_ATI, GL_TEXTURE4_ARB, GL_SWIZZLE_STR_ATI);
- glSampleMapATI(GL_REG_5_ATI, GL_TEXTURE5_ARB, GL_SWIZZLE_STR_ATI);
- glColorFragmentOp2ATI(GL_MUL_ATI,
- GL_REG_0_ATI, GL_NONE, GL_SATURATE_BIT_ATI,
- GL_REG_0_ATI, GL_NONE, GL_NONE,
- GL_PRIMARY_COLOR, GL_NONE, GL_NONE);
- glAlphaFragmentOp1ATI(GL_MOV_ATI,
- GL_REG_0_ATI, GL_NONE,
- GL_PRIMARY_COLOR, GL_NONE, GL_NONE);
- glColorFragmentOp3ATI(GL_MAD_ATI,
- GL_REG_0_ATI, GL_NONE, GL_SATURATE_BIT_ATI,
- GL_REG_0_ATI, GL_NONE, GL_NONE,
- GL_REG_1_ATI, GL_NONE, GL_NONE,
- GL_REG_2_ATI, GL_NONE, GL_NONE);
- glColorFragmentOp2ATI(GL_ADD_ATI,
- GL_REG_0_ATI, GL_NONE, GL_SATURATE_BIT_ATI,
- GL_REG_0_ATI, GL_NONE, GL_NONE,
- GL_REG_3_ATI, GL_NONE, GL_NONE);
- glColorFragmentOp2ATI(GL_ADD_ATI,
- GL_REG_0_ATI, GL_NONE, GL_SATURATE_BIT_ATI,
- GL_REG_0_ATI, GL_NONE, GL_NONE,
- GL_REG_4_ATI, GL_NONE, GL_NONE);
- glColorFragmentOp2ATI(GL_ADD_ATI,
- GL_REG_0_ATI, GL_NONE, GL_SATURATE_BIT_ATI,
- GL_REG_0_ATI, GL_NONE, GL_NONE,
- GL_REG_5_ATI, GL_NONE, GL_NONE);
- glEndFragmentShaderATI();
-
-/* mathematically equivalent to first shader but using 2 passes together with
- some tex coord rerouting */
- glBindFragmentShaderATI(boring2passID);
- glBeginFragmentShaderATI();
- glPassTexCoordATI(GL_REG_1_ATI, GL_TEXTURE0_ARB, GL_SWIZZLE_STR_ATI);
- glSampleMapATI(GL_REG_2_ATI, GL_TEXTURE2_ARB, GL_SWIZZLE_STR_ATI);
- glSampleMapATI(GL_REG_3_ATI, GL_TEXTURE3_ARB, GL_SWIZZLE_STR_ATI);
- glSampleMapATI(GL_REG_4_ATI, GL_TEXTURE4_ARB, GL_SWIZZLE_STR_ATI);
- glSampleMapATI(GL_REG_5_ATI, GL_TEXTURE5_ARB, GL_SWIZZLE_STR_ATI);
- glColorFragmentOp2ATI(GL_ADD_ATI,
- GL_REG_0_ATI, GL_NONE, GL_SATURATE_BIT_ATI,
- GL_REG_2_ATI, GL_NONE, GL_NONE,
- GL_REG_3_ATI, GL_NONE, GL_NONE);
- glColorFragmentOp2ATI(GL_ADD_ATI,
- GL_REG_0_ATI, GL_NONE, GL_SATURATE_BIT_ATI,
- GL_REG_0_ATI, GL_NONE, GL_NONE,
- GL_REG_4_ATI, GL_NONE, GL_NONE);
- glColorFragmentOp2ATI(GL_ADD_ATI,
- GL_REG_0_ATI, GL_NONE, GL_SATURATE_BIT_ATI,
- GL_REG_0_ATI, GL_NONE, GL_NONE,
- GL_REG_5_ATI, GL_NONE, GL_NONE);
- /* not really a dependant read */
- glSampleMapATI(GL_REG_0_ATI, GL_REG_1_ATI, GL_SWIZZLE_STR_ATI);
- glSampleMapATI(GL_REG_1_ATI, GL_TEXTURE1_ARB, GL_SWIZZLE_STR_ATI);
- glPassTexCoordATI(GL_REG_5_ATI, GL_REG_0_ATI, GL_SWIZZLE_STR_ATI);
- glColorFragmentOp2ATI(GL_MUL_ATI,
- GL_REG_0_ATI, GL_NONE, GL_SATURATE_BIT_ATI,
- GL_REG_0_ATI, GL_NONE, GL_NONE,
- GL_PRIMARY_COLOR, GL_NONE, GL_NONE);
- glAlphaFragmentOp1ATI(GL_MOV_ATI,
- GL_REG_0_ATI, GL_NONE,
- GL_PRIMARY_COLOR, GL_NONE, GL_NONE);
- glColorFragmentOp3ATI(GL_MAD_ATI,
- GL_REG_0_ATI, GL_NONE, GL_SATURATE_BIT_ATI,
- GL_REG_0_ATI, GL_NONE, GL_NONE,
- GL_REG_1_ATI, GL_NONE, GL_NONE,
- GL_REG_5_ATI, GL_NONE, GL_NONE);
- /* in principle we're finished here, but to test a bit more
- we do some fun with dot ops, replication et al. */
- glSetFragmentShaderConstantATI(GL_CON_3_ATI, shaderconstant);
- glColorFragmentOp2ATI(GL_DOT4_ATI,
- GL_REG_3_ATI, GL_GREEN_BIT_ATI, GL_EIGHTH_BIT_ATI,
- GL_ZERO, GL_NONE, GL_COMP_BIT_ATI | GL_NEGATE_BIT_ATI,
- GL_CON_3_ATI, GL_RED, GL_2X_BIT_ATI);
- /* those args must get ignored, except dstReg */
- glAlphaFragmentOp2ATI(GL_DOT4_ATI,
- GL_REG_4_ATI, GL_NONE,
- GL_ZERO, GL_NONE, GL_NONE,
- GL_ZERO, GL_NONE, GL_NONE);
- /* -> reg3 g = reg4 alpha = -0.5 */
- glAlphaFragmentOp2ATI(GL_ADD_ATI,
- GL_REG_5_ATI, GL_NONE,
- GL_REG_3_ATI, GL_GREEN, GL_NONE,
- GL_REG_4_ATI, GL_NONE, GL_NONE);
- /* -> reg5 a = -1 */
- glColorFragmentOp3ATI(GL_DOT2_ADD_ATI,
- GL_REG_4_ATI, GL_BLUE_BIT_ATI, GL_HALF_BIT_ATI,
- GL_REG_5_ATI, GL_ALPHA, GL_NEGATE_BIT_ATI,
- GL_ONE, GL_NONE, GL_BIAS_BIT_ATI,
- GL_ONE, GL_ALPHA, GL_2X_BIT_ATI | GL_NEGATE_BIT_ATI);
- /* -> reg 4 b = -0.5 */
- glColorFragmentOp2ATI(GL_MUL_ATI,
- GL_REG_0_ATI, GL_NONE, GL_NONE,
- GL_REG_4_ATI, GL_BLUE, GL_NEGATE_BIT_ATI | GL_2X_BIT_ATI,
- GL_REG_0_ATI, GL_NONE, GL_NONE);
- glEndFragmentShaderATI();
-
- glBindFragmentShaderATI(boringshaderID);
- glEnable(GL_FRAGMENT_SHADER_ATI);
-
- glShadeModel(GL_FLAT);
- glClearColor(0.3, 0.3, 0.4, 1.0);
-
- 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));
- }
- printf("output should be identical with both shaders to multiarb demo when 6 textures are enabled\n");
-}
-
-
-int main( int argc, char *argv[] )
-{
-/* GLint i;*/
-
- glutInit( &argc, argv );
- glutInitWindowSize( 300, 300 );
- glutInitWindowPosition( 0, 0 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
- glutCreateWindow(argv[0] );
-
- Init( argc, argv );
-
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutSpecialFunc( SpecialKey );
- glutDisplayFunc( Display );
- glutIdleFunc( Idle );
-
- glutCreateMenu(ModeMenu);
-
-/* for (i = 0; i < NumUnits; i++) {
- char s[100];
- sprintf(s, "Toggle Texture %d", i);
- glutAddMenuEntry(s, TEX0 + i);
- }*/
- glutAddMenuEntry("Toggle 1/2 Pass Shader", SHADER);
- glutAddMenuEntry("Toggle Animation", ANIMATE);
- glutAddMenuEntry("Quit", QUIT);
- glutAttachMenu(GLUT_RIGHT_BUTTON);
-
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/antialias.c b/progs/tests/antialias.c
deleted file mode 100644
index c389bbea3a..0000000000
--- a/progs/tests/antialias.c
+++ /dev/null
@@ -1,237 +0,0 @@
-/* $Id: antialias.c,v 1.2 2003/03/29 16:42:57 brianp Exp $ */
-
-/*
- * Test multisampling and polygon smoothing.
- *
- * Brian Paul
- * 4 November 2002
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <GL/glut.h>
-
-
-static GLfloat Zrot = 0;
-static GLboolean Anim = GL_TRUE;
-static GLboolean HaveMultisample = GL_TRUE;
-static GLboolean DoMultisample = GL_TRUE;
-
-
-static void
-PrintString(const char *s)
-{
- while (*s) {
- glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int) *s);
- s++;
- }
-}
-
-
-static void
-Polygon( GLint verts, GLfloat radius, GLfloat z )
-{
- int i;
- for (i = 0; i < verts; i++) {
- float a = (i * 2.0 * 3.14159) / verts;
- float x = radius * cos(a);
- float y = radius * sin(a);
- glVertex3f(x, y, z);
- }
-}
-
-
-static void
-DrawObject( void )
-{
- glLineWidth(3.0);
- glColor3f(1, 1, 1);
- glBegin(GL_LINE_LOOP);
- Polygon(12, 1.2, 0);
- glEnd();
-
- glLineWidth(1.0);
- glColor3f(1, 1, 1);
- glBegin(GL_LINE_LOOP);
- Polygon(12, 1.1, 0);
- glEnd();
-
- glColor3f(1, 0, 0);
- glBegin(GL_POLYGON);
- Polygon(12, 0.4, 0.3);
- glEnd();
-
- glColor3f(0, 1, 0);
- glBegin(GL_POLYGON);
- Polygon(12, 0.6, 0.2);
- glEnd();
-
- glColor3f(0, 0, 1);
- glBegin(GL_POLYGON);
- Polygon(12, 0.8, 0.1);
- glEnd();
-
- glColor3f(1, 1, 1);
- glBegin(GL_POLYGON);
- Polygon(12, 1.0, 0);
- glEnd();
-}
-
-
-static void
-Display( void )
-{
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- glColor3f(1, 1, 1);
- if (HaveMultisample) {
- glRasterPos2f(-3.1, -1.6);
- if (DoMultisample)
- PrintString("MULTISAMPLE");
- else
- PrintString("MULTISAMPLE (off)");
- }
- glRasterPos2f(-0.8, -1.6);
- PrintString("No antialiasing");
- glRasterPos2f(1.6, -1.6);
- PrintString("GL_POLYGON_SMOOTH");
-
- /* multisample */
- if (HaveMultisample) {
- glEnable(GL_DEPTH_TEST);
- if (DoMultisample)
- glEnable(GL_MULTISAMPLE_ARB);
- glPushMatrix();
- glTranslatef(-2.5, 0, 0);
- glPushMatrix();
- glRotatef(Zrot, 0, 0, 1);
- DrawObject();
- glPopMatrix();
- glPopMatrix();
- glDisable(GL_MULTISAMPLE_ARB);
- glDisable(GL_DEPTH_TEST);
- }
-
- /* non-aa */
- glEnable(GL_DEPTH_TEST);
- glPushMatrix();
- glTranslatef(0, 0, 0);
- glPushMatrix();
- glRotatef(Zrot, 0, 0, 1);
- DrawObject();
- glPopMatrix();
- glPopMatrix();
- glDisable(GL_DEPTH_TEST);
-
- /* polygon smooth */
- glEnable(GL_POLYGON_SMOOTH);
- glEnable(GL_LINE_SMOOTH);
- glEnable(GL_BLEND);
- glPushMatrix();
- glTranslatef(2.5, 0, 0);
- glPushMatrix();
- glRotatef(Zrot, 0, 0, 1);
- DrawObject();
- glPopMatrix();
- glPopMatrix();
- glDisable(GL_LINE_SMOOTH);
- glDisable(GL_POLYGON_SMOOTH);
- glDisable(GL_BLEND);
-
- glutSwapBuffers();
-}
-
-
-static void
-Reshape( int width, int height )
-{
- GLfloat ar = (float) width / (float) height;
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glOrtho(-2.0*ar, 2.0*ar, -2.0, 2.0, -1.0, 1.0);
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
-}
-
-
-static void
-Idle( void )
-{
- Zrot = 0.01 * glutGet(GLUT_ELAPSED_TIME);
- glutPostRedisplay();
-}
-
-
-static void
-Key( unsigned char key, int x, int y )
-{
- const GLfloat step = 1.0;
- (void) x;
- (void) y;
- switch (key) {
- case 'a':
- Anim = !Anim;
- if (Anim)
- glutIdleFunc(Idle);
- else
- glutIdleFunc(NULL);
- break;
- case 'm':
- DoMultisample = !DoMultisample;
- break;
- case 'z':
- Zrot = (int) (Zrot - step);
- break;
- case 'Z':
- Zrot = (int) (Zrot + step);
- break;
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void
-Init( void )
-{
- /* GLUT imposes the four samples/pixel requirement */
- int s;
- glGetIntegerv(GL_SAMPLES_ARB, &s);
- if (!glutExtensionSupported("GL_ARB_multisample") || s < 1) {
- printf("Warning: multisample antialiasing not supported.\n");
- HaveMultisample = GL_FALSE;
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- printf("GL_SAMPLES_ARB = %d\n", s);
-
- glBlendFunc(GL_SRC_ALPHA, GL_ONE);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- glBlendFunc(GL_SRC_ALPHA_SATURATE, GL_ONE);
-
- glGetIntegerv(GL_MULTISAMPLE_ARB, &s);
- printf("GL_MULTISAMPLE_ARB = %d\n", s);
-}
-
-
-int
-main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 600, 300 );
- glutInitDisplayMode( GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE |
- GLUT_DEPTH | GLUT_MULTISAMPLE );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- if (Anim)
- glutIdleFunc( Idle );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/api_speed.c b/progs/tests/api_speed.c
deleted file mode 100644
index aed65b35fe..0000000000
--- a/progs/tests/api_speed.c
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * (C) Copyright IBM Corporation 2002
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, and/or sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file api_speed.c
- * Simple test to measure the overhead of making GL calls.
- *
- * The main purpose of this test is to measure the difference in calling
- * overhead of different dispatch methods. Since it uses asm/timex.h to
- * access the Pentium's cycle counters, it will probably only compile on
- * Linux (though most architectures have a get_cycles function in timex.h).
- * That is why it isn't in the default Makefile.
- *
- * \author Ian Romanick <idr@us.ibm.com>
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/gl.h>
-#include <GL/glext.h>
-#include <GL/glut.h>
-
-#define inline __inline__
-#include <asm/timex.h>
-
-static float Width = 400;
-static float Height = 400;
-static unsigned count = 1000000;
-
-
-static void Idle( void )
-{
- glutPostRedisplay();
-}
-
-#define DO_FUNC(f,p) \
- do { \
- t0 = get_cycles(); \
- for ( i = 0 ; i < count ; i++ ) { \
- f p ; \
- } \
- t1 = get_cycles(); \
- printf("%u calls to % 20s required %llu cycles.\n", count, # f, t1 - t0); \
- } while( 0 )
-
-/**
- * Main display function. This is the place to add more API calls.
- */
-static void Display( void )
-{
- int i;
- const float v[3] = { 1.0, 0.0, 0.0 };
- cycles_t t0;
- cycles_t t1;
-
- glBegin(GL_TRIANGLE_STRIP);
-
- DO_FUNC( glColor3fv, (v) );
- DO_FUNC( glNormal3fv, (v) );
- DO_FUNC( glTexCoord2fv, (v) );
- DO_FUNC( glTexCoord3fv, (v) );
- DO_FUNC( glMultiTexCoord2fv, (GL_TEXTURE0, v) );
- DO_FUNC( glMultiTexCoord2f, (GL_TEXTURE0, 0.0, 0.0) );
- DO_FUNC( glFogCoordfvEXT, (v) );
- DO_FUNC( glFogCoordfEXT, (0.5) );
-
- glEnd();
-
- exit(0);
-}
-
-
-static void Reshape( int width, int height )
-{
- Width = width;
- Height = height;
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glOrtho(0.0, width, 0.0, height, -1.0, 1.0);
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowSize( (int) Width, (int) Height );
- glutInitWindowPosition( 0, 0 );
-
- glutInitDisplayMode( GLUT_RGB );
-
- glutCreateWindow( argv[0] );
-
- if ( argc > 1 ) {
- count = strtoul( argv[1], NULL, 0 );
- if ( count == 0 ) {
- fprintf( stderr, "Usage: %s [iterations]\n", argv[0] );
- exit(1);
- }
- }
-
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- glutIdleFunc( Idle );
-
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/api_speed.py b/progs/tests/api_speed.py
deleted file mode 100755
index 0ddaf5836c..0000000000
--- a/progs/tests/api_speed.py
+++ /dev/null
@@ -1,143 +0,0 @@
-#!/usr/bin/env python2
-
-# (C) Copyright IBM Corporation 2004
-# All Rights Reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# on the rights to use, copy, modify, merge, publish, distribute, sub
-# license, and/or sell copies of the Software, and to permit persons to whom
-# the Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
-# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-# IN THE SOFTWARE.
-#
-# Authors:
-# Ian Romanick <idr@us.ibm.com>
-
-
-# This script is used to run api_speed against several different libGL
-# libraries and compare the results. See the show_usage function for more
-# details on how to use it.
-
-
-import re, os, sys, getopt
-
-class results:
- def process_file(self, f):
- self.cycles = {}
- self.iterations = -1
-
- for line in f.readlines():
- m = re.match("(\d+) calls to (.{20}) required (\d+) cycles.", line)
-
- if self.iterations != -1 and int(m.group(1)) != self.iterations:
- raise
-
- # This could be done with lstrip, but the version of
- # the Python library on my system doesn't have it.
- # The installed version of Python is quite old. :(
-
- temp = m.group(2)
- function_name = None
- for i in range(len(temp)):
- if temp[i] != ' ':
- function_name = temp[i:]
- break
-
- if function_name == None:
- raise
-
- self.cycles[ function_name ] = int(m.group(3))
- self.iterations = int(m.group(1))
-
-
- def show_results(self):
- for name in self.cycles:
- print "%s -> %f" % (name, float(self.cycles[name]) / self.iterations)
-
-
- def compare_results(self, other):
- for name in self.cycles:
- if other.cycles.has_key(name):
- a = float(self.cycles[name]) / float(self.iterations)
- b = float(other.cycles[name]) / float(other.iterations)
- if abs( a ) < 0.000001:
- print "a = %f, b = %f" % (a, b)
- else:
- p = (100.0 * b / a) - 100.0
- print "%- 20s %7.2f - %7.2f = % -6.2f (%+.1f%%)" % (name, a, b, a - b, p)
- return
-
-
-def make_execution_string(lib, iterations):
- if lib == None:
- return "./api_speed %u" % (iterations)
- else:
- return "LD_PRELOAD=%s ./api_speed %u" % (lib, iterations)
-
-
-def show_usage():
- print """Usage: %s [-i iterations] {library ...}
-
-The full path to one or more libGL libraries (including the full name of the
-library) can be included on the command-line. Each library will be tested,
-and the results compared. The first library listed will be used as the
-"base line" for all comparisons.""" % (sys.argv[0])
- sys.exit(1)
-
-
-if __name__ == '__main__':
- try:
- (args, trail) = getopt.getopt(sys.argv[1:], "i:")
- except Exception,e:
- show_usage()
-
- iterations = 1000000
- try:
- for (arg,val) in args:
- if arg == "-i":
- iterations = int(val)
- except Exception,e:
- show_usage()
-
-
- # If no libraries were specifically named, just run the test against
- # the default system libGL.
-
- if len(trail) == 0:
- trail.append(None)
-
-
- result_array = []
- names = []
-
- for lib in trail:
- s = make_execution_string( lib, iterations )
- r = results()
- r.process_file( os.popen(s) )
- names.append(lib)
- result_array.append(r)
-
-
- # If the test was only run against one library, just show the results
- # of the test run. Otherwise, compare each successive run against
- # the first run.
-
- if len( result_array ) == 1:
- result_array[0].show_results()
- else:
- for i in range(1, len( result_array )):
- print "%s vs. %s" % (names[0], names[i])
- result_array[0].compare_results( result_array[i] )
- print ""
diff --git a/progs/tests/arbfpspec.c b/progs/tests/arbfpspec.c
deleted file mode 100644
index eac2a9100f..0000000000
--- a/progs/tests/arbfpspec.c
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * To demo that specular color gets lost someplace after vertex
- * program completion and fragment program startup
- */
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-static float Xrot = 0.0, Yrot = 0.0, Zrot = 0.0;
-static GLboolean Anim = GL_TRUE;
-
-
-static void Idle( void )
-{
- Xrot += .3;
- Yrot += .4;
- Zrot += .2;
- glutPostRedisplay();
-}
-
-
-static void Display( void )
-{
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- glPushMatrix();
- glRotatef(Xrot, 1, 0, 0);
- glRotatef(Yrot, 0, 1, 0);
- glRotatef(Zrot, 0, 0, 1);
- glutSolidTorus(0.75, 2.0, 10, 20);
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -2.0, 2.0, -2.0, 2.0, 5.0, 25.0 );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -12.0 );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case ' ':
- Xrot = Yrot = Zrot = 0;
- break;
- case 'a':
- Anim = !Anim;
- if (Anim)
- glutIdleFunc(Idle);
- else
- glutIdleFunc(NULL);
- break;
- case 'z':
- Zrot -= 5.0;
- break;
- case 'Z':
- Zrot += 5.0;
- break;
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void SpecialKey( int key, int x, int y )
-{
- const GLfloat 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( void )
-{
- GLint errno;
- GLuint prognum, fprognum;
-
- static const char prog[] =
- "!!ARBvp1.0\n"
- "DP4 result.position.x, state.matrix.mvp.row[0], vertex.position ;\n"
- "DP4 result.position.y, state.matrix.mvp.row[1], vertex.position ;\n"
- "DP4 result.position.z, state.matrix.mvp.row[2], vertex.position ;\n"
- "DP4 result.position.w, state.matrix.mvp.row[3], vertex.position ;\n"
- "MOV result.color.front.primary, {.5, .5, .5, 1};\n"
- "MOV result.color.front.secondary, {1, 1, 1, 1};\n"
- "END";
-
- static const char fprog[] =
- "!!ARBfp1.0\n"
- "MOV result.color, fragment.color.secondary;\n"
- "END";
-
- if (!glutExtensionSupported("GL_ARB_vertex_program")) {
- printf("Sorry, this program requires GL_ARB_vertex_program");
- exit(1);
- }
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Sorry, this program requires GL_ARB_fragment_program");
- exit(1);
- }
-
- glGenProgramsARB(1, &prognum);
- glGenProgramsARB(1, &fprognum);
-
- glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum);
- glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(prog), (const GLubyte *) prog);
-
- assert(glIsProgramARB(prognum));
- errno = glGetError();
- printf("glGetError = %d\n", errno);
- if (errno != GL_NO_ERROR)
- {
- GLint errorpos;
-
- glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
- printf("errorpos: %d\n", errorpos);
- printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB));
- }
-
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, fprognum);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(fprog), (const GLubyte *) fprog);
- errno = glGetError();
- printf("glGetError = %d\n", errno);
- if (errno != GL_NO_ERROR)
- {
- GLint errorpos;
-
- glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
- printf("errorpos: %d\n", errorpos);
- printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB));
- }
-
- glEnable(GL_VERTEX_PROGRAM_ARB);
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
- glEnable(GL_DEPTH_TEST);
- glClearColor(0.3, 0.3, 0.3, 1);
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 250, 250 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutSpecialFunc( SpecialKey );
- glutDisplayFunc( Display );
- if (Anim)
- glutIdleFunc(Idle);
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/arbfptest1.c b/progs/tests/arbfptest1.c
deleted file mode 100644
index 7949f87edd..0000000000
--- a/progs/tests/arbfptest1.c
+++ /dev/null
@@ -1,210 +0,0 @@
-/* Test GL_ARB_fragment_program */
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Display( void )
-{
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- glPushMatrix();
-
- glColor4f(0, 0.5, 0, 1);
- glColor4f(0, 1, 0, 1);
- glBegin(GL_POLYGON);
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 0, 1);
- glEnd();
-
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -15.0 );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-static void load_program(const char *prog, GLuint prognum)
-{
- int a;
- GLint errorpos, errno;
-
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, prognum);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(prog), (const GLubyte *) prog);
-
- assert(glIsProgramARB(prognum));
- errno = glGetError();
- printf("glGetError = %d\n", errno);
- if (errno != GL_NO_ERROR)
- {
- glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
- printf("errorpos: %d\n", errorpos);
- printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- for (a=-10; a<10; a++)
- {
- if ((errorpos+a < 0) || (errorpos+a >= strlen(prog))) continue;
- printf("%c", prog[errorpos+a]);
- }
- printf("\n");
- exit(1);
- }
-}
-
-static void Init( void )
-{
- static const char *prog0 =
- "!!ARBfp1.0\n"
- "TEMP R0, RC, HC, H0, H1, H2, H3, H30 ;\n"
- "MUL result.color, R0, fragment.position; \n"
- "ADD result.color, H3, fragment.texcoord; \n"
- "ADD_SAT result.color, H3, fragment.texcoord; \n"
- "MUL result.color.xy, R0.wzyx, fragment.position; \n"
- "MUL result.color, H0, fragment.position; \n"
- "MUL result.color, -H0, fragment.position; \n"
- "MOV RC, H1; \n"
- "MOV HC, H2; \n"
- "END \n"
- ;
- /* masked updates, defines, declarations */
- static const char *prog1 =
- "!!ARBfp1.0\n"
- "PARAM foo = {1., 2., 3., 4.}; \n"
- "PARAM foo2 = 5.; \n"
- "PARAM foo3 = {5., 6., 7., 8.}; \n"
- "PARAM bar = 3.; \n"
- "TEMP R0, R1, RC, EQ, NE, bar2; \n"
- "ALIAS bar3 = bar; \n"
- "MOV result.color.xy, R0; \n"
- "MOV result.color, R0; \n"
- "MOV result.color.xyzw, R0; \n"
- "MOV result.color.xy, R0; \n"
- "MOV RC.x, R1.x; \n"
- "KIL NE; \n"
- "KIL EQ.xyxy; \n"
- "END \n"
- ;
-
- /* texture instructions */
- static const char *prog2 =
- "!!ARBfp1.0\n"
- "TEMP R0, R1, R2, R3;\n"
- "TEX R0, fragment.texcoord, texture[0], 2D; \n"
- "TEX R1, fragment.texcoord[1], texture[1], CUBE; \n"
- "TEX R2, fragment.texcoord[2], texture[2], 3D; \n"
- "TXP R3, fragment.texcoord[3], texture[3], RECT; \n"
- "MUL result.color, R0, fragment.color; \n"
- "END \n"
- ;
-
- /* test negation, absolute value */
- static const char *prog3 =
- "!!ARBfp1.0\n"
- "TEMP R0, R1;\n"
- "MOV R0, R1; \n"
- "MOV R0, -R1; \n"
- "MOV result.color, R0; \n"
- "END \n"
- ;
-
- /* literal constant sources */
- static const char *prog4 =
- "!!ARBfp1.0\n"
- "TEMP R0, R1;\n"
- "PARAM Pi = 3.14159; \n"
- "MOV R0, {1., -2., +3., 4.}; \n"
- "MOV R0, 5.; \n"
- "MOV R0, -5.; \n"
- "MOV R0, 5.; \n"
- "MOV R0, Pi; \n"
- "MOV result.color, R0; \n"
- "END \n"
- ;
-
- /* change the fragment color in a simple way */
- static const char *prog10 =
- "!!ARBfp1.0\n"
- "PARAM blue = {0., 0., 1., 0.};\n"
- "PARAM color = {1., 0., 0., 1.};\n"
- "TEMP R0; \n"
- "MOV R0, fragment.color; \n"
- "#ADD result.color, R0, fragment.color; \n"
- "#ADD result.color, blue, fragment.color; \n"
- "#ADD result.color, {1., 0., 0., 0.}, fragment.color; \n"
- "ADD result.color, color, fragment.color; \n"
- "END \n"
- ;
-
- GLuint progs[20];
-
- glGenProgramsARB(20, progs);
- assert(progs[0]);
- assert(progs[1]);
- assert(progs[0] != progs[1]);
-
-
- printf("program 0:\n");
- load_program(prog0, progs[0]);
- printf("program 1:\n");
- load_program(prog1, progs[1]);
- printf("program 2:\n");
- load_program(prog2, progs[2]);
- printf("program 3:\n");
- load_program(prog3, progs[3]);
- printf("program 4:\n");
- load_program(prog4, progs[4]);
- printf("program 10:\n");
- load_program(prog10, progs[5]);
-
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
- glEnable(GL_ALPHA_TEST);
- glAlphaFunc(GL_ALWAYS, 0.0);
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 250, 250 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/arbfptexture.c b/progs/tests/arbfptexture.c
deleted file mode 100644
index a854908c31..0000000000
--- a/progs/tests/arbfptexture.c
+++ /dev/null
@@ -1,153 +0,0 @@
-/* GL_ARB_fragment_program texture test */
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-#include "readtex.c"
-
-
-#define TEXTURE_FILE "../images/girl.rgb"
-
-static GLfloat Xrot = 0.0, Yrot = 0.0, Zrot = 0.0;
-
-
-static void Display( void )
-{
- glClear( GL_COLOR_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);
-
- glBegin(GL_POLYGON);
-#define Q 2
- glColor4f(1.0, 1.0, 1.0, 1); glTexCoord4f(0, 0, 0, Q); glVertex2f(-1, -1);
- glColor4f(0.2, 0.2, 1.0, 1); glTexCoord4f(1, 0, 0, Q); glVertex2f( 1, -1);
- glColor4f(0.2, 1.0, 0.2, 1); glTexCoord4f(1, 1, 0, Q); glVertex2f( 1, 1);
- glColor4f(1.0, 0.2, 0.2, 1); glTexCoord4f(0, 1, 0, Q); glVertex2f(-1, 1);
- glEnd();
-
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -8.0 );
-}
-
-
-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 Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "TEMP R0;\n"
- "TEX R0, fragment.texcoord[0], texture[0], 2D; \n"
- "MUL result.color, R0, fragment.color; \n"
- "END"
- ;
- GLuint modulateProg;
- GLuint Texture;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
- assert(glIsProgramARB(modulateProg));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- /* Load texture */
- glGenTextures(1, &Texture);
- glBindTexture(GL_TEXTURE_2D, Texture);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- if (!LoadRGBMipmaps(TEXTURE_FILE, GL_RGB)) {
- printf("Error: couldn't load texture image file %s\n", TEXTURE_FILE);
- exit(1);
- }
- /* XXX this enable shouldn't really be needed!!! */
- glEnable(GL_TEXTURE_2D);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 250, 250 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutSpecialFunc( SpecialKey );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/arbfptrig.c b/progs/tests/arbfptrig.c
deleted file mode 100644
index 26b68c6b41..0000000000
--- a/progs/tests/arbfptrig.c
+++ /dev/null
@@ -1,156 +0,0 @@
-/* GL_ARB_fragment_program texture test */
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-#include "readtex.c"
-
-
-#define TEXTURE_FILE "../images/girl.rgb"
-
-static GLfloat Xrot = 0.0, Yrot = 0.0, Zrot = 0.0;
-
-#define PI 3.141592
-
-static void Display( void )
-{
- glClear( GL_COLOR_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);
-
- glBegin(GL_POLYGON);
- glTexCoord2f(-PI, 0); glVertex2f(-1, -1);
- glTexCoord2f(PI, 0); glVertex2f( 1, -1);
- glTexCoord2f(PI, 1); glVertex2f( 1, 1);
- glTexCoord2f(-PI, 1); glVertex2f(-1, 1);
- glEnd();
-
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -8.0 );
-}
-
-
-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 Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "TEMP R0;\n"
- "MOV R0, {0,0,0,1};\n"
- "SCS R0, fragment.texcoord[0].x; \n"
- "ADD R0, R0, {1.0}.x;\n"
- "MUL R0, R0, {0.5}.x;\n"
- "MOV result.color, R0; \n"
- "END"
- ;
- GLuint modulateProg;
- GLuint Texture;
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
- assert(glIsProgramARB(modulateProg));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- /* Load texture */
- glGenTextures(1, &Texture);
- glBindTexture(GL_TEXTURE_2D, Texture);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- if (!LoadRGBMipmaps(TEXTURE_FILE, GL_RGB)) {
- printf("Error: couldn't load texture image file %s\n", TEXTURE_FILE);
- exit(1);
- }
- /* XXX this enable shouldn't really be needed!!! */
- glEnable(GL_TEXTURE_2D);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 250, 250 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutSpecialFunc( SpecialKey );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/arbnpot-mipmap.c b/progs/tests/arbnpot-mipmap.c
deleted file mode 100644
index 4ed84e7ace..0000000000
--- a/progs/tests/arbnpot-mipmap.c
+++ /dev/null
@@ -1,184 +0,0 @@
-
-/* Copyright (c) Mark J. Kilgard, 1994. */
-
-/*
- * (c) Copyright 1993, Silicon Graphics, Inc.
- * 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
- * the name of Silicon Graphics, Inc. not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * 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,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
- * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
- * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
- * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
- * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
- * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN
- * 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
- * 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
- * clause at DFARS 252.227-7013 and/or in similar or successor
- * clauses in the FAR or the DOD or NASA FAR Supplement.
- * Unpublished-- rights reserved under the copyright laws of the
- * United States. Contractor/manufacturer is Silicon Graphics,
- * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311.
- *
- * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
- */
-/* mipmap.c
- * This program demonstrates using mipmaps for texture maps.
- * To overtly show the effect of mipmaps, each mipmap reduction
- * level has a solidly colored, contrasting texture image.
- * Thus, the quadrilateral which is drawn is drawn with several
- * different colors.
- */
-#include <stdlib.h>
-#include <stdio.h>
-#include <GL/glut.h>
-
-GLubyte mipmapImage32[40][46][3];
-GLubyte mipmapImage16[20][23][3];
-GLubyte mipmapImage8[10][11][3];
-GLubyte mipmapImage4[5][5][3];
-GLubyte mipmapImage2[2][2][3];
-GLubyte mipmapImage1[1][1][3];
-
-static void makeImages(void)
-{
- int i, j;
-
- for (i = 0; i < 40; i++) {
- for (j = 0; j < 46; j++) {
- mipmapImage32[i][j][0] = 255;
- mipmapImage32[i][j][1] = 255;
- mipmapImage32[i][j][2] = 0;
- }
- }
- for (i = 0; i < 20; i++) {
- for (j = 0; j < 23; j++) {
- mipmapImage16[i][j][0] = 255;
- mipmapImage16[i][j][1] = 0;
- mipmapImage16[i][j][2] = 255;
- }
- }
- for (i = 0; i < 10; i++) {
- for (j = 0; j < 11; j++) {
- mipmapImage8[i][j][0] = 255;
- mipmapImage8[i][j][1] = 0;
- mipmapImage8[i][j][2] = 0;
- }
- }
- for (i = 0; i < 5; i++) {
- for (j = 0; j < 5; j++) {
- mipmapImage4[i][j][0] = 0;
- mipmapImage4[i][j][1] = 255;
- mipmapImage4[i][j][2] = 0;
- }
- }
- for (i = 0; i < 2; i++) {
- for (j = 0; j < 2; j++) {
- mipmapImage2[i][j][0] = 0;
- mipmapImage2[i][j][1] = 0;
- mipmapImage2[i][j][2] = 255;
- }
- }
- mipmapImage1[0][0][0] = 255;
- mipmapImage1[0][0][1] = 255;
- mipmapImage1[0][0][2] = 255;
-}
-
-static void myinit(void)
-{
- if (!glutExtensionSupported("GL_ARB_texture_non_power_of_two")) {
- printf("Sorry, this program requires GL_ARB_texture_non_power_of_two\n");
- exit(1);
- }
-
- glEnable(GL_DEPTH_TEST);
- glDepthFunc(GL_LESS);
- glShadeModel(GL_FLAT);
-
- glTranslatef(0.0, 0.0, -3.6);
- makeImages();
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- glTexImage2D(GL_TEXTURE_2D, 0, 3, 40, 46, 0,
- GL_RGB, GL_UNSIGNED_BYTE, &mipmapImage32[0][0][0]);
- glTexImage2D(GL_TEXTURE_2D, 1, 3, 20, 23, 0,
- GL_RGB, GL_UNSIGNED_BYTE, &mipmapImage16[0][0][0]);
- glTexImage2D(GL_TEXTURE_2D, 2, 3, 10, 11, 0,
- GL_RGB, GL_UNSIGNED_BYTE, &mipmapImage8[0][0][0]);
- glTexImage2D(GL_TEXTURE_2D, 3, 3, 5, 5, 0,
- GL_RGB, GL_UNSIGNED_BYTE, &mipmapImage4[0][0][0]);
- glTexImage2D(GL_TEXTURE_2D, 4, 3, 2, 2, 0,
- GL_RGB, GL_UNSIGNED_BYTE, &mipmapImage2[0][0][0]);
- glTexImage2D(GL_TEXTURE_2D, 5, 3, 1, 1, 0,
- GL_RGB, GL_UNSIGNED_BYTE, &mipmapImage1[0][0][0]);
- 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,
- GL_NEAREST_MIPMAP_NEAREST);
- glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
- glEnable(GL_TEXTURE_2D);
-}
-
-static void display(void)
-{
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- glBegin(GL_QUADS);
- glTexCoord2f(0.0, 0.0); glVertex3f(-2.0, -1.0, 0.0);
- glTexCoord2f(0.0, 8.0); glVertex3f(-2.0, 1.0, 0.0);
- glTexCoord2f(8.0, 8.0); glVertex3f(2000.0, 1.0, -6000.0);
- glTexCoord2f(8.0, 0.0); glVertex3f(2000.0, -1.0, -6000.0);
- glEnd();
- glFlush();
-}
-
-static void myReshape(int w, int h)
-{
- glViewport(0, 0, w, h);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- gluPerspective(60.0, 1.0*(GLfloat)w/(GLfloat)h, 1.0, 30000.0);
- glMatrixMode(GL_MODELVIEW);
- 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);
- glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH);
- glutInitWindowSize (500, 500);
- glutCreateWindow (argv[0]);
- myinit();
- glutReshapeFunc (myReshape);
- glutDisplayFunc(display);
- glutKeyboardFunc(key);
- glutMainLoop();
- return 0; /* ANSI C requires main to return int. */
-}
diff --git a/progs/tests/arbnpot.c b/progs/tests/arbnpot.c
deleted file mode 100644
index 05ba85dad9..0000000000
--- a/progs/tests/arbnpot.c
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * Test NPOT textures with the GL_ARB_texture_non_power_of_two extension.
- * Brian Paul
- * 2 July 2003
- */
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <GL/glut.h>
-#include "../util/readtex.c"
-
-#define IMAGE_FILE "../images/girl.rgb"
-
-static GLfloat Zrot = 0;
-
-static void Display( void )
-{
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- glPushMatrix();
- glRotatef(Zrot, 0, 0, 1);
- glBegin(GL_POLYGON);
- glTexCoord2f(0, 0);
- glVertex2f(-1, -1);
- glTexCoord2f(1, 0);
- glVertex2f(1, -1);
- glTexCoord2f(1, 1);
- glVertex2f(1, 1);
- glTexCoord2f(0, 1);
- glVertex2f(-1, 1);
- glEnd();
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -7.0 );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 'z':
- Zrot -= 1.0;
- break;
- case 'Z':
- Zrot += 1.0;
- break;
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void Init( void )
-{
- GLubyte *image;
- int imgWidth, imgHeight, minDim, w;
- GLenum imgFormat;
-
- if (!glutExtensionSupported("GL_ARB_texture_non_power_of_two")) {
- printf("Sorry, this program requires GL_ARB_texture_non_power_of_two\n");
- exit(1);
- }
-
-#if 1
- image = LoadRGBImage( IMAGE_FILE, &imgWidth, &imgHeight, &imgFormat );
- if (!image) {
- printf("Couldn't read %s\n", IMAGE_FILE);
- exit(0);
- }
-#else
- int i, j;
- imgFormat = GL_RGB;
- imgWidth = 3;
- imgHeight = 3;
- image = malloc(imgWidth * imgHeight * 3);
- for (i = 0; i < imgHeight; i++) {
- for (j = 0; j < imgWidth; j++) {
- int k = (i * imgWidth + j) * 3;
- if ((i + j) & 1) {
- image[k+0] = 255;
- image[k+1] = 0;
- image[k+2] = 0;
- }
- else {
- image[k+0] = 0;
- image[k+1] = 255;
- image[k+2] = 0;
- }
- }
- }
-#endif
-
- printf("Read %d x %d\n", imgWidth, imgHeight);
-
- minDim = imgWidth < imgHeight ? imgWidth : imgHeight;
-
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-
- /*
- * 1D Texture. Test proxy first, if that works, test non-proxy target.
- */
- glTexImage1D(GL_PROXY_TEXTURE_1D, 0, GL_RGB, imgWidth, 0,
- imgFormat, GL_UNSIGNED_BYTE, image);
- glGetTexLevelParameteriv(GL_PROXY_TEXTURE_1D, 0, GL_TEXTURE_WIDTH, &w);
- assert(w == imgWidth || w == 0);
-
- if (w) {
- glTexImage1D(GL_TEXTURE_1D, 0, GL_RGB, imgWidth, 0,
- imgFormat, GL_UNSIGNED_BYTE, image);
- assert(glGetError() == GL_NO_ERROR);
- }
-
-
- /*
- * 2D Texture
- */
- glTexImage2D(GL_PROXY_TEXTURE_2D, 0, GL_RGB, imgWidth, imgHeight, 0,
- imgFormat, GL_UNSIGNED_BYTE, image);
- glGetTexLevelParameteriv(GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &w);
- assert(w == imgWidth || w == 0);
-
- if (w) {
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, imgWidth, imgHeight, 0,
- imgFormat, GL_UNSIGNED_BYTE, image);
- assert(glGetError() == GL_NO_ERROR);
- }
-
-
- /*
- * 3D Texture
- */
- glTexImage3D(GL_PROXY_TEXTURE_3D, 0, GL_RGB, imgWidth, imgHeight, 1, 0,
- imgFormat, GL_UNSIGNED_BYTE, image);
- glGetTexLevelParameteriv(GL_PROXY_TEXTURE_3D, 0, GL_TEXTURE_WIDTH, &w);
- assert(w == imgWidth || w == 0);
-
- if (w) {
- glTexImage3D(GL_TEXTURE_3D, 0, GL_RGB, imgWidth, imgHeight, 1, 0,
- imgFormat, GL_UNSIGNED_BYTE, image);
- assert(glGetError() == GL_NO_ERROR);
- }
-
-
- /*
- * Cube Texture
- */
- glTexImage2D(GL_PROXY_TEXTURE_CUBE_MAP, 0, GL_RGB,
- minDim, minDim, 0,
- imgFormat, GL_UNSIGNED_BYTE, image);
- glGetTexLevelParameteriv(GL_PROXY_TEXTURE_CUBE_MAP, 0, GL_TEXTURE_WIDTH, &w);
- assert(w == minDim || w == 0);
-
- if (w) {
- glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0, GL_RGB,
- minDim, minDim, 0,
- imgFormat, GL_UNSIGNED_BYTE, image);
- assert(glGetError() == GL_NO_ERROR);
- }
-
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glEnable(GL_TEXTURE_2D);
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 400, 400 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/arbvptest1.c b/progs/tests/arbvptest1.c
deleted file mode 100644
index 0ebd3987f5..0000000000
--- a/progs/tests/arbvptest1.c
+++ /dev/null
@@ -1,164 +0,0 @@
-/* Test glGenProgramsARB(), glIsProgramARB(), glLoadProgramARB() */
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-static void Display( void )
-{
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- glPushMatrix();
-
- glBegin(GL_POLYGON);
- glVertexAttrib2fARB(0, -1, -1);
- glVertexAttrib2fARB(0, 1, -1);
- glVertexAttrib2fARB(0, 0, 1);
- glEnd();
-
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -15.0 );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-static void load_program(const char *prog, GLuint prognum)
-{
- int a;
- GLint errorpos, errno;
-
- glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum);
- glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(prog), (const GLubyte *) prog);
-
- assert(glIsProgramARB(prognum));
- errno = glGetError();
- printf("glGetError = %d\n", errno);
- if (errno != GL_NO_ERROR)
- {
- glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
- printf("errorpos: %d\n", errorpos);
- printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- for (a=-10; a<10; a++)
- {
- if ((errorpos+a < 0) || (errorpos+a >= strlen(prog))) continue;
- printf("%c", prog[errorpos+a]);
- }
- printf("\n");
- exit(1);
- }
-}
-
-static void Init( void )
-{
- GLuint prognum[4];
-
- static const char *prog1 =
- "!!ARBvp1.0\n"
- "TEMP R0;\n"
- "MUL result.color.primary.xyz, R0, program.local[35]; \n"
- "END\n";
- static const char *prog2 =
- "!!ARBvp1.0\n"
- "#\n"
- "# c[0-3] = modelview projection (composite) matrix\n"
- "# c[32] = normalized light direction in object-space\n"
- "# c[35] = yellow diffuse material, (1.0, 1.0, 0.0, 1.0)\n"
- "# c[64].x = 0.0\n"
- "# c[64].z = 0.125, a scaling factor\n"
- "TEMP R0, R1;\n"
- "#\n"
- "# outputs diffuse illumination for color and perturbed position\n"
- "#\n"
- "DP3 R0, program.local[32], vertex.normal; # light direction DOT normal\n"
- "MUL result.color.primary.xyz, R0, program.local[35]; \n"
- "MAX R0, program.local[64].x, R0; \n"
- "MUL R0, R0, vertex.normal; \n"
- "MUL R0, R0, program.local[64].z; \n"
- "ADD R1, vertex.position, -R0; # perturb object space position\n"
- "DP4 result.position.x, state.matrix.mvp.row[3], R1; \n"
- "DP4 result.position.y, state.matrix.mvp.row[1], R1; \n"
- "DP4 result.position.z, state.matrix.mvp.row[2], R1; \n"
- "DP4 result.position.w, state.matrix.mvp.row[3], R1; \n"
- "END\n";
- static const char *prog3 =
- "!!ARBvp1.0\n"
- "TEMP R0, R1, R2, R3;\n"
- "DP4 result.position.x, state.matrix.mvp.row[0], vertex.position;\n"
- "DP4 result.position.y, state.matrix.mvp.row[1], vertex.position;\n"
- "DP4 result.position.z, state.matrix.mvp.row[2], vertex.position;\n"
- "DP4 result.position.w, state.matrix.mvp.row[3], vertex.position;\n"
- "DP3 R0.x, state.matrix.modelview.inverse.row[0], vertex.normal;\n"
- "DP3 R0.y, state.matrix.modelview.inverse.row[1], vertex.normal;\n"
- "DP3 R0.z, state.matrix.modelview.inverse.row[2], vertex.normal;\n"
- "DP3 R1.x, program.env[32], R0; # R1.x = Lpos DOT n'\n"
- "DP3 R1.y, program.env[33], R0; # R1.y = hHat DOT n'\n"
- "MOV R1.w, program.local[38].x; # R1.w = specular power\n"
- "LIT R2, R1; # Compute lighting values\n"
- "MAD R3, program.env[35].x, R2.y, program.env[35].y; # diffuse + emissive\n"
- "MAD result.color.primary.xyz, program.env[36], R2.z, R3; # + specular\n"
- "END\n";
- static const char *prog4 =
- "!!ARBvp1.0\n"
- "TEMP R2, R3;\n"
- "PARAM foo = {0., 0., 0., 1.};\n"
- "PARAM blah[] = { program.local[0..8] };\n"
- "ADDRESS A0;\n"
- "ARL A0.x, foo.x;\n"
- "DP4 R2, R3, blah[A0.x].x;\n"
- "DP4 R2, R3, blah[A0.x + 5];\n"
- "DP4 result.position, R3, blah[A0.x - 4];\n"
- "END\n";
-
- glGenProgramsARB(4, prognum);
-
- load_program(prog1, prognum[0]);
- load_program(prog2, prognum[1]);
- load_program(prog3, prognum[2]);
- load_program(prog4, prognum[3]);
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 250, 250 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/arbvptest3.c b/progs/tests/arbvptest3.c
deleted file mode 100644
index 6437062900..0000000000
--- a/progs/tests/arbvptest3.c
+++ /dev/null
@@ -1,127 +0,0 @@
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-static float Zrot = 0.0;
-
-
-static void Display( void )
-{
- glClearColor(0.3, 0.3, 0.3, 1);
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- glEnable(GL_VERTEX_PROGRAM_ARB);
-
- glLoadIdentity();
- glRotatef(Zrot, 0, 0, 1);
-
- glPushMatrix();
-
- glVertexAttrib3fARB(3, 1, 0.5, 0.25);
- glBegin(GL_TRIANGLES);
-#if 1
- glVertexAttrib3fARB(3, 1.0, 0.0, 0.0);
- glVertexAttrib2fARB(0, -0.5, -0.5);
- glVertexAttrib3fARB(3, 0.0, 1.0, 0.0);
- glVertexAttrib2fARB(0, 0.5, -0.5);
- glVertexAttrib3fARB(3, 0.0, 0.0, 1.0);
- glVertexAttrib2fARB(0, 0, 0.5);
-#else
- glVertex2f( -1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 0, 1);
-#endif
- glEnd();
-
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- /* glFrustum( -2.0, 2.0, -2.0, 2.0, 5.0, 25.0 );*/
- glOrtho(-2.0, 2.0, -2.0, 2.0, -2.0, 2.0 );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- /*glTranslatef( 0.0, 0.0, -15.0 );*/
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 'z':
- Zrot -= 5.0;
- break;
- case 'Z':
- Zrot += 5.0;
- break;
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void Init( void )
-{
- GLint errno;
- GLuint prognum;
-
- static const char *prog1 =
- "!!ARBvp1.0\n"
- "MOV result.color, vertex.attrib[3];\n"
-
- "DP4 result.position.x, vertex.position, state.matrix.modelview.row[0];\n"
- "DP4 result.position.y, vertex.position, state.matrix.modelview.row[1];\n"
- "DP4 result.position.z, vertex.position, state.matrix.modelview.row[2];\n"
- "DP4 result.position.w, vertex.position, state.matrix.modelview.row[3];\n"
- "END\n";
-
- glGenProgramsARB(1, &prognum);
-
- glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum);
- glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(prog1), (const GLubyte *) prog1);
-
- assert(glIsProgramARB(prognum));
- errno = glGetError();
- printf("glGetError = %d\n", errno);
- if (errno != GL_NO_ERROR)
- {
- GLint errorpos;
-
- glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
- printf("errorpos: %d\n", errorpos);
- printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB));
- }
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 250, 250 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/arbvptorus.c b/progs/tests/arbvptorus.c
deleted file mode 100644
index 9d19ef90da..0000000000
--- a/progs/tests/arbvptorus.c
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * A lit, rotating torus via vertex program
- */
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-static float Xrot = 0.0, Yrot = 0.0, Zrot = 0.0;
-static GLboolean Anim = GL_TRUE;
-
-
-static void Idle( void )
-{
- Xrot += .3;
- Yrot += .4;
- Zrot += .2;
- glutPostRedisplay();
-}
-
-
-static void Display( void )
-{
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- glPushMatrix();
- glRotatef(Xrot, 1, 0, 0);
- glRotatef(Yrot, 0, 1, 0);
- glRotatef(Zrot, 0, 0, 1);
- glutSolidTorus(0.75, 2.0, 10, 20);
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -2.0, 2.0, -2.0, 2.0, 5.0, 25.0 );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -12.0 );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case ' ':
- Xrot = Yrot = Zrot = 0;
- break;
- case 'a':
- Anim = !Anim;
- if (Anim)
- glutIdleFunc(Idle);
- else
- glutIdleFunc(NULL);
- break;
- case 'z':
- Zrot -= 5.0;
- break;
- case 'Z':
- Zrot += 5.0;
- break;
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void SpecialKey( int key, int x, int y )
-{
- const GLfloat 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( void )
-{
- GLint errno;
- GLuint prognum;
-
- /* borrowed from an nvidia demo:
- * c[0..3] = modelview matrix
- * c[4..7] = invtrans modelview matrix
- * c[32] = light pos
- * c[35] = diffuse color
- */
- static const char prog[] =
- "!!ARBvp1.0\n"
- "OPTION ARB_position_invariant ;"
- "TEMP R0, R1; \n"
-
- "# normal x MV-1T -> lighting normal\n"
- "DP3 R1.x, state.matrix.modelview.invtrans.row[0], vertex.normal ;\n"
- "DP3 R1.y, state.matrix.modelview.invtrans.row[1], vertex.normal;\n"
- "DP3 R1.z, state.matrix.modelview.invtrans.row[2], vertex.normal;\n"
-
- "DP3 R0, program.local[32], R1; # L.N\n"
-#if 0
- "MUL result.color.xyz, R0, program.local[35] ; # col = L.N * diffuse\n"
-#else
- "MUL result.color.primary.xyz, R0, program.local[35] ; # col = L.N * diffuse\n"
-#endif
- "MOV result.texcoord, vertex.texcoord;\n"
- "END";
-
- if (!glutExtensionSupported("GL_ARB_vertex_program")) {
- printf("Sorry, this program requires GL_ARB_vertex_program");
- exit(1);
- }
-
-
- glGenProgramsARB(1, &prognum);
-
- glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum);
- glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(prog), (const GLubyte *) prog);
-
- assert(glIsProgramARB(prognum));
- errno = glGetError();
- printf("glGetError = %d\n", errno);
- if (errno != GL_NO_ERROR)
- {
- GLint errorpos;
-
- glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
- printf("errorpos: %d\n", errorpos);
- printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB));
- }
-
- /* Light position */
- glProgramLocalParameter4fARB(GL_VERTEX_PROGRAM_ARB, 32, 2, 2, 4, 1);
- /* Diffuse material color */
- glProgramLocalParameter4fARB(GL_VERTEX_PROGRAM_ARB, 35, 0.25, 0, 0.25, 1);
-
- glEnable(GL_VERTEX_PROGRAM_ARB);
- glEnable(GL_DEPTH_TEST);
- glClearColor(0.3, 0.3, 0.3, 1);
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 250, 250 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutSpecialFunc( SpecialKey );
- glutDisplayFunc( Display );
- if (Anim)
- glutIdleFunc(Idle);
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/arbvpwarpmesh.c b/progs/tests/arbvpwarpmesh.c
deleted file mode 100644
index 3dfe94f759..0000000000
--- a/progs/tests/arbvpwarpmesh.c
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- * Warp a triangle mesh with a vertex program.
- */
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-static float Xrot = -60.0, Yrot = 0.0, Zrot = 0.0;
-static GLboolean Anim = GL_TRUE;
-static GLfloat Phi = 0.0;
-
-
-static void Idle( void )
-{
- Phi += 0.01;
- glutPostRedisplay();
-}
-
-
-static void DrawMesh( int rows, int cols )
-{
- static const GLfloat colorA[3] = { 0, 1, 0 };
- static const GLfloat colorB[3] = { 0, 0, 1 };
- const float dx = 2.0 / (cols - 1);
- const float dy = 2.0 / (rows - 1);
- float x, y;
- int i, j;
-
-#if 1
-#define COLOR3FV(c) glVertexAttrib3fvARB(3, c)
-#define VERTEX2F(x, y) glVertexAttrib2fARB(0, x, y)
-#else
-#define COLOR3FV(c) glColor3fv(c)
-#define VERTEX2F(x, y) glVertex2f(x, y)
-#endif
-
- y = -1.0;
- for (i = 0; i < rows - 1; i++) {
- glBegin(GL_QUAD_STRIP);
- x = -1.0;
- for (j = 0; j < cols; j++) {
- if ((i + j) & 1)
- COLOR3FV(colorA);
- else
- COLOR3FV(colorB);
- VERTEX2F(x, y);
- VERTEX2F(x, y + dy);
- x += dx;
- }
- glEnd();
- y += dy;
- }
-}
-
-
-static void Display( void )
-{
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- glPushMatrix();
- glRotatef(Xrot, 1, 0, 0);
- glRotatef(Yrot, 0, 1, 0);
- glRotatef(Zrot, 0, 0, 1);
-
- /* Position the gravity source */
- {
- GLfloat x, y, z, r = 0.5;
- x = r * cos(Phi);
- y = r * sin(Phi);
- z = 1.0;
- glProgramLocalParameter4fARB(GL_VERTEX_PROGRAM_ARB, 30, x, y, z, 1);
- glDisable(GL_VERTEX_PROGRAM_ARB);
- glBegin(GL_POINTS);
- glColor3f(1,1,1);
- glVertex3f(x, y, z);
- glEnd();
- }
-
- glEnable(GL_VERTEX_PROGRAM_ARB);
- DrawMesh(8, 8);
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- float ar = (float) width / (float) height;
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -1.0 * ar, 1.0 * ar, -1.0, 1.0, 5.0, 25.0 );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -12.0 );
- glScalef(2, 2, 2);
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 'a':
- Anim = !Anim;
- if (Anim)
- glutIdleFunc(Idle);
- else
- glutIdleFunc(NULL);
- break;
- case 'p':
- Phi += 0.2;
- break;
- case 'z':
- Zrot -= 5.0;
- break;
- case 'Z':
- Zrot += 5.0;
- break;
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void SpecialKey( int key, int x, int y )
-{
- const GLfloat 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( void )
-{
- GLuint prognum;
- GLint errno;
-
- /*
- * c[0..3] = modelview matrix
- * c[4..7] = inverse modelview matrix
- * c[30] = gravity source location
- * c[31] = gravity source strength
- * c[32] = light pos
- * c[35] = diffuse color
- */
- static const char prog[] =
- "!!ARBvp1.0\n"
- "TEMP R1, R2, R3; "
-
- "# Compute distance from vertex to gravity source\n"
- "ADD R1, program.local[30], -vertex.position; # vector from vertex to gravity\n"
- "DP3 R2, R1, R1; # dot product\n"
- "RSQ R2, R2.x; # square root = distance\n"
- "MUL R2, R2, program.local[31].xxxx; # scale by the gravity factor\n"
-
- "# Displace vertex by gravity factor along R1 vector\n"
- "MAD R3, R1, R2, vertex.position;\n"
-
- "# Continue with typical modelview/projection\n"
- "DP4 result.position.x, state.matrix.mvp.row[0], R3 ; # object x MVP -> clip\n"
- "DP4 result.position.y, state.matrix.mvp.row[1], R3 ;\n"
- "DP4 result.position.z, state.matrix.mvp.row[2], R3 ;\n"
- "DP4 result.position.w, state.matrix.mvp.row[3], R3 ;\n"
-
- "MOV result.color, vertex.attrib[3];\n # copy input color to output color\n"
-
- "END";
-
- if (!glutExtensionSupported("GL_ARB_vertex_program")) {
- printf("Sorry, this program requires GL_ARB_vertex_program\n");
- exit(1);
- }
-
- glGenProgramsARB(1, &prognum);
- glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum);
- glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(prog), (const GLubyte *)prog);
- errno = glGetError();
- printf("glGetError = %d\n", errno);
-
- if (errno != GL_NO_ERROR)
- {
- GLint errorpos;
-
- glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
- printf("errorpos: %d\n", errorpos);
- printf("%s\n", glGetString(GL_PROGRAM_ERROR_STRING_ARB));
- }
-
- /* Light position */
- glProgramLocalParameter4fARB(GL_VERTEX_PROGRAM_ARB, 32, 2, 2, 4, 1);
- /* Diffuse material color */
- glProgramLocalParameter4fARB(GL_VERTEX_PROGRAM_ARB, 35, 0.25, 0, 0.25, 1);
-
- /* Gravity strength */
- glProgramLocalParameter4fARB(GL_VERTEX_PROGRAM_ARB, 31, .5, 0, 0, 0);
-
- glEnable(GL_DEPTH_TEST);
- glClearColor(0.3, 0.3, 0.3, 1);
- glShadeModel(GL_FLAT);
- glPointSize(3);
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 250, 250 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutSpecialFunc( SpecialKey );
- glutDisplayFunc( Display );
- if (Anim)
- glutIdleFunc(Idle);
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/arraytexture.c b/progs/tests/arraytexture.c
deleted file mode 100644
index 48c622be30..0000000000
--- a/progs/tests/arraytexture.c
+++ /dev/null
@@ -1,337 +0,0 @@
-/*
- * (C) Copyright IBM Corporation 2007
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, and/or sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-/**
- * \file arraytexture.c
- *
- *
- * \author Ian Romanick <idr@us.ibm.com>
- */
-
-#include <assert.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <math.h>
-#include <GL/glut.h>
-#include <GL/glext.h>
-
-#if !defined(GL_EXT_texture_array) && !defined(GL_MESA_texture_array)
-# error "This demo requires enums for either GL_EXT_texture_array or GL_MESA_texture_array to build."
-#endif
-
-#include "readtex.h"
-
-#define GL_CHECK_ERROR() \
- do { \
- GLenum err = glGetError(); \
- if (err) { \
- printf("%s:%u: %s (0x%04x)\n", __FILE__, __LINE__, \
- gluErrorString(err), err); \
- } \
- } while (0)
-
-static const char *const textures[] = {
- "../images/girl.rgb",
- "../images/girl2.rgb",
- "../images/arch.rgb",
- "../images/s128.rgb",
-
- "../images/tree3.rgb",
- "../images/bw.rgb",
- "../images/reflect.rgb",
- "../images/wrs_logo.rgb",
- NULL
-};
-
-static const char frag_prog[] =
- "!!ARBfp1.0\n"
- "OPTION MESA_texture_array;\n"
- "TEX result.color, fragment.texcoord[0], texture[0], ARRAY2D;\n"
- "END\n";
-
-static GLfloat Xrot = 0, Yrot = -30, Zrot = 0;
-static GLfloat texZ = 0.0;
-static GLfloat texZ_dir = 0.01;
-static GLint num_layers;
-
-static PFNGLBINDPROGRAMARBPROC bind_program;
-static PFNGLPROGRAMSTRINGARBPROC program_string;
-static PFNGLGENPROGRAMSARBPROC gen_programs;
-
-
-static void
-PrintString(const char *s)
-{
- while (*s) {
- glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int) *s);
- s++;
- }
-}
-
-
-static void Idle(void)
-{
- static int lastTime = 0;
- int t = glutGet(GLUT_ELAPSED_TIME);
-
- if (lastTime == 0)
- lastTime = t;
- else if (t - lastTime < 10)
- return;
-
- lastTime = t;
-
- texZ += texZ_dir;
- if ((texZ < 0.0) || ((GLint) texZ > num_layers)) {
- texZ_dir = -texZ_dir;
- }
-
- glutPostRedisplay();
-}
-
-
-static void Display(void)
-{
- char str[100];
-
- glClear(GL_COLOR_BUFFER_BIT);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1, 1, -1, 1, -1, 1);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
-
- (*bind_program)(GL_FRAGMENT_PROGRAM_ARB, 0);
- glColor3f(1,1,1);
- glRasterPos3f(-0.9, -0.9, 0.0);
- sprintf(str, "Texture Z coordinate = %4.1f", texZ);
- PrintString(str);
-
- (*bind_program)(GL_FRAGMENT_PROGRAM_ARB, 1);
- GL_CHECK_ERROR();
- glEnable(GL_TEXTURE_2D_ARRAY_EXT);
- GL_CHECK_ERROR();
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 25.0);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- glTranslatef(0.0, 0.0, -8.0);
-
- glPushMatrix();
- glRotatef(Xrot, 1, 0, 0);
- glRotatef(Yrot, 0, 1, 0);
- glRotatef(Zrot, 0, 0, 1);
-
- glBegin(GL_QUADS);
- glTexCoord3f(0.0, 0.0, texZ); glVertex2f(-1.0, -1.0);
- glTexCoord3f(2.0, 0.0, texZ); glVertex2f(1.0, -1.0);
- glTexCoord3f(2.0, 2.0, texZ); glVertex2f(1.0, 1.0);
- glTexCoord3f(0.0, 2.0, texZ); glVertex2f(-1.0, 1.0);
- glEnd();
-
- glPopMatrix();
-
- glDisable(GL_TEXTURE_2D_ARRAY_EXT);
- GL_CHECK_ERROR();
- (*bind_program)(GL_FRAGMENT_PROGRAM_ARB, 0);
- GL_CHECK_ERROR();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape(int width, int height)
-{
- glViewport(0, 0, width, height);
-}
-
-
-static void Key(unsigned char key, int x, int y)
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void SpecialKey(int key, int x, int y)
-{
- const GLfloat 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 int FindLine(const char *program, int position)
-{
- int i, line = 1;
- for (i = 0; i < position; i++) {
- if (program[i] == '\n')
- line++;
- }
- return line;
-}
-
-
-static void
-compile_fragment_program(GLuint id, const char *prog)
-{
- int errorPos;
- int err;
-
- err = glGetError();
- (*bind_program)(GL_FRAGMENT_PROGRAM_ARB, id);
- (*program_string)(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(prog), (const GLubyte *) prog);
-
- glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorPos);
- err = glGetError();
- if (err != GL_NO_ERROR || errorPos != -1) {
- int l = FindLine(prog, errorPos);
-
- printf("Fragment Program Error (err=%d, pos=%d line=%d): %s\n",
- err, errorPos, l,
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
- exit(0);
- }
-}
-
-
-static void require_extension(const char *ext)
-{
- if (!glutExtensionSupported(ext)) {
- printf("Sorry, %s not supported by this renderer.\n", ext);
- exit(1);
- }
-}
-
-
-static void Init(void)
-{
- const char *const ver_string = (const char *const) glGetString(GL_VERSION);
- unsigned i;
-
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- printf("GL_VERSION = %s\n", ver_string);
-
- require_extension("GL_ARB_fragment_program");
- require_extension("GL_MESA_texture_array");
- require_extension("GL_SGIS_generate_mipmap");
-
- bind_program = glutGetProcAddress("glBindProgramARB");
- program_string = glutGetProcAddress("glProgramStringARB");
- gen_programs = glutGetProcAddress("glGenProgramsARB");
-
-
- for (num_layers = 0; textures[num_layers] != NULL; num_layers++)
- /* empty */ ;
-
- glBindTexture(GL_TEXTURE_2D_ARRAY_EXT, 1);
- glTexImage3D(GL_TEXTURE_2D_ARRAY_EXT, 0, GL_RGB8,
- 256, 256, num_layers, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL);
- GL_CHECK_ERROR();
-
- glTexParameteri(GL_TEXTURE_2D_ARRAY_EXT, GL_GENERATE_MIPMAP_SGIS,
- GL_TRUE);
-
- for (i = 0; textures[i] != NULL; i++) {
- GLint width, height;
- GLenum format;
-
- GLubyte *image = LoadRGBImage(textures[i], &width, &height, &format);
- if (!image) {
- printf("Error: could not load texture image %s\n", textures[i]);
- exit(1);
- }
-
- /* resize to 256 x 256 */
- if (width != 256 || height != 256) {
- GLubyte *newImage = malloc(256 * 256 * 4);
- gluScaleImage(format, width, height, GL_UNSIGNED_BYTE, image,
- 256, 256, GL_UNSIGNED_BYTE, newImage);
- free(image);
- image = newImage;
- }
-
- glTexSubImage3D(GL_TEXTURE_2D_ARRAY_EXT, 0,
- 0, 0, i, 256, 256, 1,
- format, GL_UNSIGNED_BYTE, image);
- free(image);
- }
- GL_CHECK_ERROR();
-
- glTexParameteri(GL_TEXTURE_2D_ARRAY_EXT, GL_TEXTURE_WRAP_S, GL_REPEAT);
- glTexParameteri(GL_TEXTURE_2D_ARRAY_EXT, GL_TEXTURE_WRAP_T, GL_REPEAT);
- glTexParameteri(GL_TEXTURE_2D_ARRAY_EXT, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
-
- glTexParameteri(GL_TEXTURE_2D_ARRAY_EXT, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
- GL_CHECK_ERROR();
- glTexParameteri(GL_TEXTURE_2D_ARRAY_EXT, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- GL_CHECK_ERROR();
-
- compile_fragment_program(1, frag_prog);
- GL_CHECK_ERROR();
-}
-
-
-int main(int argc, char *argv[])
-{
- glutInit(&argc, argv);
- glutInitWindowPosition(0, 0);
- glutInitWindowSize(350, 350);
- glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
- glutCreateWindow("Array texture test");
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutSpecialFunc(SpecialKey);
- glutDisplayFunc(Display);
- glutIdleFunc(Idle);
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/auxbuffer.c b/progs/tests/auxbuffer.c
deleted file mode 100644
index 70f0b73910..0000000000
--- a/progs/tests/auxbuffer.c
+++ /dev/null
@@ -1,499 +0,0 @@
-/*
- * Test AUX buffer rendering
- * Use GLX since GLUT doesn't support AUX buffers
- */
-
-
-/*
- * Copyright (C) 1999-2001 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.
- */
-
-/*
- * This is a port of the infamous "gears" demo to straight GLX (i.e. no GLUT)
- * Port by Brian Paul 23 March 2001
- *
- * Command line options:
- * -info print GL implementation information
- *
- */
-
-
-#include <math.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <X11/Xlib.h>
-#include <X11/keysym.h>
-#include <GL/gl.h>
-#include <GL/glx.h>
-
-
-static int
-current_time(void)
-{
- return 0;
-}
-
-
-
-
-#ifndef M_PI
-#define M_PI 3.14159265
-#endif
-
-static int WinWidth = 300, WinHeight = 300;
-static GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 0.0;
-static GLint gear1, gear2, gear3;
-static GLfloat angle = 0.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 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();
-}
-
-
-/* new window size or exposure */
-static void
-reshape(int width, int height)
-{
- GLfloat h = (GLfloat) height / (GLfloat) width;
-
- WinWidth = width;
- WinHeight = height;
- 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 };
- int i;
-
- glGetIntegerv(GL_AUX_BUFFERS, &i);
- printf("AUX BUFFERS: %d\n", i);
-
- 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);
-}
-
-
-/*
- * Create an RGB, double-buffered window.
- * Return the window and context handles.
- */
-static void
-make_window( Display *dpy, const char *name,
- int x, int y, int width, int height,
- Window *winRet, GLXContext *ctxRet)
-{
- int attrib[] = { GLX_RGBA,
- GLX_RED_SIZE, 1,
- GLX_GREEN_SIZE, 1,
- GLX_BLUE_SIZE, 1,
- GLX_DOUBLEBUFFER,
- GLX_DEPTH_SIZE, 1,
- GLX_AUX_BUFFERS, 1,
- None };
- int scrnum;
- XSetWindowAttributes attr;
- unsigned long mask;
- Window root;
- Window win;
- GLXContext ctx;
- XVisualInfo *visinfo;
-
- scrnum = DefaultScreen( dpy );
- root = RootWindow( dpy, scrnum );
-
- visinfo = glXChooseVisual( dpy, scrnum, attrib );
- if (!visinfo) {
- printf("Error: couldn't get an RGB, Double-buffered visual\n");
- exit(1);
- }
-
- /* window attributes */
- attr.background_pixel = 0;
- attr.border_pixel = 0;
- attr.colormap = XCreateColormap( dpy, root, visinfo->visual, AllocNone);
- attr.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask;
- mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask;
-
- win = XCreateWindow( dpy, root, 0, 0, width, height,
- 0, visinfo->depth, InputOutput,
- visinfo->visual, mask, &attr );
-
- /* set hints and properties */
- {
- XSizeHints sizehints;
- sizehints.x = x;
- sizehints.y = y;
- sizehints.width = width;
- sizehints.height = height;
- sizehints.flags = USSize | USPosition;
- XSetNormalHints(dpy, win, &sizehints);
- XSetStandardProperties(dpy, win, name, name,
- None, (char **)NULL, 0, &sizehints);
- }
-
- ctx = glXCreateContext( dpy, visinfo, NULL, True );
- if (!ctx) {
- printf("Error: glXCreateContext failed\n");
- exit(1);
- }
-
- XFree(visinfo);
-
- *winRet = win;
- *ctxRet = ctx;
-}
-
-
-static void
-event_loop(Display *dpy, Window win)
-{
- while (1) {
- while (XPending(dpy) > 0) {
- XEvent event;
- XNextEvent(dpy, &event);
- switch (event.type) {
- case Expose:
- /* we'll redraw below */
- break;
- case ConfigureNotify:
- reshape(event.xconfigure.width, event.xconfigure.height);
- break;
- case KeyPress:
- {
- char buffer[10];
- int r, code;
- code = XLookupKeysym(&event.xkey, 0);
- if (code == XK_Left) {
- view_roty += 5.0;
- }
- else if (code == XK_Right) {
- view_roty -= 5.0;
- }
- else if (code == XK_Up) {
- view_rotx += 5.0;
- }
- else if (code == XK_Down) {
- view_rotx -= 5.0;
- }
- else {
- r = XLookupString(&event.xkey, buffer, sizeof(buffer),
- NULL, NULL);
- if (buffer[0] == 27) {
- /* escape */
- return;
- }
- }
- }
- }
- }
-
- /* next frame */
- angle += 2.0;
-
- /* draw to aux buffer */
- glDrawBuffer(GL_AUX0);
-
- draw();
-
- /* Copy aux buffer image to back color buffer */
- glReadBuffer(GL_AUX0);
- glDrawBuffer(GL_BACK);
- glWindowPos2iARB(0, 0);
- glDisable(GL_DEPTH_TEST);
- glCopyPixels(0, 0, WinWidth, WinHeight, GL_COLOR);
- glEnable(GL_DEPTH_TEST);
-
- glXSwapBuffers(dpy, win);
-
- /* calc framerate */
- {
- static int t0 = -1;
- static int frames = 0;
- int t = current_time();
-
- if (t0 < 0)
- t0 = t;
-
- frames++;
-
- if (t - t0 >= 5.0) {
- GLfloat seconds = t - t0;
- GLfloat fps = frames / seconds;
- printf("%d frames in %3.1f seconds = %6.3f FPS\n", frames, seconds,
- fps);
- t0 = t;
- frames = 0;
- }
- }
- }
-}
-
-
-int
-main(int argc, char *argv[])
-{
- Display *dpy;
- Window win;
- GLXContext ctx;
- char *dpyName = ":0";
- GLboolean printInfo = GL_FALSE;
- int i;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-display") == 0) {
- dpyName = argv[i+1];
- i++;
- }
- else if (strcmp(argv[i], "-info") == 0) {
- printInfo = GL_TRUE;
- }
- }
-
- dpy = XOpenDisplay(dpyName);
- if (!dpy) {
- printf("Error: couldn't open display %s\n", dpyName);
- return -1;
- }
-
- make_window(dpy, "glxgears", 0, 0, WinWidth, WinHeight, &win, &ctx);
- XMapWindow(dpy, win);
- glXMakeCurrent(dpy, win, ctx);
-
- 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));
- }
-
- init();
-
- event_loop(dpy, win);
-
- glXDestroyContext(dpy, ctx);
- XDestroyWindow(dpy, win);
- XCloseDisplay(dpy);
-
- return 0;
-}
diff --git a/progs/tests/blendminmax.c b/progs/tests/blendminmax.c
deleted file mode 100644
index 2aab1a39d2..0000000000
--- a/progs/tests/blendminmax.c
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * (C) Copyright IBM Corporation 2004
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, and/or sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file blendminmax.c
- *
- * Simple test of GL_EXT_blend_minmax functionality. Four squares are drawn
- * with different blending modes, but all should be rendered with the same
- * final color.
- *
- * \author Ian Romanick <idr@us.ibm.com>
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-static int Width = 400;
-static int Height = 200;
-static const GLfloat Near = 5.0, Far = 25.0;
-
-
-static void Display( void )
-{
- glClearColor(0.2, 0.2, 0.8, 0);
- glClear( GL_COLOR_BUFFER_BIT );
-
- glPushMatrix();
-
- /* This is the "reference" square.
- */
-
- glTranslatef(-4.5, 0, 0);
- glBlendEquation( GL_FUNC_ADD );
- glBlendFunc( GL_ONE, GL_ZERO );
- glBegin(GL_QUADS);
- glColor3f( 0.5, 0.5, 0.5 );
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- glEnd();
-
-
- /* GL_MIN and GL_MAX are supposed to ignore the blend function setting.
- * To test that, we set the blend function to GL_ZERO for both color and
- * alpha each time GL_MIN or GL_MAX is used.
- *
- * Apple ships an extension called GL_ATI_blend_weighted_minmax (supported
- * on Mac OS X 10.2 and later). I believe the difference with that
- * extension is that it uses the blend function. However, I have no idea
- * what the enums are for it. The extension is listed at Apple's developer
- * site, but there is no documentation.
- *
- * http://developer.apple.com/opengl/extensions.html
- */
-
- glTranslatef(3.0, 0, 0);
- glBlendEquation( GL_FUNC_ADD );
- glBlendFunc( GL_ONE, GL_ZERO );
- glBegin(GL_QUADS);
- glColor3f( 0.5, 0.5, 0.5 );
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- glEnd();
-
- glBlendEquation( GL_MAX );
- glBlendFunc( GL_ZERO, GL_ZERO );
- glBegin(GL_QUADS);
- glColor3f( 0.2, 0.2, 0.2 );
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- glEnd();
-
-
- glTranslatef(3.0, 0, 0);
- glBlendEquation( GL_FUNC_ADD );
- glBlendFunc( GL_ONE, GL_ZERO );
- glBegin(GL_QUADS);
- glColor3f( 0.5, 0.5, 0.5 );
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- glEnd();
-
- glBlendEquation( GL_MIN );
- glBlendFunc( GL_ZERO, GL_ZERO );
- glBegin(GL_QUADS);
- glColor3f( 0.8, 0.8, 0.8 );
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- glEnd();
-
-
- glTranslatef(3.0, 0, 0);
- glBlendEquation( GL_FUNC_ADD );
- glBlendFunc( GL_ONE, GL_ZERO );
- glBegin(GL_QUADS);
- glColor3f( 0.8, 0.8, 0.8 );
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- glEnd();
-
- glBlendEquation( GL_MIN );
- glBlendFunc( GL_ZERO, GL_ZERO );
- glBegin(GL_QUADS);
- glColor3f( 0.5, 0.5, 0.5 );
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- glEnd();
-
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- GLfloat ar = (float) width / (float) height;
- Width = width;
- Height = height;
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -ar, ar, -1.0, 1.0, Near, Far );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -15.0 );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void Init( void )
-{
- const char * const ver_string = (const char * const)
- glGetString( GL_VERSION );
-
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- printf("GL_VERSION = %s\n", ver_string);
-
- if ( !glutExtensionSupported("GL_ARB_imaging") && !glutExtensionSupported("GL_EXT_blend_minmax")) {
- printf("Sorry, this program requires either GL_ARB_imaging or GL_EXT_blend_minmax.\n");
- exit(1);
- }
-
- printf("\nAll 4 squares should be the same color.\n");
- glEnable( GL_BLEND );
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( Width, Height );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
- glutCreateWindow( "GL_EXT_blend_minmax test" );
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/blendsquare.c b/progs/tests/blendsquare.c
deleted file mode 100644
index 1694866a55..0000000000
--- a/progs/tests/blendsquare.c
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * (C) Copyright IBM Corporation 2004
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, and/or sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file blendsquare.c
- *
- * Simple test of GL_NV_blend_square functionality. Four squares are drawn
- * with different blending modes, but all should be rendered with the same
- * final color.
- *
- * \author Ian Romanick <idr@us.ibm.com>
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-static int Width = 400;
-static int Height = 200;
-static const GLfloat Near = 5.0, Far = 25.0;
-
-
-static void Display( void )
-{
- glClearColor(0.2, 0.2, 0.8, 0);
- glClear( GL_COLOR_BUFFER_BIT );
-
- glPushMatrix();
-
- glTranslatef(-4.5, 0, 0);
- glBlendFunc( GL_ONE, GL_ZERO );
- glBegin(GL_QUADS);
- glColor3f( 0.5 * 0.5, 0.5 * 0.5, 0.5 * 0.5 );
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- glEnd();
-
-
- glTranslatef(3.0, 0, 0);
- glBlendFunc( GL_ONE, GL_ZERO );
- glBegin(GL_QUADS);
- glColor3f( 0.5, 0.5, 0.5 );
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- glEnd();
-
- glBlendFunc( GL_DST_COLOR, GL_ZERO );
- glBegin(GL_QUADS);
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- glEnd();
-
-
- glTranslatef(3.0, 0, 0);
- glBlendFunc( GL_SRC_COLOR, GL_ZERO );
- glBegin(GL_QUADS);
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- glEnd();
-
-
- glTranslatef(3.0, 0, 0);
- glBlendFunc( GL_ONE, GL_ZERO );
- glBegin(GL_QUADS);
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- glEnd();
-
- glBlendFunc( GL_ZERO, GL_DST_COLOR );
- glBegin(GL_QUADS);
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- glEnd();
-
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- GLfloat ar = (float) width / (float) height;
- Width = width;
- Height = height;
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -ar, ar, -1.0, 1.0, Near, Far );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -15.0 );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void Init( void )
-{
- const char * const ver_string = (const char * const)
- glGetString( GL_VERSION );
- const double version = strtod( ver_string, NULL );
-
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- printf("GL_VERSION = %s\n", ver_string);
-
- if ( (version < 1.4) && !glutExtensionSupported("GL_NV_blend_square")) {
- printf("Sorry, this program requires either OpenGL 1.4 or GL_NV_blend_square\n");
- exit(1);
- }
-
- printf("\nAll 4 squares should be the same color. The two on the left are drawn\n"
- "without NV_blend_square functionality, and the two on the right are drawn\n"
- "with NV_blend_square functionality. If the two on the left are dark, but\n"
- "the two on the right are not, then NV_blend_square is broken.\n");
- glEnable( GL_BLEND );
- glBlendEquation( GL_FUNC_ADD );
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( Width, Height );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
- glutCreateWindow( "GL_NV_blend_square test" );
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/bufferobj.c b/progs/tests/bufferobj.c
deleted file mode 100644
index 50ab5cdfa8..0000000000
--- a/progs/tests/bufferobj.c
+++ /dev/null
@@ -1,371 +0,0 @@
-/*
- * Test GL_ARB_vertex_buffer_object
- *
- * Brian Paul
- * 16 Sep 2003
- */
-
-
-#define GL_GLEXT_PROTOTYPES
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <GL/glut.h>
-
-#define NUM_OBJECTS 10
-
-struct object
-{
- GLuint BufferID;
- GLuint ElementsBufferID;
- GLuint NumVerts;
- GLuint VertexOffset;
- GLuint ColorOffset;
- GLuint NumElements;
-};
-
-static struct object Objects[NUM_OBJECTS];
-static GLuint NumObjects;
-
-static GLuint Win;
-
-static GLfloat Xrot = 0, Yrot = 0, Zrot = 0;
-static GLboolean Anim = GL_TRUE;
-
-
-static void CheckError(int line)
-{
- GLenum err = glGetError();
- if (err) {
- printf("GL Error 0x%x at line %d\n", (int) err, line);
- }
-}
-
-
-static void DrawObject( const struct object *obj )
-{
- glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj->BufferID);
- glVertexPointer(3, GL_FLOAT, 0, (void *) obj->VertexOffset);
- glEnable(GL_VERTEX_ARRAY);
-
- /* test push/pop attrib */
- /* XXX this leads to a segfault with NVIDIA's 53.36 driver */
-#if 0
- if (1)
- {
- glPushClientAttrib(GL_CLIENT_VERTEX_ARRAY_BIT);
- /*glVertexPointer(3, GL_FLOAT, 0, (void *) (obj->VertexOffset + 10000));*/
- glBindBufferARB(GL_ARRAY_BUFFER_ARB, 999999);
- glPopClientAttrib();
- }
-#endif
- glColorPointer(3, GL_FLOAT, 0, (void *) obj->ColorOffset);
- glEnable(GL_COLOR_ARRAY);
-
- if (obj->NumElements > 0) {
- /* indexed arrays */
- glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, obj->ElementsBufferID);
- glDrawElements(GL_LINE_LOOP, obj->NumElements, GL_UNSIGNED_INT, NULL);
- }
- else {
- /* non-indexed arrays */
- glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 0);
- glDrawArrays(GL_LINE_LOOP, 0, obj->NumVerts);
- }
-}
-
-
-static void Idle( void )
-{
- Zrot = 0.05 * glutGet(GLUT_ELAPSED_TIME);
- glutPostRedisplay();
-}
-
-
-static void Display( void )
-{
- int i;
-
- glClear( GL_COLOR_BUFFER_BIT );
-
- for (i = 0; i < NumObjects; i++) {
- float x = 5.0 * ((float) i / (NumObjects-1) - 0.5);
- glPushMatrix();
- glTranslatef(x, 0, 0);
- glRotatef(Xrot, 1, 0, 0);
- glRotatef(Yrot, 0, 1, 0);
- glRotatef(Zrot, 0, 0, 1);
-
- DrawObject(Objects + i);
-
- glPopMatrix();
- }
-
- CheckError(__LINE__);
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- float ar = (float) width / (float) height;
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -ar, ar, -1.0, 1.0, 5.0, 25.0 );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -15.0 );
-}
-
-
-static void FreeBuffers(void)
-{
- int i;
- for (i = 0; i < NUM_OBJECTS; i++)
- glDeleteBuffersARB(1, &Objects[i].BufferID);
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- const GLfloat step = 3.0;
- (void) x;
- (void) y;
- switch (key) {
- case 'a':
- Anim = !Anim;
- if (Anim)
- glutIdleFunc(Idle);
- else
- glutIdleFunc(NULL);
- break;
- case 'z':
- Zrot -= step;
- break;
- case 'Z':
- Zrot += step;
- break;
- case 27:
- FreeBuffers();
- glutDestroyWindow(Win);
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void SpecialKey( int key, int x, int y )
-{
- const GLfloat 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 MakeObject1(struct object *obj)
-{
- GLfloat *v, *c;
- void *p;
- int i;
- GLubyte buffer[500];
-
- for (i = 0; i < 500; i++)
- buffer[i] = i & 0xff;
-
- obj->BufferID = 0;
- glGenBuffersARB(1, &obj->BufferID);
- assert(obj->BufferID != 0);
- glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj->BufferID);
- glBufferDataARB(GL_ARRAY_BUFFER_ARB, 500, buffer, GL_STATIC_DRAW_ARB);
-
- for (i = 0; i < 500; i++)
- buffer[i] = 0;
-
- glGetBufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, 500, buffer);
-
- for (i = 0; i < 500; i++)
- assert(buffer[i] == (i & 0xff));
-
- glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_MAPPED_ARB, &i);
- assert(!i);
-
- glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_USAGE_ARB, &i);
-
- v = (GLfloat *) glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
-
- /* do some sanity tests */
- glGetBufferPointervARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_MAP_POINTER_ARB, &p);
- assert(p == v);
-
- glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_SIZE_ARB, &i);
- assert(i == 500);
-
- glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_USAGE_ARB, &i);
- assert(i == GL_STATIC_DRAW_ARB);
-
- glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_ACCESS_ARB, &i);
- assert(i == GL_WRITE_ONLY_ARB);
-
- glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_MAPPED_ARB, &i);
- assert(i);
-
- /* Make rectangle */
- v[0] = -1; v[1] = -1; v[2] = 0;
- v[3] = 1; v[4] = -1; v[5] = 0;
- v[6] = 1; v[7] = 1; v[8] = 0;
- v[9] = -1; v[10] = 1; v[11] = 0;
- c = v + 12;
- c[0] = 1; c[1] = 0; c[2] = 0;
- c[3] = 1; c[4] = 0; c[5] = 0;
- c[6] = 1; c[7] = 0; c[8] = 1;
- c[9] = 1; c[10] = 0; c[11] = 1;
- obj->NumVerts = 4;
- obj->VertexOffset = 0;
- obj->ColorOffset = 3 * sizeof(GLfloat) * obj->NumVerts;
- obj->NumElements = 0;
-
- glUnmapBufferARB(GL_ARRAY_BUFFER_ARB);
-
- glGetBufferPointervARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_MAP_POINTER_ARB, &p);
- assert(!p);
-
- glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_MAPPED_ARB, &i);
- assert(!i);
-}
-
-
-static void MakeObject2(struct object *obj)
-{
- GLfloat *v, *c;
-
- glGenBuffersARB(1, &obj->BufferID);
- glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj->BufferID);
- glBufferDataARB(GL_ARRAY_BUFFER_ARB, 1000, NULL, GL_STATIC_DRAW_ARB);
- v = (GLfloat *) glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
-
- /* Make triangle */
- v[0] = -1; v[1] = -1; v[2] = 0;
- v[3] = 1; v[4] = -1; v[5] = 0;
- v[6] = 0; v[7] = 1; v[8] = 0;
- c = v + 9;
- c[0] = 0; c[1] = 1; c[2] = 0;
- c[3] = 0; c[4] = 1; c[5] = 0;
- c[6] = 1; c[7] = 1; c[8] = 0;
- obj->NumVerts = 3;
- obj->VertexOffset = 0;
- obj->ColorOffset = 3 * sizeof(GLfloat) * obj->NumVerts;
- obj->NumElements = 0;
-
- glUnmapBufferARB(GL_ARRAY_BUFFER_ARB);
-}
-
-
-static void MakeObject3(struct object *obj)
-{
- GLfloat vertexData[1000];
- GLfloat *v, *c;
- GLuint *i;
- int bytes;
-
- /* Make rectangle */
- v = vertexData;
- v[0] = -1; v[1] = -0.5; v[2] = 0;
- v[3] = 1; v[4] = -0.5; v[5] = 0;
- v[6] = 1; v[7] = 0.5; v[8] = 0;
- v[9] = -1; v[10] = 0.5; v[11] = 0;
- c = vertexData + 12;
- c[0] = 0; c[1] = 0; c[2] = 1;
- c[3] = 0; c[4] = 0; c[5] = 1;
- c[6] = 0; c[7] = 1; c[8] = 1;
- c[9] = 0; c[10] = 1; c[11] = 1;
- obj->NumVerts = 4;
- obj->VertexOffset = 0;
- obj->ColorOffset = 3 * sizeof(GLfloat) * obj->NumVerts;
-
- bytes = obj->NumVerts * (3 + 3) * sizeof(GLfloat);
-
- /* Don't use glMap/UnmapBuffer for this object */
- glGenBuffersARB(1, &obj->BufferID);
- glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj->BufferID);
- glBufferDataARB(GL_ARRAY_BUFFER_ARB, bytes, vertexData, GL_STATIC_DRAW_ARB);
-
- /* Setup a buffer of indices to test the ELEMENTS path */
- glGenBuffersARB(1, &obj->ElementsBufferID);
- glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, obj->ElementsBufferID);
- glBufferDataARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 100, NULL, GL_STATIC_DRAW_ARB);
- i = (GLuint *) glMapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_READ_WRITE_ARB);
- i[0] = 0;
- i[1] = 1;
- i[2] = 2;
- i[3] = 3;
- glUnmapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB);
- obj->NumElements = 4;
-}
-
-
-
-static void Init( void )
-{
- if (!glutExtensionSupported("GL_ARB_vertex_buffer_object")) {
- printf("GL_ARB_vertex_buffer_object not found!\n");
- exit(0);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Test buffer object deletion */
- if (1) {
- static GLubyte data[1000];
- GLuint id = 999;
- glBindBufferARB(GL_ARRAY_BUFFER_ARB, id);
- glBufferDataARB(GL_ARRAY_BUFFER_ARB, 1000, data, GL_STATIC_DRAW_ARB);
- glVertexPointer(3, GL_FLOAT, 0, (void *) 0);
- glDeleteBuffersARB(1, &id);
- assert(!glIsBufferARB(id));
- glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
- glVertexPointer(3, GL_FLOAT, 0, (void *) 0);
- assert(!glIsBufferARB(id));
- }
-
- MakeObject1(Objects + 0);
- MakeObject2(Objects + 1);
- MakeObject3(Objects + 2);
- NumObjects = 3;
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 600, 300 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
- Win = glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutSpecialFunc( SpecialKey );
- glutDisplayFunc( Display );
- if (Anim)
- glutIdleFunc(Idle);
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/bug_3050.c b/progs/tests/bug_3050.c
deleted file mode 100644
index 4ea7b80f23..0000000000
--- a/progs/tests/bug_3050.c
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * (C) Copyright IBM Corporation 2006
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, and/or sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file bug_3050.c
- *
- * Simple regression test for bug #3050. Create a texture and make a few
- * calls to \c glGetTexLevelParameteriv. If the bug still exists, trying
- * to get \c GL_TEXTURE_WITDH will cause a protocol error.
- *
- * This test \b only applies to indirect-rendering. This may mean that the
- * test needs to be run with the environment variable \c LIBGL_ALWAYS_INDIRECT
- * set to a non-zero value.
- *
- * \author Ian Romanick <idr@us.ibm.com>
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <GL/glut.h>
-
-static int Width = 400;
-static int Height = 200;
-static const GLfloat Near = 5.0, Far = 25.0;
-
-
-static void Display( void )
-{
-}
-
-
-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);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void Init( void )
-{
- unsigned i;
- static const GLenum pnames[] = {
- GL_TEXTURE_RED_SIZE,
- GL_TEXTURE_GREEN_SIZE,
- GL_TEXTURE_BLUE_SIZE,
- GL_TEXTURE_ALPHA_SIZE,
- GL_TEXTURE_LUMINANCE_SIZE,
- GL_TEXTURE_INTENSITY_SIZE,
- GL_TEXTURE_BORDER,
- GL_TEXTURE_INTERNAL_FORMAT,
- GL_TEXTURE_WIDTH,
- GL_TEXTURE_HEIGHT,
- GL_TEXTURE_DEPTH,
- ~0
- };
-
-
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
-
- printf("\nThis program should log some data about a texture and exit.\n");
- printf("This is a regression test for bug #3050. If the bug still\n");
- printf("exists, a GLX protocol error will be generated.\n");
- printf("https://bugs.freedesktop.org/show_bug.cgi?id=3050\n\n");
-
-
- if ( ! glutExtensionSupported( "GL_NV_texture_rectangle" )
- && ! glutExtensionSupported( "GL_EXT_texture_rectangle" )
- && ! glutExtensionSupported( "GL_ARB_texture_rectangle" ) ) {
- printf( "This test requires one of GL_ARB_texture_rectangle, GL_EXT_texture_rectangle,\n"
- "or GL_NV_texture_rectangle be supported\n." );
- exit( 1 );
- }
-
-
- glBindTexture( GL_TEXTURE_RECTANGLE_NV, 1 );
- glTexImage2D( GL_PROXY_TEXTURE_RECTANGLE_NV, 0, GL_RGBA, 8, 8, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, NULL );
-
- for ( i = 0 ; pnames[i] != ~0 ; i++ ) {
- GLint param_i;
- GLfloat param_f;
- GLenum err;
-
- glGetTexLevelParameteriv( GL_PROXY_TEXTURE_RECTANGLE_NV, 0, pnames[i], & param_i );
- err = glGetError();
-
- if ( err ) {
- printf("glGetTexLevelParameteriv(GL_PROXY_TEXTURE_RECTANGLE_NV, 0, 0x%04x, & param) generated a GL\n"
- "error of 0x%04x!",
- pnames[i], err );
- exit( 1 );
- }
- else {
- printf("glGetTexLevelParameteriv(GL_PROXY_TEXTURE_RECTANGLE_NV, 0, 0x%04x, & param) = 0x%04x\n",
- pnames[i], param_i );
- }
-
-
- glGetTexLevelParameterfv( GL_PROXY_TEXTURE_RECTANGLE_NV, 0, pnames[i], & param_f );
- err = glGetError();
-
- if ( err ) {
- printf("glGetTexLevelParameterfv(GL_PROXY_TEXTURE_RECTANGLE_NV, 0, 0x%04x, & param) generated a GL\n"
- "error of 0x%04x!\n",
- pnames[i], err );
- exit( 1 );
- }
- else {
- printf("glGetTexLevelParameterfv(GL_PROXY_TEXTURE_RECTANGLE_NV, 0, 0x%04x, & param) = %.1f (0x%04x)\n",
- pnames[i], param_f, (GLint) param_f );
- }
- }
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( Width, Height );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
- glutCreateWindow( "Bug #3050 Test" );
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- return 0;
-}
diff --git a/progs/tests/bug_3101.c b/progs/tests/bug_3101.c
deleted file mode 100644
index 761dcbb951..0000000000
--- a/progs/tests/bug_3101.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * (C) Copyright IBM Corporation 2005
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, and/or sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file bug_3101.c
- *
- * Simple regression test for bug #3101. Attempt to draw a single square.
- * After emiting the first vertex, call \c glEdgeFlag to change the vertex
- * format. If the bug still exists, this will cause a segfault.
- *
- * \author Ian Romanick <idr@us.ibm.com>
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-static int Width = 400;
-static int Height = 200;
-static const GLfloat Near = 5.0, Far = 25.0;
-
-
-static void Display( void )
-{
- glClearColor(0.2, 0.2, 0.8, 0);
- glClear( GL_COLOR_BUFFER_BIT );
-
- glPushMatrix();
-
- /* This is the "reference" square.
- */
-
- glTranslatef(-4.5, 0, 0);
- glBlendEquation( GL_FUNC_ADD );
- glBlendFunc( GL_ONE, GL_ZERO );
- glBegin(GL_QUADS);
- glColor3f( 0.5, 0.5, 0.5 );
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glEdgeFlag(GL_TRUE);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- glEnd();
-
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- GLfloat ar = (float) width / (float) height;
- Width = width;
- Height = height;
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -ar, ar, -1.0, 1.0, Near, Far );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -15.0 );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void Init( void )
-{
- const char * const ver_string = (const char * const)
- glGetString( GL_VERSION );
-
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- printf("GL_VERSION = %s\n", ver_string);
-
- printf("\nThis program should draw a single square, but not crash.\n");
- printf("This is a regression test for bug #3101.\n");
- printf("https://bugs.freedesktop.org/show_bug.cgi?id=3101\n");
- glEnable( GL_BLEND );
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( Width, Height );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
- glutCreateWindow( "Bug #3101 Test" );
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/bug_3195.c b/progs/tests/bug_3195.c
deleted file mode 100644
index 4aceae04ab..0000000000
--- a/progs/tests/bug_3195.c
+++ /dev/null
@@ -1,275 +0,0 @@
-/*
- * Copyright (C) 2000 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.
- */
-
-/**
- * \file bug_3195.c
- *
- * Simple regression test for bug #3195. A bug in the i180 driver caused
- * a segfault (inside the driver) when the LOD bias is adjusted and no texture
- * is enabled. This test, which is based on progs/demos/lodbias.c, sets up
- * all the texturing, disables all textures, adjusts the LOD bias, then
- * re-enables \c GL_TEXTURE_2D.
- *
- * \author Brian Paul
- * \author Ian Romanick <idr@us.ibm.com>
- */
-
-#include <assert.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <math.h>
-#include <GL/glut.h>
-#include <GL/glext.h>
-
-#include "readtex.h"
-
-#define TEXTURE_FILE "../images/girl.rgb"
-
-static GLfloat Xrot = 0, Yrot = -30, Zrot = 0;
-static GLint Bias = 0, BiasStepSign = +1; /* ints avoid fp precision problem */
-static GLint BiasMin = -400, BiasMax = 400;
-
-
-
-static void
-PrintString(const char *s)
-{
- while (*s) {
- glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int) *s);
- s++;
- }
-}
-
-static void Idle( void )
-{
- static int lastTime = 0;
- int time = glutGet(GLUT_ELAPSED_TIME);
- int step;
-
- if (lastTime == 0)
- lastTime = time;
- else if (time - lastTime < 10)
- return;
-
- step = (time - lastTime) / 10 * BiasStepSign;
- lastTime = time;
-
- Bias += step;
- if (Bias < BiasMin) {
- exit(0);
- }
- else if (Bias > BiasMax) {
- Bias = BiasMax;
- BiasStepSign = -1;
- }
-
- glutPostRedisplay();
-}
-
-
-static void Display( void )
-{
- char str[100];
-
- glClear( GL_COLOR_BUFFER_BIT );
-
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glOrtho(-1, 1, -1, 1, -1, 1);
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
-
- glDisable(GL_TEXTURE_2D);
- glColor3f(1,1,1);
- glRasterPos3f(-0.9, -0.9, 0.0);
- sprintf(str, "Texture LOD Bias = %4.1f", Bias * 0.01);
- PrintString(str);
-
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -8.0 );
-
- glPushMatrix();
- glRotatef(Xrot, 1, 0, 0);
- glRotatef(Yrot, 0, 1, 0);
- glRotatef(Zrot, 0, 0, 1);
-
- glTexEnvf(GL_TEXTURE_FILTER_CONTROL_EXT, GL_TEXTURE_LOD_BIAS_EXT, 0.01 * Bias);
- glEnable(GL_TEXTURE_2D);
-
- glBegin(GL_POLYGON);
- glTexCoord2f(0, 0); glVertex2f(-1, -1);
- glTexCoord2f(2, 0); glVertex2f( 1, -1);
- glTexCoord2f(2, 2); glVertex2f( 1, 1);
- glTexCoord2f(0, 2); glVertex2f(-1, 1);
- glEnd();
-
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void SpecialKey( int key, int x, int y )
-{
- const GLfloat 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( void )
-{
- GLfloat maxBias;
- const char * const ver_string = (const char * const)
- glGetString( GL_VERSION );
-
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- printf("GL_VERSION = %s\n", ver_string);
-
- printf("\nThis program should function nearly identically to Mesa's lodbias demo.\n"
- "It should cycle through the complet LOD bias range once and exit. If bug\n"
- "#3195 still exists, the demo should crash almost immediatly.\n");
- printf("This is a regression test for bug #3195.\n");
- printf("https://bugs.freedesktop.org/show_bug.cgi?id=3195\n");
-
- if (!glutExtensionSupported("GL_EXT_texture_lod_bias")) {
- printf("Sorry, GL_EXT_texture_lod_bias not supported by this renderer.\n");
- exit(1);
- }
-
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-
- if (glutExtensionSupported("GL_SGIS_generate_mipmap")) {
- /* test auto mipmap generation */
- GLint width, height, i;
- GLenum format;
- GLubyte *image = LoadRGBImage(TEXTURE_FILE, &width, &height, &format);
- if (!image) {
- printf("Error: could not load texture image %s\n", TEXTURE_FILE);
- exit(1);
- }
- /* resize to 256 x 256 */
- if (width != 256 || height != 256) {
- GLubyte *newImage = malloc(256 * 256 * 4);
- gluScaleImage(format, width, height, GL_UNSIGNED_BYTE, image,
- 256, 256, GL_UNSIGNED_BYTE, newImage);
- free(image);
- image = newImage;
- }
- printf("Using GL_SGIS_generate_mipmap\n");
- glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, GL_TRUE);
- glTexImage2D(GL_TEXTURE_2D, 0, format, 256, 256, 0,
- format, GL_UNSIGNED_BYTE, image);
- free(image);
-
- /* make sure mipmap was really generated correctly */
- width = height = 256;
- for (i = 0; i < 9; i++) {
- GLint w, h;
- glGetTexLevelParameteriv(GL_TEXTURE_2D, i, GL_TEXTURE_WIDTH, &w);
- glGetTexLevelParameteriv(GL_TEXTURE_2D, i, GL_TEXTURE_HEIGHT, &h);
- printf("Level %d size: %d x %d\n", i, w, h);
- assert(w == width);
- assert(h == height);
- width /= 2;
- height /= 2;
- }
-
- }
- else if (!LoadRGBMipmaps(TEXTURE_FILE, GL_RGB)) {
- printf("Error: could not load texture image %s\n", TEXTURE_FILE);
- exit(1);
- }
-
- /* mipmapping required for this extension */
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
-
- glGetFloatv(GL_MAX_TEXTURE_LOD_BIAS_EXT, &maxBias);
- printf("LOD bias range: [%g, %g]\n", -maxBias, maxBias);
- BiasMin = -100 * maxBias;
- BiasMax = 100 * maxBias;
-
- /* Since we have (about) 8 mipmap levels, no need to bias beyond
- * the range [-1, +8].
- */
- if (BiasMin < -100)
- BiasMin = -100;
- if (BiasMax > 800)
- BiasMax = 800;
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 350, 350 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
- glutCreateWindow( "Bug #3195 Test" );
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutSpecialFunc( SpecialKey );
- glutDisplayFunc( Display );
- glutIdleFunc(Idle);
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/copypixrate.c b/progs/tests/copypixrate.c
deleted file mode 100644
index e9a42a1c8c..0000000000
--- a/progs/tests/copypixrate.c
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
- * Measure glCopyPixels speed
- *
- * Brian Paul
- * 26 Jan 2006
- */
-
-#define GL_GLEXT_PROTOTYPES
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <GL/glut.h>
-
-static GLint WinWidth = 1000, WinHeight = 800;
-static GLint ImgWidth, ImgHeight;
-
-static GLenum Buffer = GL_FRONT;
-static GLenum AlphaTest = GL_FALSE;
-static GLboolean UseBlit = GL_FALSE;
-
-static PFNGLBLITFRAMEBUFFEREXTPROC glBlitFramebufferEXT_func = NULL;
-
-
-/**
- * draw teapot in lower-left corner of window
- */
-static void
-DrawTestImage(void)
-{
- GLfloat ar;
-
- ImgWidth = WinWidth / 3;
- ImgHeight = WinHeight / 3;
-
- glViewport(0, 0, ImgWidth, ImgHeight);
- glScissor(0, 0, ImgWidth, ImgHeight);
- glEnable(GL_SCISSOR_TEST);
-
- glClearColor(0.5, 0.5, 0.5, 0.0);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- ar = (float) WinWidth / WinHeight;
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glFrustum(-ar, ar, -1.0, 1.0, 5.0, 25.0);
- glMatrixMode(GL_MODELVIEW);
-
- glEnable(GL_LIGHTING);
- glEnable(GL_LIGHT0);
- glEnable(GL_DEPTH_TEST);
- glFrontFace(GL_CW);
- glPushMatrix();
- glRotatef(45, 1, 0, 0);
- glutSolidTeapot(2.0);
- glPopMatrix();
- glFrontFace(GL_CCW);
- glDisable(GL_DEPTH_TEST);
- glDisable(GL_LIGHTING);
-
- glDisable(GL_SCISSOR_TEST);
-
- glViewport(0, 0, WinWidth, WinHeight);
- glFinish();
-}
-
-
-static int
-Rand(int max)
-{
- return ((int) random()) % max;
-}
-
-
-/**
- * Measure glCopyPixels rate
- */
-static void
-RunTest(void)
-{
- double t1, t0 = glutGet(GLUT_ELAPSED_TIME) / 1000.0;
- int iters = 0;
- float copyRate, mbRate;
- int r, g, b, a, bpp;
-
- if (AlphaTest) {
- glEnable(GL_ALPHA_TEST);
- glAlphaFunc(GL_GREATER, 0.0);
- }
-
- glGetIntegerv(GL_RED_BITS, &r);
- glGetIntegerv(GL_GREEN_BITS, &g);
- glGetIntegerv(GL_BLUE_BITS, &b);
- glGetIntegerv(GL_ALPHA_BITS, &a);
- bpp = (r + g + b + a) / 8;
-
- do {
- int x, y;
- x = Rand(WinWidth);
- y = Rand(WinHeight);
-
- if (x > ImgWidth || y > ImgHeight) {
-#ifdef GL_EXT_framebuffer_blit
- if (UseBlit)
- {
- glBlitFramebufferEXT_func(0, 0, ImgWidth, ImgHeight,
- x, y, x + ImgWidth, y + ImgHeight,
- GL_COLOR_BUFFER_BIT, GL_LINEAR);
- }
- else
-#endif
- {
- glWindowPos2iARB(x, y);
- glCopyPixels(0, 0, ImgWidth, ImgHeight, GL_COLOR);
- }
- glFinish(); /* XXX OK? */
-
- iters++;
-
- t1 = glutGet(GLUT_ELAPSED_TIME) / 1000.0;
- }
- } while (t1 - t0 < 5.0);
-
- glDisable(GL_ALPHA_TEST);
-
- copyRate = iters / (t1 - t0);
- mbRate = ImgWidth * ImgHeight * bpp * copyRate / (1024 * 1024);
-
- printf("Image size: %d x %d, %d Bpp\n", ImgWidth, ImgHeight, bpp);
- printf("%d copies in %.2f = %.2f copies/sec, %.2f MB/s\n",
- iters, t1-t0, copyRate, mbRate);
-}
-
-
-static void
-Draw(void)
-{
- glClearColor(0.0, 0.0, 0.0, 0.0);
- glClearColor(0.2, 0.2, 0.8, 0);
- glReadBuffer(Buffer);
- glDrawBuffer(Buffer);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- DrawTestImage();
-
- RunTest();
-
- if (Buffer == GL_FRONT)
- glFinish();
- else
- glutSwapBuffers();
-
- printf("exiting\n");
- exit(0);
-}
-
-
-static void
-Reshape(int width, int height)
-{
- glViewport(0, 0, width, height);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 25.0);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- glTranslatef(0.0, 0.0, -15.0);
-}
-
-
-static void
-Key(unsigned char key, int x, int y)
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-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
-ParseArgs(int argc, char *argv[])
-{
- int i;
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-back") == 0)
- Buffer = GL_BACK;
- else if (strcmp(argv[i], "-alpha") == 0)
- AlphaTest = GL_TRUE;
- else if (strcmp(argv[i], "-blit") == 0)
- UseBlit = GL_TRUE;
- }
-}
-
-
-static void
-Init(void)
-{
- if (glutExtensionSupported("GL_EXT_framebuffer_blit")) {
- glBlitFramebufferEXT_func = (PFNGLBLITFRAMEBUFFEREXTPROC)
- glutGetProcAddress("glBlitFramebufferEXT");
- }
- else if (UseBlit) {
- printf("Warning: GL_EXT_framebuffer_blit not supported.\n");
- UseBlit = GL_FALSE;
- }
-}
-
-
-int
-main(int argc, char *argv[])
-{
- GLint mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE | GLUT_DEPTH;
- glutInit(&argc, argv);
-
- ParseArgs(argc, argv);
- if (AlphaTest)
- mode |= GLUT_ALPHA;
-
- glutInitWindowPosition(0, 0);
- glutInitWindowSize(WinWidth, WinHeight);
- glutInitDisplayMode(mode);
- glutCreateWindow(argv[0]);
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutSpecialFunc(SpecialKey);
- glutDisplayFunc(Draw);
-
- printf("GL_RENDERER: %s\n", (char *) glGetString(GL_RENDERER));
- printf("Draw Buffer: %s\n", (Buffer == GL_BACK) ? "Back" : "Front");
- Init();
-
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/crossbar.c b/progs/tests/crossbar.c
deleted file mode 100644
index 12aabb1c9a..0000000000
--- a/progs/tests/crossbar.c
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
- * (C) Copyright IBM Corporation 2005
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, and/or sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file crossbar.c
- *
- * Simple test of GL_ARB_texture_env_crossbar functionality. Several squares
- * are drawn with different texture combine modes, but all should be rendered
- * with the same final color.
- *
- * \author Ian Romanick <idr@us.ibm.com>
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <GL/glut.h>
-
-static const GLint tests[][8] = {
- { 1, GL_REPLACE, GL_PRIMARY_COLOR, GL_PRIMARY_COLOR,
- 2, GL_REPLACE, GL_TEXTURE, GL_PRIMARY_COLOR },
- { 3, GL_REPLACE, GL_PRIMARY_COLOR, GL_PRIMARY_COLOR,
- 2, GL_SUBTRACT, GL_TEXTURE0, GL_TEXTURE1 },
- { 2, GL_REPLACE, GL_PRIMARY_COLOR, GL_PRIMARY_COLOR,
- 2, GL_REPLACE, GL_TEXTURE0, GL_TEXTURE0 },
- { 2, GL_REPLACE, GL_PRIMARY_COLOR, GL_PRIMARY_COLOR,
- 1, GL_SUBTRACT, GL_TEXTURE0, GL_TEXTURE1 },
- { 3, GL_ADD, GL_TEXTURE1, GL_TEXTURE1,
- 2, GL_MODULATE, GL_TEXTURE1, GL_PREVIOUS },
- { 3, GL_ADD, GL_TEXTURE1, GL_TEXTURE1,
- 4, GL_MODULATE, GL_TEXTURE0, GL_PREVIOUS },
-};
-
-#define NUM_TESTS (sizeof(tests) / sizeof(tests[0]))
-
-static int Width = 100 * (NUM_TESTS + 1);
-static int Height = 200;
-static const GLfloat Near = 5.0, Far = 25.0;
-
-
-static void Display( void )
-{
- unsigned i;
-
-
- glClearColor(0.2, 0.2, 0.8, 0);
- glClear( GL_COLOR_BUFFER_BIT );
-
- glPushMatrix();
-
- /* This is the "reference" square.
- */
-
- glActiveTexture( GL_TEXTURE0 );
- glDisable( GL_TEXTURE_2D );
- glActiveTexture( GL_TEXTURE1 );
- glDisable( GL_TEXTURE_2D );
-
- glTranslatef(-(NUM_TESTS * 1.5), 0, 0);
- glBegin(GL_QUADS);
- glColor3f( 0.5, 0.5, 0.5 );
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- glEnd();
-
- for ( i = 0 ; i < NUM_TESTS ; i++ ) {
- glActiveTexture( GL_TEXTURE0 );
- glEnable( GL_TEXTURE_2D );
- glBindTexture( GL_TEXTURE_2D, tests[i][0] );
- glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE );
- glTexEnvi( GL_TEXTURE_ENV, GL_COMBINE_RGB, tests[i][1] );
- glTexEnvi( GL_TEXTURE_ENV, GL_SOURCE0_RGB, tests[i][2] );
- glTexEnvi( GL_TEXTURE_ENV, GL_SOURCE1_RGB, tests[i][3] );
-
- glActiveTexture( GL_TEXTURE1 );
- glEnable( GL_TEXTURE_2D );
- glBindTexture( GL_TEXTURE_2D, tests[i][4] );
- glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE );
- glTexEnvi( GL_TEXTURE_ENV, GL_COMBINE_RGB, tests[i][5] );
- glTexEnvi( GL_TEXTURE_ENV, GL_SOURCE0_RGB, tests[i][6] );
- glTexEnvi( GL_TEXTURE_ENV, GL_SOURCE1_RGB, tests[i][7] );
-
- glCallList(1);
- }
-
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- GLfloat ar = (float) width / (float) height;
- Width = width;
- Height = height;
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -ar, ar, -1.0, 1.0, Near, Far );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -15.0 );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void Init( void )
-{
- const char * const ver_string = (const char * const)
- glGetString( GL_VERSION );
- float ver = strtof( ver_string, NULL );
- GLint tex_units;
- GLint temp[ 256 ];
-
-
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- printf("GL_VERSION = %s\n", ver_string);
-
- if ( (!glutExtensionSupported("GL_ARB_multitexture")
- && (ver < 1.3))
- || (!glutExtensionSupported("GL_ARB_texture_env_combine")
- && !glutExtensionSupported("GL_EXT_texture_env_combine")
- && (ver < 1.3))
- || (!glutExtensionSupported("GL_ARB_texture_env_crossbar")
- && !glutExtensionSupported("GL_NV_texture_env_combine4")
- && (ver < 1.4)) ) {
- printf("\nSorry, this program requires GL_ARB_multitexture and either\n"
- "GL_ARB_texture_env_combine or GL_EXT_texture_env_combine (or OpenGL 1.3).\n"
- "Either GL_ARB_texture_env_crossbar or GL_NV_texture_env_combine4 (or\n"
- "OpenGL 1.4) are also required.\n");
- exit(1);
- }
-
- glGetIntegerv( GL_MAX_TEXTURE_UNITS, & tex_units );
- if ( tex_units < 2 ) {
- printf("\nSorry, this program requires at least 2 texture units.\n");
- exit(1);
- }
-
- printf("\nAll %u squares should be the same color.\n", NUM_TESTS + 1);
-
- (void) memset( temp, 0x00, sizeof( temp ) );
- glBindTexture( GL_TEXTURE_2D, 1 );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
- glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, 8, 8, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, temp );
-
- (void) memset( temp, 0x7f, sizeof( temp ) );
- glBindTexture( GL_TEXTURE_2D, 2 );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
- glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, 8, 8, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, temp );
-
- (void) memset( temp, 0xff, sizeof( temp ) );
- glBindTexture( GL_TEXTURE_2D, 3 );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
- glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, 8, 8, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, temp );
-
- (void) memset( temp, 0x3f, sizeof( temp ) );
- glBindTexture( GL_TEXTURE_2D, 4 );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
- glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, 8, 8, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, temp );
-
-
- glNewList( 1, GL_COMPILE );
- glTranslatef(3.0, 0, 0);
- glBegin(GL_QUADS);
- glColor3f( 0.9, 0.0, 0.0 );
- glMultiTexCoord2f( GL_TEXTURE0, 0.5, 0.5 );
- glMultiTexCoord2f( GL_TEXTURE1, 0.5, 0.5 );
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- glEnd();
- glEndList();
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( Width, Height );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
- glutCreateWindow( "GL_ARB_texture_env_crossbar test" );
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/cva.c b/progs/tests/cva.c
deleted file mode 100644
index bde4c6c827..0000000000
--- a/progs/tests/cva.c
+++ /dev/null
@@ -1,160 +0,0 @@
-/* $Id: cva.c,v 1.8 2006/11/22 19:37:21 sroland Exp $ */
-
-/*
- * Trivial CVA test, good for testing driver fastpaths (especially
- * indexed vertex buffers if they are supported).
- *
- * Gareth Hughes
- * November 2000
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <stddef.h> /* for ptrdiff_t, referenced by GL.h when GL_GLEXT_LEGACY defined */
-#ifdef _WIN32
-#include <windows.h>
-#endif
-#define GL_GLEXT_LEGACY
-#include <GL/glut.h>
-#include <GL/glext.h>
-
-GLfloat verts[][4] = {
- { -0.5, -0.5, -2.0, 0.0 },
- { 0.5, -0.5, -2.0, 0.0 },
- { -0.5, 0.5, -2.0, 0.0 },
- { 0.5, 0.5, -2.0, 0.0 },
-};
-
-GLubyte color[][4] = {
- { 0xff, 0x00, 0x00, 0x00 },
- { 0x00, 0xff, 0x00, 0x00 },
- { 0x00, 0x00, 0xff, 0x00 },
- { 0xff, 0xff, 0xff, 0x00 },
-};
-
-GLuint indices[] = { 0, 1, 2, 3 };
-
-GLboolean compiled = GL_TRUE;
-GLboolean doubleBuffer = GL_TRUE;
-
-
-void init( void )
-{
- glClearColor( 0.0, 0.0, 0.0, 0.0 );
- glShadeModel( GL_SMOOTH );
-
- glFrontFace( GL_CCW );
- glCullFace( GL_BACK );
- glEnable( GL_CULL_FACE );
-
- glEnable( GL_DEPTH_TEST );
-
- glEnableClientState( GL_VERTEX_ARRAY );
- glEnableClientState( GL_COLOR_ARRAY );
-
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -1.0, 1.0, -1.0, 1.0, 2.0, 10.0 );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
-
- glVertexPointer( 3, GL_FLOAT, sizeof(verts[0]), verts );
- glColorPointer( 4, GL_UNSIGNED_BYTE, 0, color );
-
-#ifdef GL_EXT_compiled_vertex_array
- if ( compiled ) {
- glLockArraysEXT( 0, 4 );
- }
-#endif
-}
-
-void display( void )
-{
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- glDrawElements( GL_TRIANGLES, 3, GL_UNSIGNED_INT, indices );
-
- glFlush();
- if ( doubleBuffer ) {
- glutSwapBuffers();
- }
-}
-
-void keyboard( unsigned char key, int x, int y )
-{
- switch ( key ) {
- case 27:
- exit( 0 );
- break;
- }
-
- glutPostRedisplay();
-}
-
-GLboolean args( int argc, char **argv )
-{
- GLint i;
-
- doubleBuffer = GL_TRUE;
-
- for ( i = 1 ; i < argc ; i++ ) {
- if ( strcmp( argv[i], "-sb" ) == 0 ) {
- doubleBuffer = GL_FALSE;
- } else if ( strcmp( argv[i], "-db" ) == 0 ) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf( stderr, "%s (Bad option).\n", argv[i] );
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main( int argc, char **argv )
-{
- GLenum type;
- char *string;
- double version;
-
- glutInit( &argc, argv );
-
- if ( args( argc, argv ) == GL_FALSE ) {
- exit( 1 );
- }
-
- type = GLUT_RGB | GLUT_DEPTH;
- type |= ( doubleBuffer ) ? GLUT_DOUBLE : GLUT_SINGLE;
-
- glutInitDisplayMode( type );
- glutInitWindowSize( 250, 250 );
- glutInitWindowPosition( 100, 100 );
- glutCreateWindow( "CVA Test" );
-
- /* Make sure the server supports GL 1.2 vertex arrays.
- */
- string = (char *) glGetString( GL_VERSION );
-
- version = atof(string);
- if ( version < 1.2 ) {
- fprintf( stderr, "This program requires OpenGL 1.2 vertex arrays.\n" );
- exit( -1 );
- }
-
- /* See if the server supports compiled vertex arrays.
- */
- string = (char *) glGetString( GL_EXTENSIONS );
-
- if ( !strstr( string, "GL_EXT_compiled_vertex_array" ) ) {
- fprintf( stderr, "Compiled vertex arrays not supported by this renderer.\n" );
- compiled = GL_FALSE;
- }
-
- init();
-
- glutDisplayFunc( display );
- glutKeyboardFunc( keyboard );
- glutMainLoop();
-
- return 0;
-}
diff --git a/progs/tests/debugger.c b/progs/tests/debugger.c
deleted file mode 100644
index 4c6955bcfc..0000000000
--- a/progs/tests/debugger.c
+++ /dev/null
@@ -1,733 +0,0 @@
-/*
- * Test the GL_MESA_program_debug extension
- */
-
-
-#include <assert.h>
-#include <ctype.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-/*
- * Print the string with line numbers
- */
-static void list_program(const GLubyte *string, GLsizei len)
-{
- const char *c = (const char *) string;
- int i, line = 1, printNumber = 1;
-
- for (i = 0; i < len; i++) {
- if (printNumber) {
- printf("%3d ", line);
- printNumber = 0;
- }
- if (*c == '\n') {
- line++;
- printNumber = 1;
- }
- putchar(*c);
- c++;
- }
- putchar('\n');
-}
-
-
-/*
- * Return the line number and column number that corresponds to the
- * given program position. Also return a null-terminated copy of that
- * line of the program string.
- */
-static const GLubyte *
-find_line_column(const GLubyte *string, const GLubyte *pos,
- GLint *line, GLint *col)
-{
- const GLubyte *lineStart = string;
- const GLubyte *p = string;
- GLubyte *s;
- int len;
-
- *line = 1;
-
- while (p != pos) {
- if (*p == (GLubyte) '\n') {
- (*line)++;
- lineStart = p + 1;
- }
- p++;
- }
-
- *col = (pos - lineStart) + 1;
-
- /* return copy of this line */
- while (*p != 0 && *p != '\n')
- p++;
- len = p - lineStart;
- s = (GLubyte *) malloc(len + 1);
- memcpy(s, lineStart, len);
- s[len] = 0;
-
- return s;
-}
-
-
-#define ARB_VERTEX_PROGRAM 1
-#define ARB_FRAGMENT_PROGRAM 2
-#define NV_VERTEX_PROGRAM 3
-#define NV_FRAGMENT_PROGRAM 4
-
-
-struct breakpoint {
- enum {PIXEL, LINE} type;
- int x, y;
- int line;
- GLboolean enabled;
-};
-
-#define MAX_BREAKPOINTS 100
-static struct breakpoint Breakpoints[MAX_BREAKPOINTS];
-static int NumBreakpoints = 0;
-
-
-
-/*
- * Interactive debugger
- */
-static void Debugger2(GLenum target, GLvoid *data)
-{
- static GLuint skipCount = 0;
- const GLubyte *ln;
- GLint pos, line, column;
- GLint id;
- int progType;
- GLint len;
- GLubyte *program;
- GLboolean stop;
- int i;
-
- /* Sigh, GL_VERTEX_PROGRAM_ARB == GL_VERTEX_PROGRAM_NV so it's a bit
- * hard to distinguish between them.
- */
- if (target == GL_FRAGMENT_PROGRAM_ARB)
- progType = ARB_FRAGMENT_PROGRAM;
- else if (target == GL_FRAGMENT_PROGRAM_NV)
- progType = NV_FRAGMENT_PROGRAM;
- else
- progType = NV_VERTEX_PROGRAM;
-
- /* Until we hit zero, continue rendering */
- if (skipCount > 0) {
- skipCount--;
- return;
- }
-
- /* Get id of the program and current position */
- switch (progType) {
- case ARB_FRAGMENT_PROGRAM:
- glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_BINDING_ARB, &id);
- glGetIntegerv(GL_FRAGMENT_PROGRAM_POSITION_MESA, &pos);
- break;
- case NV_FRAGMENT_PROGRAM:
- glGetIntegerv(GL_FRAGMENT_PROGRAM_BINDING_NV, &id);
- glGetIntegerv(GL_FRAGMENT_PROGRAM_POSITION_MESA, &pos);
- break;
- case ARB_VERTEX_PROGRAM:
- glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_BINDING_ARB, &id);
- glGetIntegerv(GL_VERTEX_PROGRAM_POSITION_MESA, &pos);
- break;
- case NV_VERTEX_PROGRAM:
- glGetIntegerv(GL_VERTEX_PROGRAM_BINDING_NV, &id);
- glGetIntegerv(GL_VERTEX_PROGRAM_POSITION_MESA, &pos);
- break;
- default:
- abort();
- }
-
- /* get program string */
- if (progType == ARB_VERTEX_PROGRAM ||
- progType == ARB_FRAGMENT_PROGRAM)
- glGetProgramivARB(target, GL_PROGRAM_LENGTH_ARB, &len);
- else
- glGetProgramivNV(id, GL_PROGRAM_LENGTH_NV, &len);
- program = malloc(len + 1);
- if (progType == ARB_VERTEX_PROGRAM ||
- progType == ARB_FRAGMENT_PROGRAM)
- glGetProgramStringARB(target, GL_PROGRAM_STRING_ARB, program);
- else
- glGetProgramStringNV(id, GL_PROGRAM_STRING_NV, program);
-
-
- /* Get current line number, column, line string */
- ln = find_line_column(program, program + pos, &line, &column);
-
- /* test breakpoints */
- if (NumBreakpoints > 0)
- stop = GL_FALSE;
- else
- stop = GL_TRUE;
- for (i = 0; i < NumBreakpoints; i++) {
- if (Breakpoints[i].enabled) {
- switch (Breakpoints[i].type) {
- case PIXEL:
- if (progType == ARB_FRAGMENT_PROGRAM) {
-
- }
- else if (progType == NV_FRAGMENT_PROGRAM) {
- GLfloat pos[4];
- int px, py;
- glGetProgramRegisterfvMESA(GL_FRAGMENT_PROGRAM_NV,
- 6, (GLubyte *) "f[WPOS]", pos);
- px = (int) pos[0];
- py = (int) pos[1];
- printf("%d, %d\n", px, py);
- if (px == Breakpoints[i].x &&
- py == Breakpoints[i].y) {
- printf("Break at pixel (%d, %d)\n", px, py);
- stop = GL_TRUE;
- }
- }
- break;
- case LINE:
- if (line == Breakpoints[i].line) {
- /* hit a breakpoint! */
- printf("Break at line %d\n", line);
- stop = GL_TRUE;
- }
- break;
- }
- }
- }
- if (!stop) {
- free(program);
- return;
- }
-
- printf("%d: %s\n", line, ln);
-
- /* get commands from stdin */
- while (1) {
- char command[1000], *cmd;
-
- /* print prompt and get command */
- printf("(%s %d) ", (target == GL_VERTEX_PROGRAM_ARB ? "vert" : "frag"),
- line);
- fgets(command, 999, stdin);
-
- /* skip leading whitespace */
- for (cmd = command; cmd[0] == ' '; cmd++)
- ;
-
- if (!cmd[0])
- /* nothing (repeat the previous cmd?) */
- continue;
-
- switch (cmd[0]) {
- case 's':
- /* skip N instructions */
- i = atoi(cmd + 2);
- skipCount = i;
- printf("Skipping %d instructions\n", i);
- return;
- case 'n':
- /* next */
- return;
- case 'c':
- return;
- case 'd':
- /* dump machine state */
- if (progType == NV_FRAGMENT_PROGRAM) {
- static const char *inRegs[] = {
- "f[WPOS]", "f[COL0]", "f[COL1]", "f[FOGC]",
- "f[TEX0]", "f[TEX1]", "f[TEX2]", "f[TEX3]",
- NULL
- };
- static const char *outRegs[] = {
- "o[COLR]", "o[COLH]", "o[DEPR]", NULL
- };
- GLfloat v[4];
- int i;
- printf("Fragment input attributes:\n");
- for (i = 0; inRegs[i]; i++) {
- glGetProgramRegisterfvMESA(GL_FRAGMENT_PROGRAM_NV,
- strlen(inRegs[i]),
- (const GLubyte *) inRegs[i], v);
- printf(" %s: %g, %g, %g, %g\n", inRegs[i],
- v[0], v[1], v[2], v[3]);
- }
- printf("Fragment output attributes:\n");
- for (i = 0; outRegs[i]; i++) {
- glGetProgramRegisterfvMESA(GL_FRAGMENT_PROGRAM_NV,
- strlen(outRegs[i]),
- (const GLubyte *) outRegs[i], v);
- printf(" %s: %g, %g, %g, %g\n", outRegs[i],
- v[0], v[1], v[2], v[3]);
- }
- printf("Temporaries:\n");
- for (i = 0; i < 4; i++) {
- char temp[100];
- GLfloat v[4];
- sprintf(temp, "R%d", i);
- glGetProgramRegisterfvMESA(GL_FRAGMENT_PROGRAM_NV,
- strlen(temp),
- (const GLubyte *) temp, v);
- printf(" %s: %g, %g, %g, %g\n", temp, v[0],v[1],v[2],v[3]);
- }
- }
- else if (progType == NV_VERTEX_PROGRAM) {
- GLfloat v[4];
- int i;
- static const char *inRegs[] = {
- "v[OPOS]", "v[WGHT]", "v[NRML]", "v[COL0]",
- "v[COL1]", "v[FOGC]", "v[6]", "v[7]",
- "v[TEX0]", "v[TEX1]", "v[TEX2]", "v[TEX3]",
- "v[TEX4]", "v[TEX5]", "v[TEX6]", "v[TEX7]",
- NULL
- };
- static const char *outRegs[] = {
- "o[HPOS]", "o[COL0]", "o[COL1]", "o[BFC0]",
- "o[BFC1]", "o[FOGC]", "o[PSIZ]",
- "o[TEX0]", "o[TEX1]", "o[TEX2]", "o[TEX3]",
- "o[TEX4]", "o[TEX5]", "o[TEX6]", "o[TEX7]",
- NULL
- };
- printf("Vertex input attributes:\n");
- for (i = 0; inRegs[i]; i++) {
- glGetProgramRegisterfvMESA(GL_VERTEX_PROGRAM_NV,
- strlen(inRegs[i]),
- (const GLubyte *) inRegs[i], v);
- printf(" %s: %g, %g, %g, %g\n", inRegs[i],
- v[0], v[1], v[2], v[3]);
- }
- printf("Vertex output attributes:\n");
- for (i = 0; outRegs[i]; i++) {
- glGetProgramRegisterfvMESA(GL_VERTEX_PROGRAM_NV,
- strlen(outRegs[i]),
- (const GLubyte *) outRegs[i], v);
- printf(" %s: %g, %g, %g, %g\n", outRegs[i],
- v[0], v[1], v[2], v[3]);
- }
- printf("Temporaries:\n");
- for (i = 0; i < 4; i++) {
- char temp[100];
- GLfloat v[4];
- sprintf(temp, "R%d", i);
- glGetProgramRegisterfvMESA(GL_VERTEX_PROGRAM_NV,
- strlen(temp),
- (const GLubyte *) temp, v);
- printf(" %s: %g, %g, %g, %g\n", temp, v[0],v[1],v[2],v[3]);
- }
- }
- break;
- case 'l':
- /* list */
- list_program(program, len);
- break;
- case 'p':
- /* print */
- {
- GLfloat v[4];
- char *c;
- cmd++;
- while (*cmd == ' ')
- cmd++;
- c = cmd;
- while (*c) {
- if (*c == '\n' || *c == '\r')
- *c = 0;
- else
- c++;
- }
- glGetProgramRegisterfvMESA(target, strlen(cmd),
- (const GLubyte *) cmd, v);
- if (glGetError() == GL_NO_ERROR)
- printf("%s = %g, %g, %g, %g\n", cmd, v[0], v[1], v[2], v[3]);
- else
- printf("Invalid expression\n");
- }
- break;
- case 'b':
- if (cmd[1] == ' ' && isdigit(cmd[2])) {
- char *comma = strchr(cmd, ',');
- if (comma) {
- /* break at pixel */
- int x = atoi(cmd + 2);
- int y = atoi(comma + 1);
- if (NumBreakpoints < MAX_BREAKPOINTS) {
- Breakpoints[NumBreakpoints].type = PIXEL;
- Breakpoints[NumBreakpoints].x = x;
- Breakpoints[NumBreakpoints].y = y;
- Breakpoints[NumBreakpoints].enabled = GL_TRUE;
- NumBreakpoints++;
- printf("Breakpoint %d: break at pixel (%d, %d)\n",
- NumBreakpoints, x, y);
- }
- }
- else {
- /* break at line */
- int l = atoi(cmd + 2);
- if (l && NumBreakpoints < MAX_BREAKPOINTS) {
- Breakpoints[NumBreakpoints].type = LINE;
- Breakpoints[NumBreakpoints].line = l;
- Breakpoints[NumBreakpoints].enabled = GL_TRUE;
- NumBreakpoints++;
- printf("Breakpoint %d: break at line %d\n",
- NumBreakpoints, l);
- }
- }
- }
- else {
- /* list breakpoints */
- printf("Breakpoints:\n");
- for (i = 0; i < NumBreakpoints; i++) {
- switch (Breakpoints[i].type) {
- case LINE:
- printf(" %d: break at line %d\n",
- i + 1, Breakpoints[i].line);
- break;
- case PIXEL:
- printf(" %d: break at pixel (%d, %d)\n",
- i + 1, Breakpoints[i].x, Breakpoints[i].y);
- break;
- }
- }
- }
- break;
- case 'h':
- /* help */
- printf("Debugger commands:\n");
- printf(" b list breakpoints\n");
- printf(" b N break at line N\n");
- printf(" b x,y break at pixel x,y\n");
- printf(" c continue execution\n");
- printf(" d display register values\n");
- printf(" h help\n");
- printf(" l list program\n");
- printf(" n next instruction\n");
- printf(" p V print value V\n");
- printf(" s N skip N instructions\n");
- break;
- default:
- printf("Unknown command: %c\n", cmd[0]);
- }
- }
-}
-
-
-/*
- * Print current line, some registers, and continue.
- */
-static void Debugger(GLenum target, GLvoid *data)
-{
- GLint pos;
- const GLubyte *ln;
- GLint line, column;
- GLfloat v[4];
-
- assert(target == GL_FRAGMENT_PROGRAM_NV);
-
- glGetIntegerv(GL_FRAGMENT_PROGRAM_POSITION_MESA, &pos);
-
- ln = find_line_column((const GLubyte *) data, (const GLubyte *) data + pos,
- &line, &column);
- printf("%d:%d: %s\n", line, column, (char *) ln);
-
- glGetProgramRegisterfvMESA(GL_FRAGMENT_PROGRAM_NV,
- 2, (const GLubyte *) "R0", v);
- printf(" R0 = %g, %g, %g, %g\n", v[0], v[1], v[2], v[3]);
- glGetProgramRegisterfvMESA(GL_FRAGMENT_PROGRAM_NV,
- 7, (const GLubyte *) "f[WPOS]", v);
- printf(" o[WPOS] = %g, %g, %g, %g\n", v[0], v[1], v[2], v[3]);
- glGetProgramRegisterfvMESA(GL_FRAGMENT_PROGRAM_NV,
- 7, (const GLubyte *) "o[COLR]", v);
- printf(" o[COLR] = %g, %g, %g, %g\n", v[0], v[1], v[2], v[3]);
-
- free((void *) ln);
-}
-
-
-
-
-/**********************************************************************/
-
-static GLfloat Diffuse[4] = { 0.5, 0.5, 1.0, 1.0 };
-static GLfloat Specular[4] = { 0.8, 0.8, 0.8, 1.0 };
-static GLfloat LightPos[4] = { 0.0, 10.0, 20.0, 1.0 };
-static GLfloat Delta = 1.0;
-
-static GLuint FragProg;
-static GLuint VertProg;
-static GLboolean Anim = GL_TRUE;
-static GLboolean Wire = GL_FALSE;
-static GLboolean PixelLight = GL_TRUE;
-
-static GLfloat Xrot = 0, Yrot = 0;
-
-
-#define NAMED_PARAMETER4FV(prog, name, v) \
- glProgramNamedParameter4fvNV(prog, strlen(name), (const GLubyte *) name, v)
-
-
-static void Display( void )
-{
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- if (PixelLight) {
- NAMED_PARAMETER4FV(FragProg, "LightPos", LightPos);
- glEnable(GL_FRAGMENT_PROGRAM_NV);
- glEnable(GL_VERTEX_PROGRAM_NV);
- glDisable(GL_LIGHTING);
- }
- else {
- glLightfv(GL_LIGHT0, GL_POSITION, LightPos);
- glDisable(GL_FRAGMENT_PROGRAM_NV);
- glDisable(GL_VERTEX_PROGRAM_NV);
- glEnable(GL_LIGHTING);
- }
-
- glPushMatrix();
- glRotatef(Xrot, 1, 0, 0);
- glRotatef(Yrot, 0, 1, 0);
-
-#if 1
- glutSolidSphere(2.0, 10, 5);
-#else
- {
- GLUquadricObj *q = gluNewQuadric();
- gluQuadricNormals(q, GL_SMOOTH);
- gluQuadricTexture(q, GL_TRUE);
- glRotatef(90, 1, 0, 0);
- glTranslatef(0, 0, -1);
- gluCylinder(q, 1.0, 1.0, 2.0, 24, 1);
- gluDeleteQuadric(q);
- }
-#endif
-
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Idle(void)
-{
- LightPos[0] += Delta;
- if (LightPos[0] > 25.0)
- Delta = -1.0;
- else if (LightPos[0] <- 25.0)
- Delta = 1.0;
- glutPostRedisplay();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 );
- /*glOrtho( -2.0, 2.0, -2.0, 2.0, 5.0, 25.0 );*/
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -15.0 );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case ' ':
- Anim = !Anim;
- if (Anim)
- glutIdleFunc(Idle);
- else
- glutIdleFunc(NULL);
- break;
- case 'x':
- LightPos[0] -= 1.0;
- break;
- case 'X':
- LightPos[0] += 1.0;
- break;
- case 'w':
- Wire = !Wire;
- if (Wire)
- glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
- else
- glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
- break;
- case 'p':
- PixelLight = !PixelLight;
- if (PixelLight) {
- printf("Per-pixel lighting\n");
- }
- else {
- printf("Conventional lighting\n");
- }
- break;
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-static void SpecialKey( int key, int x, int y )
-{
- const GLfloat 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[] )
-{
- static const char *fragProgramText =
- "!!FP1.0\n"
- "DECLARE Diffuse; \n"
- "DECLARE Specular; \n"
- "DECLARE LightPos; \n"
-
- "# Compute normalized LightPos, put it in R0\n"
- "DP3 R0.x, LightPos, LightPos;\n"
- "RSQ R0.y, R0.x;\n"
- "MUL R0, LightPos, R0.y;\n"
-
- "# Compute normalized normal, put it in R1\n"
- "DP3 R1, f[TEX0], f[TEX0]; \n"
- "RSQ R1.y, R1.x;\n"
- "MUL R1, f[TEX0], R1.y;\n"
-
- "# Compute dot product of light direction and normal vector\n"
- "DP3 R2, R0, R1;\n"
-
- "MUL R3, Diffuse, R2; # diffuse attenuation\n"
-
- "POW R4, R2.x, {20.0}.x; # specular exponent\n"
-
- "MUL R5, Specular, R4; # specular attenuation\n"
-
- "ADD o[COLR], R3, R5; # add diffuse and specular colors\n"
- "END \n"
- ;
-
- static const char *vertProgramText =
- "!!VP1.0\n"
- "# typical modelview/projection transform\n"
- "DP4 o[HPOS].x, c[0], v[OPOS] ;\n"
- "DP4 o[HPOS].y, c[1], v[OPOS] ;\n"
- "DP4 o[HPOS].z, c[2], v[OPOS] ;\n"
- "DP4 o[HPOS].w, c[3], v[OPOS] ;\n"
- "# transform normal by inv transpose of modelview, put in tex0\n"
- "DP4 o[TEX0].x, c[4], v[NRML] ;\n"
- "DP4 o[TEX0].y, c[5], v[NRML] ;\n"
- "DP4 o[TEX0].z, c[6], v[NRML] ;\n"
- "DP4 o[TEX0].w, c[7], v[NRML] ;\n"
- "END\n";
- ;
-
- if (!glutExtensionSupported("GL_NV_vertex_program")) {
- printf("Sorry, this demo requires GL_NV_vertex_program\n");
- exit(1);
- }
- if (!glutExtensionSupported("GL_NV_fragment_program")) {
- printf("Sorry, this demo requires GL_NV_fragment_program\n");
- exit(1);
- }
-
- glGenProgramsNV(1, &FragProg);
- assert(FragProg > 0);
- glGenProgramsNV(1, &VertProg);
- assert(VertProg > 0);
-
- /*
- * Fragment program
- */
- glLoadProgramNV(GL_FRAGMENT_PROGRAM_NV, FragProg,
- strlen(fragProgramText),
- (const GLubyte *) fragProgramText);
- assert(glIsProgramNV(FragProg));
- glBindProgramNV(GL_FRAGMENT_PROGRAM_NV, FragProg);
-
- NAMED_PARAMETER4FV(FragProg, "Diffuse", Diffuse);
- NAMED_PARAMETER4FV(FragProg, "Specular", Specular);
-
- /*
- * Vertex program
- */
- glLoadProgramNV(GL_VERTEX_PROGRAM_NV, VertProg,
- strlen(vertProgramText),
- (const GLubyte *) vertProgramText);
- assert(glIsProgramNV(VertProg));
- glBindProgramNV(GL_VERTEX_PROGRAM_NV, VertProg);
- glTrackMatrixNV(GL_VERTEX_PROGRAM_NV, 0, GL_MODELVIEW_PROJECTION_NV, GL_IDENTITY_NV);
- glTrackMatrixNV(GL_VERTEX_PROGRAM_NV, 4, GL_MODELVIEW, GL_INVERSE_TRANSPOSE_NV);
-
- /*
- * Misc init
- */
- glClearColor(0.3, 0.3, 0.3, 0.0);
- glEnable(GL_DEPTH_TEST);
- glEnable(GL_LIGHT0);
- glEnable(GL_LIGHTING);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, Diffuse);
- glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, Specular);
- glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 20.0);
-
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- printf("Press p to toggle between per-pixel and per-vertex lighting\n");
-
-#ifdef GL_MESA_program_debug
- if (argc > 1 && strcmp(argv[1], "fragment") == 0) {
- printf(">> Debugging fragment program\n");
- glProgramCallbackMESA(GL_FRAGMENT_PROGRAM_ARB, Debugger2,
- (GLvoid *) fragProgramText);
- glEnable(GL_FRAGMENT_PROGRAM_CALLBACK_MESA);
- }
- else {
- printf(">> Debugging vertex program\n");
- glProgramCallbackMESA(GL_VERTEX_PROGRAM_ARB, Debugger2,
- (GLvoid *) fragProgramText);
- glEnable(GL_VERTEX_PROGRAM_CALLBACK_MESA);
- }
-#endif
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 200, 200 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutSpecialFunc( SpecialKey );
- glutDisplayFunc( Display );
- if (Anim)
- glutIdleFunc(Idle);
- Init(argc, argv);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/descrip.mms b/progs/tests/descrip.mms
deleted file mode 100644
index b6ba3e1aeb..0000000000
--- a/progs/tests/descrip.mms
+++ /dev/null
@@ -1,84 +0,0 @@
-# Makefile for GLUT-based demo programs for VMS
-# contributed by Jouk Jansen joukj@hrem.stm.tudelft.nl
-
-
-.first
- define gl [--.include.gl]
-
-.include [--]mms-config.
-
-##### MACROS #####
-
-INCDIR = ([--.include],[-.util])
-CFLAGS = /include=$(INCDIR)/prefix=all/name=(as_is,short)/float=ieee/ieee=denorm
-
-.ifdef SHARE
-GL_LIBS = $(XLIBS)
-.else
-GL_LIBS = [--.lib]libGLUT/l,libMesaGLU/l,libMesaGL/l,$(XLIBS)
-.endif
-
-LIB_DEP = [--.lib]$(GL_LIB) [--.lib]$(GLU_LIB) [--.lib]$(GLUT_LIB)
-
-PROGS = cva.exe,\
- dinoshade.exe,\
- fogcoord.exe,\
- manytex.exe,\
- multipal.exe,\
- projtex.exe,\
- seccolor.exe,\
- sharedtex.exe,\
- texline.exe,\
- texwrap.exe,\
- vptest1.exe,\
- vptest2.exe,\
- vptest3.exe,\
- vptorus.exe,\
- vpwarpmesh.exe
-
-##### RULES #####
-.obj.exe :
- cxxlink $(MMS$TARGET_NAME),$(GL_LIBS)
-
-##### TARGETS #####
-default :
- $(MMS)$(MMSQUALIFIERS) $(PROGS)
-
-clean :
- delete *.obj;*
-
-realclean :
- delete $(PROGS)
- delete *.obj;*
-
-cva.exe : cva.obj $(LIB_DEP)
-dinoshade.exe : dinoshade.obj $(LIB_DEP)
-fogcoord.exe : fogcoord.obj $(LIB_DEP)
-manytex.exe : manytex.obj $(LIB_DEP)
-multipal.exe : multipal.obj $(LIB_DEP)
-projtex.exe : projtex.obj $(LIB_DEP)
-seccolor.exe : seccolor.obj $(LIB_DEP)
-sharedtex.exe : sharedtex.obj $(LIB_DEP)
-texline.exe : texline.obj $(LIB_DEP)
-texwrap.exe : texwrap.obj $(LIB_DEP)
-vptest1.exe : vptest1.obj $(LIB_DEP)
-vptest2.exe : vptest2.obj $(LIB_DEP)
-vptest3.exe : vptest3.obj $(LIB_DEP)
-vptorus.exe : vptorus.obj $(LIB_DEP)
-vpwarpmesh.exe : vpwarpmesh.obj $(LIB_DEP)
-
-cva.obj : cva.c
-dinoshade.obj : dinoshade.c
-fogcoord.obj : fogcoord.c
-manytex.obj : manytex.c
-multipal.obj : multipal.c
-projtex.obj : projtex.c
-seccolor.obj : seccolor.c
-sharedtex.obj : sharedtex.c
-texline.obj : texline.c
-texwrap.obj : texwrap.c
-vptest1.obj : vptest1.c
-vptest2.obj : vptest2.c
-vptest3.obj : vptest3.c
-vptorus.obj : vptorus.c
-vpwarpmesh.obj : vpwarpmesh.c
diff --git a/progs/tests/dinoshade.c b/progs/tests/dinoshade.c
deleted file mode 100644
index 504b4af526..0000000000
--- a/progs/tests/dinoshade.c
+++ /dev/null
@@ -1,910 +0,0 @@
-
-/* Copyright (c) Mark J. Kilgard, 1994, 1997. */
-
-/* This program is freely distributable without licensing fees
- and is provided without guarantee or warrantee expressed or
- implied. This program is -not- in the public domain. */
-
-/* Example for PC game developers to show how to *combine* texturing,
- reflections, and projected shadows all in real-time with OpenGL.
- Robust reflections use stenciling. Robust projected shadows
- use both stenciling and polygon offset. PC game programmers
- should realize that neither stenciling nor polygon offset are
- supported by Direct3D, so these real-time rendering algorithms
- are only really viable with OpenGL.
-
- The program has modes for disabling the stenciling and polygon
- offset uses. It is worth running this example with these features
- toggled off so you can see the sort of artifacts that result.
-
- Notice that the floor texturing, reflections, and shadowing
- all co-exist properly. */
-
-/* When you run this program: Left mouse button controls the
- view. Middle mouse button controls light position (left &
- right rotates light around dino; up & down moves light
- position up and down). Right mouse button pops up menu. */
-
-/* Check out the comments in the "redraw" routine to see how the
- reflection blending and surface stenciling is done. You can
- also see in "redraw" how the projected shadows are rendered,
- including the use of stenciling and polygon offset. */
-
-/* This program is derived from glutdino.c */
-
-/* Compile: cc -o dinoshade dinoshade.c -lglut -lGLU -lGL -lXmu -lXext -lX11 -lm */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h> /* for cos(), sin(), and sqrt() */
-#include <stddef.h> /* for ptrdiff_t, referenced by GL.h when GL_GLEXT_LEGACY defined */
-#ifdef _WIN32
-#include <windows.h>
-#endif
-#define GL_GLEXT_LEGACY
-#include <GL/glut.h> /* OpenGL Utility Toolkit header */
-
-/* Some <math.h> files do not define M_PI... */
-#ifndef M_PI
-#define M_PI 3.14159265358979323846
-#endif
-
-/* Variable controlling various rendering modes. */
-static int stencilReflection = 1, stencilShadow = 1, offsetShadow = 1;
-static int renderShadow = 1, renderDinosaur = 1, renderReflection = 1;
-static int linearFiltering = 0, useMipmaps = 0, useTexture = 1;
-static int reportSpeed = 0;
-static int animation = 1;
-static GLboolean lightSwitch = GL_TRUE;
-static int directionalLight = 1;
-static int forceExtension = 0;
-
-/* Time varying or user-controled variables. */
-static float jump = 0.0;
-static float lightAngle = 0.0, lightHeight = 20;
-GLfloat angle = -150; /* in degrees */
-GLfloat angle2 = 30; /* in degrees */
-
-int moving, startx, starty;
-int lightMoving = 0, lightStartX, lightStartY;
-
-enum {
- MISSING, EXTENSION, ONE_DOT_ONE
-};
-int polygonOffsetVersion;
-
-static GLdouble bodyWidth = 3.0;
-/* *INDENT-OFF* */
-static GLfloat body[][2] = { {0, 3}, {1, 1}, {5, 1}, {8, 4}, {10, 4}, {11, 5},
- {11, 11.5}, {13, 12}, {13, 13}, {10, 13.5}, {13, 14}, {13, 15}, {11, 16},
- {8, 16}, {7, 15}, {7, 13}, {8, 12}, {7, 11}, {6, 6}, {4, 3}, {3, 2},
- {1, 2} };
-static GLfloat arm[][2] = { {8, 10}, {9, 9}, {10, 9}, {13, 8}, {14, 9}, {16, 9},
- {15, 9.5}, {16, 10}, {15, 10}, {15.5, 11}, {14.5, 10}, {14, 11}, {14, 10},
- {13, 9}, {11, 11}, {9, 11} };
-static GLfloat leg[][2] = { {8, 6}, {8, 4}, {9, 3}, {9, 2}, {8, 1}, {8, 0.5}, {9, 0},
- {12, 0}, {10, 1}, {10, 2}, {12, 4}, {11, 6}, {10, 7}, {9, 7} };
-static GLfloat eye[][2] = { {8.75, 15}, {9, 14.7}, {9.6, 14.7}, {10.1, 15},
- {9.6, 15.25}, {9, 15.25} };
-static GLfloat lightPosition[4];
-static GLfloat lightColor[] = {0.8, 1.0, 0.8, 1.0}; /* green-tinted */
-static GLfloat skinColor[] = {0.1, 1.0, 0.1, 1.0}, eyeColor[] = {1.0, 0.2, 0.2, 1.0};
-/* *INDENT-ON* */
-
-/* Nice floor texture tiling pattern. */
-static char *circles[] = {
- "....xxxx........",
- "..xxxxxxxx......",
- ".xxxxxxxxxx.....",
- ".xxx....xxx.....",
- "xxx......xxx....",
- "xxx......xxx....",
- "xxx......xxx....",
- "xxx......xxx....",
- ".xxx....xxx.....",
- ".xxxxxxxxxx.....",
- "..xxxxxxxx......",
- "....xxxx........",
- "................",
- "................",
- "................",
- "................",
-};
-
-static void
-makeFloorTexture(void)
-{
- GLubyte floorTexture[16][16][3];
- GLubyte *loc;
- int s, t;
-
- /* Setup RGB image for the texture. */
- loc = (GLubyte*) floorTexture;
- for (t = 0; t < 16; t++) {
- for (s = 0; s < 16; s++) {
- if (circles[t][s] == 'x') {
- /* Nice green. */
- loc[0] = 0x1f;
- loc[1] = 0x8f;
- loc[2] = 0x1f;
- } else {
- /* Light gray. */
- loc[0] = 0xaa;
- loc[1] = 0xaa;
- loc[2] = 0xaa;
- }
- loc += 3;
- }
- }
-
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-
- if (useMipmaps) {
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
- GL_LINEAR_MIPMAP_LINEAR);
- gluBuild2DMipmaps(GL_TEXTURE_2D, 3, 16, 16,
- GL_RGB, GL_UNSIGNED_BYTE, floorTexture);
- } else {
- if (linearFiltering) {
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- } else {
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- }
- glTexImage2D(GL_TEXTURE_2D, 0, 3, 16, 16, 0,
- GL_RGB, GL_UNSIGNED_BYTE, floorTexture);
- }
-}
-
-enum {
- X, Y, Z, W
-};
-enum {
- A, B, C, D
-};
-
-/* Create a matrix that will project the desired shadow. */
-void
-shadowMatrix(GLfloat shadowMat[4][4],
- GLfloat groundplane[4],
- GLfloat lightpos[4])
-{
- GLfloat dot;
-
- /* Find dot product between light position vector and ground plane normal. */
- dot = groundplane[X] * lightpos[X] +
- groundplane[Y] * lightpos[Y] +
- groundplane[Z] * lightpos[Z] +
- groundplane[W] * lightpos[W];
-
- shadowMat[0][0] = dot - lightpos[X] * groundplane[X];
- shadowMat[1][0] = 0.f - lightpos[X] * groundplane[Y];
- shadowMat[2][0] = 0.f - lightpos[X] * groundplane[Z];
- shadowMat[3][0] = 0.f - lightpos[X] * groundplane[W];
-
- shadowMat[X][1] = 0.f - lightpos[Y] * groundplane[X];
- shadowMat[1][1] = dot - lightpos[Y] * groundplane[Y];
- shadowMat[2][1] = 0.f - lightpos[Y] * groundplane[Z];
- shadowMat[3][1] = 0.f - lightpos[Y] * groundplane[W];
-
- shadowMat[X][2] = 0.f - lightpos[Z] * groundplane[X];
- shadowMat[1][2] = 0.f - lightpos[Z] * groundplane[Y];
- shadowMat[2][2] = dot - lightpos[Z] * groundplane[Z];
- shadowMat[3][2] = 0.f - lightpos[Z] * groundplane[W];
-
- shadowMat[X][3] = 0.f - lightpos[W] * groundplane[X];
- shadowMat[1][3] = 0.f - lightpos[W] * groundplane[Y];
- shadowMat[2][3] = 0.f - lightpos[W] * groundplane[Z];
- shadowMat[3][3] = dot - lightpos[W] * groundplane[W];
-
-}
-
-/* Find the plane equation given 3 points. */
-void
-findPlane(GLfloat plane[4],
- GLfloat v0[3], GLfloat v1[3], GLfloat v2[3])
-{
- GLfloat vec0[3], vec1[3];
-
- /* Need 2 vectors to find cross product. */
- vec0[X] = v1[X] - v0[X];
- vec0[Y] = v1[Y] - v0[Y];
- vec0[Z] = v1[Z] - v0[Z];
-
- vec1[X] = v2[X] - v0[X];
- vec1[Y] = v2[Y] - v0[Y];
- vec1[Z] = v2[Z] - v0[Z];
-
- /* find cross product to get A, B, and C of plane equation */
- plane[A] = vec0[Y] * vec1[Z] - vec0[Z] * vec1[Y];
- plane[B] = -(vec0[X] * vec1[Z] - vec0[Z] * vec1[X]);
- plane[C] = vec0[X] * vec1[Y] - vec0[Y] * vec1[X];
-
- plane[D] = -(plane[A] * v0[X] + plane[B] * v0[Y] + plane[C] * v0[Z]);
-}
-
-void
-extrudeSolidFromPolygon(GLfloat data[][2], unsigned int dataSize,
- GLdouble thickness, GLuint side, GLuint edge, GLuint whole)
-{
- static GLUtriangulatorObj *tobj = NULL;
- GLdouble vertex[3], dx, dy, len;
- int i;
- int count = (int) (dataSize / (2 * sizeof(GLfloat)));
-
- if (tobj == NULL) {
- tobj = gluNewTess(); /* create and initialize a GLU
- polygon tesselation object */
- gluTessCallback(tobj, GLU_BEGIN, glBegin);
- gluTessCallback(tobj, GLU_VERTEX, glVertex2fv); /* semi-tricky */
- gluTessCallback(tobj, GLU_END, glEnd);
- }
- glNewList(side, GL_COMPILE);
- glShadeModel(GL_SMOOTH); /* smooth minimizes seeing
- tessellation */
- gluBeginPolygon(tobj);
- for (i = 0; i < count; i++) {
- vertex[0] = data[i][0];
- vertex[1] = data[i][1];
- vertex[2] = 0;
- gluTessVertex(tobj, vertex, data[i]);
- }
- gluEndPolygon(tobj);
- glEndList();
- glNewList(edge, GL_COMPILE);
- glShadeModel(GL_FLAT); /* flat shade keeps angular hands
- from being "smoothed" */
- glBegin(GL_QUAD_STRIP);
- for (i = 0; i <= count; i++) {
-#if 1 /* weird, but seems to be legal */
- /* mod function handles closing the edge */
- glVertex3f(data[i % count][0], data[i % count][1], 0.0);
- glVertex3f(data[i % count][0], data[i % count][1], thickness);
- /* Calculate a unit normal by dividing by Euclidean
- distance. We * could be lazy and use
- glEnable(GL_NORMALIZE) so we could pass in * arbitrary
- normals for a very slight performance hit. */
- dx = data[(i + 1) % count][1] - data[i % count][1];
- dy = data[i % count][0] - data[(i + 1) % count][0];
- len = sqrt(dx * dx + dy * dy);
- glNormal3f(dx / len, dy / len, 0.0);
-#else /* the nice way of doing it */
- /* Calculate a unit normal by dividing by Euclidean
- distance. We * could be lazy and use
- glEnable(GL_NORMALIZE) so we could pass in * arbitrary
- normals for a very slight performance hit. */
- dx = data[i % count][1] - data[(i - 1 + count) % count][1];
- dy = data[(i - 1 + count) % count][0] - data[i % count][0];
- len = sqrt(dx * dx + dy * dy);
- glNormal3f(dx / len, dy / len, 0.0);
- /* mod function handles closing the edge */
- glVertex3f(data[i % count][0], data[i % count][1], 0.0);
- glVertex3f(data[i % count][0], data[i % count][1], thickness);
-#endif
- }
- glEnd();
- glEndList();
- glNewList(whole, GL_COMPILE);
- glFrontFace(GL_CW);
- glCallList(edge);
- glNormal3f(0.0, 0.0, -1.0); /* constant normal for side */
- glCallList(side);
- glPushMatrix();
- glTranslatef(0.0, 0.0, thickness);
- glFrontFace(GL_CCW);
- glNormal3f(0.0, 0.0, 1.0); /* opposite normal for other side */
- glCallList(side);
- glPopMatrix();
- glEndList();
-}
-
-/* Enumerants for refering to display lists. */
-typedef enum {
- RESERVED, BODY_SIDE, BODY_EDGE, BODY_WHOLE, ARM_SIDE, ARM_EDGE, ARM_WHOLE,
- LEG_SIDE, LEG_EDGE, LEG_WHOLE, EYE_SIDE, EYE_EDGE, EYE_WHOLE
-} displayLists;
-
-static void
-makeDinosaur(void)
-{
- extrudeSolidFromPolygon(body, sizeof(body), bodyWidth,
- BODY_SIDE, BODY_EDGE, BODY_WHOLE);
- extrudeSolidFromPolygon(arm, sizeof(arm), bodyWidth / 4,
- ARM_SIDE, ARM_EDGE, ARM_WHOLE);
- extrudeSolidFromPolygon(leg, sizeof(leg), bodyWidth / 2,
- LEG_SIDE, LEG_EDGE, LEG_WHOLE);
- extrudeSolidFromPolygon(eye, sizeof(eye), bodyWidth + 0.2,
- EYE_SIDE, EYE_EDGE, EYE_WHOLE);
-}
-
-static void
-drawDinosaur(void)
-
-{
- glPushMatrix();
- /* Translate the dinosaur to be at (0,8,0). */
- glTranslatef(-8, 0, -bodyWidth / 2);
- glTranslatef(0.0, jump, 0.0);
- glMaterialfv(GL_FRONT, GL_DIFFUSE, skinColor);
- glCallList(BODY_WHOLE);
- glTranslatef(0.0, 0.0, bodyWidth);
- glCallList(ARM_WHOLE);
- glCallList(LEG_WHOLE);
- glTranslatef(0.0, 0.0, -bodyWidth - bodyWidth / 4);
- glCallList(ARM_WHOLE);
- glTranslatef(0.0, 0.0, -bodyWidth / 4);
- glCallList(LEG_WHOLE);
- glTranslatef(0.0, 0.0, bodyWidth / 2 - 0.1);
- glMaterialfv(GL_FRONT, GL_DIFFUSE, eyeColor);
- glCallList(EYE_WHOLE);
- glPopMatrix();
-}
-
-static GLfloat floorVertices[4][3] = {
- { -20.0, 0.0, 20.0 },
- { 20.0, 0.0, 20.0 },
- { 20.0, 0.0, -20.0 },
- { -20.0, 0.0, -20.0 },
-};
-
-/* Draw a floor (possibly textured). */
-static void
-drawFloor(void)
-{
- glDisable(GL_LIGHTING);
-
- if (useTexture) {
- glEnable(GL_TEXTURE_2D);
- }
-
- glBegin(GL_QUADS);
- glTexCoord2f(0.0, 0.0);
- glVertex3fv(floorVertices[0]);
- glTexCoord2f(0.0, 16.0);
- glVertex3fv(floorVertices[1]);
- glTexCoord2f(16.0, 16.0);
- glVertex3fv(floorVertices[2]);
- glTexCoord2f(16.0, 0.0);
- glVertex3fv(floorVertices[3]);
- glEnd();
-
- if (useTexture) {
- glDisable(GL_TEXTURE_2D);
- }
-
- glEnable(GL_LIGHTING);
-}
-
-static GLfloat floorPlane[4];
-static GLfloat floorShadow[4][4];
-
-static void
-redraw(void)
-{
- int start, end;
-
- if (reportSpeed) {
- start = glutGet(GLUT_ELAPSED_TIME);
- }
-
- /* Clear; default stencil clears to zero. */
- if ((stencilReflection && renderReflection) || (stencilShadow && renderShadow)) {
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
- } else {
- /* Avoid clearing stencil when not using it. */
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- }
-
- /* Reposition the light source. */
- lightPosition[0] = 12*cos(lightAngle);
- lightPosition[1] = lightHeight;
- lightPosition[2] = 12*sin(lightAngle);
- if (directionalLight) {
- lightPosition[3] = 0.0;
- } else {
- lightPosition[3] = 1.0;
- }
-
- shadowMatrix(floorShadow, floorPlane, lightPosition);
-
- glPushMatrix();
- /* Perform scene rotations based on user mouse input. */
- glRotatef(angle2, 1.0, 0.0, 0.0);
- glRotatef(angle, 0.0, 1.0, 0.0);
-
- /* Tell GL new light source position. */
- glLightfv(GL_LIGHT0, GL_POSITION, lightPosition);
-
- if (renderReflection) {
- if (stencilReflection) {
- /* We can eliminate the visual "artifact" of seeing the "flipped"
- dinosaur underneath the floor by using stencil. The idea is
- draw the floor without color or depth update but so that
- a stencil value of one is where the floor will be. Later when
- rendering the dinosaur reflection, we will only update pixels
- with a stencil value of 1 to make sure the reflection only
- lives on the floor, not below the floor. */
-
- /* Don't update color or depth. */
- glDisable(GL_DEPTH_TEST);
- glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
-
- /* Draw 1 into the stencil buffer. */
- glEnable(GL_STENCIL_TEST);
- glStencilOp(GL_REPLACE, GL_REPLACE, GL_REPLACE);
- glStencilFunc(GL_ALWAYS, 1, 0xffffffff);
-
- /* Now render floor; floor pixels just get their stencil set to 1. */
- drawFloor();
-
- /* Re-enable update of color and depth. */
- glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
- glEnable(GL_DEPTH_TEST);
-
- /* Now, only render where stencil is set to 1. */
- glStencilFunc(GL_EQUAL, 1, 0xffffffff); /* draw if ==1 */
- glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
- }
-
- glPushMatrix();
-
- /* The critical reflection step: Reflect dinosaur through the floor
- (the Y=0 plane) to make a relection. */
- glScalef(1.0, -1.0, 1.0);
-
- /* Reflect the light position. */
- glLightfv(GL_LIGHT0, GL_POSITION, lightPosition);
-
- /* To avoid our normals getting reversed and hence botched lighting
- on the reflection, turn on normalize. */
- glEnable(GL_NORMALIZE);
- glCullFace(GL_FRONT);
-
- /* Draw the reflected dinosaur. */
- drawDinosaur();
-
- /* Disable noramlize again and re-enable back face culling. */
- glDisable(GL_NORMALIZE);
- glCullFace(GL_BACK);
-
- glPopMatrix();
-
- /* Switch back to the unreflected light position. */
- glLightfv(GL_LIGHT0, GL_POSITION, lightPosition);
-
- if (stencilReflection) {
- glDisable(GL_STENCIL_TEST);
- }
- }
-
- /* Back face culling will get used to only draw either the top or the
- bottom floor. This let's us get a floor with two distinct
- appearances. The top floor surface is reflective and kind of red.
- The bottom floor surface is not reflective and blue. */
-
- /* Draw "bottom" of floor in blue. */
- glFrontFace(GL_CW); /* Switch face orientation. */
- glColor4f(0.1, 0.1, 0.7, 1.0);
- drawFloor();
- glFrontFace(GL_CCW);
-
- if (renderShadow) {
- if (stencilShadow) {
- /* Draw the floor with stencil value 3. This helps us only
- draw the shadow once per floor pixel (and only on the
- floor pixels). */
- glEnable(GL_STENCIL_TEST);
- glStencilFunc(GL_ALWAYS, 3, 0xffffffff);
- glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
- }
- }
-
- /* Draw "top" of floor. Use blending to blend in reflection. */
- glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- glColor4f(0.7, 0.0, 0.0, 0.3);
- glColor4f(1.0, 1.0, 1.0, 0.3);
- drawFloor();
- glDisable(GL_BLEND);
-
- if (renderDinosaur) {
- /* Draw "actual" dinosaur, not its reflection. */
- drawDinosaur();
- }
-
- if (renderShadow) {
-
- /* Render the projected shadow. */
-
- if (stencilShadow) {
-
- /* Now, only render where stencil is set above 2 (ie, 3 where
- the top floor is). Update stencil with 2 where the shadow
- gets drawn so we don't redraw (and accidently reblend) the
- shadow). */
- glStencilFunc(GL_LESS, 2, 0xffffffff); /* draw if ==1 */
- glStencilOp(GL_REPLACE, GL_REPLACE, GL_REPLACE);
- }
-
- /* To eliminate depth buffer artifacts, we use polygon offset
- to raise the depth of the projected shadow slightly so
- that it does not depth buffer alias with the floor. */
- if (offsetShadow) {
- switch (polygonOffsetVersion) {
- case EXTENSION:
-#ifdef GL_EXT_polygon_offset
- glEnable(GL_POLYGON_OFFSET_EXT);
- break;
-#endif
-#ifdef GL_VERSION_1_1
- case ONE_DOT_ONE:
- glEnable(GL_POLYGON_OFFSET_FILL);
- break;
-#endif
- case MISSING:
- /* Oh well. */
- break;
- }
- }
-
- /* Render 50% black shadow color on top of whatever the
- floor appareance is. */
- glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- glDisable(GL_LIGHTING); /* Force the 50% black. */
- glColor4f(0.0, 0.0, 0.0, 0.5);
-
- glPushMatrix();
- /* Project the shadow. */
- glMultMatrixf((GLfloat *) floorShadow);
- drawDinosaur();
- glPopMatrix();
-
- glDisable(GL_BLEND);
- glEnable(GL_LIGHTING);
-
- if (offsetShadow) {
- switch (polygonOffsetVersion) {
-#ifdef GL_EXT_polygon_offset
- case EXTENSION:
- glDisable(GL_POLYGON_OFFSET_EXT);
- break;
-#endif
-#ifdef GL_VERSION_1_1
- case ONE_DOT_ONE:
- glDisable(GL_POLYGON_OFFSET_FILL);
- break;
-#endif
- case MISSING:
- /* Oh well. */
- break;
- }
- }
- if (stencilShadow) {
- glDisable(GL_STENCIL_TEST);
- }
- }
-
- glPushMatrix();
- glDisable(GL_LIGHTING);
- glColor3f(1.0, 1.0, 0.0);
- if (directionalLight) {
- /* Draw an arrowhead. */
- glDisable(GL_CULL_FACE);
- glTranslatef(lightPosition[0], lightPosition[1], lightPosition[2]);
- glRotatef(lightAngle * -180.0 / M_PI, 0, 1, 0);
- glRotatef(atan(lightHeight/12) * 180.0 / M_PI, 0, 0, 1);
- glBegin(GL_TRIANGLE_FAN);
- glVertex3f(0, 0, 0);
- glVertex3f(2, 1, 1);
- glVertex3f(2, -1, 1);
- glVertex3f(2, -1, -1);
- glVertex3f(2, 1, -1);
- glVertex3f(2, 1, 1);
- glEnd();
- /* Draw a white line from light direction. */
- glColor3f(1.0, 1.0, 1.0);
- glBegin(GL_LINES);
- glVertex3f(0, 0, 0);
- glVertex3f(5, 0, 0);
- glEnd();
- glEnable(GL_CULL_FACE);
- } else {
- /* Draw a yellow ball at the light source. */
- glTranslatef(lightPosition[0], lightPosition[1], lightPosition[2]);
- glutSolidSphere(1.0, 5, 5);
- }
- glEnable(GL_LIGHTING);
- glPopMatrix();
-
- glPopMatrix();
-
- if (reportSpeed) {
- glFinish();
- end = glutGet(GLUT_ELAPSED_TIME);
- printf("Speed %.3g frames/sec (%d ms)\n", 1000.0/(end-start), end-start);
- }
-
- glutSwapBuffers();
-}
-
-/* ARGSUSED2 */
-static void
-mouse(int button, int state, int x, int y)
-{
- if (button == GLUT_LEFT_BUTTON) {
- if (state == GLUT_DOWN) {
- moving = 1;
- startx = x;
- starty = y;
- }
- if (state == GLUT_UP) {
- moving = 0;
- }
- }
- if (button == GLUT_MIDDLE_BUTTON) {
- if (state == GLUT_DOWN) {
- lightMoving = 1;
- lightStartX = x;
- lightStartY = y;
- }
- if (state == GLUT_UP) {
- lightMoving = 0;
- }
- }
-}
-
-/* ARGSUSED1 */
-static void
-motion(int x, int y)
-{
- if (moving) {
- angle = angle + (x - startx);
- angle2 = angle2 + (y - starty);
- startx = x;
- starty = y;
- glutPostRedisplay();
- }
- if (lightMoving) {
- lightAngle += (x - lightStartX)/40.0;
- lightHeight += (lightStartY - y)/20.0;
- lightStartX = x;
- lightStartY = y;
- glutPostRedisplay();
- }
-}
-
-/* Advance time varying state when idle callback registered. */
-static void
-idle(void)
-{
- static float time = 0.0;
-
- time = glutGet(GLUT_ELAPSED_TIME) / 500.0;
-
- jump = 4.0 * fabs(sin(time)*0.5);
- if (!lightMoving) {
- lightAngle += 0.03;
- }
- glutPostRedisplay();
-}
-
-enum {
- M_NONE, M_MOTION, M_LIGHT, M_TEXTURE, M_SHADOWS, M_REFLECTION, M_DINOSAUR,
- M_STENCIL_REFLECTION, M_STENCIL_SHADOW, M_OFFSET_SHADOW,
- M_POSITIONAL, M_DIRECTIONAL, M_PERFORMANCE
-};
-
-static void
-controlLights(int value)
-{
- switch (value) {
- case M_NONE:
- return;
- case M_MOTION:
- animation = 1 - animation;
- if (animation) {
- glutIdleFunc(idle);
- } else {
- glutIdleFunc(NULL);
- }
- break;
- case M_LIGHT:
- lightSwitch = !lightSwitch;
- if (lightSwitch) {
- glEnable(GL_LIGHT0);
- } else {
- glDisable(GL_LIGHT0);
- }
- break;
- case M_TEXTURE:
- useTexture = !useTexture;
- break;
- case M_SHADOWS:
- renderShadow = 1 - renderShadow;
- break;
- case M_REFLECTION:
- renderReflection = 1 - renderReflection;
- break;
- case M_DINOSAUR:
- renderDinosaur = 1 - renderDinosaur;
- break;
- case M_STENCIL_REFLECTION:
- stencilReflection = 1 - stencilReflection;
- break;
- case M_STENCIL_SHADOW:
- stencilShadow = 1 - stencilShadow;
- break;
- case M_OFFSET_SHADOW:
- offsetShadow = 1 - offsetShadow;
- break;
- case M_POSITIONAL:
- directionalLight = 0;
- break;
- case M_DIRECTIONAL:
- directionalLight = 1;
- break;
- case M_PERFORMANCE:
- reportSpeed = 1 - reportSpeed;
- break;
- }
- glutPostRedisplay();
-}
-
-/* When not visible, stop animating. Restart when visible again. */
-static void
-visible(int vis)
-{
- if (vis == GLUT_VISIBLE) {
- if (animation)
- glutIdleFunc(idle);
- } else {
- if (!animation)
- glutIdleFunc(NULL);
- }
-}
-
-/* Press any key to redraw; good when motion stopped and
- performance reporting on. */
-/* ARGSUSED */
-static void
-key(unsigned char c, int x, int y)
-{
- if (c == 27) {
- exit(0); /* IRIS GLism, Escape quits. */
- }
- glutPostRedisplay();
-}
-
-/* Press any key to redraw; good when motion stopped and
- performance reporting on. */
-/* ARGSUSED */
-static void
-special(int k, int x, int y)
-{
- glutPostRedisplay();
-}
-
-static int
-supportsOneDotOne(void)
-{
- const char *version;
- int major, minor;
-
- version = (char *) glGetString(GL_VERSION);
- if (sscanf(version, "%d.%d", &major, &minor) == 2)
- return major >= 1 && minor >= 1;
- return 0; /* OpenGL version string malformed! */
-}
-
-int
-main(int argc, char **argv)
-{
- int i;
-
- glutInit(&argc, argv);
-
- for (i=1; i<argc; i++) {
- if (!strcmp("-linear", argv[i])) {
- linearFiltering = 1;
- } else if (!strcmp("-mipmap", argv[i])) {
- useMipmaps = 1;
- } else if (!strcmp("-ext", argv[i])) {
- forceExtension = 1;
- }
- }
-
- glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL);
-
-#if 0
- /* In GLUT 4.0, you'll be able to do this an be sure to
- get 2 bits of stencil if the machine has it for you. */
- glutInitDisplayString("samples stencil>=2 rgb double depth");
-#endif
-
- glutCreateWindow("Shadowy Leapin' Lizards");
-
- if (glutGet(GLUT_WINDOW_STENCIL_SIZE) <= 1) {
- printf("dinoshade: Sorry, I need at least 2 bits of stencil.\n");
- exit(1);
- }
-
- /* Register GLUT callbacks. */
- glutDisplayFunc(redraw);
- glutMouseFunc(mouse);
- glutMotionFunc(motion);
- glutVisibilityFunc(visible);
- glutKeyboardFunc(key);
- glutSpecialFunc(special);
-
- glutCreateMenu(controlLights);
-
- glutAddMenuEntry("Toggle motion", M_MOTION);
- glutAddMenuEntry("-----------------------", M_NONE);
- glutAddMenuEntry("Toggle light", M_LIGHT);
- glutAddMenuEntry("Toggle texture", M_TEXTURE);
- glutAddMenuEntry("Toggle shadows", M_SHADOWS);
- glutAddMenuEntry("Toggle reflection", M_REFLECTION);
- glutAddMenuEntry("Toggle dinosaur", M_DINOSAUR);
- glutAddMenuEntry("-----------------------", M_NONE);
- glutAddMenuEntry("Toggle reflection stenciling", M_STENCIL_REFLECTION);
- glutAddMenuEntry("Toggle shadow stenciling", M_STENCIL_SHADOW);
- glutAddMenuEntry("Toggle shadow offset", M_OFFSET_SHADOW);
- glutAddMenuEntry("----------------------", M_NONE);
- glutAddMenuEntry("Positional light", M_POSITIONAL);
- glutAddMenuEntry("Directional light", M_DIRECTIONAL);
- glutAddMenuEntry("-----------------------", M_NONE);
- glutAddMenuEntry("Toggle performance", M_PERFORMANCE);
- glutAttachMenu(GLUT_RIGHT_BUTTON);
- makeDinosaur();
-
-#ifdef GL_VERSION_1_1
- if (supportsOneDotOne() && !forceExtension) {
- polygonOffsetVersion = ONE_DOT_ONE;
- glPolygonOffset(-2.0, -9.0);
- } else
-#endif
- {
-#ifdef GL_EXT_polygon_offset
- /* check for the polygon offset extension */
- if (glutExtensionSupported("GL_EXT_polygon_offset")) {
- polygonOffsetVersion = EXTENSION;
- glPolygonOffsetEXT(-2.0, -0.002);
- } else
-#endif
- {
- polygonOffsetVersion = MISSING;
- printf("\ndinoshine: Missing polygon offset.\n");
- printf(" Expect shadow depth aliasing artifacts.\n\n");
- }
- }
-
- glEnable(GL_CULL_FACE);
- glEnable(GL_DEPTH_TEST);
- glEnable(GL_TEXTURE_2D);
- glLineWidth(3.0);
-
- glMatrixMode(GL_PROJECTION);
- gluPerspective( /* field of view in degree */ 40.0,
- /* aspect ratio */ 1.0,
- /* Z near */ 20.0, /* Z far */ 100.0);
- glMatrixMode(GL_MODELVIEW);
- gluLookAt(0.0, 8.0, 60.0, /* eye is at (0,8,60) */
- 0.0, 8.0, 0.0, /* center is at (0,8,0) */
- 0.0, 1.0, 0.); /* up is in postivie Y direction */
-
- glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, 1);
- glLightfv(GL_LIGHT0, GL_DIFFUSE, lightColor);
- glLightf(GL_LIGHT0, GL_CONSTANT_ATTENUATION, 0.1);
- glLightf(GL_LIGHT0, GL_LINEAR_ATTENUATION, 0.05);
- glEnable(GL_LIGHT0);
- glEnable(GL_LIGHTING);
-
- makeFloorTexture();
-
- /* Setup floor plane for projected shadow calculations. */
- findPlane(floorPlane, floorVertices[1], floorVertices[2], floorVertices[3]);
-
- glutMainLoop();
- return 0; /* ANSI C requires main to return int. */
-}
diff --git a/progs/tests/drawbuffers.c b/progs/tests/drawbuffers.c
deleted file mode 100644
index 5e89569380..0000000000
--- a/progs/tests/drawbuffers.c
+++ /dev/null
@@ -1,303 +0,0 @@
-/*
- * Test GL_ARB_draw_buffers, GL_EXT_framebuffer_object
- * and GLSL's gl_FragData[].
- *
- * Brian Paul
- * 11 March 2007
- */
-
-
-#define GL_GLEXT_PROTOTYPES
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <GL/glut.h>
-#include "extfuncs.h"
-
-static int Win;
-static int Width = 400, Height = 400;
-static GLuint FBobject, RBobjects[3];
-static GLfloat Xrot = 0.0, Yrot = 0.0;
-static GLuint Program;
-
-
-static void
-CheckError(int line)
-{
- GLenum err = glGetError();
- if (err) {
- printf("GL Error 0x%x at line %d\n", (int) err, line);
- }
-}
-
-
-static void
-Display(void)
-{
- GLubyte *buffer = malloc(Width * Height * 4);
- static const GLenum buffers[2] = {
- GL_COLOR_ATTACHMENT0_EXT,
- GL_COLOR_ATTACHMENT1_EXT
- };
-
- glUseProgram_func(Program);
-
- /* draw to user framebuffer */
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, FBobject);
-
- /* Clear color buffer 0 (blue) */
- glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT);
- glClearColor(0.5, 0.5, 1.0, 0.0);
- glClear(GL_COLOR_BUFFER_BIT);
-
- /* Clear color buffer 1 (1 - blue) */
- glDrawBuffer(GL_COLOR_ATTACHMENT1_EXT);
- glClearColor(0.5, 0.5, 0.0, 0.0);
- glClear(GL_COLOR_BUFFER_BIT);
-
- glClear(GL_DEPTH_BUFFER_BIT);
-
- /* draw to two buffers w/ fragment shader */
- glDrawBuffersARB(2, buffers);
-
- glPushMatrix();
- glRotatef(Xrot, 1, 0, 0);
- glRotatef(Yrot, 0, 1, 0);
- glutSolidTorus(0.75, 2.0, 10, 20);
- glPopMatrix();
-
- /* read from user framebuffer */
- /* bottom half = colorbuffer 0 */
- glReadBuffer(GL_COLOR_ATTACHMENT0_EXT);
- glReadPixels(0, 0, Width, Height / 2, GL_RGBA, GL_UNSIGNED_BYTE,
- buffer);
- /* top half = colorbuffer 1 */
- glReadBuffer(GL_COLOR_ATTACHMENT1_EXT);
- glReadPixels(0, Height/2, Width, Height - Height / 2,
- GL_RGBA, GL_UNSIGNED_BYTE,
- buffer + Width * (Height / 2) * 4);
-
- /* draw to window */
- glUseProgram_func(0);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
- glWindowPos2iARB(0, 0);
- glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
-
- free(buffer);
- glutSwapBuffers();
- CheckError(__LINE__);
-}
-
-
-static void
-Reshape(int width, int height)
-{
- float ar = (float) width / (float) height;
-
- glViewport(0, 0, width, height);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glFrustum(-ar, ar, -1.0, 1.0, 5.0, 35.0);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- glTranslatef(0.0, 0.0, -20.0);
-
- Width = width;
- Height = height;
-
- glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, RBobjects[0]);
- glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, Width, Height);
- glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, RBobjects[1]);
- glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, Width, Height);
- glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, RBobjects[2]);
- glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT,
- Width, Height);
-}
-
-
-static void
-CleanUp(void)
-{
- glDeleteFramebuffersEXT(1, &FBobject);
- glDeleteRenderbuffersEXT(3, RBobjects);
- glutDestroyWindow(Win);
- exit(0);
-}
-
-
-static void
-Key(unsigned char key, int x, int y)
-{
- (void) x;
- (void) y;
- switch (key) {
- case 'x':
- Xrot += 5.0;
- break;
- case 'y':
- Yrot += 5.0;
- break;
- case 27:
- CleanUp();
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void
-CheckExtensions(void)
-{
- const char *version = (const char *) glGetString(GL_VERSION);
- GLint numBuf;
-
- if (!glutExtensionSupported("GL_EXT_framebuffer_object")) {
- printf("Sorry, GL_EXT_framebuffer_object is required!\n");
- exit(1);
- }
- if (!glutExtensionSupported("GL_ARB_draw_buffers")) {
- printf("Sorry, GL_ARB_draw_buffers is required!\n");
- exit(1);
- }
- if (version[0] != '2') {
- printf("Sorry, OpenGL 2.0 is required!\n");
- exit(1);
- }
-
- glGetIntegerv(GL_MAX_DRAW_BUFFERS_ARB, &numBuf);
- printf("GL_MAX_DRAW_BUFFERS_ARB = %d\n", numBuf);
- if (numBuf < 2) {
- printf("Sorry, GL_MAX_DRAW_BUFFERS_ARB needs to be >= 2\n");
- exit(1);
- }
-
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-}
-
-
-static void
-SetupRenderbuffers(void)
-{
- glGenFramebuffersEXT(1, &FBobject);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, FBobject);
-
- glGenRenderbuffersEXT(3, RBobjects);
-
- glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, RBobjects[0]);
- glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, Width, Height);
-
- glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, RBobjects[1]);
- glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, Width, Height);
-
- glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, RBobjects[2]);
- glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT,
- Width, Height);
-
- glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
- GL_RENDERBUFFER_EXT, RBobjects[0]);
- glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT1_EXT,
- GL_RENDERBUFFER_EXT, RBobjects[1]);
- glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT,
- GL_RENDERBUFFER_EXT, RBobjects[2]);
-
- CheckError(__LINE__);
-}
-
-
-static GLuint
-LoadAndCompileShader(GLenum target, const char *text)
-{
- GLint stat;
- GLuint shader = glCreateShader_func(target);
- glShaderSource_func(shader, 1, (const GLchar **) &text, NULL);
- glCompileShader_func(shader);
- glGetShaderiv_func(shader, GL_COMPILE_STATUS, &stat);
- if (!stat) {
- GLchar log[1000];
- GLsizei len;
- glGetShaderInfoLog_func(shader, 1000, &len, log);
- fprintf(stderr, "drawbuffers: problem compiling shader:\n%s\n", log);
- exit(1);
- }
- return shader;
-}
-
-
-static void
-CheckLink(GLuint prog)
-{
- GLint stat;
- glGetProgramiv_func(prog, GL_LINK_STATUS, &stat);
- if (!stat) {
- GLchar log[1000];
- GLsizei len;
- glGetProgramInfoLog_func(prog, 1000, &len, log);
- fprintf(stderr, "drawbuffers: shader link error:\n%s\n", log);
- }
-}
-
-
-static void
-SetupShaders(void)
-{
- /* second color output = 1 - first color */
- static const char *fragShaderText =
- "void main() {\n"
- " gl_FragData[0] = gl_Color; \n"
- " gl_FragData[1] = vec4(1.0) - gl_Color; \n"
- "}\n";
-
- GLuint fragShader;
-
- fragShader = LoadAndCompileShader(GL_FRAGMENT_SHADER, fragShaderText);
- Program = glCreateProgram_func();
-
- glAttachShader_func(Program, fragShader);
- glLinkProgram_func(Program);
- CheckLink(Program);
- glUseProgram_func(Program);
-}
-
-
-static void
-SetupLighting(void)
-{
- static const GLfloat frontMat[4] = { 1.0, 0.5, 0.5, 1.0 };
- static const GLfloat backMat[4] = { 1.0, 0.5, 0.5, 1.0 };
-
- glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, frontMat);
- glMaterialfv(GL_BACK, GL_AMBIENT_AND_DIFFUSE, backMat);
- glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, 1);
- glEnable(GL_LIGHT0);
- glEnable(GL_LIGHTING);
-}
-
-
-static void
-Init(void)
-{
- CheckExtensions();
- GetExtensionFuncs();
- SetupRenderbuffers();
- SetupShaders();
- SetupLighting();
- glEnable(GL_DEPTH_TEST);
-}
-
-
-int
-main(int argc, char *argv[])
-{
- glutInit(&argc, argv);
- glutInitWindowPosition(0, 0);
- glutInitWindowSize(Width, Height);
- glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
- Win = glutCreateWindow(argv[0]);
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Display);
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/exactrast.c b/progs/tests/exactrast.c
deleted file mode 100644
index 56c0c79c3f..0000000000
--- a/progs/tests/exactrast.c
+++ /dev/null
@@ -1,200 +0,0 @@
-/**
- * Test for exact point/line/polygon rasterization, or at least rasterization
- * that fits the tolerance of the OpenGL spec.
- *
- * Brian Paul
- * 9 Nov 2007
- */
-
-/*
- * Notes:
- * - 'm' to cycle through point, hline, vline and quad drawing
- * - Use cursor keys to translate coordinates (z to reset)
- * - Resize window to check for proper rasterization
- * - Make sure your LCD is running in its native resolution
- *
- * If translation is (0,0):
- * a point will be drawn where x%2==0 and y%2==0,
- * a horizontal line will be drawn where x%2==0,
- * a vertical line will be drawn where y%2==0,
- * for quads, pixels will be set where (x%4)!=3 and (y%4)!=3
- *
- * XXX todo: do glReadPixels and test that the results are what's expected.
- * Upon failure, iterate over sub-pixel translations to find the ideal offset.
- */
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-static int Width = 400, Height = 400;
-static int Win;
-static float Xtrans = 0, Ytrans = 0;
-static float Step = 0.125;
-
-enum {
- POINTS,
- HLINES,
- VLINES,
- QUADS,
- NUM_MODES
-};
-
-static int Mode = POINTS;
-
-
-static void
-Draw(void)
-{
- /* See the OpenGL Programming Guide, Appendix H, "OpenGL Correctness Tips"
- * for information about the 0.375 translation factor.
- */
- float tx = 0.375, ty = 0.375;
- int i, j;
-
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- glPushMatrix();
- glTranslatef(tx + Xtrans, ty + Ytrans, 0);
-
- if (Mode == POINTS) {
- glBegin(GL_POINTS);
- for (j = 0; j < Height; j += 2) {
- for (i = 0; i < Width; i += 2) {
- glVertex2f(i, j);
- }
- }
- glEnd();
- }
- else if (Mode == HLINES) {
- glBegin(GL_LINES);
- for (i = 0; i < Height; i += 2) {
- glVertex2f(0, i);
- glVertex2f(Width, i);
- }
- glEnd();
- }
- else if (Mode == VLINES) {
- glBegin(GL_LINES);
- for (i = 0; i < Width; i += 2) {
- glVertex2f(i, 0 );
- glVertex2f(i, Height);
- }
- glEnd();
- }
- else if (Mode == QUADS) {
- glBegin(GL_QUADS);
- for (j = 0; j < Height; j += 4) {
- for (i = 0; i < Width; i += 4) {
- glVertex2f(i, j );
- glVertex2f(i + 3, j );
- glVertex2f(i + 3, j + 3);
- glVertex2f(i, j + 3);
- }
- }
- glEnd();
- }
-
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void
-Reshape(int width, int height)
-{
- Width = width;
- Height = height;
- glViewport(0, 0, width, height);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(0, width, 0, height, -1, 1);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
-}
-
-
-static void
-Key(unsigned char key, int x, int y)
-{
- (void) x;
- (void) y;
- switch (key) {
- case 'm':
- case 'M':
- Mode = (Mode + 1) % NUM_MODES;
- break;
- case 'z':
- case 'Z':
- Xtrans = Ytrans = 0;
- printf("Translation: %f, %f\n", Xtrans, Ytrans);
- break;
- case 27:
- glutDestroyWindow(Win);
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void
-SpecialKey(int key, int x, int y)
-{
- (void) x;
- (void) y;
- switch (key) {
- case GLUT_KEY_UP:
- Ytrans += Step;
- break;
- case GLUT_KEY_DOWN:
- Ytrans -= Step;
- break;
- case GLUT_KEY_LEFT:
- Xtrans -= Step;
- break;
- case GLUT_KEY_RIGHT:
- Xtrans += Step;
- break;
- }
- glutPostRedisplay();
- printf("Translation: %f, %f\n", Xtrans, Ytrans);
-}
-
-
-static void
-Init(void)
-{
-}
-
-
-static void
-Usage(void)
-{
- printf("Keys:\n");
- printf(" up/down/left/right - translate by %f\n", Step);
- printf(" z - reset translation to zero\n");
- printf(" m - change rendering mode (points, hlines, vlines, quads)\n");
- printf(" Esc - exit\n");
-}
-
-
-int
-main(int argc, char *argv[])
-{
- glutInit(&argc, argv);
- glutInitWindowPosition(0, 0);
- glutInitWindowSize(Width, Height);
- glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
- Win = glutCreateWindow(argv[0]);
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutSpecialFunc(SpecialKey);
- glutDisplayFunc(Draw);
- Init();
- Usage();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/ext422square.c b/progs/tests/ext422square.c
deleted file mode 100644
index 6533514d69..0000000000
--- a/progs/tests/ext422square.c
+++ /dev/null
@@ -1,258 +0,0 @@
-/*
- * Exercise the EXT_422_pixels extension, a less convenient
- * alternative to MESA_ycbcr_texture. Requires ARB_fragment_program
- * to perform the final YUV->RGB conversion.
- *
- * Brian Paul 13 September 2002
- * Keith Whitwell 30 November 2004
- */
-
-
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include <assert.h>
-
-#include "../util/readtex.c" /* I know, this is a hack. */
-
-#define TEXTURE_FILE "../images/tile.rgb"
-
-static GLfloat Xrot = 0, Yrot = 0, Zrot = 0;
-static GLint ImgWidth, ImgHeight;
-static GLushort *ImageYUV = NULL;
-static const GLuint yuvObj = 100;
-static const GLuint rgbObj = 101;
-
-static void Init( int argc, char *argv[] );
-
-static void DrawObject(void)
-{
- glBegin(GL_QUADS);
-
- glTexCoord2f(0, 0);
- glVertex2f(-1.0, -1.0);
-
- glTexCoord2f(1, 0);
- glVertex2f(1.0, -1.0);
-
- glTexCoord2f(1, 1);
- glVertex2f(1.0, 1.0);
-
- glTexCoord2f(0, 1);
- glVertex2f(-1.0, 1.0);
-
- glEnd();
-}
-
-static void Display( void )
-{
- static int firsttime = 1;
-
- if (firsttime) {
- firsttime = 0;
- Init( 0, 0 ); /* don't ask */
- }
-
- glClear( GL_COLOR_BUFFER_BIT );
- glBindTexture(GL_TEXTURE_2D, yuvObj);
-
- glPushMatrix();
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
- glTranslatef( -1.1, 0.0, -15.0 );
- glRotatef(Xrot, 1.0, 0.0, 0.0);
- glRotatef(Yrot, 0.0, 1.0, 0.0);
- glRotatef(Zrot, 0.0, 0.0, 1.0);
- glBindTexture(GL_TEXTURE_2D, yuvObj);
- DrawObject();
- glPopMatrix();
-
- glPushMatrix();
- glDisable(GL_FRAGMENT_PROGRAM_ARB);
- glTranslatef( 1.1, 0.0, -15.0 );
- glRotatef(Xrot, 1.0, 0.0, 0.0);
- glRotatef(Yrot, 0.0, 1.0, 0.0);
- glRotatef(Zrot, 0.0, 0.0, 1.0);
- glBindTexture(GL_TEXTURE_2D, rgbObj);
- DrawObject();
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -1.1, 1.1, -1.1, 1.1, 10.0, 100.0 );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -15.0 );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- 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();
-}
-
-
-
-
-/* #define LINEAR_FILTER */
-
-static void Init( int argc, char *argv[] )
-{
- const char *file;
- const GLfloat yuvtorgb[16] = {
- 1.164, 1.164, 1.164, 0,
- 0, -.391, 2.018, 0,
- 1.596, -.813, 0.0, 0,
- (-.0625*1.164 + -.5*1.596), (-.0625*1.164 + -.5*-.813 + -.5*-.391), (-.0625*1.164 + -.5*2.018), 1
- };
-
- if (!glutExtensionSupported("GL_ARB_fragment_program")) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
-
- if (!glutExtensionSupported("GL_EXT_422_pixels")) {
- printf("Error: GL_EXT_422_pixels not supported!\n");
- exit(1);
- }
-
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-
- file = TEXTURE_FILE;
-
- /* Load the texture as YCbCr.
- */
- glBindTexture(GL_TEXTURE_2D, yuvObj);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-
- ImageYUV = LoadYUVImage(file, &ImgWidth, &ImgHeight );
- if (!ImageYUV) {
- printf("Couldn't read %s\n", TEXTURE_FILE);
- exit(0);
- }
-
- glTexImage2D(GL_TEXTURE_2D, 0,
- GL_RGB,
- ImgWidth, ImgHeight, 0,
- GL_422_EXT,
- GL_UNSIGNED_BYTE, ImageYUV);
-
- glEnable(GL_TEXTURE_2D);
-
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
-
- {
- static const char *modulateYUV =
- "!!ARBfp1.0\n"
- "TEMP R0;\n"
- "TEX R0, fragment.texcoord[0], texture[0], 2D; \n"
-
- "ADD R0, R0, {-0.0625, -0.5, -0.5, 0.0}; \n"
- "DP3 result.color.x, R0, {1.164, 1.596, 0.0}; \n"
- "DP3 result.color.y, R0, {1.164, -0.813, -0.391}; \n"
- "DP3 result.color.z, R0, {1.164, 0.0, 2.018}; \n"
- "MOV result.color.w, R0.w; \n"
-
- "END"
- ;
-
- GLuint modulateProg;
-
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulateYUV), (const GLubyte *)modulateYUV);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
- assert(glIsProgramARB(modulateProg));
-
- }
-
- /* Now the same, but use a color matrix to do the conversion at
- * upload time:
- */
- glBindTexture(GL_TEXTURE_2D, rgbObj);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-
- glMatrixMode( GL_COLOR_MATRIX );
- glLoadMatrixf( yuvtorgb );
-
- glTexImage2D(GL_TEXTURE_2D, 0,
- GL_RGB,
- ImgWidth, ImgHeight, 0,
- GL_422_EXT,
- GL_UNSIGNED_BYTE, ImageYUV);
-
- glLoadIdentity();
- glMatrixMode( GL_MODELVIEW );
-
- glEnable(GL_TEXTURE_2D);
-
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
-
-
- glShadeModel(GL_FLAT);
- glClearColor(0.3, 0.3, 0.4, 1.0);
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowSize( 300, 300 );
- glutInitWindowPosition( 0, 0 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
- glutCreateWindow(argv[0] );
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutSpecialFunc( SpecialKey );
- glutDisplayFunc( Display );
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/fbotest1.c b/progs/tests/fbotest1.c
deleted file mode 100644
index 8f4569ff3b..0000000000
--- a/progs/tests/fbotest1.c
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- * Test GL_EXT_framebuffer_object
- *
- * Brian Paul
- * 7 Feb 2005
- */
-
-
-#define GL_GLEXT_PROTOTYPES
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <GL/glut.h>
-
-static int Win;
-static int Width = 400, Height = 400;
-static GLuint MyFB, MyRB;
-
-
-static void
-CheckError(int line)
-{
- GLenum err = glGetError();
- if (err) {
- printf("GL Error 0x%x at line %d\n", (int) err, line);
- }
-}
-
-
-static void
-Display( void )
-{
- GLubyte *buffer = malloc(Width * Height * 4);
- GLenum status;
-
- /* draw to user framebuffer */
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, MyFB);
- glDrawBuffer(GL_COLOR_ATTACHMENT1_EXT);
- glReadBuffer(GL_COLOR_ATTACHMENT1_EXT);
-
- status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
- if (status != GL_FRAMEBUFFER_COMPLETE_EXT) {
- printf("Framebuffer incomplete!!!\n");
- }
-
- glClearColor(0.5, 0.5, 1.0, 0.0);
- glClear( GL_COLOR_BUFFER_BIT );
-
- glBegin(GL_POLYGON);
- glColor3f(1, 0, 0);
- glVertex2f(-1, -1);
- glColor3f(0, 1, 0);
- glVertex2f(1, -1);
- glColor3f(0, 0, 1);
- glVertex2f(0, 1);
- glEnd();
-
- /* read from user framebuffer */
- glReadPixels(0, 0, Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
-
- /* draw to window */
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
- glWindowPos2iARB(0, 0);
- glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
-
- free(buffer);
- glutSwapBuffers();
- CheckError(__LINE__);
-}
-
-
-static void
-Reshape( int width, int height )
-{
-#if 0
- float ar = (float) width / (float) height;
-#endif
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
-#if 0
- glFrustum( -ar, ar, -1.0, 1.0, 5.0, 25.0 );
-#else
- glOrtho(-1.0, 1.0, -1.0, 1.0, 5.0, 25.0 );
-#endif
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -15.0 );
- Width = width;
- Height = height;
- glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, Width, Height);
-}
-
-
-static void
-CleanUp(void)
-{
- glDeleteFramebuffersEXT(1, &MyFB);
- glDeleteRenderbuffersEXT(1, &MyRB);
- assert(!glIsFramebufferEXT(MyFB));
- assert(!glIsRenderbufferEXT(MyRB));
- glutDestroyWindow(Win);
- exit(0);
-}
-
-
-static void
-Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- CleanUp();
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void
-Init( void )
-{
- GLint i;
-
- if (!glutExtensionSupported("GL_EXT_framebuffer_object")) {
- printf("GL_EXT_framebuffer_object not found!\n");
- /*exit(0);*/
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- glGenFramebuffersEXT(1, &MyFB);
- assert(MyFB);
- assert(!glIsFramebufferEXT(MyFB));
- glDeleteFramebuffersEXT(1, &MyFB);
- assert(!glIsFramebufferEXT(MyFB));
- /* Note, continue to use MyFB below */
-
- glGenRenderbuffersEXT(1, &MyRB);
- assert(MyRB);
- assert(!glIsRenderbufferEXT(MyRB));
- glDeleteRenderbuffersEXT(1, &MyRB);
- assert(!glIsRenderbufferEXT(MyRB));
- MyRB = 42; /* an arbitrary ID */
-
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, MyFB);
- assert(glIsFramebufferEXT(MyFB));
- glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, MyRB);
- assert(glIsRenderbufferEXT(MyRB));
-
- glGetIntegerv(GL_RENDERBUFFER_BINDING_EXT, &i);
- assert(i == MyRB);
-
- glGetIntegerv(GL_FRAMEBUFFER_BINDING_EXT, &i);
- assert(i == MyFB);
-
- CheckError(__LINE__);
- glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT1_EXT,
- GL_RENDERBUFFER_EXT, MyRB);
-
- glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, Width, Height);
-
- CheckError(__LINE__);
-
- {
- GLint r, g, b, a;
- glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT,
- GL_RENDERBUFFER_RED_SIZE_EXT, &r);
- glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT,
- GL_RENDERBUFFER_GREEN_SIZE_EXT, &g);
- glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT,
- GL_RENDERBUFFER_BLUE_SIZE_EXT, &b);
- glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT,
- GL_RENDERBUFFER_ALPHA_SIZE_EXT, &a);
- CheckError(__LINE__);
- printf("renderbuffer RGBA sizes = %d %d %d %d\n", r, g, b, a);
-
- glGetIntegerv(GL_RED_BITS, &r);
- glGetIntegerv(GL_GREEN_BITS, &g);
- glGetIntegerv(GL_BLUE_BITS, &b);
- glGetIntegerv(GL_ALPHA_BITS, &a);
- printf("Visual RGBA sizes = %d %d %d %d\n", r, g, b, a);
- }
-
- /* restore to default */
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
- CheckError(__LINE__);
-}
-
-
-int
-main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize(Width, Height);
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
- Win = glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/fbotest2.c b/progs/tests/fbotest2.c
deleted file mode 100644
index 5283c7e1fd..0000000000
--- a/progs/tests/fbotest2.c
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Test GL_EXT_framebuffer_object
- *
- * Brian Paul
- * 19 Mar 2006
- */
-
-
-#define GL_GLEXT_PROTOTYPES
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <GL/glut.h>
-
-static int Win = 0;
-static int Width = 400, Height = 400;
-static GLuint MyFB, ColorRb, DepthRb;
-static GLboolean Animate = GL_TRUE;
-static GLfloat Rotation = 0.0;
-
-
-static void
-CheckError(int line)
-{
- GLenum err = glGetError();
- if (err) {
- printf("fbotest2: GL Error 0x%x at line %d\n", (int) err, line);
- }
-}
-
-
-static void
-Display( void )
-{
- GLubyte *buffer = malloc(Width * Height * 4);
- GLenum status;
-
- CheckError(__LINE__);
-
- /* draw to user framebuffer */
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, MyFB);
- glDrawBuffer(GL_COLOR_ATTACHMENT1_EXT);
- glReadBuffer(GL_COLOR_ATTACHMENT1_EXT);
-
- status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
- if (status != GL_FRAMEBUFFER_COMPLETE_EXT) {
- printf("fbotest2: Error: Framebuffer is incomplete!!!\n");
- }
-
- CheckError(__LINE__);
-
- glClearColor(0.5, 0.5, 1.0, 0.0);
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- glEnable(GL_DEPTH_TEST);
- glEnable(GL_LIGHTING);
- glEnable(GL_LIGHT0);
-
- glPushMatrix();
- glRotatef(30.0, 1, 0, 0);
- glRotatef(Rotation, 0, 1, 0);
- glutSolidTeapot(2.0);
- glPopMatrix();
-
- /* read from user framebuffer */
- glReadPixels(0, 0, Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
-
- /* draw to window */
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
- glDisable(GL_DEPTH_TEST); /* in case window has depth buffer */
- glWindowPos2iARB(0, 0);
- glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
-
- free(buffer);
- glutSwapBuffers();
- CheckError(__LINE__);
-}
-
-
-static void
-Reshape( int width, int height )
-{
- float ar = (float) width / (float) height;
-
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -ar, ar, -1.0, 1.0, 5.0, 25.0 );
-
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -15.0 );
-
- glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, ColorRb);
- glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, width, height);
- glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, DepthRb);
- glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT,
- width, height);
-
- Width = width;
- Height = height;
-}
-
-
-static void
-CleanUp(void)
-{
- glDeleteFramebuffersEXT(1, &MyFB);
- glDeleteRenderbuffersEXT(1, &ColorRb);
- glDeleteRenderbuffersEXT(1, &DepthRb);
- assert(!glIsFramebufferEXT(MyFB));
- assert(!glIsRenderbufferEXT(ColorRb));
- assert(!glIsRenderbufferEXT(DepthRb));
- glutDestroyWindow(Win);
- exit(0);
-}
-
-
-static void
-Idle(void)
-{
- Rotation = glutGet(GLUT_ELAPSED_TIME) * 0.1;
- glutPostRedisplay();
-}
-
-
-static void
-Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 'a':
- Animate = !Animate;
- if (Animate)
- glutIdleFunc(Idle);
- else
- glutIdleFunc(NULL);
- break;
- case 27:
- CleanUp();
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void
-Init( void )
-{
- if (!glutExtensionSupported("GL_EXT_framebuffer_object")) {
- printf("fbotest2: GL_EXT_framebuffer_object not found!\n");
- exit(0);
- }
- printf("fbotest2: GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- glGenFramebuffersEXT(1, &MyFB);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, MyFB);
- assert(glIsFramebufferEXT(MyFB));
-
- /* set color buffer */
- glGenRenderbuffersEXT(1, &ColorRb);
- glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, ColorRb);
- assert(glIsRenderbufferEXT(ColorRb));
- glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT1_EXT,
- GL_RENDERBUFFER_EXT, ColorRb);
- glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, Width, Height);
-
- /* setup depth buffer */
- glGenRenderbuffersEXT(1, &DepthRb);
- glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, DepthRb);
- assert(glIsRenderbufferEXT(DepthRb));
- glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT,
- GL_RENDERBUFFER_EXT, DepthRb);
- glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, Width, Height);
-
- CheckError(__LINE__);
-
- /* restore to default */
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
- CheckError(__LINE__);
-}
-
-
-int
-main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize(Width, Height);
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
- Win = glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- if (Animate)
- glutIdleFunc(Idle);
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/fbotexture.c b/progs/tests/fbotexture.c
deleted file mode 100644
index 88d0549c80..0000000000
--- a/progs/tests/fbotexture.c
+++ /dev/null
@@ -1,451 +0,0 @@
-/*
- * Test GL_EXT_framebuffer_object render-to-texture
- *
- * Draw a teapot into a texture image with stenciling.
- * Then draw a textured quad using that texture.
- *
- * Brian Paul
- * 18 Apr 2005
- */
-
-
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-
-/* For debug */
-#define DEPTH 1
-#define STENCIL 1
-#define DRAW 1
-
-
-static int Win = 0;
-static int Width = 400, Height = 400;
-
-static GLenum TexTarget = GL_TEXTURE_2D; /*GL_TEXTURE_RECTANGLE_ARB;*/
-static int TexWidth = 512, TexHeight = 512;
-/*static int TexWidth = 600, TexHeight = 600;*/
-
-static GLuint MyFB;
-static GLuint TexObj;
-static GLuint DepthRB, StencilRB;
-static GLboolean Anim = GL_FALSE;
-static GLfloat Rot = 0.0;
-static GLboolean UsePackedDepthStencil = GL_FALSE;
-static GLuint TextureLevel = 1; /* which texture level to render to */
-static GLenum TexIntFormat = GL_RGB; /* either GL_RGB or GL_RGBA */
-static GLboolean Cull = GL_FALSE;
-static GLboolean Wireframe = GL_FALSE;
-
-
-static void
-CheckError(int line)
-{
- GLenum err = glGetError();
- if (err) {
- printf("GL Error 0x%x at line %d\n", (int) err, line);
- }
-}
-
-
-static void
-Idle(void)
-{
- Rot = glutGet(GLUT_ELAPSED_TIME) * 0.1;
- glutPostRedisplay();
-}
-
-
-static void
-RenderTexture(void)
-{
- GLenum status;
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, 5.0, 25.0);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- glTranslatef(0.0, 0.0, -15.0);
-
- /* draw to texture image */
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, MyFB);
-
- status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
- if (status != GL_FRAMEBUFFER_COMPLETE_EXT) {
- printf("Framebuffer incomplete!!!\n");
- }
-
- glViewport(0, 0, TexWidth, TexHeight);
-
- glClearColor(0.5, 0.5, 1.0, 0.0);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
- CheckError(__LINE__);
-
-#if DEPTH
- glEnable(GL_DEPTH_TEST);
-#endif
-
-#if STENCIL
- glEnable(GL_STENCIL_TEST);
- glStencilFunc(GL_NEVER, 1, ~0);
- glStencilOp(GL_REPLACE, GL_KEEP, GL_REPLACE);
-#endif
-
- CheckError(__LINE__);
-
-#if DEPTH || STENCIL
- /* draw diamond-shaped stencil pattern */
- glColor3f(0, 1, 0);
- glBegin(GL_POLYGON);
- glVertex2f(-0.2, 0.0);
- glVertex2f( 0.0, -0.2);
- glVertex2f( 0.2, 0.0);
- glVertex2f( 0.0, 0.2);
- glEnd();
-#endif
-
- /* draw teapot where stencil != 1 */
-#if STENCIL
- glStencilFunc(GL_NOTEQUAL, 1, ~0);
- glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
-#endif
-
- CheckError(__LINE__);
-
- if (Wireframe) {
- glPolygonMode(GL_FRONT, GL_LINE);
- }
- else {
- glPolygonMode(GL_FRONT, GL_FILL);
- }
-
- if (Cull) {
- /* cull back */
- glCullFace(GL_BACK);
- glEnable(GL_CULL_FACE);
- }
- else {
- glDisable(GL_CULL_FACE);
- }
-
-#if 0
- glBegin(GL_POLYGON);
- glColor3f(1, 0, 0);
- glVertex2f(-1, -1);
- glColor3f(0, 1, 0);
- glVertex2f(1, -1);
- glColor3f(0, 0, 1);
- glVertex2f(0, 1);
- glEnd();
-#else
- glEnable(GL_LIGHTING);
- glEnable(GL_LIGHT0);
- glPushMatrix();
- glRotatef(0.5 * Rot, 1.0, 0.0, 0.0);
- glFrontFace(GL_CW); /* Teapot patches backward */
- glutSolidTeapot(0.5);
- glFrontFace(GL_CCW);
- glPopMatrix();
- glDisable(GL_LIGHTING);
- /*
- PrintStencilHistogram(TexWidth, TexHeight);
- */
-#endif
-
- glDisable(GL_DEPTH_TEST);
- glDisable(GL_STENCIL_TEST);
- glDisable(GL_CULL_FACE);
- glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
-
-#if DRAW
- /* Bind normal framebuffer */
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
-#endif
-
- CheckError(__LINE__);
-}
-
-
-
-static void
-Display(void)
-{
- float ar = (float) Width / (float) Height;
-
- RenderTexture();
-
- /* draw textured quad in the window */
-#if DRAW
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glFrustum(-ar, ar, -1.0, 1.0, 5.0, 25.0);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- glTranslatef(0.0, 0.0, -7.0);
-
- glViewport(0, 0, Width, Height);
-
- glClearColor(0.25, 0.25, 0.25, 0);
- glClear(GL_COLOR_BUFFER_BIT);
-
- glPushMatrix();
- glRotatef(Rot, 0, 1, 0);
- glEnable(TexTarget);
- glBindTexture(TexTarget, TexObj);
- glBegin(GL_POLYGON);
- glColor3f(0.25, 0.25, 0.25);
- if (TexTarget == GL_TEXTURE_2D) {
- glTexCoord2f(0, 0);
- glVertex2f(-1, -1);
- glTexCoord2f(1, 0);
- glVertex2f(1, -1);
- glColor3f(1.0, 1.0, 1.0);
- glTexCoord2f(1, 1);
- glVertex2f(1, 1);
- glTexCoord2f(0, 1);
- glVertex2f(-1, 1);
- }
- else {
- assert(TexTarget == GL_TEXTURE_RECTANGLE_ARB);
- glTexCoord2f(0, 0);
- glVertex2f(-1, -1);
- glTexCoord2f(TexWidth, 0);
- glVertex2f(1, -1);
- glColor3f(1.0, 1.0, 1.0);
- glTexCoord2f(TexWidth, TexHeight);
- glVertex2f(1, 1);
- glTexCoord2f(0, TexHeight);
- glVertex2f(-1, 1);
- }
- glEnd();
- glPopMatrix();
- glDisable(TexTarget);
-#endif
-
- glutSwapBuffers();
- CheckError(__LINE__);
-}
-
-
-static void
-Reshape(int width, int height)
-{
- glViewport(0, 0, width, height);
- Width = width;
- Height = height;
-}
-
-
-static void
-CleanUp(void)
-{
-#if DEPTH
- glDeleteRenderbuffersEXT(1, &DepthRB);
-#endif
-#if STENCIL
- if (!UsePackedDepthStencil)
- glDeleteRenderbuffersEXT(1, &StencilRB);
-#endif
- glDeleteFramebuffersEXT(1, &MyFB);
-
- glDeleteTextures(1, &TexObj);
-
- glutDestroyWindow(Win);
-
- exit(0);
-}
-
-
-static void
-Key(unsigned char key, int x, int y)
-{
- (void) x;
- (void) y;
- switch (key) {
- case 'a':
- Anim = !Anim;
- if (Anim)
- glutIdleFunc(Idle);
- else
- glutIdleFunc(NULL);
- break;
- case 'c':
- Cull = !Cull;
- break;
- case 'w':
- Wireframe = !Wireframe;
- break;
- case 's':
- Rot += 2.0;
- break;
- case 'S':
- Rot -= 2.0;
- break;
- case 27:
- CleanUp();
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void
-Usage(void)
-{
- printf("Usage:\n");
- printf(" a Toggle animation\n");
- printf(" s/s Step/rotate\n");
- printf(" c Toggle back-face culling\n");
- printf(" w Toggle wireframe mode (front-face only)\n");
- printf(" Esc Exit\n");
-}
-
-
-static void
-Init(int argc, char *argv[])
-{
- static const GLfloat mat[4] = { 1.0, 0.5, 0.5, 1.0 };
- GLint i;
-
- if (!glutExtensionSupported("GL_EXT_framebuffer_object")) {
- printf("GL_EXT_framebuffer_object not found!\n");
- exit(0);
- }
-
- if (argc > 1 && strcmp(argv[1], "-ds") == 0) {
- if (!glutExtensionSupported("GL_EXT_packed_depth_stencil")) {
- printf("GL_EXT_packed_depth_stencil not found!\n");
- exit(0);
- }
- UsePackedDepthStencil = GL_TRUE;
- printf("Using GL_EXT_packed_depth_stencil\n");
- }
-
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* gen framebuffer id, delete it, do some assertions, just for testing */
- glGenFramebuffersEXT(1, &MyFB);
- assert(MyFB);
- assert(!glIsFramebufferEXT(MyFB));
- glDeleteFramebuffersEXT(1, &MyFB);
- assert(!glIsFramebufferEXT(MyFB));
- /* Note, continue to use MyFB below */
-
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, MyFB);
- assert(glIsFramebufferEXT(MyFB));
- glGetIntegerv(GL_FRAMEBUFFER_BINDING_EXT, &i);
- assert(i == MyFB);
-
- /* Make texture object/image */
- glGenTextures(1, &TexObj);
- glBindTexture(TexTarget, TexObj);
- /* make two image levels */
- glTexImage2D(TexTarget, 0, TexIntFormat, TexWidth, TexHeight, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, NULL);
- glTexImage2D(TexTarget, 1, TexIntFormat, TexWidth/2, TexHeight/2, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, NULL);
- TexWidth = TexWidth >> TextureLevel;
- TexHeight = TexHeight >> TextureLevel;
-
- glTexParameteri(TexTarget, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(TexTarget, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
- glTexParameteri(TexTarget, GL_TEXTURE_BASE_LEVEL, TextureLevel);
- glTexParameteri(TexTarget, GL_TEXTURE_MAX_LEVEL, TextureLevel);
-
- CheckError(__LINE__);
-
- /* Render color to texture */
- glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
- TexTarget, TexObj, TextureLevel);
-
-
-#if DEPTH
- /* make depth renderbuffer */
- glGenRenderbuffersEXT(1, &DepthRB);
- assert(DepthRB);
- assert(!glIsRenderbufferEXT(DepthRB));
- glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, DepthRB);
- assert(glIsRenderbufferEXT(DepthRB));
- if (UsePackedDepthStencil)
- glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_STENCIL_EXT,
- TexWidth, TexHeight);
- else
- glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT,
- TexWidth, TexHeight);
- CheckError(__LINE__);
- glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT,
- GL_RENDERBUFFER_DEPTH_SIZE_EXT, &i);
- CheckError(__LINE__);
- printf("Depth renderbuffer size = %d bits\n", i);
- assert(i > 0);
-
- /* attach DepthRB to MyFB */
- glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT,
- GL_RENDERBUFFER_EXT, DepthRB);
-#endif
-
- CheckError(__LINE__);
-
-#if STENCIL
- if (UsePackedDepthStencil) {
- /* DepthRb is a combined depth/stencil renderbuffer */
- glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT,
- GL_STENCIL_ATTACHMENT_EXT,
- GL_RENDERBUFFER_EXT, DepthRB);
- }
- else {
- /* make stencil renderbuffer */
- glGenRenderbuffersEXT(1, &StencilRB);
- assert(StencilRB);
- assert(!glIsRenderbufferEXT(StencilRB));
- glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, StencilRB);
- assert(glIsRenderbufferEXT(StencilRB));
- glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_STENCIL_INDEX,
- TexWidth, TexHeight);
- /* attach StencilRB to MyFB */
- glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT,
- GL_STENCIL_ATTACHMENT_EXT,
- GL_RENDERBUFFER_EXT, StencilRB);
- }
- glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT,
- GL_RENDERBUFFER_STENCIL_SIZE_EXT, &i);
- CheckError(__LINE__);
- printf("Stencil renderbuffer size = %d bits\n", i);
- assert(i > 0);
-#endif
-
- CheckError(__LINE__);
-
- /* bind regular framebuffer */
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
-
-
- /* lighting */
- glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat);
-}
-
-
-int
-main(int argc, char *argv[])
-{
- glutInit(&argc, argv);
- glutInitWindowPosition(0, 0);
- glutInitWindowSize(Width, Height);
- glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
- Win = glutCreateWindow(argv[0]);
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Display);
- if (Anim)
- glutIdleFunc(Idle);
- Init(argc, argv);
- Usage();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/floattex.c b/progs/tests/floattex.c
deleted file mode 100644
index 2345a49b27..0000000000
--- a/progs/tests/floattex.c
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Test floating point textures.
- * No actual rendering, yet.
- */
-
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <GL/glut.h>
-
-
-/* XXX - temporary */
-#ifndef GL_ARB_texture_float
-#define GL_ARB_texture_float 1
-#define GL_TEXTURE_RED_TYPE_ARB 0x9000
-#define GL_TEXTURE_GREEN_TYPE_ARB 0x9001
-#define GL_TEXTURE_BLUE_TYPE_ARB 0x9002
-#define GL_TEXTURE_ALPHA_TYPE_ARB 0x9003
-#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x9004
-#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x9005
-#define GL_TEXTURE_DEPTH_TYPE_ARB 0x9006
-#define GL_UNSIGNED_NORMALIZED_ARB 0x9007
-#define GL_RGBA32F_ARB 0x8814
-#define GL_RGB32F_ARB 0x8815
-#define GL_ALPHA32F_ARB 0x8816
-#define GL_INTENSITY32F_ARB 0x8817
-#define GL_LUMINANCE32F_ARB 0x8818
-#define GL_LUMINANCE_ALPHA32F_ARB 0x8819
-#define GL_RGBA16F_ARB 0x881A
-#define GL_RGB16F_ARB 0x881B
-#define GL_ALPHA16F_ARB 0x881C
-#define GL_INTENSITY16F_ARB 0x881D
-#define GL_LUMINANCE16F_ARB 0x881E
-#define GL_LUMINANCE_ALPHA16F_ARB 0x881F
-#endif
-
-
-static GLboolean
-CheckError( int line )
-{
- GLenum error = glGetError();
- if (error) {
- char *err = (char *) gluErrorString( error );
- fprintf( stderr, "GL Error: %s at line %d\n", err, line );
- return GL_TRUE;
- }
- return GL_FALSE;
-}
-
-
-static void
-Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- glPushMatrix();
-
- glutSolidCube(2.0);
-
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void
-Reshape(int width, int height)
-{
- glViewport(0, 0, width, height);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 25.0);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- glTranslatef(0.0, 0.0, -15.0);
-}
-
-
-static void
-Key(unsigned char key, int x, int y)
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-
-static void
-Init(void)
-{
- GLfloat tex[16][16][4];
- GLfloat tex2[16][16][4];
- GLint i, j, t;
-
- if (!glutExtensionSupported("GL_MESAX_texture_float")) {
- printf("Sorry, this test requires GL_MESAX_texture_float\n");
- exit(1);
- }
-
- for (i = 0; i < 16; i++) {
- for (j = 0; j < 16; j++) {
- GLfloat s = i / 15.0;
- tex[i][j][0] = s;
- tex[i][j][1] = 2.0 * s;
- tex[i][j][2] = -3.0 * s;
- tex[i][j][3] = 4.0 * s;
- }
- }
-
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F_ARB, 16, 16, 0, GL_RGBA,
- GL_FLOAT, tex);
- CheckError(__LINE__);
-
- glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_RED_TYPE_ARB, &t);
- assert(t == GL_FLOAT);
- glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_GREEN_TYPE_ARB, &t);
- assert(t == GL_FLOAT);
- glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_BLUE_TYPE_ARB, &t);
- assert(t == GL_FLOAT);
- glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_ALPHA_TYPE_ARB, &t);
- assert(t == GL_FLOAT);
-
- CheckError(__LINE__);
-
- /* read back the texture and make sure values are correct */
- glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_FLOAT, tex2);
- CheckError(__LINE__);
- for (i = 0; i < 16; i++) {
- for (j = 0; j < 16; j++) {
- if (tex[i][j][0] != tex2[i][j][0] ||
- tex[i][j][1] != tex2[i][j][1] ||
- tex[i][j][2] != tex2[i][j][2] ||
- tex[i][j][3] != tex2[i][j][3]) {
- printf("tex[%d][%d] %g %g %g %g != tex2[%d][%d] %g %g %g %g\n",
- i, j,
- tex[i][j][0], tex[i][j][1], tex[i][j][2], tex[i][j][3],
- i, j,
- tex2[i][j][0], tex2[i][j][1], tex2[i][j][2], tex2[i][j][3]);
- }
- }
- }
-
-
-}
-
-
-int
-main(int argc, char *argv[])
-{
- glutInit(&argc, argv);
- glutInitWindowPosition(0, 0);
- glutInitWindowSize(400, 400);
- glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
- glutCreateWindow(argv[0]);
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/fog.c b/progs/tests/fog.c
deleted file mode 100644
index ecd9f533f9..0000000000
--- a/progs/tests/fog.c
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Copyright 2005 Eric Anholt
- * 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 (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Authors:
- * Eric Anholt <anholt@FreeBSD.org>
- * Brian Paul (fogcoord.c used as a skeleton)
- */
-
-/*
- * Test to exercise fog modes and for comparison with GL_EXT_fog_coord.
- */
-
-#define GL_GLEXT_PROTOTYPES
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <GL/glut.h>
-
-static int Width = 600;
-static int Height = 600;
-static GLfloat Near = 0.0, Far = 1.0;
-GLboolean has_fogcoord;
-
-static void drawString( const char *string )
-{
- glRasterPos2f(0, .5);
- while ( *string ) {
- glutBitmapCharacter( GLUT_BITMAP_TIMES_ROMAN_10, *string );
- string++;
- }
-}
-
-static void Display( void )
-{
- GLint i, depthi;
- GLfloat fogcolor[4] = {1, 1, 1, 1};
-
- glEnable(GL_FOG);
- glFogfv(GL_FOG_COLOR, fogcolor);
-
- glClearColor(0.2, 0.2, 0.8, 0);
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- glPushMatrix();
- for (i = 0; i < 6; i++) {
- if (i >= 3 && !has_fogcoord)
- break;
-
- glPushMatrix();
- for (depthi = 0; depthi < 5; depthi++) {
- GLfloat depth = Near + (Far - Near) * depthi / 4;
-
- switch (i % 3) {
- case 0:
- glFogi(GL_FOG_MODE, GL_LINEAR);
- glFogf(GL_FOG_START, Near);
- glFogf(GL_FOG_END, Far);
- break;
- case 1:
- glFogi(GL_FOG_MODE, GL_EXP);
- glFogf(GL_FOG_DENSITY, 2);
- break;
- case 2:
- glFogi(GL_FOG_MODE, GL_EXP2);
- glFogf(GL_FOG_DENSITY, 2);
- break;
- }
-
- glColor4f(0, 0, 0, 0);
- if (i < 3) {
- if (has_fogcoord)
- glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT);
-
- glBegin(GL_POLYGON);
- glVertex3f(0, 0, depth);
- glVertex3f(1, 0, depth);
- glVertex3f(1, 1, depth);
- glVertex3f(0, 1, depth);
- glEnd();
- } else {
- glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT);
- glFogCoordfEXT(depth);
-
- glBegin(GL_POLYGON);
- glVertex3f(0, 0, (Near + Far) / 2);
- glVertex3f(1, 0, (Near + Far) / 2);
- glVertex3f(1, 1, (Near + Far) / 2);
- glVertex3f(0, 1, (Near + Far) / 2);
- glEnd();
- }
- glTranslatef(1.5, 0, 0);
- }
-
- glTranslatef(.1, 0, 0);
- switch (i) {
- case 0:
- drawString("GL_LINEAR");
- break;
- case 1:
- drawString("GL_EXP");
- break;
- case 2:
- drawString("GL_EXP2");
- break;
- case 3:
- drawString("GL_FOGCOORD GL_LINEAR");
- break;
- case 4:
- drawString("GL_FOGCOORD GL_EXP");
- break;
- case 5:
- drawString("GL_FOGCOORD GL_EXP2");
- break;
- }
-
- glPopMatrix();
- glTranslatef(0, 1.5, 0);
- }
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- Width = width;
- Height = height;
- glViewport( 0, 0, width, height );
-
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glOrtho( 0, 11, 9, 0, -Near, -Far );
-
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef(.25, .25, 0);
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void Init( void )
-{
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- /* setup lighting, etc */
- has_fogcoord = glutExtensionSupported("GL_EXT_fog_coord");
- if (!has_fogcoord) {
- printf("Some output of this program requires GL_EXT_fog_coord\n");
- }
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( Width, Height );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/fogcoord.c b/progs/tests/fogcoord.c
deleted file mode 100644
index 89355742aa..0000000000
--- a/progs/tests/fogcoord.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Exercise GL_EXT_fog_coord
- */
-
-
-#define GL_GLEXT_PROTOTYPES
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <GL/glut.h>
-
-static int Width = 600;
-static int Height = 200;
-static GLfloat Near = 5.0, Far = 25.0;
-
-
-static void Display( void )
-{
- GLfloat t;
-
- glClearColor(0.2, 0.2, 0.8, 0);
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- for (t = 0.0; t <= 1.0; t += 0.25) {
- GLfloat f = Near + t * (Far - Near);
- printf("glFogCoord(%4.1f)\n", f);
- glFogCoordfEXT(f);
-
- glPushMatrix();
- glTranslatef(t * 10.0 - 5.0, 0, 0);
- glBegin(GL_POLYGON);
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- glEnd();
- glPopMatrix();
- }
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- GLfloat ar = (float) width / (float) height;
- Width = width;
- Height = height;
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -ar, ar, -1.0, 1.0, Near, Far );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -15.0 );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void Init( void )
-{
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- /* setup lighting, etc */
- if (!glutExtensionSupported("GL_EXT_fog_coord")) {
- printf("Sorry, this program requires GL_EXT_fog_coord\n");
- exit(1);
- }
- glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT);
- glFogi(GL_FOG_MODE, GL_LINEAR);
- glFogf(GL_FOG_START, Near);
- glFogf(GL_FOG_END, Far);
- glEnable(GL_FOG);
- printf("Squares should be colored from white -> gray -> black.\n");
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( Width, Height );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/fptest1.c b/progs/tests/fptest1.c
deleted file mode 100644
index 095190a8ae..0000000000
--- a/progs/tests/fptest1.c
+++ /dev/null
@@ -1,225 +0,0 @@
-/* Test GL_NV_fragment_program */
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Display( void )
-{
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- glPushMatrix();
-
- glColor4f(0, 0.5, 0, 1);
- glColor4f(0, 1, 0, 1);
- glBegin(GL_POLYGON);
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 0, 1);
- glEnd();
-
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -15.0 );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void Init( void )
-{
- static const char *prog0 =
- "!!FP1.0\n"
- "MUL o[COLR], R0, f[WPOS]; \n"
- "ADD o[COLH], H3, f[TEX0]; \n"
- "ADD_SAT o[COLH], H3, f[TEX0]; \n"
- "ADDX o[COLH], H3, f[TEX0]; \n"
- "ADDHC o[COLH], H3, f[TEX0]; \n"
- "ADDXC o[COLH], H3, f[TEX0]; \n"
- "ADDXC_SAT o[COLH], H30, f[TEX0]; \n"
- "MUL o[COLR].xy, R0.wzyx, f[WPOS]; \n"
- "MUL o[COLR], H0, f[WPOS]; \n"
- "MUL o[COLR], -H0, f[WPOS]; \n"
- "MOV RC, H1; \n"
- "MOV HC, H2; \n"
- "END \n"
- ;
-
- /* masked updates, defines, declarations */
- static const char *prog1 =
- "!!FP1.0\n"
- "DEFINE foo = {1, 2, 3, 4}; \n"
- "DEFINE foo2 = 5; \n"
- "DECLARE foo3 = {5, 6, 7, 8}; \n"
- "DECLARE bar = 3; \n"
- "DECLARE bar2; \n"
- "DECLARE bar3 = bar; \n"
- "#DECLARE bar4 = { a, b, c, d }; \n"
- "MOV o[COLR].xy, R0; \n"
- "MOV o[COLR] (NE), R0; \n"
- "MOV o[COLR] (NE.wzyx), R0; \n"
- "MOV o[COLR].xy (NE.wzyx), R0; \n"
- "MOV RC.x (EQ), R1.x; \n"
- "KIL NE; \n"
- "KIL EQ.xyxy; \n"
- "END \n"
- ;
-
- /* texture instructions */
- static const char *prog2 =
- "!!FP1.0\n"
- "TEX R0, f[TEX0], TEX0, 2D; \n"
- "TEX R1, f[TEX1], TEX1, CUBE; \n"
- "TEX R2, f[TEX2], TEX2, 3D; \n"
- "TXP R3, f[TEX3], TEX3, RECT; \n"
- "TXD R3, R2, R1, f[TEX3], TEX3, RECT; \n"
- "MUL o[COLR], R0, f[COL0]; \n"
- "END \n"
- ;
-
- /* test negation, absolute value */
- static const char *prog3 =
- "!!FP1.0\n"
- "MOV R0, -R1; \n"
- "MOV R0, +R1; \n"
- "MOV R0, |-R1|; \n"
- "MOV R0, |+R1|; \n"
- "MOV R0, -|R1|; \n"
- "MOV R0, +|R1|; \n"
- "MOV R0, -|-R1|; \n"
- "MOV R0, -|+R1|; \n"
- "MOV o[COLR], R0; \n"
- "END \n"
- ;
-
- /* literal constant sources */
- static const char *prog4 =
- "!!FP1.0\n"
- "DEFINE Pi = 3.14159; \n"
- "MOV R0, {1, -2, +3, 4}; \n"
- "MOV R0, 5; \n"
- "MOV R0, -5; \n"
- "MOV R0, +5; \n"
- "MOV R0, Pi; \n"
- "MOV o[COLR], R0; \n"
- "END \n"
- ;
-
- /* change the fragment color in a simple way */
- static const char *prog10 =
- "!!FP1.0\n"
- "DEFINE blue = {0, 0, 1, 0};\n"
- "DECLARE color; \n"
- "MOV R0, f[COL0]; \n"
- "#ADD o[COLR], R0, f[COL0]; \n"
- "#ADD o[COLR], blue, f[COL0]; \n"
- "#ADD o[COLR], {1, 0, 0, 0}, f[COL0]; \n"
- "ADD o[COLR], color, f[COL0]; \n"
- "END \n"
- ;
-
- GLuint progs[20];
-
- if (!glutExtensionSupported ("GL_NV_fragment_program")) {
- printf("Sorry, this program requires GL_NV_fragment_program\n");
- exit(1);
- }
-
- glGenProgramsNV(20, progs);
- assert(progs[0]);
- assert(progs[1]);
- assert(progs[0] != progs[1]);
-
-#if 0
- glLoadProgramNV(GL_FRAGMENT_PROGRAM_NV, progs[0],
- strlen(prog0),
- (const GLubyte *) prog0);
- assert(glIsProgramNV(progs[0]));
-#endif
-
- glLoadProgramNV(GL_FRAGMENT_PROGRAM_NV, progs[1],
- strlen(prog1),
- (const GLubyte *) prog1);
- assert(glIsProgramNV(progs[1]));
-
- glLoadProgramNV(GL_FRAGMENT_PROGRAM_NV, progs[2],
- strlen(prog2),
- (const GLubyte *) prog2);
- assert(glIsProgramNV(progs[2]));
- glBindProgramNV(GL_FRAGMENT_PROGRAM_NV, progs[2]);
-
- glLoadProgramNV(GL_FRAGMENT_PROGRAM_NV, progs[3],
- strlen(prog3),
- (const GLubyte *) prog3);
- assert(glIsProgramNV(progs[3]));
- glBindProgramNV(GL_FRAGMENT_PROGRAM_NV, progs[3]);
-
- glLoadProgramNV(GL_FRAGMENT_PROGRAM_NV, progs[4],
- strlen(prog4),
- (const GLubyte *) prog4);
- assert(glIsProgramNV(progs[4]));
- glBindProgramNV(GL_FRAGMENT_PROGRAM_NV, progs[4]);
-
-
- /* a real program */
- glLoadProgramNV(GL_FRAGMENT_PROGRAM_NV, progs[10],
- strlen(prog10),
- (const GLubyte *) prog10);
- assert(glIsProgramNV(progs[10]));
- glBindProgramNV(GL_FRAGMENT_PROGRAM_NV, progs[10]);
-
- glProgramNamedParameter4fNV(progs[10],
- strlen("color"), (const GLubyte *) "color",
- 1, 0, 0, 1);
-
- glEnable(GL_FRAGMENT_PROGRAM_NV);
- glEnable(GL_ALPHA_TEST);
- glAlphaFunc(GL_ALWAYS, 0.0);
-
- printf("glGetError = %d\n", (int) glGetError());
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 250, 250 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/fptexture.c b/progs/tests/fptexture.c
deleted file mode 100644
index f57ad62828..0000000000
--- a/progs/tests/fptexture.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/* GL_NV_fragment_program texture test */
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-#include "../util/readtex.c"
-
-
-#define TEXTURE_FILE "../images/girl.rgb"
-
-static GLfloat Xrot = 0.0, Yrot = 0.0, Zrot = 0.0;
-
-
-static void Display( void )
-{
- glClear( GL_COLOR_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);
-
- glBegin(GL_POLYGON);
- glColor4f(1.0, 1.0, 1.0, 1); glTexCoord2f(0, 0); glVertex2f(-1, -1);
- glColor4f(0.2, 0.2, 1.0, 1); glTexCoord2f(1, 0); glVertex2f( 1, -1);
- glColor4f(0.2, 1.0, 0.2, 1); glTexCoord2f(1, 1); glVertex2f( 1, 1);
- glColor4f(1.0, 0.2, 0.2, 1); glTexCoord2f(0, 1); glVertex2f(-1, 1);
- glEnd();
-
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -8.0 );
-}
-
-
-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 Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!FP1.0\n"
- "TEX R0, f[TEX0], TEX0, 2D; \n"
- "MUL o[COLR], R0, f[COL0]; \n"
- "END"
- ;
- GLuint modulateProg;
- GLuint Texture;
-
- if (!glutExtensionSupported("GL_NV_fragment_program")) {
- printf("Error: GL_NV_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsNV(1, &modulateProg);
- glLoadProgramNV(GL_FRAGMENT_PROGRAM_NV, modulateProg,
- strlen(modulate2D),
- (const GLubyte *) modulate2D);
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_NV) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_NV));
- assert(glIsProgramNV(modulateProg));
-
- glBindProgramNV(GL_FRAGMENT_PROGRAM_NV, modulateProg);
- glEnable(GL_FRAGMENT_PROGRAM_NV);
-
- /* Load texture */
- glGenTextures(1, &Texture);
- glBindTexture(GL_TEXTURE_2D, Texture);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- if (!LoadRGBMipmaps(TEXTURE_FILE, GL_RGB)) {
- printf("Error: couldn't load texture image file %s\n", TEXTURE_FILE);
- exit(1);
- }
- /* XXX this enable shouldn't really be needed!!! */
- glEnable(GL_TEXTURE_2D);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 250, 250 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutSpecialFunc( SpecialKey );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/getprocaddress.c b/progs/tests/getprocaddress.c
deleted file mode 100644
index ca66025d2d..0000000000
--- a/progs/tests/getprocaddress.c
+++ /dev/null
@@ -1,556 +0,0 @@
-/*
- * Copyright (C) 1999-2002 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.
- */
-
-/*
- * Test that glXGetProcAddress works.
- */
-
-#define GLX_GLXEXT_PROTOTYPES
-
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <GL/gl.h>
-#include <GL/glx.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-
-
-typedef void (*generic_func)();
-
-#define EQUAL(X, Y) (fabs((X) - (Y)) < 0.001)
-
-/**
- * The following functions are used to check that the named OpenGL function
- * actually does what it's supposed to do.
- * The naming of these functions is signficant. The getprocaddress.py script
- * scans this file and extracts these function names.
- */
-
-
-static GLboolean
-test_ActiveTextureARB(generic_func func)
-{
- PFNGLACTIVETEXTUREARBPROC activeTexture = (PFNGLACTIVETEXTUREARBPROC) func;
- GLint t;
- GLboolean pass;
- (*activeTexture)(GL_TEXTURE1_ARB);
- glGetIntegerv(GL_ACTIVE_TEXTURE_ARB, &t);
- pass = (t == GL_TEXTURE1_ARB);
- (*activeTexture)(GL_TEXTURE0_ARB); /* restore default */
- return pass;
-}
-
-
-static GLboolean
-test_SecondaryColor3fEXT(generic_func func)
-{
- PFNGLSECONDARYCOLOR3FEXTPROC secColor3f = (PFNGLSECONDARYCOLOR3FEXTPROC) func;
- GLfloat color[4];
- GLboolean pass;
- (*secColor3f)(1.0, 1.0, 0.0);
- glGetFloatv(GL_CURRENT_SECONDARY_COLOR_EXT, color);
- pass = (color[0] == 1.0 && color[1] == 1.0 && color[2] == 0.0);
- (*secColor3f)(0.0, 0.0, 0.0); /* restore default */
- return pass;
-}
-
-
-static GLboolean
-test_ActiveStencilFaceEXT(generic_func func)
-{
- PFNGLACTIVESTENCILFACEEXTPROC activeFace = (PFNGLACTIVESTENCILFACEEXTPROC) func;
- GLint face;
- GLboolean pass;
- (*activeFace)(GL_BACK);
- glGetIntegerv(GL_ACTIVE_STENCIL_FACE_EXT, &face);
- pass = (face == GL_BACK);
- (*activeFace)(GL_FRONT); /* restore default */
- return pass;
-}
-
-
-static GLboolean
-test_VertexAttrib1fvARB(generic_func func)
-{
- PFNGLVERTEXATTRIB1FVARBPROC vertexAttrib1fvARB = (PFNGLVERTEXATTRIB1FVARBPROC) func;
- PFNGLGETVERTEXATTRIBFVARBPROC getVertexAttribfvARB = (PFNGLGETVERTEXATTRIBFVARBPROC) glXGetProcAddressARB((const GLubyte *) "glGetVertexAttribfvARB");
-
- const GLfloat v[1] = {25.0};
- const GLfloat def[1] = {0};
- GLfloat res[4];
- GLboolean pass;
- (*vertexAttrib1fvARB)(6, v);
- (*getVertexAttribfvARB)(6, GL_CURRENT_VERTEX_ATTRIB_ARB, res);
- pass = (res[0] == 25.0 && res[1] == 0.0 && res[2] == 0.0 && res[3] == 1.0);
- (*vertexAttrib1fvARB)(6, def);
- return pass;
-}
-
-static GLboolean
-test_VertexAttrib4NubvARB(generic_func func)
-{
- PFNGLVERTEXATTRIB4NUBVARBPROC vertexAttrib4NubvARB = (PFNGLVERTEXATTRIB4NUBVARBPROC) func;
- PFNGLGETVERTEXATTRIBFVARBPROC getVertexAttribfvARB = (PFNGLGETVERTEXATTRIBFVARBPROC) glXGetProcAddressARB((const GLubyte *) "glGetVertexAttribfvARB");
-
- const GLubyte v[4] = {255, 0, 255, 0};
- const GLubyte def[4] = {0, 0, 0, 255};
- GLfloat res[4];
- GLboolean pass;
- (*vertexAttrib4NubvARB)(6, v);
- (*getVertexAttribfvARB)(6, GL_CURRENT_VERTEX_ATTRIB_ARB, res);
- pass = (res[0] == 1.0 && res[1] == 0.0 && res[2] == 1.0 && res[3] == 0.0);
- (*vertexAttrib4NubvARB)(6, def);
- return pass;
-}
-
-
-static GLboolean
-test_VertexAttrib4NuivARB(generic_func func)
-{
- PFNGLVERTEXATTRIB4NUIVARBPROC vertexAttrib4NuivARB = (PFNGLVERTEXATTRIB4NUIVARBPROC) func;
- PFNGLGETVERTEXATTRIBFVARBPROC getVertexAttribfvARB = (PFNGLGETVERTEXATTRIBFVARBPROC) glXGetProcAddressARB((const GLubyte *) "glGetVertexAttribfvARB");
-
- const GLuint v[4] = {0xffffffff, 0, 0xffffffff, 0};
- const GLuint def[4] = {0, 0, 0, 0xffffffff};
- GLfloat res[4];
- GLboolean pass;
- (*vertexAttrib4NuivARB)(6, v);
- (*getVertexAttribfvARB)(6, GL_CURRENT_VERTEX_ATTRIB_ARB, res);
- pass = (EQUAL(res[0], 1.0) && EQUAL(res[1], 0.0) && EQUAL(res[2], 1.0) && EQUAL(res[3], 0.0));
- (*vertexAttrib4NuivARB)(6, def);
- return pass;
-}
-
-
-static GLboolean
-test_VertexAttrib4ivARB(generic_func func)
-{
- PFNGLVERTEXATTRIB4IVARBPROC vertexAttrib4ivARB = (PFNGLVERTEXATTRIB4IVARBPROC) func;
- PFNGLGETVERTEXATTRIBFVARBPROC getVertexAttribfvARB = (PFNGLGETVERTEXATTRIBFVARBPROC) glXGetProcAddressARB((const GLubyte *) "glGetVertexAttribfvARB");
-
- const GLint v[4] = {1, 2, -3, 4};
- const GLint def[4] = {0, 0, 0, 1};
- GLfloat res[4];
- GLboolean pass;
- (*vertexAttrib4ivARB)(6, v);
- (*getVertexAttribfvARB)(6, GL_CURRENT_VERTEX_ATTRIB_ARB, res);
- pass = (EQUAL(res[0], 1.0) && EQUAL(res[1], 2.0) && EQUAL(res[2], -3.0) && EQUAL(res[3], 4.0));
- (*vertexAttrib4ivARB)(6, def);
- return pass;
-}
-
-
-static GLboolean
-test_VertexAttrib4NsvARB(generic_func func)
-{
- PFNGLVERTEXATTRIB4NSVARBPROC vertexAttrib4NsvARB = (PFNGLVERTEXATTRIB4NSVARBPROC) func;
- PFNGLGETVERTEXATTRIBFVARBPROC getVertexAttribfvARB = (PFNGLGETVERTEXATTRIBFVARBPROC) glXGetProcAddressARB((const GLubyte *) "glGetVertexAttribfvARB");
-
- const GLshort v[4] = {0, 32767, 32767, 0};
- const GLshort def[4] = {0, 0, 0, 32767};
- GLfloat res[4];
- GLboolean pass;
- (*vertexAttrib4NsvARB)(6, v);
- (*getVertexAttribfvARB)(6, GL_CURRENT_VERTEX_ATTRIB_ARB, res);
- pass = (EQUAL(res[0], 0.0) && EQUAL(res[1], 1.0) && EQUAL(res[2], 1.0) && EQUAL(res[3], 0.0));
- (*vertexAttrib4NsvARB)(6, def);
- return pass;
-}
-
-
-static GLboolean
-test_VertexAttrib4NusvARB(generic_func func)
-{
- PFNGLVERTEXATTRIB4NUSVARBPROC vertexAttrib4NusvARB = (PFNGLVERTEXATTRIB4NUSVARBPROC) func;
- PFNGLGETVERTEXATTRIBFVARBPROC getVertexAttribfvARB = (PFNGLGETVERTEXATTRIBFVARBPROC) glXGetProcAddressARB((const GLubyte *) "glGetVertexAttribfvARB");
-
- const GLushort v[4] = {0xffff, 0, 0xffff, 0};
- const GLushort def[4] = {0, 0, 0, 0xffff};
- GLfloat res[4];
- GLboolean pass;
- (*vertexAttrib4NusvARB)(6, v);
- (*getVertexAttribfvARB)(6, GL_CURRENT_VERTEX_ATTRIB_ARB, res);
- pass = (EQUAL(res[0], 1.0) && EQUAL(res[1], 0.0) && EQUAL(res[2], 1.0) && EQUAL(res[3], 0.0));
- (*vertexAttrib4NusvARB)(6, def);
- return pass;
-}
-
-
-static GLboolean
-test_VertexAttrib4ubNV(generic_func func)
-{
- PFNGLVERTEXATTRIB4UBNVPROC vertexAttrib4ubNV = (PFNGLVERTEXATTRIB4UBNVPROC) func;
- PFNGLGETVERTEXATTRIBFVNVPROC getVertexAttribfvNV = (PFNGLGETVERTEXATTRIBFVNVPROC) glXGetProcAddressARB((const GLubyte *) "glGetVertexAttribfvNV");
-
- const GLubyte v[4] = {255, 0, 255, 0};
- const GLubyte def[4] = {0, 0, 0, 255};
- GLfloat res[4];
- GLboolean pass;
- (*vertexAttrib4ubNV)(6, v[0], v[1], v[2], v[3]);
- (*getVertexAttribfvNV)(6, GL_CURRENT_ATTRIB_NV, res);
- pass = (res[0] == 1.0 && res[1] == 0.0 && res[2] == 1.0 && res[3] == 0.0);
- (*vertexAttrib4ubNV)(6, def[0], def[1], def[2], def[3]);
- return pass;
-}
-
-
-static GLboolean
-test_VertexAttrib2sNV(generic_func func)
-{
- PFNGLVERTEXATTRIB2SNVPROC vertexAttrib2sNV = (PFNGLVERTEXATTRIB2SNVPROC) func;
- PFNGLGETVERTEXATTRIBFVNVPROC getVertexAttribfvNV = (PFNGLGETVERTEXATTRIBFVNVPROC) glXGetProcAddressARB((const GLubyte *) "glGetVertexAttribfvNV");
-
- const GLshort v[2] = {2, -4,};
- const GLshort def[2] = {0, 0};
- GLfloat res[4];
- GLboolean pass;
- (*vertexAttrib2sNV)(6, v[0], v[1]);
- (*getVertexAttribfvNV)(6, GL_CURRENT_ATTRIB_NV, res);
- pass = (EQUAL(res[0], 2) && EQUAL(res[1], -4) && EQUAL(res[2], 0) && res[3] == 1.0);
- (*vertexAttrib2sNV)(6, def[0], def[1]);
- return pass;
-}
-
-
-static GLboolean
-test_VertexAttrib3fNV(generic_func func)
-{
- PFNGLVERTEXATTRIB3FNVPROC vertexAttrib3fNV = (PFNGLVERTEXATTRIB3FNVPROC) func;
- PFNGLGETVERTEXATTRIBFVNVPROC getVertexAttribfvNV = (PFNGLGETVERTEXATTRIBFVNVPROC) glXGetProcAddressARB((const GLubyte *) "glGetVertexAttribfvNV");
-
- const GLfloat v[3] = {0.2, 0.4, 0.8};
- const GLfloat def[3] = {0, 0, 0};
- GLfloat res[4];
- GLboolean pass;
- (*vertexAttrib3fNV)(6, v[0], v[1], v[2]);
- (*getVertexAttribfvNV)(6, GL_CURRENT_ATTRIB_NV, res);
- pass = (EQUAL(res[0], 0.2) && EQUAL(res[1], 0.4) && EQUAL(res[2], 0.8) && res[3] == 1.0);
- (*vertexAttrib3fNV)(6, def[0], def[1], def[2]);
- return pass;
-}
-
-
-static GLboolean
-test_VertexAttrib4dvNV(generic_func func)
-{
- PFNGLVERTEXATTRIB4DVNVPROC vertexAttrib4dvNV = (PFNGLVERTEXATTRIB4DVNVPROC) func;
- PFNGLGETVERTEXATTRIBFVNVPROC getVertexAttribfvNV = (PFNGLGETVERTEXATTRIBFVNVPROC) glXGetProcAddressARB((const GLubyte *) "glGetVertexAttribfvNV");
-
- const GLdouble v[4] = {0.2, 0.4, 0.8, 1.2};
- const GLdouble def[4] = {0, 0, 0, 1};
- GLfloat res[4];
- GLboolean pass;
- (*vertexAttrib4dvNV)(6, v);
- (*getVertexAttribfvNV)(6, GL_CURRENT_ATTRIB_NV, res);
- pass = (EQUAL(res[0], 0.2) && EQUAL(res[1], 0.4) && EQUAL(res[2], 0.8) && EQUAL(res[3], 1.2));
- (*vertexAttrib4dvNV)(6, def);
- return pass;
-}
-
-
-static GLboolean
-test_StencilFuncSeparateATI(generic_func func)
-{
-#ifdef GL_ATI_separate_stencil
- PFNGLSTENCILFUNCSEPARATEATIPROC stencilFuncSeparateATI = (PFNGLSTENCILFUNCSEPARATEATIPROC) func;
- GLint frontFunc, backFunc;
- GLint frontRef, backRef;
- GLint frontMask, backMask;
- (*stencilFuncSeparateATI)(GL_LESS, GL_GREATER, 2, 0xa);
- glGetIntegerv(GL_STENCIL_FUNC, &frontFunc);
- glGetIntegerv(GL_STENCIL_BACK_FUNC, &backFunc);
- glGetIntegerv(GL_STENCIL_REF, &frontRef);
- glGetIntegerv(GL_STENCIL_BACK_REF, &backRef);
- glGetIntegerv(GL_STENCIL_VALUE_MASK, &frontMask);
- glGetIntegerv(GL_STENCIL_BACK_VALUE_MASK, &backMask);
- if (frontFunc != GL_LESS ||
- backFunc != GL_GREATER ||
- frontRef != 2 ||
- backRef != 2 ||
- frontMask != 0xa ||
- backMask != 0xa)
- return GL_FALSE;
-#endif
- return GL_TRUE;
-}
-
-static GLboolean
-test_StencilFuncSeparate(generic_func func)
-{
-#ifdef GL_VERSION_2_0
- PFNGLSTENCILFUNCSEPARATEPROC stencilFuncSeparate = (PFNGLSTENCILFUNCSEPARATEPROC) func;
- GLint frontFunc, backFunc;
- GLint frontRef, backRef;
- GLint frontMask, backMask;
- (*stencilFuncSeparate)(GL_BACK, GL_GREATER, 2, 0xa);
- glGetIntegerv(GL_STENCIL_FUNC, &frontFunc);
- glGetIntegerv(GL_STENCIL_BACK_FUNC, &backFunc);
- glGetIntegerv(GL_STENCIL_REF, &frontRef);
- glGetIntegerv(GL_STENCIL_BACK_REF, &backRef);
- glGetIntegerv(GL_STENCIL_VALUE_MASK, &frontMask);
- glGetIntegerv(GL_STENCIL_BACK_VALUE_MASK, &backMask);
- if (frontFunc != GL_ALWAYS ||
- backFunc != GL_GREATER ||
- frontRef != 0 ||
- backRef != 2 ||
- frontMask == 0xa || /* might be 0xff or ~0 */
- backMask != 0xa)
- return GL_FALSE;
-#endif
- return GL_TRUE;
-}
-
-static GLboolean
-test_StencilOpSeparate(generic_func func)
-{
-#ifdef GL_VERSION_2_0
- PFNGLSTENCILOPSEPARATEPROC stencilOpSeparate = (PFNGLSTENCILOPSEPARATEPROC) func;
- GLint frontFail, backFail;
- GLint frontZFail, backZFail;
- GLint frontZPass, backZPass;
- (*stencilOpSeparate)(GL_BACK, GL_INCR, GL_DECR, GL_INVERT);
- glGetIntegerv(GL_STENCIL_FAIL, &frontFail);
- glGetIntegerv(GL_STENCIL_BACK_FAIL, &backFail);
- glGetIntegerv(GL_STENCIL_PASS_DEPTH_FAIL, &frontZFail);
- glGetIntegerv(GL_STENCIL_BACK_PASS_DEPTH_FAIL, &backZFail);
- glGetIntegerv(GL_STENCIL_PASS_DEPTH_PASS, &frontZPass);
- glGetIntegerv(GL_STENCIL_BACK_PASS_DEPTH_PASS, &backZPass);
- if (frontFail != GL_KEEP ||
- backFail != GL_INCR ||
- frontZFail != GL_KEEP ||
- backZFail != GL_DECR ||
- frontZPass != GL_KEEP ||
- backZPass != GL_INVERT)
- return GL_FALSE;
-#endif
- return GL_TRUE;
-}
-
-static GLboolean
-test_StencilMaskSeparate(generic_func func)
-{
-#ifdef GL_VERSION_2_0
- PFNGLSTENCILMASKSEPARATEPROC stencilMaskSeparate = (PFNGLSTENCILMASKSEPARATEPROC) func;
- GLint frontMask, backMask;
- (*stencilMaskSeparate)(GL_BACK, 0x1b);
- glGetIntegerv(GL_STENCIL_WRITEMASK, &frontMask);
- glGetIntegerv(GL_STENCIL_BACK_WRITEMASK, &backMask);
- if (frontMask == 0x1b ||
- backMask != 0x1b)
- return GL_FALSE;
-#endif
- return GL_TRUE;
-}
-
-
-/*
- * The following file is auto-generated with Python.
- */
-#include "getproclist.h"
-
-
-
-static int
-extension_supported(const char *haystack, const char *needle)
-{
- const char *p = strstr(haystack, needle);
- if (p) {
- /* found string, make sure next char is space or zero */
- const int len = strlen(needle);
- if (p[len] == ' ' || p[len] == 0)
- return 1;
- else
- return 0;
- }
- else
- return 0;
-}
-
-
-static void
-check_functions( const char *extensions )
-{
- struct name_test_pair *entry;
- int failures = 0, passes = 0;
- int totalFail = 0, totalPass = 0;
- int doTests;
-
- for (entry = functions; entry->name; entry++) {
- if (entry->name[0] == '-') {
- const char *version = (const char *) glGetString(GL_VERSION);
- if (entry->name[1] == '1') {
- /* check GL version 1.x */
- if (version[0] == '1' &&
- version[1] == '.' &&
- version[2] >= entry->name[3])
- doTests = 1;
- else
- doTests = 0;
- }
- else if (entry->name[1] == '2') {
- if (version[0] == '2' &&
- version[1] == '.' &&
- version[2] >= entry->name[3])
- doTests = 1;
- else
- doTests = 0;
- }
- else {
- /* check if the named extension is available */
- doTests = extension_supported(extensions, entry->name+1);
- }
- if (doTests)
- printf("Testing %s functions\n", entry->name + 1);
- totalFail += failures;
- totalPass += passes;
- failures = 0;
- passes = 0;
- }
- else if (doTests) {
- generic_func funcPtr = (generic_func) glXGetProcAddressARB((const GLubyte *) entry->name);
- if (funcPtr) {
- if (entry->test) {
- GLboolean b;
- printf(" Validating %s:", entry->name);
- b = (*entry->test)(funcPtr);
- if (b) {
- printf(" Pass\n");
- passes++;
- }
- else {
- printf(" FAIL!!!\n");
- failures++;
- }
- }
- else {
- passes++;
- }
- }
- else {
- printf(" glXGetProcAddress(%s) failed!\n", entry->name);
- failures++;
- }
- }
-
- if (doTests && (!(entry+1)->name || (entry+1)->name[0] == '-')) {
- if (failures > 0) {
- printf(" %d failed.\n", failures);
- }
- if (passes > 0) {
- printf(" %d passed.\n", passes);
- }
- }
- }
- totalFail += failures;
- totalPass += passes;
-
- printf("-----------------------------\n");
- printf("Total: %d pass %d fail\n", totalPass, totalFail);
-}
-
-
-
-static void
-print_screen_info(Display *dpy, int scrnum, Bool allowDirect)
-{
- Window win;
- int attribSingle[] = {
- GLX_RGBA,
- GLX_RED_SIZE, 1,
- GLX_GREEN_SIZE, 1,
- GLX_BLUE_SIZE, 1,
- GLX_STENCIL_SIZE, 1,
- None };
- int attribDouble[] = {
- GLX_RGBA,
- GLX_RED_SIZE, 1,
- GLX_GREEN_SIZE, 1,
- GLX_BLUE_SIZE, 1,
- GLX_STENCIL_SIZE, 1,
- GLX_DOUBLEBUFFER,
- None };
-
- XSetWindowAttributes attr;
- unsigned long mask;
- Window root;
- GLXContext ctx;
- XVisualInfo *visinfo;
- int width = 100, height = 100;
-
- root = RootWindow(dpy, scrnum);
-
- visinfo = glXChooseVisual(dpy, scrnum, attribSingle);
- if (!visinfo) {
- visinfo = glXChooseVisual(dpy, scrnum, attribDouble);
- if (!visinfo) {
- fprintf(stderr, "Error: couldn't find RGB GLX visual\n");
- return;
- }
- }
-
- attr.background_pixel = 0;
- attr.border_pixel = 0;
- attr.colormap = XCreateColormap(dpy, root, visinfo->visual, AllocNone);
- attr.event_mask = StructureNotifyMask | ExposureMask;
- mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask;
- win = XCreateWindow(dpy, root, 0, 0, width, height,
- 0, visinfo->depth, InputOutput,
- visinfo->visual, mask, &attr);
-
- ctx = glXCreateContext( dpy, visinfo, NULL, allowDirect );
- if (!ctx) {
- fprintf(stderr, "Error: glXCreateContext failed\n");
- XDestroyWindow(dpy, win);
- return;
- }
-
- if (glXMakeCurrent(dpy, win, ctx)) {
- check_functions( (const char *) glGetString(GL_EXTENSIONS) );
- }
- else {
- fprintf(stderr, "Error: glXMakeCurrent failed\n");
- }
-
- glXDestroyContext(dpy, ctx);
- XDestroyWindow(dpy, win);
-}
-
-
-int
-main(int argc, char *argv[])
-{
- char *displayName = NULL;
- Display *dpy;
-
- dpy = XOpenDisplay(displayName);
- if (!dpy) {
- fprintf(stderr, "Error: unable to open display %s\n", displayName);
- return -1;
- }
-
- print_screen_info(dpy, 0, GL_TRUE);
-
- XCloseDisplay(dpy);
-
- return 0;
-}
diff --git a/progs/tests/getprocaddress.py b/progs/tests/getprocaddress.py
deleted file mode 100644
index d16b2d93d0..0000000000
--- a/progs/tests/getprocaddress.py
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/usr/bin/env python
-
-# $Id: getprocaddress.py,v 1.7 2005/06/21 23:42:43 idr Exp $
-
-# Helper for the getprocaddress.c test.
-
-import sys, getopt, re
-sys.path.append("../../src/mesa/glapi/" )
-import gl_XML
-import license
-
-
-def FindTestFunctions():
- """Scan getprocaddress.c for lines that start with "test_" to find
- extension function tests. Return a list of names found."""
- functions = []
- f = open("getprocaddress.c")
- if not f:
- return functions
- for line in f.readlines():
- v = re.search("^test_([a-zA-Z0-9]+)", line)
- if v:
- func = v.group(1)
- functions.append(func)
- f.close
- return functions
-
-
-class PrintExports(gl_XML.gl_print_base):
- def __init__(self):
- gl_XML.gl_print_base.__init__(self)
-
- self.name = "getprocaddress.py (from Mesa)"
- self.license = license.bsd_license_template % ( \
-"""Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
-(C) Copyright IBM Corporation 2004""", "BRIAN PAUL, IBM")
-
- self.tests = FindTestFunctions()
- self.prevCategory = ""
- return
-
-
- def printRealHeader(self):
- print """
-struct name_test_pair {
- const char *name;
- GLboolean (*test)(generic_func);
-};
-
-static struct name_test_pair functions[] = {"""
-
- def printBody(self, api):
- prev_category = None
-
-
- for f in api.functionIterateByOffset():
- [category, num] = api.get_category_for_name( f.name )
- if category != prev_category:
- print ' { "-%s", NULL},' % category
- prev_category = category
-
- test = "NULL"
- for name in f.entry_points:
- if name in self.tests:
- test = "test_%s" % name
- break
-
- print ' { "gl%s", %s },' % (f.name, test)
-
- print ''
- print ' { NULL, NULL }'
- print '};'
- print ''
- return
-
-
-if __name__ == '__main__':
- file_name = "../../src/mesa/glapi/gl_API.xml"
-
- try:
- (args, trail) = getopt.getopt(sys.argv[1:], "f:")
- except Exception,e:
- show_usage()
-
- for (arg,val) in args:
- if arg == "-f":
- file_name = val
-
- printer = PrintExports()
-
- api = gl_XML.parse_GL_API( file_name, gl_XML.gl_item_factory() )
-
- printer.Print( api )
diff --git a/progs/tests/interleave.c b/progs/tests/interleave.c
deleted file mode 100644
index e98b3ed046..0000000000
--- a/progs/tests/interleave.c
+++ /dev/null
@@ -1,406 +0,0 @@
-/*
- * (C) Copyright IBM Corporation 2005
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, and/or sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file interleave.c
- *
- * Simple test of glInterleavedArrays functionality. For each mode, two
- * meshes are drawn. One is drawn using interleaved arrays and the othe is
- * drawn using immediate mode. Both should look identical.
- *
- * \author Ian Romanick <idr@us.ibm.com>
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <GL/glut.h>
-
-static int Width = 400;
-static int Height = 300;
-static const GLfloat Near = 5.0, Far = 25.0;
-
-static const GLfloat t[][4] = {
- { 0.5, 0.0, 0.0, 1.0 },
-
- { 0.25, 0.5, 0.0, 1.0 },
- { 0.75, 0.5, 0.0, 1.0 },
-
- { 0.0, 1.0, 0.0, 1.0 },
- { 0.5, 1.0, 0.0, 1.0 },
- { 1.0, 1.0, 0.0, 1.0 },
-};
-
-static const GLfloat c_f[][4] = {
- { 1.0, 0.0, 0.0, 1.0 },
-
- { 0.0, 1.0, 0.0, 1.0 },
- { 0.0, 1.0, 0.0, 1.0 },
-
- { 0.0, 0.0, 1.0, 1.0 },
- { 1.0, 0.0, 1.0, 1.0 },
- { 0.0, 0.0, 1.0, 1.0 },
-};
-
-static const GLubyte c_ub[][4] = {
- { 0xff, 0x00, 0x00, 0xff },
-
- { 0x00, 0xff, 0x00, 0xff },
- { 0x00, 0xff, 0x00, 0xff },
-
- { 0x00, 0x00, 0xff, 0xff },
- { 0xff, 0x00, 0xff, 0xff },
- { 0x00, 0x00, 0xff, 0xff },
-};
-
-static const GLfloat n[][3] = {
- { 0.0, 0.0, -1.0 },
-
- { 0.0, 0.0, -1.0 },
- { 0.0, 0.0, -1.0 },
-
- { 0.0, 0.0, -1.0 },
- { 0.0, 0.0, -1.0 },
- { 0.0, 0.0, -1.0 },
-};
-
-static const GLfloat v[][4] = {
- { 0.0, 1.0, 0.0, 1.0, },
-
- { -0.5, 0.0, 0.0, 1.0, },
- { 0.5, 0.0, 0.0, 1.0, },
-
- { -1.0, -1.0, 0.0, 1.0, },
- { 0.0, -1.0, 0.0, 1.0, },
- { 1.0, -1.0, 0.0, 1.0, },
-};
-
-static const unsigned indicies[12] = {
- 0, 1, 2,
- 1, 3, 4,
- 2, 4, 5,
- 1, 4, 2
-};
-
-#define NONE { NULL, 0, 0, 0 }
-#define V2F { v, 2, 2 * sizeof( GLfloat ), GL_FLOAT, sizeof( v[0] ) }
-#define V3F { v, 3, 3 * sizeof( GLfloat ), GL_FLOAT, sizeof( v[0] ) }
-#define V4F { v, 4, 4 * sizeof( GLfloat ), GL_FLOAT, sizeof( v[0] ) }
-
-#define C4UB { c_ub, 4, 4 * sizeof( GLubyte ), GL_UNSIGNED_BYTE, sizeof( c_ub[0] ) }
-#define C3F { c_f, 3, 3 * sizeof( GLfloat ), GL_FLOAT, sizeof( c_f[0] ) }
-#define C4F { c_f, 4, 4 * sizeof( GLfloat ), GL_FLOAT, sizeof( c_f[0] ) }
-
-#define T2F { t, 2, 2 * sizeof( GLfloat ), GL_FLOAT, sizeof( t[0] ) }
-#define T4F { t, 4, 4 * sizeof( GLfloat ), GL_FLOAT, sizeof( t[0] ) }
-
-#define N3F { n, 3, 3 * sizeof( GLfloat ), GL_FLOAT, sizeof( n[0] ) }
-
-struct interleave_info {
- const void * data;
- unsigned count;
- unsigned size;
- GLenum type;
- unsigned stride;
-};
-
-#define NUM_MODES 14
-#define INVALID_MODE 14
-#define INVALID_STRIDE 15
-
-struct interleave_info info[ NUM_MODES ][4] = {
- { NONE, NONE, NONE, V2F },
- { NONE, NONE, NONE, V3F },
- { NONE, C4UB, NONE, V2F },
- { NONE, C4UB, NONE, V3F },
- { NONE, C3F, NONE, V3F },
-
- { NONE, NONE, N3F, V3F },
- { NONE, C4F, N3F, V3F },
-
- { T2F, NONE, NONE, V3F },
- { T4F, NONE, NONE, V4F },
-
- { T2F, C4UB, NONE, V3F },
- { T2F, C3F, NONE, V3F },
- { T2F, NONE, N3F, V3F },
- { T2F, C4F, N3F, V3F },
- { T4F, C4F, N3F, V4F },
-};
-
-const char * const mode_names[ NUM_MODES ] = {
- "GL_V2F",
- "GL_V3F",
- "GL_C4UB_V2F",
- "GL_C4UB_V3F",
- "GL_C3F_V3F",
- "GL_N3F_V3F",
- "GL_C4F_N3F_V3F",
- "GL_T2F_V3F",
- "GL_T4F_V4F",
- "GL_T2F_C4UB_V3F",
- "GL_T2F_C3F_V3F",
- "GL_T2F_N3F_V3F",
- "GL_T2F_C4F_N3F_V3F",
- "GL_T4F_C4F_N3F_V4F",
-};
-
-static unsigned interleave_mode = 0;
-static GLboolean use_invalid_mode = GL_FALSE;
-static GLboolean use_invalid_stride = GL_FALSE;
-
-#define DEREF(item,idx) (void *) & ((char *)curr_info[item].data)[idx * curr_info[item].stride]
-
-static void Display( void )
-{
- const struct interleave_info * const curr_info = info[ interleave_mode ];
-
- /* 4 floats for 12 verticies for 4 data elements.
- */
- char data[ (sizeof( GLfloat ) * 4) * 12 * 4 ];
-
- unsigned i;
- unsigned offset;
- GLenum err;
- GLenum format;
- GLsizei stride;
-
-
- glClearColor(0.2, 0.2, 0.8, 0);
- glClear( GL_COLOR_BUFFER_BIT );
-
- glPushMatrix();
-
- glTranslatef(-1.5, 0, 0);
-
- glColor3fv( c_f[0] );
-
- if ( curr_info[0].data != NULL ) {
- glEnable( GL_TEXTURE_2D );
- }
- else {
- glDisable( GL_TEXTURE_2D );
- }
-
-
- offset = 0;
- glBegin(GL_TRIANGLES);
- for ( i = 0 ; i < 12 ; i++ ) {
- const unsigned index = indicies[i];
-
-
- /* Handle the vertex texture coordinate.
- */
- if ( curr_info[0].data != NULL ) {
- if ( curr_info[0].count == 2 ) {
- glTexCoord2fv( DEREF(0, index) );
- }
- else {
- glTexCoord4fv( DEREF(0, index) );
- }
-
- (void) memcpy( & data[ offset ], DEREF(0, index),
- curr_info[0].size );
- offset += curr_info[0].size;
- }
-
-
- /* Handle the vertex color.
- */
- if ( curr_info[1].data != NULL ) {
- if ( curr_info[1].type == GL_FLOAT ) {
- if ( curr_info[1].count == 3 ) {
- glColor3fv( DEREF(1, index) );
- }
- else {
- glColor4fv( DEREF(1, index) );
- }
- }
- else {
- glColor4ubv( DEREF(1, index) );
- }
-
- (void) memcpy( & data[ offset ], DEREF(1, index),
- curr_info[1].size );
- offset += curr_info[1].size;
- }
-
-
- /* Handle the vertex normal.
- */
- if ( curr_info[2].data != NULL ) {
- glNormal3fv( DEREF(2, index) );
-
- (void) memcpy( & data[ offset ], DEREF(2, index),
- curr_info[2].size );
- offset += curr_info[2].size;
- }
-
-
- switch( curr_info[3].count ) {
- case 2:
- glVertex2fv( DEREF(3, index) );
- break;
- case 3:
- glVertex3fv( DEREF(3, index) );
- break;
- case 4:
- glVertex4fv( DEREF(3, index) );
- break;
- }
-
- (void) memcpy( & data[ offset ], DEREF(3, index),
- curr_info[3].size );
- offset += curr_info[3].size;
- }
- glEnd();
-
-
- glTranslatef(3.0, 0, 0);
-
- /* The masking with ~0x2A00 is a bit of a hack to make sure that format
- * ends up with an invalid value no matter what rand() returns.
- */
- format = (use_invalid_mode)
- ? (rand() & ~0x2A00) : GL_V2F + interleave_mode;
- stride = (use_invalid_stride) ? -abs(rand()) : 0;
-
- (void) glGetError();
- glInterleavedArrays( format, stride, data );
- err = glGetError();
- if ( err ) {
- printf("glInterleavedArrays(0x%04x, %d, %p) generated the error 0x%04x\n",
- format, stride, data, err );
- }
- else {
- glDrawArrays( GL_TRIANGLES, 0, 12 );
- }
-
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- GLfloat ar = (float) width / (float) height;
- Width = width;
- Height = height;
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -ar, ar, -1.0, 1.0, Near, Far );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -15.0 );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void ModeMenu( int entry )
-{
- if ( entry == INVALID_MODE ) {
- use_invalid_mode = GL_TRUE;
- use_invalid_stride = GL_FALSE;
- }
- else if ( entry == INVALID_STRIDE ) {
- use_invalid_mode = GL_FALSE;
- use_invalid_stride = GL_TRUE;
- }
- else {
- use_invalid_mode = GL_FALSE;
- use_invalid_stride = GL_FALSE;
- interleave_mode = entry;
- }
-}
-
-static void Init( void )
-{
- const char * const ver_string = (const char * const)
- glGetString( GL_VERSION );
- const GLubyte tex[16] = {
- 0xff, 0x00, 0xff, 0x00,
- 0x00, 0xff, 0x00, 0xff,
- 0xff, 0x00, 0xff, 0x00,
- 0x00, 0xff, 0x00, 0xff,
- };
-
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- printf("GL_VERSION = %s\n", ver_string);
-
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
- glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
- glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, 4, 4, 0,
- GL_LUMINANCE, GL_UNSIGNED_BYTE, tex );
-
- printf("Use the context menu (right click) to select the interleaved array mode.\n");
- printf("Press ESCAPE to exit.\n\n");
- printf("NOTE: This is *NOT* a very good test of the modes that use normals.\n");
-}
-
-
-int main( int argc, char *argv[] )
-{
- unsigned i;
-
- srand( time( NULL ) );
-
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( Width, Height );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
- glutCreateWindow( "glInterleavedArrays test" );
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
-
- glutCreateMenu( ModeMenu );
- for ( i = 0 ; i < NUM_MODES ; i++ ) {
- glutAddMenuEntry( mode_names[i], i);
- }
-
- glutAddMenuEntry( "Random invalid mode", INVALID_MODE);
- glutAddMenuEntry( "Random invalid stride", INVALID_STRIDE);
-
- glutAttachMenu(GLUT_RIGHT_BUTTON);
-
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/invert.c b/progs/tests/invert.c
deleted file mode 100644
index 750592ed79..0000000000
--- a/progs/tests/invert.c
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * (C) Copyright IBM Corporation 2005
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, and/or sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file invert.c
- *
- * Simple test of GL_MESA_pack_invert functionality. Three squares are
- * drawn. The first two should look the same, and the third one should
- * look inverted.
- *
- * \author Ian Romanick <idr@us.ibm.com>
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <GL/glut.h>
-
-#include "readtex.h"
-
-#define IMAGE_FILE "../images/tree3.rgb"
-
-static int Width = 420;
-static int Height = 150;
-static const GLfloat Near = 5.0, Far = 25.0;
-
-static GLubyte * image = NULL;
-static GLubyte * temp_image = NULL;
-static GLuint img_width = 0;
-static GLuint img_height = 0;
-static GLuint img_format = 0;
-
-PFNGLWINDOWPOS2IPROC win_pos_2i = NULL;
-
-
-static void Display( void )
-{
- GLint err;
-
-
- glClearColor(0.2, 0.2, 0.8, 0);
- glClear( GL_COLOR_BUFFER_BIT );
-
-
- /* This is the "reference" square.
- */
-
- (*win_pos_2i)( 5, 5 );
- glDrawPixels( img_width, img_height, img_format, GL_UNSIGNED_BYTE, image );
-
- glPixelStorei( GL_PACK_INVERT_MESA, GL_FALSE );
- err = glGetError();
- if ( err != GL_NO_ERROR ) {
- printf( "Setting PACK_INVERT_MESA to false generated an error (0x%04x).\n",
- err );
- }
-
- glReadPixels( 5, 5, img_width, img_height, img_format, GL_UNSIGNED_BYTE, temp_image );
- (*win_pos_2i)( 5 + 1 * (10 + img_width), 5 );
- glDrawPixels( img_width, img_height, img_format, GL_UNSIGNED_BYTE, temp_image );
-
- glPixelStorei( GL_PACK_INVERT_MESA, GL_TRUE );
- err = glGetError();
- if ( err != GL_NO_ERROR ) {
- printf( "Setting PACK_INVERT_MESA to true generated an error (0x%04x).\n",
- err );
- }
-
- glReadPixels( 5, 5, img_width, img_height, img_format, GL_UNSIGNED_BYTE, temp_image );
- (*win_pos_2i)( 5 + 2 * (10 + img_width), 5 );
- glDrawPixels( img_width, img_height, img_format, GL_UNSIGNED_BYTE, temp_image );
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- GLfloat ar = (float) width / (float) height;
- Width = width;
- Height = height;
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -ar, ar, -1.0, 1.0, Near, Far );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -15.0 );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void Init( void )
-{
- const char * const ver_string = (const char * const)
- glGetString( GL_VERSION );
- const float ver = strtof( ver_string, NULL );
-
-
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- printf("GL_VERSION = %s\n", ver_string);
-
- if ( !glutExtensionSupported("GL_MESA_pack_invert") ) {
- printf("\nSorry, this program requires GL_MESA_pack_invert.\n");
- exit(1);
- }
-
- if ( ver >= 1.4 ) {
- win_pos_2i = (PFNGLWINDOWPOS2IPROC) glutGetProcAddress( "glWindowPos2i" );
- }
- else if ( glutExtensionSupported("GL_ARB_window_pos") ) {
- win_pos_2i = (PFNGLWINDOWPOS2IPROC) glutGetProcAddress( "glWindowPos2iARB" );
- }
- else if ( glutExtensionSupported("GL_MESA_window_pos") ) {
- win_pos_2i = (PFNGLWINDOWPOS2IPROC) glutGetProcAddress( "glWindowPos2iMESA" );
- }
-
-
- /* Do this check as a separate if-statement instead of as an else in case
- * one of the required extensions is supported but glutGetProcAddress
- * returns NULL.
- */
-
- if ( win_pos_2i == NULL ) {
- printf("\nSorry, this program requires either GL 1.4 (or higher),\n"
- "GL_ARB_window_pos, or GL_MESA_window_pos.\n");
- exit(1);
- }
-
- printf("\nThe left 2 squares should be the same color, and the right\n"
- "square should look upside-down.\n");
-
-
- image = LoadRGBImage( IMAGE_FILE, & img_width, & img_height,
- & img_format );
- if ( image == NULL ) {
- printf( "Could not open image file \"%s\".\n", IMAGE_FILE );
- exit(1);
- }
-
- temp_image = malloc( 3 * img_height * img_width );
- if ( temp_image == NULL ) {
- printf( "Could not allocate memory for temporary image.\n" );
- exit(1);
- }
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( Width, Height );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
- glutCreateWindow( "GL_MESA_pack_invert test" );
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/jkrahntest.c b/progs/tests/jkrahntest.c
deleted file mode 100644
index 85bda8d015..0000000000
--- a/progs/tests/jkrahntest.c
+++ /dev/null
@@ -1,181 +0,0 @@
-/* $Id: jkrahntest.c,v 1.2 2006/01/30 17:12:10 brianp Exp $ */
-
-/* This is a good test for glXSwapBuffers on non-current windows,
- * and the glXCopyContext function. Fixed several Mesa/DRI bugs with
- * this program on 15 June 2002.
- *
- * Joe's comments follow:
- *
- * I have tried some different approaches for being able to
- * draw to multiple windows using one context, or a copied
- * context. Mesa/indirect rendering works to use one context
- * for multiple windows, but crashes with glXCopyContext.
- * DRI is badly broken, at least for ATI.
- *
- * I also noticed that glXMakeCurrent allows a window and context
- * from different visuals to be attached (haven't tested recently).
- *
- * Joe Krahn <jkrahn@nc.rr.com>
- */
-
-#include <GL/glx.h>
-#include <GL/gl.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <math.h>
-
-#ifndef M_PI
-#define M_PI 3.14159
-#endif
-
-#define DEGTOR (M_PI/180.0)
-
-static int AttributeList[] = { GLX_RGBA, GLX_DOUBLEBUFFER, None };
-
-int main(int argc, char **argv)
-{
- Window win1, win2;
- XVisualInfo *vi;
- XSetWindowAttributes swa;
- Display *dpy;
- GLXContext ctx1, ctx2;
- float angle;
- int test;
-
- if (argc < 2) {
- fprintf(stderr, "This program tests GLX context switching.\n");
- fprintf(stderr, "Usage: cxbug <n>\n");
- fprintf(stderr, "Where n is:\n");
- fprintf(stderr, "\t1) Use two contexts and swap only when the context is current (typical case).\n");
- fprintf(stderr, "\t2) Use two contexts and swap at the same time.\n");
- fprintf(stderr, "\t\t Used to crash Mesa & nVidia, and DRI artifacts. Seems OK now.\n");
- fprintf(stderr, "\t3) Use one context, but only swap when a context is current.\n");
- fprintf(stderr, "\t\t Serious artifacts for DRI at least with ATI.\n");
- fprintf(stderr, "\t4) Use one context, swap both windows at the same time, so the left\n");
- fprintf(stderr, "\t\t window has no context at swap time. Severe artifacts for DRI.\n");
- fprintf(stderr, "\t5) Use two contexts, copying one to the other when switching windows.\n");
- fprintf(stderr, "\t\t DRI gives an error, indirect rendering crashes server.\n");
-
- exit(1);
- }
- test = atoi(argv[1]);
-
- /* get a connection */
- dpy = XOpenDisplay(NULL);
-
- /* Get an appropriate visual */
- vi = glXChooseVisual(dpy, DefaultScreen(dpy), AttributeList);
- if (vi == 0) {
- fprintf(stderr, "No matching visuals found.\n");
- exit(-1);
- }
-
- /* Create two GLX contexts, with list sharing */
- ctx1 = glXCreateContext(dpy, vi, 0, True);
- ctx2 = glXCreateContext(dpy, vi, ctx1, True);
-
- /* create a colormap */
- swa.colormap = XCreateColormap(dpy, RootWindow(dpy, vi->screen),
- vi->visual, AllocNone);
- swa.border_pixel = 0;
-
- /* Create two windows */
- win1 = XCreateWindow(dpy, RootWindow(dpy, vi->screen),
- 10, 10, 200, 200,
- 0, vi->depth, InputOutput, vi->visual,
- CWBorderPixel | CWColormap, &swa);
- XStoreName(dpy, win1, "Test [L]");
- XMapWindow(dpy, win1);
- XMoveWindow(dpy, win1, 10, 10); /* Initial requested x,y may not be honored */
- {
- XSizeHints sizehints;
- static const char *name = "window";
- sizehints.x = 10;
- sizehints.y = 10;
- sizehints.width = 200;
- sizehints.height = 200;
- sizehints.flags = USSize | USPosition;
- XSetNormalHints(dpy, win1, &sizehints);
- XSetStandardProperties(dpy, win1, name, name,
- None, (char **)NULL, 0, &sizehints);
- }
-
-
- win2 = XCreateWindow(dpy, RootWindow(dpy, vi->screen),
- 250, 10, 200, 200,
- 0, vi->depth, InputOutput, vi->visual,
- CWBorderPixel | CWColormap, &swa);
- XStoreName(dpy, win1, "Test [R]");
- XMapWindow(dpy, win2);
- XMoveWindow(dpy, win2, 260, 10);
- {
- XSizeHints sizehints;
- static const char *name = "window";
- sizehints.x = 10;
- sizehints.y = 10;
- sizehints.width = 200;
- sizehints.height = 200;
- sizehints.flags = USSize | USPosition;
- XSetNormalHints(dpy, win2, &sizehints);
- XSetStandardProperties(dpy, win2, name, name,
- None, (char **)NULL, 0, &sizehints);
- }
-
-
- /* Now draw some spinning things */
- for (angle = 0; angle < 360*4; angle += 10.0) {
- /* Connect the context to window 1 */
- glXMakeCurrent(dpy, win1, ctx1);
-
- /* Clear and draw in window 1 */
- glDrawBuffer(GL_BACK);
- glClearColor(1, 1, 0, 1);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- glColor3f(1, 0, 0);
- glBegin(GL_TRIANGLES);
- glVertex2f(0, 0);
- glVertex2f(cos(angle * DEGTOR), sin(angle * DEGTOR));
- glVertex2f(cos((angle + 20.0) * DEGTOR),
- sin((angle + 20.0) * DEGTOR));
- glEnd();
- glFlush();
-
- if (test == 1 || test == 3 || test == 5)
- glXSwapBuffers(dpy, win1);
-
- if (test == 5)
- glXCopyContext(dpy, ctx1, ctx2, GL_ALL_ATTRIB_BITS);
- /* Connect the context to window 2 */
- if (test == 3 || test == 4) {
- glXMakeCurrent(dpy, win2, ctx1);
- } else {
- glXMakeCurrent(dpy, win2, ctx2);
- }
-
- /* Clear and draw in window 2 */
- glDrawBuffer(GL_BACK);
- glClearColor(0, 0, 1, 1);
- glClear(GL_COLOR_BUFFER_BIT);
- glColor3f(1, 1, 0);
- glBegin(GL_TRIANGLES);
- glVertex2f(0, 0);
- glVertex2f(cos(angle * DEGTOR), sin(angle * DEGTOR));
- glVertex2f(cos((angle + 20.0) * DEGTOR),
- sin((angle + 20.0) * DEGTOR));
- glEnd();
- glFlush();
-
- /* Swap buffers */
- if (test == 2 || test == 4)
- glXSwapBuffers(dpy, win1);
- glXSwapBuffers(dpy, win2);
-
- /* wait a while */
- glXWaitX();
- usleep(20000);
- }
-
- return 0;
-}
diff --git a/progs/tests/lineclip.c b/progs/tests/lineclip.c
deleted file mode 100644
index 098f5e92eb..0000000000
--- a/progs/tests/lineclip.c
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * Copyright © 2008 Intel Corporation
- *
- * 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 (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- *
- * Authors:
- * Eric Anholt <eric@anholt.net>
- *
- */
-
-#include <stdlib.h>
-#include <GL/glut.h>
-
-static int win_width, win_height;
-
-static void
-line(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
-{
- glBegin(GL_LINES);
- glVertex2f(x1, y1);
- glVertex2f(x2, y2);
- glEnd();
-}
-
-static void
-line3(GLfloat x1, GLfloat y1, GLfloat z1, GLfloat x2, GLfloat y2, GLfloat z2)
-{
- glBegin(GL_LINES);
- glVertex3f(x1, y1, z1);
- glVertex3f(x2, y2, z2);
- glEnd();
-}
-
-static void
-display(void)
-{
- glClearColor(0.0, 0.0, 0.0, 0.0);
- glClear(GL_COLOR_BUFFER_BIT);
-
- glColor3f(1.0, 0.0, 0.0);
- /* 2 lines clipped along xmin */
- line(-20, win_height / 2 - 20,
- 20, win_height / 2 - 20);
- line( 20, win_height / 2 + 20,
- -20, win_height / 2 + 20);
-
- glColor3f(0.0, 1.0, 0.0);
- /* 2 lines clipped along ymax */
- line(win_width / 2 - 20, win_height + 20,
- win_width / 2 - 20, win_height - 20);
- line(win_width / 2 + 20, win_height - 20,
- win_width / 2 + 20, win_height + 20);
-
- glColor3f(0.0, 0.0, 1.0);
- /* 2 lines clipped along xmax */
- line(win_width - 20, win_height / 2 - 20,
- win_width + 20, win_height / 2 - 20);
- line(win_width + 20, win_height / 2 + 20,
- win_width - 20, win_height / 2 + 20);
-
- glColor3f(1.0, 1.0, 1.0);
- /* 2 lines clipped along ymin */
- line(win_width / 2 - 20, 20,
- win_width / 2 - 20, -20);
- line(win_width / 2 + 20, -20,
- win_width / 2 + 20, 20);
-
- /* 2 lines clipped along near */
- glColor3f(1.0, 0.0, 1.0);
- line3(win_width / 2 - 20 - 20, win_height / 2, 0.5,
- win_width / 2 - 20 + 20, win_height / 2, -0.5);
- line3(win_width / 2 - 20, win_height / 2 - 20, -0.5,
- win_width / 2 - 20, win_height / 2 + 20, 0.5);
-
- /* 2 lines clipped along far */
- glColor3f(0.0, 1.0, 1.0);
- line3(win_width / 2 + 20 - 20, win_height / 2, 1.5,
- win_width / 2 + 20 + 20, win_height / 2, 0.5);
- line3(win_width / 2 + 20, win_height / 2 - 20, 0.5,
- win_width / 2 + 20, win_height / 2 + 20, 1.5);
-
- /* entirely clipped along near/far */
- glColor3f(.5, .5, .5);
- line3(win_width / 2, win_height / 2 - 20, -0.5,
- win_width / 2, win_height / 2 + 20, -0.5);
- glColor3f(.5, .5, .5);
- line3(win_width / 2, win_height / 2 - 20, 1.5,
- win_width / 2, win_height / 2 + 20, 1.5);
-
- glColor3f(1.0, 1.0, 0.0);
- /* lines clipped along both x and y limits */
- line(-5, 20,
- 20, -5); /* xmin, ymin */
- line(-5, win_height - 20,
- 20, win_height + 5); /* xmin, ymax */
- line(win_width - 20, -5,
- win_width + 5, 20); /* xmax, ymin */
- line(win_width - 20, win_height + 5,
- win_width + 5, win_height - 20); /* xmax, ymax */
-
- glutSwapBuffers();
-}
-
-static void
-reshape(int width, int height)
-{
- win_width = width;
- win_height = height;
- glViewport(0, 0, width, height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(0, win_width, 0, win_height, 0.0, -1.0);
-
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- glTranslatef(.25, .25, 0);
-}
-
-static void key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
-
- switch (key) {
- case 27: /* esc */
- exit(0);
- break;
- }
-
- glutPostRedisplay();
-}
-
-static void
-init(void)
-{
-}
-
-int
-main(int argc, char *argv[])
-{
- win_width = 200;
- win_height = 200;
-
- glutInit(&argc, argv);
- glutInitWindowPosition(0, 0);
- glutInitWindowSize(win_width, win_height);
- glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
- glutCreateWindow(argv[0]);
- glutReshapeFunc(reshape);
- glutKeyboardFunc(key);
- glutDisplayFunc(display);
-
- init();
-
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/manytex.c b/progs/tests/manytex.c
deleted file mode 100644
index 61a1519ae6..0000000000
--- a/progs/tests/manytex.c
+++ /dev/null
@@ -1,382 +0,0 @@
-/* $Id: manytex.c,v 1.5 2005/09/15 01:58:39 brianp Exp $ */
-
-/*
- * test handling of many texture maps
- * Also tests texture priority and residency.
- *
- * Brian Paul
- * August 2, 2000
- */
-
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <GL/glut.h>
-
-
-static GLint NumTextures = 20;
-static GLuint *TextureID = NULL;
-static GLint *TextureWidth = NULL, *TextureHeight = NULL;
-static GLboolean *TextureResidency = NULL;
-static GLint TexWidth = 128, TexHeight = 128;
-static GLfloat Zrot = 0;
-static GLboolean Anim = GL_TRUE;
-static GLint WinWidth = 500, WinHeight = 400;
-static GLboolean MipMap = GL_FALSE;
-static GLboolean LinearFilter = GL_FALSE;
-static GLboolean RandomSize = GL_FALSE;
-static GLint Rows, Columns;
-static GLint LowPriorityCount = 0;
-
-
-static void Idle( void )
-{
- Zrot += 1.0;
- glutPostRedisplay();
-}
-
-
-static void Display( void )
-{
- GLfloat spacing = WinWidth / Columns;
- GLfloat size = spacing * 0.4;
- GLint i;
-
- /* test residency */
- if (0)
- {
- GLboolean b;
- GLint i, resident;
- b = glAreTexturesResident(NumTextures, TextureID, TextureResidency);
- if (b) {
- printf("all resident\n");
- }
- else {
- resident = 0;
- for (i = 0; i < NumTextures; i++) {
- if (TextureResidency[i]) {
- resident++;
- }
- }
- printf("%d of %d texture resident\n", resident, NumTextures);
- }
- }
-
- /* render the textured quads */
- glClear( GL_COLOR_BUFFER_BIT );
- for (i = 0; i < NumTextures; i++) {
- GLint row = i / Columns;
- GLint col = i % Columns;
- GLfloat x = col * spacing + spacing * 0.5;
- GLfloat y = row * spacing + spacing * 0.5;
-
- GLfloat maxDim = (TextureWidth[i] > TextureHeight[i])
- ? TextureWidth[i] : TextureHeight[i];
- GLfloat w = TextureWidth[i] / maxDim;
- GLfloat h = TextureHeight[i] / maxDim;
-
- glPushMatrix();
- glTranslatef(x, y, 0.0);
- glRotatef(Zrot, 0, 0, 1);
- glScalef(size, size, 1);
-
- glBindTexture(GL_TEXTURE_2D, TextureID[i]);
- glBegin(GL_POLYGON);
-#if 0
- glTexCoord2f(0, 0); glVertex2f(-1, -1);
- glTexCoord2f(1, 0); glVertex2f( 1, -1);
- glTexCoord2f(1, 1); glVertex2f( 1, 1);
- glTexCoord2f(0, 1); glVertex2f(-1, 1);
-#else
- glTexCoord2f(0, 0); glVertex2f(-w, -h);
- glTexCoord2f(1, 0); glVertex2f( w, -h);
- glTexCoord2f(1, 1); glVertex2f( w, h);
- glTexCoord2f(0, 1); glVertex2f(-w, h);
-#endif
- glEnd();
- glPopMatrix();
- }
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- WinWidth = width;
- WinHeight = height;
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glOrtho(0, width, 0, height, -1, 1);
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
-}
-
-
-/*
- * Return a random int in [min, max].
- */
-static int RandomInt(int min, int max)
-{
- int i = rand();
- int j = i % (max - min + 1);
- return min + j;
-}
-
-
-
-static void Init( void )
-{
- GLint i;
-
- if (RandomSize) {
- printf("Creating %d %s random-size textures, ", NumTextures,
- MipMap ? "Mipmapped" : "non-Mipmapped");
- }
- else {
- printf("Creating %d %s %d x %d textures, ", NumTextures,
- MipMap ? "Mipmapped" : "non-Mipmapped",
- TexWidth, TexHeight);
- }
-
- if (LinearFilter) {
- printf("bilinear filtering\n");
- }
- else {
- printf("nearest filtering\n");
- }
-
-
- /* compute number of rows and columns of rects */
- {
- GLfloat area = (GLfloat) (WinWidth * WinHeight) / (GLfloat) NumTextures;
- GLfloat edgeLen = sqrt(area);
-
- Columns = WinWidth / edgeLen;
- Rows = (NumTextures + Columns - 1) / Columns;
- printf("Rows: %d Cols: %d\n", Rows, Columns);
- }
-
-
- if (!TextureID) {
- TextureID = (GLuint *) malloc(sizeof(GLuint) * NumTextures);
- assert(TextureID);
- glGenTextures(NumTextures, TextureID);
- }
-
- if (!TextureResidency) {
- TextureResidency = (GLboolean *) malloc(sizeof(GLboolean) * NumTextures);
- assert(TextureResidency);
- }
-
- if (!TextureWidth) {
- TextureWidth = (GLint *) malloc(sizeof(GLint) * NumTextures);
- assert(TextureWidth);
- }
- if (!TextureHeight) {
- TextureHeight = (GLint *) malloc(sizeof(GLint) * NumTextures);
- assert(TextureHeight);
- }
-
- for (i = 0; i < NumTextures; i++) {
- GLubyte color[4];
- GLubyte *texImage;
- GLint j, row, col;
-
- row = i / Columns;
- col = i % Columns;
-
- glBindTexture(GL_TEXTURE_2D, TextureID[i]);
-
- if (i < LowPriorityCount)
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_PRIORITY, 0.5F);
-
- if (RandomSize) {
-#if 0
- int k = (glutGet(GLUT_ELAPSED_TIME) % 7) + 2;
- TexWidth = 1 << k;
- TexHeight = 1 << k;
-#else
- TexWidth = 1 << RandomInt(2, 7);
- TexHeight = 1 << RandomInt(2, 7);
- printf("Random size of %3d: %d x %d\n", i, TexWidth, TexHeight);
-#endif
- }
-
- TextureWidth[i] = TexWidth;
- TextureHeight[i] = TexHeight;
-
- texImage = (GLubyte*) malloc(4 * TexWidth * TexHeight * sizeof(GLubyte));
- assert(texImage);
-
- /* determine texture color */
- color[0] = (GLint) (255.0 * ((float) col / (Columns - 1)));
- color[1] = 127;
- color[2] = (GLint) (255.0 * ((float) row / (Rows - 1)));
- color[3] = 255;
-
- /* fill in solid-colored teximage */
- for (j = 0; j < TexWidth * TexHeight; j++) {
- texImage[j*4+0] = color[0];
- texImage[j*4+1] = color[1];
- texImage[j*4+2] = color[2];
- texImage[j*4+3] = color[3];
- }
-
- if (MipMap) {
- GLint level = 0;
- GLint w = TexWidth, h = TexHeight;
- while (1) {
- glTexImage2D(GL_TEXTURE_2D, level, GL_RGBA, w, h, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, texImage);
- if (w == 1 && h == 1)
- break;
- if (w > 1)
- w /= 2;
- if (h > 1)
- h /= 2;
- level++;
- /*printf("%d: %d x %d\n", level, w, h);*/
- }
- if (LinearFilter) {
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
- GL_LINEAR_MIPMAP_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- }
- else {
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
- GL_NEAREST_MIPMAP_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- }
- }
- else {
- /* Set corners to white */
- int k = 0;
- texImage[k+0] = texImage[k+1] = texImage[k+2] = texImage[k+3] = 255;
- k = (TexWidth - 1) * 4;
- texImage[k+0] = texImage[k+1] = texImage[k+2] = texImage[k+3] = 255;
- k = (TexWidth * TexHeight - TexWidth) * 4;
- texImage[k+0] = texImage[k+1] = texImage[k+2] = texImage[k+3] = 255;
- k = (TexWidth * TexHeight - 1) * 4;
- texImage[k+0] = texImage[k+1] = texImage[k+2] = texImage[k+3] = 255;
-
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, TexWidth, TexHeight, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, texImage);
- if (LinearFilter) {
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- }
- else {
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- }
- }
-
- free(texImage);
- }
-
- glEnable(GL_TEXTURE_2D);
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- const GLfloat step = 3.0;
- (void) x;
- (void) y;
- switch (key) {
- case 'a':
- Anim = !Anim;
- if (Anim)
- glutIdleFunc(Idle);
- else
- glutIdleFunc(NULL);
- break;
- case 's':
- Idle();
- break;
- case 'z':
- Zrot -= step;
- break;
- case 'Z':
- Zrot += step;
- break;
- case ' ':
- Init();
- break;
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-int main( int argc, char *argv[] )
-{
- GLint i;
-
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( WinWidth, WinHeight );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- if (Anim)
- glutIdleFunc(Idle);
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-n") == 0) {
- NumTextures = atoi(argv[i+1]);
- if (NumTextures <= 0) {
- printf("Error, bad number of textures\n");
- return 1;
- }
- i++;
- }
- else if (strcmp(argv[i], "-mipmap") == 0) {
- MipMap = GL_TRUE;
- }
- else if (strcmp(argv[i], "-linear") == 0) {
- LinearFilter = GL_TRUE;
- }
- else if (strcmp(argv[i], "-size") == 0) {
- TexWidth = atoi(argv[i+1]);
- TexHeight = atoi(argv[i+2]);
- assert(TexWidth >= 1);
- assert(TexHeight >= 1);
- i += 2;
- }
- else if (strcmp(argv[i], "-randomsize") == 0) {
- RandomSize = GL_TRUE;
- }
- else if (strcmp(argv[i], "-lowpri") == 0) {
- LowPriorityCount = atoi(argv[i+1]);
- i++;
- }
- else {
- printf("Usage:\n");
- printf(" manytex [options]\n");
- printf("Options:\n");
- printf(" -n <number of texture objects>\n");
- printf(" -size <width> <height> - specify texture size\n");
- printf(" -randomsize - use random size textures\n");
- printf(" -mipmap - generate mipmaps\n");
- printf(" -linear - use linear filtering instead of nearest\n");
- printf(" -lowpri <n> - Set lower priority on <n> textures\n");
- return 0;
- }
- }
-
- Init();
-
- glutMainLoop();
-
- return 0;
-}
diff --git a/progs/tests/minmag.c b/progs/tests/minmag.c
deleted file mode 100644
index 78ef9db03a..0000000000
--- a/progs/tests/minmag.c
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * Test minification vs. magnification filtering.
- * Draw two quads with different filtering modes:
- *
- * +--------------------------+ +--------------------------+
- * | MagFilter = GL_LINEAR | | MagFilter = GL_LINEAR |
- * | MinFilter = GL_LINEAR | | MinFilter = GL_NEAREST |
- * +--------------------------+ +--------------------------+
- *
- * They should look different when the quad is smaller than the level 0
- * texture size (when minifying).
- */
-
-#include <assert.h>
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <GL/glut.h>
-
-
-static GLint Width = 1000, Height = 500;
-
-
-static GLint TexWidth = 256, TexHeight = 256;
-static GLfloat Zpos = 5;
-static GLboolean MipMap = 0*GL_TRUE;
-static GLboolean LinearFilter = GL_TRUE;
-
-
-static void
-redraw(void)
-{
- GLfloat w = 1.0;
- GLfloat h = 1.0;
-
- glClear( GL_COLOR_BUFFER_BIT );
-
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-
- glPushMatrix();
- glTranslatef(-1.5, 0, -Zpos);
- glBegin(GL_POLYGON);
- glTexCoord2f(0, 0); glVertex2f(-w, -h);
- glTexCoord2f(1, 0); glVertex2f( w, -h);
- glTexCoord2f(1, 1); glVertex2f( w, h);
- glTexCoord2f(0, 1); glVertex2f(-w, h);
- glEnd();
- glPopMatrix();
-
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-
- glPushMatrix();
- glTranslatef(1.5, 0, -Zpos);
- glBegin(GL_POLYGON);
- glTexCoord2f(0, 0); glVertex2f(-w, -h);
- glTexCoord2f(1, 0); glVertex2f( w, -h);
- glTexCoord2f(1, 1); glVertex2f( w, h);
- glTexCoord2f(0, 1); glVertex2f(-w, h);
- glEnd();
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void
-init(void)
-{
- GLubyte color[10][4] = {
- { 0, 0, 0, 0 },
- { 1, 0, 0, 0 },
- { 0, 1, 0, 0 },
- { 0, 0, 1, 0 },
- { 0, 1, 1, 0 },
- { 1, 0, 1, 0 },
- { 1, 1, 0, 0 },
- { 1, 0, 0, 0 },
- { 0, 1, 0, 0 },
- { 0, 0, 1, 0 }
- };
- GLubyte *texImage;
-
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- printf("Left quad should be linear filtered and right should be nearest filtered.\n");
- printf("Press z/Z to change quad distance.\n");
-
- texImage = (GLubyte*) malloc(4 * TexWidth * TexHeight * sizeof(GLubyte));
- assert(texImage);
-
- {
- GLint level = 0;
- GLint w = TexWidth, h = TexHeight;
- while (1) {
- int i, j;
-
- for (i = 0; i < h; i++) {
- for (j = 0;j < w; j++) {
- if (w==1 || h==1 || (((i / 2) ^ (j / 2)) & 1)) {
- /*if (j < i) {*/
- texImage[(i*w+j) * 4 + 0] = 255;
- texImage[(i*w+j) * 4 + 1] = 255;
- texImage[(i*w+j) * 4 + 2] = 255;
- texImage[(i*w+j) * 4 + 3] = 255;
- }
- else {
- texImage[(i*w+j) * 4 + 0] = color[level][0] * 255;
- texImage[(i*w+j) * 4 + 1] = color[level][1] * 255;
- texImage[(i*w+j) * 4 + 2] = color[level][2] * 255;
- texImage[(i*w+j) * 4 + 3] = color[level][3] * 255;
- }
- }
- }
-
- glTexImage2D(GL_TEXTURE_2D, level, GL_RGBA8, w, h, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, texImage);
-
- printf("Texture level %d: %d x %d\n", level, w, h);
- if (!MipMap)
- break;
-
- if (w == 1 && h == 1)
- break;
- if (w > 1)
- w /= 2;
- if (h > 1)
- h /= 2;
- level++;
- }
- }
-
- free(texImage);
-
- glClearColor(0.25, 0.25, 0.25, 1.0);
- glEnable(GL_TEXTURE_2D);
-
- glViewport(0, 0, Width, Height);
-}
-
-
-
-static void
-Reshape(int width, int height)
-{
- float ar = (float) width /height;
- Width = width;
- Height = height;
- glViewport(0, 0, width, height);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glFrustum(-ar, ar, -1.0, 1.0, 5.0, 2500.0);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- glTranslatef(0.0, 0.0, -15.0);
-}
-
-
-static void
-Key(unsigned char key, int x, int y)
-{
- (void) x;
- (void) y;
- switch (key) {
- case 'z':
- Zpos--;
- break;
- case 'Z':
- Zpos++;
- break;
- case 'f':
- LinearFilter = !LinearFilter;
- break;
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-int
-main(int argc, char *argv[])
-{
- glutInit(&argc, argv);
- glutInitWindowPosition(0, 0);
- glutInitWindowSize(Width, Height);
- glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
- glutCreateWindow(argv[0]);
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(redraw);
- init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/mipmap_limits.c b/progs/tests/mipmap_limits.c
deleted file mode 100644
index 8bdad826f7..0000000000
--- a/progs/tests/mipmap_limits.c
+++ /dev/null
@@ -1,270 +0,0 @@
-/* Test GL_TEXTURE_BASE_LEVEL and GL_TEXTURE_MAX_LEVEL
- * Brian Paul
- * 10 May 2006
- */
-
-
-/* Copyright (c) Mark J. Kilgard, 1994. */
-
-/*
- * (c) Copyright 1993, Silicon Graphics, Inc.
- * 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
- * the name of Silicon Graphics, Inc. not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * 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,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
- * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
- * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
- * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
- * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
- * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN
- * 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
- * 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
- * clause at DFARS 252.227-7013 and/or in similar or successor
- * clauses in the FAR or the DOD or NASA FAR Supplement.
- * Unpublished-- rights reserved under the copyright laws of the
- * United States. Contractor/manufacturer is Silicon Graphics,
- * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311.
- *
- * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
- */
-/* mipmap.c
- * This program demonstrates using mipmaps for texture maps.
- * To overtly show the effect of mipmaps, each mipmap reduction
- * level has a solidly colored, contrasting texture image.
- * Thus, the quadrilateral which is drawn is drawn with several
- * different colors.
- */
-#include <stdlib.h>
-#include <stdio.h>
-#include <GL/glut.h>
-
-static GLint BaseLevel = 0, MaxLevel = 8;
-static GLfloat MinLod = -1, MaxLod = 9;
-static GLfloat LodBias = 0.0;
-static GLboolean NearestFilter = GL_TRUE;
-
-
-static void
-InitValues(void)
-{
- BaseLevel = 0;
- MaxLevel = 8;
- MinLod = -1;
- MaxLod = 9;
- LodBias = 0.0;
- NearestFilter = GL_TRUE;
-}
-
-
-static void MakeImage(int level, int width, int height, const GLubyte color[4])
-{
- const int makeStripes = 0;
- GLubyte img[256*256*3];
- int i, j;
- for (i = 0; i < height; i++) {
- for (j = 0; j < width; j++) {
- int k = (i * width + j) * 3;
- int p = (i/8) & makeStripes;
- if (p == 0) {
- img[k + 0] = color[0];
- img[k + 1] = color[1];
- img[k + 2] = color[2];
- }
- else {
- img[k + 0] = 0;
- img[k + 1] = 0;
- img[k + 2] = 0;
- }
- }
- }
-
- glTexImage2D(GL_TEXTURE_2D, level, GL_RGB, width, height, 0,
- GL_RGB, GL_UNSIGNED_BYTE, img);
-}
-
-
-static void makeImages(void)
-{
- static const GLubyte colors[8][3] = {
- {128, 128, 128 },
- { 0, 255, 255 },
- { 255, 255, 0 },
- { 255, 0, 255 },
- { 255, 0, 0 },
- { 0, 255, 0 },
- { 0, 0, 255 },
- { 255, 255, 255 }
- };
- int i, sz = 128;
-
- for (i = 0; i < 8; i++) {
- MakeImage(i, sz, sz, colors[i]);
- sz /= 2;
- }
-}
-
-static void myinit(void)
-{
- InitValues();
-
- glEnable(GL_DEPTH_TEST);
- glDepthFunc(GL_LESS);
- glShadeModel(GL_FLAT);
-
- glTranslatef(0.0, 0.0, -3.6);
-
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- makeImages();
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
- glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
- glEnable(GL_TEXTURE_2D);
-}
-
-static void display(void)
-{
- GLfloat tcm = 4.0;
- printf("BASE_LEVEL=%d MAX_LEVEL=%d MIN_LOD=%.2g MAX_LOD=%.2g Bias=%.2g Filter=%s\n",
- BaseLevel, MaxLevel, MinLod, MaxLod, LodBias,
- NearestFilter ? "NEAREST" : "LINEAR");
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, BaseLevel);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, MaxLevel);
-
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_LOD, MinLod);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, MaxLod);
-
- if (NearestFilter) {
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
- GL_NEAREST_MIPMAP_NEAREST);
- }
- else {
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
- GL_LINEAR_MIPMAP_LINEAR);
- }
-
- glTexEnvf(GL_TEXTURE_FILTER_CONTROL_EXT, GL_TEXTURE_LOD_BIAS_EXT, LodBias);
-
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- glBegin(GL_QUADS);
- glTexCoord2f(0.0, 0.0); glVertex3f(-2.0, -1.0, 0.0);
- glTexCoord2f(0.0, tcm); glVertex3f(-2.0, 1.0, 0.0);
- glTexCoord2f(tcm, tcm); glVertex3f(3000.0, 1.0, -6000.0);
- glTexCoord2f(tcm, 0.0); glVertex3f(3000.0, -1.0, -6000.0);
- glEnd();
- glFlush();
-}
-
-static void myReshape(int w, int h)
-{
- glViewport(0, 0, w, h);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- gluPerspective(60.0, 1.0*(GLfloat)w/(GLfloat)h, 1.0, 30000.0);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
-}
-
-static void
-key(unsigned char k, int x, int y)
-{
- (void) x;
- (void) y;
- switch (k) {
- case 'b':
- BaseLevel--;
- if (BaseLevel < 0)
- BaseLevel = 0;
- break;
- case 'B':
- BaseLevel++;
- if (BaseLevel > 10)
- BaseLevel = 10;
- break;
- case 'm':
- MaxLevel--;
- if (MaxLevel < 0)
- MaxLevel = 0;
- break;
- case 'M':
- MaxLevel++;
- if (MaxLevel > 10)
- MaxLevel = 10;
- break;
- case 'l':
- LodBias -= 0.25;
- break;
- case 'L':
- LodBias += 0.25;
- break;
- case 'n':
- MinLod -= 0.25;
- break;
- case 'N':
- MinLod += 0.25;
- break;
- case 'x':
- MaxLod -= 0.25;
- break;
- case 'X':
- MaxLod += 0.25;
- break;
- case 'f':
- NearestFilter = !NearestFilter;
- break;
- case ' ':
- InitValues();
- break;
- case 27: /* Escape */
- exit(0);
- break;
- default:
- return;
- }
- glutPostRedisplay();
-}
-
-
-static void usage(void)
-{
- printf("usage:\n");
- printf(" b/B decrease/increase GL_TEXTURE_BASE_LEVEL\n");
- printf(" m/M decrease/increase GL_TEXTURE_MAX_LEVEL\n");
- printf(" n/N decrease/increase GL_TEXTURE_MIN_LOD\n");
- printf(" x/X decrease/increase GL_TEXTURE_MAX_LOD\n");
- printf(" l/L decrease/increase GL_TEXTURE_LOD_BIAS\n");
- printf(" f toggle nearest/linear filtering\n");
- printf(" SPACE reset values\n");
-}
-
-
-int main(int argc, char** argv)
-{
- glutInit(&argc, argv);
- glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH);
- glutInitWindowSize (600, 600);
- glutCreateWindow (argv[0]);
- myinit();
- glutReshapeFunc (myReshape);
- glutDisplayFunc(display);
- glutKeyboardFunc(key);
- usage();
- glutMainLoop();
- return 0; /* ANSI C requires main to return int. */
-}
diff --git a/progs/tests/multipal.c b/progs/tests/multipal.c
deleted file mode 100644
index fac652f4e0..0000000000
--- a/progs/tests/multipal.c
+++ /dev/null
@@ -1,373 +0,0 @@
-/* $Id: multipal.c,v 1.6 2003/12/08 09:03:36 joukj Exp $ */
-
-/*
- * Test multitexture and paletted textures.
- */
-
-#include <assert.h>
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stddef.h> /* for ptrdiff_t, referenced by GL.h when GL_GLEXT_LEGACY defined */
-#ifdef _WIN32
-#include <windows.h>
-#endif
-#define GL_GLEXT_LEGACY
-#include <GL/glut.h>
-
-#include "../util/readtex.c" /* I know, this is a hack. */
-
-#define TEXTURE_1_FILE "../images/tile.rgb"
-#define TEXTURE_2_FILE "../images/reflect.rgb"
-
-#define TEX0 1
-#define TEX1 2
-#define TEXBOTH 3
-#define ANIMATE 10
-#define QUIT 100
-
-static GLboolean Animate = GL_TRUE;
-
-static GLfloat Drift = 0.0;
-static GLfloat Xrot = 20.0, Yrot = 30.0, Zrot = 0.0;
-
-
-
-static void Idle( void )
-{
- if (Animate) {
- Drift += 0.05;
- if (Drift >= 1.0)
- Drift = 0.0;
-
-#ifdef GL_ARB_multitexture
- glActiveTextureARB(GL_TEXTURE0_ARB);
-#endif
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- glTranslatef(Drift, 0.0, 0.0);
- glMatrixMode(GL_MODELVIEW);
-
-#ifdef GL_ARB_multitexture
- glActiveTextureARB(GL_TEXTURE1_ARB);
-#endif
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- glTranslatef(0.0, Drift, 0.0);
- glMatrixMode(GL_MODELVIEW);
-
- glutPostRedisplay();
- }
-}
-
-
-static void DrawObject(void)
-{
- glBegin(GL_QUADS);
-
-#ifdef GL_ARB_multitexture
- glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 0.0, 0.0);
- glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 0.0, 0.0);
- glVertex2f(-1.0, -1.0);
-
- glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 2.0, 0.0);
- glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 1.0, 0.0);
- glVertex2f(1.0, -1.0);
-
- glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 2.0, 2.0);
- glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 1.0, 1.0);
- glVertex2f(1.0, 1.0);
-
- glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 0.0, 2.0);
- glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 0.0, 1.0);
- glVertex2f(-1.0, 1.0);
-#else
- glTexCoord2f(0.0, 0.0);
- glVertex2f(-1.0, -1.0);
-
- glTexCoord2f(1.0, 0.0);
- glVertex2f(1.0, -1.0);
-
- glTexCoord2f(1.0, 1.0);
- glVertex2f(1.0, 1.0);
-
- glTexCoord2f(0.0, 1.0);
- glVertex2f(-1.0, 1.0);
-#endif
-
- glEnd();
-}
-
-
-
-static void Display( void )
-{
- glClear( GL_COLOR_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);
- glScalef(5.0, 5.0, 5.0);
- DrawObject();
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -1.0, 1.0, -1.0, 1.0, 10.0, 100.0 );
- /*glOrtho( -6.0, 6.0, -6.0, 6.0, 10.0, 100.0 );*/
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -70.0 );
-}
-
-
-static void ModeMenu(int entry)
-{
- GLboolean enable0 = GL_FALSE, enable1 = GL_FALSE;
- if (entry==TEX0) {
- enable0 = GL_TRUE;
- }
- else if (entry==TEX1) {
- enable1 = GL_TRUE;
- }
- else if (entry==TEXBOTH) {
- enable0 = GL_TRUE;
- enable1 = GL_TRUE;
- }
- else if (entry==ANIMATE) {
- Animate = !Animate;
- }
- else if (entry==QUIT) {
- exit(0);
- }
-
- if (entry != ANIMATE) {
-#ifdef GL_ARB_multitexture
- glActiveTextureARB(GL_TEXTURE0_ARB);
-#endif
- if (enable0) {
- glEnable(GL_TEXTURE_2D);
- }
- else
- glDisable(GL_TEXTURE_2D);
-
-#ifdef GL_ARB_multitexture
- glActiveTextureARB(GL_TEXTURE1_ARB);
-#endif
- if (enable1) {
- glEnable(GL_TEXTURE_2D);
- }
- else
- glDisable(GL_TEXTURE_2D);
- }
-
- glutPostRedisplay();
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- 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 load_tex(const char *fname, int channel)
-{
- GLubyte *image;
- GLenum format;
- GLint w, h;
- GLubyte *grayImage;
- int i;
- GLubyte table[256][4];
-
- image = LoadRGBImage(fname, &w, &h, &format);
- if (!image)
- exit(1);
-
- printf("%s %d x %d\n", fname, w, h);
- grayImage = malloc(w * h * 1);
- assert(grayImage);
- for (i = 0; i < w * h; i++) {
- int g = (image[i*3+0] + image[i*3+1] + image[i*3+2]) / 3;
- assert(g < 256);
- grayImage[i] = g;
- }
-
- glTexImage2D(GL_TEXTURE_2D, 0, GL_COLOR_INDEX, w, h, 0, GL_COLOR_INDEX,
- GL_UNSIGNED_BYTE, grayImage);
-
- for (i = 0; i < 256; i++) {
- table[i][0] = channel ? i : 0;
- table[i][1] = i;
- table[i][2] = channel ? 0 : i;
- table[i][3] = 255;
- }
-
- glColorTableEXT(GL_TEXTURE_2D, /* target */
- GL_RGBA, /* internal format */
- 256, /* table size */
- GL_RGBA, /* table format */
- GL_UNSIGNED_BYTE, /* table type */
- table); /* the color table */
-
- free(grayImage);
- free(image);
-}
-
-
-
-static void Init( int argc, char *argv[] )
-{
- GLuint texObj[2];
- GLint units;
-
- if (!glutExtensionSupported("GL_ARB_multitexture")) {
- printf("Sorry, GL_ARB_multitexture not supported by this renderer.\n");
- exit(1);
- }
- if (!glutExtensionSupported("GL_EXT_paletted_texture")) {
- printf("Sorry, GL_EXT_paletted_texture not supported by this renderer.\n");
- exit(1);
- }
-
- glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &units);
- printf("%d texture units supported\n", units);
-
- /* allocate two texture objects */
- glGenTextures(2, texObj);
-
- /* setup texture obj 0 */
- glBindTexture(GL_TEXTURE_2D, texObj[0]);
-#ifdef LINEAR_FILTER
- /* linear filtering looks much nicer but is much slower for Mesa */
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-foo
-#else
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-#endif
-
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
-
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-
- load_tex(TEXTURE_1_FILE, 0);
-#if 0
- if (!LoadRGBMipmaps(TEXTURE_1_FILE, GL_RGB)) {
- printf("Error: couldn't load texture image\n");
- exit(1);
- }
-#endif
-
- /* setup texture obj 1 */
- glBindTexture(GL_TEXTURE_2D, texObj[1]);
-#ifdef LINEAR_FILTER
- /* linear filtering looks much nicer but is much slower for Mesa */
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-foo
-#else
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-#endif
-
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
-
- load_tex(TEXTURE_2_FILE, 1);
-#if 0
- if (!LoadRGBMipmaps(TEXTURE_2_FILE, GL_RGB)) {
- printf("Error: couldn't load texture image\n");
- exit(1);
- }
-#endif
-
- /* 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));
- }
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowSize( 300, 300 );
- glutInitWindowPosition( 0, 0 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
- glutCreateWindow(argv[0] );
-
- Init( argc, argv );
-
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutSpecialFunc( SpecialKey );
- glutDisplayFunc( Display );
- glutIdleFunc( Idle );
-
- glutCreateMenu(ModeMenu);
- glutAddMenuEntry("Texture 0", TEX0);
- glutAddMenuEntry("Texture 1", TEX1);
- glutAddMenuEntry("Multi-texture", TEXBOTH);
- glutAddMenuEntry("Toggle Animation", ANIMATE);
- glutAddMenuEntry("Quit", QUIT);
- glutAttachMenu(GLUT_RIGHT_BUTTON);
-
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/multitexarray.c b/progs/tests/multitexarray.c
deleted file mode 100644
index b4fab004a6..0000000000
--- a/progs/tests/multitexarray.c
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- * Test vertex arrays and multitexture.
- * Press 'a' to toggle vertex arrays on/off.
- * When you run this program you should see a square with four colors:
- *
- * +------+------+
- * |yellow| pink |
- * +------+------+
- * |green | blue |
- * +------+------+
- */
-
-
-#include <assert.h>
-#include <math.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include "GL/glut.h"
-
-static GLuint Window = 0;
-
-static GLuint TexObj[2];
-static GLfloat Angle = 0.0f;
-static GLboolean UseArrays = 1, Anim = 0;
-
-static GLfloat VertArray[4][2] = {
- {-1.2, -1.2}, {1.2, -1.2}, {1.2, 1.2}, {-1.2, 1.2}
-};
-
-static GLfloat Tex0Array[4][2] = {
- {0, 0}, {1, 0}, {1, 1}, {0, 1}
-};
-
-static GLfloat Tex1Array[4][2] = {
- {0, 0}, {1, 0}, {1, 1}, {0, 1}
-};
-
-
-static void init_arrays(void)
-{
- glVertexPointer(2, GL_FLOAT, 0, VertArray);
- glEnableClientState(GL_VERTEX_ARRAY);
-
- glClientActiveTextureARB(GL_TEXTURE0_ARB);
- glTexCoordPointer(2, GL_FLOAT, 0, Tex0Array);
- glEnableClientState(GL_TEXTURE_COORD_ARRAY);
-
- glClientActiveTextureARB(GL_TEXTURE1_ARB);
- glTexCoordPointer(2, GL_FLOAT, 0, Tex1Array);
- glEnableClientState(GL_TEXTURE_COORD_ARRAY);
-}
-
-
-static void draw( void )
-{
- glClear( GL_COLOR_BUFFER_BIT );
-
- glColor3f( 0.0, 0.0, 0.0 );
-
- /* draw first polygon */
- glPushMatrix();
- glRotatef( Angle, 0.0, 0.0, 1.0 );
-
- if (UseArrays) {
- glDrawArrays(GL_POLYGON, 0, 4);
- }
- else {
- glBegin( GL_POLYGON );
- glTexCoord2f( 0.0, 0.0 );
- glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 0.0, 0.0);
- glVertex2f( -1.0, -1.0 );
-
- glTexCoord2f( 1.0, 0.0 );
- glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 1.0, 0.0);
- glVertex2f( 1.0, -1.0 );
-
- glTexCoord2f( 1.0, 1.0 );
- glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 1.0, 1.0);
- glVertex2f( 1.0, 1.0 );
-
- glTexCoord2f( 0.0, 1.0 );
- glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 0.0, 1.0);
- glVertex2f( -1.0, 1.0 );
- glEnd();
- }
-
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-
-static void idle( void )
-{
- Angle += 2.0;
- glutPostRedisplay();
-}
-
-
-
-/* change view Angle, exit upon ESC */
-static void key(unsigned char k, int x, int y)
-{
- (void) x;
- (void) y;
- switch (k) {
- case 'a':
- UseArrays = !UseArrays;
- printf("UseArrays: %d\n", UseArrays);
- break;
- case ' ':
- Anim = !Anim;
- if (Anim)
- glutIdleFunc(idle);
- else
- glutIdleFunc(NULL);
- break;
- case 27:
- glDeleteTextures( 2, TexObj );
- glutDestroyWindow(Window);
- exit(0);
- }
- glutPostRedisplay();
-}
-
-
-
-/* new window size or exposure */
-static void reshape( int width, int height )
-{
- glViewport(0, 0, (GLint)width, (GLint)height);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- /* glOrtho( -3.0, 3.0, -3.0, 3.0, -10.0, 10.0 );*/
- glFrustum( -2.0, 2.0, -2.0, 2.0, 6.0, 20.0 );
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -8.0 );
-}
-
-
-static void init( void )
-{
- static int width=8, height=8;
- GLubyte tex[64][3];
- GLint i, j;
-
- /* generate texture object IDs */
- glGenTextures( 2, TexObj );
-
- /*
- * setup first texture object
- */
- glActiveTextureARB(GL_TEXTURE0_ARB);
- glEnable( GL_TEXTURE_2D );
- glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD );
-
- glBindTexture( GL_TEXTURE_2D, TexObj[0] );
- assert(glIsTexture(TexObj[0]));
-
- /* red over black */
- for (i=0;i<height;i++) {
- for (j=0;j<width;j++) {
- int p = i*width+j;
- if (i < height / 2) {
- tex[p][0] = 0; tex[p][1] = 0; tex[p][2] = 0;
- }
- else {
- tex[p][0] = 255; tex[p][1] = 0; tex[p][2] = 0;
- }
- }
- }
-
- glTexImage2D( GL_TEXTURE_2D, 0, 3, width, height, 0,
- GL_RGB, GL_UNSIGNED_BYTE, tex );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT );
-
-
- /*
- * setup second texture object
- */
- glActiveTextureARB(GL_TEXTURE1_ARB);
- glEnable( GL_TEXTURE_2D );
- glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD );
-
- glBindTexture( GL_TEXTURE_2D, TexObj[1] );
- assert(glIsTexture(TexObj[1]));
-
- /* left=green, right = blue */
- for (i=0;i<height;i++) {
- for (j=0;j<width;j++) {
- int p = i*width+j;
- if (j < width / 2) {
- tex[p][0] = 0; tex[p][1] = 255; tex[p][2] = 0;
- }
- else {
- tex[p][0] = 0; tex[p][1] = 0; tex[p][2] = 255;
- }
- }
- }
- glTexImage2D( GL_TEXTURE_2D, 0, 3, width, height, 0,
- GL_RGB, GL_UNSIGNED_BYTE, tex );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT );
-}
-
-
-
-int main( int argc, char *argv[] )
-{
- glutInit(&argc, argv);
- glutInitWindowPosition(0, 0);
- glutInitWindowSize(300, 300);
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
-
- Window = glutCreateWindow("Texture Objects");
- if (!Window) {
- exit(1);
- }
-
- init();
- init_arrays();
-
- glutReshapeFunc( reshape );
- glutKeyboardFunc( key );
- if (Anim)
- glutIdleFunc( idle );
- glutDisplayFunc( draw );
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/multiwindow.c b/progs/tests/multiwindow.c
deleted file mode 100644
index e004b0336c..0000000000
--- a/progs/tests/multiwindow.c
+++ /dev/null
@@ -1,169 +0,0 @@
-/* $Id: multiwindow.c,v 1.1 2001/08/21 14:25:31 brianp Exp $ */
-
-/*
- * A skeleton/template GLUT program
- *
- * Written by Brian Paul and in the public domain.
- */
-
-
-/*
- * $Log: multiwindow.c,v $
- * Revision 1.1 2001/08/21 14:25:31 brianp
- * simple multi-window GLUT test prog
- *
- * Revision 1.1.1.1 1999/08/19 00:55:42 jtg
- * Imported sources
- *
- * Revision 1.2 1998/11/07 14:20:14 brianp
- * added simple rotation, animation of cube
- *
- * Revision 1.1 1998/11/07 14:14:37 brianp
- * Initial revision
- *
- */
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <GL/glut.h>
-
-
-static GLint Window[2];
-
-static GLfloat Xrot = 0, Yrot = 0, Zrot = 0;
-static GLboolean Anim = GL_TRUE;
-
-
-static void Idle( void )
-{
- Xrot += 3.0;
- Yrot += 4.0;
- Zrot += 2.0;
-
- glutSetWindow(Window[0]);
- glutPostRedisplay();
- glutSetWindow(Window[1]);
- glutPostRedisplay();
-}
-
-
-static void Display0( void )
-{
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- glEnable(GL_LIGHTING);
- glEnable(GL_LIGHT0);
- glEnable(GL_DEPTH_TEST);
-
- glPushMatrix();
- glRotatef(Xrot, 1, 0, 0);
- glRotatef(Yrot, 0, 1, 0);
- glRotatef(Zrot, 0, 0, 1);
-
- glColor3f(0, 1, 0);
- glutSolidCube(2.0);
-
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Display1( void )
-{
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- glPushMatrix();
- glRotatef(Xrot, 1, 0, 0);
- glRotatef(Yrot, 0, 1, 0);
- glRotatef(Zrot, 0, 0, 1);
-
- glShadeModel(GL_FLAT);
-
- glBegin(GL_TRIANGLE_STRIP);
- glColor3f(1, 0, 0);
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glColor3f(1, 0, 0);
- glVertex2f( -1, 1);
- glColor3f(0, 0, 1);
- glVertex2f( 1, 1);
- glEnd();
-
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -15.0 );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- const GLfloat step = 3.0;
- (void) x;
- (void) y;
- switch (key) {
- case 'a':
- Anim = !Anim;
- if (Anim)
- glutIdleFunc(Idle);
- else
- glutIdleFunc(NULL);
- break;
- case 'z':
- Zrot -= step;
- break;
- case 'Z':
- Zrot += step;
- break;
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
-
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 400, 400 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
- Window[0] = glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display0 );
- glutIdleFunc(Idle);
- printf("GL_RENDERER[0] = %s\n", (char *) glGetString(GL_RENDERER));
-
- glutInitWindowPosition( 500, 0 );
- glutInitWindowSize( 400, 400 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
- Window[1] = glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display1 );
- glutIdleFunc(Idle);
- printf("GL_RENDERER[1] = %s\n", (char *) glGetString(GL_RENDERER));
-
- glutMainLoop();
-
- return 0;
-}
diff --git a/progs/tests/no_s3tc.c b/progs/tests/no_s3tc.c
deleted file mode 100644
index d3383ff98a..0000000000
--- a/progs/tests/no_s3tc.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * (C) Copyright IBM Corporation 2004
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, and/or sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file no_s3tc.c
- * Test program to verify the behavior of an OpenGL implementation when
- * an application calls \c glCompressedTexImage2D with an unsupported (but
- * valid) compression format. The most common example is calling it with
- * \c GL_COMPRESSED_RGBA_S3TC_DXT1_EXT when GL_EXT_texture_compression_s3tc
- * is not supported.
- *
- * This tests Mesa bug #1028405.
- *
- * \author Ian Romanick <idr@us.ibm.com>
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <GL/glut.h>
-#include <GL/glext.h>
-
-static unsigned data[16];
-
-int
-main( int argc, char ** argv )
-{
- float gl_version;
- GLenum format;
- GLuint size;
- GLuint width;
- GLenum err;
-
-
- glutInit( & argc, argv );
- glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
-
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 300, 300 );
- glutCreateWindow( "No S3TC Test" );
-
- gl_version = strtod( (const char *) glGetString( GL_VERSION ), NULL );
- if ( ! glutExtensionSupported( "GL_ARB_texture_compression" )
- && (gl_version < 1.3) ) {
- fprintf( stderr, "Either OpenGL 1.3 or GL_ARB_texture_compression "
- "must be supported.\n" );
- return( EXIT_SUCCESS );
- }
-
-
- if ( ! glutExtensionSupported( "GL_EXT_texture_compression_s3tc" ) ) {
- format = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
- width = 4;
- size = 8;
- }
- else if ( ! glutExtensionSupported( "GL_3DFX_texture_compression_FXT1" ) ) {
- format = GL_COMPRESSED_RGBA_FXT1_3DFX;
- width = 8;
- size = 16;
- }
- else {
- fprintf( stderr, "Either GL_EXT_texture_compression_s3tc or "
- "GL_3DFX_texture_compression_FXT1 must NOT be supported.\n" );
- return( EXIT_SUCCESS );
- }
-
- glCompressedTexImage2D( GL_TEXTURE_2D, 0, format, width, 4, 0,
- size, data );
- err = glGetError();
- if ( err != GL_INVALID_ENUM ) {
- fprintf( stderr, "GL error 0x%04x should have been generated, but "
- "0x%04x was generated instead.\n", GL_INVALID_ENUM, err );
- }
-
- return (err == GL_INVALID_ENUM) ? EXIT_SUCCESS : EXIT_FAILURE;
-}
diff --git a/progs/tests/packedpixels.c b/progs/tests/packedpixels.c
deleted file mode 100644
index 67ffe08825..0000000000
--- a/progs/tests/packedpixels.c
+++ /dev/null
@@ -1,342 +0,0 @@
-/*
- * Test packed pixel formats for textures.
- * Brian Paul
- * 12 May 2004
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <string.h>
-#include <GL/glut.h>
-
-
-struct pixel_format {
- const char *name;
- GLenum format;
- GLenum type;
- GLint bytes;
- GLuint redTexel, greenTexel;
-};
-
-static const struct pixel_format Formats[] = {
-
- { "GL_RGBA/GL_UNSIGNED_INT_8_8_8_8",
- GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, 4, 0xff000000, 0x00ff0000 },
- { "GL_RGBA/GL_UNSIGNED_INT_8_8_8_8_REV",
- GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, 4, 0x000000ff, 0x0000ff00 },
- { "GL_RGBA/GL_UNSIGNED_INT_10_10_10_2",
- GL_RGBA, GL_UNSIGNED_INT_10_10_10_2, 4, 0xffc00000, 0x3ff000 },
- { "GL_RGBA/GL_UNSIGNED_INT_2_10_10_10_REV",
- GL_RGBA, GL_UNSIGNED_INT_2_10_10_10_REV, 4, 0x3ff, 0xffc00 },
- { "GL_RGBA/GL_UNSIGNED_SHORT_4_4_4_4",
- GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4, 2, 0xf000, 0x0f00 },
- { "GL_RGBA/GL_UNSIGNED_SHORT_4_4_4_4_REV",
- GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4_REV, 2, 0x000f, 0x00f0 },
- { "GL_RGBA/GL_UNSIGNED_SHORT_5_5_5_1",
- GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1, 2, 0xf800, 0x7c0 },
- { "GL_RGBA/GL_UNSIGNED_SHORT_1_5_5_5_REV",
- GL_RGBA, GL_UNSIGNED_SHORT_1_5_5_5_REV, 2, 0x1f, 0x3e0 },
-
- { "GL_BGRA/GL_UNSIGNED_INT_8_8_8_8",
- GL_BGRA, GL_UNSIGNED_INT_8_8_8_8, 4, 0x0000ff00, 0x00ff0000 },
- { "GL_BGRA/GL_UNSIGNED_INT_8_8_8_8_REV",
- GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, 4, 0x00ff0000, 0x0000ff00 },
- { "GL_BGRA/GL_UNSIGNED_SHORT_4_4_4_4",
- GL_BGRA, GL_UNSIGNED_SHORT_4_4_4_4, 2, 0x00f0, 0x0f00 },
- { "GL_BGRA/GL_UNSIGNED_SHORT_4_4_4_4_REV",
- GL_BGRA, GL_UNSIGNED_SHORT_4_4_4_4_REV, 2, 0x0f00, 0x00f0 },
- { "GL_BGRA/GL_UNSIGNED_SHORT_5_5_5_1",
- GL_BGRA, GL_UNSIGNED_SHORT_5_5_5_1, 2, 0x3e, 0x7c0 },
- { "GL_BGRA/GL_UNSIGNED_SHORT_1_5_5_5_REV",
- GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV, 2, 0x7c00, 0x3e0 },
-
- { "GL_ABGR_EXT/GL_UNSIGNED_INT_8_8_8_8",
- GL_ABGR_EXT, GL_UNSIGNED_INT_8_8_8_8, 4, 0x000000ff, 0x0000ff00 },
- { "GL_ABGR_EXT/GL_UNSIGNED_INT_8_8_8_8_REV",
- GL_ABGR_EXT, GL_UNSIGNED_INT_8_8_8_8_REV, 4, 0xff000000, 0x00ff0000 },
- { "GL_ABGR_EXT/GL_UNSIGNED_SHORT_4_4_4_4",
- GL_ABGR_EXT, GL_UNSIGNED_SHORT_4_4_4_4, 2, 0x000f, 0x00f0 },
- { "GL_ABGR_EXT/GL_UNSIGNED_SHORT_4_4_4_4_REV",
- GL_ABGR_EXT, GL_UNSIGNED_SHORT_4_4_4_4_REV, 2, 0xf000, 0x0f00 },
- { "GL_ABGR_EXT/GL_UNSIGNED_SHORT_5_5_5_1",
- GL_ABGR_EXT, GL_UNSIGNED_SHORT_5_5_5_1, 2, 0x1, 0x3e },
- { "GL_ABGR_EXT/GL_UNSIGNED_SHORT_1_5_5_5_REV",
- GL_ABGR_EXT, GL_UNSIGNED_SHORT_1_5_5_5_REV, 2, 0x8000, 0x7c00 },
-
- { "GL_RGB/GL_UNSIGNED_SHORT_5_6_5",
- GL_RGB, GL_UNSIGNED_SHORT_5_6_5, 2, 0xf800, 0x7e0 },
- { "GL_RGB/GL_UNSIGNED_SHORT_5_6_5_REV",
- GL_RGB, GL_UNSIGNED_SHORT_5_6_5_REV, 2, 0x1f, 0x7e0 },
- { "GL_RGB/GL_UNSIGNED_BYTE_3_3_2",
- GL_RGB, GL_UNSIGNED_BYTE_3_3_2, 1, 0xe0, 0x1c },
- { "GL_RGB/GL_UNSIGNED_BYTE_2_3_3_REV",
- GL_RGB, GL_UNSIGNED_BYTE_2_3_3_REV, 1, 0x7, 0x38 },
-
- { NULL, 0, 0, 0, 0, 0 }
-};
-
-
-struct name_format {
- const char *name;
- GLenum format;
-};
-
-static const struct name_format IntFormats[] = {
- { "GL_RGBA", GL_RGBA },
- { "GL_RGBA2", GL_RGBA2 },
- { "GL_RGBA4", GL_RGBA4 },
- { "GL_RGB5_A1", GL_RGB5_A1 },
- { "GL_RGBA8", GL_RGBA8 },
- { "GL_RGBA12", GL_RGBA12 },
- { "GL_RGBA16", GL_RGBA16 },
- { "GL_RGB10_A2", GL_RGB10_A2 },
-
- { "GL_RGB", GL_RGB },
- { "GL_R3_G3_B2", GL_R3_G3_B2 },
- { "GL_RGB4", GL_RGB4 },
- { "GL_RGB5", GL_RGB5 },
- { "GL_RGB8", GL_RGB8 },
- { "GL_RGB10", GL_RGB10 },
- { "GL_RGB12", GL_RGB12 },
- { "GL_RGB16", GL_RGB16 },
-
-};
-
-#define NUM_INT_FORMATS (sizeof(IntFormats) / sizeof(IntFormats[0]))
-static GLuint CurFormat = 0;
-
-static GLboolean Test3D = GL_FALSE;
-
-
-
-static void
-PrintString(const char *s)
-{
- while (*s) {
- glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int) *s);
- s++;
- }
-}
-
-
-static void
-MakeTexture(const struct pixel_format *format, GLenum intFormat, GLboolean swap)
-{
- GLubyte texBuffer[1000];
- int i;
-
- glPixelStorei(GL_UNPACK_SWAP_BYTES, swap);
-
- if (format->bytes == 1) {
- for (i = 0; i < 8; i++) {
- texBuffer[i] = format->redTexel;
- }
- for (i = 8; i < 16; i++) {
- texBuffer[i] = format->greenTexel;
- }
- }
- else if (format->bytes == 2) {
- GLushort *us = (GLushort *) texBuffer;
- for (i = 0; i < 8; i++) {
- us[i] = format->redTexel;
- }
- for (i = 8; i < 16; i++) {
- us[i] = format->greenTexel;
- }
- if (swap) {
- for (i = 0; i < 16; i++)
- us[i] = (us[i] << 8) | (us[i] >> 8);
- }
- }
- else if (format->bytes == 4) {
- GLuint *ui = (GLuint *) texBuffer;
- for (i = 0; i < 8; i++) {
- ui[i] = format->redTexel;
- }
- for (i = 8; i < 16; i++) {
- ui[i] = format->greenTexel;
- }
- if (swap) {
- for (i = 0; i < 16; i++) {
- GLuint b = ui[i];
- ui[i] = (b >> 24)
- | ((b >> 8) & 0xff00)
- | ((b << 8) & 0xff0000)
- | ((b << 24) & 0xff000000);
- }
- }
- }
- else {
- abort();
- }
-
- if (Test3D) {
- /* 4 x 4 x 4 texture, undefined data */
- glTexImage3D(GL_TEXTURE_3D, 0, intFormat, 4, 4, 4, 0,
- format->format, format->type, NULL);
- /* fill in Z=1 and Z=2 slices with the real texture data */
- glTexSubImage3D(GL_TEXTURE_3D, 0,
- 0, 0, 1, /* offset */
- 4, 4, 1, /* size */
- format->format, format->type, texBuffer);
- glTexSubImage3D(GL_TEXTURE_3D, 0,
- 0, 0, 2, /* offset */
- 4, 4, 1, /* size */
- format->format, format->type, texBuffer);
- }
- else {
- glTexImage2D(GL_TEXTURE_2D, 0, intFormat, 4, 4, 0,
- format->format, format->type, texBuffer);
- }
-
- if (glGetError()) {
- printf("GL Error for %s\n", format->name);
- memset(texBuffer, 255, 1000);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 4, 4, 0,
- GL_RGB, GL_UNSIGNED_BYTE, texBuffer);
- }
-}
-
-
-
-static void
-Draw(void)
-{
- char s[1000];
- int w = 350, h = 20;
- int i, swap;
-
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- for (swap = 0; swap < 2; swap++) {
- for (i = 0; Formats[i].name; i++) {
- glPushMatrix();
- glTranslatef(swap * (w + 2), i * (h + 2), 0);
-
- MakeTexture(Formats + i, IntFormats[CurFormat].format, swap);
-
- if (Test3D)
- glEnable(GL_TEXTURE_3D);
- else
- glEnable(GL_TEXTURE_2D);
- glBegin(GL_POLYGON);
- glTexCoord3f(0, 0, 0.5); glVertex2f(0, 0);
- glTexCoord3f(1, 0, 0.5); glVertex2f(w, 0);
- glTexCoord3f(1, 1, 0.5); glVertex2f(w, h);
- glTexCoord3f(0, 1, 0.5); glVertex2f(0, h);
- glEnd();
-
- if (Test3D)
- glDisable(GL_TEXTURE_3D);
- else
- glDisable(GL_TEXTURE_2D);
- glColor3f(0, 0, 0);
- glRasterPos2i(8, 6);
- PrintString(Formats[i].name);
-
- glPopMatrix();
- }
- }
-
- glPushMatrix();
- glTranslatef(2, i * (h + 2), 0);
- glColor3f(1, 1, 1);
- glRasterPos2i(8, 6);
- PrintString("Normal");
- glRasterPos2i(w + 2, 6);
- PrintString("Byte Swapped");
- glPopMatrix();
-
- glPushMatrix();
- glTranslatef(2, (i + 1) * (h + 2), 0);
- glRasterPos2i(8, 6);
- sprintf(s, "Internal Texture Format [f/F]: %s (%d of %d)",
- IntFormats[CurFormat].name, CurFormat + 1, NUM_INT_FORMATS);
- PrintString(s);
- glPopMatrix();
-
- glPushMatrix();
- glTranslatef(2, (i + 2) * (h + 2), 0);
- glRasterPos2i(8, 6);
- if (Test3D)
- PrintString("Target [2/3]: GL_TEXTURE_3D");
- else
- PrintString("Target [2/3]: GL_TEXTURE_2D");
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void
-Reshape(int width, int height)
-{
- glViewport(0, 0, width, height);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(0, width, 0, height, -1, 1);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
-}
-
-
-static void
-Key(unsigned char key, int x, int y)
-{
- (void) x;
- (void) y;
- switch (key) {
- case 'F':
- if (CurFormat == 0)
- CurFormat = NUM_INT_FORMATS - 1;
- else
- CurFormat--;
- break;
- case 'f':
- CurFormat++;
- if (CurFormat == NUM_INT_FORMATS)
- CurFormat = 0;
- break;
- case '2':
- Test3D = GL_FALSE;
- break;
- case '3':
- Test3D = GL_TRUE;
- break;
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void
-Init(void)
-{
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
-}
-
-
-int
-main(int argc, char *argv[])
-{
- glutInit(&argc, argv);
- glutInitWindowPosition(0, 0);
- glutInitWindowSize(700, 800);
- glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
- glutCreateWindow(argv[0]);
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/pbo.c b/progs/tests/pbo.c
deleted file mode 100644
index b31b36cc12..0000000000
--- a/progs/tests/pbo.c
+++ /dev/null
@@ -1,296 +0,0 @@
-/*
- * GL_EXT_pixel_buffer_object test
- *
- * Brian Paul
- * 11 March 2004
- */
-
-#define GL_GLEXT_PROTOTYPES
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <GL/glut.h>
-
-#include "../util/readtex.c" /* a hack, I know */
-
-#define IMAGE_FILE "../images/girl.rgb"
-
-static int ImgWidth, ImgHeight;
-static GLenum ImgFormat;
-static GLubyte *Image = NULL;
-
-static int APosX, APosY; /* simple drawpixels */
-static int BPosX, BPosY; /* read/draw pixels */
-static int CPosX, CPosY; /* copypixels */
-
-static GLboolean DrawFront = GL_FALSE;
-static GLboolean ScaleAndBias = GL_FALSE;
-static GLboolean Benchmark = GL_FALSE;
-
-static GLuint DrawPBO, TempPBO;
-
-
-static GLenum ReadFormat = GL_BGRA;
-static GLenum ReadType = GL_UNSIGNED_INT_8_8_8_8_REV;
-
-
-
-static void
-CheckError(int line)
-{
- GLenum err = glGetError();
- if (err) {
- printf("GL Error 0x%x at line %d\n", (int) err, line);
- }
-}
-
-
-static void
-Reset( void )
-{
- APosX = 5; APosY = 20;
- BPosX = APosX + ImgWidth + 5; BPosY = 20;
- CPosX = BPosX + ImgWidth + 5; CPosY = 20;
-}
-
-
-static void
-PrintString(const char *s)
-{
- while (*s) {
- glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int) *s);
- s++;
- }
-}
-
-
-static void
-SetupPixelTransfer(GLboolean invert)
-{
- if (invert) {
- glPixelTransferf(GL_RED_SCALE, -1.0);
- glPixelTransferf(GL_RED_BIAS, 1.0);
- glPixelTransferf(GL_GREEN_SCALE, -1.0);
- glPixelTransferf(GL_GREEN_BIAS, 1.0);
- glPixelTransferf(GL_BLUE_SCALE, -1.0);
- glPixelTransferf(GL_BLUE_BIAS, 1.0);
- }
- else {
- glPixelTransferf(GL_RED_SCALE, 1.0);
- glPixelTransferf(GL_RED_BIAS, 0.0);
- glPixelTransferf(GL_GREEN_SCALE, 1.0);
- glPixelTransferf(GL_GREEN_BIAS, 0.0);
- glPixelTransferf(GL_BLUE_SCALE, 1.0);
- glPixelTransferf(GL_BLUE_BIAS, 0.0);
- }
-}
-
-
-static void
-Display( void )
-{
- glClearColor(.3, .3, .3, 1);
- glClear( GL_COLOR_BUFFER_BIT );
-
- CheckError(__LINE__);
-
- /** Unbind UNPACK pixel buffer before calling glBitmap */
- glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, 0);
-
- glRasterPos2i(5, ImgHeight+25);
- PrintString("f = toggle front/back s = toggle scale/bias b = benchmark");
-
- glRasterPos2i(5, ImgHeight+40);
- PrintString("GL_EXT_pixel_buffer_object test");
-
- /* draw original image */
- glRasterPos2i(APosX, 5);
- PrintString("Original");
- glRasterPos2i(APosX, APosY);
- glEnable(GL_DITHER);
- SetupPixelTransfer(GL_FALSE);
- /*** Draw from the DrawPBO */
- glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, DrawPBO);
- glDrawPixels(ImgWidth, ImgHeight, ImgFormat, GL_UNSIGNED_BYTE, 0);
- glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, 0);
-
- CheckError(__LINE__);
-
- /* do readpixels, drawpixels */
- glRasterPos2i(BPosX, 5);
- PrintString("Read/DrawPixels");
- SetupPixelTransfer(ScaleAndBias);
- /*** read into the Temp PBO */
- glBindBufferARB(GL_PIXEL_PACK_BUFFER_EXT, TempPBO);
- CheckError(__LINE__);
- if (Benchmark) {
- GLint reads = 0;
- GLint endTime;
- GLint startTime = glutGet(GLUT_ELAPSED_TIME);
- GLdouble seconds, pixelsPerSecond;
- printf("Benchmarking...\n");
- do {
- glReadPixels(APosX, APosY, ImgWidth, ImgHeight,
- ReadFormat, ReadType, 0);
- reads++;
- endTime = glutGet(GLUT_ELAPSED_TIME);
- } while (endTime - startTime < 4000); /* 4 seconds */
- seconds = (double) (endTime - startTime) / 1000.0;
- pixelsPerSecond = reads * ImgWidth * ImgHeight / seconds;
- printf("Result: %d reads in %f seconds = %f pixels/sec\n",
- reads, seconds, pixelsPerSecond);
- Benchmark = GL_FALSE;
- }
- else {
- glReadPixels(APosX, APosY, ImgWidth, ImgHeight,
- ReadFormat, ReadType, 0);
- }
- CheckError(__LINE__);
- glRasterPos2i(BPosX, BPosY);
- glDisable(GL_DITHER);
- SetupPixelTransfer(GL_FALSE);
-
- CheckError(__LINE__);
-
- /*** draw from the Temp PBO */
- glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, TempPBO);
- glDrawPixels(ImgWidth, ImgHeight, ReadFormat, ReadType, 0);
- glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, 0);
-
- CheckError(__LINE__);
-
- /* do copypixels */
- glRasterPos2i(CPosX, 5);
- PrintString("CopyPixels");
- glRasterPos2i(CPosX, CPosY);
- glDisable(GL_DITHER);
- SetupPixelTransfer(ScaleAndBias);
- glCopyPixels(APosX, APosY, ImgWidth, ImgHeight, GL_COLOR);
-
- CheckError(__LINE__);
-
- if (!DrawFront)
- glutSwapBuffers();
- else
- glFinish();
-}
-
-
-static void
-Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glOrtho( 0.0, width, 0.0, height, -1.0, 1.0 );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
-}
-
-
-static void
-Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 'b':
- Benchmark = GL_TRUE;
- break;
- case 's':
- ScaleAndBias = !ScaleAndBias;
- break;
- case 'f':
- DrawFront = !DrawFront;
- if (DrawFront) {
- glDrawBuffer(GL_FRONT);
- glReadBuffer(GL_FRONT);
- }
- else {
- glDrawBuffer(GL_BACK);
- glReadBuffer(GL_BACK);
- }
- printf("glDrawBuffer(%s)\n", DrawFront ? "GL_FRONT" : "GL_BACK");
- break;
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void
-Init(void)
-{
- printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- if (!glutExtensionSupported("GL_EXT_pixel_buffer_object")) {
- printf("Sorry, this demo requires GL_EXT_pixel_buffer_object\n");
- exit(0);
- }
-
- Image = LoadRGBImage( IMAGE_FILE, &ImgWidth, &ImgHeight, &ImgFormat );
- if (!Image) {
- printf("Couldn't read %s\n", IMAGE_FILE);
- exit(0);
- }
-
- printf("Loaded %d by %d image\n", ImgWidth, ImgHeight );
-
- if (ImgFormat == GL_RGB) {
- /* convert to RGBA */
- int i;
- GLubyte *image2 = (GLubyte *) malloc(ImgWidth * ImgHeight * 4);
- printf("Converting RGB image to RGBA\n");
- for (i = 0; i < ImgWidth * ImgHeight; i++) {
- image2[i*4+0] = Image[i*3+0];
- image2[i*4+1] = Image[i*3+1];
- image2[i*4+2] = Image[i*3+2];
- image2[i*4+3] = 255;
- }
- free(Image);
- Image = image2;
- ImgFormat = GL_RGBA;
- }
-
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- glPixelStorei(GL_UNPACK_ROW_LENGTH, ImgWidth);
- glPixelStorei(GL_PACK_ALIGNMENT, 1);
- glPixelStorei(GL_PACK_ROW_LENGTH, ImgWidth);
-
- Reset();
-
- /* put image into DrawPBO */
- glGenBuffersARB(1, &DrawPBO);
- glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, DrawPBO);
- glBufferDataARB(GL_PIXEL_UNPACK_BUFFER_EXT,
- ImgWidth * ImgHeight * 4, Image, GL_STATIC_DRAW);
-
- /* Setup TempPBO - used for glReadPixels & glDrawPixels */
- glGenBuffersARB(1, &TempPBO);
- glBindBufferARB(GL_PIXEL_PACK_BUFFER_EXT, TempPBO);
- glBufferDataARB(GL_PIXEL_PACK_BUFFER_EXT,
- ImgWidth * ImgHeight * 4, NULL, GL_DYNAMIC_COPY);
-
-}
-
-
-int
-main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 750, 250 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
- glutCreateWindow(argv[0]);
- Init();
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/prog_parameter.c b/progs/tests/prog_parameter.c
deleted file mode 100644
index 96697e5bda..0000000000
--- a/progs/tests/prog_parameter.c
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
- * (C) Copyright IBM Corporation 2006
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, and/or sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file prog_parameter.c
- *
- * Test various aspects of setting (and getting) low-level program parameters.
- * This is primarilly intended as a test for GL_EXT_gpu_program_parameters,
- * but it turns out that it hits some other functionality along the way.
- *
- * \author Ian Romanick <idr@us.ibm.com>
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <GL/glut.h>
-
-#ifndef GL_EXT_gpu_program_parameters
-typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC)(GLenum,
- GLuint, GLsizei, const GLfloat *);
-typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC)(GLenum,
- GLuint, GLsizei, const GLfloat *);
-#endif
-
-static PFNGLPROGRAMLOCALPARAMETER4FVARBPROC program_local_parameter4fv = NULL;
-static PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC get_program_local_parameterfv = NULL;
-static PFNGLPROGRAMENVPARAMETER4FVARBPROC program_env_parameter4fv = NULL;
-static PFNGLGETPROGRAMENVPARAMETERFVARBPROC get_program_env_parameterfv = NULL;
-static PFNGLBINDPROGRAMARBPROC bind_program = NULL;
-static PFNGLGETPROGRAMIVARBPROC get_program = NULL;
-
-static PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC program_local_parameters4fv = NULL;
-static PFNGLPROGRAMENVPARAMETERS4FVEXTPROC program_env_parameters4fv = NULL;
-
-static int Width = 400;
-static int Height = 200;
-static const GLfloat Near = 5.0, Far = 25.0;
-
-
-static void Display( void )
-{
-}
-
-
-static void Idle( void )
-{
-}
-
-
-static void Visible( int vis )
-{
- if ( vis == GLUT_VISIBLE ) {
- glutIdleFunc( Idle );
- }
- else {
- glutIdleFunc( NULL );
- }
-}
-static void Reshape( int width, int height )
-{
- GLfloat ar = (float) width / (float) height;
- Width = width;
- Height = height;
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -ar, ar, -1.0, 1.0, Near, Far );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static int set_parameter_batch( GLsizei count, GLfloat * param,
- const char * name,
- PFNGLPROGRAMLOCALPARAMETER4FVARBPROC set_parameter,
- PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC set_parameters,
- PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC get_parameter
- )
-{
- unsigned i;
- int pass = 1;
-
-
- for ( i = 0 ; i < (4 * count) ; i++ ) {
- param[i] = (GLfloat) random() / (GLfloat) random();
- }
-
- /* Try using the "classic" interface.
- */
- printf("Testing glProgram%sParameter4fvARB (count = %u)...\n", name, count);
- for ( i = 0 ; i < count ; i++ ) {
- (*set_parameter)(GL_VERTEX_PROGRAM_ARB, i, & param[i * 4]);
- }
-
- for ( i = 0 ; i < count ; i++ ) {
- GLfloat temp[4];
-
- (*get_parameter)(GL_VERTEX_PROGRAM_ARB, i, temp);
-
- if ( (temp[0] != param[(i * 4) + 0])
- || (temp[1] != param[(i * 4) + 1])
- || (temp[2] != param[(i * 4) + 2])
- || (temp[3] != param[(i * 4) + 3]) ) {
- printf("Mismatch in glProgram%sParameter4fvARB index %u!\n", name, i);
- printf("Got { %f, %f, %f, %f }, expected { %f, %f, %f, %f }!\n",
- temp[0], temp[1],
- temp[2], temp[3],
- param[(i * 4) + 0], param[(i * 4) + 1],
- param[(i * 4) + 2], param[(i * 4) + 3]);
- pass = 0;
- break;
- }
- }
-
-
- if ( set_parameters == NULL ) {
- return pass;
- }
-
-
- for ( i = 0 ; i < (4 * count) ; i++ ) {
- param[i] = (GLfloat) random() / (GLfloat) random();
- }
-
- printf("Testing glProgram%sParameters4fvEXT (count = %u)...\n", name, count);
- (*set_parameters)(GL_VERTEX_PROGRAM_ARB, 0, count, param);
-
- for ( i = 0 ; i < count ; i++ ) {
- GLfloat temp[4];
-
- (*get_parameter)(GL_VERTEX_PROGRAM_ARB, i, temp);
-
- if ( (temp[0] != param[(i * 4) + 0])
- || (temp[1] != param[(i * 4) + 1])
- || (temp[2] != param[(i * 4) + 2])
- || (temp[3] != param[(i * 4) + 3]) ) {
- printf("Mismatch in glProgram%sParameters4fvEXT index %u!\n", name, i);
- printf("Got { %f, %f, %f, %f }, expected { %f, %f, %f, %f }!\n",
- temp[0], temp[1],
- temp[2], temp[3],
- param[(i * 4) + 0], param[(i * 4) + 1],
- param[(i * 4) + 2], param[(i * 4) + 3]);
- pass = 0;
- break;
- }
- }
-
-
- return pass;
-}
-
-
-static void Init( void )
-{
- const char * const ver_string = (const char * const)
- glGetString( GL_VERSION );
- int pass = 1;
- GLfloat * params;
- GLint max_program_env_parameters;
- GLint max_program_local_parameters;
-
-
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- printf("GL_VERSION = %s\n\n", ver_string);
-
- if ( !glutExtensionSupported("GL_ARB_vertex_program") ) {
- printf("Sorry, this program requires GL_ARB_vertex_program\n");
- exit(2);
- }
-
-
- program_local_parameter4fv = glutGetProcAddress( "glProgramLocalParameter4fvARB" );
- program_env_parameter4fv = glutGetProcAddress( "glProgramEnvParameter4fvARB" );
-
- get_program_local_parameterfv = glutGetProcAddress( "glGetProgramLocalParameterfvARB" );
- get_program_env_parameterfv = glutGetProcAddress( "glGetProgramEnvParameterfvARB" );
-
- bind_program = glutGetProcAddress( "glBindProgramARB" );
- get_program = glutGetProcAddress( "glGetProgramivARB" );
-
- if ( glutExtensionSupported("GL_EXT_gpu_program_parameters") ) {
- printf("GL_EXT_gpu_program_parameters available, testing that path.\n");
-
- program_local_parameters4fv = glutGetProcAddress( "glProgramLocalParameters4fvEXT" );
- program_env_parameters4fv = glutGetProcAddress( "glProgramEnvParameters4fvEXT" );
- }
- else {
- printf("GL_EXT_gpu_program_parameters not available.\n");
-
- program_local_parameters4fv = NULL;
- program_env_parameters4fv = NULL;
- }
-
-
-
- /* Since the test sets program local parameters, a program must be bound.
- * Program source, however, is not needed.
- */
- (*bind_program)(GL_VERTEX_PROGRAM_ARB, 1);
-
-
- (*get_program)(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_ENV_PARAMETERS_ARB,
- & max_program_env_parameters);
-
- params = malloc(max_program_env_parameters * 4 * sizeof(GLfloat));
-
- pass &= set_parameter_batch(max_program_env_parameters, params, "Env",
- program_env_parameter4fv,
- program_env_parameters4fv,
- get_program_env_parameterfv);
-
-
- (*get_program)(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB,
- & max_program_local_parameters);
-
- if (max_program_local_parameters > max_program_env_parameters) {
- params = realloc(params,
- max_program_local_parameters * 4 * sizeof(GLfloat));
- }
-
- pass &= set_parameter_batch(max_program_local_parameters, params, "Local",
- program_local_parameter4fv,
- program_local_parameters4fv,
- get_program_local_parameterfv);
-
- free(params);
-
- if (! pass) {
- printf("FAIL!\n");
- exit(1);
- }
-
- printf("PASS!\n");
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( Width, Height );
- glutInitDisplayMode( GLUT_RGB );
- glutCreateWindow( "Program Parameters Test" );
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- glutVisibilityFunc( Visible );
-
- Init();
-
- return 0;
-}
diff --git a/progs/tests/projtex.c b/progs/tests/projtex.c
deleted file mode 100644
index e3ef948ab6..0000000000
--- a/progs/tests/projtex.c
+++ /dev/null
@@ -1,1028 +0,0 @@
-
-/* projtex.c - by David Yu and David Blythe, SGI */
-
-/**
- ** Demonstrates simple projective texture mapping.
- **
- ** Button1 changes view, Button2 moves texture.
- **
- ** (See: Segal, Korobkin, van Widenfelt, Foran, and Haeberli
- ** "Fast Shadows and Lighting Effects Using Texture Mapping", SIGGRAPH '92)
- **
- ** 1994,1995 -- David G Yu
- **
- ** cc -o projtex projtex.c texture.c -lglut -lGLU -lGL -lX11 -lm
- **/
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <GL/glut.h>
-#if 0
-#include "texture.h"
-#else
-#include "../util/readtex.c"
-#endif
-
-
-/* Some <math.h> files do not define M_PI... */
-#ifndef M_PI
-#define M_PI 3.14159265358979323846
-#endif
-
-#define MAX_TEX 4
-int NumTextures = 1;
-
-int winWidth, winHeight;
-
-GLboolean redrawContinuously = GL_FALSE;
-
-float angle, axis[3];
-enum MoveModes {
- MoveNone, MoveView, MoveObject, MoveTexture
-};
-enum MoveModes mode = MoveNone;
-
-GLfloat objectXform[4][4];
-GLfloat textureXform[MAX_TEX][4][4];
-
-void (*drawObject) (void);
-void (*loadTexture) (void);
-GLboolean textureEnabled = GL_TRUE;
-GLboolean showProjection = GL_TRUE;
-GLboolean linearFilter = GL_TRUE;
-
-char *texFilename[MAX_TEX] = {
- "../images/girl.rgb",
- "../images/tile.rgb",
- "../images/bw.rgb",
- "../images/reflect.rgb"
-};
-
-
-GLfloat zoomFactor = 1.0;
-
-/*****************************************************************/
-
-
-void ActiveTexture(int i)
-{
- glActiveTextureARB(i);
-}
-
-
-/* matrix = identity */
-void
-matrixIdentity(GLfloat matrix[16])
-{
- matrix[0] = 1.0;
- matrix[1] = 0.0;
- matrix[2] = 0.0;
- matrix[3] = 0.0;
- matrix[4] = 0.0;
- matrix[5] = 1.0;
- matrix[6] = 0.0;
- matrix[7] = 0.0;
- matrix[8] = 0.0;
- matrix[9] = 0.0;
- matrix[10] = 1.0;
- matrix[11] = 0.0;
- matrix[12] = 0.0;
- matrix[13] = 0.0;
- matrix[14] = 0.0;
- matrix[15] = 1.0;
-}
-
-/* matrix2 = transpose(matrix1) */
-void
-matrixTranspose(GLfloat matrix2[16], GLfloat matrix1[16])
-{
- matrix2[0] = matrix1[0];
- matrix2[1] = matrix1[4];
- matrix2[2] = matrix1[8];
- matrix2[3] = matrix1[12];
-
- matrix2[4] = matrix1[1];
- matrix2[5] = matrix1[5];
- matrix2[6] = matrix1[9];
- matrix2[7] = matrix1[13];
-
- matrix2[8] = matrix1[2];
- matrix2[9] = matrix1[6];
- matrix2[10] = matrix1[10];
- matrix2[11] = matrix1[14];
-
- matrix2[12] = matrix1[3];
- matrix2[13] = matrix1[7];
- matrix2[14] = matrix1[14];
- matrix2[15] = matrix1[15];
-}
-
-/*****************************************************************/
-
-/* load SGI .rgb image (pad with a border of the specified width and color) */
-#if 0
-static void
-imgLoad(char *filenameIn, int borderIn, GLfloat borderColorIn[4],
- int *wOut, int *hOut, GLubyte ** imgOut)
-{
- int border = borderIn;
- int width, height;
- int w, h;
- GLubyte *image, *img, *p;
- int i, j, components;
-
- image = (GLubyte *) read_texture(filenameIn, &width, &height, &components);
- w = width + 2 * border;
- h = height + 2 * border;
- img = (GLubyte *) calloc(w * h, 4 * sizeof(unsigned char));
-
- p = img;
- for (j = -border; j < height + border; ++j) {
- for (i = -border; i < width + border; ++i) {
- if (0 <= j && j <= height - 1 && 0 <= i && i <= width - 1) {
- p[0] = image[4 * (j * width + i) + 0];
- p[1] = image[4 * (j * width + i) + 1];
- p[2] = image[4 * (j * width + i) + 2];
- p[3] = 0xff;
- } else {
- p[0] = borderColorIn[0] * 0xff;
- p[1] = borderColorIn[1] * 0xff;
- p[2] = borderColorIn[2] * 0xff;
- p[3] = borderColorIn[3] * 0xff;
- }
- p += 4;
- }
- }
- free(image);
- *wOut = w;
- *hOut = h;
- *imgOut = img;
-}
-#endif
-
-
-/*****************************************************************/
-
-/* Load the image file specified on the command line as the current texture */
-void
-loadImageTextures(void)
-{
- GLfloat borderColor[4] =
- {1.0, 1.0, 1.0, 1.0};
- int tex;
-
- for (tex = 0; tex < NumTextures; tex++) {
- GLubyte *image, *texData3, *texData4;
- GLint imgWidth, imgHeight;
- GLenum imgFormat;
- int i, j;
-
- printf("loading %s\n", texFilename[tex]);
- image = LoadRGBImage(texFilename[tex], &imgWidth, &imgHeight, &imgFormat);
- if (!image) {
- printf("can't find %s\n", texFilename[tex]);
- exit(1);
- }
- assert(imgFormat == GL_RGB);
-
- /* scale to 256x256 */
- texData3 = malloc(256 * 256 * 4);
- texData4 = malloc(256 * 256 * 4);
- assert(texData3);
- assert(texData4);
- gluScaleImage(imgFormat, imgWidth, imgHeight, GL_UNSIGNED_BYTE, image,
- 256, 256, GL_UNSIGNED_BYTE, texData3);
-
- /* convert to rgba */
- for (i = 0; i < 256 * 256; i++) {
- texData4[i*4+0] = texData3[i*3+0];
- texData4[i*4+1] = texData3[i*3+1];
- texData4[i*4+2] = texData3[i*3+2];
- texData4[i*4+3] = 128;
- }
-
- /* put transparent border around image */
- for (i = 0; i < 256; i++) {
- texData4[i*4+0] = 255;
- texData4[i*4+1] = 255;
- texData4[i*4+2] = 255;
- texData4[i*4+3] = 0;
- }
- j = 256 * 255 * 4;
- for (i = 0; i < 256; i++) {
- texData4[j + i*4+0] = 255;
- texData4[j + i*4+1] = 255;
- texData4[j + i*4+2] = 255;
- texData4[j + i*4+3] = 0;
- }
- for (i = 0; i < 256; i++) {
- j = i * 256 * 4;
- texData4[j+0] = 255;
- texData4[j+1] = 255;
- texData4[j+2] = 255;
- texData4[j+3] = 0;
- }
- for (i = 0; i < 256; i++) {
- j = i * 256 * 4 + 255 * 4;
- texData4[j+0] = 255;
- texData4[j+1] = 255;
- texData4[j+2] = 255;
- texData4[j+3] = 0;
- }
-
- ActiveTexture(GL_TEXTURE0_ARB + tex);
- glBindTexture(GL_TEXTURE_2D, tex + 1);
-
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, texData4);
-
- if (linearFilter) {
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- } else {
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- }
- glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, borderColor);
- }
-}
-
-/* Create a simple spotlight pattern and make it the current texture */
-void
-loadSpotlightTexture(void)
-{
- static int texWidth = 64, texHeight = 64;
- static GLubyte *texData;
- GLfloat borderColor[4] =
- {0.1, 0.1, 0.1, 1.0};
-
- if (!texData) {
- GLubyte *p;
- int i, j;
-
- texData = (GLubyte *) malloc(texWidth * texHeight * 4 * sizeof(GLubyte));
-
- p = texData;
- for (j = 0; j < texHeight; ++j) {
- float dy = (texHeight * 0.5 - j + 0.5) / (texHeight * 0.5);
-
- for (i = 0; i < texWidth; ++i) {
- float dx = (texWidth * 0.5 - i + 0.5) / (texWidth * 0.5);
- float r = cos(M_PI / 2.0 * sqrt(dx * dx + dy * dy));
- float c;
-
- r = (r < 0) ? 0 : r * r;
- c = 0xff * (r + borderColor[0]);
- p[0] = (c <= 0xff) ? c : 0xff;
- c = 0xff * (r + borderColor[1]);
- p[1] = (c <= 0xff) ? c : 0xff;
- c = 0xff * (r + borderColor[2]);
- p[2] = (c <= 0xff) ? c : 0xff;
- c = 0xff * (r + borderColor[3]);
- p[3] = (c <= 0xff) ? c : 0xff;
- p += 4;
- }
- }
- }
- if (linearFilter) {
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- } else {
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- }
- glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, borderColor);
- gluBuild2DMipmaps(GL_TEXTURE_2D, 4, texWidth, texHeight,
- GL_RGBA, GL_UNSIGNED_BYTE, texData);
-}
-
-/*****************************************************************/
-
-void
-checkErrors(void)
-{
- GLenum error;
- while ((error = glGetError()) != GL_NO_ERROR) {
- fprintf(stderr, "Error: %s\n", (char *) gluErrorString(error));
- }
-}
-
-void
-drawCube(void)
-{
- glBegin(GL_QUADS);
-
- glNormal3f(-1.0, 0.0, 0.0);
- glColor3f(0.80, 0.50, 0.50);
- glVertex3f(-0.5, -0.5, -0.5);
- glVertex3f(-0.5, -0.5, 0.5);
- glVertex3f(-0.5, 0.5, 0.5);
- glVertex3f(-0.5, 0.5, -0.5);
-
- glNormal3f(1.0, 0.0, 0.0);
- glColor3f(0.50, 0.80, 0.50);
- glVertex3f(0.5, 0.5, 0.5);
- glVertex3f(0.5, -0.5, 0.5);
- glVertex3f(0.5, -0.5, -0.5);
- glVertex3f(0.5, 0.5, -0.5);
-
- glNormal3f(0.0, -1.0, 0.0);
- glColor3f(0.50, 0.50, 0.80);
- glVertex3f(-0.5, -0.5, -0.5);
- glVertex3f(0.5, -0.5, -0.5);
- glVertex3f(0.5, -0.5, 0.5);
- glVertex3f(-0.5, -0.5, 0.5);
-
- glNormal3f(0.0, 1.0, 0.0);
- glColor3f(0.50, 0.80, 0.80);
- glVertex3f(0.5, 0.5, 0.5);
- glVertex3f(0.5, 0.5, -0.5);
- glVertex3f(-0.5, 0.5, -0.5);
- glVertex3f(-0.5, 0.5, 0.5);
-
- glNormal3f(0.0, 0.0, -1.0);
- glColor3f(0.80, 0.50, 0.80);
- glVertex3f(-0.5, -0.5, -0.5);
- glVertex3f(-0.5, 0.5, -0.5);
- glVertex3f(0.5, 0.5, -0.5);
- glVertex3f(0.5, -0.5, -0.5);
-
- glNormal3f(0.0, 0.0, 1.0);
- glColor3f(1.00, 0.80, 0.50);
- glVertex3f(0.5, 0.5, 0.5);
- glVertex3f(-0.5, 0.5, 0.5);
- glVertex3f(-0.5, -0.5, 0.5);
- glVertex3f(0.5, -0.5, 0.5);
- glEnd();
-}
-
-void
-drawDodecahedron(void)
-{
-#define A (0.5 * 1.61803) /* (sqrt(5) + 1) / 2 */
-#define B (0.5 * 0.61803) /* (sqrt(5) - 1) / 2 */
-#define C (0.5 * 1.0)
- GLfloat vertexes[20][3] =
- {
- {-A, 0.0, B},
- {-A, 0.0, -B},
- {A, 0.0, -B},
- {A, 0.0, B},
- {B, -A, 0.0},
- {-B, -A, 0.0},
- {-B, A, 0.0},
- {B, A, 0.0},
- {0.0, B, -A},
- {0.0, -B, -A},
- {0.0, -B, A},
- {0.0, B, A},
- {-C, -C, C},
- {-C, -C, -C},
- {C, -C, -C},
- {C, -C, C},
- {-C, C, C},
- {-C, C, -C},
- {C, C, -C},
- {C, C, C},
- };
-#undef A
-#undef B
-#undef C
- GLint polygons[12][5] =
- {
- {0, 12, 10, 11, 16},
- {1, 17, 8, 9, 13},
- {2, 14, 9, 8, 18},
- {3, 19, 11, 10, 15},
- {4, 14, 2, 3, 15},
- {5, 12, 0, 1, 13},
- {6, 17, 1, 0, 16},
- {7, 19, 3, 2, 18},
- {8, 17, 6, 7, 18},
- {9, 14, 4, 5, 13},
- {10, 12, 5, 4, 15},
- {11, 19, 7, 6, 16},
- };
- int i;
-
- glColor3f(0.75, 0.75, 0.75);
- for (i = 0; i < 12; ++i) {
- GLfloat *p0, *p1, *p2, d;
- GLfloat u[3], v[3], n[3];
-
- p0 = &vertexes[polygons[i][0]][0];
- p1 = &vertexes[polygons[i][1]][0];
- p2 = &vertexes[polygons[i][2]][0];
-
- u[0] = p2[0] - p1[0];
- u[1] = p2[1] - p1[1];
- u[2] = p2[2] - p1[2];
-
- v[0] = p0[0] - p1[0];
- v[1] = p0[1] - p1[1];
- v[2] = p0[2] - p1[2];
-
- n[0] = u[1] * v[2] - u[2] * v[1];
- n[1] = u[2] * v[0] - u[0] * v[2];
- n[2] = u[0] * v[1] - u[1] * v[0];
-
- d = 1.0 / sqrt(n[0] * n[0] + n[1] * n[1] + n[2] * n[2]);
- n[0] *= d;
- n[1] *= d;
- n[2] *= d;
-
- glBegin(GL_POLYGON);
- glNormal3fv(n);
- glVertex3fv(p0);
- glVertex3fv(p1);
- glVertex3fv(p2);
- glVertex3fv(vertexes[polygons[i][3]]);
- glVertex3fv(vertexes[polygons[i][4]]);
- glEnd();
- }
-}
-
-void
-drawSphere(void)
-{
- int numMajor = 24;
- int numMinor = 32;
- float radius = 0.8;
- double majorStep = (M_PI / numMajor);
- double minorStep = (2.0 * M_PI / numMinor);
- int i, j;
-
- glColor3f(0.50, 0.50, 0.50);
- for (i = 0; i < numMajor; ++i) {
- double a = i * majorStep;
- double b = a + majorStep;
- double r0 = radius * sin(a);
- double r1 = radius * sin(b);
- GLfloat z0 = radius * cos(a);
- GLfloat z1 = radius * cos(b);
-
- glBegin(GL_TRIANGLE_STRIP);
- for (j = 0; j <= numMinor; ++j) {
- double c = j * minorStep;
- GLfloat x = cos(c);
- GLfloat y = sin(c);
-
- glNormal3f((x * r0) / radius, (y * r0) / radius, z0 / radius);
- glTexCoord2f(j / (GLfloat) numMinor, i / (GLfloat) numMajor);
- glVertex3f(x * r0, y * r0, z0);
-
- glNormal3f((x * r1) / radius, (y * r1) / radius, z1 / radius);
- glTexCoord2f(j / (GLfloat) numMinor, (i + 1) / (GLfloat) numMajor);
- glVertex3f(x * r1, y * r1, z1);
- }
- glEnd();
- }
-}
-
-/*****************************************************************/
-
-float xmin = -0.035, xmax = 0.035;
-float ymin = -0.035, ymax = 0.035;
-float nnear = 0.1;
-float ffar = 1.9;
-float distance = -1.0;
-
-static void
-loadTextureProjection(int texUnit, GLfloat m[16])
-{
- GLfloat mInverse[4][4];
-
- /* Should use true inverse, but since m consists only of rotations, we can
- just use the transpose. */
- matrixTranspose((GLfloat *) mInverse, m);
-
- ActiveTexture(GL_TEXTURE0_ARB + texUnit);
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- glTranslatef(0.5, 0.5, 0.0);
- glScalef(0.5, 0.5, 1.0);
- glFrustum(xmin, xmax, ymin, ymax, nnear, ffar);
- glTranslatef(0.0, 0.0, distance);
- glMultMatrixf((GLfloat *) mInverse);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void
-drawTextureProjection(void)
-{
- float t = ffar / nnear;
- GLfloat n[4][3];
- GLfloat f[4][3];
-
- n[0][0] = xmin;
- n[0][1] = ymin;
- n[0][2] = -(nnear + distance);
-
- n[1][0] = xmax;
- n[1][1] = ymin;
- n[1][2] = -(nnear + distance);
-
- n[2][0] = xmax;
- n[2][1] = ymax;
- n[2][2] = -(nnear + distance);
-
- n[3][0] = xmin;
- n[3][1] = ymax;
- n[3][2] = -(nnear + distance);
-
- f[0][0] = xmin * t;
- f[0][1] = ymin * t;
- f[0][2] = -(ffar + distance);
-
- f[1][0] = xmax * t;
- f[1][1] = ymin * t;
- f[1][2] = -(ffar + distance);
-
- f[2][0] = xmax * t;
- f[2][1] = ymax * t;
- f[2][2] = -(ffar + distance);
-
- f[3][0] = xmin * t;
- f[3][1] = ymax * t;
- f[3][2] = -(ffar + distance);
-
- glColor3f(1.0, 1.0, 0.0);
- glBegin(GL_LINE_LOOP);
- glVertex3fv(n[0]);
- glVertex3fv(n[1]);
- glVertex3fv(n[2]);
- glVertex3fv(n[3]);
- glVertex3fv(f[3]);
- glVertex3fv(f[2]);
- glVertex3fv(f[1]);
- glVertex3fv(f[0]);
- glVertex3fv(n[0]);
- glVertex3fv(n[1]);
- glVertex3fv(f[1]);
- glVertex3fv(f[0]);
- glVertex3fv(f[3]);
- glVertex3fv(f[2]);
- glVertex3fv(n[2]);
- glVertex3fv(n[3]);
- glEnd();
-}
-
-/*****************************************************************/
-
-void
-initialize(void)
-{
- GLfloat light0Pos[4] =
- {0.3, 0.3, 0.0, 1.0};
- GLfloat matAmb[4] =
- {0.01, 0.01, 0.01, 1.00};
- GLfloat matDiff[4] =
- {0.65, 0.65, 0.65, 1.00};
- GLfloat matSpec[4] =
- {0.30, 0.30, 0.30, 1.00};
- GLfloat matShine = 10.0;
- GLfloat eyePlaneS[] =
- {1.0, 0.0, 0.0, 0.0};
- GLfloat eyePlaneT[] =
- {0.0, 1.0, 0.0, 0.0};
- GLfloat eyePlaneR[] =
- {0.0, 0.0, 1.0, 0.0};
- GLfloat eyePlaneQ[] =
- {0.0, 0.0, 0.0, 1.0};
- int i;
-
- /* Setup Misc. */
- glClearColor(0.41, 0.41, 0.31, 0.0);
-
- glEnable(GL_DEPTH_TEST);
-
- /* glLineWidth(2.0);*/
-
- glCullFace(GL_FRONT);
- glEnable(GL_CULL_FACE);
-
- glMatrixMode(GL_PROJECTION);
- glFrustum(-0.5, 0.5, -0.5, 0.5, 1, 3);
- glMatrixMode(GL_MODELVIEW);
- glTranslatef(0, 0, -2);
-
- matrixIdentity((GLfloat *) objectXform);
- for (i = 0; i < NumTextures; i++) {
- matrixIdentity((GLfloat *) textureXform[i]);
- }
-
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glLoadIdentity();
- glOrtho(0, 1, 0, 1, -1, 1);
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
- glLoadIdentity();
-
- glRasterPos2i(0, 0);
-
- glPopMatrix();
- glMatrixMode(GL_PROJECTION);
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
-
- /* Setup Lighting */
- glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, matAmb);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, matDiff);
- glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, matSpec);
- glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, matShine);
-
- glEnable(GL_COLOR_MATERIAL);
-
- glLightfv(GL_LIGHT0, GL_POSITION, light0Pos);
- glEnable(GL_LIGHT0);
-
- glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
- glEnable(GL_LIGHTING);
-
- /* Setup Texture */
-
- (*loadTexture) ();
-
-
- for (i = 0; i < NumTextures; i++) {
- ActiveTexture(GL_TEXTURE0_ARB + i);
-
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
-
- glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
- glTexGenfv(GL_S, GL_EYE_PLANE, eyePlaneS);
-
- glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
- glTexGenfv(GL_T, GL_EYE_PLANE, eyePlaneT);
-
- glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
- glTexGenfv(GL_R, GL_EYE_PLANE, eyePlaneR);
-
- glTexGeni(GL_Q, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
- glTexGenfv(GL_Q, GL_EYE_PLANE, eyePlaneQ);
- }
-}
-
-void
-display(void)
-{
- int i;
-
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- if (textureEnabled) {
- if (mode == MoveTexture || mode == MoveView) {
- /* Have OpenGL compute the new transformation (simple but slow). */
- for (i = 0; i < NumTextures; i++) {
- glPushMatrix();
- glLoadIdentity();
-#if 0
- if (i & 1)
- glRotatef(angle, axis[0], axis[1], axis[2]);
- else
-#endif
- glRotatef(angle*(i+1), axis[0], axis[1], axis[2]);
-
- glMultMatrixf((GLfloat *) textureXform[i]);
- glGetFloatv(GL_MODELVIEW_MATRIX, (GLfloat *) textureXform[i]);
- glPopMatrix();
- }
- }
- for (i = 0; i < NumTextures; i++) {
- loadTextureProjection(i, (GLfloat *) textureXform[i]);
- }
-
- if (showProjection) {
- for (i = 0; i < NumTextures; i++) {
- ActiveTexture(GL_TEXTURE0_ARB + i);
- glPushMatrix();
- glMultMatrixf((GLfloat *) textureXform[i]);
- glDisable(GL_LIGHTING);
- drawTextureProjection();
- glEnable(GL_LIGHTING);
- glPopMatrix();
- }
- }
- for (i = 0; i < NumTextures; i++) {
- ActiveTexture(GL_TEXTURE0_ARB + i);
- glEnable(GL_TEXTURE_2D);
- glEnable(GL_TEXTURE_GEN_S);
- glEnable(GL_TEXTURE_GEN_T);
- glEnable(GL_TEXTURE_GEN_R);
- glEnable(GL_TEXTURE_GEN_Q);
- }
- }
- if (mode == MoveObject || mode == MoveView) {
- /* Have OpenGL compute the new transformation (simple but slow). */
- glPushMatrix();
- glLoadIdentity();
- glRotatef(angle, axis[0], axis[1], axis[2]);
- glMultMatrixf((GLfloat *) objectXform);
- glGetFloatv(GL_MODELVIEW_MATRIX, (GLfloat *) objectXform);
- glPopMatrix();
- }
- glPushMatrix();
- glMultMatrixf((GLfloat *) objectXform);
- (*drawObject) ();
- glPopMatrix();
-
- for (i = 0; i < NumTextures; i++) {
- ActiveTexture(GL_TEXTURE0_ARB + i);
- glDisable(GL_TEXTURE_2D);
- glDisable(GL_TEXTURE_GEN_S);
- glDisable(GL_TEXTURE_GEN_T);
- glDisable(GL_TEXTURE_GEN_R);
- glDisable(GL_TEXTURE_GEN_Q);
- }
-
- if (zoomFactor > 1.0) {
- glDisable(GL_DEPTH_TEST);
- glCopyPixels(0, 0, winWidth / zoomFactor, winHeight / zoomFactor, GL_COLOR);
- glEnable(GL_DEPTH_TEST);
- }
- glFlush();
- glutSwapBuffers();
- checkErrors();
-}
-
-/*****************************************************************/
-
-/* simple trackball-like motion control */
-float lastPos[3];
-int lastTime;
-
-void
-ptov(int x, int y, int width, int height, float v[3])
-{
- float d, a;
-
- /* project x,y onto a hemi-sphere centered within width, height */
- v[0] = (2.0 * x - width) / width;
- v[1] = (height - 2.0 * y) / height;
- d = sqrt(v[0] * v[0] + v[1] * v[1]);
- v[2] = cos((M_PI / 2.0) * ((d < 1.0) ? d : 1.0));
- a = 1.0 / sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
- v[0] *= a;
- v[1] *= a;
- v[2] *= a;
-}
-
-void
-startMotion(int x, int y, int but, int time)
-{
- if (but == GLUT_LEFT_BUTTON) {
- mode = MoveView;
- } else if (but == GLUT_MIDDLE_BUTTON) {
- mode = MoveTexture;
- } else {
- return;
- }
-
- lastTime = time;
- ptov(x, y, winWidth, winHeight, lastPos);
-}
-
-void
-animate(void)
-{
- glutPostRedisplay();
-}
-
-void
-vis(int visible)
-{
- if (visible == GLUT_VISIBLE) {
- if (redrawContinuously)
- glutIdleFunc(animate);
- } else {
- if (redrawContinuously)
- glutIdleFunc(NULL);
- }
-}
-
-void
-stopMotion(int but, int time)
-{
- if ((but == GLUT_LEFT_BUTTON && mode == MoveView) ||
- (but == GLUT_MIDDLE_BUTTON && mode == MoveTexture)) {
- } else {
- return;
- }
-
- if (time == lastTime) {
- /* redrawContinuously = GL_TRUE;*/
- glutIdleFunc(animate);
- } else {
- angle = 0.0;
- redrawContinuously = GL_FALSE;
- glutIdleFunc(0);
- }
- if (!redrawContinuously) {
- mode = MoveNone;
- }
-}
-
-void
-trackMotion(int x, int y)
-{
- float curPos[3], dx, dy, dz;
-
- ptov(x, y, winWidth, winHeight, curPos);
-
- dx = curPos[0] - lastPos[0];
- dy = curPos[1] - lastPos[1];
- dz = curPos[2] - lastPos[2];
- angle = 90.0 * sqrt(dx * dx + dy * dy + dz * dz);
-
- axis[0] = lastPos[1] * curPos[2] - lastPos[2] * curPos[1];
- axis[1] = lastPos[2] * curPos[0] - lastPos[0] * curPos[2];
- axis[2] = lastPos[0] * curPos[1] - lastPos[1] * curPos[0];
-
- lastTime = glutGet(GLUT_ELAPSED_TIME);
- lastPos[0] = curPos[0];
- lastPos[1] = curPos[1];
- lastPos[2] = curPos[2];
- glutPostRedisplay();
-}
-
-/*****************************************************************/
-
-void
-object(void)
-{
- static int object;
-
- object++;
- object %= 3;
- switch (object) {
- case 0:
- drawObject = drawCube;
- break;
- case 1:
- drawObject = drawDodecahedron;
- break;
- case 2:
- drawObject = drawSphere;
- break;
- default:
- break;
- }
-}
-
-static void
-nop(void)
-{
-}
-
-void
-texture(void)
-{
- static int texture = 0;
-
- texture++;
- texture %= 3;
- if (texture == 1 && texFilename == NULL) {
- /* Skip file texture if not loaded. */
- texture++;
- }
- switch (texture) {
- case 0:
- loadTexture = nop;
- textureEnabled = GL_FALSE;
- break;
- case 1:
- loadTexture = loadImageTextures;
- (*loadTexture) ();
- textureEnabled = GL_TRUE;
- break;
- case 2:
- loadTexture = loadSpotlightTexture;
- (*loadTexture) ();
- textureEnabled = GL_TRUE;
- break;
- default:
- break;
- }
-}
-
-void
-help(void)
-{
- printf("'h' - help\n");
- printf("'l' - toggle linear/nearest filter\n");
- printf("'s' - toggle projection frustum\n");
- printf("'t' - toggle projected texture\n");
- printf("'o' - toggle object\n");
- printf("'z' - increase zoom factor\n");
- printf("'Z' - decrease zoom factor\n");
- printf("left mouse - move view\n");
- printf("middle mouse - move projection\n");
-}
-
-/* ARGSUSED1 */
-void
-key(unsigned char key, int x, int y)
-{
- switch (key) {
- case '\033':
- exit(0);
- break;
- case 'l':
- linearFilter = !linearFilter;
- (*loadTexture) ();
- break;
- case 's':
- showProjection = !showProjection;
- break;
- case 't':
- texture();
- break;
- case 'o':
- object();
- break;
- case 'z':
- zoomFactor += 1.0;
- glPixelZoom(zoomFactor, zoomFactor);
- glViewport(0, 0, winWidth / zoomFactor, winHeight / zoomFactor);
- break;
- case 'Z':
- zoomFactor -= 1.0;
- if (zoomFactor < 1.0)
- zoomFactor = 1.0;
- glPixelZoom(zoomFactor, zoomFactor);
- glViewport(0, 0, winWidth / zoomFactor, winHeight / zoomFactor);
- break;
- case 'h':
- help();
- break;
- }
- glutPostRedisplay();
-}
-
-void
-mouse(int button, int state, int x, int y)
-{
- if (state == GLUT_DOWN)
- startMotion(x, y, button, glutGet(GLUT_ELAPSED_TIME));
- else if (state == GLUT_UP)
- stopMotion(button, glutGet(GLUT_ELAPSED_TIME));
- glutPostRedisplay();
-}
-
-void
-reshape(int w, int h)
-{
- winWidth = w;
- winHeight = h;
- glViewport(0, 0, w / zoomFactor, h / zoomFactor);
-}
-
-
-void
-menu(int selection)
-{
- if (selection == 666) {
- exit(0);
- }
- key((unsigned char) selection, 0, 0);
-}
-
-int
-main(int argc, char **argv)
-{
- glutInit(&argc, argv);
-
- if (argc > 1) {
- NumTextures = atoi(argv[1]);
- }
- assert(NumTextures <= MAX_TEX);
-
- glutInitDisplayMode(GLUT_RGBA | GLUT_DEPTH | GLUT_DOUBLE);
- (void) glutCreateWindow("projtex");
-
- loadTexture = loadImageTextures;
- drawObject = drawCube;
- initialize();
- glutDisplayFunc(display);
- glutKeyboardFunc(key);
- glutReshapeFunc(reshape);
- glutMouseFunc(mouse);
- glutMotionFunc(trackMotion);
- glutVisibilityFunc(vis);
- glutCreateMenu(menu);
- glutAddMenuEntry("Toggle showing projection", 's');
- glutAddMenuEntry("Switch texture", 't');
- glutAddMenuEntry("Switch object", 'o');
- glutAddMenuEntry("Toggle filtering", 'l');
- glutAddMenuEntry("Quit", 666);
- glutAttachMenu(GLUT_RIGHT_BUTTON);
- texture();
- glutMainLoop();
- return 0; /* ANSI C requires main to return int. */
-}
diff --git a/progs/tests/random.c b/progs/tests/random.c
deleted file mode 100644
index d52c338e0e..0000000000
--- a/progs/tests/random.c
+++ /dev/null
@@ -1,457 +0,0 @@
-/**
- * Random rendering, to check for crashes, hangs, etc.
- *
- * Brian Paul
- * 21 June 2007
- */
-
-#define GL_GLEXT_PROTOTYPES
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <GL/glut.h>
-
-static int Win;
-static GLboolean Anim = GL_TRUE;
-static int Width = 200, Height = 200;
-static int DB = 0;
-static int MinVertexCount = 0, MaxVertexCount = 1000;
-static int Count = 0;
-
-struct vertex
-{
- int type;
- float v[4];
-};
-
-static int BufferSize = 10000;
-static struct vertex *Vbuffer = NULL;
-static int Vcount, Vprim;
-
-enum {
- BEGIN,
- END,
- VERTEX2,
- VERTEX3,
- VERTEX4,
- COLOR3,
- COLOR4,
- TEX2,
- TEX3,
- TEX4,
- SECCOLOR3,
- NORMAL3
-};
-
-
-
-/**
- * This can be called from within gdb after a crash:
- * (gdb) call ReportState()
- */
-static void
-ReportState(void)
-{
- static const struct {
- GLenum token;
- char *str;
- GLenum type;
- } state [] = {
- { GL_ALPHA_TEST, "GL_ALPHA_TEST", GL_INT },
- { GL_BLEND, "GL_BLEND", GL_INT },
- { GL_CLIP_PLANE0, "GL_CLIP_PLANE0", GL_INT },
- { GL_DEPTH_TEST, "GL_DEPTH_TEST", GL_INT },
- { GL_LIGHTING, "GL_LIGHTING", GL_INT },
- { GL_LINE_WIDTH, "GL_LINE_WIDTH", GL_FLOAT },
- { GL_POINT_SIZE, "GL_POINT_SIZE", GL_FLOAT },
- { GL_SHADE_MODEL, "GL_SHADE_MODEL", GL_INT },
- { GL_SCISSOR_TEST, "GL_SCISSOR_TEST", GL_INT },
- { 0, NULL, 0 }
- };
-
- GLint i;
-
- for (i = 0; state[i].token; i++) {
- if (state[i].type == GL_INT) {
- GLint v;
- glGetIntegerv(state[i].token, &v);
- printf("%s = %d\n", state[i].str, v);
- }
- else {
- GLfloat v;
- glGetFloatv(state[i].token, &v);
- printf("%s = %f\n", state[i].str, v);
- }
- }
-}
-
-static void
-PrintVertex(const char *f, const struct vertex *v, int sz)
-{
- int i;
- printf("%s(", f);
- for (i = 0; i < sz; i++) {
- printf("%g%s", v->v[i], (i == sz-1) ? "" : ", ");
- }
- printf(");\n");
-}
-
-/**
- * This can be called from within gdb after a crash:
- * (gdb) call ReportState()
- */
-static void
-LastPrim(void)
-{
- int i;
- for (i = 0; i < Vcount; i++) {
- switch (Vbuffer[i].type) {
- case BEGIN:
- printf("glBegin(%d);\n", (int) Vbuffer[i].v[0]);
- break;
- case END:
- printf("glEnd();\n");
- break;
- case VERTEX2:
- PrintVertex("glVertex2f", Vbuffer + i, 2);
- break;
- case VERTEX3:
- PrintVertex("glVertex3f", Vbuffer + i, 3);
- break;
- case VERTEX4:
- PrintVertex("glVertex4f", Vbuffer + i, 4);
- break;
- case COLOR3:
- PrintVertex("glColor3f", Vbuffer + i, 3);
- break;
- case COLOR4:
- PrintVertex("glColor4f", Vbuffer + i, 4);
- break;
- case TEX2:
- PrintVertex("glTexCoord2f", Vbuffer + i, 2);
- break;
- case TEX3:
- PrintVertex("glTexCoord3f", Vbuffer + i, 3);
- break;
- case TEX4:
- PrintVertex("glTexCoord4f", Vbuffer + i, 4);
- break;
- case SECCOLOR3:
- PrintVertex("glSecondaryColor3f", Vbuffer + i, 3);
- break;
- case NORMAL3:
- PrintVertex("glNormal3f", Vbuffer + i, 3);
- break;
- default:
- abort();
- }
- }
-}
-
-
-static int
-RandomInt(int max)
-{
- if (max == 0)
- return 0;
- return rand() % max;
-}
-
-static float
-RandomFloat(float min, float max)
-{
- int k = rand() % 10000;
- float x = min + (max - min) * k / 10000.0;
- return x;
-}
-
-/*
- * Return true if random number in [0,1] is <= percentile.
- */
-static GLboolean
-RandomChoice(float percentile)
-{
- return RandomFloat(0.0, 1.0) <= percentile;
-}
-
-static void
-RandomStateChange(void)
-{
- int k = RandomInt(19);
- switch (k) {
- case 0:
- glEnable(GL_BLEND);
- break;
- case 1:
- glDisable(GL_BLEND);
- break;
- case 2:
- glEnable(GL_ALPHA_TEST);
- break;
- case 3:
- glEnable(GL_ALPHA_TEST);
- break;
- case 4:
- glEnable(GL_DEPTH_TEST);
- break;
- case 5:
- glEnable(GL_DEPTH_TEST);
- break;
- case 6:
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- break;
- case 7:
- glPointSize(10.0);
- break;
- case 8:
- glPointSize(1.0);
- break;
- case 9:
- glLineWidth(10.0);
- break;
- case 10:
- glLineWidth(1.0);
- break;
- case 11:
- glEnable(GL_LIGHTING);
- break;
- case 12:
- glDisable(GL_LIGHTING);
- break;
- case 13:
- glEnable(GL_SCISSOR_TEST);
- break;
- case 14:
- glDisable(GL_SCISSOR_TEST);
- break;
- case 15:
- glEnable(GL_CLIP_PLANE0);
- break;
- case 16:
- glDisable(GL_CLIP_PLANE0);
- break;
- case 17:
- glShadeModel(GL_FLAT);
- break;
- case 18:
- glShadeModel(GL_SMOOTH);
- break;
- }
-}
-
-
-static void
-RandomPrimitive(void)
-{
- int i;
- int len = MinVertexCount + RandomInt(MaxVertexCount - MinVertexCount);
-
- Vprim = RandomInt(10);
-
- glBegin(Vprim);
- Vbuffer[Vcount].type = BEGIN;
- Vbuffer[Vcount].v[0] = Vprim;
- Vcount++;
-
- for (i = 0; i < len; i++) {
- Vbuffer[Vcount].v[0] = RandomFloat(-3, 3);
- Vbuffer[Vcount].v[1] = RandomFloat(-3, 3);
- Vbuffer[Vcount].v[2] = RandomFloat(-3, 3);
- Vbuffer[Vcount].v[3] = RandomFloat(-3, 3);
- int k = RandomInt(9);
- switch (k) {
- case 0:
- glVertex2fv(Vbuffer[Vcount].v);
- Vbuffer[Vcount].type = VERTEX2;
- break;
- case 1:
- glVertex3fv(Vbuffer[Vcount].v);
- Vbuffer[Vcount].type = VERTEX3;
- break;
- case 2:
- glVertex4fv(Vbuffer[Vcount].v);
- Vbuffer[Vcount].type = VERTEX4;
- break;
- case 3:
- glColor3fv(Vbuffer[Vcount].v);
- Vbuffer[Vcount].type = COLOR3;
- break;
- case 4:
- glColor4fv(Vbuffer[Vcount].v);
- Vbuffer[Vcount].type = COLOR4;
- break;
- case 5:
- glTexCoord2fv(Vbuffer[Vcount].v);
- Vbuffer[Vcount].type = TEX2;
- break;
- case 6:
- glTexCoord3fv(Vbuffer[Vcount].v);
- Vbuffer[Vcount].type = TEX3;
- break;
- case 7:
- glTexCoord4fv(Vbuffer[Vcount].v);
- Vbuffer[Vcount].type = TEX4;
- break;
- case 8:
- glSecondaryColor3fv(Vbuffer[Vcount].v);
- Vbuffer[Vcount].type = SECCOLOR3;
- break;
- case 9:
- glNormal3fv(Vbuffer[Vcount].v);
- Vbuffer[Vcount].type = NORMAL3;
- break;
- default:
- abort();
- }
- Vcount++;
-
- if (Vcount >= BufferSize - 2) {
- /* reset */
- Vcount = 0;
- }
- }
-
- Vbuffer[Vcount++].type = END;
-
- glEnd();
-}
-
-
-static void
-RandomDraw(void)
-{
- int i;
- GLboolean dlist = RandomChoice(0.1);
- if (dlist)
- glNewList(1, GL_COMPILE);
- for (i = 0; i < 3; i++) {
- RandomStateChange();
- }
- RandomPrimitive();
-
- if (dlist) {
- glEndList();
- glCallList(1);
- }
-}
-
-
-static void
-Idle(void)
-{
- glutPostRedisplay();
-}
-
-
-static void
-Draw(void)
-{
-#if 1
- RandomDraw();
- Count++;
-#else
- /* cut & paste temp code here */
-#endif
-
- assert(glGetError() == 0);
-
- if (DB)
- glutSwapBuffers();
- else
- glFinish();
-}
-
-
-static void
-Reshape(int width, int height)
-{
- Width = width;
- Height = height;
- glViewport(0, 0, width, height);
- glScissor(20, 20, Width-40, Height-40);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 25.0);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- glTranslatef(0.0, 0.0, -15.0);
-}
-
-
-static void
-Key(unsigned char key, int x, int y)
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- glutDestroyWindow(Win);
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void
-Init(void)
-{
- static const GLdouble plane[4] = {1, 1, 0, 0};
- glDrawBuffer(GL_FRONT);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- glEnable(GL_LIGHT0);
- glClipPlane(GL_CLIP_PLANE0, plane);
-
- Vbuffer = (struct vertex *)
- malloc(BufferSize * sizeof(struct vertex));
-
- /* silence warnings */
- (void) ReportState;
- (void) LastPrim;
-}
-
-
-static void
-ParseArgs(int argc, char *argv[])
-{
- int i;
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-s") == 0) {
- int j = atoi(argv[i + 1]);
- printf("Random seed value: %d\n", j);
- srand(j);
- i++;
- }
- else if (strcmp(argv[i], "-a") == 0) {
- i++;
- MinVertexCount = atoi(argv[i]);
- }
- else if (strcmp(argv[i], "-b") == 0) {
- i++;
- MaxVertexCount = atoi(argv[i]);
- }
- }
-}
-
-
-int
-main(int argc, char *argv[])
-{
- glutInit(&argc, argv);
- glutInitWindowPosition(0, 0);
- glutInitWindowSize(Width, Height);
- glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
- Win = glutCreateWindow(argv[0]);
- ParseArgs(argc, argv);
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- if (Anim)
- glutIdleFunc(Idle);
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/readrate.c b/progs/tests/readrate.c
deleted file mode 100644
index 42ae62d48a..0000000000
--- a/progs/tests/readrate.c
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
- * Test glReadPixels speed
- * Brian Paul
- * 9 April 2004
- *
- * Compile:
- * gcc readrate.c -L/usr/X11R6/lib -lglut -lGLU -lGL -lX11 -o readrate
- */
-
-#define GL_GLEXT_PROTOTYPES
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <GL/glut.h>
-
-/* Hack, to test drawing instead of reading */
-#define DRAW 0
-
-#define MAX_WIDTH 1280
-#define MAX_HEIGHT 1024
-
-#define NUM_WIDTHS 4
-#define NUM_HEIGHTS 4
-static const GLint Widths[] = {256, 512, 1024, 1280};
-static const GLint Heights[] = {4, 32, 256, 512, 768, 1024};
-static int WidthIndex = 1, HeightIndex = 3;
-static GLubyte *Buffer = NULL;
-static GLboolean Benchmark = GL_TRUE;
-
-#define NUM_PBO 2
-
-static GLuint PBObjects[4];
-
-static GLboolean HavePBO = GL_FALSE;
-
-
-struct format_type {
- const char *Name;
- GLuint Bytes;
- GLenum Format;
- GLenum Type;
-};
-
-static struct format_type Formats[] = {
- { "GL_RGB, GLubyte", 3, GL_RGB, GL_UNSIGNED_BYTE },
- { "GL_BGR, GLubyte", 3, GL_BGR, GL_UNSIGNED_BYTE },
- { "GL_RGBA, GLubyte", 4, GL_RGBA, GL_UNSIGNED_BYTE },
- { "GL_BGRA, GLubyte", 4, GL_BGRA, GL_UNSIGNED_BYTE },
- { "GL_ABGR, GLubyte", 4, GL_ABGR_EXT, GL_UNSIGNED_BYTE },
- { "GL_RGBA, GLuint_8_8_8_8", 4, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8 },
- { "GL_BGRA, GLuint_8_8_8_8", 4, GL_BGRA_EXT, GL_UNSIGNED_INT_8_8_8_8 },
- { "GL_BGRA, GLuint_8_8_8_8_rev", 4, GL_BGRA_EXT, GL_UNSIGNED_INT_8_8_8_8_REV },
-#ifdef GL_EXT_packed_depth_stencil
- { "GL_DEPTH_STENCIL_EXT, GLuint24+8", 4, GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT_24_8_EXT },
-#endif
- { "GL_DEPTH_COMPONENT, GLfloat", 4, GL_DEPTH_COMPONENT, GL_FLOAT },
- { "GL_DEPTH_COMPONENT, GLuint", 4, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT }
-};
-
-#define NUM_FORMATS (sizeof(Formats) / sizeof(struct format_type))
-
-
-static void
-PrintString(const char *s)
-{
- while (*s) {
- glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int) *s);
- s++;
- }
-}
-
-
-static void
-MeasureFormat(struct format_type *fmt, GLint width, GLint height, GLuint pbo)
-{
- double t0 = glutGet(GLUT_ELAPSED_TIME) * 0.001;
- double t1;
- int j;
-
- for (j = 0; ; j++) {
-
- glBegin(GL_POINTS);
- glVertex2f(1,1);
- glEnd();
-
-#if DRAW
- glWindowPos2iARB(0,0);
- glDrawPixels(width, height,
- fmt->Format, fmt->Type, Buffer);
- glFinish();
-#else
- if (pbo) {
- glBindBufferARB(GL_PIXEL_PACK_BUFFER_EXT, PBObjects[j % NUM_PBO]);
- glReadPixels(0, 0, width, height,
- fmt->Format, fmt->Type, 0);
- }
- else {
- glReadPixels(0, 0, width, height,
- fmt->Format, fmt->Type, Buffer);
- }
-#endif
-
- t1 = glutGet(GLUT_ELAPSED_TIME) * 0.001;
- if (t1 - t0 > 2.0) {
- GLdouble rate = width * height / (1024.0 * 1024.0) * j / (t1 - t0);
-#if DRAW
- printf("%-32s %.2f draws/sec %.2f MPixels/sec %.2f MBytes/sec\n",
- fmt->Name, j / (t1-t0), rate, rate * fmt->Bytes);
-#else
- printf("%-32s %.2f reads/sec %.2f MPixels/sec %.2f MBytes/sec\n",
- fmt->Name, j / (t1-t0), rate, rate * fmt->Bytes);
-#endif
- break;
- }
-
- if (j == 0) {
- /* check for error */
- GLenum err = glGetError();
- if (err) {
- printf("GL Error 0x%x for %s\n", err, fmt->Name);
- return;
- }
- }
- }
-}
-
-
-
-static void
-Draw(void)
-{
- char str[1000];
- int width = Widths[WidthIndex];
- int height = Heights[HeightIndex];
- int y = MAX_HEIGHT - 50;
-
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- glWindowPos2iARB(10, y);
- sprintf(str, "ReadPixels size: %d x %d", width, height);
- PrintString(str);
- y -= 14;
-
- glWindowPos2iARB(10, y);
- PrintString("Press up/down/left/right to change image size.");
- y -= 14;
-
- glWindowPos2iARB(10, y);
- PrintString("Press 'b' to run benchmark test.");
- y -= 14;
-
- if (Benchmark) {
- glWindowPos2iARB(10, y);
- PrintString("Testing...");
- }
-
- glutSwapBuffers();
-
- if (Benchmark) {
- GLuint i, pbo;
-#if DRAW
- printf("Draw size: Width=%d Height=%d\n", width, height);
-#else
- printf("Read size: Width=%d Height=%d\n", width, height);
-#endif
- for (pbo = 0; pbo <= HavePBO; pbo++) {
- printf("Pixel Buffer Object: %d\n", pbo);
-
- if (pbo == 0) {
- glBindBufferARB(GL_PIXEL_PACK_BUFFER_EXT, 0);
- }
-
- for (i = 0; i < NUM_FORMATS; i++) {
- MeasureFormat(Formats + i, width, height, pbo);
- }
- }
-
- Benchmark = GL_FALSE;
-
- /* redraw window text */
- glutPostRedisplay();
- }
-
-}
-
-
-static void
-Reshape(int width, int height)
-{
- glViewport(0, 0, width, height);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1, 1, -1, 1, -1, 1);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
-}
-
-
-static void
-Key(unsigned char key, int x, int y)
-{
- (void) x;
- (void) y;
- switch (key) {
- case 'b':
- Benchmark = 1;
- break;
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void
-SpecialKey(int key, int x, int y)
-{
- (void) x;
- (void) y;
- switch (key) {
- case GLUT_KEY_UP:
- if (HeightIndex + 1 < NUM_WIDTHS)
- HeightIndex++;
- break;
- case GLUT_KEY_DOWN:
- if (HeightIndex > 0)
- HeightIndex--;
- break;
- case GLUT_KEY_LEFT:
- if (WidthIndex > 0)
- WidthIndex--;
- break;
- case GLUT_KEY_RIGHT:
- if (WidthIndex + 1 < NUM_HEIGHTS)
- WidthIndex++;
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void
-Init(void)
-{
- Buffer = malloc(MAX_WIDTH * MAX_HEIGHT * 4);
- assert(Buffer);
-#if DRAW
- printf("glDrawPixels test report:\n");
-#else
- printf("glReadPixels test report:\n");
-#endif
- printf("GL_RENDERER: %s\n", (char *) glGetString(GL_RENDERER));
- printf("GL_VERSION: %s\n", (char *) glGetString(GL_VERSION));
-
- if (glutExtensionSupported("GL_ARB_pixel_buffer_object")) {
- int i;
- HavePBO = 1;
- glGenBuffersARB(NUM_PBO, PBObjects);
- for (i = 0; i < NUM_PBO; i++) {
- glBindBufferARB(GL_PIXEL_PACK_BUFFER_EXT, PBObjects[i]);
- glBufferDataARB(GL_PIXEL_PACK_BUFFER_EXT,
- MAX_WIDTH * MAX_HEIGHT * 4, NULL, GL_STREAM_READ);
- }
- }
-}
-
-
-int
-main(int argc, char *argv[])
-{
- glutInit(&argc, argv);
- glutInitWindowPosition(0, 0);
- glutInitWindowSize(MAX_WIDTH, MAX_HEIGHT);
- glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL);
- glutCreateWindow(argv[0]);
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutSpecialFunc(SpecialKey);
- glutDisplayFunc(Draw);
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/seccolor.c b/progs/tests/seccolor.c
deleted file mode 100644
index 77fd40647b..0000000000
--- a/progs/tests/seccolor.c
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Exercise GL_EXT_secondary_color
- */
-
-
-#define GL_GLEXT_PROTOTYPES
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <GL/glut.h>
-
-static int Width = 600;
-static int Height = 200;
-static GLfloat Near = 5.0, Far = 25.0;
-
-
-static void Display( void )
-{
- GLfloat t;
-
- glClearColor(0.2, 0.2, 0.8, 0);
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- for (t = 0.0; t <= 1.0; t += 0.25) {
- GLfloat x = t * 10.0 - 5.0;
- GLfloat g = t;
-
- /* top row: untextured */
- glColor3f(1, 0, 0);
- glPushMatrix();
- glTranslatef(x, 1.2, 0);
-#if defined(GL_EXT_secondary_color)
- glSecondaryColor3fEXT(0, g, 0);
-#endif
- glBegin(GL_POLYGON);
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- glEnd();
- glPopMatrix();
-
- /* bottom row: textured */
- glColor3f(1, 1, 1);
- glEnable(GL_TEXTURE_2D);
- glPushMatrix();
- glTranslatef(x, -1.2, 0);
-#if defined(GL_EXT_secondary_color)
- glSecondaryColor3fEXT(0, g, 0);
-#endif
- glBegin(GL_POLYGON);
- glTexCoord2f(0, 0); glVertex2f(-1, -1);
- glTexCoord2f(1, 0); glVertex2f( 1, -1);
- glTexCoord2f(1, 1); glVertex2f( 1, 1);
- glTexCoord2f(0, 1); glVertex2f(-1, 1);
- glEnd();
- glPopMatrix();
- glDisable(GL_TEXTURE_2D);
- }
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- GLfloat ar = (float) width / (float) height;
- Width = width;
- Height = height;
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -ar, ar, -1.0, 1.0, Near, Far );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -15.0 );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void Init( void )
-{
- GLubyte image[4*4][3];
- GLint i;
- if (!glutExtensionSupported("GL_EXT_secondary_color")) {
- printf("Sorry, this program requires GL_EXT_secondary_color\n");
- exit(1);
- }
-
- /* setup red texture with one back texel */
- for (i = 0; i < 4*4; i++) {
- if (i == 0) {
- image[i][0] = 0;
- image[i][1] = 0;
- image[i][2] = 0;
- }
- else {
- image[i][0] = 255;
- image[i][1] = 0;
- image[i][2] = 0;
- }
- }
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 4, 4, 0,
- GL_RGB, GL_UNSIGNED_BYTE, image);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
-
-#if defined(GL_EXT_secondary_color)
- glEnable(GL_COLOR_SUM_EXT);
-#endif
- glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR);
-
- printf("Squares should be colored from red -> orange -> yellow.\n");
- printf("Top row is untextured.\n");
- printf("Bottom row is textured (red texture with one black texel).\n");
- printf("Rows should be identical, except for lower-left texel.\n");
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( Width, Height );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/shader_api.c b/progs/tests/shader_api.c
deleted file mode 100644
index 598f029a97..0000000000
--- a/progs/tests/shader_api.c
+++ /dev/null
@@ -1,337 +0,0 @@
-/* Tests to validate fixes to various bugs in src/mesa/shader/shader_api.c
- *
- * Written by Bruce Merry
- */
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-static void assert_test(const char *file, int line, int cond, const char *msg)
-{
- if (!cond)
- fprintf(stderr, "%s:%d assertion \"%s\" failed\n", file, line, msg);
-}
-
-#undef assert
-#define assert(x) assert_test(__FILE__, __LINE__, (x), #x)
-
-static void assert_no_error_test(const char *file, int line)
-{
- GLenum err;
-
- err = glGetError();
- if (err != GL_NO_ERROR)
- fprintf(stderr, "%s:%d received error %s\n",
- file, line, gluErrorString(err));
-}
-
-#define assert_no_error() assert_no_error_test(__FILE__, __LINE__)
-
-static void assert_error_test(const char *file, int line, GLenum expect)
-{
- GLenum err;
-
- err = glGetError();
- if (err != expect)
- fprintf(stderr, "%s:%d expected %s but received %s\n",
- file, line, gluErrorString(expect), gluErrorString(err));
- while (glGetError()); /* consume any following errors */
-}
-
-#define assert_error(err) assert_error_test(__FILE__, __LINE__, (err))
-
-static void check_status(GLuint id, GLenum pname, void (*query)(GLuint, GLenum, GLint *))
-{
- GLint status;
-
- query(id, pname, &status);
- if (!status)
- {
- char info[65536];
-
- fprintf(stderr, "Compilation/link failure:\n");
- glGetInfoLogARB(id, sizeof(info), NULL, info);
- fprintf(stderr, "%s\n", info);
- exit(1);
- }
-}
-
-static void check_compile_status(GLuint id)
-{
- check_status(id, GL_COMPILE_STATUS, glGetShaderiv);
-}
-
-static void check_link_status(GLuint id)
-{
- check_status(id, GL_LINK_STATUS, glGetProgramiv);
-}
-
-static GLuint make_shader(GLenum type, const char *src)
-{
- GLuint id;
-
- assert_no_error();
- id = glCreateShader(type);
- glShaderSource(id, 1, &src, NULL);
- glCompileShader(id);
- check_compile_status(id);
- assert_no_error();
- return id;
-}
-
-static GLuint make_program(const char *vs_src, const char *fs_src)
-{
- GLuint id, vs, fs;
-
- assert_no_error();
- id = glCreateProgram();
- if (vs_src) {
- vs = make_shader(GL_VERTEX_SHADER, vs_src);
- glAttachShader(id, vs);
- glDeleteShader(vs);
- }
- if (fs_src) {
- fs = make_shader(GL_FRAGMENT_SHADER, fs_src);
- glAttachShader(id, fs);
- glDeleteShader(fs);
- }
- glLinkProgram(id);
- check_link_status(id);
- glUseProgram(id);
- glDeleteProgram(id);
- assert_no_error();
- return id;
-}
-
-static void test_uniform_size_type1(const char *glslType, GLenum glType, const char *el)
-{
- char buffer[1024];
- GLuint program;
- GLint active, i;
- GLenum type;
- GLint size;
-
- printf(" Running subtest %s\n", glslType); fflush(stdout);
- sprintf(buffer, "#version 120\nuniform %s m[60];\nvoid main() { gl_Position[0] = m[59]%s; }\n",
- glslType, el);
-
- program = make_program(buffer, NULL);
- glGetProgramiv(program, GL_ACTIVE_UNIFORMS, &active);
- assert_no_error();
- for (i = 0; i < active; i++) {
- size = -1;
- type = 0;
- glGetActiveUniform(program, i, sizeof(buffer), NULL, &size, &type, buffer);
- assert_no_error();
- if (strncmp(buffer, "m", 1) == 0)
- break;
- }
- assert(i < active); /* Otherwise the compiler optimised it out */
- assert(type == glType);
- assert(size == 60);
-}
-
-static void test_uniform_size_type(void)
-{
- test_uniform_size_type1("float", GL_FLOAT, "");
- test_uniform_size_type1("vec2", GL_FLOAT_VEC2, "[0]");
- test_uniform_size_type1("vec3", GL_FLOAT_VEC3, "[0]");
- test_uniform_size_type1("vec4", GL_FLOAT_VEC4, "[0]");
-
- test_uniform_size_type1("bool", GL_BOOL, " ? 1.0 : 0.0");
- test_uniform_size_type1("bvec2", GL_BOOL_VEC2, "[0] ? 1.0 : 0.0");
- test_uniform_size_type1("bvec3", GL_BOOL_VEC3, "[0] ? 1.0 : 0.0");
- test_uniform_size_type1("bvec4", GL_BOOL_VEC4, "[0] ? 1.0 : 0.0");
-
- test_uniform_size_type1("int", GL_INT, "");
- test_uniform_size_type1("ivec2", GL_INT_VEC2, "[0]");
- test_uniform_size_type1("ivec3", GL_INT_VEC3, "[0]");
- test_uniform_size_type1("ivec4", GL_INT_VEC4, "[0]");
-
- test_uniform_size_type1("mat2", GL_FLOAT_MAT2, "[0][0]");
- test_uniform_size_type1("mat3", GL_FLOAT_MAT3, "[0][0]");
- test_uniform_size_type1("mat4", GL_FLOAT_MAT4, "[0][0]");
- test_uniform_size_type1("mat2x3", GL_FLOAT_MAT2x3, "[0][0]");
- test_uniform_size_type1("mat2x4", GL_FLOAT_MAT2x4, "[0][0]");
- test_uniform_size_type1("mat3x2", GL_FLOAT_MAT3x2, "[0][0]");
- test_uniform_size_type1("mat3x4", GL_FLOAT_MAT3x4, "[0][0]");
- test_uniform_size_type1("mat4x2", GL_FLOAT_MAT4x2, "[0][0]");
- test_uniform_size_type1("mat4x3", GL_FLOAT_MAT4x3, "[0][0]");
-}
-
-static void test_attrib_size_type1(const char *glslType, GLenum glType, const char *el)
-{
- char buffer[1024];
- GLuint program;
- GLint active, i;
- GLenum type;
- GLint size;
-
- printf(" Running subtest %s\n", glslType); fflush(stdout);
- sprintf(buffer, "#version 120\nattribute %s m;\nvoid main() { gl_Position[0] = m%s; }\n",
- glslType, el);
-
- program = make_program(buffer, NULL);
- glGetProgramiv(program, GL_ACTIVE_ATTRIBUTES, &active);
- assert_no_error();
- for (i = 0; i < active; i++) {
- size = -1;
- type = -1;
- glGetActiveAttrib(program, i, sizeof(buffer), NULL, &size, &type, buffer);
- assert_no_error();
- if (strncmp(buffer, "m", 1) == 0)
- break;
- }
- assert(i < active); /* Otherwise the compiler optimised it out */
- assert(type == glType);
- assert(size == 1);
-}
-
-static void test_attrib_size_type(void)
-{
- test_attrib_size_type1("float", GL_FLOAT, "");
- test_attrib_size_type1("vec2", GL_FLOAT_VEC2, "[0]");
- test_attrib_size_type1("vec3", GL_FLOAT_VEC3, "[0]");
- test_attrib_size_type1("vec4", GL_FLOAT_VEC4, "[0]");
-
- test_attrib_size_type1("mat2", GL_FLOAT_MAT2, "[0][0]");
- test_attrib_size_type1("mat3", GL_FLOAT_MAT3, "[0][0]");
- test_attrib_size_type1("mat4", GL_FLOAT_MAT4, "[0][0]");
- test_attrib_size_type1("mat2x3", GL_FLOAT_MAT2x3, "[0][0]");
- test_attrib_size_type1("mat2x4", GL_FLOAT_MAT2x4, "[0][0]");
- test_attrib_size_type1("mat3x2", GL_FLOAT_MAT3x2, "[0][0]");
- test_attrib_size_type1("mat3x4", GL_FLOAT_MAT3x4, "[0][0]");
- test_attrib_size_type1("mat4x2", GL_FLOAT_MAT4x2, "[0][0]");
- test_attrib_size_type1("mat4x3", GL_FLOAT_MAT4x3, "[0][0]");
-}
-
-static void test_uniform_array_overflow(void)
-{
- GLuint program;
- GLint location;
- GLfloat data[128];
-
- program = make_program("#version 120\nuniform vec2 x[10];\nvoid main() { gl_Position.xy = x[9]; }\n", NULL);
- location = glGetUniformLocation(program, "x");
- assert_no_error();
- glUniform2fv(location, 64, data);
- assert_no_error();
-}
-
-static void test_uniform_scalar_count(void)
-{
- GLuint program;
- GLint location;
- GLfloat data[128];
-
- program = make_program("#version 110\nuniform vec2 x;\nvoid main() { gl_Position.xy = x; }\n", NULL);
- location = glGetUniformLocation(program, "x");
- assert_no_error();
- glUniform2fv(location, 64, data);
- assert_error(GL_INVALID_OPERATION);
-}
-
-static void test_uniform_query_matrix(void)
-{
- GLuint program;
- GLfloat data[18];
- GLint i, r, c;
- GLint location;
-
- program = make_program("#version 110\nuniform mat3 m[2];\nvoid main() { gl_Position.xyz = m[1][2]; }\n", NULL);
- location = glGetUniformLocation(program, "m");
- for (i = 0; i < 9; i++)
- data[i] = i;
- for (i = 9; i < 18; i++)
- data[i] = 321.0;
- glUniformMatrix3fv(location, 1, GL_TRUE, data);
-
- for (i = 0; i < 18; i++)
- data[i] = 123.0;
- glGetUniformfv(program, location, data);
- for (c = 0; c < 3; c++)
- for (r = 0; r < 3; r++)
- assert(data[c * 3 + r] == r * 3 + c);
- for (i = 9; i < 18; i++)
- assert(data[i] == 123.0);
-}
-
-static void test_uniform_neg_location(void)
-{
- GLuint program;
- GLfloat data[4];
-
- program = make_program("#version 110\nvoid main() { gl_Position = vec4(1.0, 1.0, 1.0, 1.0); }\n", NULL);
- assert_no_error();
- glUniform1i(-1, 1);
- assert_no_error();
- glUniform1i(-200, 1);
- assert_error(GL_INVALID_OPERATION);
- glUniformMatrix2fv(-1, 1, GL_FALSE, data);
- assert_no_error();
- glUniformMatrix2fv(-200, 1, GL_FALSE, data);
- assert_error(GL_INVALID_OPERATION);
-}
-
-static void test_uniform_bool_conversion(void)
-{
- GLuint program;
- GLint location;
- GLint value[16]; /* in case glGetUniformiv goes nuts on the stack */
-
- assert_no_error();
- program = make_program("uniform bool b;\nvoid main() { gl_Position.x = b ? 1.5 : 0.5; }\n", NULL);
- location = glGetUniformLocation(program, "b");
- assert(location != -1);
- assert_no_error();
- glUniform1i(location, 5);
- assert_no_error();
- glGetUniformiv(program, location, &value[0]);
- assert_no_error();
- assert(value[0] == 1);
-}
-
-static void test_uniform_multiple_samplers(void)
-{
- GLuint program;
- GLint location;
- GLint values[2] = {0, 1};
-
- assert_no_error();
- program = make_program(NULL, "uniform sampler2D s[2];\nvoid main() { gl_FragColor = texture2D(s[1], vec2(0.0, 0.0)); }\n");
- location = glGetUniformLocation(program, "s[0]");
- if (location == -1) /* Mesa doesn't currently support indexing */
- location = glGetUniformLocation(program, "s");
- assert(location != -1);
- assert_no_error();
- glUniform1iv(location, 2, values);
- assert_no_error();
-}
-
-static void run_test(const char *name, void (*callback)(void))
-{
- printf("Running %s\n", name);
- fflush(stdout);
- callback();
-}
-
-#define RUN_TEST(name) run_test(#name, (name))
-
-int main(int argc, char **argv)
-{
- glutInit(&argc, argv);
- glutCreateWindow("Mesa bug demo");
-
- RUN_TEST(test_uniform_size_type);
- RUN_TEST(test_attrib_size_type);
- RUN_TEST(test_uniform_array_overflow);
- RUN_TEST(test_uniform_scalar_count);
- RUN_TEST(test_uniform_query_matrix);
- RUN_TEST(test_uniform_neg_location);
- RUN_TEST(test_uniform_bool_conversion);
- /* Leave this one at the end, since it crashes Mesa's shader compiler */
- RUN_TEST(test_uniform_multiple_samplers);
- return 0;
-}
diff --git a/progs/tests/sharedtex.c b/progs/tests/sharedtex.c
deleted file mode 100644
index 7be90d67f5..0000000000
--- a/progs/tests/sharedtex.c
+++ /dev/null
@@ -1,440 +0,0 @@
-/* $Id: sharedtex.c,v 1.2 2002/01/16 14:32:46 joukj Exp $ */
-
-/*
- * Test sharing of display lists and texture objects between GLX contests.
- * Brian Paul
- * Summer 2000
- *
- *
- * Copyright (C) 2000 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.
- */
-
-
-#include <GL/gl.h>
-#include <GL/glx.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-
-
-struct window {
- char DisplayName[1000];
- Display *Dpy;
- Window Win;
- GLXContext Context;
- float Angle;
- int Id;
-};
-
-
-#define MAX_WINDOWS 20
-static struct window Windows[MAX_WINDOWS];
-static int NumWindows = 0;
-
-
-static GLuint Textures[3];
-static GLuint CubeList;
-
-
-
-static void
-Error(const char *display, const char *msg)
-{
- fprintf(stderr, "Error on display %s - %s\n", display, msg);
- exit(1);
-}
-
-
-static struct window *
-AddWindow(const char *displayName, int xpos, int ypos,
- const struct window *shareWindow)
-{
- Display *dpy;
- Window win;
- GLXContext ctx;
- int attrib[] = { GLX_RGBA,
- GLX_RED_SIZE, 1,
- GLX_GREEN_SIZE, 1,
- GLX_BLUE_SIZE, 1,
- GLX_DOUBLEBUFFER,
- GLX_DEPTH_SIZE, 1,
- None };
- int scrnum;
- XSetWindowAttributes attr;
- unsigned long mask;
- Window root;
- XVisualInfo *visinfo;
- int width = 300, height = 300;
-
- if (NumWindows >= MAX_WINDOWS)
- return NULL;
-
- dpy = XOpenDisplay(displayName);
- if (!dpy) {
- Error(displayName, "Unable to open display");
- return NULL;
- }
-
- scrnum = DefaultScreen(dpy);
- root = RootWindow(dpy, scrnum);
-
- visinfo = glXChooseVisual(dpy, scrnum, attrib);
- if (!visinfo) {
- Error(displayName, "Unable to find RGB, double-buffered visual");
- return NULL;
- }
-
- /* window attributes */
- attr.background_pixel = 0;
- attr.border_pixel = 0;
- attr.colormap = XCreateColormap(dpy, root, visinfo->visual, AllocNone);
- attr.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask;
- mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask;
-
- win = XCreateWindow(dpy, root, xpos, ypos, width, height,
- 0, visinfo->depth, InputOutput,
- visinfo->visual, mask, &attr);
- if (!win) {
- Error(displayName, "Couldn't create window");
- return NULL;
- }
-
- {
- XSizeHints sizehints;
- sizehints.x = xpos;
- sizehints.y = ypos;
- sizehints.width = width;
- sizehints.height = height;
- sizehints.flags = USSize | USPosition;
- XSetNormalHints(dpy, win, &sizehints);
- XSetStandardProperties(dpy, win, displayName, displayName,
- None, (char **)NULL, 0, &sizehints);
- }
-
-
- ctx = glXCreateContext(dpy, visinfo,
- shareWindow ? shareWindow->Context : NULL,
- True);
- if (!ctx) {
- Error(displayName, "Couldn't create GLX context");
- return NULL;
- }
-
- XMapWindow(dpy, win);
-
- if (!glXMakeCurrent(dpy, win, ctx)) {
- Error(displayName, "glXMakeCurrent failed");
- printf("glXMakeCurrent failed in Redraw()\n");
- return NULL;
- }
-
- /* save the info for this window */
- {
- static int id = 0;
- struct window *h = &Windows[NumWindows];
- strcpy(h->DisplayName, displayName);
- h->Dpy = dpy;
- h->Win = win;
- h->Context = ctx;
- h->Angle = 0.0;
- h->Id = id++;
- NumWindows++;
- return &Windows[NumWindows-1];
- }
-
-}
-
-
-static void
-InitGLstuff(struct window *h)
-{
- if (!glXMakeCurrent(h->Dpy, h->Win, h->Context)) {
- Error(h->DisplayName, "glXMakeCurrent failed in InitGLstuff");
- return;
- }
-
- glGenTextures(3, Textures);
-
- /* setup first texture object */
- {
- GLubyte image[16][16][4];
- GLint i, j;
- glBindTexture(GL_TEXTURE_2D, Textures[0]);
-
- /* red/white checkerboard */
- for (i = 0; i < 16; i++) {
- for (j = 0; j < 16; j++) {
- if ((i ^ j) & 1) {
- image[i][j][0] = 255;
- image[i][j][1] = 255;
- image[i][j][2] = 255;
- image[i][j][3] = 255;
- }
- else {
- image[i][j][0] = 255;
- image[i][j][1] = 0;
- image[i][j][2] = 0;
- image[i][j][3] = 255;
- }
- }
- }
-
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 16, 16, 0, GL_RGBA,
- GL_UNSIGNED_BYTE, image);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- }
-
- /* setup second texture object */
- {
- GLubyte image[8][8][3];
- GLint i, j;
- glBindTexture(GL_TEXTURE_2D, Textures[1]);
-
- /* green/yellow checkerboard */
- for (i = 0; i < 8; i++) {
- for (j = 0; j < 8; j++) {
- if ((i ^ j) & 1) {
- image[i][j][0] = 0;
- image[i][j][1] = 255;
- image[i][j][2] = 0;
- }
- else {
- image[i][j][0] = 255;
- image[i][j][1] = 255;
- image[i][j][2] = 0;
- }
- }
- }
-
- glPixelStorei(GL_UNPACK_ALIGNMENT, 2);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 8, 8, 0, GL_RGB,
- GL_UNSIGNED_BYTE, image);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- }
-
- /* setup second texture object */
- {
- GLubyte image[4][4][3];
- GLint i, j;
- glBindTexture(GL_TEXTURE_2D, Textures[2]);
-
- /* blue/gray checkerboard */
- for (i = 0; i < 4; i++) {
- for (j = 0; j < 4; j++) {
- if ((i ^ j) & 1) {
- image[i][j][0] = 0;
- image[i][j][1] = 0;
- image[i][j][2] = 255;
- }
- else {
- image[i][j][0] = 200;
- image[i][j][1] = 200;
- image[i][j][2] = 200;
- }
- }
- }
-
- glPixelStorei(GL_UNPACK_ALIGNMENT, 2);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 4, 4, 0, GL_RGB,
- GL_UNSIGNED_BYTE, image);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- }
-
- /* Now make the cube object display list */
- CubeList = glGenLists(1);
- glNewList(CubeList, GL_COMPILE);
- {
- glBindTexture(GL_TEXTURE_2D, Textures[0]);
- glBegin(GL_POLYGON);
- glTexCoord2f(0, 0); glVertex3f(-1, -1, -1);
- glTexCoord2f(1, 0); glVertex3f(-1, 1, -1);
- glTexCoord2f(1, 1); glVertex3f(-1, 1, 1);
- glTexCoord2f(0, 1); glVertex3f(-1, -1, 1);
- glEnd();
- glBegin(GL_POLYGON);
- glTexCoord2f(0, 0); glVertex3f(1, -1, -1);
- glTexCoord2f(1, 0); glVertex3f(1, 1, -1);
- glTexCoord2f(1, 1); glVertex3f(1, 1, 1);
- glTexCoord2f(0, 1); glVertex3f(1, -1, 1);
- glEnd();
-
- glBindTexture(GL_TEXTURE_2D, Textures[1]);
- glBegin(GL_POLYGON);
- glTexCoord2f(0, 0); glVertex3f(-1, -1, -1);
- glTexCoord2f(1, 0); glVertex3f( 1, -1, -1);
- glTexCoord2f(1, 1); glVertex3f( 1, -1, 1);
- glTexCoord2f(0, 1); glVertex3f(-1, -1, 1);
- glEnd();
- glBegin(GL_POLYGON);
- glTexCoord2f(0, 0); glVertex3f(-1, 1, -1);
- glTexCoord2f(1, 0); glVertex3f( 1, 1, -1);
- glTexCoord2f(1, 1); glVertex3f( 1, 1, 1);
- glTexCoord2f(0, 1); glVertex3f(-1, 1, 1);
- glEnd();
-
- glBindTexture(GL_TEXTURE_2D, Textures[2]);
- glBegin(GL_POLYGON);
- glTexCoord2f(0, 0); glVertex3f(-1, -1, -1);
- glTexCoord2f(1, 0); glVertex3f( 1, -1, -1);
- glTexCoord2f(1, 1); glVertex3f( 1, 1, -1);
- glTexCoord2f(0, 1); glVertex3f(-1, 1, -1);
- glEnd();
- glBegin(GL_POLYGON);
- glTexCoord2f(0, 0); glVertex3f(-1, -1, 1);
- glTexCoord2f(1, 0); glVertex3f( 1, -1, 1);
- glTexCoord2f(1, 1); glVertex3f( 1, 1, 1);
- glTexCoord2f(0, 1); glVertex3f(-1, 1, 1);
- glEnd();
- }
- glEndList();
-
- 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));
-}
-
-
-
-static void
-Redraw(struct window *h)
-{
- if (!glXMakeCurrent(h->Dpy, h->Win, h->Context)) {
- Error(h->DisplayName, "glXMakeCurrent failed");
- printf("glXMakeCurrent failed in Redraw()\n");
- return;
- }
-
- h->Angle += 1.0;
-
- glShadeModel(GL_FLAT);
- glClearColor(0.25, 0.25, 0.25, 1.0);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- glEnable(GL_TEXTURE_2D);
- glEnable(GL_DEPTH_TEST);
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
-
- glColor3f(1, 1, 1);
-
- glPushMatrix();
- if (h->Id == 0)
- glRotatef(h->Angle, 0, 1, -1);
- else if (h->Id == 1)
- glRotatef(-(h->Angle), 0, 1, -1);
- else if (h->Id == 2)
- glRotatef(h->Angle, 0, 1, 1);
- else if (h->Id == 3)
- glRotatef(-(h->Angle), 0, 1, 1);
- glCallList(CubeList);
- glPopMatrix();
-
- glXSwapBuffers(h->Dpy, h->Win);
-}
-
-
-
-static void
-Resize(const struct window *h, unsigned int width, unsigned int height)
-{
- if (!glXMakeCurrent(h->Dpy, h->Win, h->Context)) {
- Error(h->DisplayName, "glXMakeCurrent failed in Resize()");
- return;
- }
- glViewport(0, 0, width, height);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glFrustum(-1, 1, -1, 1, 2, 10);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- glTranslatef(0, 0, -4.5);
-}
-
-
-
-static void
-EventLoop(void)
-{
- while (1) {
- int i;
- for (i = 0; i < NumWindows; i++) {
- struct window *h = &Windows[i];
- while (XPending(h->Dpy) > 0) {
- XEvent event;
- XNextEvent(h->Dpy, &event);
- if (event.xany.window == h->Win) {
- switch (event.type) {
- case Expose:
- Redraw(h);
- break;
- case ConfigureNotify:
- Resize(h, event.xconfigure.width, event.xconfigure.height);
- break;
- case KeyPress:
- return;
- default:
- /*no-op*/ ;
- }
- }
- else {
- printf("window mismatch\n");
- }
- }
- Redraw(h);
- }
- usleep(1);
- }
-}
-
-
-#if 0
-static void
-PrintInfo(const struct window *h)
-{
- printf("Name: %s\n", h->DisplayName);
- printf(" Display: %p\n", (void *) h->Dpy);
- printf(" Window: 0x%x\n", (int) h->Win);
- printf(" Context: 0x%x\n", (int) h->Context);
-}
-#endif
-
-
-int
-main(int argc, char *argv[])
-{
- const char *dpyName = XDisplayName(NULL);
-
- struct window *h0, *h1, *h2, *h3;
-
- /* four windows and contexts sharing display lists and texture objects */
- h0 = AddWindow(dpyName, 10, 10, NULL);
- h1 = AddWindow(dpyName, 330, 10, h0);
- h2 = AddWindow(dpyName, 10, 350, h0);
- h3 = AddWindow(dpyName, 330, 350, h0);
-
- InitGLstuff(h0);
-
- EventLoop();
- return 0;
-}
diff --git a/progs/tests/stencil_twoside.c b/progs/tests/stencil_twoside.c
deleted file mode 100644
index be9d9a776a..0000000000
--- a/progs/tests/stencil_twoside.c
+++ /dev/null
@@ -1,299 +0,0 @@
-/*
- * (C) Copyright IBM Corporation 2004
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, and/or sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file stencil_twoside.c
- *
- * Simple test of GL_ATI_separate_stencil (or the OGL 2.0 equivalent) functionality.
- * Four squares are drawn
- * with different stencil modes, but all should be rendered with the same
- * final color.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-static int use20syntax = 1;
-static int Width = 550;
-static int Height = 200;
-static const GLfloat Near = 5.0, Far = 25.0;
-
-
-static PFNGLSTENCILFUNCSEPARATEPROC stencil_func_separate = NULL;
-static PFNGLSTENCILFUNCSEPARATEATIPROC stencil_func_separate_ati = NULL;
-static PFNGLSTENCILOPSEPARATEPROC stencil_op_separate = NULL;
-
-static void Display( void )
-{
- GLint max_stencil;
- GLint stencil_bits;
- unsigned i;
-
-
- glGetIntegerv( GL_STENCIL_BITS, & stencil_bits );
- max_stencil = (1U << stencil_bits) - 1;
- printf( "Stencil bits = %u, maximum stencil value = 0x%08x\n",
- stencil_bits, max_stencil );
-
- glClearStencil( 1 );
- glClearColor( 0.2, 0.2, 0.8, 0 );
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT
- | GL_STENCIL_BUFFER_BIT );
-
-
- glPushMatrix();
-
- /* This is the "reference" square.
- */
-
- glDisable(GL_STENCIL_TEST);
- glTranslatef(-6.0, 0, 0);
- glBegin(GL_QUADS);
- glColor3f( 0.5, 0.5, 0.5 );
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- glEnd();
-
-
- glEnable(GL_STENCIL_TEST);
-
- /* Draw the first two squares using incr for the affected face
- */
-
- if (use20syntax) {
- stencil_func_separate(GL_FRONT, GL_ALWAYS, 0, ~0);
- stencil_func_separate(GL_BACK, GL_ALWAYS, 0, ~0);
- }
- else {
- stencil_func_separate_ati(GL_ALWAYS, GL_ALWAYS, 0, ~0);
- }
- stencil_op_separate(GL_FRONT, GL_KEEP, GL_KEEP, GL_INCR);
- stencil_op_separate(GL_BACK, GL_KEEP, GL_KEEP, GL_DECR);
-
- glTranslatef(3.0, 0, 0);
- glBegin(GL_QUADS);
- glColor3f( 0.9, 0.9, 0.9 );
- /* this should be front facing */
- for ( i = 0 ; i < (max_stencil + 5) ; i++ ) {
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- }
- glEnd();
-
- glStencilFunc(GL_EQUAL, max_stencil, ~0);
- glBegin(GL_QUADS);
- glColor3f( 0.5, 0.5, 0.5 );
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- glEnd();
-
-
- if (use20syntax) {
- stencil_func_separate(GL_FRONT, GL_ALWAYS, 0, ~0);
- stencil_func_separate(GL_BACK, GL_ALWAYS, 0, ~0);
- }
- else {
- stencil_func_separate_ati(GL_ALWAYS, GL_ALWAYS, 0, ~0);
- }
- stencil_op_separate(GL_FRONT, GL_KEEP, GL_KEEP, GL_DECR);
- stencil_op_separate(GL_BACK, GL_KEEP, GL_KEEP, GL_INCR);
-
- glTranslatef(3.0, 0, 0);
- glBegin(GL_QUADS);
- glColor3f( 0.9, 0.9, 0.9 );
-
- /* this should be back facing */
- for ( i = 0 ; i < (max_stencil + 5) ; i++ ) {
- glVertex2f(-1, -1);
- glVertex2f(-1, 1);
- glVertex2f( 1, 1);
- glVertex2f( 1, -1);
- }
- glEnd();
-
- glStencilFunc(GL_EQUAL, max_stencil, ~0);
- glBegin(GL_QUADS);
- glColor3f( 0.5, 0.5, 0.5 );
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- glEnd();
-
- if (use20syntax) {
- stencil_func_separate(GL_FRONT, GL_NEVER, 0, ~0);
- stencil_func_separate(GL_BACK, GL_ALWAYS, 0, ~0);
- }
- else {
- stencil_func_separate_ati(GL_NEVER, GL_ALWAYS, 0, ~0);
- }
- stencil_op_separate(GL_FRONT, GL_KEEP, GL_KEEP, GL_DECR);
- stencil_op_separate(GL_BACK, GL_KEEP, GL_KEEP, GL_INCR);
-
- glTranslatef(3.0, 0, 0);
- glBegin(GL_QUADS);
- glColor3f( 0.9, 0.9, 0.9 );
-
- /* this should be back facing */
- for ( i = 0 ; i < (max_stencil + 5) ; i++ ) {
- /* this should be back facing */
- glVertex2f(-1, -1);
- glVertex2f(-1, 1);
- glVertex2f( 1, 1);
- glVertex2f( 1, -1);
- /* this should be front facing */
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- }
- glEnd();
-
- glStencilFunc(GL_EQUAL, max_stencil, ~0);
- glBegin(GL_QUADS);
- glColor3f( 0.5, 0.5, 0.5 );
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- glEnd();
-
- if (use20syntax) {
- stencil_func_separate(GL_FRONT, GL_ALWAYS, 0, ~0);
- stencil_func_separate(GL_BACK, GL_ALWAYS, 0, ~0);
- }
- else {
- stencil_func_separate_ati(GL_ALWAYS, GL_ALWAYS, 0, ~0);
- }
- stencil_op_separate(GL_FRONT, GL_KEEP, GL_KEEP, GL_DECR);
- stencil_op_separate(GL_BACK, GL_KEEP, GL_KEEP, GL_INCR);
-
- glTranslatef(3.0, 0, 0);
- glBegin(GL_QUADS);
- glColor3f( 0.9, 0.9, 0.9 );
-
- /* this should be back facing */
- for ( i = 0 ; i < (max_stencil + 5) ; i++ ) {
- /* this should be back facing */
- glVertex2f(-1, -1);
- glVertex2f(-1, 1);
- glVertex2f( 1, 1);
- glVertex2f( 1, -1);
- /* this should be front facing */
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- }
- glEnd();
-
- glStencilFunc(GL_EQUAL, 1, ~0);
- glBegin(GL_QUADS);
- glColor3f( 0.5, 0.5, 0.5 );
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- glEnd();
-
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- GLfloat ar = (float) width / (float) height;
- Width = width;
- Height = height;
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -ar, ar, -1.0, 1.0, Near, Far );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -15.0 );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void Init( void )
-{
- const char * const ver_string = (const char * const)
- glGetString( GL_VERSION );
-
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- printf("GL_VERSION = %s\n", ver_string);
-
- if ( !glutExtensionSupported("GL_ATI_separate_stencil")
- && (atof( ver_string ) < 2.0) ) {
- printf("Sorry, this program requires either GL_ATI_separate_stencil or OpenGL 2.0.\n");
- exit(1);
- }
- if (atof( ver_string ) < 2.0) {
- use20syntax = 0;
- }
- stencil_func_separate = glutGetProcAddress( "glStencilFuncSeparate" );
- stencil_func_separate_ati = glutGetProcAddress( "glStencilFuncSeparateATI" );
- stencil_op_separate = glutGetProcAddress( "glStencilOpSeparate" );
-
- printf("\nAll 5 squares should be the same color.\n");
- glEnable( GL_BLEND );
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( Width, Height );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL );
- glutCreateWindow( "GL_ATI_separate_stencil test" );
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/stencil_wrap.c b/progs/tests/stencil_wrap.c
deleted file mode 100644
index 88cf3809ca..0000000000
--- a/progs/tests/stencil_wrap.c
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
- * (C) Copyright IBM Corporation 2004
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, and/or sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file stencil_wrap.c
- *
- * Simple test of GL_EXT_stencil_wrap functionality. Four squares are drawn
- * with different stencil modes, but all should be rendered with the same
- * final color.
- *
- * \author Ian Romanick <idr@us.ibm.com>
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-static int Width = 550;
-static int Height = 200;
-static const GLfloat Near = 5.0, Far = 25.0;
-
-
-static void Display( void )
-{
- GLint max_stencil;
- GLint stencil_bits;
- unsigned i;
-
-
- glGetIntegerv( GL_STENCIL_BITS, & stencil_bits );
- max_stencil = (1U << stencil_bits) - 1;
- printf( "Stencil bits = %u, maximum stencil value = 0x%08x\n",
- stencil_bits, max_stencil );
-
- glClearStencil( 0 );
- glClearColor( 0.2, 0.2, 0.8, 0 );
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT
- | GL_STENCIL_BUFFER_BIT );
-
-
- glPushMatrix();
-
- /* This is the "reference" square.
- */
-
- glDisable(GL_STENCIL_TEST);
- glTranslatef(-6.0, 0, 0);
- glBegin(GL_QUADS);
- glColor3f( 0.5, 0.5, 0.5 );
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- glEnd();
-
-
- glEnable(GL_STENCIL_TEST);
-
- /* Draw the first two squares using the two non-wrap (i.e., saturate)
- * modes.
- */
-
- glStencilFunc(GL_ALWAYS, 0, ~0);
- glStencilOp(GL_KEEP, GL_KEEP, GL_INCR);
-
- glTranslatef(3.0, 0, 0);
- glBegin(GL_QUADS);
- glColor3f( 0.9, 0.9, 0.9 );
-
- for ( i = 0 ; i < (max_stencil + 5) ; i++ ) {
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- }
- glEnd();
-
- glStencilFunc(GL_EQUAL, max_stencil, ~0);
- glBegin(GL_QUADS);
- glColor3f( 0.5, 0.5, 0.5 );
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- glEnd();
-
-
- glStencilFunc(GL_ALWAYS, 0, ~0);
- glStencilOp(GL_KEEP, GL_KEEP, GL_DECR);
-
- glTranslatef(3.0, 0, 0);
- glBegin(GL_QUADS);
- glColor3f( 0.9, 0.9, 0.9 );
-
- for ( i = 0 ; i < (max_stencil + 5) ; i++ ) {
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- }
- glEnd();
-
- glStencilFunc(GL_EQUAL, 0, ~0);
- glBegin(GL_QUADS);
- glColor3f( 0.5, 0.5, 0.5 );
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- glEnd();
-
-
-
-
- /* Draw the last two squares using the two wrap modes.
- */
-
- glStencilFunc(GL_ALWAYS, 0, ~0);
- glStencilOp(GL_KEEP, GL_KEEP, GL_INCR_WRAP);
-
- glTranslatef(3.0, 0, 0);
- glBegin(GL_QUADS);
- glColor3f( 0.9, 0.9, 0.9 );
-
- for ( i = 0 ; i < (max_stencil + 5) ; i++ ) {
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- }
- glEnd();
-
- glStencilFunc(GL_EQUAL, 4, ~0);
- glBegin(GL_QUADS);
- glColor3f( 0.5, 0.5, 0.5 );
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- glEnd();
-
-
-
- glStencilFunc(GL_ALWAYS, 0, ~0);
- glStencilOp(GL_KEEP, GL_KEEP, GL_DECR_WRAP);
-
- glTranslatef(3.0, 0, 0);
- glBegin(GL_QUADS);
- glColor3f( 0.9, 0.9, 0.9 );
-
- for ( i = 0 ; i < 5 ; i++ ) {
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- }
- glEnd();
-
- glStencilFunc(GL_EQUAL, (max_stencil - 4), ~0);
- glBegin(GL_QUADS);
- glColor3f( 0.5, 0.5, 0.5 );
- glVertex2f(-1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 1, 1);
- glVertex2f(-1, 1);
- glEnd();
-
-
-
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- GLfloat ar = (float) width / (float) height;
- Width = width;
- Height = height;
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -ar, ar, -1.0, 1.0, Near, Far );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -15.0 );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void Init( void )
-{
- const char * const ver_string = (const char * const)
- glGetString( GL_VERSION );
-
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- printf("GL_VERSION = %s\n", ver_string);
-
- if ( !glutExtensionSupported("GL_EXT_stencil_wrap")
- && (atof( ver_string ) < 1.4) ) {
- printf("Sorry, this program requires either GL_EXT_stencil_wrap or OpenGL 1.4.\n");
- exit(1);
- }
-
- printf("\nAll 5 squares should be the same color.\n");
- glEnable( GL_BLEND );
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( Width, Height );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL );
- glutCreateWindow( "GL_EXT_stencil_wrap test" );
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/stencilwrap.c b/progs/tests/stencilwrap.c
deleted file mode 100644
index 753375d0f3..0000000000
--- a/progs/tests/stencilwrap.c
+++ /dev/null
@@ -1,281 +0,0 @@
-/* Test GL_EXT_stencil_wrap extension.
- * This is by no means complete, just a quick check.
- *
- * Brian Paul 30 October 2002
- */
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <GL/glut.h>
-
-GLboolean wrapping;
-
-static void RunTest(void)
-{
- const GLenum prim = GL_QUAD_STRIP;
- GLubyte val;
- int bits, max, i;
- int expected;
- GLboolean failed;
-
- glGetIntegerv(GL_STENCIL_BITS, &bits);
- max = (1 << bits) - 1;
-
-
- glEnable(GL_STENCIL_TEST);
- glStencilFunc(GL_ALWAYS, 0, ~0);
-
- /* test GL_KEEP */
- glClearStencil(max);
- glClear(GL_STENCIL_BUFFER_BIT);
- glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
- failed = GL_FALSE;
- printf("Testing GL_KEEP...\n");
- expected = max;
- glBegin(prim);
- glVertex2f(0, 0);
- glVertex2f(10, 0);
- glVertex2f(0, 10);
- glVertex2f(10, 10);
- glEnd();
- glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val);
- if (val != expected) {
- printf("Failed GL_KEEP test(got %u, expected %u)\n", val, expected);
- failed = GL_TRUE;
- }
- else
- printf("OK!\n");
-
- /* test GL_ZERO */
- glClearStencil(max);
- glClear(GL_STENCIL_BUFFER_BIT);
- glStencilOp(GL_KEEP, GL_KEEP, GL_ZERO);
- failed = GL_FALSE;
- printf("Testing GL_ZERO...\n");
- expected = 0;
- glBegin(prim);
- glVertex2f(0, 0);
- glVertex2f(10, 0);
- glVertex2f(0, 10);
- glVertex2f(10, 10);
- glEnd();
- glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val);
- if (val != expected) {
- printf("Failed GL_ZERO test(got %u, expected %u)\n", val, expected);
- failed = GL_TRUE;
- }
- else
- printf("OK!\n");
-
- /* test GL_REPLACE */
- glClearStencil(max);
- glClear(GL_STENCIL_BUFFER_BIT);
- glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
- failed = GL_FALSE;
- printf("Testing GL_REPLACE...\n");
- expected = 0;
- glBegin(prim);
- glVertex2f(0, 0);
- glVertex2f(10, 0);
- glVertex2f(0, 10);
- glVertex2f(10, 10);
- glEnd();
- glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val);
- if (val != expected) {
- printf("Failed GL_REPLACE test(got %u, expected %u)\n", val, expected);
- failed = GL_TRUE;
- }
- else
- printf("OK!\n");
-
- /* test GL_INCR (saturation) */
- glClearStencil(0);
- glClear(GL_STENCIL_BUFFER_BIT);
- glStencilOp(GL_KEEP, GL_KEEP, GL_INCR);
- failed = GL_FALSE;
- printf("Testing GL_INCR...\n");
- for (i = 1; i < max+10; i++) {
- expected = (i > max) ? max : i;
- glBegin(prim);
- glVertex2f(0, 0); glVertex2f(10, 0);
- glVertex2f(0, 10); glVertex2f(10, 10);
- glEnd();
-
- glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val);
- if (val != expected) {
- printf( "Failed GL_INCR test on iteration #%u "
- "(got %u, expected %u)\n", i, val, expected );
- failed = GL_TRUE;
- }
- }
- if ( !failed )
- printf("OK!\n");
-
- /* test GL_DECR (saturation) */
- glClearStencil(max);
- glClear(GL_STENCIL_BUFFER_BIT);
- glStencilOp(GL_KEEP, GL_KEEP, GL_DECR);
- failed = GL_FALSE;
- printf("Testing GL_DECR...\n");
- for (i = max-1; i > -10; i--) {
- expected = (i < 0) ? 0 : i;
- glBegin(prim);
- glVertex2f(0, 0); glVertex2f(10, 0);
- glVertex2f(0, 10); glVertex2f(10, 10);
- glEnd();
- glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val);
- if (val != expected) {
- printf( "Failed GL_DECR test on iteration #%u "
- "(got %u, expected %u)\n", max - i, val, expected );
- failed = GL_TRUE;
- }
- }
- if ( !failed )
- printf("OK!\n");
-
- /* test GL_INVERT */
- glClearStencil(0);
- glClear(GL_STENCIL_BUFFER_BIT);
- glStencilOp(GL_KEEP, GL_KEEP, GL_INVERT);
- failed = GL_FALSE;
- printf("Testing GL_INVERT...\n");
- expected = max;
- glBegin(prim);
- glVertex2f(0, 0);
- glVertex2f(10, 0);
- glVertex2f(0, 10);
- glVertex2f(10, 10);
- glEnd();
- glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val);
- if (val != expected) {
- printf("Failed GL_INVERT test(got %u, expected %u)\n", val, expected);
- failed = GL_TRUE;
- }
- else
- printf("OK!\n");
-
- if(wrapping)
- {
- /* test GL_INCR_WRAP_EXT (wrap around) */
- glClearStencil(0);
- glClear(GL_STENCIL_BUFFER_BIT);
- glStencilOp(GL_KEEP, GL_KEEP, GL_INCR_WRAP_EXT);
- failed = GL_FALSE;
- printf("Testing GL_INCR_WRAP_EXT...\n");
- for (i = 1; i < max+10; i++) {
- expected = i % (max + 1);
- glBegin(prim);
- glVertex2f(0, 0); glVertex2f(10, 0);
- glVertex2f(0, 10); glVertex2f(10, 10);
- glEnd();
- glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val);
- if (val != expected) {
- printf( "Failed GL_INCR_WRAP test on iteration #%u "
- "(got %u, expected %u)\n", i, val, expected );
- failed = GL_TRUE;
- }
- }
- if ( !failed )
- printf("OK!\n");
-
- /* test GL_DECR_WRAP_EXT (wrap-around) */
- glClearStencil(max);
- glClear(GL_STENCIL_BUFFER_BIT);
- glStencilOp(GL_KEEP, GL_KEEP, GL_DECR_WRAP_EXT);
- failed = GL_FALSE;
- printf("Testing GL_DECR_WRAP_EXT...\n");
- for (i = max-1; i > -10; i--) {
- expected = (i < 0) ? max + i + 1: i;
- glBegin(prim);
- glVertex2f(0, 0); glVertex2f(10, 0);
- glVertex2f(0, 10); glVertex2f(10, 10);
- glEnd();
- glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val);
- if (val != expected) {
- printf( "Failed GL_DECR_WRAP test on iteration #%u "
- "(got %u, expected %u)\n", max - i, val, expected );
- failed = GL_TRUE;
- }
- }
- if ( !failed )
- printf("OK!\n");
- }
-
- glDisable(GL_STENCIL_TEST);
-}
-
-
-static void Display( void )
-{
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- RunTest();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glOrtho(0, width, 0, height, -1, 1);
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void Init( void )
-{
- const char * ver_str;
- float version;
-
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
-
-
- /* Check for both the extension string and GL version 1.4 on the
- * outside chance that some vendor exports version 1.4 but doesn't
- * export the extension string. The stencil-wrap modes are a required
- * part of GL 1.4.
- */
-
- ver_str = glGetString( GL_VERSION );
- version = (ver_str == NULL) ? 1.0 : atof( ver_str );
-
- wrapping = (glutExtensionSupported("GL_EXT_stencil_wrap") || (version >= 1.4));
- if (!wrapping)
- printf("GL_EXT_stencil_wrap not supported. Only testing the rest.\n");
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 400, 400 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_STENCIL );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/subtexrate.c b/progs/tests/subtexrate.c
deleted file mode 100644
index 568b68d552..0000000000
--- a/progs/tests/subtexrate.c
+++ /dev/null
@@ -1,350 +0,0 @@
-/*
- * Measure glTexSubImage and glCopyTexSubImage speed
- *
- * Brian Paul
- * 26 Jan 2006
- */
-
-#define GL_GLEXT_PROTOTYPES
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <GL/glut.h>
-
-static GLint WinWidth = 1024, WinHeight = 512;
-static GLint TexWidth = 512, TexHeight = 512;
-
-static GLuint TexObj = 1;
-
-static GLenum IntFormat = GL_RGBA8;
-static GLenum ReadFormat = GL_RGBA; /* for glReadPixels */
-
-static GLboolean DrawQuad = GL_TRUE;
-
-
-/**
- * draw teapot image, size TexWidth by TexHeight
- */
-static void
-DrawTestImage(void)
-{
- GLfloat ar;
-
- glViewport(0, 0, TexWidth, TexHeight);
- glScissor(0, 0, TexWidth, TexHeight);
- glEnable(GL_SCISSOR_TEST);
-
- glClearColor(0.5, 0.5, 0.5, 0.0);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- ar = (float) TexWidth / TexHeight;
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glFrustum(-ar, ar, -1.0, 1.0, 5.0, 25.0);
- glMatrixMode(GL_MODELVIEW);
-
- glEnable(GL_LIGHTING);
- glEnable(GL_LIGHT0);
- glEnable(GL_DEPTH_TEST);
- glFrontFace(GL_CW);
- glPushMatrix();
- glRotatef(45, 1, 0, 0);
- glRotatef(45, 0, 1, 0);
- glutSolidTeapot(2.3);
- glPopMatrix();
- glFrontFace(GL_CCW);
- glDisable(GL_DEPTH_TEST);
- glDisable(GL_LIGHTING);
-
- glDisable(GL_SCISSOR_TEST);
-
- glViewport(0, 0, WinWidth, WinHeight);
- glFinish();
-}
-
-
-/**
- * Do glCopyTexSubImage2D call (update texture with framebuffer data)
- * If doSubRect is true, do the copy in four pieces instead of all at once.
- */
-static void
-DoCopyTex(GLboolean doSubRect)
-{
- if (doSubRect) {
- /* copy in four parts */
- int w = TexWidth / 2, h = TexHeight / 2;
- int x0 = 0, y0 = 0;
- int x1 = w, y1 = h;
-#if 1
- glCopyTexSubImage2D(GL_TEXTURE_2D, 0, x0, y0, x0, y0, w, h);
- glCopyTexSubImage2D(GL_TEXTURE_2D, 0, x1, y0, x1, y0, w, h);
- glCopyTexSubImage2D(GL_TEXTURE_2D, 0, x0, y1, x0, y1, w, h);
- glCopyTexSubImage2D(GL_TEXTURE_2D, 0, x1, y1, x1, y1, w, h);
-#else
- /* scramble */
- glCopyTexSubImage2D(GL_TEXTURE_2D, 0, x0, y0, x1, y1, w, h);
- glCopyTexSubImage2D(GL_TEXTURE_2D, 0, x1, y0, x0, y1, w, h);
- glCopyTexSubImage2D(GL_TEXTURE_2D, 0, x0, y1, x1, y0, w, h);
- glCopyTexSubImage2D(GL_TEXTURE_2D, 0, x1, y1, x0, y0, w, h);
-#endif
- }
- else {
- glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, TexWidth, TexHeight);
- }
-}
-
-
-/**
- * Do glTexSubImage2D (update texture w/ user data)
- * If doSubRect, do update in four pieces, else all at once.
- */
-static void
-SubTex(GLboolean doSubRect, const GLubyte *image)
-{
- if (doSubRect) {
- /* four pieces */
- int w = TexWidth / 2, h = TexHeight / 2;
- int x0 = 0, y0 = 0;
- int x1 = w, y1 = h;
- glPixelStorei(GL_UNPACK_ROW_LENGTH, TexWidth);
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-
- glPixelStorei(GL_UNPACK_SKIP_ROWS, y0);
- glPixelStorei(GL_UNPACK_SKIP_PIXELS, x0);
- glTexSubImage2D(GL_TEXTURE_2D, 0, x0, y0, w, h,
- ReadFormat, GL_UNSIGNED_BYTE, image);
-
- glPixelStorei(GL_UNPACK_SKIP_ROWS, y0);
- glPixelStorei(GL_UNPACK_SKIP_PIXELS, x1);
- glTexSubImage2D(GL_TEXTURE_2D, 0, x1, y0, w, h,
- ReadFormat, GL_UNSIGNED_BYTE, image);
-
- glPixelStorei(GL_UNPACK_SKIP_ROWS, y1);
- glPixelStorei(GL_UNPACK_SKIP_PIXELS, x0);
- glTexSubImage2D(GL_TEXTURE_2D, 0, x0, y1, w, h,
- ReadFormat, GL_UNSIGNED_BYTE, image);
-
- glPixelStorei(GL_UNPACK_SKIP_ROWS, y1);
- glPixelStorei(GL_UNPACK_SKIP_PIXELS, x1);
- glTexSubImage2D(GL_TEXTURE_2D, 0, x1, y1, w, h,
- ReadFormat, GL_UNSIGNED_BYTE, image);
- }
- else {
- /* all at once */
- glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, TexWidth, TexHeight,
- ReadFormat, GL_UNSIGNED_BYTE, image);
- }
-}
-
-
-/**
- * Measure gl[Copy]TexSubImage rate.
- * This actually also includes time to render a quad and SwapBuffers.
- */
-static void
-RunTest(GLboolean copyTex, GLboolean doSubRect)
-{
- double t0, t1;
- int iters = 0;
- float copyRate, mbRate;
- float rot = 0.0;
- int bpp, r, g, b, a;
- int w, h;
- GLubyte *image = NULL;
-
- glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_RED_SIZE, &r);
- glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_GREEN_SIZE, &g);
- glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_BLUE_SIZE, &b);
- glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_ALPHA_SIZE, &a);
- bpp = (r + g + b + a) / 8;
-
- if (!copyTex) {
- /* read image from frame buffer */
- image = (GLubyte *) malloc(TexWidth * TexHeight * bpp);
- glPixelStorei(GL_PACK_ALIGNMENT, 1);
- glReadPixels(0, 0, TexWidth, TexHeight,
- ReadFormat, GL_UNSIGNED_BYTE, image);
- }
-
- glEnable(GL_TEXTURE_2D);
- glViewport(WinWidth / 2, 0, WinWidth / 2, WinHeight);
-
- t0 = glutGet(GLUT_ELAPSED_TIME) / 1000.0;
-
- do {
- if (copyTex)
- /* Framebuffer -> Texture */
- DoCopyTex(doSubRect);
- else {
- /* Main Mem -> Texture */
- SubTex(doSubRect, image);
- }
-
- /* draw textured quad */
- if (DrawQuad) {
- glPushMatrix();
- glRotatef(rot, 0, 0, 1);
- glTranslatef(1, 0, 0);
- glBegin(GL_POLYGON);
- glTexCoord2f(0, 0); glVertex2f(-1, -1);
- glTexCoord2f(1, 0); glVertex2f( 1, -1);
- glTexCoord2f(1, 1); glVertex2f( 1, 1);
- glTexCoord2f(0, 1); glVertex2f(-1, 1);
- glEnd();
- glPopMatrix();
- }
-
- iters++;
- rot += 2.0;
-
- t1 = glutGet(GLUT_ELAPSED_TIME) / 1000.0;
- if (DrawQuad) {
- glutSwapBuffers();
- }
- } while (t1 - t0 < 5.0);
-
- glDisable(GL_TEXTURE_2D);
- if (image)
- free(image);
-
- if (doSubRect) {
- w = TexWidth / 2;
- h = TexHeight / 2;
- iters *= 4;
- }
- else {
- w = TexWidth;
- h = TexHeight;
- }
-
- copyRate = iters / (t1 - t0);
- mbRate = w * h * bpp * copyRate / (1024 * 1024);
-
- if (copyTex)
- printf("glCopyTexSubImage: %d x %d, %d Bpp:\n", w, h, bpp);
- else
- printf("glTexSubImage: %d x %d, %d Bpp:\n", w, h, bpp);
- printf(" %d calls in %.2f = %.2f calls/sec, %.2f MB/s\n",
- iters, t1-t0, copyRate, mbRate);
-}
-
-
-static void
-Draw(void)
-{
- glClearColor(0.2, 0.2, 0.8, 0);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- DrawTestImage();
- if (!DrawQuad) {
- glutSwapBuffers();
- }
-
- RunTest(GL_FALSE, GL_FALSE);
- RunTest(GL_FALSE, GL_TRUE);
- RunTest(GL_TRUE, GL_FALSE);
- RunTest(GL_TRUE, GL_TRUE);
-
- glutSwapBuffers();
-
- printf("exiting\n");
- exit(0);
-}
-
-
-static void
-Reshape(int width, int height)
-{
- glViewport(0, 0, width, height);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 25.0);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- glTranslatef(0.0, 0.0, -15.0);
-}
-
-
-static void
-Key(unsigned char key, int x, int y)
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-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)
-{
- /* create initial, empty teximage */
- glBindTexture(GL_TEXTURE_2D, TexObj);
- glTexImage2D(GL_TEXTURE_2D, 0, IntFormat, TexWidth, TexHeight, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, NULL);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
-}
-
-
-
-static void
-ParseArgs(int argc, char *argv[])
-{
- int i;
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-nodraw") == 0)
- DrawQuad = GL_FALSE;
- }
-}
-
-
-int
-main(int argc, char *argv[])
-{
- GLint mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE | GLUT_DEPTH;
- glutInit(&argc, argv);
-
- ParseArgs(argc, argv);
-
- glutInitWindowPosition(0, 0);
- glutInitWindowSize(WinWidth, WinHeight);
- glutInitDisplayMode(mode);
- glutCreateWindow(argv[0]);
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutSpecialFunc(SpecialKey);
- glutDisplayFunc(Draw);
-
- printf("GL_RENDERER: %s\n", (char *) glGetString(GL_RENDERER));
- Init();
-
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/tex1d.c b/progs/tests/tex1d.c
deleted file mode 100644
index 1fab849dd3..0000000000
--- a/progs/tests/tex1d.c
+++ /dev/null
@@ -1,139 +0,0 @@
-
-/* Exercise 1D textures
- */
-
-#include <assert.h>
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "GL/glut.h"
-
-static GLuint Window = 0;
-static GLuint TexObj[2];
-static GLfloat Angle = 0.0f;
-
-
-static void draw( void )
-{
- glClear( GL_COLOR_BUFFER_BIT );
-
- glColor3f( 1.0, 1.0, 1.0 );
-
- /* draw first polygon */
- glPushMatrix();
- glTranslatef( -1.0, 0.0, 0.0 );
- glRotatef( Angle, 0.0, 0.0, 1.0 );
- glBindTexture( GL_TEXTURE_1D, TexObj[0] );
- glBegin( GL_POLYGON );
- glTexCoord1f( 0.0 ); glVertex2f( -1.0, -1.0 );
- glTexCoord1f( 1.0 ); glVertex2f( 1.0, -1.0 );
- glTexCoord1f( 1.0 ); glVertex2f( 1.0, 1.0 );
- glTexCoord1f( 0.0 ); glVertex2f( -1.0, 1.0 );
- glEnd();
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-
-static void idle( void )
-{
- Angle += 2.0;
- glutPostRedisplay();
-}
-
-
-
-/* change view Angle, exit upon ESC */
-static void key(unsigned char k, int x, int y)
-{
- (void) x;
- (void) y;
- switch (k) {
- case 27:
- exit(0);
- }
-}
-
-
-
-/* new window size or exposure */
-static void reshape( int width, int height )
-{
- glViewport(0, 0, (GLint)width, (GLint)height);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- /* glOrtho( -3.0, 3.0, -3.0, 3.0, -10.0, 10.0 );*/
- glFrustum( -2.0, 2.0, -2.0, 2.0, 6.0, 20.0 );
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -8.0 );
-}
-
-
-static void init( void )
-{
- GLubyte tex[256][3];
- GLint i;
-
-
- glDisable( GL_DITHER );
-
- /* Setup texturing */
- glEnable( GL_TEXTURE_1D );
- glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL );
-
-
- /* generate texture object IDs */
- glGenTextures( 2, TexObj );
-
- /* setup first texture object */
- glBindTexture( GL_TEXTURE_1D, TexObj[0] );
-
-
- for (i = 0; i < 256; i++) {
- GLfloat f;
-
- /* map 0..255 to -PI .. PI */
- f = ((i / 255.0) - .5) * (3.141592 * 2);
-
- f = sin(f);
-
- /* map -1..1 to 0..255 */
- tex[i][0] = (f+1.0)/2.0 * 255.0;
- tex[i][1] = 0;
- tex[i][2] = 0;
- }
-
- glTexImage1D( GL_TEXTURE_1D, 0, 3, 256, 0, GL_RGB, GL_UNSIGNED_BYTE, tex );
- glTexParameteri( GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
- glTexParameteri( GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
- glTexParameteri( GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_REPEAT );
- glTexParameteri( GL_TEXTURE_1D, GL_TEXTURE_WRAP_T, GL_REPEAT );
-}
-
-
-
-int main( int argc, char *argv[] )
-{
- glutInit(&argc, argv);
- glutInitWindowPosition(0, 0);
- glutInitWindowSize(300, 300);
- glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
-
- Window = glutCreateWindow("Texture Objects");
- if (!Window) {
- exit(1);
- }
-
- init();
-
- glutReshapeFunc( reshape );
- glutKeyboardFunc( key );
-/* glutIdleFunc( idle ); */
- glutDisplayFunc( draw );
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/texcmp.c b/progs/tests/texcmp.c
deleted file mode 100644
index 6e822fb689..0000000000
--- a/progs/tests/texcmp.c
+++ /dev/null
@@ -1,414 +0,0 @@
-/*
- * Compressed texture demo. Written by Daniel Borca.
- * This program is in the public domain.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <string.h>
-#define GL_GLEXT_PROTOTYPES 1
-#include <GL/glut.h>
-
-#include "readtex.c" /* I know, this is a hack. */
-#define TEXTURE_FILE "../images/tree2.rgba"
-
-
-static float Rot = 0.0;
-static GLboolean Anim = 1;
-
-typedef struct {
- GLubyte *data;
- GLuint size;
- GLenum format;
- GLuint w, h;
-
- GLenum TC;
-
- GLubyte *cData;
- GLuint cSize;
- GLenum cFormat;
-} TEXTURE;
-
-static TEXTURE *Tx, t1, t2, t3;
-static GLboolean fxt1, dxtc, s3tc;
-
-
-static const char *TextureName (GLenum TC)
-{
- switch (TC) {
- case GL_RGB:
- return "RGB";
- case GL_RGBA:
- return "RGBA";
- case GL_COMPRESSED_RGB:
- return "COMPRESSED_RGB";
- case GL_COMPRESSED_RGBA:
- return "COMPRESSED_RGBA";
- case GL_COMPRESSED_RGB_FXT1_3DFX:
- return "GL_COMPRESSED_RGB_FXT1_3DFX";
- case GL_COMPRESSED_RGBA_FXT1_3DFX:
- return "GL_COMPRESSED_RGBA_FXT1_3DFX";
- case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
- return "GL_COMPRESSED_RGB_S3TC_DXT1_EXT";
- case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
- return "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT";
- case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
- return "GL_COMPRESSED_RGBA_S3TC_DXT3_EXT";
- case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
- return "GL_COMPRESSED_RGBA_S3TC_DXT5_EXT";
- case GL_RGB_S3TC:
- return "GL_RGB_S3TC";
- case GL_RGB4_S3TC:
- return "GL_RGB4_S3TC";
- case GL_RGBA_S3TC:
- return "GL_RGBA_S3TC";
- case GL_RGBA4_S3TC:
- return "GL_RGBA4_S3TC";
- case 0:
- return "Invalid format";
- default:
- return "Unknown format";
- }
-}
-
-
-static void
-PrintString(const char *s)
-{
- while (*s) {
- glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int) *s);
- s++;
- }
-}
-
-
-static void Idle( void )
-{
- float t = glutGet(GLUT_ELAPSED_TIME) * 0.001; /* in seconds */
- Rot = t * 360 / 4; /* 1 rotation per 4 seconds */
- glutPostRedisplay();
-}
-
-
-static void Display( void )
-{
- /* draw background gradient */
- glDisable(GL_TEXTURE_2D);
- glBegin(GL_POLYGON);
- glColor3f(1.0, 0.0, 0.2); glVertex2f(-1.5, -1.0);
- glColor3f(1.0, 0.0, 0.2); glVertex2f( 1.5, -1.0);
- glColor3f(0.0, 0.0, 1.0); glVertex2f( 1.5, 1.0);
- glColor3f(0.0, 0.0, 1.0); glVertex2f(-1.5, 1.0);
- glEnd();
-
- glPushMatrix();
- glRotatef(Rot, 0, 0, 1);
-
- glEnable(GL_TEXTURE_2D);
- 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);
- glEnd();
-
- glPopMatrix();
-
- /* info */
- glColor4f(1, 1, 1, 1);
-
- glRasterPos3f(-1.2, -0.7, 0);
- PrintString("Selected: ");
- PrintString(TextureName(Tx->TC));
- if (Tx->cData) {
- char tmp[64];
- glRasterPos3f(-1.2, -0.8, 0);
- PrintString("Internal: ");
- PrintString(TextureName(Tx->cFormat));
- glRasterPos3f(-1.2, -0.9, 0);
- PrintString("Size : ");
- sprintf(tmp, "%d (%d%% of %d)", Tx->cSize, Tx->cSize * 100 / Tx->size, Tx->size);
- PrintString(tmp);
- }
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glOrtho( -1.5, 1.5, -1.0, 1.0, -1.0, 1.0 );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
-}
-
-
-static void ReInit( GLenum TC, TEXTURE *Tx )
-{
- GLint rv;
-
- if ((Tx->TC == TC) && (Tx->cData != NULL)) {
- glCompressedTexImage2DARB(GL_TEXTURE_2D, /* target */
- 0, /* level */
- Tx->cFormat, /* real format */
- Tx->w, /* original width */
- Tx->h, /* original height */
- 0, /* border */
- Tx->cSize, /* compressed size*/
- Tx->cData); /* compressed data*/
- } else {
- glTexImage2D(GL_TEXTURE_2D, /* target */
- 0, /* level */
- TC, /* internal format */
- Tx->w, Tx->h, /* width, height */
- 0, /* border */
- Tx->format, /* texture format */
- GL_UNSIGNED_BYTE, /* texture type */
- Tx->data); /* the texture */
-
- /* okay, now cache the compressed texture */
- Tx->TC = TC;
- if (Tx->cData != NULL) {
- free(Tx->cData);
- Tx->cData = NULL;
- }
- glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_COMPRESSED_ARB, &rv);
- if (rv) {
- glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_INTERNAL_FORMAT, (GLint *)&Tx->cFormat);
- glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB, (GLint *)&Tx->cSize);
- if ((Tx->cData = malloc(Tx->cSize)) != NULL) {
- glGetCompressedTexImageARB(GL_TEXTURE_2D, 0, Tx->cData);
- }
- }
- }
-}
-
-
-static void Init( void )
-{
- /* HEIGHT * WIDTH + 1 (for trailing '\0') */
- static char pattern[8 * 32 + 1] = {"\
- \
- 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 \
- "
- };
-
- GLuint i, j;
-
- GLubyte (*texture1)[8 * 32][4];
- GLubyte (*texture2)[256][256][4];
-
- t1.w = 32;
- t1.h = 8;
- t1.size = t1.w * t1.h * 4;
- t1.data = malloc(t1.size);
- t1.format = GL_RGBA;
- t1.TC = GL_RGBA;
-
- texture1 = (GLubyte (*)[8 * 32][4])t1.data;
- for (i = 0; i < sizeof(pattern) - 1; i++) {
- switch (pattern[i]) {
- default:
- case ' ':
- (*texture1)[i][0] = 255;
- (*texture1)[i][1] = 255;
- (*texture1)[i][2] = 255;
- (*texture1)[i][3] = 64;
- break;
- case 'M':
- (*texture1)[i][0] = 255;
- (*texture1)[i][1] = 0;
- (*texture1)[i][2] = 0;
- (*texture1)[i][3] = 255;
- break;
- case 'E':
- (*texture1)[i][0] = 0;
- (*texture1)[i][1] = 255;
- (*texture1)[i][2] = 0;
- (*texture1)[i][3] = 255;
- break;
- case 'S':
- (*texture1)[i][0] = 0;
- (*texture1)[i][1] = 0;
- (*texture1)[i][2] = 255;
- (*texture1)[i][3] = 255;
- break;
- case 'A':
- (*texture1)[i][0] = 255;
- (*texture1)[i][1] = 255;
- (*texture1)[i][2] = 0;
- (*texture1)[i][3] = 255;
- break;
- }
- }
-
- t2.w = 256;
- t2.h = 256;
- t2.size = t2.w * t2.h * 4;
- t2.data = malloc(t2.size);
- t2.format = GL_RGBA;
- t2.TC = GL_RGBA;
-
- texture2 = (GLubyte (*)[256][256][4])t2.data;
- for (j = 0; j < t2.h; j++) {
- for (i = 0; i < t2.w; i++) {
- (*texture2)[j][i][0] = sqrt(i * j * 255 * 255 / (t2.w * t2.h));
- (*texture2)[j][i][1] = 0;
- (*texture2)[j][i][2] = 0;
- (*texture2)[j][i][3] = 255;
- }
- }
-
- t3.data = LoadRGBImage(TEXTURE_FILE, (GLint *)&t3.w, (GLint *)&t3.h, &t3.format);
- t3.size = t3.w * t3.h * ((t3.format == GL_RGB) ? 3 : 4);
- t3.TC = GL_RGBA;
-
- ReInit(GL_RGBA, Tx = &t1);
-
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
- glEnable(GL_TEXTURE_2D);
-
- glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- case ' ':
- Anim = !Anim;
- if (Anim)
- glutIdleFunc( Idle );
- else
- glutIdleFunc( NULL );
- break;
- case 't':
- if (Tx == &t1) {
- Tx = &t2;
- } else if (Tx == &t2) {
- Tx = &t3;
- } else {
- Tx = &t1;
- }
- ReInit(Tx->TC, Tx);
- break;
- case '9':
- ReInit(GL_RGB, Tx);
- break;
- case '0':
- ReInit(GL_RGBA, Tx);
- break;
- case '1':
- ReInit(GL_COMPRESSED_RGB, Tx);
- break;
- case '2':
- ReInit(GL_COMPRESSED_RGBA, Tx);
- break;
- case '3':
- if (fxt1) ReInit(GL_COMPRESSED_RGB_FXT1_3DFX, Tx);
- break;
- case '4':
- if (fxt1) ReInit(GL_COMPRESSED_RGBA_FXT1_3DFX, Tx);
- break;
- case '5':
- if (dxtc) ReInit(GL_COMPRESSED_RGB_S3TC_DXT1_EXT, Tx);
- break;
- case '6':
- if (dxtc) ReInit(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, Tx);
- break;
- case '7':
- if (dxtc) ReInit(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, Tx);
- break;
- case '8':
- if (dxtc) ReInit(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, Tx);
- break;
- case 'a':
- if (s3tc) ReInit(GL_RGB_S3TC, Tx);
- break;
- case 's':
- if (s3tc) ReInit(GL_RGB4_S3TC, Tx);
- break;
- case 'd':
- if (s3tc) ReInit(GL_RGBA_S3TC, Tx);
- break;
- case 'f':
- if (s3tc) ReInit(GL_RGBA4_S3TC, Tx);
- break;
- }
- glutPostRedisplay();
-}
-
-
-int main( int argc, char *argv[] )
-{
- float gl_version;
- GLint num_formats;
- GLint i;
- GLint formats[64];
-
-
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 400, 300 );
-
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
-
- if (glutCreateWindow(argv[0]) <= 0) {
- printf("Couldn't create window\n");
- exit(0);
- }
-
- gl_version = atof( (const char *) glGetString( GL_VERSION ) );
- if ( (gl_version < 1.3)
- && !glutExtensionSupported("GL_ARB_texture_compression") ) {
- printf("Sorry, GL_ARB_texture_compression not supported\n");
- exit(0);
- }
- if (glutExtensionSupported("GL_3DFX_texture_compression_FXT1")) {
- fxt1 = GL_TRUE;
- }
- if (glutExtensionSupported("GL_EXT_texture_compression_s3tc")) {
- dxtc = GL_TRUE;
- }
- if (glutExtensionSupported("GL_S3_s3tc")) {
- s3tc = GL_TRUE;
- }
-
- glGetIntegerv( GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB, & num_formats );
-
- (void) memset( formats, 0, sizeof( formats ) );
- glGetIntegerv( GL_COMPRESSED_TEXTURE_FORMATS_ARB, formats );
-
- printf( "The following texture formats are supported:\n" );
- for ( i = 0 ; i < num_formats ; i++ ) {
- printf( "\t%s\n", TextureName( formats[i] ) );
- }
-
- Init();
-
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- if (Anim)
- glutIdleFunc( Idle );
-
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/texcompress2.c b/progs/tests/texcompress2.c
deleted file mode 100644
index e2eed756b6..0000000000
--- a/progs/tests/texcompress2.c
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- * Test texture compression.
- */
-
-
-#define GL_GLEXT_PROTOTYPES
-#include <assert.h>
-#include <stdio.h>
-#include <GL/glut.h>
-#include <GL/glx.h>
-#include "readtex.c"
-
-#define IMAGE_FILE "../images/arch.rgb"
-
-static int ImgWidth, ImgHeight;
-static GLenum ImgFormat;
-static GLenum CompFormat;
-static GLfloat EyeDist = 5.0;
-static GLfloat Rot = 0.0;
-const GLenum Target = GL_TEXTURE_2D;
-
-
-static void
-CheckError(int line)
-{
- GLenum err = glGetError();
- if (err) {
- printf("GL Error %d at line %d\n", (int) err, line);
- }
-}
-
-
-static const char *
-LookupFormat(GLenum format)
-{
- switch (format) {
- case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
- return "GL_COMPRESSED_RGB_S3TC_DXT1_EXT";
- case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
- return "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT";
- case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
- return "GL_COMPRESSED_RGBA_S3TC_DXT3_EXT";
- default:
- return "other";
- }
-}
-
-
-static void
-TestSubTex(void)
-{
- GLboolean all = 0*GL_TRUE;
- GLubyte *buffer;
- GLint size, fmt;
- int i;
-
- glGetTexLevelParameteriv(Target, 0,
- GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB, &size);
- glGetTexLevelParameteriv(Target, 0, GL_TEXTURE_INTERNAL_FORMAT, &fmt);
-
- buffer = (GLubyte *) malloc(size);
- glGetCompressedTexImageARB(Target, 0, buffer);
-
- printf("Testing sub-texture replacement\n");
- if (all)
- glCompressedTexImage2DARB(Target, 0,
- fmt, ImgWidth, ImgHeight, 0,
- size, buffer);
- else {
- /* bottom half */
- glCompressedTexSubImage2DARB(Target, 0,
- 0, 0, /* pos */
- ImgWidth, ImgHeight / 2,
- fmt, size/2, buffer);
- /* top half */
- glCompressedTexSubImage2DARB(Target, 0,
- 0, ImgHeight / 2, /* pos */
- ImgWidth, ImgHeight / 2,
- fmt, size/2, buffer + size / 2);
- }
-
- free(buffer);
-}
-
-
-static void
-LoadCompressedImage(const char *file)
-{
- const GLenum filter = GL_LINEAR;
- GLubyte *image;
- GLint p;
-
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- glPixelStorei(GL_PACK_ALIGNMENT, 1);
-
- /*
- * Load image and scale if needed.
- */
- image = LoadRGBImage( file, &ImgWidth, &ImgHeight, &ImgFormat );
- if (!image) {
- printf("Couldn't read %s\n", IMAGE_FILE);
- exit(0);
- }
- printf("Image is %d x %d\n", ImgWidth, ImgHeight);
-
- /* power of two */
- assert(ImgWidth == 128 || ImgWidth == 256 || ImgWidth == 512);
- assert(ImgWidth == 128 || ImgHeight == 256 || ImgHeight == 512);
-
- if (ImgFormat == GL_RGB)
- CompFormat = GL_COMPRESSED_RGB_S3TC_DXT1_EXT;
- else
- CompFormat = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT;
-
- if (ImgFormat == GL_RGBA) {
- int i, numAlpha = 0;
- for (i = 0; i < ImgWidth * ImgHeight; i++) {
- if (image[i*4+3] != 0 && image[i*4+3] != 0xff) {
- numAlpha++;
- }
- if (image[i*4+3] == 0)
- image[i*4+3] = 4 * i / ImgWidth;
- }
- printf("Num Alpha !=0,255: %d\n", numAlpha);
- }
-
- CompFormat = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT;
-
-
- /*
- * Give image to OpenGL and have it compress it.
- */
- glTexImage2D(Target, 0, CompFormat, ImgWidth, ImgHeight, 0,
- ImgFormat, GL_UNSIGNED_BYTE, image);
- CheckError(__LINE__);
-
- free(image);
-
- glGetTexLevelParameteriv(Target, 0, GL_TEXTURE_INTERNAL_FORMAT, &p);
- printf("Compressed Internal Format: %s (0x%x)\n", LookupFormat(p), p);
- assert(p == CompFormat);
-
- printf("Original size: %d bytes\n", ImgWidth * ImgHeight * 3);
- glGetTexLevelParameteriv(Target, 0, GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB, &p);
- printf("Compressed size: %d bytes\n", p);
-
- glTexParameteri(Target, GL_TEXTURE_MIN_FILTER, filter);
- glTexParameteri(Target, GL_TEXTURE_MAG_FILTER, filter);
-
- TestSubTex();
-
-}
-
-
-static void
-Init(const char *file)
-{
- GLint numFormats, formats[100];
- GLint p;
-
- if (!glutExtensionSupported("GL_ARB_texture_compression")) {
- printf("Sorry, GL_ARB_texture_compression is required.\n");
- exit(1);
- }
- if (!glutExtensionSupported("GL_EXT_texture_compression_s3tc")) {
- printf("Sorry, GL_EXT_texture_compression_s3tc is required.\n");
- exit(1);
- }
-
- printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB, &numFormats);
- glGetIntegerv(GL_COMPRESSED_TEXTURE_FORMATS_ARB, formats);
- printf("%d supported compression formats: ", numFormats);
- for (p = 0; p < numFormats; p++)
- printf("0x%x ", formats[p]);
- printf("\n");
-
- LoadCompressedImage(file);
-
- glEnable(GL_TEXTURE_2D);
-
- if (ImgFormat == GL_RGBA) {
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- glEnable(GL_BLEND);
- }
-}
-
-
-static void
-Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum(-1, 1, -1, 1, 4, 100);
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
-}
-
-
-static void
-Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 'd':
- EyeDist -= 1.0;
- if (EyeDist < 4.0)
- EyeDist = 4.0;
- break;
- case 'D':
- EyeDist += 1.0;
- break;
- case 'z':
- Rot += 5.0;
- break;
- case 'Z':
- Rot -= 5.0;
- break;
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void
-Draw( void )
-{
- glClearColor(0.3, 0.3, .8, 0);
- glClear(GL_COLOR_BUFFER_BIT);
-
- glPushMatrix();
- glTranslatef(0, 0, -(EyeDist+0.01));
- glRotatef(Rot, 0, 0, 1);
- glBegin(GL_POLYGON);
- glTexCoord2f(0, 0); glVertex2f(-1, -1);
- glTexCoord2f(1, 0); glVertex2f( 1, -1);
- glTexCoord2f(1, 1); glVertex2f( 1, 1);
- glTexCoord2f(0, 1); glVertex2f(-1, 1);
- glEnd();
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-int
-main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowSize( 600, 600 );
-
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE);
-
- glutCreateWindow(argv[0]);
-
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Draw );
-
- if (argc > 1)
- Init(argv[1]);
- else
- Init(IMAGE_FILE);
-
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/texfilt.c b/progs/tests/texfilt.c
deleted file mode 100644
index 6ee4bc4eae..0000000000
--- a/progs/tests/texfilt.c
+++ /dev/null
@@ -1,398 +0,0 @@
-/*
- * (C) Copyright IBM Corporation 2005
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, and/or sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <GL/glut.h>
-
-const GLenum filter_modes[] = {
- GL_NEAREST,
- GL_LINEAR,
- GL_NEAREST_MIPMAP_NEAREST,
- GL_NEAREST_MIPMAP_LINEAR,
- GL_LINEAR_MIPMAP_NEAREST,
- GL_LINEAR_MIPMAP_LINEAR,
-};
-
-static GLenum min_filter = GL_LINEAR_MIPMAP_LINEAR;
-static GLenum mag_filter = GL_LINEAR;
-
-static unsigned segments = 64;
-static GLfloat * position_data = NULL;
-static GLfloat * texcoord_data = NULL;
-static GLfloat max_anisotropy = 0.0;
-static GLfloat anisotropy = 1.0;
-
-static void generate_tunnel( unsigned num_segs, GLfloat ** pos_data,
- GLfloat ** tex_data );
-static void generate_textures( unsigned mode );
-
-#define min(a,b) ( (a) < (b) ) ? (a) : (b)
-#define max(a,b) ( (a) > (b) ) ? (a) : (b)
-
-
-static void Display( void )
-{
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, min_filter );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, mag_filter );
-
- if ( max_anisotropy > 0.0 ) {
- glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT,
- anisotropy );
- }
-
- glClear( GL_COLOR_BUFFER_BIT );
- glLoadIdentity();
- glTranslatef( 0.0f, 0.0f, -19.0f );
-
- glVertexPointer( 4, GL_FLOAT, 0, position_data );
- glTexCoordPointer( 2, GL_FLOAT, 0, texcoord_data );
- glEnableClientState( GL_VERTEX_ARRAY );
- glEnableClientState( GL_TEXTURE_COORD_ARRAY );
- glDrawArrays( GL_QUADS, 0, 4 * segments );
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport(0, 0, width, height);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- gluPerspective(45.0f, (GLfloat)(width)/(GLfloat)(height), 0.1f, 100.0f);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- GLfloat new_anisotropy = anisotropy;
-
- (void) x;
- (void) y;
-
-
- switch( key ) {
- case 'a': {
- new_anisotropy = anisotropy - 1.0;
- break;
- }
-
- case 'A': {
- new_anisotropy = anisotropy + 1.0;
- break;
- }
-
- case 's': {
- segments--;
- if ( segments < 3 ) {
- segments = 3;
- }
- generate_tunnel( segments, & position_data, & texcoord_data );
- break;
- }
-
- case 'S': {
- segments++;
- if ( segments > 128 ) {
- segments = 128;
- }
- generate_tunnel( segments, & position_data, & texcoord_data );
- break;
- }
- case 'q':
- case 'Q':
- case 27:
- exit(0);
- break;
- }
-
- new_anisotropy = max( new_anisotropy, 1.0 );
- new_anisotropy = min( new_anisotropy, max_anisotropy );
- if ( new_anisotropy != anisotropy ) {
- anisotropy = new_anisotropy;
- printf( "Texture anisotropy: %f%s\n", anisotropy,
- (anisotropy == 1.0) ? " (disabled)" : "" );
- }
-
- glutPostRedisplay();
-}
-
-
-static void SpecialKey( int key, int x, int y )
-{
- (void) x;
- (void) y;
- (void) key;
- glutPostRedisplay();
-}
-
-
-static void menu_handler( int selection )
-{
- switch( selection >> 3 ) {
- case 0:
- glBindTexture( GL_TEXTURE_2D, selection );
- break;
-
- case 1:
- min_filter = filter_modes[ selection & 7 ];
- break;
-
- case 2:
- mag_filter = filter_modes[ selection & 7 ];
- break;
- }
-
- glutPostRedisplay();
-}
-
-
-static void Init( void )
-{
- glDisable(GL_CULL_FACE);
- glEnable(GL_TEXTURE_2D);
- glClearColor(0.0f, 0.0f, 0.4f, 0.0f);
- glShadeModel(GL_SMOOTH);
- glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
-
- generate_tunnel( segments, & position_data, & texcoord_data );
-
- glBindTexture( GL_TEXTURE_2D, 1 );
- generate_textures(1);
-
- glBindTexture( GL_TEXTURE_2D, 2 );
- generate_textures(2);
-
- glBindTexture( GL_TEXTURE_2D, 3 );
- generate_textures(3);
-
- if ( glutExtensionSupported( "GL_EXT_texture_filter_anisotropic" ) ) {
- glGetFloatv( GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, & max_anisotropy );
- }
-
- printf("Maximum texture anisotropy: %f\n", max_anisotropy );
-
- /* Create the menus. */
-
- glutCreateMenu( menu_handler );
- glutAddMenuEntry( "Min filter: GL_NEAREST", 8 + 0 );
- glutAddMenuEntry( "Min filter: GL_LINEAR", 8 + 1 );
- glutAddMenuEntry( "Min filter: GL_NEAREST_MIMMAP_NEAREST", 8 + 2 );
- glutAddMenuEntry( "Min filter: GL_NEAREST_MIMMAP_LINEAR", 8 + 3 );
- glutAddMenuEntry( "Min filter: GL_LINEAR_MIMMAP_NEAREST", 8 + 4 );
- glutAddMenuEntry( "Min filter: GL_LINEAR_MIMMAP_LINEAR", 8 + 5 );
- glutAddMenuEntry( "Mag filter: GL_NEAREST", 16 + 0 );
- glutAddMenuEntry( "Mag filter: GL_LINEAR", 16 + 1 );
- glutAddMenuEntry( "Texture: regular mipmaps", 1 );
- glutAddMenuEntry( "Texture: blended mipmaps", 2 );
- glutAddMenuEntry( "Texture: color mipmaps", 3 );
- glutAttachMenu( GLUT_RIGHT_BUTTON );
-}
-
-
-static void generate_tunnel( unsigned num_segs, GLfloat ** pos_data,
- GLfloat ** tex_data )
-{
- const GLfloat far = 20.0f;
- const GLfloat near = -90.0f;
- const GLfloat far_tex = 30.0f;
- const GLfloat near_tex = 0.0f;
- const GLfloat angle_step = (2 * M_PI) / num_segs;
- const GLfloat tex_coord_step = 2.0 / num_segs;
- GLfloat angle = 0.0f;
- GLfloat tex_coord = 0.0f;
- unsigned i;
- GLfloat * position;
- GLfloat * texture;
-
-
- position = realloc( *pos_data, sizeof( GLfloat ) * num_segs * 4 * 4 );
- texture = realloc( *tex_data, sizeof( GLfloat ) * num_segs * 4 * 2 );
-
- *pos_data = position;
- *tex_data = texture;
-
- for ( i = 0 ; i < num_segs ; i++ ) {
- position[0] = 2.5 * sinf( angle );
- position[1] = 2.5 * cosf( angle );
- position[2] = (i & 1) ? far : near;
- position[3] = 1.0f;
-
- position[4] = position[0];
- position[5] = position[1];
- position[6] = (i & 1) ? near : far;
- position[7] = 1.0f;
-
- position += 8;
-
- texture[0] = tex_coord;
- texture[1] = (i & 1) ? far_tex : near_tex;
- texture += 2;
-
- texture[0] = tex_coord;
- texture[1] = (i & 1) ? near_tex : far_tex;
- texture += 2;
-
- angle += angle_step;
- tex_coord += tex_coord_step;
-
- position[0] = 2.5 * sinf( angle );
- position[1] = 2.5 * cosf( angle );
- position[2] = (i & 1) ? near : far;
- position[3] = 1.0f;
-
- position[4] = position[0];
- position[5] = position[1];
- position[6] = (i & 1) ? far : near;
- position[7] = 1.0f;
-
- position += 8;
-
- texture[0] = tex_coord;
- texture[1] = (i & 1) ? near_tex : far_tex;
- texture += 2;
-
- texture[0] = tex_coord;
- texture[1] = (i & 1) ? far_tex : near_tex;
- texture += 2;
- }
-}
-
-
-static void generate_textures( unsigned mode )
-{
-#define LEVEL_COLORS 6
- const GLfloat colors[LEVEL_COLORS][3] = {
- { 1.0, 0.0, 0.0 }, /* 32 x 32 */
- { 0.0, 1.0, 0.0 }, /* 16 x 16 */
- { 0.0, 0.0, 1.0 }, /* 8 x 8 */
- { 1.0, 0.0, 1.0 }, /* 4 x 4 */
- { 1.0, 1.0, 1.0 }, /* 2 x 2 */
- { 1.0, 1.0, 0.0 } /* 1 x 1 */
- };
- const unsigned checkers_per_level = 2;
- GLfloat * tex;
- unsigned level;
- unsigned size;
- GLint max_size;
-
-
- glGetIntegerv( GL_MAX_TEXTURE_SIZE, & max_size );
- if ( max_size > 512 ) {
- max_size = 512;
- }
-
- tex = malloc( sizeof( GLfloat ) * 3 * max_size * max_size );
-
- level = 0;
- for ( size = max_size ; size > 0 ; size >>= 1 ) {
- unsigned divisor = size / checkers_per_level;
- unsigned i;
- unsigned j;
- GLfloat checkers[2][3];
-
-
- if ((level == 0) || (mode == 1)) {
- checkers[0][0] = 1.0;
- checkers[0][1] = 1.0;
- checkers[0][2] = 1.0;
- checkers[1][0] = 0.0;
- checkers[1][1] = 0.0;
- checkers[1][2] = 0.0;
- }
- else if (mode == 2) {
- checkers[0][0] = colors[level % LEVEL_COLORS][0];
- checkers[0][1] = colors[level % LEVEL_COLORS][1];
- checkers[0][2] = colors[level % LEVEL_COLORS][2];
- checkers[1][0] = colors[level % LEVEL_COLORS][0] * 0.5;
- checkers[1][1] = colors[level % LEVEL_COLORS][1] * 0.5;
- checkers[1][2] = colors[level % LEVEL_COLORS][2] * 0.5;
- }
- else {
- checkers[0][0] = colors[level % LEVEL_COLORS][0];
- checkers[0][1] = colors[level % LEVEL_COLORS][1];
- checkers[0][2] = colors[level % LEVEL_COLORS][2];
- checkers[1][0] = colors[level % LEVEL_COLORS][0];
- checkers[1][1] = colors[level % LEVEL_COLORS][1];
- checkers[1][2] = colors[level % LEVEL_COLORS][2];
- }
-
- if ( divisor == 0 ) {
- divisor = 1;
-
- checkers[0][0] = (checkers[0][0] + checkers[1][0]) / 2;
- checkers[0][1] = (checkers[0][0] + checkers[1][0]) / 2;
- checkers[0][2] = (checkers[0][0] + checkers[1][0]) / 2;
- checkers[1][0] = checkers[0][0];
- checkers[1][1] = checkers[0][1];
- checkers[1][2] = checkers[0][2];
- }
-
-
- for ( i = 0 ; i < size ; i++ ) {
- for ( j = 0 ; j < size ; j++ ) {
- const unsigned idx = ((i ^ j) / divisor) & 1;
-
- tex[ ((i * size) + j) * 3 + 0] = checkers[ idx ][0];
- tex[ ((i * size) + j) * 3 + 1] = checkers[ idx ][1];
- tex[ ((i * size) + j) * 3 + 2] = checkers[ idx ][2];
- }
- }
-
- glTexImage2D( GL_TEXTURE_2D, level, GL_RGB, size, size, 0,
- GL_RGB, GL_FLOAT, tex );
- level++;
- }
-
- free( tex );
-}
-
-
-int main( int argc, char ** argv )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 800, 600 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
- glutCreateWindow( "Texture Filter Test" );
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutSpecialFunc( SpecialKey );
- glutDisplayFunc( Display );
-
- Init();
-
- printf("\nUse the right-button menu to select the texture and filter mode.\n");
- printf("Use 'A' and 'a' to increase and decrease the aniotropy.\n");
- printf("Use 'S' and 's' to increase and decrease the number of cylinder segments.\n");
- printf("Use 'q' to exit.\n\n");
-
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/texgenmix.c b/progs/tests/texgenmix.c
deleted file mode 100644
index be8f6775c7..0000000000
--- a/progs/tests/texgenmix.c
+++ /dev/null
@@ -1,640 +0,0 @@
-
-/*
- * Demonstrates mixed texgen/non-texgen texture coordinates.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <GL/glut.h>
-
-#undef max
-#undef min
-#define max( a, b ) ((a) >= (b) ? (a) : (b))
-#define min( a, b ) ((a) <= (b) ? (a) : (b))
-
-GLfloat labelColor0[4] = { 1.0, 1.0, 1.0, 1.0 };
-GLfloat labelColor1[4] = { 1.0, 1.0, 0.4, 1.0 };
-GLfloat *labelInfoColor = labelColor0;
-
-GLboolean doubleBuffered = GL_TRUE;
-GLboolean drawTextured = GL_TRUE;
-
-int textureWidth = 64;
-int textureHeight = 64;
-
-int winWidth = 580, winHeight = 720;
-
-const GLfloat texmat_swap_rq[16] = { 1.0, 0.0, 0.0, 0.0,
- 0.0, 1.0, 0.0, 0.0,
- 0.0, 0.0, 0.0, 1.0,
- 0.0, 0.0, 1.0, 0.0};
-
-const GLfloat nullPlane[4] = { 0.0, 0.0, 0.0, 0.0 };
-const GLfloat ObjPlaneS1[4] = { 1.0, 0.0, 1.0, 0.0 };
-const GLfloat ObjPlaneS2[4] = { 0.5, 0.0, 0.0, 0.0 };
-const GLfloat ObjPlaneS3[4] = { 1.0, 0.0, 0.0, 0.0 };
-const GLfloat ObjPlaneT[4] = { 0.0, 1.0, 0.0, 0.0 };
-const GLfloat ObjPlaneT2[4] = { 0.0, 0.5, 0.0, 0.0 };
-const GLfloat ObjPlaneT3[4] = { 0.0, 1.0, 0.0, 0.0 };
-const GLfloat ObjPlaneR[4] = { 0.0, 0.0, 1.0, 0.0 };
-const GLfloat ObjPlaneQ[4] = { 0.0, 0.0, 0.0, 0.5 };
-
-
-static void checkErrors( void )
-{
- GLenum error;
-
- while ( (error = glGetError()) != GL_NO_ERROR ) {
- fprintf( stderr, "Error: %s\n", (char *) gluErrorString( error ) );
- }
-}
-
-static void drawString( const char *string, GLfloat x, GLfloat y,
- const GLfloat color[4] )
-{
- glColor4fv( color );
- glRasterPos2f( x, y );
-
- while ( *string ) {
- glutBitmapCharacter( GLUT_BITMAP_TIMES_ROMAN_10, *string );
- string++;
- }
-}
-
-static void begin2D( int width, int height )
-{
- glMatrixMode( GL_PROJECTION );
-
- glPushMatrix();
- glLoadIdentity();
-
- glOrtho( 0, width, 0, height, -1, 1 );
- glMatrixMode( GL_MODELVIEW );
-
- glPushMatrix();
- glLoadIdentity();
-}
-
-static void end2D( void )
-{
- glMatrixMode( GL_PROJECTION );
- glPopMatrix();
- glMatrixMode( GL_MODELVIEW );
- glPopMatrix();
-}
-
-static void initialize( void )
-{
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
-
- glOrtho( -1.5, 1.5, -1.5, 1.5, -1.5, 1.5 );
-
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
-
- glShadeModel( GL_FLAT );
-}
-
-/* ARGSUSED1 */
-static void keyboard( unsigned char c, int x, int y )
-{
- switch ( c ) {
- case 't':
- drawTextured = !drawTextured;
- break;
- case 27: /* Escape key should force exit. */
- exit(0);
- break;
- default:
- break;
- }
- glutPostRedisplay();
-}
-
-/* ARGSUSED1 */
-static void special( int key, int x, int y )
-{
- switch ( key ) {
- case GLUT_KEY_DOWN:
- break;
- case GLUT_KEY_UP:
- break;
- case GLUT_KEY_LEFT:
- break;
- case GLUT_KEY_RIGHT:
- break;
- default:
- break;
- }
- glutPostRedisplay();
-}
-
-static void
-reshape( int w, int h )
-{
- winWidth = w;
- winHeight = h;
- /* No need to call glViewPort here since "draw" calls it! */
-}
-
-static void loadTexture( int width, int height )
-{
- int alphaSize = 1;
- int rgbSize = 3;
- GLubyte *texImage, *p;
- int elementsPerGroup, elementSize, groupSize, rowSize;
- int i, j;
-
-
- elementsPerGroup = alphaSize + rgbSize;
- elementSize = sizeof(GLubyte);
- groupSize = elementsPerGroup * elementSize;
- rowSize = width * groupSize;
-
- if ( (texImage = (GLubyte *) malloc( height * rowSize ) ) == NULL ) {
- fprintf( stderr, "texture malloc failed\n" );
- return;
- }
-
- for ( i = 0 ; i < height ; i++ )
- {
- p = texImage + i * rowSize;
-
- for ( j = 0 ; j < width ; j++ )
- {
- if ( rgbSize > 0 )
- {
- /**
- ** +-----+-----+
- ** | | |
- ** | R | G |
- ** | | |
- ** +-----+-----+
- ** | | |
- ** | Y | B |
- ** | | |
- ** +-----+-----+
- **/
- if ( i > height / 2 ) {
- if ( j < width / 2 ) {
- p[0] = 0xff;
- p[1] = 0x00;
- p[2] = 0x00;
- } else {
- p[0] = 0x00;
- p[1] = 0xff;
- p[2] = 0x00;
- }
- } else {
- if ( j < width / 2 ) {
- p[0] = 0xff;
- p[1] = 0xff;
- p[2] = 0x00;
- } else {
- p[0] = 0x00;
- p[1] = 0x00;
- p[2] = 0xff;
- }
- }
- p += 3 * elementSize;
- }
-
- if ( alphaSize > 0 )
- {
- /**
- ** +-----------+
- ** | W |
- ** | +-----+ |
- ** | | | |
- ** | | B | |
- ** | | | |
- ** | +-----+ |
- ** | |
- ** +-----------+
- **/
- int i2 = i - height / 2;
- int j2 = j - width / 2;
- int h8 = height / 8;
- int w8 = width / 8;
- if ( -h8 <= i2 && i2 <= h8 && -w8 <= j2 && j2 <= w8 ) {
- p[0] = 0x00;
- } else if ( -2 * h8 <= i2 && i2 <= 2 * h8 && -2 * w8 <= j2 && j2 <= 2 * w8 ) {
- p[0] = 0x55;
- } else if ( -3 * h8 <= i2 && i2 <= 3 * h8 && -3 * w8 <= j2 && j2 <= 3 * w8 ) {
- p[0] = 0xaa;
- } else {
- p[0] = 0xff;
- }
- p += elementSize;
- }
- }
- }
-
- glTexImage2D( GL_TEXTURE_2D, 0,
- GL_RGBA, width, height, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, texImage );
-
- free( texImage );
-}
-
-
-static void drawSample( int x, int y, int w, int h,
- int texgenenabled, int coordnr )
-{
- char buf[255];
-
- glViewport( x, y, w, h );
- glScissor( x, y, w, h );
-
- glClearColor( 0.1, 0.1, 0.1, 1.0 );
- glClear( GL_COLOR_BUFFER_BIT );
-
- begin2D( w, h );
- if (texgenenabled == 2) {
- sprintf( buf, "TexCoord%df", coordnr);
- drawString( buf, 10, h - 15, labelInfoColor );
- sprintf( buf, "texgen enabled for %s coordinate(s)", coordnr == 2 ? "S" : "S/T");
- drawString( buf, 10, 5, labelInfoColor );
- }
- else if (texgenenabled == 0) {
- sprintf( buf, "TexCoord%df", coordnr);
- drawString( buf, 10, h - 15, labelInfoColor );
- drawString( "no texgen", 10, 5, labelInfoColor );
- }
- else if (texgenenabled == 1) {
- drawString( "no TexCoord", 10, h - 15, labelInfoColor );
- sprintf( buf, "texgen enabled for %s coordinate(s)",
- coordnr == 2 ? "S/T" : (coordnr == 3 ? "S/T/R" : "S/T/R/Q"));
- drawString( buf, 10, 5, labelInfoColor );
- }
-
- end2D();
-
- glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE );
-
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
-
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP );
- glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP );
-
- loadTexture( textureWidth, textureHeight );
-
- if ( drawTextured ) {
- glEnable( GL_TEXTURE_2D );
- }
-
- glDisable( GL_TEXTURE_GEN_S );
- glDisable( GL_TEXTURE_GEN_T );
- glDisable( GL_TEXTURE_GEN_R );
- glDisable( GL_TEXTURE_GEN_Q );
-
- glMatrixMode( GL_TEXTURE );
- glLoadIdentity();
- glMatrixMode( GL_MODELVIEW );
- glPushMatrix();
-
- switch (coordnr) {
- case 2:
- switch (texgenenabled) {
- case 0:
- glBegin( GL_QUADS );
- glTexCoord2f( 0.0, 0.0 );
- glVertex2f( -0.8, -0.8 );
-
- glTexCoord2f( 1.0, 0.0 );
- glVertex2f( 0.8, -0.8 );
-
- glTexCoord2f( 1.0, 1.0 );
- glVertex2f( 0.8, 0.8 );
-
- glTexCoord2f( 0.0, 1.0 );
- glVertex2f( -0.8, 0.8 );
- glEnd();
- break;
- case 1:
- glTranslatef( -0.8, -0.8, 0.0 );
- glScalef( 1.6, 1.6, 1.0 );
- glTexGeni( GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR );
- glTexGeni( GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR );
- glTexGeni( GL_R, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR );
- glTexGeni( GL_Q, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR );
- glTexGenfv(GL_S, GL_OBJECT_PLANE, ObjPlaneS3);
- glTexGenfv(GL_T, GL_OBJECT_PLANE, ObjPlaneT3);
- glTexGenfv(GL_R, GL_OBJECT_PLANE, nullPlane);
- glTexGenfv(GL_Q, GL_OBJECT_PLANE, nullPlane);
-
- glEnable( GL_TEXTURE_GEN_S );
- glEnable( GL_TEXTURE_GEN_T );
-
- /* Issue a texcoord here to be sure Q isn't left over from a
- * previous sample.
- */
- glTexCoord1f( 0.0 );
- glBegin( GL_QUADS );
- glVertex2f( 0.0, 0.0 );
- glVertex2f( 1.0, 0.0 );
- glVertex2f( 1.0, 1.0 );
- glVertex2f( 0.0, 1.0 );
- glEnd();
- break;
- case 2:
- /* make sure that texgen T and non-texgen S coordinate are wrong */
- glTexGeni( GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR );
- glTexGeni( GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR );
- glTexGeni( GL_R, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR );
- glTexGeni( GL_Q, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR );
- glTexGenfv(GL_S, GL_OBJECT_PLANE, ObjPlaneS1);
- glTexGenfv(GL_T, GL_OBJECT_PLANE, nullPlane);
- glTexGenfv(GL_R, GL_OBJECT_PLANE, nullPlane);
- glTexGenfv(GL_Q, GL_OBJECT_PLANE, nullPlane);
-
- glEnable( GL_TEXTURE_GEN_S );
-
- glBegin( GL_QUADS );
- /* use z coordinate to get correct texgen values... */
- glTexCoord2f( 0.0, 0.0 );
- glVertex3f( -0.8, -0.8, 0.8 );
-
- glTexCoord2f( 0.0, 0.0 );
- glVertex3f( 0.8, -0.8, 0.2 );
-
- glTexCoord2f( 0.0, 1.0 );
- glVertex3f( 0.8, 0.8, 0.2 );
-
- glTexCoord2f( 0.0, 1.0 );
- glVertex3f( -0.8, 0.8, 0.8 );
- glEnd();
- break;
- }
- break;
- case 3:
- glMatrixMode( GL_TEXTURE );
- glLoadMatrixf( texmat_swap_rq );
- glMatrixMode( GL_MODELVIEW );
- glTranslatef( -0.8, -0.8, 0.0 );
- glScalef( 1.6, 1.6, 1.0 );
- switch (texgenenabled) {
- case 0:
- glBegin( GL_QUADS );
- glTexCoord3f( 0.0, 0.0, 0.5 );
- glVertex2f( 0.0, 0.0 );
-
- glTexCoord3f( 0.5, 0.0, 0.5 );
- glVertex2f( 1.0, 0.0 );
-
- glTexCoord3f( 0.5, 0.5, 0.5 );
- glVertex2f( 1.0, 1.0 );
-
- glTexCoord3f( 0.0, 0.5, 0.5 );
- glVertex2f( 0.0, 1.0 );
- glEnd();
- break;
- case 1:
- glTexGeni( GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR );
- glTexGeni( GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR );
- glTexGeni( GL_R, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR );
- glTexGeni( GL_Q, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR );
- glTexGenfv(GL_S, GL_OBJECT_PLANE, ObjPlaneS2);
- glTexGenfv(GL_T, GL_OBJECT_PLANE, ObjPlaneT2);
- glTexGenfv(GL_R, GL_OBJECT_PLANE, ObjPlaneR);
- glTexGenfv(GL_Q, GL_OBJECT_PLANE, nullPlane);
-
- glEnable( GL_TEXTURE_GEN_S );
- glEnable( GL_TEXTURE_GEN_T );
- glEnable( GL_TEXTURE_GEN_R );
-
- glTexCoord1f( 0.0 ); /* to make sure Q is 1.0 */
- glBegin( GL_QUADS );
- glVertex3f( 0.0, 0.0, 0.5 );
- glVertex3f( 1.0, 0.0, 0.5 );
- glVertex3f( 1.0, 1.0, 0.5 );
- glVertex3f( 0.0, 1.0, 0.5 );
- glEnd();
- break;
- case 2:
- /* make sure that texgen R/Q and non-texgen S/T coordinates are wrong */
- glTexGeni( GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR );
- glTexGeni( GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR );
- glTexGeni( GL_R, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR );
- glTexGeni( GL_Q, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR );
- glTexGenfv(GL_S, GL_OBJECT_PLANE, ObjPlaneS2);
- glTexGenfv(GL_T, GL_OBJECT_PLANE, ObjPlaneT2);
- glTexGenfv(GL_R, GL_OBJECT_PLANE, nullPlane);
- glTexGenfv(GL_Q, GL_OBJECT_PLANE, nullPlane);
-
- glEnable( GL_TEXTURE_GEN_S );
- glEnable( GL_TEXTURE_GEN_T );
-
- glBegin( GL_QUADS );
- glTexCoord3f( 0.0, 0.0, 0.5 );
- glVertex2f( 0.0, 0.0);
-
- glTexCoord3f( 0.0, 0.0, 0.5 );
- glVertex2f( 1.0, 0.0);
-
- glTexCoord3f( 0.0, 0.0, 0.5 );
- glVertex2f( 1.0, 1.0);
-
- glTexCoord3f( 0.0, 0.0, 0.5 );
- glVertex2f( 0.0, 1.0);
- glEnd();
- break;
- }
- break;
- case 4:
- switch (texgenenabled) {
- case 0:
- glBegin( GL_QUADS );
- /* don't need r coordinate but still setting it I'm mean */
- glTexCoord4f( 0.0, 0.0, 0.0, 0.5 );
- glVertex2f( -0.8, -0.8 );
-
- glTexCoord4f( 0.5, 0.0, 0.2, 0.5 );
- glVertex2f( 0.8, -0.8 );
-
- glTexCoord4f( 0.5, 0.5, 0.5, 0.5 );
- glVertex2f( 0.8, 0.8 );
-
- glTexCoord4f( 0.0, 0.5, 0.5, 0.5 );
- glVertex2f( -0.8, 0.8 );
- glEnd();
- break;
- case 1:
- glTranslatef( -0.8, -0.8, 0.0 );
- glScalef( 1.6, 1.6, 1.0 );
- /* make sure that texgen R/Q and non-texgen S/T coordinates are wrong */
- glTexGeni( GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR );
- glTexGeni( GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR );
- glTexGeni( GL_R, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR );
- glTexGeni( GL_Q, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR );
- glTexGenfv(GL_S, GL_OBJECT_PLANE, ObjPlaneS2);
- glTexGenfv(GL_T, GL_OBJECT_PLANE, ObjPlaneT2);
- glTexGenfv(GL_R, GL_OBJECT_PLANE, ObjPlaneR);
- glTexGenfv(GL_Q, GL_OBJECT_PLANE, ObjPlaneQ);
-
- glEnable( GL_TEXTURE_GEN_S );
- glEnable( GL_TEXTURE_GEN_T );
- glEnable( GL_TEXTURE_GEN_R );
- glEnable( GL_TEXTURE_GEN_Q );
-
- glBegin( GL_QUADS );
- glVertex2f( 0.0, 0.0 );
- glVertex2f( 1.0, 0.0 );
- glVertex2f( 1.0, 1.0 );
- glVertex2f( 0.0, 1.0 );
- glEnd();
- break;
- case 2:
- glTranslatef( -0.8, -0.8, 0.0 );
- glScalef( 1.6, 1.6, 1.0 );
- /* make sure that texgen R/Q and non-texgen S/T coordinates are wrong */
- glTexGeni( GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR );
- glTexGeni( GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR );
- glTexGeni( GL_R, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR );
- glTexGeni( GL_Q, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR );
- glTexGenfv(GL_S, GL_OBJECT_PLANE, ObjPlaneS2);
- glTexGenfv(GL_T, GL_OBJECT_PLANE, ObjPlaneT2);
- glTexGenfv(GL_R, GL_OBJECT_PLANE, nullPlane);
- glTexGenfv(GL_Q, GL_OBJECT_PLANE, nullPlane);
-
- glEnable( GL_TEXTURE_GEN_S );
- glEnable( GL_TEXTURE_GEN_T );
-
- glBegin( GL_QUADS );
- glTexCoord4f( 0.0, 0.0, 0.0, 0.5 );
- glVertex2f( 0.0, 0.0 );
-
- glTexCoord4f( 0.0, 0.0, 0.2, 0.5 );
- glVertex2f( 1.0, 0.0 );
-
- glTexCoord4f( 0.0, 0.0, 0.5, 0.5 );
- glVertex2f( 1.0, 1.0 );
-
- glTexCoord4f( 0.0, 0.0, 0.75, 0.5 );
- glVertex2f( 0.0, 1.0 );
- glEnd();
- break;
- }
- break;
- }
-
- glPopMatrix();
- glDisable( GL_TEXTURE_2D );
-
-}
-
-static void display( void )
-{
- int numX = 3, numY = 3;
- float xBase = (float) winWidth * 0.01;
- float xOffset = (winWidth - xBase) / numX;
- float xSize = max( xOffset - xBase, 1 );
- float yBase = (float) winHeight * 0.01;
- float yOffset = (winHeight - yBase) / numY;
- float ySize = max( yOffset - yBase, 1 );
- float x, y;
- int i, j;
-
- glViewport( 0, 0, winWidth, winHeight );
- glDisable( GL_SCISSOR_TEST );
- glClearColor( 0.0, 0.0, 0.0, 0.0 );
- glClear( GL_COLOR_BUFFER_BIT );
- glEnable( GL_SCISSOR_TEST );
-
- x = xBase;
- y = (winHeight - 1) - yOffset;
-
- for ( i = 0 ; i < numY ; i++ )
- {
-
- labelInfoColor = labelColor1;
-
-
- for ( j = 0 ; j < numX ; j++ ) {
- drawSample( x, y, xSize, ySize, i, j+2 );
- x += xOffset;
- }
-
- x = xBase;
- y -= yOffset;
- }
-
- if ( doubleBuffered ) {
- glutSwapBuffers();
- } else {
- glFlush();
- }
-
- checkErrors();
-}
-
-static void usage( char *name )
-{
- fprintf( stderr, "usage: %s [ options ]\n", name );
- fprintf( stderr, "\n" );
- fprintf( stderr, "options:\n" );
- fprintf( stderr, " -sb single buffered\n" );
- fprintf( stderr, " -db double buffered\n" );
- fprintf( stderr, " -info print OpenGL driver info\n" );
-}
-
-static void instructions( void )
-{
- fprintf( stderr, "texgenmix - mixed texgen/non-texgen texture coordinate test\n" );
- fprintf( stderr, "all quads should look the same!\n" );
- fprintf( stderr, "\n" );
- fprintf( stderr, " [t] - toggle texturing\n" );
-}
-
-int main( int argc, char *argv[] )
-{
- GLboolean info = GL_FALSE;
- int i;
-
- glutInit( &argc, argv );
-
- for ( i = 1 ; i < argc ; i++ ) {
- if ( !strcmp( "-sb", argv[i] ) ) {
- doubleBuffered = GL_FALSE;
- } else if ( !strcmp( "-db", argv[i] ) ) {
- doubleBuffered = GL_TRUE;
- } else if ( !strcmp( "-info", argv[i] ) ) {
- info = GL_TRUE;
- } else {
- usage( argv[0] );
- exit( 1 );
- }
- }
-
- if ( doubleBuffered ) {
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
- } else {
- glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE );
- }
-
- glutInitWindowSize( winWidth, winHeight );
- glutInitWindowPosition( 0, 0 );
- glutCreateWindow( "Mixed texgen/non-texgen texture coordinate test" );
-
- initialize();
- instructions();
-
- if ( info ) {
- printf( "\n" );
- 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 ) );
- }
-
- glutDisplayFunc( display );
- glutReshapeFunc( reshape );
- glutKeyboardFunc( keyboard );
- glutSpecialFunc( special );
- glutMainLoop();
-
- return 0;
-}
diff --git a/progs/tests/texline.c b/progs/tests/texline.c
deleted file mode 100644
index d3935b94af..0000000000
--- a/progs/tests/texline.c
+++ /dev/null
@@ -1,279 +0,0 @@
-/* $Id: texline.c,v 1.5 2004/01/28 10:07:48 keithw Exp $ */
-
-/*
- * Test textured lines.
- *
- * Brian Paul
- * September 2000
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <GL/glut.h>
-#include "../util/readtex.c" /* I know, this is a hack. */
-
-#define TEXTURE_FILE "../images/girl.rgb"
-
-static GLboolean Antialias = GL_FALSE;
-static GLboolean Animate = GL_FALSE;
-static GLint Texture = 1;
-static GLboolean Stipple = GL_FALSE;
-static GLfloat LineWidth = 1.0;
-
-static GLfloat Xrot = -60.0, Yrot = 0.0, Zrot = 0.0;
-static GLfloat DYrot = 1.0;
-static GLboolean Points = GL_FALSE;
-static GLfloat Scale = 1.0;
-
-static void Idle( void )
-{
- if (Animate) {
- Zrot += DYrot;
- glutPostRedisplay();
- }
-}
-
-
-static void Display( void )
-{
- GLfloat x, y, s, t;
-
- glClear( GL_COLOR_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);
- glScalef(Scale, Scale, Scale);
-
- if (Texture)
- glColor3f(1, 1, 1);
-
- if (Points) {
- glBegin(GL_POINTS);
- for (t = 0.0; t <= 1.0; t += 0.025) {
- for (s = 0.0; s <= 1.0; s += 0.025) {
- x = s * 2.0 - 1.0;
- y = t * 2.0 - 1.0;
- if (!Texture)
- glColor3f(1, 0, 1);
- glMultiTexCoord2fARB(GL_TEXTURE1_ARB, t, s);
- glTexCoord2f(s, t);
- glVertex2f(x, y);
- }
- }
- glEnd();
- }
- else {
- glBegin(GL_LINES);
- for (t = 0.0; t <= 1.0; t += 0.025) {
- x = t * 2.0 - 1.0;
- if (!Texture)
- glColor3f(1, 0, 1);
- glTexCoord2f(t, 0.0);
- glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 0.0, t);
- glVertex2f(x, -1.0);
- if (!Texture)
- glColor3f(0, 1, 0);
- glTexCoord2f(t, 1.0);
- glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 1.0, t);
- glVertex2f(x, 1.0);
- }
- glEnd();
- }
-
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- GLfloat ar = (float) width / height;
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -ar, ar, -1.0, 1.0, 10.0, 100.0 );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -12.0 );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 'a':
- Antialias = !Antialias;
- if (Antialias) {
- glEnable(GL_LINE_SMOOTH);
- glEnable(GL_POINT_SMOOTH);
- glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- }
- else {
- glDisable(GL_LINE_SMOOTH);
- glDisable(GL_POINT_SMOOTH);
- glDisable(GL_BLEND);
- }
- break;
- case 't':
- Texture++;
- if (Texture > 2)
- Texture = 0;
- if (Texture == 0) {
- glActiveTextureARB(GL_TEXTURE0_ARB);
- glDisable(GL_TEXTURE_2D);
- glActiveTextureARB(GL_TEXTURE1_ARB);
- glDisable(GL_TEXTURE_2D);
- }
- else if (Texture == 1) {
- glActiveTextureARB(GL_TEXTURE0_ARB);
- glEnable(GL_TEXTURE_2D);
- glActiveTextureARB(GL_TEXTURE1_ARB);
- glDisable(GL_TEXTURE_2D);
- }
- else {
- glActiveTextureARB(GL_TEXTURE0_ARB);
- glEnable(GL_TEXTURE_2D);
- glActiveTextureARB(GL_TEXTURE1_ARB);
- glEnable(GL_TEXTURE_2D);
- }
- break;
- case 'w':
- LineWidth -= 0.25;
- if (LineWidth < 0.25)
- LineWidth = 0.25;
- glLineWidth(LineWidth);
- glPointSize(LineWidth);
- break;
- case 'W':
- LineWidth += 0.25;
- if (LineWidth > 8.0)
- LineWidth = 8.0;
- glLineWidth(LineWidth);
- glPointSize(LineWidth);
- break;
- case 'p':
- Points = !Points;
- break;
- case 's':
- Stipple = !Stipple;
- if (Stipple)
- glEnable(GL_LINE_STIPPLE);
- else
- glDisable(GL_LINE_STIPPLE);
- break;
- case ' ':
- Animate = !Animate;
- if (Animate)
- glutIdleFunc(Idle);
- else
- glutIdleFunc(NULL);
- break;
- case 27:
- exit(0);
- break;
- }
- printf("LineWidth, PointSize = %f\n", LineWidth);
- 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[] )
-{
- GLfloat r[2];
- GLuint u;
-
- for (u = 0; u < 2; u++) {
- glActiveTextureARB(GL_TEXTURE0_ARB + u);
- glBindTexture(GL_TEXTURE_2D, 10+u);
- if (u == 0)
- glEnable(GL_TEXTURE_2D);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-
- if (u == 0)
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
- else
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD);
-
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- if (!LoadRGBMipmaps(TEXTURE_FILE, GL_RGB)) {
- printf("Error: couldn't load texture image\n");
- exit(1);
- }
- }
-
- glLineStipple(1, 0xff);
-
- 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));
- }
-
- glGetFloatv(GL_ALIASED_POINT_SIZE_RANGE, r);
- printf("Non-smooth point size range: %g .. %g\n", r[0], r[1]);
- glGetFloatv(GL_POINT_SIZE_RANGE, r);
- printf("Smoothed point size range: %g .. %g\n", r[0], r[1]);
- glGetFloatv(GL_ALIASED_LINE_WIDTH_RANGE, r);
- printf("Non-smooth line width range: %g .. %g\n", r[0], r[1]);
- glGetFloatv(GL_LINE_WIDTH_RANGE, r);
- printf("Smoothed line width range: %g .. %g\n", r[0], r[1]);
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition(0, 0);
- glutInitWindowSize( 400, 300 );
-
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
-
- glutCreateWindow(argv[0] );
-
- Init(argc, argv);
-
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutSpecialFunc( SpecialKey );
- glutDisplayFunc( Display );
- if (Animate)
- glutIdleFunc( Idle );
-
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/texobjshare.c b/progs/tests/texobjshare.c
deleted file mode 100644
index 2b31cb6c4d..0000000000
--- a/progs/tests/texobjshare.c
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Create several OpenGL rendering contexts, sharing textures, display
- * lists, etc. Exercise binding, deleting, etc.
- *
- * Brian Paul
- * 21 December 2004
- */
-
-
-#include <GL/gl.h>
-#include <GL/glx.h>
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <X11/keysym.h>
-
-
-/*
- * Each display/window/context:
- */
-struct context {
- char DisplayName[1000];
- Display *Dpy;
- Window Win;
- GLXContext Context;
-};
-
-
-#define MAX_CONTEXTS 200
-static struct context Contexts[MAX_CONTEXTS];
-static int NumContexts = 0;
-
-
-static void
-Error(const char *display, const char *msg)
-{
- fprintf(stderr, "Error on display %s - %s\n", display, msg);
- exit(1);
-}
-
-
-static struct context *
-CreateContext(const char *displayName, const char *name)
-{
- Display *dpy;
- Window win;
- GLXContext ctx;
- int attrib[] = { GLX_RGBA,
- GLX_RED_SIZE, 1,
- GLX_GREEN_SIZE, 1,
- GLX_BLUE_SIZE, 1,
- GLX_DOUBLEBUFFER,
- None };
- int scrnum;
- XSetWindowAttributes attr;
- unsigned long mask;
- Window root;
- XVisualInfo *visinfo;
- int width = 90, height = 90;
- int xpos = 0, ypos = 0;
-
- if (NumContexts >= MAX_CONTEXTS)
- return NULL;
-
- dpy = XOpenDisplay(displayName);
- if (!dpy) {
- Error(displayName, "Unable to open display");
- return NULL;
- }
-
- scrnum = DefaultScreen(dpy);
- root = RootWindow(dpy, scrnum);
-
- visinfo = glXChooseVisual(dpy, scrnum, attrib);
- if (!visinfo) {
- Error(displayName, "Unable to find RGB, double-buffered visual");
- return NULL;
- }
-
- /* window attributes */
- xpos = (NumContexts % 10) * 100;
- ypos = (NumContexts / 10) * 100;
- attr.background_pixel = 0;
- attr.border_pixel = 0;
- attr.colormap = XCreateColormap(dpy, root, visinfo->visual, AllocNone);
- attr.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask;
- mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask;
-
- win = XCreateWindow(dpy, root, xpos, ypos, width, height,
- 0, visinfo->depth, InputOutput,
- visinfo->visual, mask, &attr);
- if (!win) {
- Error(displayName, "Couldn't create window");
- return NULL;
- }
-
- {
- XSizeHints sizehints;
- sizehints.x = xpos;
- sizehints.y = ypos;
- sizehints.width = width;
- sizehints.height = height;
- sizehints.flags = USSize | USPosition;
- XSetNormalHints(dpy, win, &sizehints);
- XSetStandardProperties(dpy, win, name, name,
- None, (char **)NULL, 0, &sizehints);
- }
-
- if (NumContexts == 0) {
- ctx = glXCreateContext(dpy, visinfo, NULL, True);
- }
- else {
- /* share textures & dlists with 0th context */
- ctx = glXCreateContext(dpy, visinfo, Contexts[0].Context, True);
- }
- if (!ctx) {
- Error(displayName, "Couldn't create GLX context");
- return NULL;
- }
-
- XMapWindow(dpy, win);
-
- if (!glXMakeCurrent(dpy, win, ctx)) {
- Error(displayName, "glXMakeCurrent failed");
- return NULL;
- }
-
- if (NumContexts == 0) {
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- }
-
- /* save the info for this context */
- {
- struct context *h = &Contexts[NumContexts];
- strcpy(h->DisplayName, name);
- h->Dpy = dpy;
- h->Win = win;
- h->Context = ctx;
- NumContexts++;
- return &Contexts[NumContexts-1];
- }
-}
-
-
-static void
-MakeCurrent(int i)
-{
- if (!glXMakeCurrent(Contexts[i].Dpy, Contexts[i].Win, Contexts[i].Context)) {
- fprintf(stderr, "glXMakeCurrent failed!\n");
- }
-}
-
-
-
-static void
-DestroyContext(int i)
-{
- XDestroyWindow(Contexts[i].Dpy, Contexts[i].Win);
- glXDestroyContext(Contexts[i].Dpy, Contexts[i].Context);
- XCloseDisplay(Contexts[i].Dpy);
-}
-
-
-int
-main(int argc, char *argv[])
-{
- char *dpyName = NULL;
- int i;
- GLuint t;
- GLint tb;
-
- for (i = 0; i < 2; i++) {
- CreateContext(dpyName, "context");
- }
-
- /* Create texture and bind it in context 0 */
- MakeCurrent(0);
- glGenTextures(1, &t);
- printf("Generated texture ID %u\n", t);
- assert(!glIsTexture(t));
- glBindTexture(GL_TEXTURE_2D, t);
- assert(glIsTexture(t));
- glGetIntegerv(GL_TEXTURE_BINDING_2D, &tb);
- assert(tb == t);
-
- /* Bind texture in context 1 */
- MakeCurrent(1);
- assert(glIsTexture(t));
- glBindTexture(GL_TEXTURE_2D, t);
- glGetIntegerv(GL_TEXTURE_BINDING_2D, &tb);
- assert(tb == t);
-
- /* Delete texture from context 0 */
- MakeCurrent(0);
- glDeleteTextures(1, &t);
- assert(!glIsTexture(t));
- glGetIntegerv(GL_TEXTURE_BINDING_2D, &tb);
- printf("After delete, binding = %d\n", tb);
-
- /* Check texture state from context 1 */
- MakeCurrent(1);
- assert(!glIsTexture(t));
- glGetIntegerv(GL_TEXTURE_BINDING_2D, &tb);
- printf("In second context, binding = %d\n", tb);
- glBindTexture(GL_TEXTURE_2D, 0);
- glGetIntegerv(GL_TEXTURE_BINDING_2D, &tb);
- assert(tb == 0);
-
-
- for (i = 0; i < NumContexts; i++) {
- DestroyContext(i);
- }
-
- printf("Success!\n");
-
- return 0;
-}
diff --git a/progs/tests/texrect.c b/progs/tests/texrect.c
deleted file mode 100644
index 61c1fdd6b4..0000000000
--- a/progs/tests/texrect.c
+++ /dev/null
@@ -1,360 +0,0 @@
-/* $Id: texrect.c,v 1.5 2004/05/06 20:27:32 brianp Exp $ */
-
-/* GL_NV_texture_rectangle test
- *
- * Brian Paul
- * 14 June 2002
- */
-
-
-#define GL_GLEXT_PROTOTYPES
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <GL/glut.h>
-#include "readtex.h"
-
-#define TEXTURE_0_FILE "../images/girl.rgb"
-#define TEXTURE_1_FILE "../images/reflect.rgb"
-
-#define TEX0 1
-#define TEX7 8
-#define ANIMATE 10
-#define CLAMP 20
-#define CLAMP_TO_EDGE 21
-#define CLAMP_TO_BORDER 22
-#define LINEAR_FILTER 30
-#define NEAREST_FILTER 31
-#define QUIT 100
-
-static GLboolean Animate = GL_FALSE;
-static GLint NumUnits = 2;
-static GLboolean TexEnabled[8];
-static GLint Width[8], Height[8]; /* image sizes */
-static GLenum Format[8];
-
-static GLfloat Xrot = 00.0, Yrot = 00.0, Zrot = 0.0;
-
-
-static void Idle( void )
-{
- Zrot = glutGet(GLUT_ELAPSED_TIME) * 0.01;
- glutPostRedisplay();
-}
-
-
-static void DrawObject(void)
-{
- GLint i;
- GLfloat d = 10; /* so we can see how borders are handled */
-
- glColor3f(.1, .1, .1); /* modulate this */
-
- glPushMatrix();
-
- glRotatef(Zrot, 0, 0, 1);
-
- glBegin(GL_QUADS);
-
- for (i = 0; i < NumUnits; i++)
- glMultiTexCoord2fARB(GL_TEXTURE0_ARB + i, -d, -d);
- glVertex2f(-1.0, -1.0);
-
- for (i = 0; i < NumUnits; i++)
- glMultiTexCoord2fARB(GL_TEXTURE0_ARB + i, Width[i]+d, -d);
- glVertex2f(1.0, -1.0);
-
- for (i = 0; i < NumUnits; i++)
- glMultiTexCoord2fARB(GL_TEXTURE0_ARB + i, Width[i]+d, Height[i]+d);
- glVertex2f(1.0, 1.0);
-
- for (i = 0; i < NumUnits; i++)
- glMultiTexCoord2fARB(GL_TEXTURE0_ARB + i, -d, Height[i]+d);
- glVertex2f(-1.0, 1.0);
-
- glEnd();
- glPopMatrix();
-}
-
-
-static void Display( void )
-{
- glClear( GL_COLOR_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);
- glScalef(5.0, 5.0, 5.0);
- DrawObject();
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 100.0 );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -35.0 );
-}
-
-
-static void ModeMenu(int entry)
-{
- GLint i;
- if (entry >= TEX0 && entry < TEX0 + NumUnits) {
- /* toggle */
- i = entry - TEX0;
- TexEnabled[i] = !TexEnabled[i];
- glActiveTextureARB(GL_TEXTURE0_ARB + i);
- if (TexEnabled[i]) {
- glEnable(GL_TEXTURE_RECTANGLE_NV);
- }
- else {
- glDisable(GL_TEXTURE_RECTANGLE_NV);
- }
- printf("Enabled: ");
- for (i = 0; i < NumUnits; i++)
- printf("%d ", (int) TexEnabled[i]);
- printf("\n");
- }
- else if (entry==ANIMATE) {
- Animate = !Animate;
- if (Animate)
- glutIdleFunc(Idle);
- else
- glutIdleFunc(NULL);
- }
- else if (entry==CLAMP) {
- for (i = 0; i < NumUnits; i++) {
- glActiveTextureARB(GL_TEXTURE0_ARB + i);
- glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_WRAP_S, GL_CLAMP);
- glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_WRAP_T, GL_CLAMP);
- }
- }
- else if (entry==CLAMP_TO_EDGE) {
- for (i = 0; i < NumUnits; i++) {
- glActiveTextureARB(GL_TEXTURE0_ARB + i);
- glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- }
- }
- else if (entry==CLAMP_TO_BORDER) {
- for (i = 0; i < NumUnits; i++) {
- glActiveTextureARB(GL_TEXTURE0_ARB + i);
- glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
- glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
- }
- }
- else if (entry==NEAREST_FILTER) {
- for (i = 0; i < NumUnits; i++) {
- glActiveTextureARB(GL_TEXTURE0_ARB + i);
- glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- }
- }
- else if (entry==LINEAR_FILTER) {
- for (i = 0; i < NumUnits; i++) {
- glActiveTextureARB(GL_TEXTURE0_ARB + i);
- glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- }
- }
-
- else if (entry==QUIT) {
- exit(0);
- }
-
- glutPostRedisplay();
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 'z':
- Zrot -= 1.0;
- break;
- case 'Z':
- Zrot += 1.0;
- break;
- case 'a':
- Animate = !Animate;
- if (Animate)
- glutIdleFunc(Idle);
- else
- glutIdleFunc(NULL);
- 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[] )
-{
- const GLenum wrap = GL_CLAMP;
- GLuint texObj[8];
- GLint size, i;
-
- if (!glutExtensionSupported("GL_ARB_multitexture")) {
- printf("Sorry, GL_ARB_multitexture needed by this program\n");
- exit(1);
- }
-
- if (!glutExtensionSupported("GL_NV_texture_rectangle")) {
- printf("Sorry, GL_NV_texture_rectangle needed by this program\n");
- exit(1);
- }
-
- glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &NumUnits);
- printf("%d texture units supported, using 2.\n", NumUnits);
- if (NumUnits > 2)
- NumUnits = 2;
-
- glGetIntegerv(GL_MAX_RECTANGLE_TEXTURE_SIZE_NV, &size);
- printf("%d x %d max texture rectangle size\n", size, size);
-
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-
- for (i = 0; i < NumUnits; i++) {
- TexEnabled[i] = GL_TRUE;
- }
-
- /* allocate two texture objects */
- glGenTextures(NumUnits, texObj);
-
- /* setup the texture objects */
- for (i = 0; i < NumUnits; i++) {
-
- glActiveTextureARB(GL_TEXTURE0_ARB + i);
-
- glBindTexture(GL_TEXTURE_RECTANGLE_NV, texObj[i]);
- glTexParameteri(GL_TEXTURE_RECTANGLE_NV,
- GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_RECTANGLE_NV,
- GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_WRAP_S, wrap);
- glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_WRAP_T, wrap);
-
- if (i == 0) {
- GLubyte *img = LoadRGBImage(TEXTURE_0_FILE, &Width[0], &Height[0],
- &Format[0]);
- if (!img) {
- printf("Error: couldn't load texture image\n");
- exit(1);
- }
- printf("Texture %d: %s (%d x %d)\n", i,
- TEXTURE_0_FILE, Width[0], Height[0]);
- glTexImage2D(GL_TEXTURE_RECTANGLE_NV, 0, GL_RGB,
- Width[0], Height[0], 0,
- Format[0], GL_UNSIGNED_BYTE, img);
- }
- else {
- GLubyte *img = LoadRGBImage(TEXTURE_1_FILE, &Width[1], &Height[1],
- &Format[1]);
- if (!img) {
- printf("Error: couldn't load texture image\n");
- exit(1);
- }
- printf("Texture %d: %s (%d x %d)\n", i,
- TEXTURE_1_FILE, Width[1], Height[1]);
- glTexImage2D(GL_TEXTURE_RECTANGLE_NV, 0, GL_RGB,
- Width[1], Height[1], 0,
- Format[1], GL_UNSIGNED_BYTE, img);
- }
-
- if (i < 1)
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD);
- else
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD);
-
- if (TexEnabled[i])
- glEnable(GL_TEXTURE_RECTANGLE_NV);
- }
-
- glShadeModel(GL_FLAT);
- glClearColor(0.3, 0.3, 0.4, 1.0);
-
- 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[] )
-{
- GLint i;
-
- glutInit( &argc, argv );
- glutInitWindowSize( 300, 300 );
- glutInitWindowPosition( 0, 0 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
- glutCreateWindow(argv[0] );
-
- Init( argc, argv );
-
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutSpecialFunc( SpecialKey );
- glutDisplayFunc( Display );
- if (Animate)
- glutIdleFunc( Idle );
-
- glutCreateMenu(ModeMenu);
-
- for (i = 0; i < NumUnits; i++) {
- char s[100];
- sprintf(s, "Toggle Texture %d", i);
- glutAddMenuEntry(s, TEX0 + i);
- }
- glutAddMenuEntry("Toggle Animation", ANIMATE);
- glutAddMenuEntry("GL_CLAMP", CLAMP);
- glutAddMenuEntry("GL_CLAMP_TO_EDGE", CLAMP_TO_EDGE);
- glutAddMenuEntry("GL_CLAMP_TO_BORDER", CLAMP_TO_BORDER);
- glutAddMenuEntry("GL_NEAREST", NEAREST_FILTER);
- glutAddMenuEntry("GL_LINEAR", LINEAR_FILTER);
- glutAddMenuEntry("Quit", QUIT);
- glutAttachMenu(GLUT_RIGHT_BUTTON);
-
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/texwrap.c b/progs/tests/texwrap.c
deleted file mode 100644
index 6e9fbe0c70..0000000000
--- a/progs/tests/texwrap.c
+++ /dev/null
@@ -1,304 +0,0 @@
-/* $Id: texwrap.c,v 1.8 2005/08/25 03:09:12 brianp Exp $ */
-
-/*
- * Test texture wrap modes.
- * Press 'b' to toggle texture image borders. You should see the same
- * rendering whether or not you're using borders.
- *
- * Brian Paul March 2001
- */
-
-
-#define GL_GLEXT_PROTOTYPES
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <GL/glut.h>
-
-
-#ifndef GL_CLAMP_TO_BORDER
-#define GL_CLAMP_TO_BORDER 0x812D
-#endif
-
-#ifndef GL_MIRRORED_REPEAT
-#define GL_MIRRORED_REPEAT 0x8370
-#endif
-
-#ifndef GL_EXT_texture_mirror_clamp
-#define GL_MIRROR_CLAMP_EXT 0x8742
-#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743
-#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912
-#endif
-
-#define BORDER_TEXTURE 1
-#define NO_BORDER_TEXTURE 2
-
-#define SIZE 8
-static GLubyte BorderImage[SIZE+2][SIZE+2][4];
-static GLubyte NoBorderImage[SIZE][SIZE][4];
-static GLuint Border = 0;
-
-#define TILE_SIZE 110
-
-#define WRAP_MODE(m) { m , # m, GL_TRUE, 1.0, { NULL, NULL } }
-#define WRAP_EXT(m,e1,e2,v) { m , # m, GL_FALSE, v, { e1, e2 } }
-
-struct wrap_mode {
- GLenum mode;
- const char * name;
- GLboolean supported;
- GLfloat version;
- const char * extension_names[2];
-};
-
-static struct wrap_mode modes[] = {
- WRAP_MODE( GL_REPEAT ),
- WRAP_MODE( GL_CLAMP ),
- WRAP_EXT ( GL_CLAMP_TO_EDGE, "GL_EXT_texture_edge_clamp",
- "GL_SGIS_texture_edge_clamp",
- 1.2 ),
- WRAP_EXT ( GL_CLAMP_TO_BORDER, "GL_ARB_texture_border_clamp",
- "GL_SGIS_texture_border_clamp",
- 1.3 ),
- WRAP_EXT ( GL_MIRRORED_REPEAT, "GL_ARB_texture_mirrored_repeat",
- "GL_IBM_texture_mirrored_repeat",
- 1.4 ),
- WRAP_EXT ( GL_MIRROR_CLAMP_EXT, "GL_ATI_texture_mirror_once",
- "GL_EXT_texture_mirror_clamp",
- 999.0 ),
- WRAP_EXT ( GL_MIRROR_CLAMP_TO_BORDER_EXT, "GL_EXT_texture_mirror_clamp",
- NULL,
- 999.0 ),
- WRAP_EXT ( GL_MIRROR_CLAMP_TO_EDGE_EXT, "GL_ATI_texture_mirror_once",
- "GL_EXT_texture_mirror_clamp",
- 999.0 ),
- { 0 }
-};
-
-static void
-PrintString(const char *s)
-{
- while (*s) {
- glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int) *s);
- s++;
- }
-}
-
-
-static void Display( void )
-{
- GLenum i, j;
- GLint offset;
- GLfloat version;
-
- /* Fill in the extensions that are supported.
- */
-
- version = atof( (char *) glGetString( GL_VERSION ) );
- for ( i = 0 ; modes[i].mode != 0 ; i++ ) {
- if ( ((modes[i].extension_names[0] != NULL)
- && glutExtensionSupported(modes[i].extension_names[0]))
- || ((modes[i].extension_names[1] != NULL)
- && glutExtensionSupported(modes[i].extension_names[1])) ) {
- modes[i].supported = GL_TRUE;
- }
- else if ( !modes[i].supported && (modes[i].version <= version) ) {
- fprintf( stderr, "WARNING: OpenGL library meets minimum version\n"
- " requirement for %s, but the\n"
- " extension string is not advertised.\n"
- " (%s%s%s)\n",
- modes[i].name,
- modes[i].extension_names[0],
- (modes[i].extension_names[1] != NULL)
- ? " or " : "",
- (modes[i].extension_names[1] != NULL)
- ? modes[i].extension_names[1] : "" );
- modes[i].supported = GL_TRUE;
- }
- }
-
-
- glClearColor(0.5, 0.5, 0.5, 1.0);
- glClear( GL_COLOR_BUFFER_BIT );
-
-#if 0
- /* draw texture as image */
- glDisable(GL_TEXTURE_2D);
- glWindowPos2iARB(1, 1);
- glDrawPixels(6, 6, GL_RGBA, GL_UNSIGNED_BYTE, (void *) TexImage);
-#endif
-
- glBindTexture(GL_TEXTURE_2D, Border ? BORDER_TEXTURE : NO_BORDER_TEXTURE);
-
-
- /* loop over min/mag filters */
- for (i = 0; i < 2; i++) {
- offset = 0;
-
- if (i) {
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- }
- else {
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- }
-
- /* loop over border modes */
- for (j = 0; modes[j].mode != 0; j++) {
- const GLfloat x0 = 0, y0 = 0, x1 = (TILE_SIZE - 10), y1 = (TILE_SIZE - 10);
- const GLfloat b = 1.2;
- const GLfloat s0 = -b, t0 = -b, s1 = 1.0+b, t1 = 1.0+b;
-
- if ( modes[j].supported != GL_TRUE )
- continue;
-
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, modes[j].mode);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, modes[j].mode);
-
- glPushMatrix();
- glTranslatef(offset * TILE_SIZE + 10, i * TILE_SIZE + 40, 0);
- offset++;
-
- glEnable(GL_TEXTURE_2D);
- glColor3f(1, 1, 1);
- glBegin(GL_POLYGON);
- glTexCoord2f(s0, t0); glVertex2f(x0, y0);
- glTexCoord2f(s1, t0); glVertex2f(x1, y0);
- glTexCoord2f(s1, t1); glVertex2f(x1, y1);
- glTexCoord2f(s0, t1); glVertex2f(x0, y1);
- glEnd();
-
- /* draw red outline showing bounds of texture at s=0,1 and t=0,1 */
- glDisable(GL_TEXTURE_2D);
- glColor3f(1, 0, 0);
- glBegin(GL_LINE_LOOP);
- glVertex2f(x0 + b * (x1-x0) / (s1-s0), y0 + b * (y1-y0) / (t1-t0));
- glVertex2f(x1 - b * (x1-x0) / (s1-s0), y0 + b * (y1-y0) / (t1-t0));
- glVertex2f(x1 - b * (x1-x0) / (s1-s0), y1 - b * (y1-y0) / (t1-t0));
- glVertex2f(x0 + b * (x1-x0) / (s1-s0), y1 - b * (y1-y0) / (t1-t0));
- glEnd();
-
- glPopMatrix();
- }
- }
-
- glDisable(GL_TEXTURE_2D);
- glColor3f(1, 1, 1);
- offset = 0;
- for (i = 0; modes[i].mode != 0; i++) {
- if ( modes[i].supported ) {
- glWindowPos2iARB( offset * TILE_SIZE + 10, 5 + ((offset & 1) * 15) );
- PrintString(modes[i].name);
- offset++;
- }
- }
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glOrtho(0, width, 0, height, -1, 1);
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 'b':
- Border = !Border;
- printf("Texture Border Size = %d\n", Border);
- break;
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void Init( void )
-{
- static const GLubyte border[4] = { 0, 255, 0, 255 };
- static const GLfloat borderf[4] = { 0, 1.0, 0, 1.0 };
- GLint i, j;
-
- for (i = 0; i < SIZE+2; i++) {
- for (j = 0; j < SIZE+2; j++) {
- if (i == 0 || j == 0 || i == SIZE+1 || j == SIZE+1) {
- /* border color */
- BorderImage[i][j][0] = border[0];
- BorderImage[i][j][1] = border[1];
- BorderImage[i][j][2] = border[2];
- BorderImage[i][j][3] = border[3];
- }
- else if ((i + j) & 1) {
- /* white */
- BorderImage[i][j][0] = 255;
- BorderImage[i][j][1] = 255;
- BorderImage[i][j][2] = 255;
- BorderImage[i][j][3] = 255;
- }
- else {
- /* black */
- BorderImage[i][j][0] = 0;
- BorderImage[i][j][1] = 0;
- BorderImage[i][j][2] = 0;
- BorderImage[i][j][3] = 0;
- }
- }
- }
-
- glBindTexture(GL_TEXTURE_2D, BORDER_TEXTURE);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, SIZE+2, SIZE+2, 1,
- GL_RGBA, GL_UNSIGNED_BYTE, (void *) BorderImage);
-
- for (i = 0; i < SIZE; i++) {
- for (j = 0; j < SIZE; j++) {
- if ((i + j) & 1) {
- /* white */
- NoBorderImage[i][j][0] = 255;
- NoBorderImage[i][j][1] = 255;
- NoBorderImage[i][j][2] = 255;
- NoBorderImage[i][j][3] = 255;
- }
- else {
- /* black */
- NoBorderImage[i][j][0] = 0;
- NoBorderImage[i][j][1] = 0;
- NoBorderImage[i][j][2] = 0;
- NoBorderImage[i][j][3] = 0;
- }
- }
- }
-
- glBindTexture(GL_TEXTURE_2D, NO_BORDER_TEXTURE);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, SIZE, SIZE, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, (void *) NoBorderImage);
- glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, borderf);
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 1000, 270 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/unfilledclip.c b/progs/tests/unfilledclip.c
deleted file mode 100644
index f25e52616a..0000000000
--- a/progs/tests/unfilledclip.c
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * Copyright © 2008 Intel Corporation
- *
- * 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 (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- *
- * Authors:
- * Eric Anholt <eric@anholt.net>
- *
- */
-
-#include <stdlib.h>
-#include <GL/glut.h>
-
-static int win_width, win_height;
-
-static void
-line(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
-{
- glBegin(GL_LINES);
- glVertex2f(x1, y1);
- glVertex2f(x2, y2);
- glEnd();
-}
-
-static void
-line3(GLfloat x1, GLfloat y1, GLfloat z1, GLfloat x2, GLfloat y2, GLfloat z2)
-{
- glBegin(GL_LINES);
- glVertex3f(x1, y1, z1);
- glVertex3f(x2, y2, z2);
- glEnd();
-}
-
-static void
-display(void)
-{
- glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
-
- glClearColor(0.0, 0.0, 0.0, 0.0);
- glClear(GL_COLOR_BUFFER_BIT);
-
- glColor3f(1.0, 0.0, 0.0);
- /* clipped along xmin */
- glBegin(GL_TRIANGLES);
- glVertex2f(-20, win_height / 2 - 20);
- glVertex2f(20, win_height / 2);
- glVertex2f(-20, win_height / 2 + 20);
- glEnd();
-
- glColor3f(0.0, 1.0, 0.0);
- /* clipped along ymax */
- glBegin(GL_TRIANGLES);
- glVertex2f(win_height / 2 - 20, win_height + 20);
- glVertex2f(win_height / 2, win_height - 20);
- glVertex2f(win_height / 2 + 20, win_height + 20);
- glEnd();
-
- glColor3f(0.0, 0.0, 1.0);
- /* clipped along xmax */
- glBegin(GL_TRIANGLES);
- glVertex2f(win_height + 20, win_height / 2 - 20);
- glVertex2f(win_height - 20, win_height / 2);
- glVertex2f(win_height + 20, win_height / 2 + 20);
- glEnd();
-
- glColor3f(1.0, 1.0, 1.0);
- /* clipped along ymin */
- glBegin(GL_TRIANGLES);
- glVertex2f(win_height / 2 - 20, -20);
- glVertex2f(win_height / 2, 20);
- glVertex2f(win_height / 2 + 20, -20);
- glEnd();
-
- /* clipped along near */
- glColor3f(1.0, 0.0, 1.0);
- glBegin(GL_TRIANGLES);
- glVertex3f(win_width / 2 - 20, win_height / 2 - 20, 0.5);
- glVertex3f(win_width / 2 - 40, win_height / 2, -0.5);
- glVertex3f(win_width / 2 - 20, win_height / 2 + 20, 0.5);
- glEnd();
-
- /* clipped along far */
- glColor3f(0.0, 1.0, 1.0);
- glBegin(GL_TRIANGLES);
- glVertex3f(win_width / 2 + 20, win_height / 2 - 20, 0.5);
- glVertex3f(win_width / 2 + 40, win_height / 2, 1.5);
- glVertex3f(win_width / 2 + 20, win_height / 2 + 20, 0.5);
- glEnd();
-
- /* entirely clipped along near/far */
- glColor3f(.5, .5, .5);
- glBegin(GL_TRIANGLES);
- glVertex3f(win_width / 2 - 20, win_height / 2 + 20, -0.5);
- glVertex3f(win_width / 2, win_height / 2 + 40, -0.5);
- glVertex3f(win_width / 2 + 20, win_height / 2 + 20, -0.5);
- glEnd();
-
- glBegin(GL_TRIANGLES);
- glVertex3f(win_width / 2 - 20, win_height / 2 - 20, 1.5);
- glVertex3f(win_width / 2, win_height / 2 - 40, 1.5);
- glVertex3f(win_width / 2 + 20, win_height / 2 - 20, 1.5);
- glEnd();
-
- glColor3f(.5, .5, .5);
- line3(win_width / 2, win_height / 2 - 20, 1.5,
- win_width / 2, win_height / 2 + 20, 1.5);
-
- glColor3f(1.0, 1.0, 0.0);
- /* clipped along both x and y limits */
- glBegin(GL_TRIANGLES); /* xmin, ymin */
- glVertex2f(-5, 20);
- glVertex2f(20, 20);
- glVertex2f(20, -5);
- glEnd();
- glBegin(GL_TRIANGLES); /* xmin, ymax */
- glVertex2f(-5, win_height - 20);
- glVertex2f(20, win_height - 20);
- glVertex2f(20, win_height + 5);
- glEnd();
- glBegin(GL_TRIANGLES); /* xmax, ymax */
- glVertex2f(win_width - 20, win_height + 5);
- glVertex2f(win_width - 20, win_height - 20);
- glVertex2f(win_width + 5, win_height - 20);
- glEnd();
- glBegin(GL_TRIANGLES); /* xmax, ymin */
- glVertex2f(win_width + 5, 20);
- glVertex2f(win_width - 20, 20);
- glVertex2f(win_width - 20, -5);
- glEnd();
-
- glutSwapBuffers();
-}
-
-static void
-reshape(int width, int height)
-{
- win_width = width;
- win_height = height;
- glViewport(0, 0, width, height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(0, win_width, 0, win_height, 0.0, -1.0);
-
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- glTranslatef(.25, .25, 0);
-}
-
-static void key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
-
- switch (key) {
- case 27: /* esc */
- exit(0);
- break;
- }
-
- glutPostRedisplay();
-}
-
-static void
-init(void)
-{
-}
-
-int
-main(int argc, char *argv[])
-{
- win_width = 200;
- win_height = 200;
-
- glutInit(&argc, argv);
- glutInitWindowPosition(0, 0);
- glutInitWindowSize(win_width, win_height);
- glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
- glutCreateWindow(argv[0]);
- glutReshapeFunc(reshape);
- glutKeyboardFunc(key);
- glutDisplayFunc(display);
-
- init();
-
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/vao-01.c b/progs/tests/vao-01.c
deleted file mode 100644
index c2d70885f0..0000000000
--- a/progs/tests/vao-01.c
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * (C) Copyright IBM Corporation 2006
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, and/or sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file vao-01.c
- *
- * Simple test of APPLE_vertex_array_object functionality. This test creates
- * a VAO, pushed it (via \c glPushClientAttrib), modifies the VAO, then pops
- * it (via \c glPopClientAttrib). After popping, the state of the VAO is
- * examined.
- *
- * According the the APPLE_vertex_array_object spec, the contents of the VAO
- * should be restored to the values that they had when pushed.
- *
- * \author Ian Romanick <idr@us.ibm.com>
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-
-#ifdef __darwin__
-#include <GLUT/glut.h>
-
-typedef void (* PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
-typedef void (* PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
-typedef void (* PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);
-typedef GLboolean (* PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
-
-#else
-#include <GL/glut.h>
-#endif
-
-static PFNGLBINDVERTEXARRAYAPPLEPROC bind_vertex_array = NULL;
-static PFNGLGENVERTEXARRAYSAPPLEPROC gen_vertex_arrays = NULL;
-static PFNGLDELETEVERTEXARRAYSAPPLEPROC delete_vertex_arrays = NULL;
-static PFNGLISVERTEXARRAYAPPLEPROC is_vertex_array = NULL;
-
-static int Width = 400;
-static int Height = 200;
-static const GLfloat Near = 5.0, Far = 25.0;
-
-
-static void Display( void )
-{
-}
-
-
-static void Idle( void )
-{
-}
-
-
-static void Visible( int vis )
-{
- if ( vis == GLUT_VISIBLE ) {
- glutIdleFunc( Idle );
- }
- else {
- glutIdleFunc( NULL );
- }
-}
-static void Reshape( int width, int height )
-{
- GLfloat ar = (float) width / (float) height;
- Width = width;
- Height = height;
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -ar, ar, -1.0, 1.0, Near, Far );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void Init( void )
-{
- const char * const ver_string = (const char * const)
- glGetString( GL_VERSION );
- GLuint obj;
- int pass = 1;
- void * ptr;
-
-
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- printf("GL_VERSION = %s\n\n", ver_string);
-
- if ( !glutExtensionSupported("GL_APPLE_vertex_array_object") ) {
- printf("Sorry, this program requires GL_APPLE_vertex_array_object\n");
- exit(2);
- }
-
- bind_vertex_array = glutGetProcAddress( "glBindVertexArrayAPPLE" );
- gen_vertex_arrays = glutGetProcAddress( "glGenVertexArraysAPPLE" );
- delete_vertex_arrays = glutGetProcAddress( "glDeleteVertexArraysAPPLE" );
- is_vertex_array = glutGetProcAddress( "glIsVertexArrayAPPLE" );
-
-
- (*gen_vertex_arrays)( 1, & obj );
- (*bind_vertex_array)( obj );
- glVertexPointer( 4, GL_FLOAT, sizeof(GLfloat) * 4, (void *) 0xDEADBEEF);
- glEnableClientState( GL_VERTEX_ARRAY );
-
- glPushClientAttrib( GL_CLIENT_VERTEX_ARRAY_BIT );
-
- glVertexPointer( 4, GL_FLOAT, sizeof(GLfloat) * 4, (void *) 0xBADDC0DE);
- glDisableClientState( GL_VERTEX_ARRAY );
-
- glPopClientAttrib();
-
- if ( ! glIsEnabled( GL_VERTEX_ARRAY ) ) {
- printf( "Array state is incorrectly disabled.\n" );
- pass = 0;
- }
-
- glGetPointerv( GL_VERTEX_ARRAY_POINTER, & ptr );
- if ( ptr != (void *) 0xDEADBEEF ) {
- printf( "Array pointer is incorrectly set to 0x%p.\n", ptr );
- pass = 0;
- }
-
- if ( ! pass ) {
- printf( "FAIL!\n" );
- exit(1);
- }
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( Width, Height );
- glutInitDisplayMode( GLUT_RGB );
- glutCreateWindow( "GL_APPLE_vertex_array_object demo" );
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- glutVisibilityFunc( Visible );
-
- Init();
-
- return 0;
-}
diff --git a/progs/tests/vao-02.c b/progs/tests/vao-02.c
deleted file mode 100644
index 993bc368d4..0000000000
--- a/progs/tests/vao-02.c
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * (C) Copyright IBM Corporation 2006
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, and/or sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file vao-02.c
- *
- * Simple test of APPLE_vertex_array_object functionality. This test creates
- * a VAO, pushed it (via \c glPushClientAttrib), deletes the VAO, then pops
- * it (via \c glPopClientAttrib). After popping, the state of the VAO is
- * examined.
- *
- * According the the APPLE_vertex_array_object spec, the contents of the VAO
- * should be restored to the values that they had when pushed.
- *
- * \author Ian Romanick <idr@us.ibm.com>
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-
-#ifdef __darwin__
-#include <GLUT/glut.h>
-
-typedef void (* PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
-typedef void (* PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
-typedef void (* PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);
-typedef GLboolean (* PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
-
-#else
-#include <GL/glut.h>
-#endif
-
-static PFNGLBINDVERTEXARRAYAPPLEPROC bind_vertex_array = NULL;
-static PFNGLGENVERTEXARRAYSAPPLEPROC gen_vertex_arrays = NULL;
-static PFNGLDELETEVERTEXARRAYSAPPLEPROC delete_vertex_arrays = NULL;
-static PFNGLISVERTEXARRAYAPPLEPROC is_vertex_array = NULL;
-
-static int Width = 400;
-static int Height = 200;
-static const GLfloat Near = 5.0, Far = 25.0;
-
-
-static void Display( void )
-{
-}
-
-
-static void Idle( void )
-{
-}
-
-
-static void Visible( int vis )
-{
- if ( vis == GLUT_VISIBLE ) {
- glutIdleFunc( Idle );
- }
- else {
- glutIdleFunc( NULL );
- }
-}
-static void Reshape( int width, int height )
-{
- GLfloat ar = (float) width / (float) height;
- Width = width;
- Height = height;
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -ar, ar, -1.0, 1.0, Near, Far );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void Init( void )
-{
- const char * const ver_string = (const char * const)
- glGetString( GL_VERSION );
- GLuint obj;
- int pass = 1;
- void * ptr;
- GLenum err;
-
-
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- printf("GL_VERSION = %s\n\n", ver_string);
-
- if ( !glutExtensionSupported("GL_APPLE_vertex_array_object") ) {
- printf("Sorry, this program requires GL_APPLE_vertex_array_object\n");
- exit(2);
- }
-
- bind_vertex_array = glutGetProcAddress( "glBindVertexArrayAPPLE" );
- gen_vertex_arrays = glutGetProcAddress( "glGenVertexArraysAPPLE" );
- delete_vertex_arrays = glutGetProcAddress( "glDeleteVertexArraysAPPLE" );
- is_vertex_array = glutGetProcAddress( "glIsVertexArrayAPPLE" );
-
-
- (*gen_vertex_arrays)( 1, & obj );
- (*bind_vertex_array)( obj );
- glVertexPointer( 4, GL_FLOAT, sizeof(GLfloat) * 4, (void *) 0xDEADBEEF);
- glEnableClientState( GL_VERTEX_ARRAY );
-
- glPushClientAttrib( GL_CLIENT_VERTEX_ARRAY_BIT );
-
- (*delete_vertex_arrays)( 1, & obj );
-
- err = glGetError();
- if (err) {
- printf( "glGetError incorrectly returned 0x%04x.\n", err );
- pass = 0;
- }
-
- if ( (*is_vertex_array)( obj ) ) {
- printf( "Array object is incorrectly still valid.\n" );
- pass = 0;
- }
-
- err = glGetError();
- if (err) {
- printf( "glGetError incorrectly returned 0x%04x.\n", err );
- pass = 0;
- }
-
- glPopClientAttrib();
-
- err = glGetError();
- if (err) {
- printf( "glGetError incorrectly returned 0x%04x.\n", err );
- pass = 0;
- }
-
- if ( ! (*is_vertex_array)( obj ) ) {
- printf( "Array object is incorrectly invalid.\n" );
- pass = 0;
- }
-
- if ( ! glIsEnabled( GL_VERTEX_ARRAY ) ) {
- printf( "Array state is incorrectly disabled.\n" );
- pass = 0;
- }
-
- glGetPointerv( GL_VERTEX_ARRAY_POINTER, & ptr );
- if ( ptr != (void *) 0xDEADBEEF ) {
- printf( "Array pointer is incorrectly set to 0x%p.\n", ptr );
- pass = 0;
- }
-
- if ( ! pass ) {
- printf( "FAIL!\n" );
- exit(1);
- }
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( Width, Height );
- glutInitDisplayMode( GLUT_RGB );
- glutCreateWindow( "GL_APPLE_vertex_array_object demo" );
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- glutVisibilityFunc( Visible );
-
- Init();
-
- return 0;
-}
diff --git a/progs/tests/vparray.c b/progs/tests/vparray.c
deleted file mode 100644
index 580a670f8e..0000000000
--- a/progs/tests/vparray.c
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
- * Test vertex arrays with GL_NV_vertex_program
- *
- * Based on a stripped-down version of the isosurf demo.
- * The vertex program is trivial: compute the resulting
- * RGB color as a linear function of vertex XYZ.
- */
-
-#include <assert.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include "GL/glut.h"
-
-#define MAXVERTS 10000
-static float data[MAXVERTS][6];
-static GLint numverts;
-
-static GLfloat xrot;
-static GLfloat yrot;
-static GLboolean useArrays = GL_TRUE;
-static GLboolean useProgram = GL_TRUE;
-static GLboolean useList = GL_FALSE;
-
-
-static void read_surface( char *filename )
-{
- FILE *f;
-
- f = fopen(filename,"r");
- if (!f) {
- printf("couldn't read %s\n", filename);
- exit(1);
- }
-
- numverts = 0;
- while (!feof(f) && numverts < MAXVERTS) {
- fscanf( f, "%f %f %f %f %f %f",
- &data[numverts][0], &data[numverts][1], &data[numverts][2],
- &data[numverts][3], &data[numverts][4], &data[numverts][5] );
- numverts++;
- }
- numverts--;
-
- printf("%d vertices, %d triangles\n", numverts, numverts-2);
- printf("data = %p\n", (void *) data);
- fclose(f);
-}
-
-
-
-
-static void Display(void)
-{
- if (useProgram)
- glEnable(GL_VERTEX_PROGRAM_NV);
- else
- glDisable(GL_VERTEX_PROGRAM_NV);
-
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- glPushMatrix();
- glRotatef(xrot, 1, 0, 0);
- glRotatef(yrot, 0, 1, 0);
- glScalef(2, 2, 2);
- if (useArrays) {
- if (useProgram) {
- glVertexAttribPointerNV( 0, 3, GL_FLOAT, 6 * sizeof(GLfloat), data );
- glEnableClientState( GL_VERTEX_ATTRIB_ARRAY0_NV );
- glVertexAttribPointerNV( 2, 3, GL_FLOAT, 6 * sizeof(GLfloat), ((GLfloat *) data) + 3);
- glEnableClientState( GL_VERTEX_ATTRIB_ARRAY2_NV);
- }
- else {
- glVertexPointer( 3, GL_FLOAT, 6 * sizeof(GLfloat), data );
- glEnableClientState( GL_VERTEX_ARRAY );
- glNormalPointer( GL_FLOAT, 6 * sizeof(GLfloat), ((GLfloat *) data) + 3);
- glEnableClientState( GL_NORMAL_ARRAY );
- }
-
- if (useList) {
- /* dumb, but a good test */
- glNewList(1,GL_COMPILE);
- glDrawArrays(GL_TRIANGLE_STRIP, 0, numverts);
- glEndList();
- glCallList(1);
- }
- else {
- glDrawArrays(GL_TRIANGLE_STRIP, 0, numverts);
- }
-
- glDisableClientState( GL_VERTEX_ATTRIB_ARRAY0_NV );
- glDisableClientState( GL_VERTEX_ATTRIB_ARRAY2_NV);
- glDisableClientState( GL_VERTEX_ARRAY );
- glDisableClientState( GL_NORMAL_ARRAY );
- }
- else {
- int i;
- glBegin(GL_TRIANGLE_STRIP);
- for (i = 0; i < numverts; i++) {
- glNormal3fv( data[i] + 3 );
- glVertex3fv( data[i] + 0 );
- }
- glEnd();
- }
- glPopMatrix();
-
- if (glGetError())
- printf("Error!\n");
-
- glutSwapBuffers();
-}
-
-
-static void InitMaterials(void)
-{
- static float ambient[] = {0.1, 0.1, 0.1, 1.0};
- static float diffuse[] = {0.5, 1.0, 1.0, 1.0};
- static float position0[] = {0.0, 0.0, 20.0, 0.0};
- static float position1[] = {0.0, 0.0, -20.0, 0.0};
- static float front_mat_shininess[] = {60.0};
- static float front_mat_specular[] = {0.2, 0.2, 0.2, 1.0};
- static float front_mat_diffuse[] = {0.5, 0.28, 0.38, 1.0};
- /*
- static float back_mat_shininess[] = {60.0};
- static float back_mat_specular[] = {0.5, 0.5, 0.2, 1.0};
- static float back_mat_diffuse[] = {1.0, 1.0, 0.2, 1.0};
- */
- static float lmodel_ambient[] = {1.0, 1.0, 1.0, 1.0};
- static float lmodel_twoside[] = {GL_FALSE};
-
- glLightfv(GL_LIGHT0, GL_AMBIENT, ambient);
- glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse);
- glLightfv(GL_LIGHT0, GL_POSITION, position0);
- glEnable(GL_LIGHT0);
-
- glLightfv(GL_LIGHT1, GL_AMBIENT, ambient);
- glLightfv(GL_LIGHT1, GL_DIFFUSE, diffuse);
- glLightfv(GL_LIGHT1, GL_POSITION, position1);
- glEnable(GL_LIGHT1);
-
- glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient);
- glLightModelfv(GL_LIGHT_MODEL_TWO_SIDE, lmodel_twoside);
-
- glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, front_mat_shininess);
- glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, front_mat_specular);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, front_mat_diffuse);
- glEnable(GL_LIGHTING);
-}
-
-
-static void init_program(void)
-{
- /*
- * c[0..3] = modelview matrix
- * c[4..7] = inverse modelview matrix
- * c[30] = color scale
- * c[31] = color bias
- */
- static const char prog[] =
- "!!VP1.0\n"
-
- "# RGB is proportional to XYZ \n"
-
- "MUL R0, v[OPOS], c[30]; \n"
- "ADD o[COL0], R0, c[31]; \n"
-
- "# Continue with typical modelview/projection\n"
- "MOV R3, v[OPOS]; \n"
- "DP4 o[HPOS].x, c[0], R3 ; # object x MVP -> clip\n"
- "DP4 o[HPOS].y, c[1], R3 ;\n"
- "DP4 o[HPOS].z, c[2], R3 ;\n"
- "DP4 o[HPOS].w, c[3], R3 ;\n"
-
- "END";
-
- static const GLfloat scale[4] = {2.0, 2.0, 2.0, 0.0};
- static const GLfloat bias[4] = {1.0, 1.0, 1.0, 0.0};
-
- if (!glutExtensionSupported("GL_NV_vertex_program")) {
- printf("Sorry, this program requires GL_NV_vertex_program");
- exit(1);
- }
-
- glLoadProgramNV(GL_VERTEX_PROGRAM_NV, 1,
- strlen(prog), (const GLubyte *) prog);
- assert(glIsProgramNV(1));
- glBindProgramNV(GL_VERTEX_PROGRAM_NV, 1);
-
- /* Load the program registers */
- glTrackMatrixNV(GL_VERTEX_PROGRAM_NV, 0, GL_MODELVIEW_PROJECTION_NV, GL_IDENTITY_NV);
- glTrackMatrixNV(GL_VERTEX_PROGRAM_NV, 4, GL_MODELVIEW, GL_INVERSE_TRANSPOSE_NV);
-
- glProgramParameter4fvNV(GL_VERTEX_PROGRAM_NV, 30, scale);
- glProgramParameter4fvNV(GL_VERTEX_PROGRAM_NV, 31, bias);
-}
-
-
-static void init(void)
-{
- xrot = 0;
- yrot = 0;
- glClearColor(0.0, 0.0, 1.0, 0.0);
- glEnable( GL_DEPTH_TEST );
- glEnable(GL_NORMALIZE);
- InitMaterials();
- read_surface( "../demos/isosurf.dat" );
- init_program();
-}
-
-
-static void Reshape(int width, int height)
-{
- glViewport(0, 0, (GLint)width, (GLint)height);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glFrustum( -1.0, 1.0, -1.0, 1.0, 5, 25 );
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- glTranslatef(0, 0, -15);
-}
-
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- case 'a':
- useArrays = !useArrays;
- printf("use arrays: %s\n", useArrays ? "yes" : "no");
- break;
- case 'l':
- useList = !useList;
- printf("use list: %s\n", useList ? "yes" : "no");
- break;
- case 'p':
- useProgram = !useProgram;
- printf("use program: %s\n", useProgram ? "yes" : "no");
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void SpecialKey( int key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case GLUT_KEY_LEFT:
- yrot -= 15.0;
- break;
- case GLUT_KEY_RIGHT:
- yrot += 15.0;
- break;
- case GLUT_KEY_UP:
- xrot += 15.0;
- break;
- case GLUT_KEY_DOWN:
- xrot -= 15.0;
- break;
- default:
- return;
- }
- glutPostRedisplay();
-}
-
-
-
-int main(int argc, char **argv)
-{
- glutInit(&argc, argv);
- glutInitDisplayMode( GLUT_DEPTH | GLUT_RGB | GLUT_DOUBLE );
- glutInitWindowPosition(0, 0);
- glutInitWindowSize(400, 400);
- if (glutCreateWindow("Isosurface") <= 0) {
- exit(0);
- }
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutSpecialFunc(SpecialKey);
- glutDisplayFunc(Display);
-
- init();
-
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/vpeval.c b/progs/tests/vpeval.c
deleted file mode 100644
index 8b6996d3b5..0000000000
--- a/progs/tests/vpeval.c
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * Vertex program evaluators test.
- * Based on book/bezmesh.c
- *
- * Brian Paul
- * 22 June 2002
- */
-
-#include <assert.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-/*
- * Transform position by modelview/projection.
- * Square incoming color.
- */
-static const char prog[] =
-"!!VP1.0\n"
-
-"# Typical modelview/projection\n"
-"DP4 o[HPOS].x, c[0], v[OPOS] ; # object x MVP -> clip\n"
-"DP4 o[HPOS].y, c[1], v[OPOS] ;\n"
-"DP4 o[HPOS].z, c[2], v[OPOS] ;\n"
-"DP4 o[HPOS].w, c[3], v[OPOS] ;\n"
-
-"MOV R0, v[COL0];\n # square the color\n"
-"MUL R0, R0, R0;\n"
-"MOV o[COL0], R0;\n # store output color\n"
-
-"END";
-
-
-static int program = 1;
-
-
-GLfloat ctrlpoints[4][4][4] =
-{
- {
- {-1.5, -1.5, 4.0, 1.0},
- {-0.5, -1.5, 2.0, 1.0},
- {0.5, -1.5, -1.0, 1.0},
- {1.5, -1.5, 2.0, 1.0}},
- {
- {-1.5, -0.5, 1.0, 1.0},
- {-0.5, -0.5, 3.0, 1.0},
- {0.5, -0.5, 0.0, 1.0},
- {1.5, -0.5, -1.0, 1.0}},
- {
- {-1.5, 0.5, 4.0, 1.0},
- {-0.5, 0.5, 0.0, 1.0},
- {0.5, 0.5, 3.0, 1.0},
- {1.5, 0.5, 4.0, 1.0}},
- {
- {-1.5, 1.5, -2.0, 1.0},
- {-0.5, 1.5, -2.0, 1.0},
- {0.5, 1.5, 0.0, 1.0},
- {1.5, 1.5, -1.0, 1.0}}
-};
-
-/*
- * +-------------+
- * |green |yellow
- * | |
- * | |
- * |black |red
- * +-------------+
- */
-GLfloat colorPoints[4][4][4] =
-{
- {
- {0.0, 0.0, 0.0, 1.0},
- {0.3, 0.0, 0.0, 1.0},
- {0.6, 0.0, 0.0, 1.0},
- {1.0, 0.0, 0.0, 1.0}},
- {
- {0.0, 0.3, 0.0, 1.0},
- {0.3, 0.3, 0.0, 1.0},
- {0.6, 0.3, 0.0, 1.0},
- {1.0, 0.3, 0.0, 1.0}},
- {
- {0.0, 0.6, 0.0, 1.0},
- {0.3, 0.6, 0.0, 1.0},
- {0.6, 0.6, 0.0, 1.0},
- {1.0, 0.6, 0.0, 1.0}},
- {
- {0.0, 1.0, 0.0, 1.0},
- {0.3, 1.0, 0.0, 1.0},
- {0.6, 1.0, 0.0, 1.0},
- {1.0, 1.0, 0.0, 1.0}}
-};
-
-
-void
-initlights(void)
-{
- GLfloat ambient[] = {0.2, 0.2, 0.2, 1.0};
- GLfloat position[] = {0.0, 0.0, 2.0, 1.0};
- GLfloat mat_diffuse[] = {0.6, 0.6, 0.6, 1.0};
- GLfloat mat_specular[] = {1.0, 1.0, 1.0, 1.0};
- GLfloat mat_shininess[] = {50.0};
-
-#if 0 /* no lighting for now */
- glEnable(GL_LIGHTING);
- glEnable(GL_LIGHT0);
-
- glLightfv(GL_LIGHT0, GL_AMBIENT, ambient);
- glLightfv(GL_LIGHT0, GL_POSITION, position);
-
- glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse);
- glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
- glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess);
-#endif
-}
-
-void
-display(void)
-{
- glClearColor(.3, .3, .3, 0);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- glPushMatrix();
-#if 1
- glRotatef(85.0, 1.0, 1.0, 1.0);
-#endif
- glEvalMesh2(GL_FILL, 0, 8, 0, 8);
- glPopMatrix();
- glFlush();
-}
-
-void
-myinit(int argc, char *argv[])
-{
- glClearColor(0.0, 0.0, 0.0, 1.0);
- glEnable(GL_DEPTH_TEST);
-
- initlights(); /* for lighted version only */
-
- glMapGrid2f(8, 0.0, 1.0, 8, 0.0, 1.0);
-
- if (argc > 1)
- program = 0;
-
- printf("Using vertex program attribs? %s\n", program ? "yes" : "no");
-
- if (!program) {
- glMap2f(GL_MAP2_VERTEX_4,
- 0.0, 1.0, 4, 4,
- 0.0, 1.0, 16, 4, &ctrlpoints[0][0][0]);
- glMap2f(GL_MAP2_COLOR_4,
- 0.0, 1.0, 4, 4,
- 0.0, 1.0, 16, 4, &colorPoints[0][0][0]);
- glEnable(GL_MAP2_VERTEX_4);
- glEnable(GL_MAP2_COLOR_4);
- /*
- glEnable(GL_AUTO_NORMAL);
- glEnable(GL_NORMALIZE);
- */
- }
- else {
- glMap2f(GL_MAP2_VERTEX_ATTRIB0_4_NV,
- 0.0, 1.0, 4, 4,
- 0.0, 1.0, 16, 4, &ctrlpoints[0][0][0]);
- glMap2f(GL_MAP2_VERTEX_ATTRIB3_4_NV,
- 0.0, 1.0, 4, 4,
- 0.0, 1.0, 16, 4, &colorPoints[0][0][0]);
- glEnable(GL_MAP2_VERTEX_ATTRIB0_4_NV);
- glEnable(GL_MAP2_VERTEX_ATTRIB3_4_NV);
-
- /*
- glEnable(GL_AUTO_NORMAL);
- glEnable(GL_NORMALIZE);
- */
-
- /* vertex program init */
- glLoadProgramNV(GL_VERTEX_PROGRAM_NV, 1,
- strlen(prog), (const GLubyte *) prog);
- assert(glIsProgramNV(1));
- glBindProgramNV(GL_VERTEX_PROGRAM_NV, 1);
-
- /* track matrices */
- glTrackMatrixNV(GL_VERTEX_PROGRAM_NV, 0, GL_MODELVIEW_PROJECTION_NV, GL_IDENTITY_NV);
- glEnable(GL_VERTEX_PROGRAM_NV);
- }
-}
-
-void
-myReshape(int w, int h)
-{
- glViewport(0, 0, w, h);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- if (w <= h)
- glOrtho(-4.0, 4.0, -4.0 * (GLfloat) h / (GLfloat) w,
- 4.0 * (GLfloat) h / (GLfloat) w, -4.0, 4.0);
- else
- glOrtho(-4.0 * (GLfloat) w / (GLfloat) h,
- 4.0 * (GLfloat) w / (GLfloat) h, -4.0, 4.0, -4.0, 4.0);
- glMatrixMode(GL_MODELVIEW);
- 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);
- glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH);
- glutInitWindowPosition(0, 0);
- glutCreateWindow(argv[0]);
- myinit(argc, argv);
- glutReshapeFunc(myReshape);
- glutDisplayFunc(display);
- glutKeyboardFunc(key);
- glutMainLoop();
- return 0; /* ANSI C requires main to return int. */
-}
diff --git a/progs/tests/vptest1.c b/progs/tests/vptest1.c
deleted file mode 100644
index 560df2c3fd..0000000000
--- a/progs/tests/vptest1.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/* Test glGenProgramsNV(), glIsProgramNV(), glLoadProgramNV() */
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Display( void )
-{
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- glPushMatrix();
-
- glBegin(GL_POLYGON);
- glVertexAttrib2fNV(0, -1, -1);
- glVertexAttrib2fNV(0, 1, -1);
- glVertexAttrib2fNV(0, 0, 1);
- glEnd();
-
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -15.0 );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void Init( void )
-{
- static const char *prog1 =
- "!!VP1.0\n"
- "MUL o[COL0].xyz, R0, c[35]; \n"
- "END\n";
- static const char *prog2 =
- "!!VP1.0\n"
- "#\n"
- "# c[0-3] = modelview projection (composite) matrix\n"
- "# c[32] = normalized light direction in object-space\n"
- "# c[35] = yellow diffuse material, (1.0, 1.0, 0.0, 1.0)\n"
- "# c[64].x = 0.0\n"
- "# c[64].z = 0.125, a scaling factor\n"
- "#\n"
- "# outputs diffuse illumination for color and perturbed position\n"
- "#\n"
- "DP3 R0, c[32], v[NRML]; # light direction DOT normal\n"
- "MUL o[COL0].xyz, R0, c[35]; \n"
- "MAX R0, c[64].x, R0; \n"
- "MUL R0, R0, v[NRML]; \n"
- "MUL R0, R0, c[64].z; \n"
- "ADD R1, v[OPOS], -R0; # perturb object space position\n"
- "DP4 o[HPOS].x, c[0], R1; \n"
- "DP4 o[HPOS].y, c[1], R1; \n"
- "DP4 o[HPOS].z, c[2], R1; \n"
- "DP4 o[HPOS].w, c[3], R1; \n"
- "END\n";
- static const char *prog3 =
- "!!VP1.0\n"
- "DP4 o[HPOS].x, c[0], v[OPOS];\n"
- "DP4 o[HPOS].y, c[1], v[OPOS];\n"
- "DP4 o[HPOS].z, c[2], v[OPOS];\n"
- "DP4 o[HPOS].w, c[3], v[OPOS];\n"
- "DP3 R0.x, c[4], v[NRML];\n"
- "DP3 R0.y, c[5], v[NRML]; \n"
- "DP3 R0.z, c[6], v[NRML]; # R0 = n' = transformed normal\n"
- "DP3 R1.x, c[32], R0; # R1.x = Lpos DOT n'\n"
- "DP3 R1.y, c[33], R0; # R1.y = hHat DOT n'\n"
- "MOV R1.w, c[38].x; # R1.w = specular power\n"
- "LIT R2, R1; # Compute lighting values\n"
- "MAD R3, c[35].x, R2.y, c[35].y; # diffuse + emissive\n"
- "MAD o[COL0].xyz, c[36], R2.z, R3; # + specular\n"
- "END\n";
- static const char *prog4 =
- "!!VP1.0\n"
- "DP4 R2, R3, c[A0.x];\n"
- "DP4 R2, R3, c[A0.x + 5];\n"
- "DP4 o[HPOS], R3, c[A0.x - 4];\n"
- "END\n";
- static const char *prog5 =
- "!!VSP1.0\n"
- "DP4 R2, R3, c[A0.x];\n"
- "DP4 R2, R3, v[0];\n"
- "DP4 c[3], R3, R2;\n"
- "END\n";
-
-
- GLuint progs[5];
-
- glGenProgramsNV(2, progs);
- assert(progs[0]);
- assert(progs[1]);
- assert(progs[0] != progs[1]);
-
- glGenProgramsNV(3, progs + 2);
- assert(progs[2]);
- assert(progs[3]);
- assert(progs[2] != progs[3]);
- assert(progs[0] != progs[2]);
-
-
- glLoadProgramNV(GL_VERTEX_PROGRAM_NV, 1,
- strlen(prog1),
- (const GLubyte *) prog1);
- assert(!glIsProgramNV(1));
-
- glLoadProgramNV(GL_VERTEX_PROGRAM_NV, 2,
- strlen(prog2),
- (const GLubyte *) prog2);
- assert(glIsProgramNV(2));
-
- glLoadProgramNV(GL_VERTEX_PROGRAM_NV, 3,
- strlen(prog3),
- (const GLubyte *) prog3);
- assert(glIsProgramNV(3));
-
- glLoadProgramNV(GL_VERTEX_PROGRAM_NV, 4,
- strlen(prog4),
- (const GLubyte *) prog4);
- assert(glIsProgramNV(4));
-
- glLoadProgramNV(GL_VERTEX_STATE_PROGRAM_NV, 5,
- strlen(prog5),
- (const GLubyte *) prog5);
- assert(glIsProgramNV(5));
-
- printf("glGetError = %d\n", (int) glGetError());
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 250, 250 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/vptest2.c b/progs/tests/vptest2.c
deleted file mode 100644
index 2158e07f04..0000000000
--- a/progs/tests/vptest2.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/* Test vertex state program execution */
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Display( void )
-{
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
- glPushMatrix();
- glutSolidCube(2.0);
- glPopMatrix();
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -15.0 );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void Test1( void )
-{
- static const GLfloat p[4] = {9, 8, 7, 6};
- GLfloat q[4];
- /* test addition */
- static const char *prog =
- "!!VSP1.0\n"
- "MOV R0, c[0];\n"
- "MOV R1, c[1];\n"
- "ADD c[2], R0, R1;\n"
- "END\n";
-
- glLoadProgramNV(GL_VERTEX_STATE_PROGRAM_NV, 1,
- strlen(prog),
- (const GLubyte *) prog);
- assert(glIsProgramNV(1));
-
- glProgramParameter4fNV(GL_VERTEX_PROGRAM_NV, 0, 1, 2, 3, 4);
- glProgramParameter4fNV(GL_VERTEX_PROGRAM_NV, 1, 10, 20, 30, 40);
-
- glExecuteProgramNV(GL_VERTEX_STATE_PROGRAM_NV, 1, p);
-
- glGetProgramParameterfvNV(GL_VERTEX_PROGRAM_NV, 2, GL_PROGRAM_PARAMETER_NV, q);
- printf("Result c[2] = %g %g %g %g (should be 11 22 33 44)\n",
- q[0], q[1], q[2], q[3]);
-}
-
-
-static void Test2( void )
-{
- static const GLfloat p[4] = {9, 8, 7, 6};
- GLfloat q[4];
- /* test swizzling */
- static const char *prog =
- "!!VSP1.0\n"
- "MOV R0, c[0].wzyx;\n"
- "MOV R1, c[1].wzyx;\n"
- "ADD c[2], R0, R1;\n"
- "END\n";
-
- glLoadProgramNV(GL_VERTEX_STATE_PROGRAM_NV, 1,
- strlen(prog),
- (const GLubyte *) prog);
- assert(glIsProgramNV(1));
-
- glProgramParameter4fNV(GL_VERTEX_PROGRAM_NV, 0, 1, 2, 3, 4);
- glProgramParameter4fNV(GL_VERTEX_PROGRAM_NV, 1, 10, 20, 30, 40);
-
- glExecuteProgramNV(GL_VERTEX_STATE_PROGRAM_NV, 1, p);
-
- glGetProgramParameterfvNV(GL_VERTEX_PROGRAM_NV, 2, GL_PROGRAM_PARAMETER_NV, q);
- printf("Result c[2] = %g %g %g %g (should be 44 33 22 11)\n",
- q[0], q[1], q[2], q[3]);
-}
-
-
-static void Test3( void )
-{
- static const GLfloat p[4] = {0, 0, 0, 0};
- GLfloat q[4];
- /* normalize vector */
- static const char *prog =
- "!!VSP1.0\n"
- "# c[0] = (nx,ny,nz)\n"
- "# R0.xyz = normalize(R1)\n"
- "# R0.w = 1/sqrt(nx*nx + ny*ny + nz*nz)\n"
- "# c[2] = R0\n"
- "DP3 R0.w, c[0], c[0];\n"
- "RSQ R0.w, R0.w;\n"
- "MUL R0.xyz, c[0], R0.w;\n"
- "MOV c[2], R0;\n"
- "END\n";
-
- glLoadProgramNV(GL_VERTEX_STATE_PROGRAM_NV, 1,
- strlen(prog),
- (const GLubyte *) prog);
- assert(glIsProgramNV(1));
-
- glProgramParameter4fNV(GL_VERTEX_PROGRAM_NV, 0, 0, 10, 0, 0);
-
- glExecuteProgramNV(GL_VERTEX_STATE_PROGRAM_NV, 1, p);
-
- glGetProgramParameterfvNV(GL_VERTEX_PROGRAM_NV, 2, GL_PROGRAM_PARAMETER_NV, q);
- printf("Result c[2] = %g %g %g %g (should be 0, 1, 0, 0.1)\n",
- q[0], q[1], q[2], q[3]);
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 50, 50 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Test1();
- Test2();
- Test3();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/vptest3.c b/progs/tests/vptest3.c
deleted file mode 100644
index 2c5c800040..0000000000
--- a/progs/tests/vptest3.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/* Test glGenProgramsNV(), glIsProgramNV(), glLoadProgramNV() */
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-static float Zrot = 0.0;
-
-
-static void Display( void )
-{
- glClearColor(0.3, 0.3, 0.3, 1);
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- glEnable(GL_VERTEX_PROGRAM_NV);
-
- glLoadIdentity();
- glRotatef(Zrot, 0, 0, 1);
-
- glTrackMatrixNV(GL_VERTEX_PROGRAM_NV, 0, GL_MODELVIEW, GL_IDENTITY_NV);
- glPushMatrix();
-
- glVertexAttrib3fNV(3, 1, 0.5, 0.25);
- glBegin(GL_TRIANGLES);
-#if 1
- glVertexAttrib3fNV(3, 1.0, 0.0, 0.0);
- glVertexAttrib2fNV(0, -0.5, -0.5);
- glVertexAttrib3fNV(3, 0.0, 1.0, 0.0);
- glVertexAttrib2fNV(0, 0.5, -0.5);
- glVertexAttrib3fNV(3, 0.0, 0.0, 1.0);
- glVertexAttrib2fNV(0, 0, 0.5);
-#else
- glVertex2f( -1, -1);
- glVertex2f( 1, -1);
- glVertex2f( 0, 1);
-#endif
- glEnd();
-
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- /* glFrustum( -2.0, 2.0, -2.0, 2.0, 5.0, 25.0 );*/
- glOrtho(-2.0, 2.0, -2.0, 2.0, -2.0, 2.0 );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- /*glTranslatef( 0.0, 0.0, -15.0 );*/
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 'z':
- Zrot -= 5.0;
- break;
- case 'Z':
- Zrot += 5.0;
- break;
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void Init( void )
-{
- static const char *prog1 =
- "!!VP1.0\n"
- "MOV o[COL0], v[COL0];\n"
-#if 0
- "MOV o[HPOS], v[OPOS];\n"
-#else
- "DP4 o[HPOS].x, v[OPOS], c[0];\n"
- "DP4 o[HPOS].y, v[OPOS], c[1];\n"
- "DP4 o[HPOS].z, v[OPOS], c[2];\n"
- "DP4 o[HPOS].w, v[OPOS], c[3];\n"
-#endif
- "END\n";
-
- glLoadProgramNV(GL_VERTEX_PROGRAM_NV, 1,
- strlen(prog1),
- (const GLubyte *) prog1);
- assert(glIsProgramNV(1));
-
- glBindProgramNV(GL_VERTEX_PROGRAM_NV, 1);
-
- printf("glGetError = %d\n", (int) glGetError());
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 250, 250 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/vptorus.c b/progs/tests/vptorus.c
deleted file mode 100644
index 764dea4ec2..0000000000
--- a/progs/tests/vptorus.c
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * A lit, rotating torus via vertex program
- */
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-static float Xrot = 0.0, Yrot = 0.0, Zrot = 0.0;
-static GLboolean Anim = GL_TRUE;
-
-
-static void Idle( void )
-{
- Xrot += .3;
- Yrot += .4;
- Zrot += .2;
- glutPostRedisplay();
-}
-
-
-static void Display( void )
-{
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- glPushMatrix();
- glRotatef(Xrot, 1, 0, 0);
- glRotatef(Yrot, 0, 1, 0);
- glRotatef(Zrot, 0, 0, 1);
- glutSolidTorus(0.75, 2.0, 10, 20);
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -2.0, 2.0, -2.0, 2.0, 5.0, 25.0 );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -12.0 );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case ' ':
- Xrot = Yrot = Zrot = 0;
- break;
- case 'a':
- Anim = !Anim;
- if (Anim)
- glutIdleFunc(Idle);
- else
- glutIdleFunc(NULL);
- break;
- case 'z':
- Zrot -= 5.0;
- break;
- case 'Z':
- Zrot += 5.0;
- break;
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void SpecialKey( int key, int x, int y )
-{
- const GLfloat 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( void )
-{
- /* borrowed from an nvidia demo:
- * c[0..3] = modelview matrix
- * c[4..7] = inverse modelview matrix
- * c[32] = light pos
- * c[35] = diffuse color
- */
- static const char prog[] =
- "!!VP1.0\n"
- "#Simple transform and diffuse lighting\n"
- "\n"
- "DP4 o[HPOS].x, c[0], v[OPOS] ; # object x MVP -> clip\n"
- "DP4 o[HPOS].y, c[1], v[OPOS] ;\n"
- "DP4 o[HPOS].z, c[2], v[OPOS] ;\n"
- "DP4 o[HPOS].w, c[3], v[OPOS] ;\n"
-
- "DP3 R1.x, c[4], v[NRML] ; # normal x MV-1T -> lighting normal\n"
- "DP3 R1.y, c[5], v[NRML] ;\n"
- "DP3 R1.z, c[6], v[NRML] ;\n"
-
- "DP3 R0, c[32], R1 ; # L.N\n"
- "MUL o[COL0].xyz, R0, c[35] ; # col = L.N * diffuse\n"
- "MOV o[TEX0], v[TEX0];\n"
- "END";
-
- if (!glutExtensionSupported("GL_NV_vertex_program")) {
- printf("Sorry, this program requires GL_NV_vertex_program");
- exit(1);
- }
-
- glLoadProgramNV(GL_VERTEX_PROGRAM_NV, 1,
- strlen(prog), (const GLubyte *) prog);
- assert(glIsProgramNV(1));
- glBindProgramNV(GL_VERTEX_PROGRAM_NV, 1);
-
- /* Load the program registers */
- glTrackMatrixNV(GL_VERTEX_PROGRAM_NV, 0, GL_MODELVIEW_PROJECTION_NV, GL_IDENTITY_NV);
- glTrackMatrixNV(GL_VERTEX_PROGRAM_NV, 4, GL_MODELVIEW, GL_INVERSE_TRANSPOSE_NV);
-
- /* Light position */
- glProgramParameter4fNV(GL_VERTEX_PROGRAM_NV, 32, 2, 2, 4, 1);
- /* Diffuse material color */
- glProgramParameter4fNV(GL_VERTEX_PROGRAM_NV, 35, 0.25, 0, 0.25, 1);
-
- glEnable(GL_VERTEX_PROGRAM_NV);
- glEnable(GL_DEPTH_TEST);
- glClearColor(0.3, 0.3, 0.3, 1);
-
- printf("glGetError = %d\n", (int) glGetError());
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 250, 250 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutSpecialFunc( SpecialKey );
- glutDisplayFunc( Display );
- if (Anim)
- glutIdleFunc(Idle);
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/vpwarpmesh.c b/progs/tests/vpwarpmesh.c
deleted file mode 100644
index 56aa8200ec..0000000000
--- a/progs/tests/vpwarpmesh.c
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * Warp a triangle mesh with a vertex program.
- */
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-static float Xrot = -60.0, Yrot = 0.0, Zrot = 0.0;
-static GLboolean Anim = GL_TRUE;
-static GLfloat Phi = 0.0;
-
-
-static void Idle( void )
-{
- Phi += 0.01;
- glutPostRedisplay();
-}
-
-
-static void DrawMesh( int rows, int cols )
-{
- static const GLfloat colorA[3] = { 0, 1, 0 };
- static const GLfloat colorB[3] = { 0, 0, 1 };
- const float dx = 2.0 / (cols - 1);
- const float dy = 2.0 / (rows - 1);
- float x, y;
- int i, j;
-
-#if 1
-#define COLOR3FV(c) glVertexAttrib3fvNV(3, c)
-#define VERTEX2F(x, y) glVertexAttrib2fNV(0, x, y)
-#else
-#define COLOR3FV(c) glColor3fv(c)
-#define VERTEX2F(x, y) glVertex2f(x, y)
-#endif
-
- y = -1.0;
- for (i = 0; i < rows - 1; i++) {
- glBegin(GL_QUAD_STRIP);
- x = -1.0;
- for (j = 0; j < cols; j++) {
- if ((i + j) & 1)
- COLOR3FV(colorA);
- else
- COLOR3FV(colorB);
- VERTEX2F(x, y);
- VERTEX2F(x, y + dy);
- x += dx;
- }
- glEnd();
- y += dy;
- }
-}
-
-
-static void Display( void )
-{
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- glPushMatrix();
- glRotatef(Xrot, 1, 0, 0);
- glRotatef(Yrot, 0, 1, 0);
- glRotatef(Zrot, 0, 0, 1);
-
- /* Position the gravity source */
- {
- GLfloat x, y, z, r = 0.5;
- x = r * cos(Phi);
- y = r * sin(Phi);
- z = 1.0;
- glProgramParameter4fNV(GL_VERTEX_PROGRAM_NV, 30, x, y, z, 1);
- glDisable(GL_VERTEX_PROGRAM_NV);
- glBegin(GL_POINTS);
- glColor3f(1,1,1);
- glVertex3f(x, y, z);
- glEnd();
- }
-
- glEnable(GL_VERTEX_PROGRAM_NV);
- DrawMesh(8, 8);
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- float ar = (float) width / (float) height;
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -1.0 * ar, 1.0 * ar, -1.0, 1.0, 5.0, 25.0 );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -12.0 );
- glScalef(2, 2, 2);
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 'a':
- Anim = !Anim;
- if (Anim)
- glutIdleFunc(Idle);
- else
- glutIdleFunc(NULL);
- break;
- case 'p':
- Phi += 0.2;
- break;
- case 'z':
- Zrot -= 5.0;
- break;
- case 'Z':
- Zrot += 5.0;
- break;
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void SpecialKey( int key, int x, int y )
-{
- const GLfloat 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( void )
-{
- /*
- * c[0..3] = modelview matrix
- * c[4..7] = inverse modelview matrix
- * c[30] = gravity source location
- * c[31] = gravity source strength
- * c[32] = light pos
- * c[35] = diffuse color
- */
- static const char prog[] =
- "!!VP1.0\n"
-
- "# Compute distance from vertex to gravity source\n"
- "ADD R1, c[30], -v[OPOS]; # vector from vertex to gravity\n"
- "DP3 R2, R1, R1; # dot product\n"
- "RSQ R2, R2.x; # square root = distance\n"
- "MUL R2, R2, c[31].xxxx; # scale by the gravity factor\n"
-
- "# Displace vertex by gravity factor along R1 vector\n"
- "MAD R3, R1, R2, v[OPOS];\n"
-
- "# Continue with typical modelview/projection\n"
- "DP4 o[HPOS].x, c[0], R3 ; # object x MVP -> clip\n"
- "DP4 o[HPOS].y, c[1], R3 ;\n"
- "DP4 o[HPOS].z, c[2], R3 ;\n"
- "DP4 o[HPOS].w, c[3], R3 ;\n"
-
- "MOV o[COL0], v[COL0];\n # copy input color to output color\n"
-
- "END";
-
- if (!glutExtensionSupported("GL_NV_vertex_program")) {
- printf("Sorry, this program requires GL_NV_vertex_program\n");
- exit(1);
- }
-
- glLoadProgramNV(GL_VERTEX_PROGRAM_NV, 1,
- strlen(prog), (const GLubyte *) prog);
- assert(glIsProgramNV(1));
- glBindProgramNV(GL_VERTEX_PROGRAM_NV, 1);
-
- /* Load the program registers */
- glTrackMatrixNV(GL_VERTEX_PROGRAM_NV, 0, GL_MODELVIEW_PROJECTION_NV, GL_IDENTITY_NV);
- glTrackMatrixNV(GL_VERTEX_PROGRAM_NV, 4, GL_MODELVIEW, GL_INVERSE_TRANSPOSE_NV);
-
- /* Light position */
- glProgramParameter4fNV(GL_VERTEX_PROGRAM_NV, 32, 2, 2, 4, 1);
- /* Diffuse material color */
- glProgramParameter4fNV(GL_VERTEX_PROGRAM_NV, 35, 0.25, 0, 0.25, 1);
-
- /* Gravity strength */
- glProgramParameter4fNV(GL_VERTEX_PROGRAM_NV, 31, .5, 0, 0, 0);
-
- glEnable(GL_DEPTH_TEST);
- glClearColor(0.3, 0.3, 0.3, 1);
- glShadeModel(GL_FLAT);
- glPointSize(3);
- printf("glGetError = %d\n", (int) glGetError());
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 250, 250 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutSpecialFunc( SpecialKey );
- glutDisplayFunc( Display );
- if (Anim)
- glutIdleFunc(Idle);
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/yuvrect.c b/progs/tests/yuvrect.c
deleted file mode 100644
index acef406097..0000000000
--- a/progs/tests/yuvrect.c
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Test the GL_NV_texture_rectangle and GL_MESA_ycrcb_texture extensions.
- *
- * Brian Paul 13 September 2002
- */
-
-#include <assert.h>
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-#include "../util/readtex.c" /* I know, this is a hack. */
-
-#define TEXTURE_FILE "../images/girl.rgb"
-
-static GLfloat Xrot = 0, Yrot = 0, Zrot = 0;
-static GLint ImgWidth, ImgHeight;
-static GLushort *ImageYUV = NULL;
-
-
-static void DrawObject(void)
-{
- glBegin(GL_QUADS);
-
- glTexCoord2f(0, 0);
- glVertex2f(-1.0, -1.0);
-
- glTexCoord2f(ImgWidth, 0);
- glVertex2f(1.0, -1.0);
-
- glTexCoord2f(ImgWidth, ImgHeight);
- glVertex2f(1.0, 1.0);
-
- glTexCoord2f(0, ImgHeight);
- glVertex2f(-1.0, 1.0);
-
- glEnd();
-}
-
-
-static void Display( void )
-{
- glClear( GL_COLOR_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);
- DrawObject();
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -1.0, 1.0, -1.0, 1.0, 10.0, 100.0 );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -15.0 );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- 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[] )
-{
- GLuint texObj = 100;
- const char *file;
-
- if (!glutExtensionSupported("GL_NV_texture_rectangle")) {
- printf("Sorry, GL_NV_texture_rectangle is required\n");
- exit(0);
- }
-
- if (!glutExtensionSupported("GL_MESA_ycbcr_texture")) {
- printf("Sorry, GL_MESA_ycbcr_texture is required\n");
- exit(0);
- }
-
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-
- glBindTexture(GL_TEXTURE_RECTANGLE_NV, texObj);
-#ifdef LINEAR_FILTER
- /* linear filtering looks much nicer but is much slower for Mesa */
- glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-#else
- glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-#endif
-
- if (argc > 1)
- file = argv[1];
- else
- file = TEXTURE_FILE;
-
- ImageYUV = LoadYUVImage(file, &ImgWidth, &ImgHeight);
- if (!ImageYUV) {
- printf("Couldn't read %s\n", TEXTURE_FILE);
- exit(0);
- }
-
- printf("Image: %dx%d\n", ImgWidth, ImgHeight);
-
- glTexImage2D(GL_TEXTURE_RECTANGLE_NV, 0,
- GL_YCBCR_MESA, ImgWidth, ImgHeight, 0,
- GL_YCBCR_MESA, GL_UNSIGNED_SHORT_8_8_MESA, ImageYUV);
-
- assert(glGetError() == GL_NO_ERROR);
- glTexSubImage2D(GL_TEXTURE_RECTANGLE_NV, 0,
- 0, 0, ImgWidth, ImgHeight,
- GL_YCBCR_MESA, GL_UNSIGNED_SHORT_8_8_MESA, ImageYUV);
-
- assert(glGetError() == GL_NO_ERROR);
-
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
-
- glEnable(GL_TEXTURE_RECTANGLE_NV);
-
- glShadeModel(GL_FLAT);
- glClearColor(0.3, 0.3, 0.4, 1.0);
-
- 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( 300, 300 );
- glutInitWindowPosition( 0, 0 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
- glutCreateWindow(argv[0] );
-
- Init( argc, argv );
-
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutSpecialFunc( SpecialKey );
- glutDisplayFunc( Display );
-
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/yuvsquare.c b/progs/tests/yuvsquare.c
deleted file mode 100644
index 3601e7a31c..0000000000
--- a/progs/tests/yuvsquare.c
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * Test the GL_NV_texture_rectangle and GL_MESA_ycrcb_texture extensions.
- *
- * Brian Paul 13 September 2002
- */
-
-
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-#include "../util/readtex.c" /* I know, this is a hack. */
-
-#define TEXTURE_FILE "../images/tile.rgb"
-
-static GLfloat Xrot = 0, Yrot = 0, Zrot = 0;
-static GLint ImgWidth, ImgHeight;
-static GLushort *ImageYUV = NULL;
-static GLubyte *ImageRGB = NULL;
-static const GLuint yuvObj = 100;
-static const GLuint rgbObj = 101;
-
-
-static void DrawObject(void)
-{
- glBegin(GL_QUADS);
-
- glTexCoord2f(0, 0);
- glVertex2f(-1.0, -1.0);
-
- glTexCoord2f(1, 0);
- glVertex2f(1.0, -1.0);
-
- glTexCoord2f(1, 1);
- glVertex2f(1.0, 1.0);
-
- glTexCoord2f(0, 1);
- glVertex2f(-1.0, 1.0);
-
- glEnd();
-}
-
-
-static void Display( void )
-{
- glClear( GL_COLOR_BUFFER_BIT );
-
- glPushMatrix();
- glTranslatef( -1.1, 0.0, -15.0 );
- glRotatef(Xrot, 1.0, 0.0, 0.0);
- glRotatef(Yrot, 0.0, 1.0, 0.0);
- glRotatef(Zrot, 0.0, 0.0, 1.0);
- glBindTexture(GL_TEXTURE_2D, yuvObj);
- DrawObject();
- glPopMatrix();
-
- glPushMatrix();
- glTranslatef( 1.1, 0.0, -15.0 );
- glRotatef(Xrot, 1.0, 0.0, 0.0);
- glRotatef(Yrot, 0.0, 1.0, 0.0);
- glRotatef(Zrot, 0.0, 0.0, 1.0);
- glBindTexture(GL_TEXTURE_2D, rgbObj);
- DrawObject();
- glPopMatrix();
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glFrustum( -1.1, 1.1, -1.1, 1.1, 10.0, 100.0 );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0, 0.0, -15.0 );
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- 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();
-}
-
-
-#define CLAMP( X, MIN, MAX ) ( (X)<(MIN) ? (MIN) : ((X)>(MAX) ? (MAX) : (X)) )
-
-
-
-/* #define LINEAR_FILTER */
-
-static void Init( int argc, char *argv[] )
-{
- const char *file;
- GLenum format;
-
- if (!glutExtensionSupported("GL_MESA_ycbcr_texture")) {
- printf("Sorry, GL_MESA_ycbcr_texture is required\n");
- exit(0);
- }
-
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-
- if (argc > 1)
- file = argv[1];
- else
- file = TEXTURE_FILE;
-
- /* First load the texture as YCbCr.
- */
-
- glBindTexture(GL_TEXTURE_2D, yuvObj);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-
- ImageYUV = LoadYUVImage(file, &ImgWidth, &ImgHeight );
- if (!ImageYUV) {
- printf("Couldn't read %s\n", TEXTURE_FILE);
- exit(0);
- }
-
- printf("Image: %dx%d\n", ImgWidth, ImgHeight);
-
-
- glTexImage2D(GL_TEXTURE_2D, 0,
- GL_YCBCR_MESA,
- ImgWidth, ImgHeight, 0,
- GL_YCBCR_MESA,
- GL_UNSIGNED_SHORT_8_8_MESA, ImageYUV);
-
- glEnable(GL_TEXTURE_2D);
-
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
-
-
-
- /* Now load the texture as RGB.
- */
-
- glBindTexture(GL_TEXTURE_2D, rgbObj);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-
- ImageRGB = LoadRGBImage(file, &ImgWidth, &ImgHeight, &format );
- if (!ImageRGB) {
- printf("Couldn't read %s\n", TEXTURE_FILE);
- exit(0);
- }
-
- printf("Image: %dx%d\n", ImgWidth, ImgHeight);
-
-
- glTexImage2D(GL_TEXTURE_2D, 0,
- format,
- ImgWidth, ImgHeight, 0,
- format,
- GL_UNSIGNED_BYTE, ImageRGB);
-
- glEnable(GL_TEXTURE_2D);
-
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
-
-
-
- glShadeModel(GL_FLAT);
- glClearColor(0.3, 0.3, 0.4, 1.0);
-
- 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));
- }
-
- printf( "Both images should appear the same.\n" );
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowSize( 300, 300 );
- glutInitWindowPosition( 0, 0 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
- glutCreateWindow(argv[0] );
-
- Init( argc, argv );
-
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutSpecialFunc( SpecialKey );
- glutDisplayFunc( Display );
-
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tests/zreaddraw.c b/progs/tests/zreaddraw.c
deleted file mode 100644
index e2dacbf7f2..0000000000
--- a/progs/tests/zreaddraw.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Test glRead/DrawPixels for GL_DEPTH_COMPONENT, with pixelzoom.
- *
- * Brian Paul
- * 23 August 2003
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-static GLint WinWidth = 500, WinHeight = 500;
-
-
-static void Display(void)
-{
- GLfloat depth[100 * 100];
- GLfloat depth2[400 * 400];
- GLfloat min, max;
- int i;
-
- glClearColor(0.5, 0.5, 0.5, 0);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- /* draw a sphere */
- glViewport(0, 0, 100, 100);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1, 1, -1, 1, -1, 0); /* clip away back half of sphere */
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- glutSolidSphere(1.0, 20, 10);
-
- /* read the depth image */
- glReadPixels(0, 0, 100, 100, GL_DEPTH_COMPONENT, GL_FLOAT, depth);
- min = max = depth[0];
- for (i = 1; i < 100 * 100; i++) {
- if (depth[i] < min)
- min = depth[i];
- if (depth[i] > max)
- max = depth[i];
- }
- printf("Depth value range: [%f, %f]\n", min, max);
-
- /* draw depth image with scaling (into z buffer) */
- glPixelZoom(4.0, 4.0);
- glWindowPos2i(100, 0);
- glDrawPixels(100, 100, GL_DEPTH_COMPONENT, GL_FLOAT, depth);
-
- /* read back scaled depth image */
- glReadPixels(100, 0, 400, 400, GL_DEPTH_COMPONENT, GL_FLOAT, depth2);
- /* draw as luminance */
- glPixelZoom(1.0, 1.0);
- glDrawPixels(400, 400, GL_LUMINANCE, GL_FLOAT, depth2);
-
- glutSwapBuffers();
-}
-
-
-static void Reshape(int width, int height)
-{
- WinWidth = width;
- WinHeight = height;
- glViewport(0, 0, width, height);
-}
-
-
-static void Key(unsigned char key, int x, int y)
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void Init(void)
-{
- const GLfloat blue[4] = {.1, .1, 1.0, 0.0};
- const GLfloat gray[4] = {0.2, 0.2, 0.2, 1.0};
- const GLfloat white[4] = {1.0, 1.0, 1.0, 1.0};
- const GLfloat pos[4] = {0, 0, 10, 0};
-
- printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, blue);
- glLightfv(GL_LIGHT0, GL_AMBIENT, gray);
- glLightfv(GL_LIGHT0, GL_DIFFUSE, white);
- glLightfv(GL_LIGHT0, GL_POSITION, pos);
- glEnable(GL_LIGHTING);
- glEnable(GL_LIGHT0);
- glEnable(GL_DEPTH_TEST);
-}
-
-
-int main(int argc, char *argv[])
-{
- glutInit(&argc, argv);
- glutInitWindowPosition(0, 0);
- glutInitWindowSize(WinWidth, WinHeight);
- glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
- glutCreateWindow(argv[0]);
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Display);
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/tools/trace/.gitignore b/progs/tools/trace/.gitignore
deleted file mode 100644
index afe0c5829e..0000000000
--- a/progs/tools/trace/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-gltrace.cc
diff --git a/progs/tools/trace/Makefile b/progs/tools/trace/Makefile
deleted file mode 100644
index 822e466ad1..0000000000
--- a/progs/tools/trace/Makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-# Makefile for Thomas Sondergaard's API tracer
-
-TOP = ../../..
-
-include $(TOP)/configs/current
-
-
-OBJECTS = gltrace.o gltrace_support.o
-
-TRACER = gltrace.so
-
-.cc.o:
- $(CXX) -c $(INCDIRS) $(CXXFLAGS) $< -o $@
-
-
-default: $(TRACER)
-
-$(TRACER): $(OBJECTS)
- $(MKLIB) -o $(TRACER) -noprefix -cplusplus -linker '$(CXX)' \
- -ldflags '$(LDFLAGS)' $(MKLIB_OPTIONS) $(OBJECTS)
-
-gltrace.cc: gltrace.py
- PYTHONPATH=$(TOP)/src/mesa/glapi python gltrace.py -f $(TOP)/src/mesa/glapi/gl_API.xml > gltrace.cc
-
-
-clean:
- rm -f $(OBJECTS)
- rm -f $(TRACER)
- rm -f *~
- rm -f gltrace.cc
diff --git a/progs/tools/trace/README b/progs/tools/trace/README
deleted file mode 100644
index 7b3141dba7..0000000000
--- a/progs/tools/trace/README
+++ /dev/null
@@ -1,23 +0,0 @@
-NAME
- gltrace - trace opengl calls
-
-SYNOPSIS
- gltrace [OPTION] command [arg ...]
-
-DESCRIPTION
- -h help (this text)
- -c log gl calls
- -t time stamp log entries
- -e check for and log errors. errors occurring between
- glBegin() and glEnd() are checked at glEnd()
- -v verbose. Shows configuration settings passed to
- gltrace.so
- -l LOGFILE logfile. Default is stderr
-
-PROBLEMS
- Not all OpenGL extensions are known and traced by gltrace. Extension
- functions not initialized using glXGetProcAddress(ARB) will not be
- traced.
-
-AUTHOR
- Thomas Sondergaard (ts_news1 'at' sondergaard.cc)
diff --git a/progs/tools/trace/gltrace b/progs/tools/trace/gltrace
deleted file mode 100755
index d386912cf2..0000000000
--- a/progs/tools/trace/gltrace
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/bin/bash
-
-# Copyright (C) 2006 Thomas Sondergaard
-# All Rights Reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# on the rights to use, copy, modify, merge, publish, distribute, sub
-# license, and/or sell copies of the Software, and to permit persons to whom
-# the Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
-# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-# IN THE SOFTWARE.
-#
-# Authors:
-# Thomas Sondergaard <ts@medical-insight.com>
-
-usage="usage: $0 [ -hctev ] [-l LOGFILE] program [args...]\n\t-h\t\thelp (this text)\n\t-c\t\tlog gl calls\n\t-t\t\ttime stamp log entries\n\t-e\t\tcheck for and log errors. errors occurring between\n\t\t\tglBegin() and glEnd() are checked at glEnd()\n\t-v\t\tverbose. Shows configuration settings passed to\n\t\t\tgltrace.so\n\t-l LOGFILE\tlogfile. Default is stderr"
-
-# Path to gltrace.so - must not be relative
-#GLTRACE_SO=/home/ts/Mesa_gltrace/src/mesa/glapi/gltrace.so
-# This seems to work:
-GLTRACE_SO=./gltrace.so
-
-# Set options from command line
-
-VERBOSE=0
-GLTRACE_LOG_CALLS=0
-GLTRACE_LOG_TIME=0
-GLTRACE_CHECK_ERRORS=0
-export GLTRACE_LOG_CALLS GLTRACE_LOG_TIME GLTRACE_CHECK_ERRORS
-
-if [ $# -eq 0 ]; then
- echo -e $usage
- exit
-fi
-
-while getopts "hctevl:" options; do
- case $options in
- h) echo -e $usage
- exit 1;;
- c) GLTRACE_LOG_CALLS=1;;
- t) GLTRACE_LOG_TIME=1;;
- e) GLTRACE_CHECK_ERRORS=1;;
- l) GLTRACE_LOGFILE=$OPTARG
- export GLTRACE_LOGFILE;;
- v) VERBOSE=1;;
- *) echo -e $usage
- exit 1;;
- esac
-done
-
-# Remove the parsed args
-shift $(($OPTIND-1))
-
-if [ ! -r $GLTRACE_SO ]; then
- echo "Error: The gltrace.so file '$GLTRACE_SO' is missing!"
- exit 1
-fi
-
-export LD_PRELOAD=$GLTRACE_SO
-
-if [ $VERBOSE -eq 1 ]; then
- echo GLTRACE_LOG_CALLS=$GLTRACE_LOG_CALLS
- echo GLTRACE_LOG_TIME=$GLTRACE_LOG_TIME
- echo GLTRACE_CHECK_ERRORS=$GLTRACE_CHECK_ERRORS
- echo GLTRACE_LOGFILE=$GLTRACE_LOGFILE
- echo LD_PRELOAD=$LD_PRELOAD
- echo command=$*
-fi
-
-exec $*
diff --git a/progs/tools/trace/gltrace.py b/progs/tools/trace/gltrace.py
deleted file mode 100644
index 973881ac94..0000000000
--- a/progs/tools/trace/gltrace.py
+++ /dev/null
@@ -1,189 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2006 Thomas Sondergaard
-# All Rights Reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# on the rights to use, copy, modify, merge, publish, distribute, sub
-# license, and/or sell copies of the Software, and to permit persons to whom
-# the Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
-# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-# IN THE SOFTWARE.
-#
-# Authors:
-# Thomas Sondergaard <ts@medical-insight.com>
-
-import gl_XML, glX_XML, glX_proto_common, license
-import sys, getopt, copy, string
-
-def create_argument_string(parameters):
- """Create a parameter string from a list of gl_parameters."""
-
- list = []
- for p in parameters:
- list.append( p.name )
- #if len(list) == 0: list = ["void"]
-
- return string.join(list, ", ")
-
-def create_logfunc_string(func, name):
- """Create a parameter string from a list of gl_parameters."""
-
- list = []
- list.append('"gl' + name + '("')
- sep = None
- for p in func.parameters:
- if (sep):
- list.append(sep)
- list.append( p.name )
- sep = '", "'
- list.append('");"')
- #if len(list) == 0: list = ["void"]
-
- return "if (config.logCalls) GLTRACE_LOG(" + string.join(list, " << ")+");";
-
-class PrintGltrace(glX_proto_common.glx_print_proto): #(gl_XML.gl_print_base):
- def __init__(self):
- gl_XML.gl_print_base.__init__(self)
-
- self.name = "gltrace.py"
- self.license = license.bsd_license_template % ( \
-"""Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
-(C) Copyright IBM Corporation 2004""", "PRECISION INSIGHT, IBM")
- #self.header_tag = "_INDIRECT_H_"
-
- self.last_category = ""
- return
-
-
- def printRealHeader(self):
- print """/**
- * \\file
- * gl and glX wrappers for tracing
- *
- * \\author Thomas Sondergaard <ts@medical-insight.com>
- */
-"""
- #self.printVisibility( "HIDDEN", "hidden" )
- #self.printFastcall()
- #self.printNoinline()
-
- print """
-#include <GL/gl.h>
-#include <GL/glx.h>
-#include <GL/glu.h>
-#include <dlfcn.h>
-#include "gltrace_support.h"
-
-using namespace gltrace;
-
-static GLenum real_glGetError() {
- static GLenum (*real_func)(void) = 0;
- if (!real_func) real_func = (GLenum (*)(void)) dlsym(RTLD_NEXT, "glGetError");
- return real_func();
-}
-
-bool betweenGLBeginEnd = false;
-
-extern "C" {
-
-
-__GLXextFuncPtr real_glXGetProcAddressARB(const GLubyte *func_name) {
- static __GLXextFuncPtr (*real_func)(const GLubyte *func_name) = 0;
- if (!real_func) real_func = (__GLXextFuncPtr (*)(const GLubyte *func_name)) dlsym(RTLD_NEXT, "glXGetProcAddressARB");
-
- return real_func(func_name);
-}
-
-__GLXextFuncPtr glXGetProcAddressARB(const GLubyte *func_name_ubyte) {
- std::string func_name =
- std::string("gltrace_")+reinterpret_cast<const char*>(func_name_ubyte);
-
- __GLXextFuncPtr f = (__GLXextFuncPtr) dlsym(RTLD_DEFAULT, func_name.c_str());
- if (!f) {
- GLTRACE_LOG("warning: Could not resolve '" << func_name << "' - function will not be intercepted");
- return real_glXGetProcAddressARB(func_name_ubyte);
- }
- return f;
-}
-
-"""
-
- def printRealFooter(self):
- print "} // Extern \"C\""
-
- def printBody(self, api):
- for func in api.functionIterateGlx():
- for func_name in func.entry_points:
- functionPrefix = ""
- use_dlsym = True
- if (api.get_category_for_name(func.name)[1] != None):
- functionPrefix = "gltrace_"
- use_dlsym = False
-
- print '%s %sgl%s(%s) {' % (func.return_type, functionPrefix, func_name, func.get_parameter_string())
- if (use_dlsym):
- print ' static %s (*real_func)(%s) = 0;' % (func.return_type, func.get_parameter_string())
- print ' if (!real_func) real_func = (%s (*)(%s)) dlsym(RTLD_NEXT, "gl%s");' % (func.return_type, func.get_parameter_string(), func_name)
- else: # use glXGetProcAddressArb
- print ' static %s (*real_func)(%s) = 0;' % (func.return_type, func.get_parameter_string())
- print ' if (!real_func) real_func = (%s (*)(%s)) real_glXGetProcAddressARB((GLubyte *)"gl%s");' % (func.return_type, func.get_parameter_string(), func_name)
- print ' ' + create_logfunc_string(func, func_name)
- if (func.return_type == "void"):
- print ' real_func(%s);' % (create_argument_string(func.parameters))
- else:
- print ' %s retval = real_func(%s);' % (func.return_type, create_argument_string(func.parameters))
- if (func.name == "Begin"):
- print ' betweenGLBeginEnd = true;'
- elif (func.name == "End"):
- print ' betweenGLBeginEnd = false;'
- print ' if (!betweenGLBeginEnd && config.checkErrors) {'
- print ' GLenum res;'
- print ' while ((res = real_glGetError ()) != GL_NO_ERROR) '
- print ' GLTRACE_LOG("OpenGL Error (" << res << "): <" << gluErrorString(res) << "> at " << gltrace::getStackTrace());'
- print ' }'
- if (func.return_type != "void"):
- print " return retval;"
- print '}'
-
-
-def show_usage():
- print "Usage: %s [-f input_file_name] [-m output_mode] [-d]" % sys.argv[0]
- print " -m output_mode Output mode can be one of 'proto', 'init_c' or 'init_h'."
- print " -d Enable extra debug information in the generated code."
- sys.exit(1)
-
-
-if __name__ == '__main__':
- file_name = "gl_API.xml"
-
- try:
- (args, trail) = getopt.getopt(sys.argv[1:], "f:d")
- except Exception,e:
- show_usage()
-
- debug = 0
- for (arg,val) in args:
- if arg == "-f":
- file_name = val
- elif arg == "-d":
- debug = 1
-
- printer = PrintGltrace()
-
- printer.debug = debug
- api = gl_XML.parse_GL_API( file_name, glX_XML.glx_item_factory() )
-
- printer.Print( api )
diff --git a/progs/tools/trace/gltrace_support.cc b/progs/tools/trace/gltrace_support.cc
deleted file mode 100644
index 0b76d3247d..0000000000
--- a/progs/tools/trace/gltrace_support.cc
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Copyright (C) 2006 Thomas Sondergaard 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.
- */
-
-#include "gltrace_support.h"
-#include <cstdlib>
-#include <cstring>
-#include <assert.h>
-#include <sstream>
-#include <fstream>
-#include <iomanip>
-#include <execinfo.h>
-#include <cxxabi.h>
-#include <sys/time.h>
-
-namespace {
-
- const char *
- demangle (const char * mangled) throw()
- {
- static char buf[4096];
- int status;
- size_t length = sizeof(buf)-1;
-
- memset (buf, 0, sizeof(buf));
-
- if (!mangled)
- return 0;
-
- char * demangled = __cxxabiv1::__cxa_demangle(mangled,
- buf,
- &length,
- &status);
- if (demangled && !status)
- return demangled;
- else
- return mangled;
- }
-
- void
- printStackTrace (void **stackframes,
- int stackframe_size,
- std::ostream & out )
- {
- char **strings = 0;
- std::stringstream ss;
-
- // this might actually fail if memory is tight or we are in a
- // signal handler
- strings = backtrace_symbols (stackframes, stackframe_size);
-
- ss << "Backtrace :";
-
- if (stackframe_size == gltrace::MAX_STACKFRAMES)
- ss << "(possibly incomplete maximal number of frames exceeded):" << std::endl;
- else
- ss << std::endl;
-
- out << ss.str();
-
- // the first frame is the constructor of the exception
- // the last frame always seem to be bogus?
- for (int i = 0; strings && i < stackframe_size-1; ++i) {
- char libname[257], funcname[2049];
- unsigned int address=0, funcoffset = 0x0;
-
- memset (libname,0,sizeof(libname));
- memset (funcname,0,sizeof(funcname));
-
- strcpy (funcname,"??");
- strcpy (libname, "??");
-
- int scanned = sscanf (strings[i], "%256[^(] ( %2048[^+] + %x ) [ %x ]",
- libname,
- funcname,
- &funcoffset,
- &address);
-
- /* ok, so no function was mentioned in the backtrace */
- if (scanned < 4) {
- scanned = sscanf (strings[i], "%256[^([] [ %x ]",
- libname,
- &address);
- }
-
- if (funcname[0] == '_') {
- const char * demangled;
- if ((demangled = demangle(funcname) ) != funcname) {
- strncpy (funcname, demangled, sizeof(funcname)-1);
- }
- }
- else
- strcat (funcname," ()");
-
- out << "\t#" << i << std::hex << " 0x" << address << " in " << funcname
- << " at 0x" << funcoffset << " (from " << libname << ")" << std::endl;
- }
-
- free (strings);
- }
-
-
-} // anon namespace
-
-namespace gltrace {
-
- std::string getStackTrace(int count, int first) {
- ++first;
- std::stringstream ss;
- const int BA_MAX = 1000;
- assert(count + first <= BA_MAX);
- void *ba[BA_MAX];
- int n = backtrace(ba, count+first);
-
- printStackTrace( &ba[first], n-first, ss);
-
- return ss.str();
- }
-
- std::ostream &timeNow(std::ostream &os) {
-
- struct timeval now;
- struct tm t;
- static char const *months[12] =
- {
- "Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
- };
-
- gettimeofday (&now, 0);
- localtime_r ((time_t*) &now.tv_sec, &t);
-
- os
- << months[t.tm_mon] << " "
- << std::setw(2) << t.tm_mday << " "
- << std::setw(2) << t.tm_hour << ":"
- << std::setw(2) << t.tm_min << ":"
- << std::setw(2) << t.tm_sec << "."
- << std::setw(3) << now.tv_usec/1000;
- return os;
- }
-
- logstream::logstream(const char *filename) {
- if (!filename)
- init(std::cerr.rdbuf());
- else {
- file_os.reset(new std::ofstream(filename));
- if (file_os->good())
- init(file_os->rdbuf());
- else {
- std::cerr << "ERROR: gltrace: Failed to open '" << filename
- << "' for writing. Falling back to stderr." << std::endl;
- init(std::cerr.rdbuf());
- }
- }
- *this << std::setfill('0'); // setw used in timeNow
- }
-
-
- Config::Config() :
- logCalls(true),
- checkErrors(true),
- logTime(true),
- log(getenv("GLTRACE_LOGFILE")) {
- if (const char *v = getenv("GLTRACE_LOG_CALLS"))
- logCalls = strncmp("1", v, 1) == 0;
- if (const char *v = getenv("GLTRACE_CHECK_ERRORS"))
- checkErrors = strncmp("1", v, 1) == 0;
- if (const char *v = getenv("GLTRACE_LOG_TIME"))
- logTime = strncmp("1", v, 1) == 0;
- }
-
- // *The* config
- Config config;
-
-} // namespace gltrace
diff --git a/progs/tools/trace/gltrace_support.h b/progs/tools/trace/gltrace_support.h
deleted file mode 100644
index de28669a98..0000000000
--- a/progs/tools/trace/gltrace_support.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// -*- c++ -*- (emacs c++ mode)
-/*
- * Copyright (C) 2006 Thomas Sondergaard 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.
- */
-#ifndef GLTRACE_SUPPORT_H
-#define GLTRACE_SUPPORT_H
-
-#include <string>
-#include <iostream>
-#include <memory>
-
-namespace gltrace {
-
- const int MAX_STACKFRAMES = 100;
-
- /// Returns the stack trace of the current thread
- std::string getStackTrace(int count = MAX_STACKFRAMES, int first = 0);
-
- std::ostream &timeNow(std::ostream &os);
-
- struct logstream : public std::ostream {
-
- /// Opens a logstream - if filename is null, stderr will be used
- logstream(const char *filename = 0);
-
- private:
- std::auto_ptr<std::ofstream> file_os;
- };
-
- struct Config {
- bool logCalls;
- bool checkErrors;
- bool logTime;
- logstream log;
-
- Config();
- };
-
- extern Config config;
-
-} // namespace gltrace
-
-#define GLTRACE_LOG(x) \
- { if (config.logTime) config.log << timeNow << ": "; config.log << x << "\n"; }
-
-#endif // GLTRACE_SUPPORT_H
-
-
diff --git a/progs/trivial/.gitignore b/progs/trivial/.gitignore
deleted file mode 100644
index 1c49fdd55f..0000000000
--- a/progs/trivial/.gitignore
+++ /dev/null
@@ -1,65 +0,0 @@
-clear
-dlist-dangling
-dlist-edgeflag
-dlist-edgeflag-dangling
-drawarrays
-drawelements
-drawrange
-line
-line-clip
-line-cull
-line-userclip
-line-userclip-clip
-line-userclip-nop
-line-userclip-nop-clip
-lineloop
-lineloop-clip
-point
-point-clip
-point-param
-point-wide
-poly
-poly-flat
-poly-unfilled
-quad
-quad-clip
-quad-clip-all-vertices
-quad-clip-nearplane
-quad-degenerate
-quad-flat
-quad-offset-factor
-quad-offset-unfilled
-quad-offset-units
-quad-tex-2d
-quad-tex-3d
-quad-tex-pbo
-quad-unfilled
-quads
-quadstrip
-quadstrip-flat
-readtex.c
-readtex.h
-tri
-tri-blend
-tri-clip
-tri-cull
-tri-dlist
-tri-edgeflag
-tri-flat
-tri-flat-clip
-tri-tex-3d
-tri-unfilled
-tri-unfilled-clip
-tri-unfilled-smooth
-tri-unfilled-userclip
-tri-userclip
-tristrip
-tristrip-clip
-vbo-drawarrays
-vbo-drawelements
-vbo-drawrange
-vp-array
-vp-clip
-vp-line-clip
-vp-tri
-vp-unfilled
diff --git a/progs/trivial/Makefile b/progs/trivial/Makefile
deleted file mode 100644
index e72fb07889..0000000000
--- a/progs/trivial/Makefile
+++ /dev/null
@@ -1,144 +0,0 @@
-# progs/tests/Makefile
-
-
-# These programs aren't intended to be included with the normal distro.
-# They're not too interesting but they're good for testing.
-
-TOP = ../..
-include $(TOP)/configs/current
-
-
-LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
-
-SOURCES = \
- clear.c \
- line-clip.c \
- line-cull.c \
- line-userclip-clip.c \
- line-userclip-nop-clip.c \
- line-userclip-nop.c \
- line-userclip.c \
- line.c \
- lineloop-clip.c \
- lineloop.c \
- point.c \
- point-clip.c \
- point-param.c \
- point-wide.c \
- poly-flat.c \
- poly-unfilled.c \
- poly.c \
- quad-clip.c \
- quad-clip-all-vertices.c \
- quad-clip-nearplane.c \
- quad-degenerate.c \
- quad-flat.c \
- quad-offset-factor.c \
- quad-offset-units.c \
- quad-offset-unfilled.c \
- quad-unfilled.c \
- quad-tex-2d.c \
- quad-tex-pbo.c \
- quad-tex-3d.c \
- quad.c \
- quads.c \
- quadstrip.c \
- quadstrip-flat.c \
- dlist-edgeflag.c \
- dlist-dangling.c \
- dlist-edgeflag-dangling.c \
- drawrange.c \
- drawelements.c \
- drawarrays.c \
- tri-blend.c \
- tri-tex-3d.c \
- tri-clip.c \
- tri-cull.c \
- tri-edgeflag.c \
- tri-flat-clip.c \
- tri-flat.c \
- tri-unfilled-clip.c \
- tri-unfilled-smooth.c \
- tri-unfilled-userclip.c \
- tri-unfilled.c \
- tri-userclip.c \
- tri-dlist.c \
- tri.c \
- tristrip-clip.c \
- tristrip.c \
- vbo-drawrange.c \
- vbo-drawelements.c \
- vbo-drawarrays.c \
- vp-clip.c \
- vp-tri.c \
- vp-line-clip.c \
- vp-unfilled.c \
- vp-array.c
-
-PROGS = $(SOURCES:%.c=%)
-
-INCLUDES = -I. -I$(TOP)/include -I../samples
-
-UTIL_FILES = readtex.h readtex.c
-
-
-##### RULES #####
-
-.SUFFIXES:
-.SUFFIXES: .c
-
-.c:
- $(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
-
-.c.o:
- $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
-
-.S.o:
- $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
-
-
-##### TARGETS #####
-
-default: $(UTIL_FILES) $(PROGS)
-
-clean:
- -rm -f $(PROGS)
- -rm -f *.o
- -rm -f getproclist.h
-
-
-# auto code generation
-getprocaddress: getprocaddress.c getproclist.h
-
-getproclist.h: $(TOP)/src/mesa/glapi/gl_API.xml getprocaddress.c getprocaddress.py
- python getprocaddress.py > getproclist.h
-
-
-texrect: texrect.o readtex.o
- $(CC) $(CFLAGS) $(LDFLAGS) texrect.o readtex.o $(LIBS) -o $@
-
-texrect.o: texrect.c readtex.h
- $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
-
-invert: invert.o readtex.o
- $(CC) $(CFLAGS) $(LDFLAGS) invert.o readtex.o $(LIBS) -o $@
-
-invert.o: invert.c readtex.h
- $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
-
-readtex.o: readtex.c
- $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
-
-
-readtex.h: $(TOP)/progs/util/readtex.h
- ln -s $(TOP)/progs/util/readtex.h .
-
-readtex.c: $(TOP)/progs/util/readtex.c
- ln -s $(TOP)/progs/util/readtex.c .
-
-
-
-
-# Emacs tags
-tags:
- etags `find . -name \*.[ch]` `find ../include`
diff --git a/progs/trivial/clear.c b/progs/trivial/clear.c
deleted file mode 100644
index 7e7ca588c3..0000000000
--- a/progs/trivial/clear.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/dlist-dangling.c b/progs/trivial/dlist-dangling.c
deleted file mode 100644
index 97f878e96b..0000000000
--- a/progs/trivial/dlist-dangling.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-GLint list;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-
-
- list = glGenLists(1);
- glNewList(list, GL_COMPILE);
- glBegin(GL_TRIANGLES);
- glVertex3f( 0.9, -0.9, -30.0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(.8,0,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
- glEndList();
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-
-
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glColor3f(0,.9,0);
- glCallList(list);
-
- glRotatef(45,0,0,1);
- glColor3f(1,0,1);
- glCallList(list);
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/dlist-edgeflag-dangling.c b/progs/trivial/dlist-edgeflag-dangling.c
deleted file mode 100644
index 47d29bdade..0000000000
--- a/progs/trivial/dlist-edgeflag-dangling.c
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-GLint list;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-
- glPolygonMode(GL_FRONT, GL_LINE);
- glPolygonMode(GL_BACK, GL_POINT);
-
- list = glGenLists(1);
- glNewList(list, GL_COMPILE);
- glBegin(GL_TRIANGLES);
- glVertex3f( 0.9, -0.9, -30.0);
- glEdgeFlag(1);
- glVertex3f( 0.9, 0.9, -30.0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
- glEndList();
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-
-
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glPushMatrix();
- glColor3f(0,.9,0);
- glEdgeFlag(0);
- glCallList(list);
-
- glRotatef(45,0,0,1);
- glColor3f(1,0,1);
- glCallList(list);
- glPopMatrix();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/dlist-edgeflag.c b/progs/trivial/dlist-edgeflag.c
deleted file mode 100644
index b58e7eb435..0000000000
--- a/progs/trivial/dlist-edgeflag.c
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-GLint list;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-
- glPolygonMode(GL_FRONT, GL_LINE);
- glPolygonMode(GL_BACK, GL_POINT);
-
- list = glGenLists(1);
- glNewList(list, GL_COMPILE);
- glBegin(GL_TRIANGLES);
- glEdgeFlag(1);
-/* glColor3f(0,0,.7); */
- glVertex3f( 0.9, -0.9, -30.0);
- glEdgeFlag(0);
-/* glColor3f(.8,0,0); */
- glVertex3f( 0.9, 0.9, -30.0);
- glEdgeFlag(1);
-/* glColor3f(0,.9,0); */
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
- glEndList();
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-
-
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glPushMatrix();
- glColor3f(0,.9,0);
- glCallList(list);
-
- glRotatef(45,0,0,1);
- glColor3f(1,0,1);
- glCallList(list);
- glPopMatrix();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/drawarrays.c b/progs/trivial/drawarrays.c
deleted file mode 100644
index 596eee9eef..0000000000
--- a/progs/trivial/drawarrays.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/* Basic VBO */
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-struct {
- GLfloat pos[3];
- GLubyte color[4];
-} verts[] =
-{
- { { 0.9, -0.9, 0.0 },
- { 0x00, 0x00, 0xff, 0x00 }
- },
-
- { { 0.9, 0.9, 0.0 },
- { 0x00, 0xff, 0x00, 0x00 }
- },
-
- { { -0.9, 0.9, 0.0 },
- { 0xff, 0x00, 0x00, 0x00 }
- },
-
- { { -0.9, -0.9, 0.0 },
- { 0xff, 0xff, 0xff, 0x00 }
- },
-};
-
-static void Init( void )
-{
- GLint errno;
- GLuint prognum;
-
- static const char *prog1 =
- "!!ARBvp1.0\n"
- "MOV result.color, vertex.color;\n"
- "MOV result.position, vertex.position;\n"
- "END\n";
-
- glGenProgramsARB(1, &prognum);
- glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum);
- glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(prog1), (const GLubyte *) prog1);
-
- assert(glIsProgramARB(prognum));
- errno = glGetError();
- printf("glGetError = %d\n", errno);
- if (errno != GL_NO_ERROR)
- {
- GLint errorpos;
-
- glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
- printf("errorpos: %d\n", errorpos);
- printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB));
- }
-
-
- glEnableClientState( GL_VERTEX_ARRAY );
- glEnableClientState( GL_COLOR_ARRAY );
-
- glVertexPointer( 3, GL_FLOAT, sizeof(verts[0]), verts[0].pos );
- glColorPointer( 4, GL_UNSIGNED_BYTE, sizeof(verts[0]), verts[0].color );
-
-}
-
-
-
-static void Display( void )
-{
- glClearColor(0.3, 0.3, 0.3, 1);
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- glEnable(GL_VERTEX_PROGRAM_ARB);
-
-// glDrawArrays( GL_TRIANGLES, 0, 3 );
- glDrawArrays( GL_TRIANGLES, 1, 3 );
-
- glFlush();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- /*glTranslatef( 0.0, 0.0, -15.0 );*/
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 250, 250 );
- glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/drawelements.c b/progs/trivial/drawelements.c
deleted file mode 100644
index e0c8e80b68..0000000000
--- a/progs/trivial/drawelements.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/* Test rebasing */
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-GLfloat verts[][4] = {
- { 0.9, -0.9, 0.0, 1.0 },
- { 0.9, 0.9, 0.0, 1.0 },
- { -0.9, 0.9, 0.0, 1.0 },
- { -0.9, -0.9, 0.0, 1.0 },
-};
-
-GLubyte color[][4] = {
- { 0x00, 0x00, 0xff, 0x00 },
- { 0x00, 0xff, 0x00, 0x00 },
- { 0xff, 0x00, 0x00, 0x00 },
- { 0xff, 0xff, 0xff, 0x00 },
-};
-
-GLuint indices[] = { 1, 2, 3 };
-
-static void Init( void )
-{
- GLint errno;
- GLuint prognum;
-
- static const char *prog1 =
- "!!ARBvp1.0\n"
- "MOV result.color, vertex.color;\n"
- "MOV result.position, vertex.position;\n"
- "END\n";
-
- glGenProgramsARB(1, &prognum);
- glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum);
- glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(prog1), (const GLubyte *) prog1);
-
- assert(glIsProgramARB(prognum));
- errno = glGetError();
- printf("glGetError = %d\n", errno);
- if (errno != GL_NO_ERROR)
- {
- GLint errorpos;
-
- glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
- printf("errorpos: %d\n", errorpos);
- printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB));
- }
-
-
- glEnableClientState( GL_VERTEX_ARRAY );
- glEnableClientState( GL_COLOR_ARRAY );
- glVertexPointer( 3, GL_FLOAT, sizeof(verts[0]), verts );
- glColorPointer( 4, GL_UNSIGNED_BYTE, 0, color );
-
-}
-
-
-
-static void Display( void )
-{
- glClearColor(0.3, 0.3, 0.3, 1);
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- glEnable(GL_VERTEX_PROGRAM_NV);
-
- /* Should have min_index == 1, maybe force a rebase:
- */
- glDrawElements( GL_TRIANGLES, 3, GL_UNSIGNED_INT, indices );
-
- glFlush();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- /*glTranslatef( 0.0, 0.0, -15.0 );*/
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 250, 250 );
- glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/drawrange.c b/progs/trivial/drawrange.c
deleted file mode 100644
index 9c787cbfcd..0000000000
--- a/progs/trivial/drawrange.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/* Test rebasing */
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-GLfloat verts[][4] = {
- { 0.9, -0.9, 0.0, 1.0 },
- { 0.9, 0.9, 0.0, 1.0 },
- { -0.9, 0.9, 0.0, 1.0 },
- { -0.9, -0.9, 0.0, 1.0 },
-};
-
-GLubyte color[][4] = {
- { 0x00, 0x00, 0xff, 0x00 },
- { 0x00, 0xff, 0x00, 0x00 },
- { 0xff, 0x00, 0x00, 0x00 },
- { 0xff, 0xff, 0xff, 0x00 },
-};
-
-GLuint indices[] = { 1, 2, 3 };
-
-static void Init( void )
-{
- GLint errno;
- GLuint prognum;
-
- static const char *prog1 =
- "!!ARBvp1.0\n"
- "MOV result.color, vertex.color;\n"
- "MOV result.position, vertex.position;\n"
- "END\n";
-
- glGenProgramsARB(1, &prognum);
- glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum);
- glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(prog1), (const GLubyte *) prog1);
-
- assert(glIsProgramARB(prognum));
- errno = glGetError();
- printf("glGetError = %d\n", errno);
- if (errno != GL_NO_ERROR)
- {
- GLint errorpos;
-
- glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
- printf("errorpos: %d\n", errorpos);
- printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB));
- }
-
-
- glEnableClientState( GL_VERTEX_ARRAY );
- glEnableClientState( GL_COLOR_ARRAY );
- glVertexPointer( 3, GL_FLOAT, sizeof(verts[0]), verts );
- glColorPointer( 4, GL_UNSIGNED_BYTE, 0, color );
-
-}
-
-
-
-static void Display( void )
-{
- glClearColor(0.3, 0.3, 0.3, 1);
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- glEnable(GL_VERTEX_PROGRAM_NV);
-
- glDrawRangeElements( GL_TRIANGLES, 1, 3, 3, GL_UNSIGNED_INT, indices );
-
- glFlush();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- /*glTranslatef( 0.0, 0.0, -15.0 );*/
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 250, 250 );
- glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/line-clip.c b/progs/trivial/line-clip.c
deleted file mode 100644
index 9acd12acc7..0000000000
--- a/progs/trivial/line-clip.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_LINE_STRIP);
- glColor3f(0,0,.7);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(.8,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,.9,0);
- glVertex3f(-1.9, 0.0, -30.0);
- /* Repeat - no loop support yet:
- */
- glColor3f(0,0,.7);
- glVertex3f( 0.9, -0.9, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/line-cull.c b/progs/trivial/line-cull.c
deleted file mode 100644
index 8999a8f0b1..0000000000
--- a/progs/trivial/line-cull.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_LINE_STRIP);
- glColor3f(0,0,1);
- glVertex3f( -1.5, 0.5, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0, 2.0, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-1.5, 2.0, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/line-userclip-clip.c b/progs/trivial/line-userclip-clip.c
deleted file mode 100644
index b24d8452bc..0000000000
--- a/progs/trivial/line-userclip-clip.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- static GLdouble plane[4] = { -.5, 0, 1, 0 };
-
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
- glClipPlane(GL_CLIP_PLANE0, plane);
- glEnable(GL_CLIP_PLANE0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
-/* glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0); */
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_LINE_STRIP);
- glColor3f(0,0,.7);
- glVertex3f( 0.9, -0.9, 0.0);
- glColor3f(.8,0,0);
- glVertex3f( 0.9, 0.9, 0.0);
- glColor3f(0,.9,0);
- glVertex3f(-1.9, 0.0, 0.0);
- glColor3f(0,0,.7);
- glVertex3f( 0.9, -0.9, 0.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/line-userclip-nop-clip.c b/progs/trivial/line-userclip-nop-clip.c
deleted file mode 100644
index e2e0b85a52..0000000000
--- a/progs/trivial/line-userclip-nop-clip.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- static GLdouble plane[4] = { 0, 0, 1, 0 };
-
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
- glClipPlane(GL_CLIP_PLANE0, plane);
- glEnable(GL_CLIP_PLANE0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
-/* glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0); */
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_LINE_STRIP);
- glColor3f(0,0,.7);
- glVertex3f( 0.9, -0.9, 0.0);
- glColor3f(.8,0,0);
- glVertex3f( 0.9, 0.9, 0.0);
- glColor3f(0,.9,0);
- glVertex3f(-1.9, 0.0, 0.0);
- glColor3f(0,0,.7);
- glVertex3f( 0.9, -0.9, 0.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/line-userclip-nop.c b/progs/trivial/line-userclip-nop.c
deleted file mode 100644
index eacee06978..0000000000
--- a/progs/trivial/line-userclip-nop.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- static GLdouble plane[4] = { 0, 0, 1, 0 };
-
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
- glClipPlane(GL_CLIP_PLANE0, plane);
- glEnable(GL_CLIP_PLANE0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
-/* glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0); */
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_LINE_STRIP);
- glColor3f(0,0,.7);
- glVertex3f( 0.9, -0.9, 0.0);
- glColor3f(.8,0,0);
- glVertex3f( 0.9, 0.9, 0.0);
- glColor3f(0,.9,0);
- glVertex3f(-0.9, 0.0, 0.0);
- glColor3f(0,0,.7);
- glVertex3f( 0.9, -0.9, 0.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/line-userclip.c b/progs/trivial/line-userclip.c
deleted file mode 100644
index 6af91431d0..0000000000
--- a/progs/trivial/line-userclip.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- static GLdouble plane[4] = { -.5, 0, 1, 0 };
-
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
- glClipPlane(GL_CLIP_PLANE0, plane);
- glEnable(GL_CLIP_PLANE0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
-/* glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0); */
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_LINE_STRIP);
- glColor3f(0,0,.7);
- glVertex3f( 0.9, -0.9, 0.0);
- glColor3f(.8,0,0);
- glVertex3f( 0.9, 0.9, 0.0);
- glColor3f(0,.9,0);
- glVertex3f(-0.9, 0.0, 0.0);
- glColor3f(0,0,.7);
- glVertex3f( 0.9, -0.9, 0.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/line.c b/progs/trivial/line.c
deleted file mode 100644
index 58bad91b05..0000000000
--- a/progs/trivial/line.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_LINE_STRIP);
- glColor3f(0,0,.7);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(.8,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,.9,0);
- glVertex3f(-0.9, 0.0, -30.0);
- /* Repeat the first vertex - don't have lineloop support in GS yet
- */
- glColor3f(0,0,.7);
- glVertex3f( 0.9, -0.9, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/lineloop-clip.c b/progs/trivial/lineloop-clip.c
deleted file mode 100644
index d8645ee347..0000000000
--- a/progs/trivial/lineloop-clip.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_LINE_LOOP);
- glColor3f(0,0,.7);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(.8,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,.9,0);
- glVertex3f(-1.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/lineloop.c b/progs/trivial/lineloop.c
deleted file mode 100644
index 7500c54fc2..0000000000
--- a/progs/trivial/lineloop.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_LINE_LOOP);
- glColor3f(0,0,.7);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(.8,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,.9,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/point-clip.c b/progs/trivial/point-clip.c
deleted file mode 100644
index 32792047c6..0000000000
--- a/progs/trivial/point-clip.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_POINTS);
- glColor3f(1,0,0);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,1,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(1,0,1);
- glVertex3f(-1.9, 0.9, -30.0);
- glColor3f(0,1,1);
- glVertex3f(-0.9, -0.9, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/point-param.c b/progs/trivial/point-param.c
deleted file mode 100644
index 02500cd34e..0000000000
--- a/progs/trivial/point-param.c
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#define GL_GLEXT_PROTOTYPES
-#include <math.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, 0, 100.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
- glutPostRedisplay();
-}
-
-
-static float
-expected(float z, float size, const float atten[3])
-{
- float dist = fabs(z);
- const GLfloat q = atten[0] + dist * (atten[1] + dist * atten[2]);
- const GLfloat a = sqrt(1.0 / q);
- return size * a;
-}
-
-
-static void Draw(void)
-{
- static GLfloat atten[3] = { 0.0, 0.1, .01 };
- float size = 40.0;
- int i;
-
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- glPointSize(size);
- glPointParameterfvARB(GL_POINT_DISTANCE_ATTENUATION_ARB, atten);
-
- glColor3f(1,0,0);
-
- printf("Expected point sizes:\n");
- glBegin(GL_POINTS);
- for (i = 0; i < 5; i++) {
- float x = -0.8 + i * 0.4;
- float z = -i * 20 - 10;
- glVertex3f( x, 0.0, z);
- printf(" %f\n", expected(z, size, atten));
- }
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow(argv[0]) == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/point-wide.c b/progs/trivial/point-wide.c
deleted file mode 100644
index 473ca043f1..0000000000
--- a/progs/trivial/point-wide.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glPointSize(8.0);
-
- glBegin(GL_POINTS);
- glColor3f(1,0,0);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,1,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(1,0,1);
- glVertex3f(-0.9, 0.9, -30.0);
- glColor3f(0,1,1);
- glVertex3f(-0.9, -0.9, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/point.c b/progs/trivial/point.c
deleted file mode 100644
index 87465bfb2c..0000000000
--- a/progs/trivial/point.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_POINTS);
- glColor3f(1,0,0);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,1,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(1,0,1);
- glVertex3f(-0.9, 0.9, -30.0);
- glColor3f(0,1,1);
- glVertex3f(-0.9, -0.9, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/poly-flat.c b/progs/trivial/poly-flat.c
deleted file mode 100644
index 747b24dc0c..0000000000
--- a/progs/trivial/poly-flat.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
- glShadeModel(GL_FLAT);
-
-
- glBegin(GL_POLYGON);
- glColor3f(1,0,0);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,1,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(1,0,1);
- glVertex3f(-0.9, 0.9, -30.0);
- glColor3f(0,1,1);
- glVertex3f(-0.9, -0.9, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/poly-unfilled.c b/progs/trivial/poly-unfilled.c
deleted file mode 100644
index e0ae463b08..0000000000
--- a/progs/trivial/poly-unfilled.c
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
- glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
-
- glBegin(GL_POLYGON);
- glColor3f(1,0,0);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,1,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(1,0,1);
- glVertex3f(-0.9, 0.9, -30.0);
- glColor3f(0,1,1);
- glVertex3f(-0.9, -0.9, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/poly.c b/progs/trivial/poly.c
deleted file mode 100644
index bdb9e27aa9..0000000000
--- a/progs/trivial/poly.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_POLYGON);
- glColor3f(1,0,0);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,1,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(1,0,1);
- glVertex3f(-0.9, 0.9, -30.0);
- glColor3f(0,1,1);
- glVertex3f(-0.9, -0.9, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/quad-clip-all-vertices.c b/progs/trivial/quad-clip-all-vertices.c
deleted file mode 100644
index 019ef0c479..0000000000
--- a/progs/trivial/quad-clip-all-vertices.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_QUADS);
- glColor3f(1,0,0);
- glVertex3f( 1.9, -1.9, -30.0);
- glColor3f(1,1,0);
- glVertex3f( 1.9, 1.9, -30.0);
- glColor3f(1,0,1);
- glVertex3f(-1.9, 1.9, -30.0);
- glColor3f(0,1,1);
- glVertex3f(-1.9, -1.9, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/quad-clip-nearplane.c b/progs/trivial/quad-clip-nearplane.c
deleted file mode 100644
index be9b9c619a..0000000000
--- a/progs/trivial/quad-clip-nearplane.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-float Z = -6;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- fprintf(stderr, "Press z/Z to translate quad\n");
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glFrustum(-1.0, 1.0, -1.0, 1.0, 5, 100.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
- switch (key) {
- case 'z':
- Z += 0.5;
- break;
- case 'Z':
- Z -= 0.5;
- break;
- case 27:
- exit(1);
- default:
- return;
- }
- printf("Z = %f\n", Z);
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glPushMatrix();
- glTranslatef(0, -0.5, Z);
-
- glBegin(GL_QUADS);
- glColor3f(1,0,0);
- glVertex3f( -0.8, 0, -4.0);
- glColor3f(1,1,0);
- glVertex3f( 0.8, 0, -4.0);
- glColor3f(1,0,1);
- glVertex3f( 0.8, 0, 4.0);
- glColor3f(0,1,1);
- glVertex3f( -0.8, 0, 4.0);
- glEnd();
-
- glPopMatrix();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0);
- glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/quad-clip.c b/progs/trivial/quad-clip.c
deleted file mode 100644
index 9f3a45caec..0000000000
--- a/progs/trivial/quad-clip.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_QUADS);
- glColor3f(1,0,0);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,1,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(1,0,1);
- glVertex3f(-1.9, 0.9, -30.0);
- glColor3f(0,1,1);
- glVertex3f(-0.9, -0.9, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/quad-degenerate.c b/progs/trivial/quad-degenerate.c
deleted file mode 100644
index b14b0f1d87..0000000000
--- a/progs/trivial/quad-degenerate.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_QUADS);
- glColor3f(1,0,0);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,1,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(1,0,1);
- glVertex3f(-0.9, 0.9, -30.0);
- glColor3f(0,1,1);
- glVertex3f(-0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,1,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(1,0,1);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/quad-flat.c b/progs/trivial/quad-flat.c
deleted file mode 100644
index d6e9f02120..0000000000
--- a/progs/trivial/quad-flat.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
- glShadeModel(GL_FLAT);
-
- if (1) {
- glBegin(GL_LINES);
- glColor3f(1,0,0);
- glVertex3f( 0.95, -0.9, -30.0);
- glColor3f(1,1,0);
- glVertex3f( 0.95, 0.9, -30.0);
- glEnd();
- }
-
- glBegin(GL_QUADS);
- glColor3f(1,0,0);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,1,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(1,0,1);
- glVertex3f(-0.9, 0.9, -30.0);
- glColor3f(0,1,1);
- glVertex3f(-0.9, -0.9, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/quad-offset-factor.c b/progs/trivial/quad-offset-factor.c
deleted file mode 100644
index 861d3461c0..0000000000
--- a/progs/trivial/quad-offset-factor.c
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(1.0, 1.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void quad( float half )
-{
- glBegin(GL_QUADS);
- glVertex3f( half/9.0, -half/9.0, -25.0 + half);
- glVertex3f( half/9.0, half/9.0, -25.0 + half);
- glVertex3f(-half/9.0, half/9.0, -25.0 - half);
- glVertex3f(-half/9.0, -half/9.0, -25.0 - half);
- glEnd();
-
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- glEnable(GL_DEPTH_TEST);
-
-
-
- glEnable(GL_POLYGON_OFFSET_FILL);
- glPolygonOffset(1, 0);
-
- glColor3f(1,0,0);
- quad(9);
-
- glDisable(GL_POLYGON_OFFSET_FILL);
- glColor3f(0,1,0);
- quad(6);
-
-
- glEnable(GL_POLYGON_OFFSET_FILL);
- glPolygonOffset(0, 0);
-
- /* Black - should not be visible
- */
- glColor3f(0,0,0);
- quad(6);
-
- glEnable(GL_POLYGON_OFFSET_FILL);
- glPolygonOffset(-1, 0);
- glColor3f(0,0,1);
- quad(3);
-
- glDisable(GL_POLYGON_OFFSET_FILL);
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB | GLUT_DEPTH;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/quad-offset-unfilled.c b/progs/trivial/quad-offset-unfilled.c
deleted file mode 100644
index 1cecf3c1ce..0000000000
--- a/progs/trivial/quad-offset-unfilled.c
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(1.0, 1.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- glEnable(GL_DEPTH_TEST);
-
-
-
- glEnable(GL_POLYGON_OFFSET_FILL);
- glPolygonOffset(1, 0);
-
- glBegin(GL_QUADS);
- glColor3f(1,0,0);
- glVertex3f( 0.9, -0.9, -10.0);
- glVertex3f( 0.9, 0.9, -10.0);
- glVertex3f(-0.9, 0.9, -40.0);
- glVertex3f(-0.9, -0.9, -40.0);
- glEnd();
-
- glDisable(GL_POLYGON_OFFSET_FILL);
-
- glBegin(GL_QUADS);
- glColor3f(0,1,0);
- glVertex3f( 0.6, -0.6, -15.0);
- glVertex3f( 0.6, 0.6, -15.0);
- glVertex3f(-0.6, 0.6, -35.0);
- glVertex3f(-0.6, -0.6, -35.0);
- glEnd();
-
- glEnable(GL_POLYGON_OFFSET_FILL);
- glPolygonOffset(-1, 0);
-
- glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
-
- glBegin(GL_QUADS);
- glColor3f(0,0,1);
- glVertex3f( 0.3, -0.3, -20.0);
- glVertex3f( 0.3, 0.3, -20.0);
- glVertex3f(-0.3, 0.3, -30.0);
- glVertex3f(-0.3, -0.3, -30.0);
- glEnd();
-
-
- glDisable(GL_POLYGON_OFFSET_FILL);
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB | GLUT_DEPTH;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/quad-offset-units.c b/progs/trivial/quad-offset-units.c
deleted file mode 100644
index 5c41be308e..0000000000
--- a/progs/trivial/quad-offset-units.c
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(1.0, 1.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.2, 1.2, -1.2, 1.2, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void quad( float half )
-{
- glBegin(GL_QUADS);
- glVertex3f( half/9.0, -half/9.0, -25.0 + half);
- glVertex3f( half/9.0, half/9.0, -25.0 + half);
- glVertex3f(-half/9.0, half/9.0, -25.0 - half);
- glVertex3f(-half/9.0, -half/9.0, -25.0 - half);
- glEnd();
-
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- glEnable(GL_DEPTH_TEST);
-
-
-
- glEnable(GL_POLYGON_OFFSET_FILL);
- glPolygonOffset(0, 4);
-
- glColor3f(1,0,0);
- quad(9);
-
- glDisable(GL_POLYGON_OFFSET_FILL);
- glColor3f(0,0,0);
- quad(6);
-
- glEnable(GL_POLYGON_OFFSET_FILL);
- glPolygonOffset(0, 0);
-
- glDepthFunc( GL_EQUAL );
- glColor3f(0,1,0);
- quad(6);
- glDepthFunc( GL_LESS );
-
-
- glPolygonOffset(0, -4);
- glColor3f(0,0,1);
- quad(3);
-
- glDisable(GL_POLYGON_OFFSET_FILL);
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB | GLUT_DEPTH;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/quad-tex-2d.c b/progs/trivial/quad-tex-2d.c
deleted file mode 100644
index 70b9fbf8c6..0000000000
--- a/progs/trivial/quad-tex-2d.c
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-
-#define SIZE 16
- {
- GLubyte tex2d[SIZE][SIZE][3];
- GLint s, t;
-
- for (s = 0; s < SIZE; s++) {
- for (t = 0; t < SIZE; t++) {
-#if 0
- tex2d[t][s][0] = (s < SIZE/2) ? 0 : 255;
- tex2d[t][s][1] = (t < SIZE/2) ? 0 : 255;
- tex2d[t][s][2] = 0;
-#else
- tex2d[t][s][0] = s*255/(SIZE-1);
- tex2d[t][s][1] = t*255/(SIZE-1);
- tex2d[t][s][2] = 0;
-#endif
- }
- }
-
- glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_R, GL_REPEAT);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- glTexImage2D(GL_TEXTURE_2D, 0, 3, SIZE, SIZE, 0,
- GL_RGB, GL_UNSIGNED_BYTE, tex2d);
- glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
- glEnable(GL_TEXTURE_2D);
- }
-
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_QUADS);
- glTexCoord2f(1,0);
- glVertex3f( 0.9, -0.9, -30.0);
- glTexCoord2f(1,1);
- glVertex3f( 0.9, 0.9, -30.0);
- glTexCoord2f(0,1);
- glVertex3f(-0.9, 0.9, -30.0);
- glTexCoord2f(0,0);
- glVertex3f(-0.9, -0.9, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/quad-tex-3d.c b/progs/trivial/quad-tex-3d.c
deleted file mode 100644
index 0b2dcc08a5..0000000000
--- a/progs/trivial/quad-tex-3d.c
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-GLfloat z= 0;
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-
-#define SIZE 16
- {
- GLubyte tex3d[SIZE][SIZE][SIZE][3];
- GLint r, s, t;
-
- for (s = 0; s < SIZE; s++) {
- for (t = 0; t < SIZE; t++) {
- for (r = 0; r < SIZE; r++) {
-#if 0
- tex3d[r][t][s][0] = (s < SIZE/2) ? 0 : 255;
- tex3d[r][t][s][1] = (t < SIZE/2) ? 0 : 255;
- tex3d[r][t][s][2] = (r < SIZE/2) ? 0 : 255;
-#else
- tex3d[r][t][s][0] = s*255/(SIZE-1);
- tex3d[r][t][s][1] = t*255/(SIZE-1);
- tex3d[r][t][s][2] = r*255/(SIZE-1);
-#endif
- }
- }
- }
-
- glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
- glTexParameterf(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_REPEAT);
- glTexParameterf(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameterf(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- glTexImage3D(GL_TEXTURE_3D, 0, 3, SIZE, SIZE, SIZE, 0,
- GL_RGB, GL_UNSIGNED_BYTE, tex3d);
- glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
- glEnable(GL_TEXTURE_3D);
- }
-
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case ' ':
- z += 1.0/SIZE;
- break;
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- fprintf(stderr, "z: %f\n", z);
-
- glBegin(GL_QUADS);
- glTexCoord3f(1,0,z);
- glVertex3f( 0.9, -0.9, -30.0);
- glTexCoord3f(1,1,z);
- glVertex3f( 0.9, 0.9, -30.0);
- glTexCoord3f(0,1,z);
- glVertex3f(-0.9, 0.9, -30.0);
- glTexCoord3f(0,0,z);
- glVertex3f(-0.9, -0.9, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/quad-tex-pbo.c b/progs/trivial/quad-tex-pbo.c
deleted file mode 100644
index 5b63c698a7..0000000000
--- a/progs/trivial/quad-tex-pbo.c
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#define GL_GLEXT_PROTOTYPES
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-GLenum doubleBuffer;
-
-static GLuint DrawPBO;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-
-#define SIZE 16
- {
- GLubyte tex2d[SIZE][SIZE][4];
- GLint s, t;
-
- for (s = 0; s < SIZE; s++) {
- for (t = 0; t < SIZE; t++) {
- /* bgra:
- */
- tex2d[t][s][0] = 0x30;
- tex2d[t][s][1] = t*255/(SIZE-1);
- tex2d[t][s][2] = s*255/(SIZE-1);
- tex2d[t][s][3] = 0xff;
- }
- }
-
-
- /* put image into DrawPBO */
- glGenBuffersARB(1, &DrawPBO);
- glBindBufferARB(GL_PIXEL_PACK_BUFFER_EXT, DrawPBO);
- glBufferDataARB(GL_PIXEL_PACK_BUFFER_EXT,
- SIZE * SIZE * 4, tex2d, GL_STATIC_DRAW);
- glBindBufferARB(GL_PIXEL_PACK_BUFFER_EXT, 0);
-
-
- glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_R, GL_REPEAT);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, DrawPBO);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, SIZE, SIZE, 0,
- GL_BGRA, GL_UNSIGNED_BYTE, NULL);
- glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, 0);
- glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
- glEnable(GL_TEXTURE_2D);
- }
-
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_QUADS);
- glTexCoord2f(1,0);
- glVertex3f( 0.9, -0.9, -30.0);
- glTexCoord2f(1,1);
- glVertex3f( 0.9, 0.9, -30.0);
- glTexCoord2f(0,1);
- glVertex3f(-0.9, 0.9, -30.0);
- glTexCoord2f(0,0);
- glVertex3f(-0.9, -0.9, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/quad-unfilled.c b/progs/trivial/quad-unfilled.c
deleted file mode 100644
index 9d63d2dfb9..0000000000
--- a/progs/trivial/quad-unfilled.c
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
- glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
-
- glBegin(GL_QUADS);
- glColor3f(1,0,0);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,1,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(1,0,1);
- glVertex3f(-0.9, 0.9, -30.0);
- glColor3f(0,1,1);
- glVertex3f(-0.9, -0.9, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/quad.c b/progs/trivial/quad.c
deleted file mode 100644
index 85424b7b38..0000000000
--- a/progs/trivial/quad.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_QUADS);
- glColor3f(1,0,0);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,1,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(1,0,1);
- glVertex3f(-0.9, 0.9, -30.0);
- glColor3f(0,1,1);
- glVertex3f(-0.9, -0.9, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/quads.c b/progs/trivial/quads.c
deleted file mode 100644
index 1ca82cd9f8..0000000000
--- a/progs/trivial/quads.c
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_QUADS);
- glColor3f(1,0,0);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,1,0);
- glVertex3f( 0.9, 0.9, -30.0);
-
- glColor3f(1,1,1);
- glVertex3f( 0.1, 0.9, -30.0);
- glColor3f(1,0,1);
- glVertex3f( 0.1, -0.9, -30.0);
-
- if (0) {
- glEnd();
- glFlush();
- glBegin(GL_QUADS);
- }
-
- glColor3f(0,1,0);
- glVertex3f(-0.1, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f(-0.1, 0.9, -30.0);
-
-
- glColor3f(1,0,1);
- glVertex3f(-0.9, 0.9, -30.0);
- glColor3f(0,1,1);
- glVertex3f(-0.9, -0.9, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/quadstrip-flat.c b/progs/trivial/quadstrip-flat.c
deleted file mode 100644
index 061a0e409e..0000000000
--- a/progs/trivial/quadstrip-flat.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
- glShadeModel(GL_FLAT);
-
- glBegin(GL_QUAD_STRIP);
- glColor3f(1,0,0);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,1,0);
- glVertex3f( 0.9, 0.9, -30.0);
-
- glColor3f(1,0,0);
- glVertex3f( 0.1, -0.8, -30.0);
- glColor3f(1,1,0);
- glVertex3f( 0.1, 0.8, -30.0);
-
- glColor3f(0,1,1);
- glVertex3f(-0.1, -0.9, -30.0);
- glColor3f(1,0,1);
- glVertex3f(-0.1, 0.9, -30.0);
-
- glColor3f(0,1,1);
- glVertex3f(-0.9, -0.8, -30.0);
- glColor3f(1,0,1);
- glVertex3f(-0.9, 0.8, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/quadstrip.c b/progs/trivial/quadstrip.c
deleted file mode 100644
index 342463f1a2..0000000000
--- a/progs/trivial/quadstrip.c
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_QUAD_STRIP);
- glColor3f(1,0,0);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,1,0);
- glVertex3f( 0.9, 0.9, -30.0);
-
- glColor3f(1,0,0);
- glVertex3f( 0.1, -0.8, -30.0);
- glColor3f(1,1,0);
- glVertex3f( 0.1, 0.8, -30.0);
-
- glColor3f(0,1,1);
- glVertex3f(-0.1, -0.9, -30.0);
- glColor3f(1,0,1);
- glVertex3f(-0.1, 0.9, -30.0);
-
- glColor3f(0,1,1);
- glVertex3f(-0.9, -0.8, -30.0);
- glColor3f(1,0,1);
- glVertex3f(-0.9, 0.8, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/tri-blend.c b/progs/trivial/tri-blend.c
deleted file mode 100644
index 284d15fd3c..0000000000
--- a/progs/trivial/tri-blend.c
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (c) 1993-1997, Silicon Graphics, Inc.
- * 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
- * the name of Silicon Graphics, Inc. not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * 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,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
- * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
- * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
- * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
- * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
- * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN
- * 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
- * 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
- * clause at DFARS 252.227-7013 and/or in similar or successor
- * clauses in the FAR or the DOD or NASA FAR Supplement.
- * Unpublished-- rights reserved under the copyright laws of the
- * United States. Contractor/manufacturer is Silicon Graphics,
- * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311.
- *
- * OpenGL(R) is a registered trademark of Silicon Graphics, Inc.
- */
-
-/*
- * alpha.c
- * This program draws several overlapping filled polygons
- * to demonstrate the effect order has on alpha blending results.
- * Use the 't' key to toggle the order of drawing polygons.
- */
-#include <GL/glut.h>
-#include <stdlib.h>
-
-static int leftFirst = GL_TRUE;
-
-/* Initialize alpha blending function.
- */
-static void init(void)
-{
- glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- glShadeModel (GL_FLAT);
- glClearColor (1.0, 0.0, 0.0, 0.0);
-}
-
-static void drawLeftTriangle(void)
-{
- /* draw yellow triangle on LHS of screen */
-
- glBegin (GL_TRIANGLES);
- glColor4f(1.0, 1.0, 0.0, 0.75);
- glVertex3f(0.1, 0.9, 0.0);
- glVertex3f(0.1, 0.1, 0.0);
- glVertex3f(0.7, 0.5, 0.0);
- glEnd();
-}
-
-static void drawRightTriangle(void)
-{
- /* draw cyan triangle on RHS of screen */
-
- glEnable (GL_BLEND);
- glBegin (GL_TRIANGLES);
- glColor4f(0.0, 1.0, 1.0, 0.75);
- glVertex3f(0.9, 0.9, 0.0);
- glVertex3f(0.3, 0.5, 0.0);
- glVertex3f(0.9, 0.1, 0.0);
- glEnd();
- glDisable (GL_BLEND);
-}
-
-void display(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- if (leftFirst) {
- drawLeftTriangle();
- drawRightTriangle();
- }
- else {
- drawRightTriangle();
- drawLeftTriangle();
- }
-
- glFlush();
-}
-
-void reshape(int w, int h)
-{
- glViewport(0, 0, (GLsizei) w, (GLsizei) h);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- if (w <= h)
- gluOrtho2D (0.0, 1.0, 0.0, 1.0*(GLfloat)h/(GLfloat)w);
- else
- gluOrtho2D (0.0, 1.0*(GLfloat)w/(GLfloat)h, 0.0, 1.0);
-}
-
-/* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
-{
- switch (key) {
- case 't':
- case 'T':
- leftFirst = !leftFirst;
- glutPostRedisplay();
- break;
- case 27: /* Escape key */
- exit(0);
- break;
- default:
- break;
- }
-}
-
-/* Main Loop
- * Open window with initial window size, title bar,
- * RGBA display mode, and handle input events.
- */
-int main(int argc, char** argv)
-{
- glutInit(&argc, argv);
- glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
- glutInitWindowSize (200, 200);
- glutCreateWindow (argv[0]);
- init();
- glutReshapeFunc (reshape);
- glutKeyboardFunc (keyboard);
- glutDisplayFunc (display);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/tri-clip.c b/progs/trivial/tri-clip.c
deleted file mode 100644
index bf48533adc..0000000000
--- a/progs/trivial/tri-clip.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,.7);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(.8,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,.9,0);
- glVertex3f(-1.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/tri-cull.c b/progs/trivial/tri-cull.c
deleted file mode 100644
index 20aeaf1d7c..0000000000
--- a/progs/trivial/tri-cull.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( -1.5, 0.5, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0, 2.0, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-1.5, 2.0, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/tri-dlist.c b/progs/trivial/tri-dlist.c
deleted file mode 100644
index e0ab285eff..0000000000
--- a/progs/trivial/tri-dlist.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-GLint list;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-
- list = glGenLists(1);
- glNewList(list, GL_COMPILE);
- glBegin(GL_TRIANGLES);
-/* glColor3f(0,0,.7); */
- glVertex3f( 0.9, -0.9, -30.0);
-/* glColor3f(.8,0,0); */
- glVertex3f( 0.9, 0.9, -30.0);
-/* glColor3f(0,.9,0); */
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
- glEndList();
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-
-
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glColor3f(0,.9,0);
- glCallList(list);
-
- glRotatef(45,0,0,1);
- glColor3f(1,0,1);
- glCallList(list);
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/tri-edgeflag.c b/progs/trivial/tri-edgeflag.c
deleted file mode 100644
index bdc0eaa253..0000000000
--- a/progs/trivial/tri-edgeflag.c
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
-/* glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0); */
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
- glPolygonMode(GL_FRONT, GL_LINE);
- glPolygonMode(GL_BACK, GL_POINT);
-
- glBegin(GL_TRIANGLES);
- glEdgeFlag(1);
- glColor3f(0,0,.7);
- glVertex3f( 0.9, -0.9, -0.0);
- glEdgeFlag(0);
- glColor3f(.8,0,0);
- glVertex3f( 0.9, 0.9, -0.0);
- glEdgeFlag(1);
- glColor3f(0,.9,0);
- glVertex3f(-0.9, 0.0, -0.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/tri-flat-clip.c b/progs/trivial/tri-flat-clip.c
deleted file mode 100644
index fafa64914d..0000000000
--- a/progs/trivial/tri-flat-clip.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.5, 0.5, 0.5, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
- glShadeModel(GL_FLAT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-1.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/tri-flat.c b/progs/trivial/tri-flat.c
deleted file mode 100644
index fb2cdbd7bb..0000000000
--- a/progs/trivial/tri-flat.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.5, 0.5, 0.5, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
- glShadeModel(GL_FLAT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/tri-tex-3d.c b/progs/trivial/tri-tex-3d.c
deleted file mode 100644
index 6a9d1d1bf6..0000000000
--- a/progs/trivial/tri-tex-3d.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-
-#define SIZE 16
- {
- GLubyte tex3d[SIZE][SIZE][SIZE][3];
- GLint r, s, t;
-
- for (s = 0; s < SIZE; s++) {
- for (t = 0; t < SIZE; t++) {
- for (r = 0; r < SIZE; r++) {
-#if 0
- tex3d[r][t][s][0] = (s < SIZE/2) ? 0 : 255;
- tex3d[r][t][s][1] = (t < SIZE/2) ? 0 : 255;
- tex3d[r][t][s][2] = (r < SIZE/2) ? 0 : 255;
-#else
- tex3d[r][t][s][0] = s*255/(SIZE-1);
- tex3d[r][t][s][1] = t*255/(SIZE-1);
- tex3d[r][t][s][2] = r*255/(SIZE-1);
-#endif
- }
- }
- }
-
- glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
- glTexParameterf(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_REPEAT);
- glTexParameterf(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameterf(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- glTexImage3D(GL_TEXTURE_3D, 0, 3, SIZE, SIZE, SIZE, 0,
- GL_RGB, GL_UNSIGNED_BYTE, tex3d);
- glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
- glEnable(GL_TEXTURE_3D);
- }
-
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glTexCoord3f( 0,0,.9);
- glVertex3f( 0.9, -0.9, -30.0);
- glTexCoord3f(.9,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glTexCoord3f(0,.9,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/tri-unfilled-clip.c b/progs/trivial/tri-unfilled-clip.c
deleted file mode 100644
index d486af2365..0000000000
--- a/progs/trivial/tri-unfilled-clip.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
- glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,.7);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(.8,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,.9,0);
- glVertex3f(-1.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/tri-unfilled-smooth.c b/progs/trivial/tri-unfilled-smooth.c
deleted file mode 100644
index e41903a3d5..0000000000
--- a/progs/trivial/tri-unfilled-smooth.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
-/* glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0); */
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glEnable(GL_LINE_SMOOTH);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,.7);
- glVertex3f( 0.6, -0.6, -0.0);
- glColor3f(.8,0,0);
- glVertex3f( 0.6, 0.6, -0.0);
- glColor3f(0,.9,0);
- glVertex3f(-0.6, 0.0, -0.0);
- glEnd();
-
- glPolygonMode(GL_FRONT, GL_LINE);
-/* glPolygonMode(GL_BACK, GL_LINE); */
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,.7);
- glVertex3f( 0.9, -0.9, -0.0);
- glColor3f(.8,0,0);
- glVertex3f( 0.9, 0.9, -0.0);
- glColor3f(0,.9,0);
- glVertex3f(-0.9, 0.0, -0.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/tri-unfilled-userclip.c b/progs/trivial/tri-unfilled-userclip.c
deleted file mode 100644
index dc93a8f1ab..0000000000
--- a/progs/trivial/tri-unfilled-userclip.c
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- static GLdouble plane[4] = { -.5, 0, 1, 0 };
-
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
- glClipPlane(GL_CLIP_PLANE0, plane);
- glEnable(GL_CLIP_PLANE0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
-/* glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0); */
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
- glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,.7);
- glVertex3f( 0.9, -0.9, 0.0);
- glColor3f(.8,0,0);
- glVertex3f( 0.9, 0.9, 0.0);
- glColor3f(0,.9,0);
- glVertex3f(-0.9, 0.0, 0.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/tri-unfilled.c b/progs/trivial/tri-unfilled.c
deleted file mode 100644
index 73961bc93a..0000000000
--- a/progs/trivial/tri-unfilled.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
-/* glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0); */
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
- glPolygonMode(GL_FRONT, GL_LINE);
- glPolygonMode(GL_BACK, GL_LINE);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,.7);
- glVertex3f( 0.9, -0.9, -0.0);
- glColor3f(.8,0,0);
- glVertex3f( 0.9, 0.9, -0.0);
- glColor3f(0,.9,0);
- glVertex3f(-0.9, 0.0, -0.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/tri-userclip.c b/progs/trivial/tri-userclip.c
deleted file mode 100644
index cde9662ace..0000000000
--- a/progs/trivial/tri-userclip.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- static GLdouble plane[4] = { -.5, 0, 1, 0 };
-
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
- glClipPlane(GL_CLIP_PLANE0, plane);
- glEnable(GL_CLIP_PLANE0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
-/* glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0); */
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,.7);
- glVertex3f( 0.9, -0.9, 0.0);
- glColor3f(.8,0,0);
- glVertex3f( 0.9, 0.9, 0.0);
- glColor3f(0,.9,0);
- glVertex3f(-0.9, 0.0, 0.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/tri.c b/progs/trivial/tri.c
deleted file mode 100644
index d4a7f08ae3..0000000000
--- a/progs/trivial/tri.c
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-int win;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- glutDestroyWindow(win);
- exit(0);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,.7);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(.8,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,.9,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- win = glutCreateWindow("First Tri");
- if (!win) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/tristrip-clip.c b/progs/trivial/tristrip-clip.c
deleted file mode 100644
index f95c66a62a..0000000000
--- a/progs/trivial/tristrip-clip.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLE_STRIP);
- glColor3f(1,0,0);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,1,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,1);
- glVertex3f(-0.9, -0.9, -30.0);
- glColor3f(1,0,1);
- glVertex3f(-1.9, 0.9, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/tristrip.c b/progs/trivial/tristrip.c
deleted file mode 100644
index fa82a73711..0000000000
--- a/progs/trivial/tristrip.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the name of
- * Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
- * ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glut.h>
-
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
-GLenum doubleBuffer;
-
-static void Init(void)
-{
- fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
- fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
- fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
-
- glClearColor(0.0, 0.0, 1.0, 0.0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- return;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLE_STRIP);
- glColor3f(1,0,0);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,1,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,1);
- glVertex3f(-0.9, -0.9, -30.0);
- glColor3f(1,0,1);
- glVertex3f(-0.9, 0.9, -30.0);
- glEnd();
-
- glFlush();
-
- if (doubleBuffer) {
- glutSwapBuffers();
- }
-}
-
-static GLenum Args(int argc, char **argv)
-{
- GLint i;
-
- doubleBuffer = GL_FALSE;
-
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-sb") == 0) {
- doubleBuffer = GL_FALSE;
- } else if (strcmp(argv[i], "-db") == 0) {
- doubleBuffer = GL_TRUE;
- } else {
- fprintf(stderr, "%s (Bad option).\n", argv[i]);
- return GL_FALSE;
- }
- }
- return GL_TRUE;
-}
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- if (Args(argc, argv) == GL_FALSE) {
- exit(1);
- }
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/vbo-drawarrays.c b/progs/trivial/vbo-drawarrays.c
deleted file mode 100644
index fb590098a3..0000000000
--- a/progs/trivial/vbo-drawarrays.c
+++ /dev/null
@@ -1,133 +0,0 @@
-/* Basic VBO */
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-struct {
- GLfloat pos[3];
- GLubyte color[4];
-} verts[] =
-{
- { { 0.9, -0.9, 0.0 },
- { 0x00, 0x00, 0xff, 0x00 }
- },
-
- { { 0.9, 0.9, 0.0 },
- { 0x00, 0xff, 0x00, 0x00 }
- },
-
- { { -0.9, 0.9, 0.0 },
- { 0xff, 0x00, 0x00, 0x00 }
- },
-
- { { -0.9, -0.9, 0.0 },
- { 0xff, 0xff, 0xff, 0x00 }
- },
-};
-
-GLuint arrayObj, elementObj;
-
-static void Init( void )
-{
- GLint errno;
- GLuint prognum;
-
- static const char *prog1 =
- "!!ARBvp1.0\n"
- "MOV result.color, vertex.color;\n"
- "MOV result.position, vertex.position;\n"
- "END\n";
-
- glGenProgramsARB(1, &prognum);
- glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum);
- glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(prog1), (const GLubyte *) prog1);
-
- assert(glIsProgramARB(prognum));
- errno = glGetError();
- printf("glGetError = %d\n", errno);
- if (errno != GL_NO_ERROR)
- {
- GLint errorpos;
-
- glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
- printf("errorpos: %d\n", errorpos);
- printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB));
- }
-
-
- glEnableClientState( GL_VERTEX_ARRAY );
- glEnableClientState( GL_COLOR_ARRAY );
-
- glGenBuffersARB(1, &arrayObj);
- glBindBufferARB(GL_ARRAY_BUFFER_ARB, arrayObj);
- glBufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(verts), verts, GL_STATIC_DRAW_ARB);
-
- glVertexPointer( 3, GL_FLOAT, sizeof(verts[0]), 0 );
- glColorPointer( 4, GL_UNSIGNED_BYTE, sizeof(verts[0]), (void *)(3*sizeof(float)) );
-
-}
-
-
-
-static void Display( void )
-{
- glClearColor(0.3, 0.3, 0.3, 1);
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- glEnable(GL_VERTEX_PROGRAM_ARB);
-
-// glDrawArrays( GL_TRIANGLES, 0, 3 );
- glDrawArrays( GL_TRIANGLES, 1, 3 );
-
- glFlush();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- /*glTranslatef( 0.0, 0.0, -15.0 );*/
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 250, 250 );
- glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/vbo-drawelements.c b/progs/trivial/vbo-drawelements.c
deleted file mode 100644
index dddb45695c..0000000000
--- a/progs/trivial/vbo-drawelements.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/* Basic VBO */
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-struct {
- GLfloat pos[3];
- GLubyte color[4];
-} verts[] =
-{
- { { 0.9, -0.9, 0.0 },
- { 0x00, 0x00, 0xff, 0x00 }
- },
-
- { { 0.9, 0.9, 0.0 },
- { 0x00, 0xff, 0x00, 0x00 }
- },
-
- { { -0.9, 0.9, 0.0 },
- { 0xff, 0x00, 0x00, 0x00 }
- },
-
- { { -0.9, -0.9, 0.0 },
- { 0xff, 0xff, 0xff, 0x00 }
- },
-};
-
-GLuint indices[] = { 0, 1, 2, 3 };
-
-GLuint arrayObj, elementObj;
-
-static void Init( void )
-{
- GLint errno;
- GLuint prognum;
-
- static const char *prog1 =
- "!!ARBvp1.0\n"
- "MOV result.color, vertex.color;\n"
- "MOV result.position, vertex.position;\n"
- "END\n";
-
- glGenProgramsARB(1, &prognum);
- glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum);
- glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(prog1), (const GLubyte *) prog1);
-
- assert(glIsProgramARB(prognum));
- errno = glGetError();
- printf("glGetError = %d\n", errno);
- if (errno != GL_NO_ERROR)
- {
- GLint errorpos;
-
- glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
- printf("errorpos: %d\n", errorpos);
- printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB));
- }
-
-
- glEnableClientState( GL_VERTEX_ARRAY );
- glEnableClientState( GL_COLOR_ARRAY );
-
- glGenBuffersARB(1, &arrayObj);
- glGenBuffersARB(1, &elementObj);
-
- glBindBufferARB(GL_ARRAY_BUFFER_ARB, arrayObj);
- glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, elementObj);
-
- glBufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(verts), verts, GL_STATIC_DRAW_ARB);
- glBufferDataARB(GL_ELEMENT_ARRAY_BUFFER_ARB, sizeof(indices), indices, GL_STATIC_DRAW_ARB);
-
- glVertexPointer( 3, GL_FLOAT, sizeof(verts[0]), 0 );
- glColorPointer( 4, GL_UNSIGNED_BYTE, sizeof(verts[0]), (void *)(3*sizeof(float)) );
-
-}
-
-
-
-static void Display( void )
-{
- glClearColor(0.3, 0.3, 0.3, 1);
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- glEnable(GL_VERTEX_PROGRAM_ARB);
- glDrawElements( GL_TRIANGLES, 3, GL_UNSIGNED_INT, NULL );
-
- glFlush();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- /*glTranslatef( 0.0, 0.0, -15.0 );*/
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 250, 250 );
- glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/vbo-drawrange.c b/progs/trivial/vbo-drawrange.c
deleted file mode 100644
index 407b7541f0..0000000000
--- a/progs/trivial/vbo-drawrange.c
+++ /dev/null
@@ -1,145 +0,0 @@
-/* Basic VBO */
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-#define ELTOBJ 0
-
-struct {
- GLfloat pos[3];
- GLubyte color[4];
-} verts[] =
-{
- { { 0.9, -0.9, 0.0 },
- { 0x00, 0x00, 0xff, 0x00 }
- },
-
- { { 0.9, 0.9, 0.0 },
- { 0x00, 0xff, 0x00, 0x00 }
- },
-
- { { -0.9, 0.9, 0.0 },
- { 0xff, 0x00, 0x00, 0x00 }
- },
-
- { { -0.9, -0.9, 0.0 },
- { 0xff, 0xff, 0xff, 0x00 }
- },
-};
-
-GLuint indices[] = { 1, 2, 3 };
-
-GLuint arrayObj, elementObj;
-
-static void Init( void )
-{
- GLint errno;
- GLuint prognum;
-
- static const char *prog1 =
- "!!ARBvp1.0\n"
- "MOV result.color, vertex.color;\n"
- "MOV result.position, vertex.position;\n"
- "END\n";
-
- glGenProgramsARB(1, &prognum);
- glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum);
- glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(prog1), (const GLubyte *) prog1);
-
- assert(glIsProgramARB(prognum));
- errno = glGetError();
- printf("glGetError = %d\n", errno);
- if (errno != GL_NO_ERROR)
- {
- GLint errorpos;
-
- glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
- printf("errorpos: %d\n", errorpos);
- printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB));
- }
-
-
- glEnableClientState( GL_VERTEX_ARRAY );
- glEnableClientState( GL_COLOR_ARRAY );
-
- glGenBuffersARB(1, &arrayObj);
- glBindBufferARB(GL_ARRAY_BUFFER_ARB, arrayObj);
- glBufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(verts), verts, GL_STATIC_DRAW_ARB);
-
-#if ELTOBJ
- glGenBuffersARB(1, &elementObj);
- glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, elementObj);
- glBufferDataARB(GL_ELEMENT_ARRAY_BUFFER_ARB, sizeof(indices), indices, GL_STATIC_DRAW_ARB);
-#endif
-
- glVertexPointer( 3, GL_FLOAT, sizeof(verts[0]), 0 );
- glColorPointer( 4, GL_UNSIGNED_BYTE, sizeof(verts[0]), (void *)(3*sizeof(float)) );
-
-}
-
-
-
-static void Display( void )
-{
- glClearColor(0.3, 0.3, 0.3, 1);
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- glEnable(GL_VERTEX_PROGRAM_ARB);
-
-#if ELTOBJ
- glDrawRangeElements( GL_TRIANGLES, 1, 3, 3, GL_UNSIGNED_INT, NULL );
-#else
- glDrawRangeElements( GL_TRIANGLES, 1, 3, 3, GL_UNSIGNED_INT, indices );
-#endif
-
- glFlush();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- /*glTranslatef( 0.0, 0.0, -15.0 );*/
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 250, 250 );
- glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/vp-array.c b/progs/trivial/vp-array.c
deleted file mode 100644
index abe8f62bec..0000000000
--- a/progs/trivial/vp-array.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/* Test glGenProgramsNV(), glIsProgramNV(), glLoadProgramNV() */
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-GLfloat verts[][4] = {
- { 0.9, -0.9, 0.0, 1.0 },
- { 0.9, 0.9, 0.0, 1.0 },
- { -0.9, 0.9, 0.0, 1.0 },
- { -0.9, -0.9, 0.0, 1.0 },
-};
-
-GLubyte color[][4] = {
- { 0x00, 0x00, 0xff, 0x00 },
- { 0x00, 0xff, 0x00, 0x00 },
- { 0xff, 0x00, 0x00, 0x00 },
- { 0xff, 0xff, 0xff, 0x00 },
-};
-
-GLuint indices[] = { 0, 1, 2, 3 };
-
-static void Init( void )
-{
- GLint errno;
- GLuint prognum;
-
- static const char *prog1 =
- "!!ARBvp1.0\n"
- "MOV result.color, vertex.color;\n"
- "MOV result.position, vertex.position;\n"
- "END\n";
-
- glGenProgramsARB(1, &prognum);
- glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum);
- glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(prog1), (const GLubyte *) prog1);
-
- assert(glIsProgramARB(prognum));
- errno = glGetError();
- printf("glGetError = %d\n", errno);
- if (errno != GL_NO_ERROR)
- {
- GLint errorpos;
-
- glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
- printf("errorpos: %d\n", errorpos);
- printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB));
- }
-
-
- glEnableClientState( GL_VERTEX_ARRAY );
- glEnableClientState( GL_COLOR_ARRAY );
- glVertexPointer( 3, GL_FLOAT, sizeof(verts[0]), verts );
- glColorPointer( 4, GL_UNSIGNED_BYTE, 0, color );
-
-}
-
-
-
-static void Display( void )
-{
- glClearColor(0.3, 0.3, 0.3, 1);
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- glEnable(GL_VERTEX_PROGRAM_NV);
- glDrawElements( GL_TRIANGLES, 3, GL_UNSIGNED_INT, indices );
-
- glFlush();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- /*glTranslatef( 0.0, 0.0, -15.0 );*/
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 250, 250 );
- glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/vp-clip.c b/progs/trivial/vp-clip.c
deleted file mode 100644
index 206ba0b8cb..0000000000
--- a/progs/trivial/vp-clip.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/* Test glGenProgramsNV(), glIsProgramNV(), glLoadProgramNV() */
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-static void Init( void )
-{
- GLint errno;
- GLuint prognum;
-
- static const char *prog1 =
- "!!ARBvp1.0\n"
- "MOV result.color, vertex.color;\n"
- "MOV result.position, vertex.position;\n"
- "END\n";
-
- glGenProgramsARB(1, &prognum);
-
- glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum);
- glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(prog1), (const GLubyte *) prog1);
-
- assert(glIsProgramARB(prognum));
- errno = glGetError();
- printf("glGetError = %d\n", errno);
- if (errno != GL_NO_ERROR)
- {
- GLint errorpos;
-
- glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
- printf("errorpos: %d\n", errorpos);
- printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB));
- }
-}
-
-static void Display( void )
-{
- glClearColor(0.3, 0.3, 0.3, 1);
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- glEnable(GL_VERTEX_PROGRAM_NV);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 2.0, -2.0, 0.0);
- glColor3f(0,1,0);
- glVertex3f( 2.0, 2.0, 0.0);
- glColor3f(1,0,0);
- glVertex3f(-2.0, 0.0, 0.0);
- glEnd();
-
-
- glFlush();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- /*glTranslatef( 0.0, 0.0, -15.0 );*/
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 250, 250 );
- glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/vp-line-clip.c b/progs/trivial/vp-line-clip.c
deleted file mode 100644
index b2aaf17ca4..0000000000
--- a/progs/trivial/vp-line-clip.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/* Test glGenProgramsNV(), glIsProgramNV(), glLoadProgramNV() */
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-static void Init( void )
-{
- GLint errno;
- GLuint prognum;
-
- static const char *prog1 =
- "!!ARBvp1.0\n"
- "MOV result.color, vertex.color;\n"
- "MOV result.position, vertex.position;\n"
- "END\n";
-
- glGenProgramsARB(1, &prognum);
-
- glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum);
- glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(prog1), (const GLubyte *) prog1);
-
- assert(glIsProgramARB(prognum));
- errno = glGetError();
- printf("glGetError = %d\n", errno);
- if (errno != GL_NO_ERROR)
- {
- GLint errorpos;
-
- glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
- printf("errorpos: %d\n", errorpos);
- printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB));
- }
-}
-
-static void Display( void )
-{
- glClearColor(0.3, 0.3, 0.3, 1);
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- glEnable(GL_VERTEX_PROGRAM_NV);
-
-#if 0
- glBegin(GL_LINES);
- glColor3f(0,0,1);
- glVertex3f( 0.75, -0.75, 0.0);
- glColor3f(0,1,0);
- glVertex3f( 0.75, 0.75, 0.0);
-
- glColor3f(0,1,0);
- glVertex3f( 0.75, 0.75, 0.0);
- glColor3f(1,0,0);
- glVertex3f(-1.75, 0.0, 0.0);
- glEnd();
-#else
- glBegin(GL_LINE_STRIP);
- glColor3f(0,0,1);
- glVertex3f( 0.75, -0.75, 0.0);
- glColor3f(0,1,0);
- glVertex3f( 0.75, 0.75, 0.0);
- glColor3f(1,0,0);
- glVertex3f(-1.75, 0.0, 0.0);
- glEnd();
-#endif
-
-
- glFlush();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- /*glTranslatef( 0.0, 0.0, -15.0 );*/
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 250, 250 );
- glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/vp-tri.c b/progs/trivial/vp-tri.c
deleted file mode 100644
index f8e18654c6..0000000000
--- a/progs/trivial/vp-tri.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/* Test glGenProgramsNV(), glIsProgramNV(), glLoadProgramNV() */
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-static void Init( void )
-{
- GLint errno;
- GLuint prognum;
-
- static const char *prog1 =
- "!!ARBvp1.0\n"
- "MOV result.color, vertex.color;\n"
-/* "MOV result.color, {0,0,0,1};\n" */
- "MOV result.position, vertex.position;\n"
- "END\n";
-
-
- glGenProgramsARB(1, &prognum);
-
- glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum);
- glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(prog1), (const GLubyte *) prog1);
-
- assert(glIsProgramARB(prognum));
- errno = glGetError();
- printf("glGetError = %d\n", errno);
- if (errno != GL_NO_ERROR)
- {
- GLint errorpos;
-
- glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
- printf("errorpos: %d\n", errorpos);
- printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB));
- }
-}
-
-static void Display( void )
-{
- glClearColor(0.3, 0.3, 0.3, 1);
- glClear( GL_COLOR_BUFFER_BIT );
-
- glEnable(GL_VERTEX_PROGRAM_NV);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, 0.0);
- glColor3f(0,1,0);
- glVertex3f( 0.9, 0.9, 0.0);
- glColor3f(1,0,0);
- glVertex3f(-0.9, 0.0, 0.0);
- glEnd();
-
-
- glFlush();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- /*glTranslatef( 0.0, 0.0, -15.0 );*/
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 250, 250 );
- glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/trivial/vp-unfilled.c b/progs/trivial/vp-unfilled.c
deleted file mode 100644
index ac23181fff..0000000000
--- a/progs/trivial/vp-unfilled.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/* Test glGenProgramsNV(), glIsProgramNV(), glLoadProgramNV() */
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-static void Init( void )
-{
- GLint errno;
- GLuint prognum;
-
- static const char *prog1 =
- "!!ARBvp1.0\n"
- "MOV result.color, vertex.color;\n"
- "MOV result.position, vertex.position;\n"
- "END\n";
-
- glGenProgramsARB(1, &prognum);
-
- glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum);
- glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(prog1), (const GLubyte *) prog1);
-
- assert(glIsProgramARB(prognum));
- errno = glGetError();
- printf("glGetError = %d\n", errno);
- if (errno != GL_NO_ERROR)
- {
- GLint errorpos;
-
- glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
- printf("errorpos: %d\n", errorpos);
- printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB));
- }
-}
-
-static void Display( void )
-{
- glClearColor(0.3, 0.3, 0.3, 1);
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
- glPolygonMode(GL_FRONT, GL_LINE);
- glPolygonMode(GL_BACK, GL_POINT);
-
- glEnable(GL_VERTEX_PROGRAM_NV);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, 0.0);
- glColor3f(0,1,0);
- glVertex3f( 0.9, 0.9, 0.0);
- glColor3f(1,0,0);
- glVertex3f(-0.9, 0.0, 0.0);
- glEnd();
-
-
- glFlush();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- /*glTranslatef( 0.0, 0.0, -15.0 );*/
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 250, 250 );
- glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/vp/.gitignore b/progs/vp/.gitignore
deleted file mode 100644
index a5ff993525..0000000000
--- a/progs/vp/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-vp-tris
diff --git a/progs/vp/Makefile b/progs/vp/Makefile
deleted file mode 100644
index 28d63237a4..0000000000
--- a/progs/vp/Makefile
+++ /dev/null
@@ -1,53 +0,0 @@
-# progs/tests/Makefile
-
-
-# These programs aren't intended to be included with the normal distro.
-# They're not too interesting but they're good for testing.
-
-TOP = ../..
-include $(TOP)/configs/current
-
-
-LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
-
-SOURCES = \
- vp-tris.c
-
-
-
-PROGS = $(SOURCES:%.c=%)
-
-INCLUDES = -I. -I$(TOP)/include -I../samples
-
-
-##### RULES #####
-
-.SUFFIXES:
-.SUFFIXES: .c
-
-.c:
- $(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
-
-.c.o:
- $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
-
-.S.o:
- $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
-
-
-##### TARGETS #####
-
-default: $(PROGS)
-
-clean:
- -rm -f $(PROGS)
- -rm -f *.o
- -rm -f getproclist.h
-
-
-
-
-
-# Emacs tags
-tags:
- etags `find . -name \*.[ch]` `find ../include`
diff --git a/progs/vp/abs.txt b/progs/vp/abs.txt
deleted file mode 100644
index cd00952e34..0000000000
--- a/progs/vp/abs.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-!!ARBvp1.0
-TEMP R0;
-SUB R0, {0.5}.x, vertex.color;
-ABS result.color, R0;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/add.txt b/progs/vp/add.txt
deleted file mode 100644
index 4094cd448d..0000000000
--- a/progs/vp/add.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-!!ARBvp1.0
-TEMP R0;
-ADD R0, vertex.color, vertex.color;
-ADD result.color, R0, R0;
-MOV result.position, vertex.position;
-END
diff --git a/progs/vp/arl.txt b/progs/vp/arl.txt
deleted file mode 100644
index a262b0149c..0000000000
--- a/progs/vp/arl.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-!!ARBvp1.0
-PARAM arr[5] = { {0,1,2,3}, {4,5,6,7}, {8,9,10,11}, {12,13,14,14}, {16,17,18,19} };
-ADDRESS addr;
-TEMP R0;
-MAD R0, {5.0}.x, vertex.color, {2.0}.x;
-ARL addr.x, R0.x;
-MUL result.color, arr[addr.x-2], {.07}.x;
-MOV result.position, vertex.position;
-END
diff --git a/progs/vp/dp3.txt b/progs/vp/dp3.txt
deleted file mode 100644
index 8336bd3dd8..0000000000
--- a/progs/vp/dp3.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-DP3 result.color, vertex.color, vertex.color;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/dp4.txt b/progs/vp/dp4.txt
deleted file mode 100644
index 70505a494c..0000000000
--- a/progs/vp/dp4.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-DP4 result.color, vertex.color.xxxx, vertex.color;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/dph.txt b/progs/vp/dph.txt
deleted file mode 100644
index c7cab1384d..0000000000
--- a/progs/vp/dph.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-DPH result.color, vertex.color, vertex.color;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/dst.txt b/progs/vp/dst.txt
deleted file mode 100644
index 03613c0eec..0000000000
--- a/progs/vp/dst.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-DST result.color, vertex.color, vertex.color;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/ex2.txt b/progs/vp/ex2.txt
deleted file mode 100644
index bbef67bbb8..0000000000
--- a/progs/vp/ex2.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-!!ARBvp1.0
-TEMP R0;
-EX2 R0, vertex.color.x;
-SUB result.color, R0, {1.0}.x;
-MOV result.position, vertex.position;
-END
diff --git a/progs/vp/flr.txt b/progs/vp/flr.txt
deleted file mode 100644
index c33280da97..0000000000
--- a/progs/vp/flr.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-!!ARBvp1.0
-TEMP R0;
-ADD R0, vertex.color, {0.5}.x;
-FLR result.color, R0;
-MOV result.position, vertex.position;
-END
diff --git a/progs/vp/frc.txt b/progs/vp/frc.txt
deleted file mode 100644
index d8e72b60cc..0000000000
--- a/progs/vp/frc.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-!!ARBvp1.0
-TEMP R0;
-MUL R0, vertex.color, {3.0}.x;
-FRC result.color, R0;
-MOV result.position, vertex.position;
-END
diff --git a/progs/vp/lg2.txt b/progs/vp/lg2.txt
deleted file mode 100644
index 2f59b993a4..0000000000
--- a/progs/vp/lg2.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-!!ARBvp1.0
-TEMP R0;
-MUL R0, vertex.color, {4.0}.x;
-LG2 result.color, R0.x;
-MOV result.position, vertex.position;
-END
diff --git a/progs/vp/lit.txt b/progs/vp/lit.txt
deleted file mode 100644
index 65705b4170..0000000000
--- a/progs/vp/lit.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-!!ARBvp1.0
-TEMP R0;
-SUB R0, {0.5}.x, vertex.color;
-LIT result.color, R0;
-MOV result.position, vertex.position;
-END
diff --git a/progs/vp/mad.txt b/progs/vp/mad.txt
deleted file mode 100644
index 0c9ed6c8b7..0000000000
--- a/progs/vp/mad.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-MAD result.color, vertex.color.z, {1,0,0,1}, vertex.color;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/max.txt b/progs/vp/max.txt
deleted file mode 100644
index 6747ca5727..0000000000
--- a/progs/vp/max.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-MAX result.color, {0.5}.x, vertex.color;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/min.txt b/progs/vp/min.txt
deleted file mode 100644
index 2adc872ed9..0000000000
--- a/progs/vp/min.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-MIN result.color, {0.5}.x, vertex.color;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/mov.txt b/progs/vp/mov.txt
deleted file mode 100644
index 9ce1a45306..0000000000
--- a/progs/vp/mov.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-MOV result.color, vertex.color;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/mul.txt b/progs/vp/mul.txt
deleted file mode 100644
index e479cdb854..0000000000
--- a/progs/vp/mul.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-MUL result.color, vertex.color, vertex.color;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/pow.txt b/progs/vp/pow.txt
deleted file mode 100644
index 512412997d..0000000000
--- a/progs/vp/pow.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-POW result.color, vertex.color.x, vertex.color.y;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/rcp.txt b/progs/vp/rcp.txt
deleted file mode 100644
index e16292bd00..0000000000
--- a/progs/vp/rcp.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-!!ARBvp1.0
-TEMP R0;
-ADD R0, vertex.color.x, vertex.color.x;
-RCP result.color, R0.x;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/rsq.txt b/progs/vp/rsq.txt
deleted file mode 100644
index 3e3f3251ee..0000000000
--- a/progs/vp/rsq.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-!!ARBvp1.0
-TEMP R0;
-MUL R0, vertex.color, {3.0}.x;
-RSQ result.color, R0.x;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/sge.txt b/progs/vp/sge.txt
deleted file mode 100644
index 3fa82e5d5e..0000000000
--- a/progs/vp/sge.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-SGE result.color, {0.5}.x, vertex.color;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/slt.txt b/progs/vp/slt.txt
deleted file mode 100644
index 6bf8ffa775..0000000000
--- a/progs/vp/slt.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-SLT result.color, {0.5}.x, vertex.color;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/sub.txt b/progs/vp/sub.txt
deleted file mode 100644
index a58ab101bc..0000000000
--- a/progs/vp/sub.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-SUB result.color, vertex.color.yzxw, vertex.color;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/swz.txt b/progs/vp/swz.txt
deleted file mode 100644
index 92c58089b1..0000000000
--- a/progs/vp/swz.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-MOV result.color, vertex.color.xxzx;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/swz2.txt b/progs/vp/swz2.txt
deleted file mode 100644
index 84c78db49f..0000000000
--- a/progs/vp/swz2.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-SWZ result.color, vertex.color, 1,x,y,z;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/vp-tris.c b/progs/vp/vp-tris.c
deleted file mode 100644
index 5dbe5ac835..0000000000
--- a/progs/vp/vp-tris.c
+++ /dev/null
@@ -1,216 +0,0 @@
-/* Test glGenProgramsNV(), glIsProgramNV(), glLoadProgramNV() */
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-static const char *filename = NULL;
-static GLuint nr_steps = 4;
-
-static void usage( char *name )
-{
- fprintf( stderr, "usage: %s [ options ] shader_filename\n", name );
- fprintf( stderr, "\n" );
- fprintf( stderr, "options:\n" );
- fprintf( stderr, " -f flat shaded\n" );
- fprintf( stderr, " -nNr subdivision steps\n" );
-}
-
-
-static void args(int argc, char *argv[])
-{
- GLint i;
-
- for (i = 1; i < argc; i++) {
- if (strncmp(argv[i], "-n", 2) == 0) {
- nr_steps = atoi((argv[i]) + 2);
- }
- else if (strcmp(argv[i], "-f") == 0) {
- glShadeModel(GL_FLAT);
- }
- else if (i == argc - 1) {
- filename = argv[i];
- }
- else {
- usage(argv[0]);
- exit(1);
- }
- }
-
- if (!filename) {
- usage(argv[0]);
- exit(1);
- }
-}
-
-
-
-static void Init( void )
-{
- GLint errno;
- GLuint prognum;
- char buf[4096];
- GLuint sz;
- FILE *f;
-
- if ((f = fopen(filename, "r")) == NULL) {
- fprintf(stderr, "couldn't open %s\n", filename);
- exit(1);
- }
-
- sz = fread(buf, 1, sizeof(buf), f);
- if (!feof(f)) {
- fprintf(stderr, "file too long\n");
- exit(1);
- }
-
- fprintf(stderr, "%.*s\n", sz, buf);
-
- glGenProgramsARB(1, &prognum);
-
- glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum);
- glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- sz, (const GLubyte *) buf);
-
- errno = glGetError();
- printf("glGetError = %d\n", errno);
- if (errno != GL_NO_ERROR)
- {
- GLint errorpos;
-
- glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
- printf("errorpos: %d\n", errorpos);
- printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB));
- }
- assert(glIsProgramARB(prognum));
-}
-
-
-union vert {
- struct {
- GLfloat color[3];
- GLfloat pos[3];
- } v;
- GLfloat f[6];
-};
-
-static void make_midpoint( union vert *out,
- const union vert *v0,
- const union vert *v1)
-{
- int i;
- for (i = 0; i < 6; i++)
- out->f[i] = v0->f[i] + .5 * (v1->f[i] - v0->f[i]);
-}
-
-static void subdiv( union vert *v0,
- union vert *v1,
- union vert *v2,
- GLuint depth )
-{
- if (depth == 0) {
- glColor3fv(v0->v.color);
- glVertex3fv(v0->v.pos);
- glColor3fv(v1->v.color);
- glVertex3fv(v1->v.pos);
- glColor3fv(v2->v.color);
- glVertex3fv(v2->v.pos);
- }
- else {
- union vert m[3];
-
- make_midpoint(&m[0], v0, v1);
- make_midpoint(&m[1], v1, v2);
- make_midpoint(&m[2], v2, v0);
-
- subdiv(&m[0], &m[2], v0, depth-1);
- subdiv(&m[1], &m[0], v1, depth-1);
- subdiv(&m[2], &m[1], v2, depth-1);
- subdiv(&m[0], &m[1], &m[2], depth-1);
- }
-}
-
-/** Assignment */
-#define ASSIGN_3V( V, V0, V1, V2 ) \
-do { \
- V[0] = V0; \
- V[1] = V1; \
- V[2] = V2; \
-} while(0)
-
-static void Display( void )
-{
- glClearColor(0.3, 0.3, 0.3, 1);
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
-
- glEnable(GL_VERTEX_PROGRAM_NV);
-
- glBegin(GL_TRIANGLES);
-
-
- {
- union vert v[3];
-
- ASSIGN_3V(v[0].v.color, 0,0,1);
- ASSIGN_3V(v[0].v.pos, 0.9, -0.9, 0.0);
- ASSIGN_3V(v[1].v.color, 1,0,0);
- ASSIGN_3V(v[1].v.pos, 0.9, 0.9, 0.0);
- ASSIGN_3V(v[2].v.color, 0,1,0);
- ASSIGN_3V(v[2].v.pos, -0.9, 0, 0.0);
-
- subdiv(&v[0], &v[1], &v[2], nr_steps);
- }
-
- glEnd();
-
-
- glFlush();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- /*glTranslatef( 0.0, 0.0, -15.0 );*/
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 250, 250 );
- glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- args( argc, argv );
- Init();
- glutMainLoop();
- return 0;
-}
diff --git a/progs/vp/xpd.txt b/progs/vp/xpd.txt
deleted file mode 100644
index b8818ebc60..0000000000
--- a/progs/vp/xpd.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-XPD result.color, vertex.color, {2,2,2,0};
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/xdemos/.gitignore b/progs/xdemos/.gitignore
deleted file mode 100644
index 868249db88..0000000000
--- a/progs/xdemos/.gitignore
+++ /dev/null
@@ -1,25 +0,0 @@
-corender
-glthreads
-glxcontexts
-glxdemo
-glxgears
-glxgears_fbconfig
-glxgears_pixmap
-glxheads
-glxinfo
-glxpbdemo
-glxpixmap
-glxsnoop
-glxswapcontrol
-manywin
-offset
-overlay
-pbdemo
-pbinfo
-sharedtex
-texture_from_pixmap
-wincopy
-xdemo
-xfont
-xrotfontdemo
-yuvrect_client
diff --git a/src/glut/os2/src-glut_os2pm.zip b/src/glut/os2/src-glut_os2pm.zip
deleted file mode 100644
index 8c8a8c7ac4..0000000000
--- a/src/glut/os2/src-glut_os2pm.zip
+++ /dev/null
Binary files differ
diff --git a/src/mesa/.gitignore b/src/mesa/.gitignore
deleted file mode 100644
index b83498b1d9..0000000000
--- a/src/mesa/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*/gen_matypes
-*/matypes.h
diff --git a/src/mesa/drivers/dri/common/xmlpool/.gitignore b/src/mesa/drivers/dri/common/xmlpool/.gitignore
deleted file mode 100644
index a5a437849b..0000000000
--- a/src/mesa/drivers/dri/common/xmlpool/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-de
-es
-fr
-nl
-sv
diff --git a/src/mesa/drivers/dri/r200/.gitignore b/src/mesa/drivers/dri/r200/.gitignore
deleted file mode 100644
index 3773d8ea73..0000000000
--- a/src/mesa/drivers/dri/r200/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-radeon_chipset.h
-radeon_screen.*
-server
diff --git a/src/mesa/drivers/dri/r300/.gitignore b/src/mesa/drivers/dri/r300/.gitignore
deleted file mode 100644
index 3689a6a78e..0000000000
--- a/src/mesa/drivers/dri/r300/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-radeon_chipset.h
-radeon_screen.[ch]
-radeon_span.h
-server
diff --git a/src/mesa/drivers/dri/r300/Lindent b/src/mesa/drivers/dri/r300/Lindent
index 7d8d8896e3..7d8d8896e3 100755..100644
--- a/src/mesa/drivers/dri/r300/Lindent
+++ b/src/mesa/drivers/dri/r300/Lindent
diff --git a/src/mesa/drivers/ggi/default/.gitignore b/src/mesa/drivers/ggi/default/.gitignore
deleted file mode 100644
index c8a526b14d..0000000000
--- a/src/mesa/drivers/ggi/default/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-genkgi.conf
diff --git a/src/mesa/drivers/ggi/display/.gitignore b/src/mesa/drivers/ggi/display/.gitignore
deleted file mode 100644
index 98858db2c0..0000000000
--- a/src/mesa/drivers/ggi/display/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-fbdev.conf
diff --git a/src/mesa/glapi/.gitignore b/src/mesa/glapi/.gitignore
deleted file mode 100644
index e706bc23ca..0000000000
--- a/src/mesa/glapi/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.cvsignore
-glX_proto_common.pyo
-glX_proto_common.pyc
-typeexpr.pyo
-typeexpr.pyc
-license.pyo
-license.pyc
-gl_XML.pyo
-gl_XML.pyc
-glX_XML.pyo
-glX_XML.pyc
diff --git a/src/mesa/glapi/next_available_offset.sh b/src/mesa/glapi/next_available_offset.sh
index e7d6c2f4af..e7d6c2f4af 100755..100644
--- a/src/mesa/glapi/next_available_offset.sh
+++ b/src/mesa/glapi/next_available_offset.sh