Compare commits

...

386 Commits

Author SHA1 Message Date
Ian Romanick
b8f6444a07 mesa: set version string to 7.6.1 2009-12-21 18:10:46 -08:00
José Fonseca
09415ca234 mesa: Fix missing finite symbol error on Windows.
Caused by some weird logic regarding the __WIN32__ define which made
the finite definition dependent on the header include order.
(cherry picked from commit 622bdecabd)
2009-12-21 17:56:25 -08:00
Michal Krol
de7021b71c mesa: Include <unistd.h> only when one is available.
(cherry picked from commit 970823978c)
2009-12-21 17:55:13 -08:00
Vinson Lee
2b7b2b90e3 scons: Define _USE_MATH_DEFINES on MSVC. 2009-12-21 17:25:03 -08:00
Fabio Pedretti
e46ad402f1 configure.ac: fix for libdrm_radeon API changes. 2009-12-22 10:44:28 +10:00
Dave Airlie
9373287a1b radeon/r600: use new libdrm_radeon api 2009-12-22 10:23:41 +10:00
Dave Airlie
9d2910ee0f radeon: drop assert accessing cref which is meant to be hidden 2009-12-22 10:23:41 +10:00
Dave Airlie
43d8727301 radeon: drop unused members of radeon_state. 2009-12-22 10:23:40 +10:00
Dave Airlie
1703628011 r600: move structs for legacy cmdbuf into cmdbuf C file.
these really shouldn't be exposed here
2009-12-22 09:58:33 +10:00
Vinson Lee
07b54fe35b progs/redbook: Silence compiler warnings. 2009-12-21 15:20:01 -08:00
Dave Airlie
753f0a1dea r600: fix glFrontFace(GL_CW)
fd.o bug #25290

Suggested fix from Rafael Monica
2009-12-21 10:40:19 -05:00
Younes Manton
ace937f165 st/mesa: Check for single level mipmap trees.
The assert in util_gen_mipmap() caught it, although
it does the right thing anyway.
2009-12-21 00:59:06 -05:00
Jeremy Huddleston
b96a5df514 darwin: mklib: Use lipo rather than file to figure out architectures of object files
(cherry picked from commit ad7f9d71e2)
2009-12-20 21:36:41 -08:00
Jeremy Huddleston
f926eff263 darwin: Cleanup CPPFLAGS a bit
(cherry picked from commit 4a1e103858)
2009-12-20 21:36:39 -08:00
Vinson Lee
0dd9513874 progs/tests: Silence compiler warnings. 2009-12-20 01:01:00 -08:00
Vinson Lee
d87d71036c progs/trivial: Use C-style comments. 2009-12-19 00:28:01 -08:00
Vinson Lee
3340fd65fb progs/xdemos: Use C-style comment. 2009-12-19 00:00:56 -08:00
Vinson Lee
695adf41e2 progs/demos: Silence compiler warning in morph3d.c. 2009-12-18 23:46:14 -08:00
Vinson Lee
121ff55d81 progs/glsl: Use C-style comments. 2009-12-18 23:38:15 -08:00
Vinson Lee
41377942d3 progs/demos: Use C-style comment. 2009-12-18 23:34:28 -08:00
Brian Paul
0478b745fe glsl: clear out shader code before compiling
When we start compiling a shader, first free the existing gl_program.
This (mostly) fixes the piglit glsl-reload-source test.
Without this change, we were actually appending the new GPU code
onto the previous program.
2009-12-18 11:57:17 -07:00
Alex Deucher
20ee275974 r600: Invert front face winding when rendering to FBO
fixes fdo bug 25679

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2009-12-16 16:18:22 -05:00
Ian Romanick
aeea8a07b8 mesa: set version string to 7.6.1-rc4 2009-12-16 10:13:41 -08:00
Brian Paul
8a09e6e2ad mesa: add missing semicolon
See bug 25663.
2009-12-16 10:39:26 -07:00
Brian Paul
35ff190a9c docs: document 7.6.1 BlueGene fixes 2009-12-16 08:17:43 -07:00
Brian Paul
138d639ec9 mesa: test for __blrts for CPU_TO_LE32()
See bug 25663.
2009-12-16 08:04:25 -07:00
Brian Paul
a43fc39585 mesa: no dlopen on BlueGene
See bug 25663.
2009-12-16 08:02:56 -07:00
Brian Paul
6f202b53b0 mesa: remove //-style comments 2009-12-16 07:58:54 -07:00
Brian Paul
ddfc2e7439 st/mesa: remove //-style comments 2009-12-16 07:58:54 -07:00
Vinson Lee
dc0a1ebc73 unichrome: Silence compiler warnings. 2009-12-15 17:39:30 -08:00
Vinson Lee
a60457b03b sis: Silence compiler warnings. 2009-12-15 17:06:01 -08:00
Vinson Lee
7e3825abdb savage: Silence compiler warnings. 2009-12-15 16:32:51 -08:00
Vinson Lee
ca02109e91 r128: Silence uninitialized variable warnings in r128_tris.c. 2009-12-15 13:12:12 -08:00
Vinson Lee
7430c3ac35 dri: Initialize variable in driBindContext. 2009-12-15 13:04:25 -08:00
Ian Romanick
f23d01e726 intel: Fallback to software if drawable size is > MaxRenderbufferSize
This prevents the mystery blank window if, for example, glxgears is
resized larger than 2048 wide on 915.  Since the Intel drivers in Mesa
7.6 lack GTT mapped fallbacks, the performance is a slideshow at
best.  On Mesa 7.7 and later the performance is much better.
2009-12-15 12:37:09 -08:00
Vinson Lee
987e9188d2 x86: ifdef out unused function cptr. 2009-12-15 12:32:48 -08:00
Matthew Bell
22d2547ad1 mesa: Add missing $(DESTDIR) support to src/gallium/winsys/xlib/Makefile 2009-12-14 21:58:19 -07:00
Vinson Lee
0a8d508854 progs/trivial: Silence compiler warnings. 2009-12-14 18:11:57 -08:00
Vinson Lee
6e5fe39f50 mga: Silence uninitialized variable warnings. 2009-12-14 17:30:15 -08:00
Vinson Lee
b18fa9f448 mach64: Silence uninitialized variable warnings. 2009-12-14 17:20:34 -08:00
Vinson Lee
6c9870b54c i810: Silence uninitialized variable warnings in i180tris.c 2009-12-13 00:14:31 -08:00
Vinson Lee
555dc25c4c swrast: Silence uninitialized variable warnings in s_triangle.c 2009-12-12 23:47:32 -08:00
Vinson Lee
aa44efb045 st/mesa: Silence uninitialized variables warnings in st_draw.c. 2009-12-12 22:17:16 -08:00
Vinson Lee
0aef54ba62 swrast: Silence uninitialized variable warnings in ss_tritmp.h. 2009-12-12 22:00:19 -08:00
Vinson Lee
89d85e8170 glut: Prevent potential double free in menuVisualSetup. 2009-12-12 21:46:13 -08:00
Vinson Lee
20590b9733 t_dd_dmatmp.h: Silence unused value warning in render_poly_elts. 2009-12-12 20:20:02 -08:00
Vinson Lee
cd1a09e3bb glsl: Initialize member label of struct slang_operation to NULL. 2009-12-12 18:42:18 -08:00
Vinson Lee
f8d4ac56f7 softpipe: Initialize source in blend_quad. 2009-12-12 18:34:15 -08:00
Vinson Lee
7ea452dd35 t_dd_dmatmp2.h: Silence unused value warnings. 2009-12-12 16:56:07 -08:00
Vinson Lee
75e8dbb235 i915g: Silence unused value warning in intel_drm_get_device_id. 2009-12-12 16:24:25 -08:00
Vinson Lee
9dc018618d t_dd_dmatmp.h: Silence unused value warnings in render_line_loop_elts. 2009-12-12 16:18:08 -08:00
Vinson Lee
af4e4a73f7 t_dd_dmatmp.h: Silence unused value warning in render_tri_fan_elts. 2009-12-12 16:02:09 -08:00
Vinson Lee
588e9f69c4 progs/trivial: Silence compiler warnings in tri-blend-min.c. 2009-12-12 15:47:17 -08:00
Vinson Lee
de9132f274 t_dd_dmatmp.h: Silence unused value warning in render_poly_verts. 2009-12-12 15:27:30 -08:00
Vinson Lee
1e444c9960 swrast: Initialize tex_coords in handle_sample_op. 2009-12-12 15:08:01 -08:00
Vinson Lee
c1d361bd0b t_dd_dmatmp.h: Silence unused value warning in render_quads_verts. 2009-12-12 14:41:35 -08:00
Vinson Lee
786899f153 progs/trivial: Silence compiler warnings in tri-blend-max.c 2009-12-12 14:20:17 -08:00
Vinson Lee
7d529736b9 t_dd_dmatmp.h: Silence unused value warning in render_tri_fan_verts. 2009-12-12 13:39:39 -08:00
Vinson Lee
c2cee7741e t_dd_dmatmp.h: Silence unused value warning in render_line_loop_verts. 2009-12-12 12:52:02 -08:00
Vinson Lee
15c6558a2e progs/xdemos: Silence compiler warnings in glxinfo.c. 2009-12-12 02:06:51 -08:00
Vinson Lee
d5be33477e progs/tests: Silence compiler warnings in vpeval.c. 2009-12-12 01:34:33 -08:00
Vinson Lee
44d6ab6de5 progs/tests: Silence compiler warnings in cva.c. 2009-12-12 01:11:56 -08:00
Vinson Lee
9e2eee4ab2 progs/redbook: Silence compiler warnings in aaindex.c. 2009-12-12 01:02:16 -08:00
Vinson Lee
81dcf8bdf2 t_dd_dmatmp.h: Silence unused value warning in render_line_loop_verts. 2009-12-12 00:33:42 -08:00
Brian Paul
7d41b4248b docs: updated 7.6.1 relnotes with GLSL fixes 2009-12-11 09:41:34 -07:00
Brian Paul
d8f8eca9ef mesa: remove unnecessary loop in _mesa_remove_output_reads() 2009-12-11 09:40:33 -07:00
Brian Paul
5076a4f53a mesa: check dst reg in _mesa_find_free_register()
If a register was only being used as a destination (as will happen when
generated condition-codes) we missed its use.  So we'd errantly return
a register index that was really in-use, not free.

Fixes bug 25579.
2009-12-11 09:16:27 -07:00
Aurelien Jarno
f7f1211b9b sparc: additional preprocessor test for SPARC 64-bit 2009-12-11 08:46:54 -07:00
Vinson Lee
94fba49be9 mesa: Initialize variable in MatchInstruction. 2009-12-10 18:51:51 -08:00
Vinson Lee
e31df54754 mesa: Assign _mesa_lookup_parameter_index return value to GLint. 2009-12-10 18:32:33 -08:00
Vinson Lee
cb1dcb55f9 i915: Add missing break statement in i915_debug_packet. 2009-12-10 18:21:59 -08:00
Vinson Lee
d38ffed523 glsl: Increase size of array in_slang_lookup_constant from 4 to 16.
For some cases, _mesa_GetIntegerv reads up to params[15].
2009-12-10 17:52:31 -08:00
Vinson Lee
1cf60c9810 progs/samples: Byte swap individual members of struct _rawImageRec. 2009-12-10 15:41:13 -08:00
Vinson Lee
bc0509bba8 progs/util: Byte swap individual members of struct _rawImageRec. 2009-12-10 13:24:15 -08:00
Vinson Lee
51f52edaf1 glsl: Fix array out-of-bounds access by _slang_lookup_constant. 2009-12-10 12:37:10 -08:00
Vinson Lee
dcb4a37fc8 mesa: Fix array out-of-bounds access by _mesa_TexParameteriv. 2009-12-10 12:11:09 -08:00
Vinson Lee
b827578805 mesa: Fix array out-of-bounds access by _mesa_TexGend.
_mesa_TexGend calls _mesa_TexGenfv, which uses the params argument
as an array.
2009-12-09 17:59:23 -08:00
Vinson Lee
444d1f3910 mesa: Fix array out-of-bounds access by _mesa_Lighti.
_mesa_Lighti calls _mesa_Lightiv, which uses the params argument
as an array.
2009-12-09 17:34:50 -08:00
Vinson Lee
34528a34c4 mesa: Fix array out-of-bounds access by _mesa_Lightf. 2009-12-09 17:11:30 -08:00
Vinson Lee
348883076b mesa: Fix array out-of-bounds access by _mesa_PointParameteri.
_mesa_PointParameteri calls _mesa_PointParameterfv, which uses the
params argument as an array.
2009-12-09 13:15:05 -08:00
Vinson Lee
6f2d51b81f mesa: Fix array out-of-bounds access by _mesa_PointParameterf.
_mesa_PointParameterf calls _mesa_PointParameterfv, which uses the
params argument as an array.
2009-12-09 13:00:22 -08:00
Vinson Lee
637970aefd mesa: Fix array out-of-bounds access by _mesa_LightModelf.
_mesa_LightModelf calls _mesa_LightModelfv, which uses the
params argument as an array.
2009-12-09 12:43:28 -08:00
Vinson Lee
a082d965de glsl: Remove unused member x from struct slang_operation. 2009-12-09 11:26:24 -08:00
Brian Paul
3de8fff45d mesa: fix baseLevel >= MAX_TEXTURE_LEVELS test
This fixes invalid array indexing when baseLevel == MAX_TEXTURE_LEVELS.
See bug 25528.
2009-12-09 08:30:05 -07:00
Andre Maasikas
33a120e476 r600: fix state size prediction after dc0777d3 2009-12-09 10:51:52 +02:00
Vinson Lee
af16c822a5 mesa: Fix array out-of-bounds access by _mesa_LightModeli.
_mesa_LightModeli calls _mesa_LightModeliv, which uses the
params argument as an array.
2009-12-08 18:26:05 -08:00
Vinson Lee
d33bf38d63 mesa: Fix array out-of-bounds access by _mesa_Fogf.
_mesa_Fogf calls _mesa_Fogfv, which uses the params argument
as an array.
2009-12-08 17:51:07 -08:00
Vinson Lee
3f7c2ac279 mesa: Fix array out-of-bounds access by _mesa_TexParameteri.
_mesa_TexParameteri calls set_tex_parameteri, which uses the
params argument as an array.
2009-12-08 17:25:05 -08:00
Vinson Lee
7f146b3824 mesa: Fix array out-of-bounds access by _mesa_Fogi.
_mesa_Fogi calls _mesa_Fogfv, which uses the params argument
as an array.
2009-12-08 16:08:41 -08:00
Vinson Lee
a1d46fbea0 mesa: Fix array out-of-bounds access by _mesa_TexParameteri.
_mesa_TexParameteri calls set_tex_parameterf, which uses the
params argument as an array.
2009-12-08 15:42:13 -08:00
Vinson Lee
d88f3b9468 mesa: Fix array out-of-bounds access by _mesa_TexParameterfv.
_mesa_TexParameterfv calls set_tex_parameteri, which uses the
params argument as an array.
2009-12-08 14:33:33 -08:00
Brian Paul
54b0ed8360 vbo: fix array index out of bounds error, and fix evaluator priorities
Fixes bug 25525.
Plus, the GL_NV_vertex_program evaluators alias and override the
convential evaluator maps, so set their state after the conventional
maps.
2009-12-08 15:03:22 -07:00
Vinson Lee
1de1deffce i915g: Fix memory leak when pci id is unknown. 2009-12-08 00:43:38 -08:00
Vinson Lee
7e93e06781 i915g: Add missing break statement in i915_debug_packet. 2009-12-08 00:37:35 -08:00
Vinson Lee
7f8e22aa29 rbug: Initialize variable in rbug_get_message.
Silences uninitialized variable warning.
2009-12-08 00:28:50 -08:00
Andre Maasikas
369669ff9a r600: add support for TXB instruction
makes testing other things easier - does not hang the card
TODO: enable TEX dependency tracking in vertex programs
2009-12-08 10:02:23 +02:00
Andre Maasikas
dc0777d3e3 r600: reorder state for render_target and blend
First time around render targets are not enabled yet (done in
r700SendRenderTargetState) so blend state is not emitted for any targets.
Affects first glClear in some mesa tests.
As a quick fix reorder state emit so that target is set first
2009-12-08 09:41:10 +02:00
Vinson Lee
add6dfbba6 llvmpipe: Initialize variables in emit_instruction. 2009-12-07 19:04:07 -08:00
Vinson Lee
3e8b2fda21 progs/test: Initialize variable in prog_parameter.
Silences uninitialized variable compiler warning.
2009-12-07 18:40:37 -08:00
Ian Romanick
9dbd47fc6b mesa: set version string to 7.6.1-rc3 2009-12-07 16:59:59 -08:00
Vinson Lee
7d84169865 progs/demos: Fix memory leak in projtex.c. 2009-12-07 12:31:08 -08:00
Vinson Lee
7005f7cd1a st/egl: Fix memory leak in egl_tracker.c.
(cherry picked from commit 052b127842)
2009-12-06 01:15:24 -08:00
Vinson Lee
c994f08eb1 dri: Fix potential null pointer dereference in driBindContext.
(cherry picked from commit 919898e92f)
2009-12-06 01:01:55 -08:00
Vinson Lee
f622b649fb dri: Fix potential null pointer deference in dri_put_drawable.
(cherry picked from commit 364070b1f2)
2009-12-06 01:00:20 -08:00
Vinson Lee
76b3523d75 glx: Prevent potential null pointer deference in driCreateContext.
(cherry picked from commit 4b0b250aae)
2009-12-06 00:56:20 -08:00
Vinson Lee
978b80c8e3 progs/tests: Add tests to Makefile.
(cherry picked from commit 76d2ec3a0a)
2009-12-05 21:20:54 -08:00
Vinson Lee
3cd745515e draw: Initialize variable in draw_pt.c.
(cherry picked from commit ea98e9820d)
2009-12-05 15:11:41 -08:00
Vinson Lee
b2953ee1a6 mesa: Fix array out-of-bounds access by _mesa_TexGenf.
_mesa_TexGenf calls _mesa_TexGenfv, which uses the params argument
as an array.
(cherry picked from commit ca5a7aadb4)
2009-12-05 13:00:35 -08:00
Vinson Lee
d74cd04e61 mesa: Fix array out-of-bounds access by _mesa_TexGeni.
_mesa_TexGeni calls _mesa_TexGeniv, which uses the params argument
as an array.
(cherry picked from commit d55fb7c835)
2009-12-05 12:59:34 -08:00
Vinson Lee
ca8a2150c7 mesa: Fix array out-of-bounds access by _mesa_TexParameterf.
_mesa_TexParameterf calls set_tex_parameterf, which uses the params
argument as an array.
(cherry picked from commit 270d36da14)
2009-12-05 12:50:56 -08:00
Vinson Lee
4071d065c2 mesa: Fix array out-of-bounds access by _mesa_TexParameterf.
_mesa_TexParameterf calls set_tex_parameteri, which uses the params
argument as an array.
(cherry picked from commit a201dfb6bf)
2009-12-05 12:47:40 -08:00
Vinson Lee
1446f30875 progs/samples: Fix memory leak if malloc fails in rgbtoppm.c. 2009-12-05 01:43:29 -08:00
Vinson Lee
412aeeed1c progs/samples: Fix memory leak if fopen fails in rgbtoppm.c. 2009-12-05 01:38:14 -08:00
Vinson Lee
6212c8103a progs/samples: Add rgbtoppm to Makefile. 2009-12-05 01:28:47 -08:00
Vinson Lee
2cd2341ce8 progs/tests: Removed unused variable from texdown.c. 2009-12-05 01:23:05 -08:00
Vinson Lee
d642edd2d1 progs/vpglsl: Assign glGetUniformLocationARB return value to GLint.
The return type of glGetUniformLocationARB is GLint, not GLuint.
2009-12-05 01:11:26 -08:00
Vinson Lee
8d2f3434c5 progs/fp: Redraw upon keypress. 2009-12-04 23:31:39 -08:00
Vinson Lee
fe8e18bcd4 mesa: Fix array out-of-bounds access in _mesa_TexEnvf.
_mesa_TexEnvf calls _mesa_TexEnvfv, which uses the param argument
as an array.
(cherry picked from commit a11d60d14c)
2009-12-04 17:48:30 -08:00
Vinson Lee
4fb5ae7233 progs/util: Fix memory leak if fread returns 0 in CompileShaderFile.
(cherry picked from commit 11905da883)
2009-12-04 17:35:00 -08:00
Vinson Lee
5683d7d43f progs/util: Fix memory leak if fail to load/compile shader
Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit c475079ef2)
2009-12-04 17:32:48 -08:00
Vinson Lee
e5bc2a19bd progs/fp: Add tri-inv.c to Makefile. 2009-12-04 17:29:53 -08:00
Coleman Kane
225bc70b77 r300g: use $(MAKE) variable
Fixes bug 24501
2009-12-04 08:45:04 -07:00
Brian Paul
ca7cd3ade0 progs/xdemos: fix some visual/fbconfig logic in glxinfo.c
The fbAttribSingle/Double arrays had wrong GLX_DOUBLEBUFFER values.
We only need to use the glXChooseFBConfig() code when glXChooseVisual()
fails (but I don't know when that would happen).
Other recent commits errantly removed some code in this area too.
2009-12-04 08:09:57 -07:00
Brian Paul
fb83fa26c4 docs: a few more fixes for 7.6.1 2009-12-04 08:09:07 -07:00
Alex Deucher
8d8fd9776e radeon: fix polygon stipple
fixes fdo bug 25354

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2009-12-04 09:52:37 -05:00
Vinson Lee
c74afe0c46 glu/sgi: Fix memory leak in gluBuild2DMipmapLevelsCore.
(cherry picked from commit 808f037660)
2009-12-04 00:14:31 -08:00
Vinson Lee
8df551c46b glu/sgi: Fix memory leak in gluBuild1DMipmapLevelsCore.
(cherry picked from commit 94bcb9f1a4)
2009-12-04 00:14:05 -08:00
Vinson Lee
ea487c6d0b glu/sgi: Fix memory leak in gluBuild2DMipmapLevelsCore.
(cherry picked from commit 0d89f3dc7f)
2009-12-04 00:13:25 -08:00
Vinson Lee
7b5eba453e glu/sgi: Fix memory leak in gluBuild3DMipmapLevelsCore.
(cherry picked from commit f895abbd97)
2009-12-04 00:12:49 -08:00
Vinson Lee
7ed749c062 glu/sgi: Fix memory leak in gluBuild3DMipmapLevelsCore.
(cherry picked from commit 326b66d724)
2009-12-04 00:11:58 -08:00
Vinson Lee
80a3944a4d glu/sgi: Fix memory leak in bitmapBuild2DMipmaps.
(cherry picked from commit 5b925b7daa)
2009-12-04 00:11:02 -08:00
Vinson Lee
6c1fc2b2a5 glu/sgi: Fix memory leak in gluScaleImage3D.
(cherry picked from commit b611f639b4)
2009-12-04 00:10:22 -08:00
Vinson Lee
fe38c16021 glu/sgi: Fix memory leak in gluScaleImage.
(cherry picked from commit a9c540f5de)
2009-12-04 00:09:22 -08:00
Vinson Lee
d23bb22f62 glu: Fix memory leak in __gl_meshMakeEdge.
(cherry picked from commit d3b4c99c70)
2009-12-04 00:07:51 -08:00
Vinson Lee
12a440abfb progs/xdemos: Silence unused value warnings in sharedtex_mt.c.
(cherry picked from commit 8556fad751)
2009-12-04 00:04:38 -08:00
Vinson Lee
4bf96ebdae progs/xdemos: Fix memory leak in pbdemo.c.
(cherry picked from commit e0857962b9)
2009-12-04 00:03:14 -08:00
Vinson Lee
ba3fedf246 progs/xdemos: Add missing break statement in offset.c.
(cherry picked from commit 4ab8dbe593)
2009-12-04 00:01:20 -08:00
Vinson Lee
8350648401 progs/xdemos: Remove duplicate code in glxinfo.c.
(cherry picked from commit a4720a1a32)
2009-12-03 23:59:47 -08:00
Vinson Lee
7324c22024 progs/xdemos: Fix memory leak in glxinfo.c.
(cherry picked from commit f080567f4c)
2009-12-03 23:59:11 -08:00
Vinson Lee
68d206fafa progs/xdemos: Add assert in corender.c.
(cherry picked from commit 66a4ec14c3)
2009-12-03 23:22:47 -08:00
Vinson Lee
69ed1147a8 progs/vp: Fix memory leak in vp-tris.c.
(cherry picked from commit 760cf71572)
2009-12-03 23:20:18 -08:00
Vinson Lee
efb582fde7 progs/tests: Fix memory leak in texdown.c if malloc fails.
(cherry picked from commit e3cfd78969)
2009-12-03 23:17:26 -08:00
Vinson Lee
b210739aad progs/redbook: Fix memory leak in quadric.c.
(cherry picked from commit 47b5f584a6)
2009-12-03 23:12:59 -08:00
Vinson Lee
b1a87a3e0b progs/glsl: Fix memory leak in deriv.c.
(cherry picked from commit 0e783c7d03)
2009-12-03 22:54:35 -08:00
Vinson Lee
25fd168f03 progs/glsl: Change tangentAttrib from GLuint to GLint in bump.c.
tangentAtrrib is assigned the result of glGetAttribLocation.
The assertion 'assert(tangentAtrrib >= 0)' would be a no-op if
tangentAttrib is a GLuint.
(cherry picked from commit b8dcb79c53)
2009-12-03 22:51:43 -08:00
Vinson Lee
b803abbaad progs/demos: Fix memory leak in ray.c.
(cherry picked from commit 6b480dc21d)
2009-12-03 22:49:18 -08:00
Vinson Lee
5820dae4ec progs/demos: Fix memory leak in projtex.c.
(cherry picked from commit ee555e3d69)
2009-12-03 22:44:55 -08:00
Vinson Lee
fc5f07de1a progs/demos: Fix memory leak in ipers.c.
(cherry picked from commit a1afe303de)
2009-12-03 22:38:44 -08:00
Vinson Lee
d245a951f3 progs/demos: Fix memory leak in fslight.c.
(cherry picked from commit aef3218f0b)
2009-12-03 22:36:37 -08:00
Vinson Lee
905e12f3cc gallium/util: Initialize variables in u_pack_color.h.
(cherry picked from commit 36e2074b63)
2009-12-03 17:55:59 -08:00
Vinson Lee
56de7e222e progs/trivial: Redraw upon keypress.
(cherry picked from commit 9553a42f63)
2009-12-03 17:27:24 -08:00
Vinson Lee
34a0b22a74 progs/trivial: Redraw upon keypress.
(cherry picked from commit 3790c6a13b)
2009-12-03 17:25:00 -08:00
Vinson Lee
9e29242331 progs/glsl: Redraw upon keypress.
(cherry picked from commit 881f55236a)
2009-12-03 17:17:24 -08:00
Vinson Lee
a0ac8fc7d8 progs/util: Exit RawImageGetData early if malloc fails.
Prevents a null pointer deference later on.
(cherry picked from commit e26135a744)
2009-12-03 17:14:08 -08:00
Vinson Lee
0a6acecb35 progs/util: Fix memory leak if malloc fails in RawImageOpen.
(cherry picked from commit d36cb2396c)
2009-12-03 17:08:48 -08:00
Vinson Lee
305d4f147e progs/util: Fix memory leak if fopen fails in RawImageOpen.
(cherry picked from commit d9508e8df9)
2009-12-03 17:03:26 -08:00
Vinson Lee
772e004781 progs/util: Fix memory leak if malloc fails in tkRGBImageLoad.
(cherry picked from commit 786d539511)
2009-12-03 16:57:17 -08:00
Vinson Lee
f1172c4030 progs/util: Fix memory leak if LoadRGBImage fails.
(cherry picked from commit 041cd0e110)
2009-12-03 16:24:03 -08:00
Vinson Lee
84de1672d3 progs/util: Fix memory if LoadRGBMipmaps2 fails.
(cherry picked from commit 28b8e4bcd7)
2009-12-03 16:15:22 -08:00
Vinson Lee
4ca8e1680e progs/util: Fix memory leak if LoadYUVImage fails.
(cherry picked from commit 0e790ac353)
2009-12-03 16:03:22 -08:00
Vinson Lee
d6a993135f progs/fp: Redraw upon keypress.
(cherry picked from commit cde6643724)
2009-12-03 15:59:56 -08:00
Vinson Lee
005242f166 prog/tests: Fix MSVC build.
Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 9c3197ef0a)
2009-12-03 15:53:13 -08:00
Vinson Lee
d3208678c2 progs/tests: fix MSVC build.
Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit a8ed066858)
2009-12-03 15:50:36 -08:00
Vinson Lee
97cbf4943a progs/tests: Fix MSVC build.
(cherry picked from commit 50e113e375)
2009-12-03 15:45:18 -08:00
Vinson Lee
a99bf51bc8 progs/tests: Fix MSVC build.
(cherry picked from commit 952bf63e2c)
2009-12-03 15:35:10 -08:00
José Fonseca
28474e1225 progs/tests: Use rand() instead of random().
Forgot these on previous commit.
(cherry picked from commit 166957abeb)
2009-12-03 15:34:38 -08:00
José Fonseca
bb6e3af939 progs/tests: Use rand() instead of random().
More portable. Same implementation on Linux.
(cherry picked from commit 699260b195)
2009-12-03 15:32:45 -08:00
Vinson Lee
a38776419b progs/tests: Fix MSVC build.
(cherry picked from commit f7455ad7af)
2009-12-03 15:29:01 -08:00
Vinson Lee
791b754687 prog/tests: Fix MSVC build.
(cherry picked from commit 60b6c74583)
2009-12-03 15:24:43 -08:00
Vinson Lee
89e747920f prog/tests: Fix MSVC build.
(cherry picked from commit 96fd13c1a0)
2009-12-03 15:15:12 -08:00
Vinson Lee
5a25adb646 progs/tests: fix MSVC build.
(cherry picked from commit 9c778a90ea)
2009-12-03 15:11:25 -08:00
Vinson Lee
3910e88ebf prog/tests: Fix MSVC build.
(cherry picked from commit ea862ec8ff)
2009-12-03 15:05:44 -08:00
Alex Deucher
2b5618fc5b r200: fix polygon stipple
fixes fdo bug 25354

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2009-12-03 11:20:40 -05:00
Vinson Lee
c3b7f93e02 scons: Add Mac OS to target platform list.
(cherry picked from commit 2c307c7750)
2009-12-02 20:33:32 -08:00
Vinson Lee
235c0c8134 progs/vpglsl: Fix psiz-mul.glsl compilation error on Mac OS.
(cherry picked from commit b98db7bf69)
2009-12-02 20:28:54 -08:00
Vinson Lee
0a107d36c2 progs/glsl: Fix trirast GLSL compilation errors on Mac OS.
(cherry picked from commit 4b3ec2acf2)
2009-12-02 20:20:12 -08:00
Vinson Lee
b094683e7c progs/glsl: Fix noise GLSL compilation error on Mac OS.
(cherry picked from commit 0d31990b47)
2009-12-02 20:16:51 -08:00
Vinson Lee
592c8522a2 demos/glsl: Add missing break statement to noise test.
(cherry picked from commit 7dfea5c072)
2009-12-02 20:16:41 -08:00
Vinson Lee
8f4d3613da progs/glsl: Fix multinoise GLSL compilation errors on Mac OS.
(cherry picked from commit d4dc2e30da)
2009-12-02 20:06:20 -08:00
Vinson Lee
9ed77d12b1 progs/glsl: Add missing break statement in multinoise.c.
(cherry picked from commit 43080e40aa)
2009-12-02 20:06:11 -08:00
Vinson Lee
832593772d progs/glsl: Fix mandelbrot GLSL compilation error on Mac OS.
(cherry picked from commit 04442841fb)
2009-12-02 19:55:48 -08:00
Vinson Lee
2a5cd95e24 progs/glsl: Include local headers before installed headers during compilation.
Fixes compilation errors on platforms with insufficient older installed
GL headers.
(cherry picked from commit d17af7d1e1)
2009-12-02 19:39:25 -08:00
Brian Paul
ccea09cd3a progs/glsl: minor Makefile clean-ups
(cherry picked from commit 4df2f7af5e)
2009-12-02 19:39:11 -08:00
Vinson Lee
67a0628ab2 progs: Ignore Mac OS dSYM directories.
(cherry picked from commit a420056750)
2009-12-02 15:22:34 -08:00
Brian Paul
908a3e56cc cell: added tex_usage param to xm_surface_buffer_create() 2009-12-02 09:31:26 -07:00
Brian Paul
ba97b98842 progs/demos: remove unused glFogCoordPointer_ext var 2009-12-01 12:23:07 -07:00
Tom Fogal
b9f4a0bd2b Simplify hackery added to fix AIX build.
Borrow an idiom from the GNU build system which can handle `for'
loops over empty lists.
2009-12-01 10:27:27 -08:00
Ian Romanick
d8da270a2b intel: Remove GL_NV_point_sprite from extension list
i830 does not (and cannot!) support the any of the non-default
GL_POINT_SPRITE_R_MODE_NV settings.  i915 and i965 could, but
currently do not.  In both cases it would require mucking about with
the fragment shader.
2009-12-01 10:25:44 -08:00
Ian Romanick
910aaed4da mesa: set version string to 7.6.1-rc2 2009-11-30 17:55:21 -08:00
Ian Romanick
587a52e95b i915: Actually put i915PointParameterfv in the driver function table. Duh. 2009-11-30 12:43:12 -08:00
Ian Romanick
533b766007 i915: Fallback bit define missed on previous commit 2009-11-29 17:49:55 -08:00
Ian Romanick
718f31b830 i915: Round point sizes instead of truncate. 2009-11-29 17:43:38 -08:00
Ian Romanick
d8d49716cf i915: Enable point sprite coordinate generation
Support still isn't completely correct, but it's better.  piglit
point-sprite now passes.  However, glean's pointSprite test fails.  In
that test the texture on the sprite is somehow inverted as though
GL_POINT_SPRITE_COORD_ORIGIN were set to GL_LOWER_LEFT.  i915 hardware
shouldn't be able to do that!

I believe there are also problems when not all texture units have
GL_COORD_REPLACE set.  The hardware enable seems to be all or nothing.

Fixes bug #25313.
2009-11-29 17:40:02 -08:00
Ian Romanick
0528f40e3b Improve implementation of GL_POINT_SPRITE_COORD_ORIGIN errors
This enum is only supported for OpenGL 2.0.  If a driver supports
OpenGL 1.4 and GL_ARB_point_sprite, using this enum should generate an
error.  This is important because, for example, i915 and i830 can
support GL_ARB_point_sprite, but they cannot support
GL_POINT_SPRITE_COORD_ORIGIN.

This commit just removes the check for NV_point_sprite, which is
completely wrong, and add some comments describing what the code
should do.  I don't see an easy way to check for version >= 2.0 from
inside Mesa.  Perhaps we should add an extension
GL_MESA_point_sprite_20 (like Intel's old GL_EXT_packed_pixels_12) to
indicate that this added bit of functionality is available.

Also note that glean's pointSprite test only checks for
GL_ARB_point_sprite before trying to use
GL_POINT_SPRITE_COORD_ORIGIN.  Naturally, that fails on
non-2.0 implementations (i.e., Mac OS X on GMA 950).
2009-11-25 16:31:28 -08:00
Dave Airlie
e4c5fe52c9 radeon: fix context destroy needing lock for flushing.
Thanks to Intel code which I've just stolen pretty much as usual.

This fixes fdo bug 22851 which is a dri1 regression since rewrite.

Tested by: fpiobaf (Fabio) on #radeon
Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-25 20:29:56 +10:00
Ian Romanick
b12ca6b87b i915: Initialize Length and Offset fields when mapping a buffer object
This fixes an assertion failure in _mesa_MapBufferARB.

Fixes bugzilla #25253.
2009-11-23 23:14:49 -08:00
Ian Romanick
da0883114b shaderutil: Fix detection of shaders
Check for versions >= 2.0 (because some drivers return 3.0), and return
GL_FALSE if shaders are not detected.
2009-11-23 18:33:50 -08:00
Jakob Bornecrantz
a11750218f autoconf: Fix case for not having package
(cherry picked from commit 5c4bdbd825)
2009-11-23 20:09:36 +01:00
Michel Dänzer
601edbef17 Fix the DRI swrast driver for big endian platforms.
Too bad I didn't realize earlier how easy this could be...

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=22767 .
2009-11-23 19:56:37 +01:00
Brian Paul
3128d65fd7 docs: document fixes for AIX 2009-11-19 09:35:01 -07:00
Tom Fogal
7593bcb6ec gl: added mangled glXGetProcAddressARB define
Signed-off-by: Brian Paul <brianp@vmware.com>
2009-11-19 09:33:32 -07:00
Tom Fogal
8f24e863c3 progs: Fix quoting issue with empty set of PROGRAM_DIRS.
Quotes are important to make sure the argument to test -n really
is the empty string, but that requires stringifying PROGRAM_DIRS.

Signed-off-by: Brian Paul <brianp@vmware.com>
2009-11-19 09:26:39 -07:00
Tom Fogal
4e6e2462ea mesa: define 32bit byteswap for AIX.
Fixes `xlib' driver build on AIX.

Signed-off-by: Brian Paul <brianp@vmware.com>
2009-11-19 09:18:51 -07:00
Brian Paul
5117725fd0 docs: removed VC6/7 project files 2009-11-19 09:07:34 -07:00
Brian Paul
e16b59df42 docs: update news file for 7.6.1 release 2009-11-19 09:07:17 -07:00
Brian Paul
2a1505b42e docs: remove VC6/7 project file info 2009-11-19 09:01:48 -07:00
Brian Paul
cba614bd88 mesa: omit VC6, VC7 project files from tarballs
Only VC8 project file is known to work.
2009-11-19 09:00:16 -07:00
Brian Paul
3bcf2d49f3 windows: remove old VC6 project files directory
Very out of date, according to Karl Schultz.
2009-11-19 08:57:39 -07:00
Alex Deucher
fe5c46546e r600: disable compressed texture support
It's not implemented yet.  fixes fdo bug 24047
2009-11-18 11:51:20 -05:00
Alex Deucher
c5add6a468 docs: Add note about r600 2009-11-18 11:32:55 -05:00
Alex Deucher
13b5a624b1 Revert "radeon: Fix legacy bo not to reuse dma buffers before refcount is 1."
This reverts commit 284a7af274.

This breaks kde desktop effects.  See fdo bug 24131
2009-11-18 11:27:36 -05:00
Brian Paul
027abddf4f mesa: set version string to 7.6.1-rc1 2009-11-18 08:08:25 -07:00
Brian Paul
d449c07b8b xorg/st: fixup builds against later dpms headers.
(cherry picked from master, commit e9d6ab72be)
2009-11-18 08:07:56 -07:00
Brian Paul
2b3ea2be90 docs: i965 clipping fix 2009-11-17 15:53:27 -07:00
Eric Anholt
514544f373 i965: Fix Ironlake shadow comparisons.
The cube map array index arg is always present.
2009-11-12 11:41:39 -08:00
Eric Anholt
5f305b1db9 i965: Fix VBO last-valid-offset setup on Ironlake.
Instead of doing math based on the (broken for VBO && offset != 0)
input->count number, just use the BO size.  Fixes assertion failure in ETQW.
2009-11-12 11:41:39 -08:00
Roland Scheidegger
ab12e764ba i965: fix EXT_provoking_vertex support
This didn't work for quad/quadstrips at all, and for all other primitive types
it only worked when they were unclipped.
Fix up the former in gs stage (could probably do without these changes and
instead set QuadsFollowProvokingVertexConvention to false), and the rest in
clip stage.
2009-11-11 17:57:56 -08:00
Eric Anholt
1220aba99b i965: Fix VS constant buffer value loading.
Previously, we'd load linearly from ParameterValues[0] for the constants,
though ParameterValues[1] may not equal ParameterValues[0] + 4.  Additionally,
the STATE_VAL type paramters didn't get updated.

Fixes piglit vp-constant-array-huge.vpfp and ET:QW object locations.

Bug #23226.
2009-11-10 14:44:40 -08:00
Eric Anholt
e5ffb9f5ea i965: Unalias src/dst registers for SGE and friends.
Fixes piglit vp-sge-alias test, and the googleearth ground shader.  \o/

Bug #22228
(cherry picked from commit 56ab92bad8)
2009-11-10 14:44:39 -08:00
Eric Anholt
23a4a6727e i965: Allow use of PROGRAM_LOCAL constants in ARB_vp.
Fixes piglit arl.vp.
(cherry picked from commit d52d78b4bc)
2009-11-10 14:44:39 -08:00
Alex Deucher
74ef3207d8 r600: don't emit htile regs
These are needed for HiZ which is not currently used and
the _BASE reg requires a reloc which is not currently supported
in the drm.
2009-11-09 12:27:27 -05:00
Ian Romanick
2cda507fa1 prog parse: Handle GL_VERTEX_PROGRAM_ARB in glLoadProgramNV 2009-11-07 15:54:33 -08:00
Ian Romanick
6d2ceda780 prog parse: Handle GL_VERTEX_PROGRAM_NV in glProgramStringARB
Handle both NV vertex programs and NV vertex state programs passed to
glProgramStringARB.
2009-11-07 15:54:33 -08:00
Ian Romanick
289db82b2d prog parse: Handle GL_FRAGMENT_PROGRAM_ARB in glLoadProgramNV 2009-11-07 15:54:32 -08:00
Ian Romanick
7452877cf6 prog parse: Handle GL_FRAGMENT_PROGRAM_NV in glProgramStringARB 2009-11-07 15:54:32 -08:00
Ian Romanick
26d2ce0a09 GLX: Change GLX client vendor string to "Mesa Project and SGI"
This change allows a certain closed-source browser plug-in to work
with open-source drivers.
2009-11-06 14:52:49 -08:00
Ian Romanick
9348ac03ce ARB prog parser: Regenerate parser from previous commits. 2009-11-06 10:46:23 -08:00
Ian Romanick
d8e256f923 ARB prog parser: Release old program string in _mesa_parse_arb_{fragment,vertex}_program
The program structure passed to _mesa_parse_arb_program is just a
place holder.  The stings that actually need to be released are only
known to the functions calling _mesa_parse_arb_program, so they should
be freed there.
2009-11-06 10:46:22 -08:00
Ian Romanick
301a9b7e28 ARB prog parser: Release strings returned from the lexer that don't need to be kept 2009-11-06 10:46:22 -08:00
Ian Romanick
1c7337d46e Revert "ARB prog parser: Fix epic memory leak in lexer / parser interface"
This reverts commit 93dae6761b.

This change was completely broken when the parser uses multiple
strings in a single production.  It would be nice if bug fixes could
initially land somewhere other than the stable branch.
2009-11-06 10:46:22 -08:00
Brian Paul
63191bd244 xmesa: pass pixmap to clip_for_xgetimage()
The code was assuming ctx->DrawBuffer == ctx->ReadBuffer.
Passing the pixmap is simpler and better.
Fixes a potential segfault.
2009-11-05 16:48:52 -07:00
Brian Paul
7c623905bc mesa: added cast to silence warning 2009-11-04 17:58:43 -07:00
Brian Paul
1c3f7ab74c vbo: fix out-of-bounds array access
The exec->vtx.inputs[] array was being written past its end.  This was
clobbering the following vbo_exec_context::eval state.  Probably not noticed
since evaluators and immediate mode rendering don't happen at the same time.

Fixed the loop in vbo_exec_vtx_init().
Changed the size of the vbo_exec_context::vtx.arrays[] array.
Added a bunch of debug-build assertions.

Issue found by Vinson Lee.
2009-11-04 17:51:28 -07:00
Brian Paul
bc4ad7c2ae mesa: fix broken pack_histogram() case for GLhalf 2009-11-04 17:42:30 -07:00
Brian Paul
76aa0c0fd3 mesa: silence warning from gcc 4.4.1 2009-11-04 17:42:01 -07:00
Vinson Lee
60c328db2d progs/tests: Fix MSVC build.
Signed-off-by: Brian Paul <brianp@vmware.com>
2009-11-04 15:56:14 -07:00
Alan Hourihane
f1b91ccc08 Fix YTILE spantmp functions 2009-11-04 15:26:38 +00:00
Vinson Lee
51f7763c00 glslcompiler: Fix Mac OS build.
Signed-off-by: Brian Paul <brianp@vmware.com>
2009-11-04 07:14:55 -07:00
Brian Paul
6eb71519f7 mesa: (GLint64) casts in get.c to silence Visual Studio warnings
Revised version of a patch from Karl Schultz.
2009-11-03 16:13:24 -07:00
Brian Paul
c5106339d3 docs: fix 7.6 build with Visual Studio 2009-11-03 16:12:02 -07:00
Karl Schultz
804d367a47 windows: updated VC8 project file
Signed-off-by: Brian Paul <brianp@vmware.com>
2009-11-03 16:09:29 -07:00
Karl Schultz
077eb0d81c windows: remove old entrypoints from mesa.def file
Signed-off-by: Brian Paul <brianp@vmware.com>
2009-11-03 16:08:46 -07:00
Karl Schultz
e713a95c96 mesa: added GLAPIENTRY keywords for sync object functions
Signed-off-by: Brian Paul <brianp@vmware.com>
2009-11-03 16:05:12 -07:00
Marek Olšák
a0cd2b7029 st/mesa: clip pixels in draw_stencil_pixels to avoid crash
Signed-off-by: Brian Paul <brianp@vmware.com>
2009-11-03 09:48:04 -07:00
Brian Paul
e60ebebb39 st/mesa: don't use util_blit_pixels_writemask() for depth or depth/stencil
util_blit_pixels_writemask() only works for color formats at this time.
Also, it might never work for depth/stencil surfaces since we can't get
handle stencil values in a fragment shader.

Fixes glCopyTexSubImage(GL_DEPTH_COMPONENT).
2009-11-03 09:48:04 -07:00
Brian Paul
0197348641 st/mesa: fix tests for depth and depth/stencil texture formats 2009-11-03 09:48:04 -07:00
Vinson Lee
e055665752 glx: Fix memory leak if XF86DRICreateDrawable() fails
Signed-off-by: Brian Paul <brianp@vmware.com>
2009-11-02 12:35:47 -07:00
Chow Loong Jin
35506dec67 Add --with-dri-searchpath argument
* Add an extra argument to configure which allows for specifying
  different DRI driver search paths to libGL (FDO #24766)

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
2009-10-30 06:00:13 -07:00
Brian Paul
02b9fb9c80 progs/tests: fixes for drawbuffers.c
Disable GL_DEPTH_TEST before glDrawPixels.
Show color buffer 0 on left, color buffer 1 on right.
2009-10-29 14:46:35 -06:00
Brian Paul
635ea87374 progs/tests: added test for GL_EXT_texture_compression_s3tc support 2009-10-28 21:50:51 -06:00
Vinson Lee
96128fdf2f mesa: Fix memory leak if we run out of memory
Signed-off-by: Brian Paul <brianp@vmware.com>
2009-10-28 17:59:49 -06:00
Vinson Lee
c0a61c8442 intel: Fix memory leak in case of renderbuffer bad format
Signed-off-by: Brian Paul <brianp@vmware.com>
2009-10-28 13:09:44 -06:00
Brian Paul
0219cd0961 mesa: remove unneeded #includes 2009-10-28 11:13:21 -06:00
Brian Paul
5e3b2baae7 mesa: include imports.h to silence warning 2009-10-28 11:11:30 -06:00
Vinson Lee
a7d0665c00 intel: Fix memory leak in event of mip tree allocation failure
Signed-off-by: Brian Paul <brianp@vmware.com>
2009-10-28 11:10:14 -06:00
Ian Romanick
93dae6761b ARB prog parser: Fix epic memory leak in lexer / parser interface
Anything that matched IDENTIFIER was strdup'ed and returned to the
parser.  However, almost every case of IDENTIFIER in the parser just
dropped the returned string on the floor.  Every swizzle string, every
option string, every use of a variable, etc. leaked memory.

Create a temporary buffer in the parser state (string_dumpster and
dumpster_size).  Return strings from the lexer to the parser in the
buffer.  Grow the buffer as needed.  When the parser needs to keep a
string (i.e., delcaring a new variable), let it make a copy then.

The only leak that valgrind now detects is /occasionally/ the copy of
the program string in gl_program::String is leaked.  I'm not seeing
how. :(
2009-10-27 17:06:18 -07:00
Ian Romanick
8df9587d68 ARB prog parser: Don't leak program string
The program string is kept in the program object.  On the second call
into glProgramStringARB the previous kept string would be leaked.
2009-10-27 17:06:18 -07:00
Ian Romanick
0f255d1956 ARB prog parser: Don't leak symbol table header structures 2009-10-27 17:06:18 -07:00
Eric Anholt
2643a7ba29 intel: Fix flipped condition in ARB_sync GetSYnciv(GL_SYNC_STATUS).
Bug #24435
(cherry picked from commit d56125a298)
2009-10-27 16:59:03 -07:00
Brian Paul
b7eea8c616 intel: added region draw_x/y offsets in x/y_tile_swizzle() funcs
This fixes the second part of bug 23552.
2009-10-27 17:35:30 -06:00
Brian Paul
498fcfd315 progs/tests: added new blitfb.c test
Tests glBlitFramebuffer() between two texture/renderbuffer surfaces.
In particular, blit from level[1] of a cube map face to a 2D texture.

Used to find/fix bug in intel do_copy_texsubimage().
See commit aef1ab1073f3e30d699b99dae17518ed48b57c72
2009-10-27 16:46:20 -06:00
Brian Paul
22575abdec intel: fix src offset bug in do_copy_texsubimage()
Use src->draw_offset intead of zero.  Zero usually worked, except when
the src renderbuffer is actually a texture mipmap level higher than zero.
Fixes progs/test/blitfb.c test.
2009-10-27 16:46:20 -06:00
Brian Paul
517ae7a3b6 glsl: fix memory leak
A slightly modified version of a patch from Vinson Lee.
2009-10-27 16:29:15 -06:00
Eric Anholt
70b17db918 i915: Fix driver for the miptree x/y offset changes.
Bug #24734.
2009-10-27 10:27:15 -07:00
Brian Paul
43dc91f8bb i965: be clear that the Fallback field is a boolean, not a bitfield 2009-10-27 09:31:53 -06:00
Brian Paul
f9e334cb32 Revert "i965: fix hacked Fallback usage in brw_prepare_vertices()"
This reverts commit 8810b8f671.

It turns out the i965 driver uses the intel->Fallback field as a boolean,
not as a bitmask.  The intelFallback() function is a no-op in the i965
driver.  It would have been nice if there were some comments about this.
I'll fix that next...
2009-10-27 09:31:53 -06:00
Vinson Lee
42732611d3 draw: Fix memory leak.
This would only be hit if we got and invalid index_size.
2009-10-27 09:14:29 -06:00
Brian Paul
0a47631849 docs: document Intel glBitmap fixes 2009-10-26 10:58:47 -06:00
Brian Paul
48dad9c93f intel: fix GL state bugs in intel_texture_bitmap()
Need to push texture state and polygon state too.
Fixes rendering glitches seen in progs/demos/engine when changing
the rendering mode (wireframe, texture modes).
This makes bitmap rendering a little slower, unfortunately.
2009-10-26 10:44:22 -06:00
Brian Paul
dc8b139aa2 mesa: remove FBO texture depth/stencil test
The texture format should not be checked until validation time since
the format might be changed by a subsequent glTexImage() call.
2009-10-23 18:22:41 -06:00
Brian Paul
0acb057ad1 mesa: fix broken _mesa_str_checksum() 2009-10-23 16:36:15 -06:00
Eric Anholt
2d17dbfb53 intel: Keep track of x,y offsets in miptrees and use them for blitting.
By just using offsets, we confused the hardware's tiling calculations,
resulting in failures in miptree validation and blit clears.

Fixes piglit fbo-clearmipmap.

Bug #23552. (automatic mipmap generation)
2009-10-23 14:12:24 -07:00
Brian Paul
b01937a3c9 progs/tests: print requested/internal format info 2009-10-23 14:52:10 -06:00
Brian Paul
96d7d66dff docs: document updated GL extension header files 2009-10-23 14:49:47 -06:00
Brian Paul
5c0dc902e7 gl: updated wglext.h to version 17 2009-10-23 14:49:26 -06:00
Brian Paul
559da98c2b gl: updated glxext.h to version 25 2009-10-23 14:49:26 -06:00
Brian Paul
9df9696f6d gl: updated glext.h to version 56 2009-10-23 14:49:20 -06:00
Brian Paul
ff3f09a7fe docs: document cell, glGetTexLevelParameter() fixes 2009-10-23 14:45:44 -06:00
Brian Paul
cd62b4f00a mesa: fix GL_TEXTURE_INTERNAL_FORMAT query for compressed formats
Need to return the actual compressed format when the user originally
requested a generic compressed format.
2009-10-23 14:45:44 -06:00
Brian Paul
9528dc6ed8 mesa: added _mesa_compressed_format_to_glenum()
Maps a compressed MESA_FORMAT_x to correspding GLenum.  Needed for
querying a texture's actual format when a generic format was originally
requested.
2009-10-23 14:45:44 -06:00
Brian Paul
5e4f5e41a4 mesa: change s3tc vs. fxt1 priority when choosing compressed formats 2009-10-23 14:45:44 -06:00
Ian Romanick
dd24501665 ARB prog parser: Fix parameter array size comparison
Array indexes are invalid when >= the maximum, but array sizes are
only in valid when > the maximum.  This prevented programs from
declaring a single maximum size array.

See the piglit vp-max-array test.
2009-10-22 19:20:15 -07:00
Brian Paul
55058652b8 intel: flush old context before binding new context
Per the GLX spec, when changing rendering contexts, the old context
should first be flushed.
2009-10-22 18:33:26 -06:00
Brian Paul
5e6a6a2719 glx: don't destroy context immediately if it's currently bound
According to the GLXDestroyContext() man page, the context should not
immediately be destroyed if it's bound to some thread.  Wait until it's
unbound to really delete it.  The code for doing the later part is
already present in MakeContextCurrent() so no change was needed there.
2009-10-22 18:20:28 -06:00
Brian Paul
4837e01bcd mesa: code refactoring- new _mesa_finish(), _mesa_flush() 2009-10-22 18:16:10 -06:00
Brian Paul
61a96a2ac7 progs/xdemos: fix command line flag typo 2009-10-22 17:11:59 -06:00
Brian Paul
8810b8f671 i965: fix hacked Fallback usage in brw_prepare_vertices()
Setting intel->Fallback = 1 clobbered any fallback state that was already
set.  Not sure where this hack originated (the git history is a little
convoluted).  Define and use a new BRW_FALLBACK_DRAW bit instead.  This
shouldn't break anything and could potentially fix some bugs (but no
specific ones are known).
2009-10-22 16:52:59 -06:00
Brian Paul
c24466c34e intel: define INTEL_FALLBACK_DRIVER for drivers 2009-10-22 16:52:59 -06:00
Brian Paul
ea659f8917 intel: Fallback field is a bitmask, use GLbitfield 2009-10-22 16:52:59 -06:00
Brian Paul
f9bbbe5803 i965: remove unused brw_context::tmp_fallback field 2009-10-22 16:52:59 -06:00
Brian Paul
2f7abf5c04 i965: remove unused BRW_FALLBACK_TEXTURE bit
The value was probably wrong too.
It was the same as INTEL_FALLBACK_DRAW_BUFFER.
2009-10-22 16:52:59 -06:00
Andre Maasikas
869e20bcb7 r600: set barrier for tex inst if dst is used earlier, might overwrite it otherwise 2009-10-22 09:45:11 +03:00
Andre Maasikas
a88c9296cb r600: need to export something from PS
Also avoids empty shader for "END" - seems to be somewhat valid fp
 Maybe this can be done differently in the future (fake FRAG_RESULT_COLOR
 already in Map_Fragment_Program() or is there a way to program the chip
 to not hang in case of no exports.
2009-10-22 09:44:03 +03:00
Andre Maasikas
b86302283b r600: add beginnings of ARL instruction 2009-10-22 09:42:42 +03:00
Brian Paul
5283a3fb25 progs/trivial: check if GL_ARB_occlusion_query is supported 2009-10-20 16:22:03 -06:00
Marc Dietrich
4b2cf92ad9 cell: fix compilation on cell
s/LERP/LRP/
2009-10-20 11:17:12 -06:00
Vinson Lee
ca940a73a7 mesa: Fix Mac OS build.
strtod_l needs the xlocale.h header on Mac OS. It's possible other
non-Linux OSes would need this header too.
2009-10-20 10:43:49 -06:00
Mathias Fröhlich
16e21191e2 r300: fix texture size handling with size > 2048
The in kernel texture check fails because of both
bit11 flags being set on 16x16 textures. It tuns out
that these bits are still set and not cleared in the
pp_txpitch field of the texture. The attached patch
at least helps for this case on my machine. It clears
the bit 11 from the pitch field if the texture is smaller
and masks out that hight bits on the conventional width
and height field.

Fixes bug 24584
2009-10-19 11:47:21 -04:00
Robert Noland
8123180ea6 r600: Fix size calculation for 24 bit depth
size was being calculated based on 3 bytes per pixel with 24 bit depth
instead of 4 bytes.  This caused corruption in the bottom 25% of objects.
This finishes fixing the menu/text corruption in compiz/kde4.

Signed-off-by: Robert Noland <rnoland@2hip.net>
2009-10-19 11:09:10 -04:00
Maciej Cencora
3594b53c01 r300: fix vertex program parameters limits 2009-10-16 20:21:17 +02:00
Brian Paul
946bc9aa42 docs: document GLSL float parsing bug fix 2009-10-16 07:38:39 -06:00
Brian Paul
89b31c9619 mesa: use C locale for _mesa_strtod()
_mesa_strtod() is used for shader/program parsing where the decimal
point character is always '.'  Use strtod_l() with a "C" locale to
ensure correct string->double conversion when the actual locale uses
another character such as ',' for the decimal point.

Fixes bug 24531.
2009-10-16 07:36:50 -06:00
Owen Taylor
3f30b0709b Use the right pitch when rendering to a texture
We need to get the pitch from the texture level we are rendering to,
rather than just using the base texel width.
2009-10-15 11:33:08 -04:00
Robert Noland
16c6a3b71e r600: FRAG_ATTRIB_WPOS and FRAG_ATTRIB_FOGC appear to be supported.
Report unsupported attributes while I'm here.

Signed-off-by: Robert Noland <rnoland@2hip.net>
2009-10-15 11:29:52 -04:00
Robert Noland
a176b1c5d8 r600: cleanup in r600_cs_process_relocs().
Signed-off-by: Robert Noland <rnoland@2hip.net>
2009-10-15 11:29:45 -04:00
Robert Noland
e5d6450c2c radeon: return EINVAL for 0 length buffers.
Signed-off-by: Robert Noland <rnoland@2hip.net>
2009-10-15 11:29:35 -04:00
Andre Maasikas
22a0029a68 r600: fix tfp1 bo size
Setting the wrong bo size resulting in an incomplete
read cache flush when reading the texture.  This fixes the
compiz text corruption.

[agd5f: take hw pitch alignment into account]
2009-10-15 11:24:49 -04:00
Andre Maasikas
a3fec14101 r600: implement ProgramStringNotify
need this to properly test with piglit/glean vert/fragprog tests
copied mostly from r300, many thanks to osiris, nha, airlied, others...
2009-10-15 11:22:18 -04:00
Andre Maasikas
606becc7f3 r600: LIT dst.y gets value from src.x
seems I overlooked this when removing hardcoded swizzles for this
one previously
2009-10-15 11:21:15 -04:00
Andre Maasikas
74c31e5d05 r600: DPH adds w comp of second operand, so set first one to 1 instead 2009-10-15 11:20:04 -04:00
Andre Maasikas
95851d8cb2 r600: fixup KIL instruction a bit
- KILLGT takes 2 arguments
- arb KIL has no dst register
- add TODO about clause ending but currently piglit fp-kil passes and
  does not hang the card
2009-10-15 11:18:53 -04:00
Andre Maasikas
bf68e54a4d r600: use CB_TARGET_MASK instead of CB_SHADER_MASK for setting color mask
makes blend functions work better

Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-10-15 11:17:09 -04:00
Andre Maasikas
5101215a64 r600: user correct alpha blend factor
Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-10-15 11:16:53 -04:00
Andre Maasikas
f7285bdffc r600: clear position enable bit when when wpos is not used by FP
Makes doom3 alot nicer..
2009-10-15 11:16:41 -04:00
Brian Paul
6f8b4d9e36 mesa: regenerated lex.yy.c w/ _mesa_strtod() 2009-10-15 08:59:13 -06:00
Neil Roberts
269f16cd96 mesa: Use _mesa_strtod in the lexer for assembly shaders
See bug 24531.
2009-10-15 08:57:07 -06:00
Brian Paul
31f7e8efb2 progs/Makefile: remove extra quoting
This reverts part of commit 115edf24a9 and
fixes the error: "/bin/sh: line 0: test: too many arguments".
2009-10-14 09:37:53 -06:00
Tom Fogal
115edf24a9 Fix build when PROGRAM_DIRS is empty.
SUBDIRS just takes PROGRAM_DIRS value.  If PROGRAM_DIRS gets set
to the empty string (as can happen when building only OSMesa), a
'for' loop will lack anything to iterate over, causing a parse
error.

This fixes the issue by making sure SUBDIRS is the null string
when PROGRAM_DIRS is, and wrapping the for loops in if's, causing
them only to execute if there are directories to iterate over.
2009-10-13 16:22:09 -06:00
Tom Fogal
9282edfaa0 ac: Fix AIX shared library builds.
AIX uses ".a" for both static and shared library extensions.
2009-10-13 16:22:06 -06:00
Eric Anholt
f3be27c0cf i965: Fix the last valid address setting for the index buffer.
Again, last valid address, not first invalid address.  Fixes regression
in 255e5be265 that the kernel now catches
and caused piglit draw_elements_base_vertex to fail.
2009-10-11 11:21:03 -07:00
Eric Anholt
a82da7fa26 i965: Fix the bounds emitted in the vertex buffer packets.
It's the address of the last valid byte, not the address of the first
invalid byte.

This should also fix problems with rendering with the new sanity checks in
the kernel.
2009-10-11 11:21:03 -07:00
Brian Paul
768481ed40 softpipe: revert 564df9dc5f
This change silenced valgrind warnings but broke progs/tests/drawbuffers.
The problem is we don't know the surface's state when we start caching it
(it may or may not be initialized/cleared/etc).  So "clearing" it here was
presumptuous.  Leaving the code in place (but disabled) for reference and
when using valgrind.

Fixes bug 24401
2009-10-10 09:18:14 -06:00
Alex Deucher
194ede4bf9 radeon: fix scissor regression
fixes fdo bug 24248
2009-10-09 15:44:32 -04:00
Brian Paul
2738681e84 docs: fix aux buffer bug 24426 2009-10-09 13:23:07 -06:00
Brian Paul
6164f1fe79 st/mesa: create aux buffers according to visual
Fixes bug 24426 for gallium.
2009-10-09 13:22:15 -06:00
Brian Paul
ce64e063a8 mesa: fix incorrect assertion in _mesa_add_aux_renderbuffers()
Fixes bug 24426.
2009-10-09 13:22:00 -06:00
Brian Paul
f7fb30f03b mesa: regenerated gl_mangle.h file 2009-10-08 09:19:42 -06:00
Brian Paul
ee3fbe7067 gallium/xlib: call XQueryExtension() in glXQueryExtension()
See bug 24321.
2009-10-07 14:43:27 -06:00
Brian Paul
9f002e4aaa mesa/xlib: call XQueryExtension() in glXQueryExtension()
See bug 24321.
2009-10-07 14:42:16 -06:00
Brian Paul
7dd2c0afd6 mesa: don't need to free textures, VBOs, etc. in _mesa_meta_free()
They're freed by the normal context deallocation code.
Fixes Blender crash, bug 24185.
2009-10-07 14:07:49 -06:00
Nicolai Hähnle
9fde81bb20 shader_api: Fix bounds checking of glUniform and glUniformMatrix
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2009-10-07 20:36:23 +02:00
Nicolai Hähnle
ae351599f1 prog_parameter: Document the fact that Size may be > 4
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-10-07 20:33:55 +02:00
Brian Paul
cdcd9da480 docs: fix glXQueryDrawable() bugs 2009-10-07 09:41:38 -06:00
Brian Paul
c3eef6021a mesa/xlib: fix glXQueryDrawable() bugs, see bug 24320 2009-10-07 09:41:38 -06:00
Brian Paul
0526100a5c gallium/xlib: fix glXQueryDrawable() bugs, see bug 24320 2009-10-07 09:41:38 -06:00
Brian Paul
f36425b569 progs/xdemos: test glXQueryDrawable() 2009-10-07 09:41:38 -06:00
Brian Paul
846a6b0695 progs/xdemos: fix swapped parameters to CreatePbuffer() 2009-10-07 09:41:38 -06:00
Brian Paul
edbaa717b4 swrast: s/GLfloat/GLuint/ in bzero() 2009-10-07 08:07:53 -06:00
Brian Paul
14f21c7850 swrast: add missing returns 2009-10-07 08:05:28 -06:00
Vinson Lee
4b3cbecb3a progs/test: Fix MSVC build. 2009-10-07 07:54:31 -06:00
Brian Paul
e3fff3daf0 mesa/xlib: return 0 for errorBase, eventBase in glXQueryExtension()
A little better than leaving the values undefined, I think.
See bug 24321.
2009-10-07 07:45:59 -06:00
Brian Paul
f9904edf53 gallium/xlib: return 0 for errorBase, eventBase in glXQueryExtension()
A little better than leaving the values undefined, I think.
See bug 24321.
2009-10-07 07:45:59 -06:00
Brian Paul
79892e7976 intel: use driReadDrawable in do_copy_texsubimage() 2009-10-05 14:26:16 -06:00
Brian Paul
3b7ec94c0d intel: use driReadDrawable, not driDrawable in do_blit_readpixels() 2009-10-05 14:25:36 -06:00
Brian Paul
3b29dcbb5e intel: remove a buffer equality test in _mesa_make_current()
Before, if we called glXMakeCurrent() to change a context's window binding
while an FBO was bound, we weren't updating the intel->driDrawable and
intel->driReadDrawable fields.  This could cause us to dereference a null
pointer elsewhere.
2009-10-05 14:07:29 -06:00
Brian Paul
a8768bbc9d mesa: fix return value when clipping {Read,Draw}Pixels height <= 0
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>

(cherry picked from master, commit 7aeaca33c3)
2009-10-05 11:10:31 -06:00
Jon TURNEY
a15d9ca9cc Fix building of GLSL demos which use M_PI
Some <math.h> files do not define M_PI, in which case, provide our own definition

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-10-05 11:07:23 -06:00
Michel Dänzer
43750f1575 Use _mesa_select_tex_image() rather than hardcoding face 0.
Fixes crash loading a map in sauerbraten with

hwmipmap 1

in ~/.sauerbraten/config.cfg.
2009-10-05 12:31:51 +02:00
Frederic Crozat
3856c3cc46 r200: remove subpixel offset from viewport
Fixes bug fdo 20340 for r200.
2009-10-04 17:50:16 -04:00
Nicolai Hähnle
bbe384c86a r300: Workaround problem on R500 with very large fragment programs
The non-KMS interface is to blame here. In theory, a proper fix
could be produced that works for the KMS interface only, but it
require cleaning a lot of mess. Easier to just do it right in r300g.

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-10-03 01:39:13 +02:00
Brian Paul
c01a77d304 docs: document default texture binding fix 2009-10-02 09:58:16 -06:00
Brian Paul
e1bddd159f mesa: fix incorrect default texture binding in unbind_texobj_from_texunits()
If we deleted a currently bound texture, we were always reverting the texture
binding to the default 1D texture rather than the proper default texture.
2009-10-02 09:57:00 -06:00
Brian Paul
85ee0ef9a7 gallium/xlib: use bitwise-and to test GLX_RGBA_BIT in choose_visual()
The parameter is a bitmask.
2009-10-02 07:52:29 -06:00
Brian Paul
584b0879ac xlib: use bitwise-and to test GLX_RGBA_BIT in choose_visual()
The parameter is a bitmask.
2009-10-02 07:51:19 -06:00
Brian Paul
abc12d0636 gallium/xlib: return GLX_RGBA_BIT or GLX_COLOR_INDEX_BIT in get_config()
This reverts part of commit a6b84aef4a
2009-10-02 07:47:49 -06:00
Brian Paul
389021220d gallium: replace // comments with /* */ 2009-10-02 07:31:42 -06:00
Brian Paul
337480e1f8 gallium: remove // comment and extra whitespace 2009-10-02 07:26:28 -06:00
Brian Paul
167ffa9e03 mesa: fix memory leak when generating mipmaps for compressed textures 2009-10-01 14:55:13 -06:00
Brian Paul
0574954238 mesa: fix mem leaks 2009-10-01 14:52:28 -06:00
Brian Paul
0f291f2efe gallium/util: silence uninitialized var warning 2009-10-01 14:52:10 -06:00
Brian Paul
63064cf7c3 mesa: add missing return when out of memory 2009-10-01 14:51:43 -06:00
Brian Paul
7b568614a2 mesa: fix potential uninitialized memory reads 2009-10-01 14:51:26 -06:00
Brian Paul
9b27a0d063 glsl: fix mem leak 2009-10-01 14:50:45 -06:00
Brian Paul
b3e41e0d5e st/mesa: check for null before asserts, fix possible mem leak 2009-10-01 14:49:39 -06:00
Brian Paul
b154497bef st/mesa: silence hidden parameter warning 2009-10-01 14:49:04 -06:00
Brian Paul
495628bc5c st/mesa: fix non-mipmap lastLevel calculation.
reviewed by Brian Paul.
(cherry picked from master, commit ae2daacbac)
2009-10-01 13:34:49 -06:00
Vinson Lee
18883cdf23 mesa: Return -FLT_MAX instead of 0 for LG2(0).
lim x->0 log(x) = -inf so -FLT_MAX is a better approximation than 0
for LG2(0).
2009-10-01 13:33:20 -06:00
Brian Paul
521e4b9b7e glx: fix glXQueryContext(GLX_RENDER_TYPE)
The renderType parameter to CreateContext() was never used.  Also, it
was often passed as zero.  Now when it's zero we check if the context
is RGBA or CI mode and set it accordingly.

Fixes bug 24211.
2009-09-30 15:15:10 -06:00
Eric Anholt
49fbdd18ed i965: Fix massive memory allocation for streaming texture usage.
Once we've freed a miptree, we won't see any more state cache requests
that would hit the things that pointed at it until we've let the miptree
get released back into the BO cache to be reused.  By leaving those
surface state and binding table pointers that pointed at it around, we
would end up with up to (500 * texture size) in memory uselessly consumed
by the state cache.

Bug #20057
Bug #23530
2009-09-30 11:27:27 -07:00
Brian Paul
b77469871a docs: document GLSL sqrt(0) fix 2009-09-29 19:05:04 -06:00
Brian Paul
322bc403bc glsl: regenerated file 2009-09-29 18:59:37 -06:00
Brian Paul
65765c9f2c glsl: rewrite sqrt(x) intrinsic to handle x=0
Since sqrt() is basically implemented in terms of RSQ/RCP we'll do a
divide by zero if x=0 and wind up with unpredictable results.
Now use CMP instruction to test for x<=0 and return zero in that case.
2009-09-29 18:57:13 -06:00
Brian Paul
3c794e45b0 glsl: add support for CMP instruction 2009-09-29 18:51:49 -06:00
Brian Paul
5f1faf4a21 docs: fixed glXQueryContext(GLX_RENDER_TYPE) 2009-09-29 12:18:41 -06:00
Brian Paul
a6b84aef4a gallium/xlib: fix GLX_RENDER_TYPE query
Return GLX_RGBA_TYPE or GLX_COLOR_INDEX_TYPE.
2009-09-29 12:17:20 -06:00
Brian Paul
86ee448047 mesa/xlib: fix GLX_RENDER_TYPE query
Return GLX_RGBA_TYPE or GLX_COLOR_INDEX_TYPE.
2009-09-29 12:16:20 -06:00
Brian Paul
ef9cd84521 glx: indentation fixes 2009-09-29 09:58:47 -06:00
Brian Paul
69a3043f41 mesa: bump version to 7.6.1 2009-09-29 09:36:06 -06:00
Brian Paul
2d400d43bf docs: initial 7.6.1 release notes 2009-09-29 09:34:47 -06:00
Brian Paul
9b5541617f mesa: work-around glXCopyContext() bug in _mesa_copy_texture_state()
See bug 24217.
2009-09-29 09:32:40 -06:00
Brian Paul
564df9dc5f softpipe: initialize the clear_flags bitvector in sp_create_tile_cache()
This silences tons of valgrind warnings in programs that don't call
glClear(), such as progs/demos/gamma.
2009-09-29 08:51:00 -06:00
Brian Paul
fbddc75aa2 softpipe: Grab a ref when the fb is set.
Nasty bug when the surface is freed and another is allocated right on
top of it. The next time we set the fb state SP thinks it's the same
surface and doesn't flush, and when the flush eventually happens the
surface belongs to a completely different texture.

(cherry picked from commit a77226071f)

Conflicts:
	src/gallium/drivers/softpipe/sp_context.c
2009-09-29 08:21:54 -06:00
Brian Paul
6829ef7460 docs: update news.html file with 7.5.2 and 7.6 release 2009-09-28 13:20:15 -06:00
Ian Romanick
d39fd9f641 Merge branch 'mesa_7_5_branch' into mesa_7_6_branch
Conflicts:
	src/mesa/main/version.h
2009-09-28 12:02:39 -07:00
Ian Romanick
18f3afbe88 docs: 7.5.2 md5 sums 2009-09-28 11:41:23 -07:00
Ian Romanick
b807d49f18 Prep for 7.5.2 release 2009-09-28 11:33:52 -07:00
510 changed files with 4628 additions and 3209 deletions

View File

@@ -182,7 +182,7 @@ ultrix-gcc:
# Rules for making release tarballs
VERSION=7.6
VERSION=7.6.1
DIRECTORY = Mesa-$(VERSION)
LIB_NAME = MesaLib-$(VERSION)
DEMO_NAME = MesaDemos-$(VERSION)
@@ -433,8 +433,7 @@ DEMO_FILES = \
$(DIRECTORY)/progs/windml/Makefile.ugl \
$(DIRECTORY)/progs/windml/*.c \
$(DIRECTORY)/progs/windml/*.bmp \
$(DIRECTORY)/progs/ggi/*.c \
$(DIRECTORY)/windows/VC7/progs/progs.sln
$(DIRECTORY)/progs/ggi/*.c
GLUT_FILES = \
$(DIRECTORY)/include/GL/glut.h \
@@ -457,9 +456,7 @@ GLUT_FILES = \
$(DIRECTORY)/src/glut/mini/glut.pc.in \
$(DIRECTORY)/src/glut/directfb/Makefile \
$(DIRECTORY)/src/glut/directfb/NOTES \
$(DIRECTORY)/src/glut/directfb/*[ch] \
$(DIRECTORY)/windows/VC6/progs/glut/glut.dsp \
$(DIRECTORY)/windows/VC7/progs/glut/glut.vcproj
$(DIRECTORY)/src/glut/directfb/*[ch]
DEPEND_FILES = \
$(TOP)/src/mesa/depend \

View File

@@ -724,22 +724,10 @@ case $ARCH in
# examine first object to determine ABI
set ${OBJECTS}
ABI_PPC=`file $1 | grep ' ppc'`
ABI_I386=`file $1 | grep ' i386'`
ABI_PPC64=`file $1 | grep ' ppc64'`
ABI_X86_64=`file $1 | grep ' x86_64'`
if [ "${ABI_PPC}" ] ; then
OPTS="${OPTS} -arch ppc"
fi
if [ "${ABI_I386}" ] ; then
OPTS="${OPTS} -arch i386"
fi
if [ "${ABI_PPC64}" ] ; then
OPTS="${OPTS} -arch ppc64"
fi
if [ "${ABI_X86_64}" ] ; then
OPTS="${OPTS} -arch x86_64"
fi
ABIS=`lipo -info $1 | sed s/.*://`
for ABI in $ABIS; do
OPTS="${OPTS} -arch ${ABI}"
done
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}

View File

@@ -59,7 +59,7 @@ def AddOptions(opts):
opts.Add(EnumOption('machine', 'use machine-specific assembly code', default_machine,
allowed_values=('generic', 'ppc', 'x86', 'x86_64')))
opts.Add(EnumOption('platform', 'target platform', default_platform,
allowed_values=('linux', 'cell', 'windows', 'winddk', 'wince')))
allowed_values=('linux', 'cell', 'windows', 'winddk', 'wince', 'darwin')))
opts.Add(EnumOption('toolchain', 'compiler toolchain', 'default',
allowed_values=('default', 'crossmingw', 'winsdk', 'winddk')))
opts.Add(BoolOption('llvm', 'use LLVM', 'no'))

View File

@@ -124,7 +124,7 @@ INSTALL_INC_DIR = $(includedir)
DRI_DRIVER_INSTALL_DIR = @DRI_DRIVER_INSTALL_DIR@
# Where libGL will look for DRI hardware drivers
DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
DRI_DRIVER_SEARCH_DIR = @DRI_DRIVER_SEARCH_DIR@
# Xorg driver install directory (for xorg state-tracker)
XORG_DRIVER_INSTALL_DIR = @XORG_DRIVER_INSTALL_DIR@

View File

@@ -12,10 +12,10 @@ X11_DIR = $(INSTALL_DIR)
CC = gcc
CXX = g++
PIC_FLAGS = -fPIC
DEFINES = -D_DARWIN_C_SOURCE -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L \
-D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -DPTHREADS \
DEFINES = -D_DARWIN_C_SOURCE -DPTHREADS -D_GNU_SOURCE \
-DGLX_ALIAS_UNSUPPORTED -DGLX_INDIRECT_RENDERING
# -D_GNU_SOURCE - for src/mesa/main ...
# -DGLX_DIRECT_RENDERING - pulls in libdrm stuff in glx/x11
# -DGLX_USE_APPLEGL - supposed to be used with GLX_DIRECT_RENDERING to use AGL rather than DRM, but doesn't compile
# -DIN_DRI_DRIVER

View File

@@ -10,7 +10,7 @@ CONFIG_NAME = default
# Version info
MESA_MAJOR=7
MESA_MINOR=6
MESA_TINY=0
MESA_TINY=1
MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
# external projects. This should be useless now that we use libdrm.

View File

@@ -19,6 +19,7 @@ AC_CANONICAL_HOST
dnl Versions for external dependencies
LIBDRM_REQUIRED=2.4.3
LIBDRM_RADEON_REQUIRED=2.4.17
DRI2PROTO_REQUIRED=1.99.3
dnl Check for progs
@@ -230,6 +231,8 @@ else
LIB_EXTENSION='dylib' ;;
cygwin* )
LIB_EXTENSION='dll' ;;
aix* )
LIB_EXTENSION='a' ;;
* )
LIB_EXTENSION='so' ;;
esac
@@ -575,7 +578,7 @@ dri)
GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED"
DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED"
PKG_CHECK_MODULES([LIBDRM_RADEON], [libdrm_radeon], HAVE_LIBDRM_RADEON=yes, HAVE_LIBDRM_RADEON=no)
PKG_CHECK_MODULES([LIBDRM_RADEON], [libdrm_radeon libdrm >= $LIBDRM_RADEON_REQUIRED], HAVE_LIBDRM_RADEON=yes, HAVE_LIBDRM_RADEON=no)
if test "$HAVE_LIBDRM_RADEON" = yes; then
RADEON_CFLAGS="-DHAVE_LIBDRM_RADEON=1 $LIBDRM_RADEON_CFLAGS"
@@ -647,6 +650,13 @@ AC_ARG_WITH([dri-driverdir],
[DRI_DRIVER_INSTALL_DIR="$withval"],
[DRI_DRIVER_INSTALL_DIR='${libdir}/dri'])
AC_SUBST([DRI_DRIVER_INSTALL_DIR])
dnl Extra search path for DRI drivers
AC_ARG_WITH([dri-searchpath],
[AS_HELP_STRING([--with-dri-searchpath=DIRS...],
[semicolon delimited DRI driver search directories @<:@${libdir}/dri@:>@])],
[DRI_DRIVER_SEARCH_DIR="$withval"],
[DRI_DRIVER_SEARCH_DIR='${DRI_DRIVER_INSTALL_DIR}'])
AC_SUBST([DRI_DRIVER_SEARCH_DIR])
dnl Direct rendering or just indirect rendering
AC_ARG_ENABLE([driglx-direct],
[AS_HELP_STRING([--disable-driglx-direct],
@@ -1148,6 +1158,11 @@ yes)
if test "$tracker" = egl && test "x$enable_egl" != xyes; then
AC_MSG_ERROR([cannot build egl state tracker without EGL library])
fi
if test "$tracker" = xorg; then
PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
HAVE_XEXTPROTO_71="yes"; DEFINES="$DEFINES -DHAVE_XEXTPROTO_71",
HAVE_XEXTPROTO_71="no")
fi
done
GALLIUM_STATE_TRACKERS_DIRS="$state_trackers"
;;

View File

@@ -27,12 +27,6 @@ using the SDK with Visual Studio Express can be found at
http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
If you are stuck using VC6 or VC7, you may start with these project
files, but you may need to modify them to reflect changes in the
Mesa source code tree. If you sucessfully update the project files,
please submit them to the author of this document so that they may
be included in the next distribution.
The project files to build the core Mesa library, Windows Mesa
drivers, OSMesa, and GLU are in the mesa directory. The project files
to build GLUT and some demo programs are in the progs directory.
@@ -106,23 +100,6 @@ should build all the demos.
Build System Notes
----- ------ -----
VC6 (not actively supported)
---
Visual Studio 6 does not recognize files with the .cc extension as C++
language files, without a lot of unnatural tweaking. So, the VC6
build process uses custom build steps to compile these files in the
GLU library.
Two additional configurations are provided, Debug x86 and Release x86
that activate the shader code compilation by defining SLANG_86. It is
unknown if and how this works.
VC7 (not actively supported)
---
The above-mentioned .cc problem does not exist in this version.
VC8
---

View File

@@ -10,6 +10,24 @@
<H1>News</H1>
<h2>November XX, 2009</h2>
<p>
<a href="relnotes-7.6.1.html">Mesa 7.6.1</a> is released. This is a bug-fix
release fixing issues found in the 7.6 release.
</p>
<h2>September 28, 2009</h2>
<p>
<a href="relnotes-7.6.html">Mesa 7.6</a> is released. This is a new feature
release. Those especially concerned about stability may want to wait for the
follow-on 7.6.1 bug-fix release.
</p>
<p>
<a href="relnotes-7.5.2.html">Mesa 7.5.2</a> is also released.
This is a stable release fixing bugs since the 7.5.1 release.
</p>
<h2>September 3, 2009</h2>
<p>

View File

@@ -8,7 +8,7 @@
<body bgcolor="#eeeeee">
<H1>Mesa 7.5.2 Release Notes, (date tbd)</H1>
<H1>Mesa 7.5.2 Release Notes, 28 September 2009</H1>
<p>
Mesa 7.5.2 is a bug-fix release fixing issues found since the 7.5.1 release.
@@ -31,7 +31,15 @@ for DRI hardware acceleration.
<h2>MD5 checksums</h2>
<pre>
tbd
43a90191dd9f76cd65dcc1ac91f3be70 MesaLib-7.5.2.tar.gz
94e47a499f1226803869c2e37a6a8e3a MesaLib-7.5.2.tar.bz2
1ecb822b567ad67a0617361d45206b67 MesaLib-7.5.2.zip
2718fdce7e075911d6147beb8f27104b MesaDemos-7.5.2.tar.gz
4e0f5ccd58afe21eddcd94327d926e86 MesaDemos-7.5.2.tar.bz2
f621f8c223b278d7c8e49a012d56ca25 MesaDemos-7.5.2.zip
83c16c1d6bcfcc3f97aab5d2fe430b4c MesaGLUT-7.5.2.tar.gz
e5d03bedae369ea3705783573bb33813 MesaGLUT-7.5.2.tar.bz2
e82ba28e00d653e6f437d32be8ca8481 MesaGLUT-7.5.2.zip
</pre>
@@ -55,6 +63,5 @@ tbd
when using Gallium.
</ul>
</body>
</html>

72
docs/relnotes-7.6.1.html Normal file
View File

@@ -0,0 +1,72 @@
<HTML>
<TITLE>Mesa Release Notes</TITLE>
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<body bgcolor="#eeeeee">
<H1>Mesa 7.6.1 Release Notes, (date tbd)</H1>
<p>
Mesa 7.6.1 is a bug-fix release fixing issues since version 7.6.
</p>
<p>
Mesa 7.6.1 implements the OpenGL 2.1 API, but the version reported by
glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
<h2>MD5 checksums</h2>
<pre>
tbd
</pre>
<h2>New features</h2>
<ul>
<li>Upgraded GL/glext.h to version 56, GL/glxext.h to version 25,
GL/wglext.h to version 17
<li>New 3D driver, r600, for Radeon R6xx, R7xx hardware
</ul>
<h2>Bug fixes</h2>
<ul>
<li>Fixed crash caused by glXCopyContext() and glXDestroyContext(), bug 24217
<li>glXQueryContext(GLX_RENDER_TYPE) returned wrong values (bug 24211)
<li>GLSL sqrt(0) returned unpredictable results
<li>Fixed default texture binding bug when a bound texture was deleted.
<li>r300: Work around an issue with very large fragment programs on R500.
<li>Fake glXQueryDrawable() didn't return good values (bug 24320)
<li>Fixed AUX buffer breakage (bug 24426).
<li>Fixed locale-dependent float parsing bug in GLSL compiler (bug 24531)
<li>Fixed Gallium Cell driver compilation failure.
<li>Fixed glGetTexLevelParameter(GL_TEXTURE_INTERNAL_FORMAT) query so that
it returns the actual compressed format chosen.
<li>Fixed glBitmap bugs in Intel drivers.
<li>Fixed a number of Microsoft Visual Studio compilation problems.
<li>Fixed clipping / provoking vertex bugs in i965 driver.
<li>Assorted build fixes for AIX.
<li>Endianness fixes for the DRI swrast driver (bug 22767).</li>
<li>Point sprite fixes for i915/945 driver.
<li>Fixed assorted memory leaks (usually on error paths)
<li>Fixed some GLSL compiler bugs (ex: 25579)
<li>Assorted build fixes for BlueGene
</ul>
<h2>Changes</h2>
<ul>
<li>Removed old VC6, VC7 project files for Windows
</ul>
</body>
</html>

View File

@@ -13,6 +13,7 @@ The release notes summarize what's new or changed in each Mesa release.
</p>
<UL>
<LI><A HREF="relnotes-7.6.1.html">7.6.1 release notes</A>
<LI><A HREF="relnotes-7.6.html">7.6 release notes</A>
<LI><A HREF="relnotes-7.5.2.html">7.5.2 release notes</A>
<LI><A HREF="relnotes-7.5.1.html">7.5.1 release notes</A>

View File

@@ -108,12 +108,20 @@
#define glBlendColorEXT MANGLE(BlendColorEXT)
#define glBlendColor MANGLE(BlendColor)
#define glBlendEquationEXT MANGLE(BlendEquationEXT)
#define glBlendEquationi MANGLE(BlendEquationi)
#define glBlendEquationIndexedAMD MANGLE(BlendEquationIndexedAMD)
#define glBlendEquation MANGLE(BlendEquation)
#define glBlendEquationSeparateATI MANGLE(BlendEquationSeparateATI)
#define glBlendEquationSeparateEXT MANGLE(BlendEquationSeparateEXT)
#define glBlendEquationSeparatei MANGLE(BlendEquationSeparatei)
#define glBlendEquationSeparateIndexedAMD MANGLE(BlendEquationSeparateIndexedAMD)
#define glBlendEquationSeparate MANGLE(BlendEquationSeparate)
#define glBlendFunci MANGLE(BlendFunci)
#define glBlendFuncIndexedAMD MANGLE(BlendFuncIndexedAMD)
#define glBlendFunc MANGLE(BlendFunc)
#define glBlendFuncSeparateEXT MANGLE(BlendFuncSeparateEXT)
#define glBlendFuncSeparatei MANGLE(BlendFuncSeparatei)
#define glBlendFuncSeparateIndexedAMD MANGLE(BlendFuncSeparateIndexedAMD)
#define glBlendFuncSeparateINGR MANGLE(BlendFuncSeparateINGR)
#define glBlendFuncSeparate MANGLE(BlendFuncSeparate)
#define glBlitFramebufferEXT MANGLE(BlitFramebufferEXT)
@@ -148,6 +156,7 @@
#define glClientActiveTexture MANGLE(ClientActiveTexture)
#define glClientActiveVertexStreamATI MANGLE(ClientActiveVertexStreamATI)
#define glClientAttribDefaultEXT MANGLE(ClientAttribDefaultEXT)
#define glClientWaitSync MANGLE(ClientWaitSync)
#define glClipPlane MANGLE(ClipPlane)
#define glColor3b MANGLE(Color3b)
#define glColor3bv MANGLE(Color3bv)
@@ -320,6 +329,7 @@
#define glDeleteRenderbuffersEXT MANGLE(DeleteRenderbuffersEXT)
#define glDeleteRenderbuffers MANGLE(DeleteRenderbuffers)
#define glDeleteShader MANGLE(DeleteShader)
#define glDeleteSync MANGLE(DeleteSync)
#define glDeleteTexturesEXT MANGLE(DeleteTexturesEXT)
#define glDeleteTextures MANGLE(DeleteTextures)
#define glDeleteTransformFeedbacksNV MANGLE(DeleteTransformFeedbacksNV)
@@ -341,6 +351,7 @@
#define glDisableIndexedEXT MANGLE(DisableIndexedEXT)
#define glDisable MANGLE(Disable)
#define glDisableVariantClientStateEXT MANGLE(DisableVariantClientStateEXT)
#define glDisableVertexAttribAPPLE MANGLE(DisableVertexAttribAPPLE)
#define glDisableVertexAttribArrayARB MANGLE(DisableVertexAttribArrayARB)
#define glDisableVertexAttribArray MANGLE(DisableVertexAttribArray)
#define glDrawArraysEXT MANGLE(DrawArraysEXT)
@@ -354,7 +365,9 @@
#define glDrawBuffers MANGLE(DrawBuffers)
#define glDrawElementArrayAPPLE MANGLE(DrawElementArrayAPPLE)
#define glDrawElementArrayATI MANGLE(DrawElementArrayATI)
#define glDrawElementsBaseVertex MANGLE(DrawElementsBaseVertex)
#define glDrawElementsInstancedARB MANGLE(DrawElementsInstancedARB)
#define glDrawElementsInstancedBaseVertex MANGLE(DrawElementsInstancedBaseVertex)
#define glDrawElementsInstancedEXT MANGLE(DrawElementsInstancedEXT)
#define glDrawElementsInstanced MANGLE(DrawElementsInstanced)
#define glDrawElements MANGLE(DrawElements)
@@ -362,6 +375,7 @@
#define glDrawPixels MANGLE(DrawPixels)
#define glDrawRangeElementArrayAPPLE MANGLE(DrawRangeElementArrayAPPLE)
#define glDrawRangeElementArrayATI MANGLE(DrawRangeElementArrayATI)
#define glDrawRangeElementsBaseVertex MANGLE(DrawRangeElementsBaseVertex)
#define glDrawRangeElementsEXT MANGLE(DrawRangeElementsEXT)
#define glDrawRangeElements MANGLE(DrawRangeElements)
#define glDrawTransformFeedbackNV MANGLE(DrawTransformFeedbackNV)
@@ -378,6 +392,7 @@
#define glEnableIndexedEXT MANGLE(EnableIndexedEXT)
#define glEnable MANGLE(Enable)
#define glEnableVariantClientStateEXT MANGLE(EnableVariantClientStateEXT)
#define glEnableVertexAttribAPPLE MANGLE(EnableVertexAttribAPPLE)
#define glEnableVertexAttribArrayARB MANGLE(EnableVertexAttribArrayARB)
#define glEnableVertexAttribArray MANGLE(EnableVertexAttribArray)
#define glEndConditionalRender MANGLE(EndConditionalRender)
@@ -409,6 +424,7 @@
#define glExecuteProgramNV MANGLE(ExecuteProgramNV)
#define glExtractComponentEXT MANGLE(ExtractComponentEXT)
#define glFeedbackBuffer MANGLE(FeedbackBuffer)
#define glFenceSync MANGLE(FenceSync)
#define glFinalCombinerInputNV MANGLE(FinalCombinerInputNV)
#define glFinishAsyncSGIX MANGLE(FinishAsyncSGIX)
#define glFinishFenceAPPLE MANGLE(FinishFenceAPPLE)
@@ -469,9 +485,11 @@
#define glFramebufferTextureEXT MANGLE(FramebufferTextureEXT)
#define glFramebufferTextureFaceARB MANGLE(FramebufferTextureFaceARB)
#define glFramebufferTextureFaceEXT MANGLE(FramebufferTextureFaceEXT)
#define glFramebufferTextureFace MANGLE(FramebufferTextureFace)
#define glFramebufferTextureLayerARB MANGLE(FramebufferTextureLayerARB)
#define glFramebufferTextureLayerEXT MANGLE(FramebufferTextureLayerEXT)
#define glFramebufferTextureLayer MANGLE(FramebufferTextureLayer)
#define glFramebufferTexture MANGLE(FramebufferTexture)
#define glFrameTerminatorGREMEDY MANGLE(FrameTerminatorGREMEDY)
#define glFrameZoomSGIX MANGLE(FrameZoomSGIX)
#define glFreeObjectBufferATI MANGLE(FreeObjectBufferATI)
@@ -523,6 +541,7 @@
#define glGetBooleanIndexedvEXT MANGLE(GetBooleanIndexedvEXT)
#define glGetBooleani_v MANGLE(GetBooleani_v)
#define glGetBooleanv MANGLE(GetBooleanv)
#define glGetBufferParameteri64v MANGLE(GetBufferParameteri64v)
#define glGetBufferParameterivARB MANGLE(GetBufferParameterivARB)
#define glGetBufferParameteriv MANGLE(GetBufferParameteriv)
#define glGetBufferPointervARB MANGLE(GetBufferPointervARB)
@@ -586,6 +605,8 @@
#define glGetImageTransformParameterivHP MANGLE(GetImageTransformParameterivHP)
#define glGetInfoLogARB MANGLE(GetInfoLogARB)
#define glGetInstrumentsSGIX MANGLE(GetInstrumentsSGIX)
#define glGetInteger64i_v MANGLE(GetInteger64i_v)
#define glGetInteger64v MANGLE(GetInteger64v)
#define glGetIntegerIndexedvEXT MANGLE(GetIntegerIndexedvEXT)
#define glGetIntegeri_v MANGLE(GetIntegeri_v)
#define glGetIntegerv MANGLE(GetIntegerv)
@@ -615,6 +636,7 @@
#define glGetMinmaxParameterfv MANGLE(GetMinmaxParameterfv)
#define glGetMinmaxParameterivEXT MANGLE(GetMinmaxParameterivEXT)
#define glGetMinmaxParameteriv MANGLE(GetMinmaxParameteriv)
#define glGetMultisamplefv MANGLE(GetMultisamplefv)
#define glGetMultisamplefvNV MANGLE(GetMultisamplefvNV)
#define glGetMultiTexEnvfvEXT MANGLE(GetMultiTexEnvfvEXT)
#define glGetMultiTexEnvivEXT MANGLE(GetMultiTexEnvivEXT)
@@ -642,6 +664,7 @@
#define glGetObjectBufferfvATI MANGLE(GetObjectBufferfvATI)
#define glGetObjectBufferivATI MANGLE(GetObjectBufferivATI)
#define glGetObjectParameterfvARB MANGLE(GetObjectParameterfvARB)
#define glGetObjectParameterivAPPLE MANGLE(GetObjectParameterivAPPLE)
#define glGetObjectParameterivARB MANGLE(GetObjectParameterivARB)
#define glGetOcclusionQueryivNV MANGLE(GetOcclusionQueryivNV)
#define glGetOcclusionQueryuivNV MANGLE(GetOcclusionQueryuivNV)
@@ -698,6 +721,7 @@
#define glGetSharpenTexFuncSGIS MANGLE(GetSharpenTexFuncSGIS)
#define glGetStringi MANGLE(GetStringi)
#define glGetString MANGLE(GetString)
#define glGetSynciv MANGLE(GetSynciv)
#define glGetTexBumpParameterfvATI MANGLE(GetTexBumpParameterfvATI)
#define glGetTexBumpParameterivATI MANGLE(GetTexBumpParameterivATI)
#define glGetTexEnvfv MANGLE(GetTexEnvfv)
@@ -715,6 +739,7 @@
#define glGetTexParameterIuivEXT MANGLE(GetTexParameterIuivEXT)
#define glGetTexParameterIuiv MANGLE(GetTexParameterIuiv)
#define glGetTexParameteriv MANGLE(GetTexParameteriv)
#define glGetTexParameterPointervAPPLE MANGLE(GetTexParameterPointervAPPLE)
#define glGetTextureImageEXT MANGLE(GetTextureImageEXT)
#define glGetTextureLevelParameterfvEXT MANGLE(GetTextureLevelParameterfvEXT)
#define glGetTextureLevelParameterivEXT MANGLE(GetTextureLevelParameterivEXT)
@@ -825,12 +850,14 @@
#define glIsRenderbufferEXT MANGLE(IsRenderbufferEXT)
#define glIsRenderbuffer MANGLE(IsRenderbuffer)
#define glIsShader MANGLE(IsShader)
#define glIsSync MANGLE(IsSync)
#define glIsTextureEXT MANGLE(IsTextureEXT)
#define glIsTexture MANGLE(IsTexture)
#define glIsTransformFeedbackNV MANGLE(IsTransformFeedbackNV)
#define glIsVariantEnabledEXT MANGLE(IsVariantEnabledEXT)
#define glIsVertexArrayAPPLE MANGLE(IsVertexArrayAPPLE)
#define glIsVertexArray MANGLE(IsVertexArray)
#define glIsVertexAttribEnabledAPPLE MANGLE(IsVertexAttribEnabledAPPLE)
#define glLightEnviSGIX MANGLE(LightEnviSGIX)
#define glLightf MANGLE(Lightf)
#define glLightfv MANGLE(Lightfv)
@@ -877,6 +904,10 @@
#define glMapObjectBufferATI MANGLE(MapObjectBufferATI)
#define glMapParameterfvNV MANGLE(MapParameterfvNV)
#define glMapParameterivNV MANGLE(MapParameterivNV)
#define glMapVertexAttrib1dAPPLE MANGLE(MapVertexAttrib1dAPPLE)
#define glMapVertexAttrib1fAPPLE MANGLE(MapVertexAttrib1fAPPLE)
#define glMapVertexAttrib2dAPPLE MANGLE(MapVertexAttrib2dAPPLE)
#define glMapVertexAttrib2fAPPLE MANGLE(MapVertexAttrib2fAPPLE)
#define glMaterialf MANGLE(Materialf)
#define glMaterialfv MANGLE(Materialfv)
#define glMateriali MANGLE(Materiali)
@@ -907,9 +938,11 @@
#define glMatrixTranslatefEXT MANGLE(MatrixTranslatefEXT)
#define glMinmaxEXT MANGLE(MinmaxEXT)
#define glMinmax MANGLE(Minmax)
#define glMinSampleShading MANGLE(MinSampleShading)
#define glMultiDrawArraysEXT MANGLE(MultiDrawArraysEXT)
#define glMultiDrawArrays MANGLE(MultiDrawArrays)
#define glMultiDrawElementArrayAPPLE MANGLE(MultiDrawElementArrayAPPLE)
#define glMultiDrawElementsBaseVertex MANGLE(MultiDrawElementsBaseVertex)
#define glMultiDrawElementsEXT MANGLE(MultiDrawElementsEXT)
#define glMultiDrawElements MANGLE(MultiDrawElements)
#define glMultiDrawRangeElementArrayAPPLE MANGLE(MultiDrawRangeElementArrayAPPLE)
@@ -1072,6 +1105,8 @@
#define glNormalStream3ivATI MANGLE(NormalStream3ivATI)
#define glNormalStream3sATI MANGLE(NormalStream3sATI)
#define glNormalStream3svATI MANGLE(NormalStream3svATI)
#define glObjectPurgeableAPPLE MANGLE(ObjectPurgeableAPPLE)
#define glObjectUnpurgeableAPPLE MANGLE(ObjectUnpurgeableAPPLE)
#define glOrtho MANGLE(Ortho)
#define glPassTexCoordATI MANGLE(PassTexCoordATI)
#define glPassThrough MANGLE(PassThrough)
@@ -1162,6 +1197,7 @@
#define glProgramParameter4fvNV MANGLE(ProgramParameter4fvNV)
#define glProgramParameteriARB MANGLE(ProgramParameteriARB)
#define glProgramParameteriEXT MANGLE(ProgramParameteriEXT)
#define glProgramParameteri MANGLE(ProgramParameteri)
#define glProgramParameters4dvNV MANGLE(ProgramParameters4dvNV)
#define glProgramParameters4fvNV MANGLE(ProgramParameters4fvNV)
#define glProgramStringARB MANGLE(ProgramStringARB)
@@ -1200,6 +1236,7 @@
#define glProgramUniformMatrix4x3fvEXT MANGLE(ProgramUniformMatrix4x3fvEXT)
#define glProgramVertexLimitNV MANGLE(ProgramVertexLimitNV)
#define glProvokingVertexEXT MANGLE(ProvokingVertexEXT)
#define glProvokingVertex MANGLE(ProvokingVertex)
#define glPushAttrib MANGLE(PushAttrib)
#define glPushClientAttribDefaultEXT MANGLE(PushClientAttribDefaultEXT)
#define glPushClientAttrib MANGLE(PushClientAttrib)
@@ -1283,6 +1320,7 @@
#define glSampleCoverage MANGLE(SampleCoverage)
#define glSampleMapATI MANGLE(SampleMapATI)
#define glSampleMaskEXT MANGLE(SampleMaskEXT)
#define glSampleMaski MANGLE(SampleMaski)
#define glSampleMaskIndexedNV MANGLE(SampleMaskIndexedNV)
#define glSampleMaskSGIS MANGLE(SampleMaskSGIS)
#define glSamplePatternEXT MANGLE(SamplePatternEXT)
@@ -1454,8 +1492,10 @@
#define glTexGeniv MANGLE(TexGeniv)
#define glTexImage1D MANGLE(TexImage1D)
#define glTexImage2D MANGLE(TexImage2D)
#define glTexImage2DMultisample MANGLE(TexImage2DMultisample)
#define glTexImage3DEXT MANGLE(TexImage3DEXT)
#define glTexImage3D MANGLE(TexImage3D)
#define glTexImage3DMultisample MANGLE(TexImage3DMultisample)
#define glTexImage4DSGIS MANGLE(TexImage4DSGIS)
#define glTexParameterf MANGLE(TexParameterf)
#define glTexParameterfv MANGLE(TexParameterfv)
@@ -1487,6 +1527,7 @@
#define glTextureParameterIivEXT MANGLE(TextureParameterIivEXT)
#define glTextureParameterIuivEXT MANGLE(TextureParameterIuivEXT)
#define glTextureParameterivEXT MANGLE(TextureParameterivEXT)
#define glTextureRangeAPPLE MANGLE(TextureRangeAPPLE)
#define glTextureRenderbufferEXT MANGLE(TextureRenderbufferEXT)
#define glTextureSubImage1DEXT MANGLE(TextureSubImage1DEXT)
#define glTextureSubImage2DEXT MANGLE(TextureSubImage2DEXT)
@@ -1828,6 +1869,7 @@
#define glVertexWeighthvNV MANGLE(VertexWeighthvNV)
#define glVertexWeightPointerEXT MANGLE(VertexWeightPointerEXT)
#define glViewport MANGLE(Viewport)
#define glWaitSync MANGLE(WaitSync)
#define glWeightbvARB MANGLE(WeightbvARB)
#define glWeightdvARB MANGLE(WeightdvARB)
#define glWeightfvARB MANGLE(WeightfvARB)

View File

@@ -29,9 +29,9 @@ extern "C" {
*/
/* Header file version number, required by OpenGL ABI for Linux */
/* glext.h last updated $Date: 2009-08-03 02:13:51 -0700 (Mon, 03 Aug 2009) $ */
/* glext.h last updated $Date: 2009-09-24 13:55:03 -0700 (Thu, 24 Sep 2009) $ */
/* Current version at http://www.opengl.org/registry/ */
#define GL_GLEXT_VERSION 54
#define GL_GLEXT_VERSION 56
/* Function declaration macros - to move into glplatform.h */
@@ -4236,7 +4236,7 @@ extern "C" {
#define GL_LUMINANCE16_SNORM 0x9019
#define GL_LUMINANCE16_ALPHA16_SNORM 0x901A
#define GL_INTENSITY16_SNORM 0x901B
/* reuse GL_R_SNORM */
/* reuse GL_RED_SNORM */
/* reuse GL_RG_SNORM */
/* reuse GL_RGB_SNORM */
/* reuse GL_RGBA_SNORM */
@@ -4311,6 +4311,88 @@ extern "C" {
#define GL_UNPACK_ROW_BYTES_APPLE 0x8A16
#endif
#ifndef GL_APPLE_rgb_422
#define GL_RGB_422_APPLE 0x8A1F
/* reuse GL_UNSIGNED_SHORT_8_8_APPLE */
/* reuse GL_UNSIGNED_SHORT_8_8_REV_APPLE */
#endif
#ifndef GL_NV_video_capture
#define GL_VIDEO_BUFFER_NV 0x9020
#define GL_VIDEO_BUFFER_BINDING_NV 0x9021
#define GL_FIELD_UPPER_NV 0x9022
#define GL_FIELD_LOWER_NV 0x9023
#define GL_NUM_VIDEO_CAPTURE_STREAMS_NV 0x9024
#define GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV 0x9025
#define GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV 0x9026
#define GL_LAST_VIDEO_CAPTURE_STATUS_NV 0x9027
#define GL_VIDEO_BUFFER_PITCH_NV 0x9028
#define GL_VIDEO_COLOR_CONVERSION_MATRIX_NV 0x9029
#define GL_VIDEO_COLOR_CONVERSION_MAX_NV 0x902A
#define GL_VIDEO_COLOR_CONVERSION_MIN_NV 0x902B
#define GL_VIDEO_COLOR_CONVERSION_OFFSET_NV 0x902C
#define GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV 0x902D
#define GL_PARTIAL_SUCCESS_NV 0x902E
#define GL_SUCCESS_NV 0x902F
#define GL_FAILURE_NV 0x9030
#define GL_YCBYCR8_422_NV 0x9031
#define GL_YCBAYCR8A_4224_NV 0x9032
#define GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV 0x9033
#define GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV 0x9034
#define GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV 0x9035
#define GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV 0x9036
#define GL_Z4Y12Z4CB12Z4CR12_444_NV 0x9037
#define GL_VIDEO_CAPTURE_FRAME_WIDTH_NV 0x9038
#define GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV 0x9039
#define GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV 0x903A
#define GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV 0x903B
#define GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV 0x903C
#endif
#ifndef GL_NV_copy_image
#endif
#ifndef GL_EXT_separate_shader_objects
#define GL_ACTIVE_PROGRAM_EXT 0x8B8D
#endif
#ifndef GL_NV_parameter_buffer_object2
#endif
#ifndef GL_NV_shader_buffer_load
#define GL_BUFFER_GPU_ADDRESS_NV 0x8F1D
#define GL_GPU_ADDRESS_NV 0x8F34
#define GL_MAX_SHADER_BUFFER_ADDRESS_NV 0x8F35
#endif
#ifndef GL_NV_vertex_buffer_unified_memory
#define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E
#define GL_ELEMENT_ARRAY_UNIFIED_NV 0x8F1F
#define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20
#define GL_VERTEX_ARRAY_ADDRESS_NV 0x8F21
#define GL_NORMAL_ARRAY_ADDRESS_NV 0x8F22
#define GL_COLOR_ARRAY_ADDRESS_NV 0x8F23
#define GL_INDEX_ARRAY_ADDRESS_NV 0x8F24
#define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25
#define GL_EDGE_FLAG_ARRAY_ADDRESS_NV 0x8F26
#define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27
#define GL_FOG_COORD_ARRAY_ADDRESS_NV 0x8F28
#define GL_ELEMENT_ARRAY_ADDRESS_NV 0x8F29
#define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV 0x8F2A
#define GL_VERTEX_ARRAY_LENGTH_NV 0x8F2B
#define GL_NORMAL_ARRAY_LENGTH_NV 0x8F2C
#define GL_COLOR_ARRAY_LENGTH_NV 0x8F2D
#define GL_INDEX_ARRAY_LENGTH_NV 0x8F2E
#define GL_TEXTURE_COORD_ARRAY_LENGTH_NV 0x8F2F
#define GL_EDGE_FLAG_ARRAY_LENGTH_NV 0x8F30
#define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31
#define GL_FOG_COORD_ARRAY_LENGTH_NV 0x8F32
#define GL_ELEMENT_ARRAY_LENGTH_NV 0x8F33
#endif
#ifndef GL_NV_texture_barrier
#endif
/*************************************************************/
@@ -9245,6 +9327,136 @@ typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVAPPLEPROC) (GLenum objectType,
#define GL_APPLE_row_bytes 1
#endif
#ifndef GL_APPLE_rgb_422
#define GL_APPLE_rgb_422 1
#endif
#ifndef GL_NV_video_capture
#define GL_NV_video_capture 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glBeginVideoCaptureNV (GLuint);
GLAPI void APIENTRY glBindVideoCaptureStreamBufferNV (GLuint, GLuint, GLenum, GLintptrARB);
GLAPI void APIENTRY glBindVideoCaptureStreamTextureNV (GLuint, GLuint, GLenum, GLenum, GLuint);
GLAPI void APIENTRY glEndVideoCaptureNV (GLuint);
GLAPI void APIENTRY glGetVideoCaptureivNV (GLuint, GLenum, GLint *);
GLAPI void APIENTRY glGetVideoCaptureStreamivNV (GLuint, GLuint, GLenum, GLint *);
GLAPI void APIENTRY glGetVideoCaptureStreamfvNV (GLuint, GLuint, GLenum, GLfloat *);
GLAPI void APIENTRY glGetVideoCaptureStreamdvNV (GLuint, GLuint, GLenum, GLdouble *);
GLAPI GLenum APIENTRY glVideoCaptureNV (GLuint, GLuint *, GLuint64EXT *);
GLAPI void APIENTRY glVideoCaptureStreamParameterivNV (GLuint, GLuint, GLenum, const GLint *);
GLAPI void APIENTRY glVideoCaptureStreamParameterfvNV (GLuint, GLuint, GLenum, const GLfloat *);
GLAPI void APIENTRY glVideoCaptureStreamParameterdvNV (GLuint, GLuint, GLenum, const GLdouble *);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLBEGINVIDEOCAPTURENVPROC) (GLuint video_capture_slot);
typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset);
typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMTEXTURENVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture);
typedef void (APIENTRYP PFNGLENDVIDEOCAPTURENVPROC) (GLuint video_capture_slot);
typedef void (APIENTRYP PFNGLGETVIDEOCAPTUREIVNVPROC) (GLuint video_capture_slot, GLenum pname, GLint *params);
typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params);
typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params);
typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params);
typedef GLenum (APIENTRYP PFNGLVIDEOCAPTURENVPROC) (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time);
typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params);
typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params);
typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params);
#endif
#ifndef GL_NV_copy_image
#define GL_NV_copy_image 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glCopyImageSubDataNV (GLuint, GLenum, GLint, GLint, GLint, GLint, GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATANVPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
#endif
#ifndef GL_EXT_separate_shader_objects
#define GL_EXT_separate_shader_objects 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glUseShaderProgramEXT (GLenum, GLuint);
GLAPI void APIENTRY glActiveProgramEXT (GLuint);
GLAPI GLuint APIENTRY glCreateShaderProgramEXT (GLenum, const GLchar *);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLUSESHADERPROGRAMEXTPROC) (GLenum type, GLuint program);
typedef void (APIENTRYP PFNGLACTIVEPROGRAMEXTPROC) (GLuint program);
typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMEXTPROC) (GLenum type, const GLchar *string);
#endif
#ifndef GL_NV_parameter_buffer_object2
#define GL_NV_parameter_buffer_object2 1
#endif
#ifndef GL_NV_shader_buffer_load
#define GL_NV_shader_buffer_load 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glMakeBufferResidentNV (GLenum, GLenum);
GLAPI void APIENTRY glMakeBufferNonResidentNV (GLenum);
GLAPI GLboolean APIENTRY glIsBufferResidentNV (GLenum);
GLAPI void APIENTRY glNamedMakeBufferResidentNV (GLuint, GLenum);
GLAPI void APIENTRY glNamedMakeBufferNonResidentNV (GLuint);
GLAPI GLboolean APIENTRY glIsNamedBufferResidentNV (GLuint);
GLAPI void APIENTRY glGetBufferParameterui64vNV (GLenum, GLenum, GLuint64EXT *);
GLAPI void APIENTRY glGetNamedBufferParameterui64vNV (GLuint, GLenum, GLuint64EXT *);
GLAPI void APIENTRY glGetIntegerui64vNV (GLenum, GLuint64EXT *);
GLAPI void APIENTRY glUniformui64NV (GLint, GLuint64EXT);
GLAPI void APIENTRY glUniformui64vNV (GLint, GLsizei, const GLuint64EXT *);
GLAPI void APIENTRY glGetUniformui64vNV (GLuint, GLint, GLuint64EXT *);
GLAPI void APIENTRY glProgramUniformui64NV (GLuint, GLint, GLuint64EXT);
GLAPI void APIENTRY glProgramUniformui64vNV (GLuint, GLint, GLsizei, const GLuint64EXT *);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLMAKEBUFFERRESIDENTNVPROC) (GLenum target, GLenum access);
typedef void (APIENTRYP PFNGLMAKEBUFFERNONRESIDENTNVPROC) (GLenum target);
typedef GLboolean (APIENTRYP PFNGLISBUFFERRESIDENTNVPROC) (GLenum target);
typedef void (APIENTRYP PFNGLNAMEDMAKEBUFFERRESIDENTNVPROC) (GLuint buffer, GLenum access);
typedef void (APIENTRYP PFNGLNAMEDMAKEBUFFERNONRESIDENTNVPROC) (GLuint buffer);
typedef GLboolean (APIENTRYP PFNGLISNAMEDBUFFERRESIDENTNVPROC) (GLuint buffer);
typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERUI64VNVPROC) (GLenum target, GLenum pname, GLuint64EXT *params);
typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC) (GLuint buffer, GLenum pname, GLuint64EXT *params);
typedef void (APIENTRYP PFNGLGETINTEGERUI64VNVPROC) (GLenum value, GLuint64EXT *result);
typedef void (APIENTRYP PFNGLUNIFORMUI64NVPROC) (GLint location, GLuint64EXT value);
typedef void (APIENTRYP PFNGLUNIFORMUI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
typedef void (APIENTRYP PFNGLGETUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLuint64EXT *params);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64NVPROC) (GLuint program, GLint location, GLuint64EXT value);
typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
#endif
#ifndef GL_NV_vertex_buffer_unified_memory
#define GL_NV_vertex_buffer_unified_memory 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glBufferAddressRangeNV (GLenum, GLuint, GLuint64EXT, GLsizeiptr);
GLAPI void APIENTRY glVertexFormatNV (GLint, GLenum, GLsizei);
GLAPI void APIENTRY glNormalFormatNV (GLenum, GLsizei);
GLAPI void APIENTRY glColorFormatNV (GLint, GLenum, GLsizei);
GLAPI void APIENTRY glIndexFormatNV (GLenum, GLsizei);
GLAPI void APIENTRY glTexCoordFormatNV (GLint, GLenum, GLsizei);
GLAPI void APIENTRY glEdgeFlagFormatNV (GLsizei);
GLAPI void APIENTRY glSecondaryColorFormatNV (GLint, GLenum, GLsizei);
GLAPI void APIENTRY glFogCoordFormatNV (GLenum, GLsizei);
GLAPI void APIENTRY glVertexAttribFormatNV (GLuint, GLint, GLenum, GLboolean, GLsizei);
GLAPI void APIENTRY glVertexAttribIFormatNV (GLuint, GLint, GLenum, GLsizei);
GLAPI void APIENTRY glGetIntegerui64i_vNV (GLenum, GLuint, GLuint64EXT *);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLBUFFERADDRESSRANGENVPROC) (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length);
typedef void (APIENTRYP PFNGLVERTEXFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
typedef void (APIENTRYP PFNGLNORMALFORMATNVPROC) (GLenum type, GLsizei stride);
typedef void (APIENTRYP PFNGLCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
typedef void (APIENTRYP PFNGLINDEXFORMATNVPROC) (GLenum type, GLsizei stride);
typedef void (APIENTRYP PFNGLTEXCOORDFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
typedef void (APIENTRYP PFNGLEDGEFLAGFORMATNVPROC) (GLsizei stride);
typedef void (APIENTRYP PFNGLSECONDARYCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
typedef void (APIENTRYP PFNGLFOGCOORDFORMATNVPROC) (GLenum type, GLsizei stride);
typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride);
typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride);
typedef void (APIENTRYP PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT *result);
#endif
#ifndef GL_NV_texture_barrier
#define GL_NV_texture_barrier 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glTextureBarrierNV (void);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLTEXTUREBARRIERNVPROC) (void);
#endif
#ifdef __cplusplus
}

View File

@@ -76,6 +76,7 @@
/* GLX 1.4 */
#define glXGetProcAddress mglXGetProcAddress
#define glXGetProcAddressARB mglXGetProcAddressARB
#endif

View File

@@ -48,9 +48,9 @@ extern "C" {
/*************************************************************/
/* Header file version number, required by OpenGL ABI for Linux */
/* glxext.h last updated 2009/08/03 */
/* glxext.h last updated 2009/10/08 */
/* Current version at http://www.opengl.org/registry/ */
#define GLX_GLXEXT_VERSION 23
#define GLX_GLXEXT_VERSION 25
#ifndef GLX_VERSION_1_3
#define GLX_WINDOW_BIT 0x00000001
@@ -382,6 +382,20 @@ extern "C" {
#ifndef GLX_NV_swap_group
#endif
#ifndef GLX_NV_video_capture
#define GLX_DEVICE_ID_NV 0x20CD
#define GLX_UNIQUE_ID_NV 0x20CE
#define GLX_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
#endif
#ifndef GLX_EXT_swap_control
#define GLX_SWAP_INTERVAL_EXT 0x20F1
#define GLX_MAX_SWAP_INTERVAL_EXT 0x20F2
#endif
#ifndef GLX_NV_copy_image
#endif
/*************************************************************/
@@ -415,6 +429,14 @@ typedef struct {
} GLXBufferClobberEventSGIX;
#endif
#ifndef GLX_NV_video_output
typedef unsigned int GLXVideoDeviceNV;
#endif
#ifndef GLX_NV_video_capture
typedef XID GLXVideoCaptureDeviceNV;
#endif
#ifndef GLEXT_64_TYPES_DEFINED
/* This code block is duplicated in glext.h, so must be protected */
#define GLEXT_64_TYPES_DEFINED
@@ -827,14 +849,80 @@ typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawab
#ifndef GLX_NV_present_video
#define GLX_NV_present_video 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern unsigned int * glXEnumerateVideoDevicesNV (Display *, int, int *);
extern int glXBindVideoDeviceNV (Display *, unsigned int, unsigned int, const int *);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef unsigned int * ( * PFNGLXENUMERATEVIDEODEVICESNVPROC) (Display *dpy, int screen, int *nelements);
typedef int ( * PFNGLXBINDVIDEODEVICENVPROC) (Display *dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list);
#endif
#ifndef GLX_NV_video_out
#define GLX_NV_video_out 1
#ifndef GLX_NV_video_output
#define GLX_NV_video_output 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern int glXGetVideoDeviceNV (Display *, int, int, GLXVideoDeviceNV *);
extern int glXReleaseVideoDeviceNV (Display *, int, GLXVideoDeviceNV);
extern int glXBindVideoImageNV (Display *, GLXVideoDeviceNV, GLXPbuffer, int);
extern int glXReleaseVideoImageNV (Display *, GLXPbuffer);
extern int glXSendPbufferToVideoNV (Display *, GLXPbuffer, int, unsigned long *, GLboolean);
extern int glXGetVideoInfoNV (Display *, int, GLXVideoDeviceNV, unsigned long *, unsigned long *);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef int ( * PFNGLXGETVIDEODEVICENVPROC) (Display *dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice);
typedef int ( * PFNGLXRELEASEVIDEODEVICENVPROC) (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice);
typedef int ( * PFNGLXBINDVIDEOIMAGENVPROC) (Display *dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, int iVideoBuffer);
typedef int ( * PFNGLXRELEASEVIDEOIMAGENVPROC) (Display *dpy, GLXPbuffer pbuf);
typedef int ( * PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display *dpy, GLXPbuffer pbuf, int iBufferType, unsigned long *pulCounterPbuffer, GLboolean bBlock);
typedef int ( * PFNGLXGETVIDEOINFONVPROC) (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
#endif
#ifndef GLX_NV_swap_group
#define GLX_NV_swap_group 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern Bool glXJoinSwapGroupNV (Display *, GLXDrawable, GLuint);
extern Bool glXBindSwapBarrierNV (Display *, GLuint, GLuint);
extern Bool glXQuerySwapGroupNV (Display *, GLXDrawable, GLuint *, GLuint *);
extern Bool glXQueryMaxSwapGroupsNV (Display *, int, GLuint *, GLuint *);
extern Bool glXQueryFrameCountNV (Display *, int, GLuint *);
extern Bool glXResetFrameCountNV (Display *, int);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Bool ( * PFNGLXJOINSWAPGROUPNVPROC) (Display *dpy, GLXDrawable drawable, GLuint group);
typedef Bool ( * PFNGLXBINDSWAPBARRIERNVPROC) (Display *dpy, GLuint group, GLuint barrier);
typedef Bool ( * PFNGLXQUERYSWAPGROUPNVPROC) (Display *dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier);
typedef Bool ( * PFNGLXQUERYMAXSWAPGROUPSNVPROC) (Display *dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers);
typedef Bool ( * PFNGLXQUERYFRAMECOUNTNVPROC) (Display *dpy, int screen, GLuint *count);
typedef Bool ( * PFNGLXRESETFRAMECOUNTNVPROC) (Display *dpy, int screen);
#endif
#ifndef GLX_NV_video_capture
#define GLX_NV_video_capture 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern int glXBindVideoCaptureDeviceNV (Display *, unsigned int, GLXVideoCaptureDeviceNV);
extern GLXVideoCaptureDeviceNV * glXEnumerateVideoCaptureDevicesNV (Display *, int, int *);
extern void glXLockVideoCaptureDeviceNV (Display *, GLXVideoCaptureDeviceNV);
extern int glXQueryVideoCaptureDeviceNV (Display *, GLXVideoCaptureDeviceNV, int, int *);
extern void glXReleaseVideoCaptureDeviceNV (Display *, GLXVideoCaptureDeviceNV);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef int ( * PFNGLXBINDVIDEOCAPTUREDEVICENVPROC) (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device);
typedef GLXVideoCaptureDeviceNV * ( * PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC) (Display *dpy, int screen, int *nelements);
typedef void ( * PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device);
typedef int ( * PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device, int attribute, int *value);
typedef void ( * PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device);
#endif
#ifndef GLX_EXT_swap_control
#define GLX_EXT_swap_control 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern int glXSwapIntervalEXT (Display *, GLXDrawable, int);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef int ( * PFNGLXSWAPINTERVALEXTPROC) (Display *dpy, GLXDrawable drawable, int interval);
#endif
#ifndef GLX_NV_copy_image
#define GLX_NV_copy_image 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern void glXCopyImageSubDataNV (Display *, GLXContext, GLuint, GLenum, GLint, GLint, GLint, GLint, GLXContext, GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef void ( * PFNGLXCOPYIMAGESUBDATANVPROC) (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
#endif

View File

@@ -48,9 +48,9 @@ extern "C" {
/*************************************************************/
/* Header file version number */
/* wglext.h last updated 2009/08/03 */
/* wglext.h last updated 2009/09/16 */
/* Current version at http://www.opengl.org/registry/ */
#define WGL_WGLEXT_VERSION 15
#define WGL_WGLEXT_VERSION 17
#ifndef WGL_ARB_buffer_region
#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001
@@ -388,6 +388,14 @@ extern "C" {
#define WGL_GPU_NUM_SPI_AMD 0x21A8
#endif
#ifndef NV_video_capture
#define WGL_UNIQUE_ID_NV 0x20CE
#define WGL_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
#endif
#ifndef NV_copy_image
#endif
/*************************************************************/
@@ -400,7 +408,7 @@ DECLARE_HANDLE(HPBUFFEREXT);
#ifndef WGL_NV_present_video
DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV);
#endif
#ifndef WGL_NV_video_out
#ifndef WGL_NV_video_output
DECLARE_HANDLE(HPVIDEODEV);
#endif
#ifndef WGL_NV_gpu_affinity
@@ -415,6 +423,9 @@ typedef struct _GPU_DEVICE {
RECT rcVirtualScreen;
} GPU_DEVICE, *PGPU_DEVICE;
#endif
#ifndef WGL_NV_video_capture
DECLARE_HANDLE(HVIDEOINPUTDEVICENV);
#endif
#ifndef WGL_ARB_buffer_region
#define WGL_ARB_buffer_region 1
@@ -750,8 +761,8 @@ typedef BOOL (WINAPI * PFNWGLBINDVIDEODEVICENVPROC) (HDC hDC, unsigned int uVide
typedef BOOL (WINAPI * PFNWGLQUERYCURRENTCONTEXTNVPROC) (int iAttribute, int *piValue);
#endif
#ifndef WGL_NV_video_out
#define WGL_NV_video_out 1
#ifndef WGL_NV_video_output
#define WGL_NV_video_output 1
#ifdef WGL_WGLEXT_PROTOTYPES
extern BOOL WINAPI wglGetVideoDeviceNV (HDC, int, HPVIDEODEV *);
extern BOOL WINAPI wglReleaseVideoDeviceNV (HPVIDEODEV);
@@ -826,6 +837,30 @@ typedef HGLRC (WINAPI * PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void);
typedef VOID (WINAPI * PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC) (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
#endif
#ifndef WGL_NV_video_capture
#define WGL_NV_video_capture 1
#ifdef WGL_WGLEXT_PROTOTYPES
extern BOOL WINAPI wglBindVideoCaptureDeviceNV (UINT, HVIDEOINPUTDEVICENV);
extern UINT WINAPI wglEnumerateVideoCaptureDevicesNV (HDC, HVIDEOINPUTDEVICENV *);
extern BOOL WINAPI wglLockVideoCaptureDeviceNV (HDC, HVIDEOINPUTDEVICENV);
extern BOOL WINAPI wglQueryVideoCaptureDeviceNV (HDC, HVIDEOINPUTDEVICENV, int, int *);
extern BOOL WINAPI wglReleaseVideoCaptureDeviceNV (HDC, HVIDEOINPUTDEVICENV);
#endif /* WGL_WGLEXT_PROTOTYPES */
typedef BOOL (WINAPI * PFNWGLBINDVIDEOCAPTUREDEVICENVPROC) (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice);
typedef UINT (WINAPI * PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC) (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList);
typedef BOOL (WINAPI * PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
typedef BOOL (WINAPI * PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue);
typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
#endif
#ifndef WGL_NV_copy_image
#define WGL_NV_copy_image 1
#ifdef WGL_WGLEXT_PROTOTYPES
extern BOOL WINAPI wglCopyImageSubDataNV (HGLRC, GLuint, GLenum, GLint, GLint, GLint, GLint, HGLRC, GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei);
#endif /* WGL_WGLEXT_PROTOTYPES */
typedef BOOL (WINAPI * PFNWGLCOPYIMAGESUBDATANVPROC) (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
#endif
#ifdef __cplusplus
}

1
progs/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*.dSYM

View File

@@ -15,7 +15,7 @@ message:
subdirs:
@for dir in $(SUBDIRS) ; do \
@list='$(SUBDIRS)'; for dir in $$list ; do \
if [ -d $$dir ] ; then \
(cd $$dir && $(MAKE)) || exit 1 ; \
fi \
@@ -25,7 +25,7 @@ subdirs:
install:
clean:
-@for dir in $(SUBDIRS) tests ; do \
@list='$(SUBDIRS)'; for dir in $$list tests ; do \
if [ -d $$dir ] ; then \
(cd $$dir && $(MAKE) clean) ; \
fi \

View File

@@ -15,8 +15,6 @@
#define DEPTH 5.0f
static PFNGLFOGCOORDPOINTEREXTPROC glFogCoordPointer_ext;
static GLfloat camz;
static GLint fogMode;

View File

@@ -353,6 +353,7 @@ MakeSphere(void)
glNewList(SphereList, GL_COMPILE);
gluSphere(obj, 2.0f, 10, 5);
glEndList();
gluDeleteQuadric(obj);
}
static void

View File

@@ -133,6 +133,8 @@ initdlists(void)
glEndList();
}
gluDeleteQuadric(obj);
}
static void

View File

@@ -887,5 +887,5 @@ int main(int argc, char **argv)
glutIdleFunc( idle_ );
glutDisplayFunc( draw );
glutMainLoop();
return 0;
}

View File

@@ -245,6 +245,10 @@ loadImageTextures(void)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
}
glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, borderColor);
free(texData3);
free(texData4);
free(image);
}
}

View File

@@ -834,6 +834,8 @@ initdlists(void)
gluQuadricTexture(obj, GL_TRUE);
gluSphere(obj, SPHERE_RADIUS, 16, 16);
glEndList();
gluDeleteQuadric(obj);
}
int

View File

@@ -57,7 +57,7 @@ Idle(void)
{
Xrot = glutGet(GLUT_ELAPSED_TIME) * 0.02;
Yrot = glutGet(GLUT_ELAPSED_TIME) * 0.04;
//Zrot += 2.0;
/* Zrot += 2.0; */
glutPostRedisplay();
}

View File

@@ -17,6 +17,7 @@ SOURCES = \
tri-depth2.c \
tri-depthwrite.c \
tri-depthwrite2.c \
tri-inv.c \
tri-param.c \
fp-tri.c

View File

@@ -197,7 +197,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
return;
break;
}
glutPostRedisplay();

View File

@@ -55,7 +55,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
return;
break;
}
glutPostRedisplay();

View File

@@ -57,7 +57,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
return;
break;
}
glutPostRedisplay();

View File

@@ -59,7 +59,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
return;
break;
}
glutPostRedisplay();

View File

@@ -55,7 +55,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
return;
break;
}
glutPostRedisplay();

View File

@@ -55,7 +55,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
return;
break;
}
glutPostRedisplay();

View File

@@ -56,7 +56,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
return;
break;
}
glutPostRedisplay();

View File

@@ -54,7 +54,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
return;
break;
}
glutPostRedisplay();

View File

@@ -76,7 +76,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
return;
break;
}
glutPostRedisplay();

View File

@@ -31,7 +31,7 @@ void main()
float iter;
// for (iter = 0.0; iter < MaxIterations && r2 < 4.0; ++iter)
for (iter = 0.0; iter < 12 && r2 < 4.0; ++iter)
for (iter = 0.0; iter < 12.0 && r2 < 4.0; ++iter)
{
float tempreal = real;

View File

@@ -10,16 +10,15 @@ LIB_DEP = \
$(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) \
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLEW_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
INCLUDE_DIRS = -I$(TOP)/progs/util
LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLEW_LIB) -l$(GLU_LIB) \
-l$(GL_LIB) $(APP_LIB_DEPS)
# using : to avoid APP_CC pointing to CC loop
CC:=$(APP_CC)
CFLAGS += -I$(INCDIR)
LDLIBS=$(LIBS)
CC := $(APP_CC)
CFLAGS := -I$(INCDIR) $(CFLAGS)
LDLIBS = $(LIBS)
DEMO_SOURCES = \
PROG_SOURCES = \
array.c \
bitmap.c \
brick.c \
@@ -59,8 +58,8 @@ UTIL_SOURCES = \
readtex.c
UTIL_OBJS = $(UTIL_SOURCES:.c=.o)
PROG_OBJS = $(DEMO_SOURCES:.c=.o)
PROGS = $(DEMO_SOURCES:%.c=%)
PROG_OBJS = $(PROG_SOURCES:.c=.o)
PROGS = $(PROG_SOURCES:%.c=%)
##### TARGETS #####

View File

@@ -36,7 +36,7 @@ static GLint win = 0;
static GLfloat xRot = 20.0f, yRot = 0.0f, zRot = 0.0f;
static GLuint tangentAttrib;
static GLint tangentAttrib;
static GLboolean Anim = GL_FALSE;

View File

@@ -369,7 +369,7 @@ static void keyPress(unsigned char key, int x, int y)
case 27:
exit(0);
default:
return;
break;
}
glutPostRedisplay();
}

View File

@@ -140,6 +140,7 @@ MakeSphere(void)
glNewList(SphereList, GL_COMPILE);
gluSphere(obj, 2.0f, 30, 15);
glEndList();
gluDeleteQuadric(obj);
}

View File

@@ -22,22 +22,22 @@ static const char *FragShaderText[ 4 ] = {
"void main()\n"
"{\n"
" gl_FragColor.rgb = noise3( gl_TexCoord[ 0 ].w ) * 0.5 + 0.5;\n"
" gl_FragColor.a = 1;\n"
" gl_FragColor.a = 1.0;\n"
"}\n",
"void main()\n"
"{\n"
" gl_FragColor.rgb = noise3( gl_TexCoord[ 0 ].xw ) * 0.5 + 0.5;\n"
" gl_FragColor.a = 1;\n"
" gl_FragColor.a = 1.0;\n"
"}\n",
"void main()\n"
"{\n"
" gl_FragColor.rgb = noise3( gl_TexCoord[ 0 ].xyw ) * 0.5 + 0.5;\n"
" gl_FragColor.a = 1;\n"
" gl_FragColor.a = 1.0;\n"
"}\n",
"void main()\n"
"{\n"
" gl_FragColor.rgb = noise3( gl_TexCoord[ 0 ].xyzw ) * 0.5 + 0.5;\n"
" gl_FragColor.a = 1;\n"
" gl_FragColor.a = 1.0;\n"
"}\n"
};
@@ -125,6 +125,7 @@ Key(unsigned char key, int x, int y)
case 'a':
Anim = !Anim;
glutIdleFunc(Anim ? Idle : NULL);
break;
case 's':
Slice -= step;
break;
@@ -193,7 +194,7 @@ LoadAndCompileShader(GLuint shader, const char *text)
GLchar log[1000];
GLsizei len;
glGetShaderInfoLog(shader, 1000, &len, log);
fprintf(stderr, "noise: problem compiling shader: %s\n", log);
fprintf(stderr, "multinoise: problem compiling shader: %s\n", log);
exit(1);
}
else {

View File

@@ -28,7 +28,7 @@ static const char *FragShaderText =
" vec4 p;\n"
" p.xy = gl_TexCoord[0].xy;\n"
" p.z = Slice;\n"
" p.w = 0;\n"
" p.w = 0.0;\n"
" vec4 n = noise4(p * scale);\n"
" gl_FragColor = n * Scale + Bias;\n"
"}\n";
@@ -119,6 +119,7 @@ Key(unsigned char key, int x, int y)
case 'a':
Anim = !Anim;
glutIdleFunc(Anim ? Idle : NULL);
break;
case 's':
Slice -= step;
break;

View File

@@ -627,7 +627,7 @@ Init(void)
NumAttribs = GetAttribs(Program, Attribs);
PrintAttribs(Attribs);
//assert(glGetError() == 0);
/* assert(glGetError() == 0); */
glClearColor(0.4f, 0.4f, 0.8f, 0.0f);

View File

@@ -16,6 +16,9 @@
#include <GL/glut.h>
#include "shaderutil.h"
#ifndef M_PI
#define M_PI 3.1415926535
#endif
static char *FragProgFile = "skinning.frag";
static char *VertProgFile = "skinning.vert";

View File

@@ -14,6 +14,9 @@
#include <GL/glew.h>
#include <GL/glut.h>
#ifndef M_PI
#define M_PI 3.1415926535
#endif
static GLint WinWidth = 300, WinHeight = 300;
static GLint win = 0;
@@ -307,8 +310,8 @@ MakeMipmap(void)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
//glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, 4);
////glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 5);
/* glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, 4); */
/* glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 5); */
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
#undef SZ

View File

@@ -179,9 +179,9 @@ Init(void)
"\n"
"void main() {\n"
" vec2 p = gl_FragCoord.xy; \n"
" if (crs(v1 - v0, p - v0) >= 0 && \n"
" crs(v2 - v1, p - v1) >= 0 && \n"
" crs(v0 - v2, p - v2) >= 0) \n"
" if (crs(v1 - v0, p - v0) >= 0.0 && \n"
" crs(v2 - v1, p - v1) >= 0.0 && \n"
" crs(v0 - v2, p - v2) >= 0.0) \n"
" gl_FragColor = vec4(1.0); \n"
" else \n"
" gl_FragColor = vec4(0.5); \n"

View File

@@ -16,6 +16,9 @@
#include <GL/glut.h>
#include "shaderutil.h"
#ifndef M_PI
#define M_PI 3.1415926535
#endif
static GLint WinWidth = 300, WinHeight = 300;
static char *FragProgFile = NULL;

View File

@@ -56,7 +56,7 @@ static float rotAngle = 0.;
* at RAMP1START, and a blue color ramp starting
* at RAMP2START. The ramps must be a multiple of 16.
*/
void init(void)
static void init(void)
{
int i;
@@ -76,7 +76,7 @@ void init(void)
/* Draw 2 diagonal lines to form an X
*/
void display(void)
static void display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
@@ -101,7 +101,7 @@ void display(void)
glFlush();
}
void reshape(int w, int h)
static void reshape(int w, int h)
{
glViewport(0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode(GL_PROJECTION);
@@ -117,7 +117,7 @@ void reshape(int w, int h)
}
/* ARGSUSED1 */
void keyboard(unsigned char key, int x, int y)
static void keyboard(unsigned char key, int x, int y)
{
switch (key) {
case 'r':

View File

@@ -59,7 +59,7 @@ static void init(void)
#define NFACE 6
#define NVERT 8
void drawCube(GLdouble x0, GLdouble x1, GLdouble y0, GLdouble y1,
static void drawCube(GLdouble x0, GLdouble x1, GLdouble y0, GLdouble y1,
GLdouble z0, GLdouble z1)
{
static GLfloat v[8][3];
@@ -101,7 +101,7 @@ void drawCube(GLdouble x0, GLdouble x1, GLdouble y0, GLdouble y1,
/* Note: polygons must be drawn from front to back
* for proper blending.
*/
void display(void)
static void display(void)
{
if (polySmooth) {
glClear (GL_COLOR_BUFFER_BIT);
@@ -126,7 +126,7 @@ void display(void)
glFlush ();
}
void reshape(int w, int h)
static void reshape(int w, int h)
{
glViewport(0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode(GL_PROJECTION);
@@ -137,7 +137,7 @@ void reshape(int w, int h)
}
/* ARGSUSED1 */
void keyboard(unsigned char key, int x, int y)
static void keyboard(unsigned char key, int x, int y)
{
switch (key) {
case 't':

View File

@@ -51,7 +51,7 @@ static float rotAngle = 0.;
* blending, hint, and line width. Print out implementation
* specific info on line width granularity and width.
*/
void init(void)
static void init(void)
{
GLfloat values[2];
glGetFloatv (GL_LINE_WIDTH_GRANULARITY, values);
@@ -72,7 +72,7 @@ void init(void)
/* Draw 2 diagonal lines to form an X
*/
void display(void)
static void display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
@@ -97,7 +97,7 @@ void display(void)
glFlush();
}
void reshape(int w, int h)
static void reshape(int w, int h)
{
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);
@@ -113,7 +113,7 @@ void reshape(int w, int h)
}
/* ARGSUSED1 */
void keyboard(unsigned char key, int x, int y)
static void keyboard(unsigned char key, int x, int y)
{
switch (key) {
case 'r':

View File

@@ -45,7 +45,7 @@
/* Initialize lighting and other values.
*/
void myinit(void)
static void myinit(void)
{
GLfloat mat_ambient[] = { 1.0, 1.0, 1.0, 1.0 };
GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 };
@@ -68,7 +68,7 @@ void myinit(void)
glClearAccum(0.0, 0.0, 0.0, 0.0);
}
void displayObjects(void)
static void displayObjects(void)
{
GLfloat torus_diffuse[] = { 0.7, 0.7, 0.0, 1.0 };
GLfloat cube_diffuse[] = { 0.0, 0.7, 0.7, 1.0 };
@@ -111,7 +111,7 @@ void displayObjects(void)
#define ACSIZE 8
void display(void)
static void display(void)
{
GLint viewport[4];
int jitter;
@@ -137,7 +137,7 @@ void display(void)
glFlush();
}
void myReshape(int w, int h)
static void myReshape(int w, int h)
{
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);

View File

@@ -62,7 +62,7 @@
* probably want to insure that your ModelView matrix has been
* initialized to identity before calling accFrustum().
*/
void accFrustum(GLdouble left, GLdouble right, GLdouble bottom,
static void accFrustum(GLdouble left, GLdouble right, GLdouble bottom,
GLdouble top, GLdouble nnear, GLdouble ffar, GLdouble pixdx,
GLdouble pixdy, GLdouble eyedx, GLdouble eyedy, GLdouble focus)
{
@@ -99,7 +99,7 @@ void accFrustum(GLdouble left, GLdouble right, GLdouble bottom,
*
* Note that accPerspective() calls accFrustum().
*/
void accPerspective(GLdouble fovy, GLdouble aspect,
static void accPerspective(GLdouble fovy, GLdouble aspect,
GLdouble nnear, GLdouble ffar, GLdouble pixdx, GLdouble pixdy,
GLdouble eyedx, GLdouble eyedy, GLdouble focus)
{
@@ -119,7 +119,7 @@ void accPerspective(GLdouble fovy, GLdouble aspect,
/* Initialize lighting and other values.
*/
void init(void)
static void init(void)
{
GLfloat mat_ambient[] = { 1.0, 1.0, 1.0, 1.0 };
GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 };
@@ -141,7 +141,7 @@ void init(void)
glClearAccum(0.0, 0.0, 0.0, 0.0);
}
void displayObjects(void)
static void displayObjects(void)
{
GLfloat torus_diffuse[] = { 0.7, 0.7, 0.0, 1.0 };
GLfloat cube_diffuse[] = { 0.0, 0.7, 0.7, 1.0 };
@@ -185,7 +185,7 @@ void displayObjects(void)
#define ACSIZE 8
void display(void)
static void display(void)
{
GLint viewport[4];
int jitter;
@@ -205,13 +205,13 @@ void display(void)
glFlush();
}
void reshape(int w, int h)
static void reshape(int w, int h)
{
glViewport(0, 0, (GLsizei) w, (GLsizei) h);
}
/* ARGSUSED1 */
void keyboard(unsigned char key, int x, int y)
static void keyboard(unsigned char key, int x, int y)
{
switch (key) {
case 27:

View File

@@ -80,7 +80,7 @@ static void drawRightTriangle(void)
glEnd();
}
void display(void)
static void display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
@@ -96,7 +96,7 @@ void display(void)
glFlush();
}
void reshape(int w, int h)
static void reshape(int w, int h)
{
glViewport(0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode(GL_PROJECTION);
@@ -108,7 +108,7 @@ void reshape(int w, int h)
}
/* ARGSUSED1 */
void keyboard(unsigned char key, int x, int y)
static void keyboard(unsigned char key, int x, int y)
{
switch (key) {
case 't':

View File

@@ -80,7 +80,7 @@ static void init(void)
glEndList();
}
void display(void)
static void display(void)
{
GLfloat mat_solid[] = { 0.75, 0.75, 0.0, 1.0 };
GLfloat mat_zero[] = { 0.0, 0.0, 0.0, 1.0 };
@@ -113,7 +113,7 @@ void display(void)
glutSwapBuffers();
}
void reshape(int w, int h)
static void reshape(int w, int h)
{
glViewport(0, 0, (GLint) w, (GLint) h);
glMatrixMode(GL_PROJECTION);
@@ -128,7 +128,7 @@ void reshape(int w, int h)
glLoadIdentity();
}
void animate(void)
static void animate(void)
{
static double t0 = -1.;
if (solidZ <= MINZ || transparentZ >= MAXZ)
@@ -150,7 +150,7 @@ void animate(void)
}
/* ARGSUSED1 */
void keyboard(unsigned char key, int x, int y)
static void keyboard(unsigned char key, int x, int y)
{
switch (key) {
case 'a':

View File

@@ -49,7 +49,7 @@
* blending, hint, and line width. Print out implementation
* specific info on line width granularity and width.
*/
void myinit(void)
static void myinit(void)
{
GLfloat values[2];
glGetFloatv (GL_LINE_WIDTH_GRANULARITY, values);
@@ -73,7 +73,7 @@ void myinit(void)
/* display() draws an icosahedron with a large alpha value, 1.0.
*/
void display(void)
static void display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glColor4f (1.0, 1.0, 1.0, 1.0);
@@ -81,7 +81,7 @@ void display(void)
glFlush();
}
void myReshape(int w, int h)
static void myReshape(int w, int h)
{
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);

View File

@@ -45,7 +45,7 @@ GLfloat ctrlpoints[4][3] = {
{ -4.0, -4.0, 0.0}, { -2.0, 4.0, 0.0},
{2.0, -4.0, 0.0}, {4.0, 4.0, 0.0}};
void init(void)
static void init(void)
{
glClearColor(0.0, 0.0, 0.0, 0.0);
glShadeModel(GL_FLAT);
@@ -53,7 +53,7 @@ void init(void)
glEnable(GL_MAP1_VERTEX_3);
}
void display(void)
static void display(void)
{
int i;
@@ -73,7 +73,7 @@ void display(void)
glFlush();
}
void reshape(int w, int h)
static void reshape(int w, int h)
{
glViewport(0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode(GL_PROJECTION);
@@ -89,7 +89,7 @@ void reshape(int w, int h)
}
/* ARGSUSED1 */
void keyboard(unsigned char key, int x, int y)
static void keyboard(unsigned char key, int x, int y)
{
switch (key) {
case 27:

View File

@@ -68,7 +68,7 @@ GLfloat ctrlpoints[4][4][3] =
{1.5, 1.5, -1.0}}
};
void
static void
initlights(void)
{
GLfloat ambient[] =
@@ -93,7 +93,7 @@ initlights(void)
glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess);
}
void
static void
display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -104,7 +104,7 @@ display(void)
glFlush();
}
void
static void
myinit(void)
{
glClearColor(0.0, 0.0, 0.0, 1.0);
@@ -118,7 +118,7 @@ myinit(void)
initlights(); /* for lighted version only */
}
void
static void
myReshape(int w, int h)
{
glViewport(0, 0, w, h);

View File

@@ -50,7 +50,7 @@
#define checkImageHeight 64
GLubyte checkImage[checkImageWidth][checkImageHeight][3];
void makeCheckImage(void)
static void makeCheckImage(void)
{
int i, j, c;
@@ -64,7 +64,7 @@ void makeCheckImage(void)
}
}
void myinit(void)
static void myinit(void)
{
glClearColor (0.0, 0.0, 0.0, 0.0);
glEnable(GL_DEPTH_TEST);
@@ -84,7 +84,7 @@ void myinit(void)
glShadeModel(GL_FLAT);
}
void display(void)
static void display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glBegin(GL_QUADS);
@@ -101,7 +101,7 @@ void display(void)
glutSwapBuffers();
}
void myReshape(int w, int h)
static void myReshape(int w, int h)
{
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);

View File

@@ -42,13 +42,13 @@
#include <GL/glut.h>
#include <stdlib.h>
void init(void)
static void init(void)
{
glClearColor (0.0, 0.0, 0.0, 0.0);
glShadeModel (GL_FLAT);
}
void display(void)
static void display(void)
{
GLdouble eqn[4] = {0.0, 1.0, 0.0, 0.0};
GLdouble eqn2[4] = {1.0, 0.0, 0.0, 0.0};
@@ -73,7 +73,7 @@ void display(void)
glFlush ();
}
void reshape (int w, int h)
static void reshape (int w, int h)
{
glViewport (0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode (GL_PROJECTION);
@@ -83,7 +83,7 @@ void reshape (int w, int h)
}
/* ARGSUSED1 */
void keyboard(unsigned char key, int x, int y)
static void keyboard(unsigned char key, int x, int y)
{
switch (key) {
case 27:

View File

@@ -49,7 +49,7 @@ GLfloat diffuseMaterial[4] = { 0.5, 0.5, 0.5, 1.0 };
/* Initialize material property, light source, lighting model,
* and depth buffer.
*/
void init(void)
static void init(void)
{
GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 };
GLfloat light_position[] = { 1.0, 1.0, 1.0, 0.0 };
@@ -68,14 +68,14 @@ void init(void)
glEnable(GL_COLOR_MATERIAL);
}
void display(void)
static void display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glutSolidSphere(1.0, 20, 16);
glFlush ();
}
void reshape (int w, int h)
static void reshape (int w, int h)
{
glViewport (0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode (GL_PROJECTION);
@@ -91,7 +91,7 @@ void reshape (int w, int h)
}
/* ARGSUSED2 */
void mouse(int button, int state, int x, int y)
static void mouse(int button, int state, int x, int y)
{
switch (button) {
case GLUT_LEFT_BUTTON:
@@ -127,7 +127,7 @@ void mouse(int button, int state, int x, int y)
}
/* ARGSUSED1 */
void keyboard(unsigned char key, int x, int y)
static void keyboard(unsigned char key, int x, int y)
{
switch (key) {
case 27:

View File

@@ -44,13 +44,13 @@
#include <GL/glut.h>
#include <stdlib.h>
void init(void)
static void init(void)
{
glClearColor (0.0, 0.0, 0.0, 0.0);
glShadeModel (GL_FLAT);
}
void display(void)
static void display(void)
{
glClear (GL_COLOR_BUFFER_BIT);
glColor3f (1.0, 1.0, 1.0);
@@ -62,7 +62,7 @@ void display(void)
glFlush ();
}
void reshape (int w, int h)
static void reshape (int w, int h)
{
glViewport (0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode (GL_PROJECTION);
@@ -72,7 +72,7 @@ void reshape (int w, int h)
}
/* ARGSUSED1 */
void keyboard(unsigned char key, int x, int y)
static void keyboard(unsigned char key, int x, int y)
{
switch (key) {
case 27:

View File

@@ -48,7 +48,7 @@
/* Initialize linear fog for depth cueing.
*/
void myinit(void)
static void myinit(void)
{
GLfloat fogColor[4] = {0.0, 0.0, 0.0, 1.0};
@@ -67,7 +67,7 @@ void myinit(void)
/* display() draws an icosahedron.
*/
void display(void)
static void display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glColor3f (1.0, 1.0, 1.0);
@@ -75,7 +75,7 @@ void display(void)
glFlush();
}
void myReshape(int w, int h)
static void myReshape(int w, int h)
{
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);

View File

@@ -68,7 +68,7 @@
* probably want to insure that your ModelView matrix has been
* initialized to identity before calling accFrustum().
*/
void accFrustum(GLdouble left, GLdouble right, GLdouble bottom,
static void accFrustum(GLdouble left, GLdouble right, GLdouble bottom,
GLdouble top, GLdouble nnear, GLdouble ffar, GLdouble pixdx,
GLdouble pixdy, GLdouble eyedx, GLdouble eyedy, GLdouble focus)
{
@@ -105,7 +105,7 @@ void accFrustum(GLdouble left, GLdouble right, GLdouble bottom,
*
* Note that accPerspective() calls accFrustum().
*/
void accPerspective(GLdouble fovy, GLdouble aspect,
static void accPerspective(GLdouble fovy, GLdouble aspect,
GLdouble nnear, GLdouble ffar, GLdouble pixdx, GLdouble pixdy,
GLdouble eyedx, GLdouble eyedy, GLdouble focus)
{
@@ -123,7 +123,7 @@ void accPerspective(GLdouble fovy, GLdouble aspect,
pixdx, pixdy, eyedx, eyedy, focus);
}
void myinit(void)
static void myinit(void)
{
GLfloat ambient[] = { 0.0, 0.0, 0.0, 1.0 };
GLfloat diffuse[] = { 1.0, 1.0, 1.0, 1.0 };
@@ -155,7 +155,7 @@ void myinit(void)
glClearAccum(0.0, 0.0, 0.0, 0.0);
}
void renderTeapot (GLfloat x, GLfloat y, GLfloat z,
static void renderTeapot (GLfloat x, GLfloat y, GLfloat z,
GLfloat ambr, GLfloat ambg, GLfloat ambb,
GLfloat difr, GLfloat difg, GLfloat difb,
GLfloat specr, GLfloat specg, GLfloat specb, GLfloat shine)
@@ -182,7 +182,7 @@ void renderTeapot (GLfloat x, GLfloat y, GLfloat z,
* magnitude of the accPerspective() jitter; in this example, 0.33.
* In this example, the teapots are drawn 8 times. See jitter.h
*/
void display(void)
static void display(void)
{
int jitter;
GLint viewport[4];
@@ -214,7 +214,7 @@ void display(void)
glFlush();
}
void myReshape(int w, int h)
static void myReshape(int w, int h)
{
glViewport(0, 0, w, h);
}

View File

@@ -47,7 +47,7 @@
static GLfloat spin = 0.0;
static GLdouble t0 = 0.;
void display(void)
static void display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glPushMatrix();
@@ -59,12 +59,12 @@ void display(void)
glutSwapBuffers();
}
GLdouble gettime(void)
static GLdouble gettime(void)
{
return (GLdouble)(glutGet(GLUT_ELAPSED_TIME)) / 1000.;
}
void spinDisplay(void)
static void spinDisplay(void)
{
GLdouble t, dt;
t = gettime();
@@ -76,13 +76,13 @@ void spinDisplay(void)
glutPostRedisplay();
}
void init(void)
static void init(void)
{
glClearColor (0.0, 0.0, 0.0, 0.0);
glShadeModel (GL_FLAT);
}
void reshape(int w, int h)
static void reshape(int w, int h)
{
glViewport (0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode(GL_PROJECTION);
@@ -93,7 +93,7 @@ void reshape(int w, int h)
}
/* ARGSUSED2 */
void mouse(int button, int state, int x, int y)
static void mouse(int button, int state, int x, int y)
{
switch (button) {
case GLUT_LEFT_BUTTON:

View File

@@ -48,13 +48,13 @@ GLubyte rasters[24] = {
0xff, 0x00, 0xff, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0xc0, 0x00,
0xff, 0xc0, 0xff, 0xc0};
void init(void)
static void init(void)
{
glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
glClearColor (0.0, 0.0, 0.0, 0.0);
}
void display(void)
static void display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glColor3f (1.0, 1.0, 1.0);
@@ -65,7 +65,7 @@ void display(void)
glFlush();
}
void reshape(int w, int h)
static void reshape(int w, int h)
{
glViewport(0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode(GL_PROJECTION);
@@ -75,7 +75,7 @@ void reshape(int w, int h)
}
/* ARGSUSED1 */
void keyboard(unsigned char key, int x, int y)
static void keyboard(unsigned char key, int x, int y)
{
switch (key) {
case 27:

View File

@@ -48,7 +48,7 @@
/* Initialize lighting.
*/
void init(void)
static void init(void)
{
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
@@ -58,7 +58,7 @@ void init(void)
* be clipped. If in feedback mode, a passthrough token
* is issued between the each primitive.
*/
void drawGeometry (GLenum mode)
static void drawGeometry (GLenum mode)
{
glBegin (GL_LINE_STRIP);
glNormal3f (0.0, 0.0, 1.0);
@@ -80,8 +80,8 @@ void drawGeometry (GLenum mode)
}
/* Write contents of one vertex to stdout. */
void print3DcolorVertex (GLint size, GLint *count,
GLfloat *buffer)
static void print3DcolorVertex (GLint size, GLint *count,
GLfloat *buffer)
{
int i;
@@ -94,7 +94,7 @@ void print3DcolorVertex (GLint size, GLint *count,
}
/* Write contents of entire buffer. (Parse tokens!) */
void printBuffer(GLint size, GLfloat *buffer)
static void printBuffer(GLint size, GLfloat *buffer)
{
GLint count;
GLfloat token;
@@ -124,7 +124,7 @@ void printBuffer(GLint size, GLfloat *buffer)
}
}
void display(void)
static void display(void)
{
GLfloat feedBuffer[1024];
GLint size;
@@ -148,7 +148,7 @@ void display(void)
}
/* ARGSUSED1 */
void keyboard(unsigned char key, int x, int y)
static void keyboard(unsigned char key, int x, int y)
{
switch (key) {
case 27:

View File

@@ -52,7 +52,7 @@
GLint fogMode;
void
static void
selectFog(int mode)
{
switch(mode) {
@@ -73,7 +73,7 @@ selectFog(int mode)
/* Initialize z-buffer, projection matrix, light source,
* and lighting model. Do not specify a material property here.
*/
void
static void
myinit(void)
{
GLfloat position[] =
@@ -106,7 +106,7 @@ myinit(void)
}
}
void
static void
renderRedTeapot(GLfloat x, GLfloat y, GLfloat z)
{
float mat[4];
@@ -133,7 +133,7 @@ renderRedTeapot(GLfloat x, GLfloat y, GLfloat z)
/* display() draws 5 teapots at different z positions.
*/
void
static void
display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -145,7 +145,7 @@ display(void)
glFlush();
}
void
static void
myReshape(int w, int h)
{
glViewport(0, 0, w, h);

View File

@@ -53,7 +53,7 @@
#define NUM_COLORS 32
#define RAMPSTART 16
void
static void
myinit(void)
{
int i;
@@ -77,7 +77,7 @@ myinit(void)
/* display() renders 3 cones at different z positions.
*/
void
static void
display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -104,7 +104,7 @@ display(void)
glFlush();
}
void
static void
myReshape(int w, int h)
{
glViewport(0, 0, w, h);

View File

@@ -80,7 +80,7 @@ GLubyte letters[][13] = {
GLuint fontOffset;
void makeRasterFont(void)
static void makeRasterFont(void)
{
GLuint i, j;
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
@@ -96,13 +96,13 @@ void makeRasterFont(void)
glEndList();
}
void init(void)
static void init(void)
{
glShadeModel (GL_FLAT);
makeRasterFont();
}
void printString(char *s)
static void printString(char *s)
{
glPushAttrib (GL_LIST_BIT);
glListBase(fontOffset);
@@ -115,7 +115,7 @@ void printString(char *s)
* to call makeRasterFont() before you start making
* calls to printString().
*/
void display(void)
static void display(void)
{
GLfloat white[3] = { 1.0, 1.0, 1.0 };
@@ -129,7 +129,7 @@ void display(void)
glFlush ();
}
void reshape(int w, int h)
static void reshape(int w, int h)
{
glViewport(0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode(GL_PROJECTION);
@@ -139,7 +139,7 @@ void reshape(int w, int h)
}
/* ARGSUSED1 */
void keyboard(unsigned char key, int x, int y)
static void keyboard(unsigned char key, int x, int y)
{
switch (key) {
case 27:

View File

@@ -42,7 +42,7 @@
#include <stdlib.h>
#include <GL/glut.h>
void display(void)
static void display(void)
{
/* clear all pixels */
glClear (GL_COLOR_BUFFER_BIT);
@@ -64,7 +64,7 @@ void display(void)
glFlush ();
}
void init (void)
static void init (void)
{
/* select clearing color */
glClearColor (0.0, 0.0, 0.0, 0.0);

View File

@@ -58,7 +58,7 @@ GLubyte checkImage[checkImageHeight][checkImageWidth][3];
static GLdouble zoomFactor = 1.0;
static GLint height;
void makeCheckImage(void)
static void makeCheckImage(void)
{
int i, j, c;
@@ -72,7 +72,7 @@ void makeCheckImage(void)
}
}
void init(void)
static void init(void)
{
glClearColor (0.0, 0.0, 0.0, 0.0);
glShadeModel(GL_FLAT);
@@ -80,7 +80,7 @@ void init(void)
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
}
void display(void)
static void display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glRasterPos2i(0, 0);
@@ -89,7 +89,7 @@ void display(void)
glFlush();
}
void reshape(int w, int h)
static void reshape(int w, int h)
{
glViewport(0, 0, (GLsizei) w, (GLsizei) h);
height = (GLint) h;
@@ -100,7 +100,7 @@ void reshape(int w, int h)
glLoadIdentity();
}
void motion(int x, int y)
static void motion(int x, int y)
{
static GLint screeny;
@@ -113,7 +113,7 @@ void motion(int x, int y)
}
/* ARGSUSED1 */
void keyboard(unsigned char key, int x, int y)
static void keyboard(unsigned char key, int x, int y)
{
switch (key) {
case 'r':

View File

@@ -47,7 +47,7 @@
/* Initialize material property, light source, lighting model,
* and depth buffer.
*/
void init(void)
static void init(void)
{
GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 };
GLfloat mat_shininess[] = { 50.0 };
@@ -65,14 +65,14 @@ void init(void)
glEnable(GL_DEPTH_TEST);
}
void display(void)
static void display(void)
{
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glutSolidSphere (1.0, 20, 16);
glFlush ();
}
void reshape (int w, int h)
static void reshape (int w, int h)
{
glViewport (0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode (GL_PROJECTION);
@@ -88,7 +88,7 @@ void reshape (int w, int h)
}
/* ARGSUSED1 */
void keyboard(unsigned char key, int x, int y)
static void keyboard(unsigned char key, int x, int y)
{
switch (key) {
case 27:

View File

@@ -46,13 +46,13 @@
#define drawOneLine(x1,y1,x2,y2) glBegin(GL_LINES); \
glVertex2f ((x1),(y1)); glVertex2f ((x2),(y2)); glEnd();
void init(void)
static void init(void)
{
glClearColor (0.0, 0.0, 0.0, 0.0);
glShadeModel (GL_FLAT);
}
void display(void)
static void display(void)
{
int i;
@@ -104,7 +104,7 @@ void display(void)
glFlush ();
}
void reshape (int w, int h)
static void reshape (int w, int h)
{
glViewport (0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode (GL_PROJECTION);
@@ -113,7 +113,7 @@ void reshape (int w, int h)
}
/* ARGSUSED1 */
void keyboard(unsigned char key, int x, int y)
static void keyboard(unsigned char key, int x, int y)
{
switch (key) {
case 27:

View File

@@ -69,7 +69,7 @@ static void drawLine (void)
glEnd ();
}
void display(void)
static void display(void)
{
GLuint i;
@@ -82,7 +82,7 @@ void display(void)
glFlush ();
}
void reshape(int w, int h)
static void reshape(int w, int h)
{
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);
@@ -97,7 +97,7 @@ void reshape(int w, int h)
}
/* ARGSUSED1 */
void keyboard(unsigned char key, int x, int y)
static void keyboard(unsigned char key, int x, int y)
{
switch (key) {
case 27:

View File

@@ -49,7 +49,7 @@
/* Initialize z-buffer, projection matrix, light source,
* and lighting model. Do not specify a material property here.
*/
void myinit(void)
static void myinit(void)
{
GLfloat ambient[] = { 0.0, 0.0, 0.0, 1.0 };
GLfloat diffuse[] = { 1.0, 1.0, 1.0, 1.0 };
@@ -87,7 +87,7 @@ void myinit(void)
* glTranslatef() is used to move spheres to their appropriate locations.
*/
void display(void)
static void display(void)
{
GLfloat no_mat[] = { 0.0, 0.0, 0.0, 1.0 };
GLfloat mat_ambient[] = { 0.7, 0.7, 0.7, 1.0 };
@@ -260,7 +260,7 @@ void display(void)
glFlush();
}
void myReshape(int w, int h)
static void myReshape(int w, int h)
{
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);

View File

@@ -54,7 +54,7 @@ GLubyte mipmapImage4[4][4][3];
GLubyte mipmapImage2[2][2][3];
GLubyte mipmapImage1[1][1][3];
void makeImages(void)
static void makeImages(void)
{
int i, j;
@@ -98,7 +98,7 @@ void makeImages(void)
mipmapImage1[0][0][2] = 255;
}
void myinit(void)
static void myinit(void)
{
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LESS);
@@ -128,7 +128,7 @@ void myinit(void)
glEnable(GL_TEXTURE_2D);
}
void display(void)
static void display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glBegin(GL_QUADS);
@@ -140,7 +140,7 @@ void display(void)
glFlush();
}
void myReshape(int w, int h)
static void myReshape(int w, int h)
{
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);

View File

@@ -42,13 +42,13 @@
#include <GL/glut.h>
#include <stdlib.h>
void init(void)
static void init(void)
{
glClearColor (0.0, 0.0, 0.0, 0.0);
glShadeModel (GL_FLAT);
}
void draw_triangle(void)
static void draw_triangle(void)
{
glBegin (GL_LINE_LOOP);
glVertex2f(0.0, 25.0);
@@ -57,7 +57,7 @@ void draw_triangle(void)
glEnd();
}
void display(void)
static void display(void)
{
glClear (GL_COLOR_BUFFER_BIT);
glColor3f (1.0, 1.0, 1.0);
@@ -86,7 +86,7 @@ void display(void)
glFlush ();
}
void reshape (int w, int h)
static void reshape (int w, int h)
{
glViewport (0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode (GL_PROJECTION);
@@ -101,7 +101,7 @@ void reshape (int w, int h)
}
/* ARGSUSED1 */
void keyboard(unsigned char key, int x, int y)
static void keyboard(unsigned char key, int x, int y)
{
switch (key) {
case 27:

View File

@@ -58,7 +58,7 @@ static int spin = 0;
/* Initialize material property, light source, lighting model,
* and depth buffer.
*/
void init(void)
static void init(void)
{
glClearColor (0.0, 0.0, 0.0, 0.0);
glShadeModel (GL_SMOOTH);
@@ -72,7 +72,7 @@ void init(void)
* light at a new position in world coordinates. The cube
* represents the position of the light.
*/
void display(void)
static void display(void)
{
GLfloat position[] = { 0.0, 0.0, 1.5, 1.0 };
@@ -96,7 +96,7 @@ void display(void)
glFlush ();
}
void reshape (int w, int h)
static void reshape (int w, int h)
{
glViewport (0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode (GL_PROJECTION);
@@ -107,7 +107,7 @@ void reshape (int w, int h)
}
/* ARGSUSED2 */
void mouse(int button, int state, int x, int y)
static void mouse(int button, int state, int x, int y)
{
switch (button) {
case GLUT_LEFT_BUTTON:
@@ -122,7 +122,7 @@ void mouse(int button, int state, int x, int y)
}
/* ARGSUSED1 */
void keyboard(unsigned char key, int x, int y)
static void keyboard(unsigned char key, int x, int y)
{
switch (key) {
case 27:

View File

@@ -89,7 +89,7 @@ GLUnurbsObj *theNurb;
/* Initialize material property, light source, lighting model,
* and depth buffer.
*/
void myinit(void)
static void myinit(void)
{
GLfloat mat_ambient[] = { 1.0, 1.0, 1.0, 1.0 };
GLfloat mat_diffuse[] = { 1.0, 0.2, 1.0, 1.0 };
@@ -122,7 +122,7 @@ void myinit(void)
gluNurbsProperty(theNurb, GLU_DISPLAY_MODE, GLU_FILL);
}
void display(void)
static void display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -147,7 +147,7 @@ void display(void)
glFlush();
}
void myReshape(int w, int h)
static void myReshape(int w, int h)
{
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);

View File

@@ -51,7 +51,7 @@
#include <stdio.h>
#include <GL/glut.h>
void
static void
myinit(void)
{
glClearColor(0.0, 0.0, 0.0, 0.0);
@@ -65,7 +65,7 @@ myinit(void)
* each rectangle is given the same name. Note that
* each rectangle is drawn with a different z value.
*/
void
static void
drawRects(GLenum mode)
{
if (mode == GL_SELECT)
@@ -100,7 +100,7 @@ drawRects(GLenum mode)
/* processHits() prints out the contents of the
* selection array.
*/
void
static void
processHits(GLint hits, GLuint buffer[])
{
GLint i;
@@ -131,7 +131,7 @@ processHits(GLint hits, GLuint buffer[])
*/
#define BUFSIZE 512
void
static void
pickRects(int button, int state, int x, int y)
{
GLuint selectBuf[BUFSIZE];
@@ -164,7 +164,7 @@ pickRects(int button, int state, int x, int y)
processHits(hits, selectBuf);
}
void
static void
display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -172,7 +172,7 @@ display(void)
glutSwapBuffers();
}
void
static void
myReshape(int w, int h)
{
glViewport(0, 0, w, h);

View File

@@ -49,7 +49,7 @@
int board[3][3]; /* amount of color for each square */
/* Clear color value for every square on the board */
void init(void)
static void init(void)
{
int i, j;
for (i = 0; i < 3; i++)
@@ -64,7 +64,7 @@ void init(void)
* square is determined by its position on the grid, and
* the value in the board[][] array.
*/
void drawSquares(GLenum mode)
static void drawSquares(GLenum mode)
{
GLuint i, j;
for (i = 0; i < 3; i++) {
@@ -85,7 +85,7 @@ void drawSquares(GLenum mode)
/* processHits prints out the contents of the
* selection array.
*/
void processHits (GLint hits, GLuint buffer[])
static void processHits (GLint hits, GLuint buffer[])
{
GLint i;
GLuint j, ii = 0, jj = 0, names, *ptr;
@@ -117,7 +117,7 @@ void processHits (GLint hits, GLuint buffer[])
*/
#define BUFSIZE 512
void pickSquares(int button, int state, int x, int y)
static void pickSquares(int button, int state, int x, int y)
{
GLuint selectBuf[BUFSIZE];
GLint hits;
@@ -152,14 +152,14 @@ void pickSquares(int button, int state, int x, int y)
glutPostRedisplay();
}
void display(void)
static void display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
drawSquares (GL_RENDER);
glFlush();
}
void reshape(int w, int h)
static void reshape(int w, int h)
{
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);
@@ -170,7 +170,7 @@ void reshape(int w, int h)
}
/* ARGSUSED1 */
void keyboard(unsigned char key, int x, int y)
static void keyboard(unsigned char key, int x, int y)
{
switch (key) {
case 27:

View File

@@ -47,7 +47,7 @@
/* Initialize material property, light source, and lighting model.
*/
void myinit(void)
static void myinit(void)
{
GLfloat mat_ambient[] = { 0.0, 0.0, 0.0, 1.0 };
/* mat_specular and mat_shininess are NOT default values */
@@ -75,7 +75,7 @@ void myinit(void)
glEnable(GL_DEPTH_TEST);
}
void drawPlane(void)
static void drawPlane(void)
{
glBegin (GL_QUADS);
glNormal3f (0.0, 0.0, 1.0);
@@ -104,7 +104,7 @@ void drawPlane(void)
glEnd();
}
void display (void)
static void display (void)
{
GLfloat infinite_light[] = { 1.0, 1.0, 1.0, 0.0 };
GLfloat local_light[] = { 1.0, 1.0, 1.0, 1.0 };
@@ -125,7 +125,7 @@ void display (void)
glFlush ();
}
void myReshape(int w, int h)
static void myReshape(int w, int h)
{
glViewport (0, 0, w, h);
glMatrixMode (GL_PROJECTION);

View File

@@ -47,13 +47,13 @@
static int year = 0, day = 0;
void init(void)
static void init(void)
{
glClearColor (0.0, 0.0, 0.0, 0.0);
glShadeModel (GL_FLAT);
}
void display(void)
static void display(void)
{
glClear (GL_COLOR_BUFFER_BIT);
glColor3f (1.0, 1.0, 1.0);
@@ -68,7 +68,7 @@ void display(void)
glutSwapBuffers();
}
void reshape (int w, int h)
static void reshape (int w, int h)
{
glViewport (0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode (GL_PROJECTION);
@@ -80,7 +80,7 @@ void reshape (int w, int h)
}
/* ARGSUSED1 */
void keyboard (unsigned char key, int x, int y)
static void keyboard (unsigned char key, int x, int y)
{
switch (key) {
case 'd':

View File

@@ -60,7 +60,7 @@ GLboolean doubleBuffer;
/* display() draws two spheres, one with a gray, diffuse material,
* the other sphere with a magenta material with a specular highlight.
*/
void display (void)
static void display (void)
{
GLfloat gray[] = { 0.8, 0.8, 0.8, 1.0 };
GLfloat black[] = { 0.0, 0.0, 0.0, 1.0 };
@@ -108,7 +108,7 @@ void display (void)
* create display list with sphere
* initialize lighting and depth buffer
*/
void gfxinit (void)
static void gfxinit (void)
{
GLfloat light_ambient[] = { 0.0, 0.0, 0.0, 1.0 };
GLfloat light_diffuse[] = { 1.0, 1.0, 1.0, 1.0 };
@@ -134,7 +134,7 @@ void gfxinit (void)
}
/* call when window is resized */
void reshape(int width, int height)
static void reshape(int width, int height)
{
glViewport (0, 0, width, height);
glMatrixMode (GL_PROJECTION);
@@ -176,7 +176,7 @@ static void Benchmark( float xdiff, float ydiff )
/* call when mouse button is pressed */
/* ARGSUSED2 */
void mouse(int button, int state, int x, int y) {
static void mouse(int button, int state, int x, int y) {
switch (button) {
case GLUT_LEFT_BUTTON:
switch (state) {
@@ -213,7 +213,7 @@ void mouse(int button, int state, int x, int y) {
}
/* ARGSUSED1 */
void keyboard (unsigned char key, int x, int y)
static void keyboard (unsigned char key, int x, int y)
{
switch (key) {
case 't':
@@ -268,20 +268,7 @@ void keyboard (unsigned char key, int x, int y)
fflush(stdout);
}
static void
key(unsigned char k, int x, int y)
{
switch (k) {
case 27: /* Escape */
exit(0);
break;
default:
return;
}
glutPostRedisplay();
}
GLenum Args(int argc, char **argv)
static GLenum Args(int argc, char **argv)
{
GLint i;

View File

@@ -44,7 +44,7 @@
#include <stdlib.h>
#include <GL/glut.h>
void display(void)
static void display(void)
{
GLubyte fly[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x80, 0x01, 0xC0, 0x06, 0xC0, 0x03, 0x60, 0x04, 0x60, 0x06, 0x20,
@@ -89,7 +89,7 @@ void display(void)
glFlush ();
}
void myinit (void)
static void myinit (void)
{
/* clear background to black */
glClearColor (0.0, 0.0, 0.0, 0.0);

View File

@@ -54,7 +54,7 @@
GLuint startList;
void CALLBACK errorCallback(GLenum errorCode)
static void CALLBACK errorCallback(GLenum errorCode)
{
const GLubyte *estring;
@@ -63,7 +63,7 @@ void CALLBACK errorCallback(GLenum errorCode)
exit(0);
}
void init(void)
static void init(void)
{
GLUquadricObj *qobj;
GLfloat mat_ambient[] = { 0.5, 0.5, 0.5, 1.0 };
@@ -116,9 +116,11 @@ void init(void)
glNewList(startList+3, GL_COMPILE);
gluPartialDisk(qobj, 0.0, 1.0, 20, 4, 0.0, 225.0);
glEndList();
gluDeleteQuadric(qobj);
}
void display(void)
static void display(void)
{
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glPushMatrix();
@@ -148,7 +150,7 @@ void display(void)
glFlush();
}
void reshape (int w, int h)
static void reshape (int w, int h)
{
glViewport(0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode(GL_PROJECTION);
@@ -164,7 +166,7 @@ void reshape (int w, int h)
}
/* ARGSUSED1 */
void keyboard(unsigned char key, int x, int y)
static void keyboard(unsigned char key, int x, int y)
{
switch (key) {
case 27:

View File

@@ -47,13 +47,13 @@
static int shoulder = 0, elbow = 0;
void init(void)
static void init(void)
{
glClearColor (0.0, 0.0, 0.0, 0.0);
glShadeModel (GL_FLAT);
}
void display(void)
static void display(void)
{
glClear (GL_COLOR_BUFFER_BIT);
glPushMatrix();
@@ -77,7 +77,7 @@ void display(void)
glutSwapBuffers();
}
void reshape (int w, int h)
static void reshape (int w, int h)
{
glViewport (0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode (GL_PROJECTION);
@@ -89,7 +89,7 @@ void reshape (int w, int h)
}
/* ARGSUSED1 */
void keyboard (unsigned char key, int x, int y)
static void keyboard (unsigned char key, int x, int y)
{
switch (key) {
case 's':

View File

@@ -49,7 +49,7 @@
/* Initialize material property and light source.
*/
void myinit(void)
static void myinit(void)
{
GLfloat light_ambient[] = { 0.0, 0.0, 0.0, 1.0 };
GLfloat light_diffuse[] = { 1.0, 0.0, 1.0, 1.0 };
@@ -68,7 +68,7 @@ void myinit(void)
glEnable(GL_DEPTH_TEST);
}
void display(void)
static void display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glPushMatrix ();
@@ -95,7 +95,7 @@ void display(void)
glFlush();
}
void myReshape(int w, int h)
static void myReshape(int w, int h)
{
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);

View File

@@ -48,7 +48,7 @@
/* Initialize material property and light source.
*/
void myinit (void)
static void myinit (void)
{
GLfloat light_ambient[] = { 0.0, 0.0, 0.0, 1.0 };
GLfloat light_diffuse[] = { 1.0, 1.0, 1.0, 1.0 };
@@ -67,7 +67,7 @@ void myinit (void)
glEnable(GL_DEPTH_TEST);
}
void display (void)
static void display (void)
{
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -95,7 +95,7 @@ void display (void)
glFlush ();
}
void myReshape(int w, int h)
static void myReshape(int w, int h)
{
glViewport (0, 0, w, h);
glMatrixMode (GL_PROJECTION);

View File

@@ -47,7 +47,7 @@
/* Initialize light source and lighting.
*/
void myinit(void)
static void myinit(void)
{
GLfloat light_ambient[] = { 0.0, 0.0, 1.0, 1.0 };
GLfloat light_diffuse[] = { 1.0, 1.0, 1.0, 1.0 };
@@ -66,7 +66,7 @@ void myinit(void)
glEnable(GL_DEPTH_TEST);
}
void display(void)
static void display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -94,7 +94,7 @@ void display(void)
glFlush();
}
void myReshape(int w, int h)
static void myReshape(int w, int h)
{
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);

View File

@@ -46,7 +46,7 @@
/* Initialize light source and shading model (GL_FLAT).
*/
void myinit(void)
static void myinit(void)
{
GLfloat light_ambient[] = { 0.0, 0.0, 0.0, 1.0 };
GLfloat light_diffuse[] = { 1.0, 1.0, 1.0, 1.0 };
@@ -66,7 +66,7 @@ void myinit(void)
glShadeModel (GL_FLAT);
}
void display(void)
static void display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -94,7 +94,7 @@ void display(void)
glFlush();
}
void myReshape(int w, int h)
static void myReshape(int w, int h)
{
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);

View File

@@ -57,7 +57,7 @@
/* draw a triangle with vertices at (x1, y1), (x2, y2)
* and (x3, y3) at z units away from the origin.
*/
void drawTriangle (GLfloat x1, GLfloat y1, GLfloat x2,
static void drawTriangle (GLfloat x1, GLfloat y1, GLfloat x2,
GLfloat y2, GLfloat x3, GLfloat y3, GLfloat z)
{
glBegin (GL_TRIANGLES);
@@ -68,8 +68,8 @@ void drawTriangle (GLfloat x1, GLfloat y1, GLfloat x2,
}
/* draw a rectangular box with these outer x, y, and z values */
void drawViewVolume (GLfloat x1, GLfloat x2, GLfloat y1,
GLfloat y2, GLfloat z1, GLfloat z2)
static void drawViewVolume (GLfloat x1, GLfloat x2, GLfloat y1,
GLfloat y2, GLfloat z1, GLfloat z2)
{
glColor3f (1.0, 1.0, 1.0);
glBegin (GL_LINE_LOOP);
@@ -101,7 +101,7 @@ void drawViewVolume (GLfloat x1, GLfloat x2, GLfloat y1,
/* drawScene draws 4 triangles and a wire frame
* which represents the viewing volume.
*/
void drawScene (void)
static void drawScene (void)
{
glMatrixMode (GL_PROJECTION);
glLoadIdentity ();
@@ -122,7 +122,7 @@ void drawScene (void)
/* processHits prints out the contents of the selection array
*/
void processHits (GLint hits, GLuint buffer[])
static void processHits (GLint hits, GLuint buffer[])
{
GLint i;
GLuint j, names, *ptr;
@@ -150,7 +150,7 @@ void processHits (GLint hits, GLuint buffer[])
*/
#define BUFSIZE 512
void selectObjects(void)
static void selectObjects(void)
{
GLuint selectBuf[BUFSIZE];
GLint hits;
@@ -181,13 +181,13 @@ void selectObjects(void)
processHits (hits, selectBuf);
}
void init (void)
static void init (void)
{
glEnable(GL_DEPTH_TEST);
glShadeModel(GL_FLAT);
}
void display(void)
static void display(void)
{
glClearColor (0.0, 0.0, 0.0, 0.0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -197,7 +197,7 @@ void display(void)
}
/* ARGSUSED1 */
void keyboard(unsigned char key, int x, int y)
static void keyboard(unsigned char key, int x, int y)
{
switch (key) {
case 27:

View File

@@ -43,13 +43,13 @@
#include <GL/glut.h>
#include <stdlib.h>
void init(void)
static void init(void)
{
glClearColor (0.0, 0.0, 0.0, 0.0);
glShadeModel (GL_SMOOTH);
}
void triangle(void)
static void triangle(void)
{
glBegin (GL_TRIANGLES);
glColor3f (1.0, 0.0, 0.0);
@@ -61,14 +61,14 @@ void triangle(void)
glEnd();
}
void display(void)
static void display(void)
{
glClear (GL_COLOR_BUFFER_BIT);
triangle ();
glFlush ();
}
void reshape (int w, int h)
static void reshape (int w, int h)
{
glViewport (0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode (GL_PROJECTION);
@@ -81,7 +81,7 @@ void reshape (int w, int h)
}
/* ARGSUSED1 */
void keyboard(unsigned char key, int x, int y)
static void keyboard(unsigned char key, int x, int y)
{
switch (key) {
case 27:

View File

@@ -64,7 +64,7 @@
#define YELLOWMAT 1
#define BLUEMAT 2
void myinit (void)
static void myinit (void)
{
GLfloat yellow_diffuse[] = { 0.7, 0.7, 0.0, 1.0 };
GLfloat yellow_specular[] = { 1.0, 1.0, 1.0, 1.0 };
@@ -101,7 +101,7 @@ void myinit (void)
/* Draw a sphere in a diamond-shaped section in the
* middle of a window with 2 tori.
*/
void display(void)
static void display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -132,7 +132,7 @@ void display(void)
/* Whenever the window is reshaped, redefine the
* coordinate system and redraw the stencil area.
*/
void myReshape(int w, int h)
static void myReshape(int w, int h)
{
glViewport(0, 0, w, h);

View File

@@ -87,7 +87,7 @@ CP Sdata[] = {
/* drawLetter() interprets the instructions from the array
* for that letter and renders the letter with line segments.
*/
void drawLetter(CP *l)
static void drawLetter(CP *l)
{
glBegin(GL_LINE_STRIP);
for (;;) {
@@ -111,7 +111,7 @@ void drawLetter(CP *l)
}
/* Create a display list for each of 6 characters */
void myinit (void)
static void myinit (void)
{
GLuint base;
@@ -130,13 +130,13 @@ void myinit (void)
char *test1 = "A SPARE SERAPE APPEARS AS";
char *test2 = "APES PREPARE RARE PEPPERS";
void printStrokedString(char *s)
static void printStrokedString(char *s)
{
GLsizei len = (GLsizei) strlen(s);
glCallLists(len, GL_BYTE, (GLbyte *)s);
}
void display(void)
static void display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0, 1.0, 1.0);

View File

@@ -53,7 +53,7 @@ GLUnurbsObj *theNurb;
* Initializes the control points of the surface to a small hill.
* The control points range from -3 to +3 in x, y, and z
*/
void init_surface(void)
static void init_surface(void)
{
int u, v;
for (u = 0; u < 4; u++) {
@@ -71,7 +71,7 @@ void init_surface(void)
/* Initialize material property and depth buffer.
*/
void myinit(void)
static void myinit(void)
{
GLfloat mat_diffuse[] = { 0.7, 0.7, 0.7, 1.0 };
GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 };
@@ -100,7 +100,7 @@ void myinit(void)
glTranslatef (0.0, 0.0, -5.0);
}
void display(void)
static void display(void)
{
GLfloat knots[8] = {0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0};
int i, j;
@@ -140,7 +140,7 @@ void display(void)
glutSwapBuffers();
}
void reshape(int w, int h)
static void reshape(int w, int h)
{
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);
@@ -150,7 +150,7 @@ void reshape(int w, int h)
glMatrixMode(GL_MODELVIEW);
}
void
static void
menu(int value)
{
switch (value) {
@@ -171,7 +171,7 @@ menu(int value)
int down = 0, lastx;
/* ARGSUSED1 */
void
static void
motion(int x, int y)
{
if (down) {
@@ -182,7 +182,7 @@ motion(int x, int y)
}
/* ARGSUSED3 */
void
static void
mouse(int button, int state, int x, int y)
{
if (button == GLUT_LEFT_BUTTON) {

View File

@@ -47,7 +47,7 @@
/* Initialize light source and lighting model.
*/
void
static void
myinit(void)
{
GLfloat light_ambient[] =
@@ -78,7 +78,7 @@ myinit(void)
glEnable(GL_DEPTH_TEST);
}
void
static void
display(void)
{
GLfloat low_ambient[] =
@@ -114,7 +114,7 @@ display(void)
glFlush();
}
void
static void
myReshape(int w, int h)
{
glViewport(0, 0, w, h);

View File

@@ -49,7 +49,7 @@
* Initialize depth buffer, projection matrix, light source, and lighting
* model. Do not specify a material property here.
*/
void
static void
myinit(void)
{
GLfloat ambient[] =
@@ -83,7 +83,7 @@ myinit(void)
* Move object into position. Use 3rd through 12th parameters to specify the
* material property. Draw a teapot.
*/
void
static void
renderTeapot(GLfloat x, GLfloat y,
GLfloat ambr, GLfloat ambg, GLfloat ambb,
GLfloat difr, GLfloat difg, GLfloat difb,
@@ -117,7 +117,7 @@ renderTeapot(GLfloat x, GLfloat y,
* 3rd column: black, cyan, green, red, white, yellow plastic
* 4th column: black, cyan, green, red, white, yellow rubber
*/
void
static void
display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -173,7 +173,7 @@ display(void)
glFlush();
}
void
static void
myReshape(int w, int h)
{
glViewport(0, 0, w, h);

View File

@@ -61,7 +61,7 @@
GLuint startList;
void display (void) {
static void display (void) {
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0, 1.0, 1.0);
glCallList(startList);
@@ -69,12 +69,12 @@ void display (void) {
glFlush();
}
void CALLBACK beginCallback(GLenum which)
static void CALLBACK beginCallback(GLenum which)
{
glBegin(which);
}
void CALLBACK errorCallback(GLenum errorCode)
static void CALLBACK errorCallback(GLenum errorCode)
{
const GLubyte *estring;
@@ -83,12 +83,12 @@ void CALLBACK errorCallback(GLenum errorCode)
exit(0);
}
void CALLBACK endCallback(void)
static void CALLBACK endCallback(void)
{
glEnd();
}
void CALLBACK vertexCallback(GLvoid *vertex)
static void CALLBACK vertexCallback(GLvoid *vertex)
{
const GLdouble *pointer;
@@ -102,7 +102,7 @@ void CALLBACK vertexCallback(GLvoid *vertex)
* but weight[4] may be used to average color, normal, or texture
* coordinate data. In this program, color is weighted.
*/
void CALLBACK combineCallback(GLdouble coords[3],
static void CALLBACK combineCallback(GLdouble coords[3],
GLdouble *vertex_data[4],
GLfloat weight[4], GLdouble **dataOut )
{
@@ -122,7 +122,7 @@ void CALLBACK combineCallback(GLdouble coords[3],
*dataOut = vertex;
}
void init (void)
static void init (void)
{
GLUtesselator *tobj;
GLdouble rect[4][3] = {{50.0, 50.0, 0.0},
@@ -199,7 +199,7 @@ void init (void)
gluDeleteTess(tobj);
}
void reshape (int w, int h)
static void reshape (int w, int h)
{
glViewport(0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode(GL_PROJECTION);
@@ -208,7 +208,7 @@ void reshape (int w, int h)
}
/* ARGSUSED1 */
void keyboard(unsigned char key, int x, int y)
static void keyboard(unsigned char key, int x, int y)
{
switch (key) {
case 27:

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