Compare commits

...

1792 Commits

Author SHA1 Message Date
Brian Paul
33c0b3e233 patches from Karl 2002-11-13 22:26:23 +00:00
Brian Paul
658145bd82 fix compilation problem (Philippe Houdoin) 2002-11-13 22:21:47 +00:00
Karl Schultz
1b260aee24 Add _mesa_enable_1_4_extensions and _mesa_problem 2002-11-13 20:59:07 +00:00
Brian Paul
9c799cdc49 Lots of clean-ups.
Use new s_spantemp.h to generate all the span functions.
Updated triangle functions (#define NAME, etc)
2002-11-13 16:57:44 +00:00
Brian Paul
b4497c5843 template code for span functions for flat, memory-based frame buffers 2002-11-13 16:54:01 +00:00
Brian Paul
cdf2da368d moved function declaration into the template, define the NAME to specify the function names 2002-11-13 16:51:01 +00:00
Brian Paul
36723b6538 check for NULL span argument 2002-11-13 16:48:47 +00:00
Brian Paul
e21a79bfdd added comments about NULL mask parameter to span-write functions 2002-11-13 16:47:18 +00:00
Brian Paul
4d7a1289ed optimized color buffer clear fallback (use mono-color span functions 2002-11-13 16:46:19 +00:00
Brian Paul
9d88c7d8f4 last tweaks for 5.0 release 2002-11-13 15:33:50 +00:00
Brian Paul
21709b354b init facing to zero 2002-11-13 15:04:29 +00:00
Brian Paul
62d821786c include imports.h 2002-11-13 15:03:31 +00:00
Brian Paul
101b16cf41 minor update 2002-11-13 03:08:15 +00:00
Brian Paul
069ad023b5 omit dmesadxe.h from tar file 2002-11-13 02:34:53 +00:00
Brian Paul
43cb96cbf6 html index to doc files, doxygen files 2002-11-13 02:28:20 +00:00
Brian Paul
1e9d43f56c latest 5.0 bug fixes 2002-11-12 19:32:09 +00:00
Brian Paul
7069a7e3d6 apply scale factor before clapping for DOT3 2002-11-12 19:27:24 +00:00
Brian Paul
d5cbe1e924 removed -malign-jumps 2002-11-12 02:49:14 +00:00
Karl Schultz
d8c6273cf6 Tweaks for hpux. The hpux10 and hpux10-sl targets now build pretty
cleanly.
2002-11-11 18:56:36 +00:00
Brian Paul
68b1d5c315 compilation fixes 2002-11-11 18:42:38 +00:00
Brian Paul
f104619b8f changes to vishandle usage to prevent segfault in some circumstances 2002-11-10 17:07:06 +00:00
Brian Paul
04cf6f4958 added Z calculation fix 2002-11-09 21:29:08 +00:00
Brian Paul
ad8cd6111e fix float->int Z calculation in _mesa_span_default_z() 2002-11-09 21:28:41 +00:00
Brian Paul
e307931314 fix one-bit error in float->int Z calculation 2002-11-09 21:26:41 +00:00
Brian Paul
2dee6187e4 added P4 / 3DNow bug fix 2002-11-09 20:41:13 +00:00
Keith Whitwell
b6d90e50ea fix 3dnow misdetection on new p4's 2002-11-09 17:43:58 +00:00
Brian Paul
aa80f05484 multisample / polygon smooth test 2002-11-08 18:30:26 +00:00
Karl Schultz
af76b4280c Add instructions to unzip both zip files into the same directory. 2002-11-08 18:00:04 +00:00
Brian Paul
456bc69ac4 declare tempI as Int, not Real (Jon Perry) 2002-11-08 17:38:13 +00:00
Brian Paul
872c9baf00 fixed active stencil face query 2002-11-08 15:51:17 +00:00
Brian Paul
0b0245c160 minor clean-up 2002-11-08 15:49:31 +00:00
Brian Paul
2c9e7ae38b fixed active stencil face query bug 2002-11-08 15:39:58 +00:00
Brian Paul
7a4a6a3c4c fixed a few category lines 2002-11-08 15:38:48 +00:00
Brian Paul
d1efbf0456 implemented automatic code gen and individual function validation 2002-11-08 15:35:46 +00:00
Brian Paul
6e40539490 added a few more missing 1.4 entrypoints 2002-11-07 16:37:12 +00:00
Brian Paul
7348df5937 added glBlendFuncSeparate, glMultiDrawArrays, glMultiDrawElements 2002-11-07 16:34:58 +00:00
Brian Paul
c542351085 added glFogCoord functions 2002-11-07 16:24:27 +00:00
Brian Paul
1cfae1adb2 added 1.4 functions 2002-11-07 16:23:40 +00:00
Brian Paul
42ace1c150 added missing 1.4 glFogCoord functions 2002-11-07 16:20:20 +00:00
Brian Paul
cf1c860a34 surround fixedEdges decl by #ifndef NDEBUG / #endif 2002-11-07 14:17:05 +00:00
Brian Paul
8bfc9d71aa restored fixedEdges var (for VMS) 2002-11-06 16:09:04 +00:00
Brian Paul
36b9b0e9d1 latest 5.0 bug fixes 2002-11-06 15:18:26 +00:00
Brian Paul
f48216ad0f a few dispatch pointers weren't set (glGenTexturesEXT for example) 2002-11-06 15:16:23 +00:00
Jouk Jansen
0d88328c7e Committing in .
OpenVMS issues

 Modified Files:
 	Mesa/si-glu/mesaglu.opt Mesa/src/mmath.h
 ----------------------------------------------------------------------
2002-11-06 13:39:23 +00:00
Brian Paul
66ab727101 minor multi-sample clean-ups 2002-11-05 21:11:18 +00:00
Brian Paul
25af66a67f added some printfs to show current polygon mode and cull state 2002-11-05 20:59:16 +00:00
Brian Paul
aca31cf6de fixed glTexParameteriv(GL_TEXTURE_BORDER_COLOR) error 2002-11-05 20:58:37 +00:00
Brian Paul
c4b40cc404 added GLUT and DOS updates 2002-11-05 20:53:42 +00:00
Brian Paul
aa3029bce1 Updates for DOS driver from Daniel Borca. 2002-11-05 20:52:07 +00:00
Brian Paul
8a738db519 support for GLX_ARB_multisample 2002-11-04 22:20:28 +00:00
Brian Paul
4b01eb6e08 minor revision to 4.1 features 2002-11-04 20:31:55 +00:00
Brian Paul
7d4d41a984 FX driver fixes 2002-11-04 20:31:09 +00:00
Brian Paul
8115e29ddc misc driver updates (Daniel Borca) 2002-11-04 20:29:04 +00:00
Brian Paul
df45a985ed glxinfo update 2002-11-04 16:25:42 +00:00
Brian Paul
d2e39bb050 add support for GLX_ARB_multisample 2002-11-04 16:24:18 +00:00
Brian Paul
969e1ac233 fix for HPUX 2002-11-01 23:49:59 +00:00
Brian Paul
772752449d HPUX fixes 2002-11-01 23:46:53 +00:00
Brian Paul
a85fae9cb0 silence a bunch of warnings 2002-11-01 23:45:30 +00:00
Brian Paul
034e8641bb renamed abs() function glu_abs() 2002-11-01 23:35:07 +00:00
Brian Paul
026b40f416 fix a typo 2002-11-01 17:42:03 +00:00
Brian Paul
561e6723cf list bug fixes in 5.0 2002-10-31 17:19:03 +00:00
Brian Paul
e89f0792eb tweak pipeline flags for vertex programming 2002-10-31 17:14:37 +00:00
Brian Paul
e0e6bd7ae1 fix the occasional missing triangle bug 2002-10-31 17:14:16 +00:00
Brian Paul
36481524ba simple GL_EXT_stencil_wrap test program 2002-10-31 15:25:07 +00:00
Brian Paul
07624e347b fix a few HPUX problems 2002-10-31 14:58:36 +00:00
Keith Whitwell
9627ed0631 Add a note about window map behaviour and the autotuning of nr of loops which
can conspire to make it look like clearspd is exposing an intermittent driver
bug...
2002-10-31 12:38:32 +00:00
Brian Paul
8d43976858 added a comment about future work 2002-10-30 20:40:46 +00:00
Brian Paul
9167d04dea s/getenv/_mesa_getenv/ 2002-10-30 20:25:15 +00:00
Brian Paul
2ad5921cf3 use wrappers from imports.h rather than stdio, stdlib, etc functions. 2002-10-30 20:24:45 +00:00
Brian Paul
e1e867c3b2 remove some stray debug/abort code 2002-10-30 20:18:38 +00:00
Brian Paul
4663bd50f1 don't call abort() 2002-10-30 20:16:43 +00:00
Brian Paul
68a7ee5cbb s/printf/_mesa_printf/ 2002-10-30 19:59:33 +00:00
Brian Paul
36b518a7ca s/sprintf/_mesa_sprintf/ 2002-10-30 19:58:58 +00:00
Brian Paul
f16a66e97d remove debug printf 2002-10-30 19:57:21 +00:00
Brian Paul
6ec6b845fd s/BZERO/_mesa_bzero/ 2002-10-30 19:49:29 +00:00
Brian Paul
9dc11a3e38 test both XFree86LOADER and IN_MODULE to see if we're being built as the glx module 2002-10-30 19:44:41 +00:00
Brian Paul
c5934054f3 fix potential bug in _mesa_align_calloc/malloc (Frank van Heesch) 2002-10-30 19:40:20 +00:00
Brian Paul
3160edec33 more version bumps 2002-10-29 23:53:22 +00:00
Brian Paul
b2289a944e minor updates 2002-10-29 23:42:48 +00:00
Brian Paul
42649700e2 bump OpenGL version to 1.4, Mesa version to 5.0 2002-10-29 23:09:37 +00:00
Brian Paul
ebe0b30c3e preparation for 5.0 release 2002-10-29 22:42:04 +00:00
Brian Paul
9bd8f97ea4 update versioning/extensions for OpenGL 1.4 / Mesa 5.0 2002-10-29 22:32:50 +00:00
Brian Paul
46b3f97654 fix culling problem (bug 630649) 2002-10-29 22:25:57 +00:00
Brian Paul
05a4b37707 updated email addresses 2002-10-29 20:28:36 +00:00
Brian Paul
fd062077c6 set release date 2002-10-29 15:06:37 +00:00
Brian Paul
153f15497c init a few more fields in _mesa_initialize_visual() 2002-10-29 15:04:35 +00:00
Brian Paul
dec2a4d4b7 added some casts for mallocs (bug 630379) 2002-10-29 15:03:14 +00:00
Karl Schultz
d3975341e7 Add casts to quiet compiler warnings. 2002-10-28 23:01:24 +00:00
Karl Schultz
5f1651ddc5 export new functions. 2002-10-28 23:00:50 +00:00
Brian Paul
367d308b82 wrapped a few more C library functions 2002-10-25 21:06:26 +00:00
Brian Paul
e781aec85d #include fixes 2002-10-25 18:47:56 +00:00
Brian Paul
a4f0b6884c added skybox and options to load real images 2002-10-25 17:20:26 +00:00
Brian Paul
92c195211a remove all.h, mem.h, mem.c 2002-10-25 13:50:48 +00:00
Jouk Jansen
c2836e9ac6 Committing in .
Removed src/mem.c from OpenVMS makefile

 Modified Files:
 	Mesa/src/descrip.mms
 ----------------------------------------------------------------------
2002-10-25 08:26:26 +00:00
Brian Paul
46458ba213 include GL/glx.h 2002-10-25 00:01:58 +00:00
Brian Paul
3c63452e64 Header file clean-up:
1. Remove all.h and PC_HEADER junk.
2. Rolled mem.c and mem.h into imports.c and imports.h
3. Include imports.h instead of mem.h
Restore _mesa_create/initialize_context() to be like they were in 4.0.4
New wrappers for a few std C functions: _mesa_atoi(), _mesa_strstr(), etc.
2002-10-24 23:57:19 +00:00
Brian Paul
d0add7cf1a added missing code to copy texrect state 2002-10-23 14:53:27 +00:00
Brian Paul
cca4dedbfd stex3d updated 2002-10-23 14:01:38 +00:00
Brian Paul
4fbdedc0d5 massive overhaul, see new keyboard options 2002-10-23 14:00:01 +00:00
Keith Whitwell
47fe2fc105 Fix projtex interp bug 2002-10-23 10:24:27 +00:00
Brian Paul
8e6926f7c3 added glDeleteTextures refcount bug fix 2002-10-22 15:17:34 +00:00
Brian Paul
e9283774dc remove debug printfs 2002-10-22 15:15:41 +00:00
Brian Paul
cf46208624 fix refcount error in _mesa_DeleteTextures (Randy Fayan) 2002-10-22 15:14:49 +00:00
Brian Paul
e6962b183d add missing texture rectangle code in _mesa_DeleteTextures() 2002-10-22 15:08:59 +00:00
Brian Paul
60b003e197 added GL_ATI_texture_mirror_once 2002-10-21 15:53:06 +00:00
Brian Paul
c7a219ec6f GL_ATI_texture_mirror_once extension (Ian Romanick) 2002-10-21 15:52:34 +00:00
Brian Paul
ac9a65b1dd doxygen comments (Klaus Niederkrueger) 2002-10-21 15:06:26 +00:00
Brian Paul
ef31f60b12 new _mesa_max_texture_levels() helper function - not used everywhere yet 2002-10-18 18:03:04 +00:00
Karl Schultz
53d30c56eb Quiet compiler warnings. 2002-10-18 17:47:35 +00:00
Brian Paul
2ce0654eba implement auto mipmap generation for compressed textures 2002-10-18 17:41:45 +00:00
Karl Schultz
8eaa290216 Add casts to quiet compiler warnings. 2002-10-18 17:02:00 +00:00
Brian Paul
6ac04f2fc6 fix bug in GL_MIRRORED_REPEAT_ARB (Ian Romanick) 2002-10-18 13:40:59 +00:00
Brian Paul
6e1ceff48b latest fixes 2002-10-18 13:28:55 +00:00
Brian Paul
e716549618 only allow intformat==GL_COLOR_INDEX if EXT_paletted_texture is supported 2002-10-18 13:24:08 +00:00
Brian Paul
8c2a1f0e4d check for GL_EXT_paletted_texture 2002-10-18 13:23:19 +00:00
Karl Schultz
798d83cf67 Add casts to quiet compiler warnings. 2002-10-17 22:26:06 +00:00
Karl Schultz
6afdc0bec2 Put back the include of windows.h so we are back to version 17 of the file. 2002-10-17 21:03:22 +00:00
Karl Schultz
3e2fa3fd5c Change for Windows only: Make demos and examples build again.
Move the inclusion of windows.h from glext.h to gl.h.  There are a few
good reasons for this:
- Including it in gl.h is more strightforward and makes it easier to
troubleshoot include file problems.  It was sometimes hard to find it
in glext.h.
- Needed to define APIENTRY correctly.  APIENTRY is used in gl.h.
- glut.h needs windows.h but does not include it, expecting the app to
include it.  Including it in gl.h if not already included by the app
makes glut.h happy.  This allows one to write a gl/glut app without
explictly including windows.h, which may only be really important for
toy apps like our samples and demos.  But a "real" app can still
include windows.h if it wants.
2002-10-17 19:39:31 +00:00
Brian Paul
bc36ee25d8 new wrap modes (Ian Romanick) 2002-10-17 17:39:37 +00:00
Brian Paul
944ea204a8 s/functionOffset/offset/ 2002-10-17 16:29:17 +00:00
Brian Paul
10d343f407 patches from Gerk Huisma for float-channel rendering 2002-10-17 15:26:38 +00:00
Brian Paul
673077c613 applied Philippe Houdoin's patch, plus minor clean-ups 2002-10-17 14:25:30 +00:00
Brian Paul
8dfc5b9863 surround vertex program code with #if FEATURE_NV_vertex_program/#endif 2002-10-16 17:57:51 +00:00
Brian Paul
e32b909054 remove some crud 2002-10-16 17:57:03 +00:00
Brian Paul
2efb3029f0 remove lowpc.c and highpc.c 2002-10-15 15:55:45 +00:00
Brian Paul
10882b17c9 removed highpc.c and lowpc.c 2002-10-15 15:54:23 +00:00
Brian Paul
0977fa67b8 update file list for tar file 2002-10-15 15:40:57 +00:00
Brian Paul
f7657d037e make a few static function non-static for highpc.c 2002-10-15 15:36:26 +00:00
Brian Paul
d2ec14c4aa remove 'beta' from GL_VERSION string 2002-10-15 15:23:16 +00:00
Brian Paul
d4ffbe4cca allow querying of glut functions via glutGetProcAddress() 2002-10-15 15:23:02 +00:00
Brian Paul
dfedb8b78e added gluTessNormal() dummy function 2002-10-15 14:45:19 +00:00
Brian Paul
9d00b68482 added missing glFinish() 2002-10-15 14:44:53 +00:00
Brian Paul
7c5282d2a8 minor updates 2002-10-15 14:43:55 +00:00
Brian Paul
f2e21e1026 added latest 4.1 changes 2002-10-15 14:41:48 +00:00
Brian Paul
11fd2d7558 disable wsPriv field in __GLdrawablePrivateRec to match XFree86/DRI 2002-10-14 17:12:01 +00:00
Brian Paul
60b6e4fd7e context-related cleanups (ex: _mesa_notifySwapBuffers instead of _mesa_swapbuffers) 2002-10-14 17:08:17 +00:00
Brian Paul
795ae30787 Glide driver disabled by default 2002-10-14 14:19:11 +00:00
Brian Paul
45c569860c print transparent pixel info when using -v option (Gerd Sussner) 2002-10-14 13:57:23 +00:00
Brian Paul
cb4253a546 added missing GLX_TRANSPARENT_RGB 2002-10-14 13:52:27 +00:00
Brian Paul
2871f57bcf check EXT_point_parameters before calling PointParameterfvEXT() 2002-10-11 21:42:08 +00:00
Brian Paul
32d0d5aec4 init swrast->CurrentBuffer 2002-10-11 17:50:59 +00:00
Brian Paul
f58826db57 updated info about glRead/DrawBuffers() 2002-10-11 17:42:48 +00:00
Brian Paul
8ad1076dc2 Another round of glRead/DrawBuffer() clean-ups and simplifications.
Replaced ctx->Color._DriverDrawBuffer with swrast->CurrentBuffer.
Replaced ctx->Pixel._DriverReadBuffer with ctx->Pixel._ReadSrcMask.
swrast->Driver.SetBuffer() takes FRONT/BACK_LEFT/RIGHT_BIT values now.
Added tokens and code for GL_AUX buffers, for completeness.
2002-10-11 17:41:03 +00:00
Brian Paul
9e84910749 undo previous check-in (check if ctx->Color.DrawBuffer == mode) 2002-10-11 15:17:12 +00:00
Keith Whitwell
b110ca34f0 lineloop fix 2002-10-11 08:24:13 +00:00
Brian Paul
d54d4633fd check mode for no change in _mesa_Read/DrawBuffer() 2002-10-11 00:02:16 +00:00
Brian Paul
813c96f458 updated porting info 2002-10-10 23:49:02 +00:00
Keith Whitwell
fbc236b401 add GL_UNPACK_CLIENT_STORAGE_APPLE gets 2002-10-10 18:03:44 +00:00
Brian Paul
23cdcede5d check texImage->IsClientData before freeing memory 2002-10-10 14:12:09 +00:00
Brian Paul
71072be182 disable _glapi_set_warning_func() call as it's not present in older libGLs 2002-10-10 00:22:13 +00:00
Brian Paul
0670eb259d removed old TEXTURE0_ defines 2002-10-09 23:56:32 +00:00
Brian Paul
433a084130 removed old VERT_* defines, use VERT_BIT_* instead 2002-10-09 19:45:53 +00:00
Brian Paul
008a5dd7bb use new vertex bitfield tokens 2002-10-09 19:38:32 +00:00
Brian Paul
85678e0399 disable wscx field in __GLimportsRec to be consistant with XFree86 2002-10-09 19:37:32 +00:00
Brian Paul
c20579d651 XFree86 fixes (clib macro wrappers) 2002-10-09 19:36:24 +00:00
Brian Paul
f2c5296dd7 disable XMesaCreatePBuffer() for XFree86 2002-10-09 19:35:11 +00:00
Brian Paul
59c5cf35c9 finally get rid of ctx->Texture._ReallyEnabled field 2002-10-08 23:59:33 +00:00
Brian Paul
614301faca fix a typo 2002-10-08 23:58:55 +00:00
Brian Paul
ece3e63c98 change fog from GLfloat to GLfloat[4] (like other vertex attribs) 2002-10-08 23:57:50 +00:00
Brian Paul
5fd1cc2e0e s/glVertexAttrib4fNV/_glapi->Dispatch->VertexAttrib4fNV/ 2002-10-08 23:57:13 +00:00
Brian Paul
d3f6b0559f added missing dispatch code for new AGP-related functions 2002-10-08 23:16:26 +00:00
Brian Paul
b5974db277 import from DRI CVS 2002-10-08 23:14:43 +00:00
Brian Paul
8455203bc7 GLX_NV_vertex_array_range and GLX_MESA_agp_offset extensions 2002-10-08 22:47:53 +00:00
Jouk Jansen
f72a3da697 Committing in .
Add compile support in the xdemos directory for OpenVMS

 Modified Files:
 	Mesa/descrip.mms Mesa/xdemos/descrip.mms
 	Mesa/xdemos/glxgears.c
 ----------------------------------------------------------------------
2002-10-08 08:38:26 +00:00
Brian Paul
cf69eeb1aa removed old comment 2002-10-07 15:03:14 +00:00
Brian Paul
73029c5d75 added GLX_SGIX_fbconfig and GLX_SGIX_pbuffer 2002-10-05 18:32:38 +00:00
Brian Paul
5687740762 added pbinfo and pbdemo programs 2002-10-05 18:30:46 +00:00
Brian Paul
21666e3db4 pbuffer info and demo programs 2002-10-05 18:30:13 +00:00
Brian Paul
e4656003ca Pbuffers seem to work! 2002-10-05 18:27:41 +00:00
Brian Paul
fa647e8336 added XMesaCreatePBuffer() 2002-10-05 03:03:37 +00:00
Brian Paul
3265fe5f8e more work on fbconfig/pbuffer support 2002-10-05 03:02:34 +00:00
Brian Paul
f42d366bb6 GLfloat/GLchan updates 2002-10-05 03:02:01 +00:00
Brian Paul
4b334b2db6 restore ACCUM_BITS to 16 2002-10-05 03:01:28 +00:00
Karl Schultz
6640bc3bfa include procs for compressed textures 2002-10-04 23:11:03 +00:00
Karl Schultz
248b3cf727 remove const storage class specifier for the decl of a var that isn't
a const.
2002-10-04 23:10:06 +00:00
Brian Paul
072edaf126 updated list of internal changes in 4.1 2002-10-04 19:10:27 +00:00
Brian Paul
fc80ad6e62 Changed a number of context fields from GLchan to GLfloat (such as ClearColor).
Also changed parameter types for some driver functions (like ctx->Driver.Clear-
Color).  Updated all the device drivers.
Someday, we want to support 8, 16 and 32-bit channels dynamically at runtime.
2002-10-04 19:10:06 +00:00
Brian Paul
f782b8189e multiple GL_POINTS can now be rendered together into one fragment span 2002-10-04 17:37:45 +00:00
Karl Schultz
f8acbed50d Fix for bug 618459. Mods to allow compilation on VC++ 5.0 (Michael Krause) 2002-10-04 15:58:33 +00:00
Brian Paul
a42e7c9172 record GL_INVALID_VALUE in glVertexAttrib*NV() if index > 15 2002-10-03 23:27:22 +00:00
Brian Paul
be99e845bd finished up GL_EXT_stencil_two_side 2002-10-02 23:24:04 +00:00
Brian Paul
0adce5d0ed removed unused ctx->Polygon.OffsetMRD 2002-10-02 22:05:55 +00:00
Brian Paul
641b2307ec removed ctx->Polygon._OffsetAny - not really needed 2002-10-02 21:44:08 +00:00
Brian Paul
8420ad94f2 bring over from 4.0.4 branch 2002-10-02 17:32:26 +00:00
Brian Paul
d8419c730e better error checking related to YCbCr images 2002-10-02 17:25:05 +00:00
Brian Paul
54f3aab0c7 _glapi_get_proc_address() now always returns a valid dispatch stub function
(provided we're on x86 or SPARC).  Later, _glapi_add_entrypoint() will fix-up
the dispatch offset (which was -1).  This will allow DRI libGL to avoid
probing for drivers.
2002-10-02 01:51:44 +00:00
Jouk Jansen
a329d68903 Committing in .
texcompress.c added to OpenVMS makefile.

 Modified Files:
 	Mesa/src/descrip.mms
 ----------------------------------------------------------------------
2002-09-27 14:47:24 +00:00
Brian Paul
89fb06fcc1 new texture compression infrastructure 2002-09-27 02:45:37 +00:00
Brian Paul
1a0bfdc8c1 fix bug in index_mask() (bug 609837) 2002-09-23 17:21:53 +00:00
Brian Paul
681b8c9d1b merge gl_texture_image RowStride from DRI 4.0.4 2002-09-23 16:37:13 +00:00
Brian Paul
b7808884bb update from Daniel Borca 2002-09-21 22:45:37 +00:00
Brian Paul
551b65f137 GL_MESA_pack_invert 2002-09-21 17:34:56 +00:00
Brian Paul
c5b9950660 updates from 4.0.4 (MESA_ycbcr_texture, APPLE_client_storage, etc) 2002-09-21 16:51:25 +00:00
Brian Paul
c62aeed003 merge updates from 4.0.4 2002-09-21 16:47:09 +00:00
Brian Paul
f022463aa6 added src/BeOS/*.h to file list 2002-09-19 16:36:52 +00:00
Brian Paul
5b18bb6a60 stencil two-side and 3dfx fix 2002-09-19 16:34:55 +00:00
Brian Paul
ca6647b307 two-side stencil info 2002-09-19 16:34:29 +00:00
Brian Paul
473e51f2fb Updated BeOS support (Philippe Houdoin) 2002-09-19 16:19:43 +00:00
Brian Paul
cbc1fb0a9a push and pop ESI (Daniel Borca) 2002-09-19 16:07:32 +00:00
Brian Paul
b6e04ee7c8 obsolete 2002-09-19 16:05:01 +00:00
Brian Paul
a9be374f82 pull-in changes from DRI/Mesa-4.0.4 2002-09-17 15:46:34 +00:00
Brian Paul
e1cb2fb571 remove GLint t, pass target to _mesa_init_teximage_fields() 2002-09-17 14:14:18 +00:00
Brian Paul
d5bbbd41c4 fixed _mesa_generate_mipmaps() target problem 2002-09-16 17:57:14 +00:00
Brian Paul
8cd2d0e782 more detailed _mesa_error() messages 2002-09-16 17:56:02 +00:00
Brian Paul
c84e84a734 doxygen comments 2002-09-16 17:55:36 +00:00
Brian Paul
57aca2bf6e fixed pixel pack bug in glGetTexImage() 2002-09-14 16:51:34 +00:00
Karl Schultz
99683bd830 Mark destroyed context as not current. (Frank Warmerdam) 2002-09-12 17:05:55 +00:00
Brian Paul
4991d0f9f3 optimizations to _math_matrix_rotate() (Rudolf Opalla) 2002-09-12 16:26:04 +00:00
Brian Paul
3ce6dc7f1d more detailed _mesa_error() strings 2002-09-08 17:29:16 +00:00
Brian Paul
6c25e3a111 incorrect dimenstion passed to texture_error_check() in compressed teximage functions 2002-09-06 14:42:04 +00:00
Brian Paul
3f25b1a358 removed GL_MAX_CONVOLUTION_WIDTH/HEIGHT 2002-09-06 13:00:50 +00:00
Brian Paul
57df24a86c don't query GL_MAX_CONVOLUTION_WIDTH/HEIGHT 2002-09-06 12:58:56 +00:00
Brian Paul
28bc6cb479 minor updates to sync with XFree86 2002-09-06 03:47:34 +00:00
Brian Paul
2f7ef5fae8 added -l option to print interesting OpenGL limits 2002-09-06 03:35:43 +00:00
Brian Paul
e41c57758d fixed glSampleCoverage typo 2002-09-06 03:30:20 +00:00
Brian Paul
7d7ec0ea91 implemented glProgramParameters4[df]vNV() 2002-09-06 03:25:03 +00:00
Brian Paul
6a1e1623fd hook-up dispatch for glActiveStencilFaceEXT() 2002-09-06 03:20:21 +00:00
Brian Paul
fdaa72bc43 added GL_EXT_stencil_two_side and GL_NV_fence 2002-09-06 03:19:32 +00:00
Brian Paul
5f60a0b50a GL_EXT_stencil_two_side extension, not 100% complete yet. 2002-09-06 02:56:08 +00:00
Brian Paul
a2ae6faf1a removed glext.h fix-ups corrected in glext.h version 17 2002-09-06 02:52:23 +00:00
Brian Paul
e14c151f0a version 17 2002-09-06 02:48:09 +00:00
Brian Paul
530d4611eb added OpenGL 1.4 entrypoints 2002-09-06 02:46:08 +00:00
Brian Paul
3a03211aee added GL_IBM_texture_mirrored_repeat (Ian Romanick) 2002-09-05 21:16:30 +00:00
Brian Paul
e7abc078ab test for ARB_texture_cube_map when getting GL version(Ian Romanick) 2002-09-05 21:14:36 +00:00
Jouk Jansen
0a7fc572a7 Committing in .
Adding vsnprintf support for OpenVMS (needed in src/imports.c)

 Modified Files:
 	Mesa/src/Makefile.am Mesa/src/descrip.mms
 Added Files:
 	Mesa/src/vsnprintf.c
 ----------------------------------------------------------------------
2002-09-05 08:38:01 +00:00
Brian Paul
7e35cc53ce updated wglGetProcAddress 2002-09-04 14:14:36 +00:00
Brian Paul
528afb5ff4 updated DOS file list 2002-09-03 18:14:08 +00:00
Brian Paul
05ed911aca updates from Daniel Borca 2002-09-03 18:11:32 +00:00
Brian Paul
b9f75444e6 improved error string 2002-09-03 18:05:17 +00:00
Brian Paul
ba88dd0d92 s/5/NUM_TEXTURE_TARGETS/ 2002-09-03 18:03:45 +00:00
Brian Paul
ed00b2ef33 fixed compilation problem for swdd->SetBuffer 2002-09-03 17:10:54 +00:00
Brian Paul
391876e5e6 fix up stuff accidentaly checked in a few days ago 2002-08-29 14:02:27 +00:00
Karl Schultz
53880a85b6 Don't call _mesa_initialize_context because we are using
_mesa_create_context.  This avoids calling initialize twice and fixes
memory leaks.  Add call to free the GL context because we are creating it
with _mesa_create_context, fixing another leak.
2002-08-28 18:26:38 +00:00
Brian Paul
41771982c4 define GLAPIENTRY and GLAPI if not defined in gl.h 2002-08-27 21:47:31 +00:00
Brian Paul
fb657ef91d added glXAllocate/FreeMemoryNV() 2002-08-22 21:10:37 +00:00
Brian Paul
8fefafa220 stub functions for glXAllocate/FreeMemoryNV() 2002-08-22 21:10:01 +00:00
Brian Paul
2188d002df minor error message changes 2002-08-21 16:39:39 +00:00
Brian Paul
62166908a9 re-enable ASSIGN_NORM_GROUP( 3dnow ) 2002-08-21 13:07:17 +00:00
Brian Paul
1e0241d3c6 replace Current.Color with Current.Attrib[VERT_ATTRIB_COLOR0] 2002-08-21 13:05:37 +00:00
Keith Whitwell
713800a495 update colormaterial state on swtcl wakeup 2002-08-21 10:39:59 +00:00
Brian Paul
2b930072b3 s/DrawDestMask/_DrawDestMask/ 2002-08-21 02:59:31 +00:00
Brian Paul
b79e99ad60 s/ProjectedClipPtr/NdcPtr/ 2002-08-21 02:59:00 +00:00
Brian Paul
3ac01f5e47 fix problems in FXgetImage() 2002-08-21 02:57:58 +00:00
Brian Paul
34713c1a3c fixed array index typo in VERT_SAVE_RGBA() macro 2002-08-21 02:56:58 +00:00
Brian Paul
5117a8214d added multitexture and line stipple 2002-08-17 00:30:36 +00:00
Brian Paul
f569dc447a minor tweaks 2002-08-17 00:29:55 +00:00
Brian Paul
9f7011b88b added error checking for glCallLists() type parameter 2002-08-17 00:26:29 +00:00
Brian Paul
af3265fabd added new GLUT features 2002-08-17 00:23:19 +00:00
Brian Paul
6bf6cd3418 bump lib version to 3.7.1, more make clean commands 2002-08-17 00:20:48 +00:00
Brian Paul
7ae671446a added glutGetProcAddress() 2002-08-17 00:12:48 +00:00
Brian Paul
46a035f76d added glutGetProcAddress() and GLUT_FPS env var option 2002-08-17 00:12:12 +00:00
Karl Schultz
10730663a1 Add note about needing to run VCVARS32.BAT when compiling.
Add book and samples to the list of dirs that are built.
Reword some notes about the build process.
2002-08-15 15:13:31 +00:00
Brian Paul
1972ac661c added (char *) casts 2002-08-08 17:12:38 +00:00
Brian Paul
3efe5beefc fix up resulting FOGC and PSIZ when needed 2002-08-08 16:55:56 +00:00
Brian Paul
352c13f783 init tmp->Normal.size = 3 2002-08-08 16:55:17 +00:00
Brian Paul
ebe671cfad comments 2002-08-08 16:54:43 +00:00
Brian Paul
ea53a5b5ab change GLvector3f to GLvector4f for normal transformation 2002-08-08 16:53:12 +00:00
Brian Paul
946ad2720a change dest stride to 16 bytes instead of 12 2002-08-08 15:36:50 +00:00
Brian Paul
2a1abe3b46 initialize SWvertex array to zeros 2002-08-08 00:41:11 +00:00
Brian Paul
fb8ca95dff changed normal stride from 12 to 16 bytes since normals are now GLfloat[4] (for vertex program) 2002-08-07 16:40:18 +00:00
Brian Paul
a4ac844979 re-check-in - something didn't work on the previous check-in 2002-08-07 15:18:42 +00:00
Brian Paul
e968686133 latest bug fixes 2002-08-07 00:46:17 +00:00
Brian Paul
77df88727c struct sw_span is again allocated on the stack, but the arrays of span
data are broken out into a new struct span_arrays which is allocated
per-context (to avoid huge stack allocations - a problem on Windows).
This lets us use span.redStep instead of span->redStep (for example) to
hopefully get slightly better performance in the triangle functions.
2002-08-07 00:45:07 +00:00
Karl Schultz
2353e96c32 Coerce vsnprintf to _vsnprintf for windows 2002-08-03 16:19:20 +00:00
Brian Paul
971df9b389 misc updates 2002-08-01 15:16:46 +00:00
Brian Paul
c2656d588b define MAXSTRING and use vsnprintf to preven overflows 2002-08-01 15:10:23 +00:00
Karl Schultz
f1dee4fe8f Catch up windows driver with recent context mods 2002-07-29 00:01:00 +00:00
Karl Schultz
54572c1b93 export new symbols for osmesa lib 2002-07-28 18:01:36 +00:00
Brian Paul
c712425d0d fix warnings (bug 580528) 2002-07-22 13:45:31 +00:00
Brian Paul
5c711e3671 fix patching offsets (Sven Panne) (patch 544637) 2002-07-12 16:00:57 +00:00
Brian Paul
e237491493 silence warnings 2002-07-12 15:54:19 +00:00
Brian Paul
f02a5f6cc5 Pedantic compiler fixes (Sven Panne) 2002-07-12 15:54:01 +00:00
Brian Paul
902d2faadf applied Eric Anholt's patch for Athlon SSE 2002-07-11 15:33:02 +00:00
Brian Paul
8eaffa2a1c re-enable X86 code 2002-07-10 01:25:50 +00:00
Brian Paul
55c82c596e added Read/DrawBuffer porting info 2002-07-09 01:28:03 +00:00
Brian Paul
3b4fbbc129 Overhaul of glRead/DrawBuffer() code. Now, swrast->Driver.SetBuffer()
indicates the read AND draw color buffer for all software rasterization.
Lots of related clean-ups.  See RELNOTES-4.1 for details.
2002-07-09 01:22:50 +00:00
Jouk Jansen
b4338e5887 Committing in .
Adding a missing ',' in a parameter list of a routine called

 Modified Files:
 	Mesa/src/imports.c
 ----------------------------------------------------------------------
2002-07-01 08:26:00 +00:00
Brian Paul
89f9cf8add Added divide by zero check (Jon Perry). Remove dead vars. Fix indentation. 2002-06-30 16:58:11 +00:00
Brian Paul
c2fa38d5ae added Gerk Huisma's GLchan=GLfloat fixes 2002-06-30 16:16:03 +00:00
Brian Paul
4336c28c84 CHAN_TYPE==GL_FLOAT clamping. call _tnl_MakeCurrent. (Gerk Huisma) 2002-06-30 16:07:18 +00:00
Brian Paul
e201bef913 blending fixes for CHAN_TYPE==GL_FLOAT (Gerk Huisma) 2002-06-30 15:57:45 +00:00
Brian Paul
3c342ebd78 added GL_EXT_multi_draw_arrays 2002-06-30 15:49:03 +00:00
Brian Paul
e8ed14d0c2 added unofficial dispatch offsets for GL_EXT_multi_draw_arrays functions 2002-06-30 15:47:43 +00:00
Brian Paul
2525bc7d30 Implemented GL_EXT_multi_draw_arrays: glMultiDrawArraysEXT() and glMultiDrawElementsEXT(). 2002-06-30 15:47:00 +00:00
Brian Paul
1074d8c361 indentation fix 2002-06-29 20:04:57 +00:00
Brian Paul
487047c060 prep for OpenGL 1.4 feature set 2002-06-29 20:03:13 +00:00
Brian Paul
4e9676fb13 Applied Matt Sealey's patch to remove/isolate all stdio.h function calls.
Instead of mstdio.[ch], use imports.[ch] to isolate these functions.
2002-06-29 19:48:15 +00:00
Brian Paul
f1ad551604 fix CHAN_TYPE==GL_FLOAT compile problem 2002-06-26 14:56:20 +00:00
Brian Paul
058f319f60 pull in 4.0.3 docs to trunk 2002-06-26 02:36:34 +00:00
Brian Paul
7082420653 removed extra right-paren 2002-06-25 15:25:17 +00:00
Keith Whitwell
07bb9884a5 FRONT_AND_BACK culling 2002-06-25 08:44:27 +00:00
Brian Paul
82d9f3c034 finish-up vertex program evaluators 2002-06-25 02:56:45 +00:00
Brian Paul
0c3f820bf0 remove an unneeded statement in update_polygon(), added a comment 2002-06-25 02:31:37 +00:00
Brian Paul
4db3c48a13 test program for NV_vertex_program and evaluators 2002-06-23 02:57:33 +00:00
Brian Paul
581cc2025f fix problems in _mesa_debug/printf() 2002-06-23 02:53:22 +00:00
Brian Paul
8e7bd03760 added some _mesa_debug() calls 2002-06-23 02:52:18 +00:00
Brian Paul
2abbb660a2 checkpoint: updates for NV_vertex_program evaluators - a bit more left to do 2002-06-23 02:47:38 +00:00
Brian Paul
d65e0beb68 set stage->inputs properly (I think), plus debug/comment updates 2002-06-23 02:40:48 +00:00
Brian Paul
455d262c55 added support for NV_vertex_program evaluators 2002-06-23 02:36:27 +00:00
Brian Paul
837bf6e2df Added new bitfields to tnl_eval_store for NV_vertex_program evaluators 2002-06-23 02:32:39 +00:00
Brian Paul
775669f6ef put XSync in get_buffer_size(), plus clean-up 2002-06-19 21:49:37 +00:00
Brian Paul
02c03ef6b4 Moved GL_PROGRAM_ERROR_POSITION_NV state (it's not per-program).
Finished all glGet* queries for GL_NV_vertex_program.
Improved error reporting in glEnable/Disable/Get, etc.
2002-06-18 16:53:46 +00:00
Jouk Jansen
f922986238 Committing in .
Added mtypes.h inclusion

 Modified Files:
 	Mesa/src/imports.c
 ----------------------------------------------------------------------
2002-06-18 08:35:25 +00:00
Brian Paul
10d7f540ff new fix for initial window size problem 2002-06-17 23:38:14 +00:00
Brian Paul
85d816028a Port glXCopyContext bug from 4.0 branch. 2002-06-17 23:36:31 +00:00
Brian Paul
d373819b8c Joe Krahn's context sharing test program 2002-06-16 03:57:48 +00:00
Brian Paul
83b820aa98 Fix glXCopyContext bug 2002-06-16 03:56:11 +00:00
Brian Paul
1043a6498a fix a comment 2002-06-16 01:14:22 +00:00
Brian Paul
d834e8da88 fixed window size initialization bug 2002-06-16 01:11:10 +00:00
Brian Paul
8816c70a61 added a comment 2002-06-16 01:10:41 +00:00
Brian Paul
d66ca10c53 added some braces 2002-06-16 01:09:16 +00:00
Brian Paul
e514cfea74 the GGI driver is up to date 2002-06-15 03:15:16 +00:00
Brian Paul
4e99da15eb test for GL_NV_texture_rectangle 2002-06-15 03:08:19 +00:00
Brian Paul
9c0babf24f added GL_ARB_texture_env_crossbar 2002-06-15 03:06:16 +00:00
Brian Paul
e769cda1eb updates to 4.1 features 2002-06-15 03:05:36 +00:00
Brian Paul
bfa168e3fc updated with 4.0.x -> 4.1 porting info 2002-06-15 03:03:58 +00:00
Brian Paul
8afe7de8de Implemented GL_NV_texture_rectangle extension.
Replace struct gl_texure_object's Dimension w/ Target field.
Added _EnabledUnits to struct gl_texture_attrib - the _ReallyEnabled
  field is obsolete, but still present for now.  This effectively
  removes the 8-texture units limit, 32 units now possible, but unlikely!
New TEXTURE_1D/2D/3D/CUBE/RECT_BIT tokens for unit->_ReallyEnabled field.
Updated device drivers to use ctx->Texture._EnabledUnits.
2002-06-15 03:03:06 +00:00
Brian Paul
8bdd0dc8d0 #ifdef-out unused big-endian texel fetch functions 2002-06-15 02:55:22 +00:00
Brian Paul
9d47f3d6b8 added missing ctx parameter to _mesa_debug() calls 2002-06-15 02:54:01 +00:00
Brian Paul
4753d60dd0 Added ctx parameter to _mesa_debug()
Added _mesa_printf()
Updated SetDrawBuffer() function in all drivers (ala 4.0.3)
Import 4.0.3/DRI changes.
2002-06-15 02:38:15 +00:00
Jouk Jansen
5e54ddc3a6 Committing in .
Added <stdarg.h>

 Modified Files:
 	Mesa/src/imports.c
  ----------------------------------------------------------------------
2002-06-13 08:27:32 +00:00
Jouk Jansen
f8035450bb Committing in .
Removed config.c

 Modified Files:
 	Mesa/src/descrip.mms
 ----------------------------------------------------------------------
2002-06-13 07:22:59 +00:00
Brian Paul
4c4663747c added Porting Information section 2002-06-13 04:50:09 +00:00
Brian Paul
d09a1d8b29 more removal of fprintf() calls 2002-06-13 04:49:17 +00:00
Brian Paul
2f35d5e9d5 fixed a couple dumb mistakes 2002-06-13 04:31:09 +00:00
Brian Paul
9a33a11d71 New _mesa_debug() function to replace fprintf() calls.
Some source files updated to call _mesa_debug(), but not finished.
Added __GLimports as a parameter to _mesa_create/init_context() and
updated drivers accordingly.
Fleshed-out more of the __GLimports and __GLexports functionality.
Removed run-time config file support (config.c)
2002-06-13 04:28:29 +00:00
Brian Paul
1013e46504 Moved big/little endian code to glheader.h.
Define either MESA_BIG_ENDIAN or MESA_LITTLE_ENDIAN.
2002-06-12 00:52:50 +00:00
Brian Paul
35883ceb93 Fix NASM problems, remove static var in SSE detection code. (Josh Vanderhoof) 2002-06-11 01:26:58 +00:00
Brian Paul
4fe2f3f1a0 Added CPLUSPLUS for sunos5 entries 2002-06-10 17:01:46 +00:00
Brian Paul
b58c5ad7b0 GGI driver updates (Filip Spacek) 2002-06-10 15:16:44 +00:00
Brian Paul
dd41748f63 added missing texture cube map targets 2002-06-08 12:39:18 +00:00
Brian Paul
3f058cd2c5 version 15 of glext.h 2002-06-07 20:21:12 +00:00
Brian Paul
9800adaed2 s/GL_MAX_TEXTURE_RECTANGLE_SIZE_NV/GL_MAX_RECTANGLE_TEXTURE_SIZE_NV/ 2002-06-07 19:29:49 +00:00
Brian Paul
112f7cdeab fixed point sprite bug 2002-06-07 16:01:03 +00:00
Brian Paul
f21a4872e8 replaced hard-coded 4 with NUM_TEXTURE_TARGETS 2002-06-06 16:31:24 +00:00
Brian Paul
e0107e87a7 replaced 0xf and 0xf0 with TEXTURE0_ANY and TEXTURE1_ANY 2002-06-06 16:19:25 +00:00
Brian Paul
241afd837c NASM fix for *_CONTENT() macros (Josh Vanderhoof) 2002-06-06 15:33:37 +00:00
Brian Paul
af2a1c1d67 more big-endian tweaks 2002-06-05 16:48:54 +00:00
Brian Paul
28b03c6acb use CONTENT() macro on line 205 (Josh Vanderhoof) 2002-06-04 21:29:20 +00:00
Brian Paul
f5a0781975 bring over Michel Daenzer's DRI changes 2002-06-03 16:06:34 +00:00
Brian Paul
91d6f12b4a added another spot-check to verify dispatch table correctness 2002-05-29 15:23:16 +00:00
Brian Paul
60f1a3c288 Added GL_NV_point_sprite functions: glPointParameteri[v]NV().
Removed dead ARB_window_pos functions (we alias the MESA_window_pos funcs).
2002-05-29 15:16:01 +00:00
Brian Paul
1d155c1dd8 added GL_NV_point_sprite entrypoints 2002-05-29 15:14:13 +00:00
Brian Paul
4290dbac4d added -axK to linux-icc CFLAGS 2002-05-27 17:13:42 +00:00
Brian Paul
a078d75a27 some initial work for fbconfigs/pbuffers 2002-05-27 17:06:59 +00:00
Brian Paul
1c40d50014 added GL_NV_point_sprite 2002-05-27 17:05:51 +00:00
Brian Paul
f105bc4095 removed experiemental GL_MESA_sprite_point extension 2002-05-27 17:05:19 +00:00
Brian Paul
6c408b4667 replaced experimental MESA_sprite_point with NV_point_sprite 2002-05-27 17:04:52 +00:00
Brian Paul
23d8ef3937 dispatch offsets for ARB_window_pos 2002-05-27 17:03:08 +00:00
Brian Paul
22538b23b4 updated vertex program dispatch 2002-05-27 17:00:18 +00:00
Brian Paul
ee29d3b42a updated vertex program dispatch offsets to official values 2002-05-27 16:58:24 +00:00
Keith Whitwell
02e0de263e another checkpoint of struct immediate replacement code 2002-05-11 08:38:25 +00:00
Brian Paul
002483e009 Minor change to current raster position and texcoords. 2002-05-09 21:54:16 +00:00
Keith Whitwell
9228a9362c Fix FETCH(argb1555) mask values 2002-05-09 20:51:05 +00:00
Brian Paul
79cfdebbe0 remove -xK flag from linux-icc 2002-05-06 15:46:05 +00:00
Brian Paul
30ec9dbaed added linux-icc config (Marc.Dietrich) 2002-05-05 16:00:06 +00:00
Alan Hourihane
a5cdf99951 remove test code 2002-05-02 09:17:59 +00:00
Alan Hourihane
056b35874b glutSwapBuffers implicitly does a glFinish when swapping back to the front
buffer. We now issue a glFinish when not issuing SwapBuffers to ensure
the pipeline is complete.

(Problem found with Chromium).
2002-05-02 09:15:22 +00:00
Brian Paul
f595212336 Implemented GL_ARB_texture_env_crossbar.
Simplification of some of the texture application code.
2002-05-02 00:59:20 +00:00
Brian Paul
c450d57991 replaced GLshort with GLushort in _mesa_sizeof_packed_type() 2002-04-26 13:59:09 +00:00
Brian Paul
18385b0f4e added GL_TEXTURE_MAX_ANISOTROPY_EXT to glGetTexParameteriv() 2002-04-26 13:40:11 +00:00
Brian Paul
57c35b162e added GL_TEXTURE_MAX_ANISOTROPY_EXT to glGetTexParameter (bug 548812) 2002-04-25 22:11:33 +00:00
Brian Paul
df7bd4bf11 test mapsize against 1, not 0 in glPixelMap() 2002-04-24 20:11:20 +00:00
Brian Paul
fb68919362 added GL_EDGE_FLAG_ARRAY_COUNT_EXT to glGetBooleanv() (Bug 548277) 2002-04-24 20:05:26 +00:00
Karl Schultz
dc2270b461 Apply alpha buffer control fix to accum buffer too. 2002-04-23 18:39:09 +00:00
Karl Schultz
e694a8765a Fix up alpha buffer handling for Windows.
- add two new Pixel Format Descriptors that do not have alpha bits to
mirror the two that do.
- add logic to wglChoosePixelFormat to match PFD's with respect to alpha.
- Create/clear software alpha buffer as required.
Now a wgl or GLUT program can control the creation of a software alpha
buffer via the PFD or GLUT parms, respectively.
2002-04-23 18:23:32 +00:00
Brian Paul
62c36a2ff3 call _mesa_sizeof_packed_type() in _mesa_GetTexImage() (bug 547203) 2002-04-23 16:44:46 +00:00
Alan Hourihane
dec0131a29 Test for NULL pointer for LoadMatrix(), MultMatrix() and
Load/MultTransposeMatrix() and return without recording any errors or
doing any multiplication.
2002-04-22 20:00:16 +00:00
Brian Paul
fdd631a941 removed CVS $Log comments 2002-04-22 16:03:37 +00:00
Brian Paul
62954c8c30 test program for NV_vertex_program + vertex arrays 2002-04-22 15:53:54 +00:00
Jouk Jansen
bcc5d46b08 Committing in .
Remove __FUNCTION__ macro definition from CC compile definitions.
 (OpenVMS only)

 Modified Files:
 	Mesa/src/descrip.mms
 ----------------------------------------------------------------------
2002-04-22 10:29:43 +00:00
Brian Paul
f55b303fc2 added to-do list for the 4.1 release 2002-04-21 21:12:49 +00:00
Brian Paul
61bac6014a check for vertex program mode 2002-04-21 21:04:46 +00:00
Brian Paul
28c61d5b49 fixed assertion, replaced switch() with if/elseif 2002-04-21 21:03:02 +00:00
Brian Paul
12bab63f09 Vertex program attribute arrays seem to work now. This includes fallbacks
to the conventional arrays when attribute arrays aren't enabled.
2002-04-21 20:37:04 +00:00
Brian Paul
f3781eaafa added support for vertex program attribute arrays 2002-04-21 19:39:48 +00:00
Brian Paul
b7752724d9 vertex program attribute array work 2002-04-21 18:49:18 +00:00
Brian Paul
1113e3266f fixed Width/Height cut&paste typo 2002-04-20 17:54:55 +00:00
Jose Fonseca
04df3bbe8e Re-scheduling of the instructions according to the MMX pairing rules. This is dificult to quantify but the improvemnet reaches about of 0.7% in some cases in a Pentium III. In older Pentiums the improvements could be quite substancial due less capable integer pipelines. 2002-04-19 21:27:12 +00:00
Jose Fonseca
3fe2bb8933 Added min and max blend functions.
Slight optimization of _mesa_mmx_blend_add.
2002-04-19 20:12:30 +00:00
Karl Schultz
4fa66fa85c Provide a reasonable replacement for __FUNCTION__ when using non GNU C
compilers.  This allows Mesa to compile with non GNU C compilers again.
2002-04-19 15:49:40 +00:00
Brian Paul
bf80e1ed62 Allocate a sw_span struct in the swrast context instead of allocating it
on the stack frame in the point/line/triangle functions. (Klaus Niederkrueger)
This should solve the performance problem Karl found on Windows.
2002-04-19 14:05:50 +00:00
Brian Paul
05be7ae125 pass context pointer to _tnl_free_immediate(), removed backref pointer 2002-04-19 12:32:14 +00:00
Jose Fonseca
0c527ab054 MMX add blending function added. 2002-04-19 10:53:08 +00:00
Jose Fonseca
533e88824a MMX modulate belding function added.
Factorization of more common MMX code.
2002-04-19 10:33:34 +00:00
Alan Hourihane
68c48df2bf Correct check for noop array state change (Raystonn) 2002-04-19 08:38:23 +00:00
Brian Paul
26e2fb062a removed a stray debug printf 2002-04-19 01:08:48 +00:00
Brian Paul
4c5f8a8207 C++ fix 2002-04-19 00:47:07 +00:00
Brian Paul
7322cccfb9 new casts 2002-04-19 00:45:50 +00:00
Brian Paul
6c5b7029b3 added two (GLchan *) casts 2002-04-19 00:42:20 +00:00
Brian Paul
a670c1280b casts to fix GLint/GLuint mismatches 2002-04-19 00:38:27 +00:00
Brian Paul
db07de057f added some casts 2002-04-19 00:23:08 +00:00
Brian Paul
36c3df78f4 restored writeAll = GL_FALSE test/assignment 2002-04-18 14:57:00 +00:00
Jose Fonseca
55d9ee83b4 Definition of several utility macros for self-contained MMX operations such as scaling and lerping.
Restructured the MMX blending function to use a template, being only necessary to specify the main loop, which is also used for making the runin and runout sections.
Optimization of the MMX function after remembering that the multiplication was commutative (how can somebody forget this..) resulting in less register usage. Now there is no need for generate or read from memory any constant inside the loop.

Assemblers other than the GNU assembler can choke on the output of the C preprocessor since it was necessary to add line separators ';' to the defined macros.
2002-04-18 11:57:28 +00:00
Keith Whitwell
9ff3e9d992 Core of the future vertex engine. Isn't built yet, nor will be for a while...
Checkpoint commit.
2002-04-18 08:17:03 +00:00
Jose Fonseca
ef65c60d88 Removed code that was proven to have faster alternatives to reduce complexity and facilitate reusability. 2002-04-18 08:09:50 +00:00
Brian Paul
4c1f79264e fixed problem with swap() function and GCC3 (patch 414404) 2002-04-17 19:30:41 +00:00
Brian Paul
620735af45 Disabled SPARC cliptest functions for now. See bug report 544665. 2002-04-17 19:08:32 +00:00
Jose Fonseca
d60bb2fbc8 Remaining patch for the 255x255=255 identity correction be
made also in the runin and runout section of the code.
2002-04-14 11:33:54 +00:00
Brian Paul
cffb351a62 Jose's latest patch (GMBT_GEOMETRIC_CORRECTION) 2002-04-12 21:56:42 +00:00
Brian Paul
8c598cfd82 fixes for corrected GL_DOT3_RGB[A]_EXT token values 2002-04-12 21:17:28 +00:00
Brian Paul
cb445412fc version 13 of glext.h - fixes GL_EXT_texture_env_dot3 token values 2002-04-12 21:09:12 +00:00
Brian Paul
d23de4d334 updated a few comments 2002-04-12 15:47:21 +00:00
Brian Paul
b7f5e92f17 Klaus Niederkrueger's latest changes: use INIT_SPAN() to init span primitive
type, width, interp mask and array mask.
2002-04-12 15:39:58 +00:00
Brian Paul
9add9a21d8 new MMX blend code (Jose Fonseca) 2002-04-10 16:32:32 +00:00
Jouk Jansen
0cd8a1ea13 Committing in .
Update OpenVMS makefile

 Modified Files:
 	Mesa/src/descrip.mms
 ----------------------------------------------------------------------
2002-04-10 13:17:59 +00:00
Keith Whitwell
306d3fcdba bring in changes from dri tcl branch 2002-04-09 16:56:50 +00:00
Karl Schultz
e503d8b56f Update filelist to reflect two removed source files. 2002-04-09 15:33:49 +00:00
Keith Whitwell
0a79baf1bf remove dead vertex assembly 2002-04-09 14:58:03 +00:00
Keith Whitwell
851de7ded1 remove dead vertex assembly 2002-04-09 14:47:57 +00:00
Brian Paul
c030a18ea6 tranforming display list normals by non-uniform scale didn't work (Carlos Pereira) 2002-04-08 15:37:13 +00:00
Karl Schultz
17642eddf4 Added -perf option to measure frame rate. This is useful for measuring
Mesa in a more environment-independent way.
2002-04-05 17:40:20 +00:00
Brian Paul
ebe4e3237c repair Array.NewState flags (Michael Fitzpatrick) 2002-04-04 23:59:14 +00:00
Karl Schultz
14209028b6 export more symbols for osmesa (win32) 2002-04-04 18:27:49 +00:00
Karl Schultz
4d030ba651 casts to silence compiler warnings 2002-04-04 18:25:40 +00:00
Brian Paul
db0944b08a latest 4.1 features and bug fixes 2002-04-04 17:01:50 +00:00
Brian Paul
42f916de5c fixed some 3D texture image stride bugs when using 16-bit channels 2002-04-04 16:59:05 +00:00
Brian Paul
01dc182ee8 added OSMesaGetProcAddress() 2002-04-04 16:58:04 +00:00
Brian Paul
486734a5d5 Texture combine alpha subtraction was wrong. Fixed 16-bit channel glitches 2002-04-04 16:56:24 +00:00
Brian Paul
09784e1e15 use NULL lambda array for pixel texture 2002-04-04 16:53:59 +00:00
Brian Paul
d5c94ef40d fixed 16 bit/channel problem in blend_modulate() 2002-04-04 16:53:26 +00:00
Brian Paul
543381510d fixed 16/32-bit channel problems in CopyColor[Sub]Table() 2002-04-04 16:53:00 +00:00
Brian Paul
1d84421b7e fixup float/ushort conversion macros 2002-04-04 16:51:52 +00:00
Brian Paul
6b50a004ff blend_add() modified for GLfloat channels 2002-04-04 01:40:18 +00:00
Brian Paul
02ee456248 call _mesa_ResizeBuffersMESA() in OSMesaMakeCurrent() to reconcile buffer size changes 2002-04-04 00:54:02 +00:00
Brian Paul
db30cc8d00 added an error check 2002-04-02 23:53:56 +00:00
Brian Paul
99aab34199 return NULL from Fake_glXCreateContext() if dpy or visinfo are NULL 2002-04-02 23:52:53 +00:00
Brian Paul
b63e8556fa more blending updates from Jose 2002-04-02 23:36:50 +00:00
Brian Paul
31fe0ade35 minor re-org 2002-04-02 16:20:00 +00:00
Brian Paul
9de4782e49 added GL_ARB_point_parameters 2002-04-02 16:19:21 +00:00
Brian Paul
f9e75c31e8 DJGPP updates 2002-04-02 16:18:20 +00:00
Brian Paul
17b7cc4cae faster blending (Jose Fonseca) 2002-04-02 16:16:45 +00:00
Brian Paul
01bcd83def updates from Jose Fonseca 2002-04-02 16:16:14 +00:00
Brian Paul
1537b63fce GL_ARB_point_parameters support 2002-04-02 16:15:16 +00:00
Brian Paul
86a7cc6f2c minor optimization in GL_TRANSFORM_BIT popping 2002-04-01 17:03:38 +00:00
Brian Paul
6c921af034 DOS driver update 2002-04-01 17:01:33 +00:00
Karl Schultz
a97d216adb Add _glapi_get_context to export for osmesa. 2002-03-29 23:49:51 +00:00
Brian Paul
103bc0f75c Replaced ClipEnabled[] array and _AnyClip with ClipPlanesEnabled bitmask. 2002-03-29 17:27:59 +00:00
Brian Paul
23d319fc7d use _glapi_get_context() instead of GET_CURRENT_CONTEXT(ctx); in buffer_size() 2002-03-29 17:20:48 +00:00
Brian Paul
a68b8dfd76 Use invert_matrix_general() instead of invert_matrix_perspective() because
the later fails for some projection matrices (ala Vis5D with Chromium).
2002-03-29 17:18:08 +00:00
Brian Paul
f66de79365 decrement Transform._AnyClip when clip planes are disabled 2002-03-28 22:45:45 +00:00
Brian Paul
934bee04f2 popping of user-defined clip planes was broken 2002-03-28 22:42:41 +00:00
Brian Paul
7c8b5399f0 reset span.end to zero after rendering the span 2002-03-28 16:24:14 +00:00
Brian Paul
c028617784 fixed inequality in an assertion 2002-03-27 15:49:27 +00:00
Brian Paul
e6f2b4174b removed a bad assertion 2002-03-25 17:24:43 +00:00
Brian Paul
2161b8cf03 more extensions 2002-03-23 16:35:40 +00:00
Brian Paul
3c70f6f2ac exercise GL_EXT_shadow_funcs 2002-03-23 16:34:18 +00:00
Brian Paul
636b2801d9 Test implementation of proposed GL_EXT_shadow_funcs extension. This just
generalizes the R/texture comparision operators to include all eight of
the depth test comparisons.
2002-03-23 16:33:53 +00:00
Brian Paul
25b85bf02a bring over from the 4.0 branch 2002-03-23 02:38:39 +00:00
Brian Paul
4544bd22fd added 4.0.2 info 2002-03-23 02:38:10 +00:00
Brian Paul
252250ae64 re-adding a lost file 2002-03-23 02:37:17 +00:00
Brian Paul
e69bfe74d7 DOS/Mesa driver updates (Daniel Borca) 2002-03-23 02:34:07 +00:00
Brian Paul
6211144e05 use -O3 to compile osmesa16/32 targets 2002-03-23 02:30:18 +00:00
Brian Paul
7de02fef5b replaced an assertion with a conditional 2002-03-23 02:29:37 +00:00
Brian Paul
819505ad2a removed temporary GL_ARB_texture_mirrored_repeat enums 2002-03-23 01:49:58 +00:00
Brian Paul
8334c89e70 removed temporary ARB_texture enum defs 2002-03-23 01:48:18 +00:00
Brian Paul
e3af5354a6 latest extension headers from SGI 2002-03-23 01:47:27 +00:00
Brian Paul
491e573c38 removed glSamplePass() 2002-03-20 22:07:17 +00:00
Brian Paul
80ac8d171c don't set plane mask for xm_buffer->gc, it causes an accum buffer conformance problem 2002-03-19 16:48:06 +00:00
Brian Paul
aeb4434563 Use MESA_PBUFFER_ALLOC/FREE macros to allocate all framebuffer and texture
memory.  These can be overridden by applications which need to manage this
memory specially.  Contributed by Gerk Huisma.
Also, new code for 8-bit -> 16-bit/channel texture image storage which
fills in the least-significant bits properly.
2002-03-19 16:47:04 +00:00
Brian Paul
d0570646bd fix Intel C compiler warnings (Gerk Huisma) 2002-03-19 15:22:50 +00:00
Brian Paul
f7c830e35c rename ResizeBuffersMESA to ResizeBuffers 2002-03-16 18:07:39 +00:00
Brian Paul
ac5bbe4c4a added latest 4.1 bug fixes/updates 2002-03-16 18:03:40 +00:00
Brian Paul
31f12f504e New mipmap lambda calculation. Previously, trilinear filtering could
result in _very_ blurry textures.  Still need to do some optimization
of the new code in s_span.c
2002-03-16 18:02:07 +00:00
Brian Paul
bc6b60c4ff buffer resize changes 2002-03-16 00:57:14 +00:00
Brian Paul
93c132a058 added XMesaResizeBuffers() 2002-03-16 00:53:48 +00:00
Brian Paul
18a285a5e2 Lots of changes related to framebuffer/window buffer resizing. Basically,
instead of passing a GLcontext* to ResizeBuffers(), pass a GLframebuffer*.
The idea is that a window can be resized without it being bound to a rendering
context.  This makes for a nice clean-up in the XFree86 server-side GLX code.
Renamed ctx->Driver.ResizeBuffersMESA() to ctx->Driver.ResizeBuffers().
2002-03-16 00:53:15 +00:00
Brian Paul
8d687e7e58 protect currentReadable reference with #ifndef GLX_BUILT_IN_XMESA 2002-03-15 18:43:25 +00:00
Brian Paul
1d822ea8cf updated comments. removed dead code. 2002-03-15 18:33:12 +00:00
Brian Paul
a72edf01ba remove a debug printf 2002-03-15 18:24:53 +00:00
Brian Paul
8843d52af1 fixed typo in CONVERT_TEXEL_DWORD for convert_abgr8888_to_ai88 textures (Michael Fitzpatrick) 2002-03-15 18:05:49 +00:00
Brian Paul
612fc01293 fixed pointer arithmetic error in glCopyPixels 2002-03-14 22:09:25 +00:00
Brian Paul
d488af5b34 added _mesa_image_image_stride() 2002-03-13 04:34:32 +00:00
Brian Paul
9a888bdc2a added a comment 2002-03-13 04:33:32 +00:00
Brian Paul
f9708e45ac initial work for NV_vertex_program1_1 extension 2002-03-13 04:33:16 +00:00
Brian Paul
1d01794e6e Removed the xm_context field from XMesaBuffer. It was preventing N threads
from rendering into one window in parallel and wasn't really needed anyway.
2002-03-12 21:55:50 +00:00
Brian Paul
5033f21d05 tweak file list for tarballs 2002-03-11 14:59:50 +00:00
Brian Paul
1c91fe2e3f obsolete 2002-03-11 14:57:40 +00:00
Brian Paul
a3e44f4531 fix some minor warnings 2002-03-08 19:44:28 +00:00
Brian Paul
b43a828ad4 DOS driver updates from Daniel Borca 2002-03-08 19:27:17 +00:00
Brian Paul
7fd50afbbf new DOS driver files from Daniel Borca 2002-03-08 19:24:56 +00:00
Brian Paul
2b9ba3f84f new assertions, use INLINE macro (Klaus Niederkrueger) 2002-03-08 00:09:18 +00:00
Brian Paul
5104b4d9df minor patches from David Dawes 2002-03-07 21:50:41 +00:00
Brian Paul
0b2fa873c6 syntax fixes for Solaris (David Dawes) 2002-03-07 21:40:08 +00:00
Brian Paul
c5a76cbed4 silence gcc warnings (Marc La France) 2002-03-01 04:28:32 +00:00
Brian Paul
09a0cb464d updated comments for CHAN_BITS=16 or 32 2002-03-01 04:23:36 +00:00
Brian Paul
aa24e9171a use official enum values for GL_ARB_depth_texture and GL_ARB_shadow 2002-02-25 22:18:14 +00:00
Brian Paul
e0193a9425 DOS updates from Daniel Borca 2002-02-23 17:11:27 +00:00
Brian Paul
c7a3356746 Fixed out-of-bounds memory write problem (CONVERT_TEXEL_DWORD macro).
Renamed 'packing' to 'unpacking' since we're moving data from client -> GL.
Rnamed DST_ROW_WIDTH to DST_ROW_BYTES.
2002-02-21 15:12:31 +00:00
Brian Paul
d0271502f8 check for initialized XMesaBuffer in XMesaGarbageCollect() 2002-02-20 23:59:03 +00:00
Brian Paul
ad7306b23c Updated 1D/3D/cube mipmapping code to work like the new 2D code. 2002-02-17 17:58:31 +00:00
Brian Paul
9ff74a0f15 undo some debug changes mistakenly checked in earlier 2002-02-17 17:37:55 +00:00
Brian Paul
711e27fda2 Simplified fog code. 2002-02-17 17:30:57 +00:00
Brian Paul
983bc3e018 don't include s_fog.h 2002-02-17 17:30:23 +00:00
Brian Paul
4f252bd980 Lots of improvements in the 2D texture sampling code. Fewer function calls
and no more switches inside loops.  To do: give the 1D/3D/cube routines the
same treatment.
2002-02-17 01:58:59 +00:00
Brian Paul
c14a5a6c62 Optimized the interpolate_texcoords() function:
Use fast approximation to log().
  Check for dq==0 to avoid a per-pixel divide.
2002-02-17 01:49:31 +00:00
Brian Paul
8baae48fb7 removed dead code 2002-02-16 23:44:46 +00:00
Brian Paul
f204c9d2bb updated to use GL_ARB_depth_texture, GL_ARB_shadow, GL_ARB_shadow_ambient 2002-02-16 14:54:18 +00:00
Brian Paul
9ac7182ec4 use separate GC for SwapBuffers to avoid colormask problem 2002-02-15 19:15:33 +00:00
Brian Paul
026c036be0 include string.h to silence warning 2002-02-15 16:48:48 +00:00
Brian Paul
78a21f96b5 added new depth_texture/shadow tokens (temporary) 2002-02-15 16:41:36 +00:00
Brian Paul
2e47ff7b9c Finished up GL_ARB_depth_texture and GL_ARB_shadow 2002-02-15 16:37:36 +00:00
Brian Paul
9a3061715c updated VERT_BIT_* definitions 2002-02-15 16:32:36 +00:00
Brian Paul
4182cf60d9 Finished up GL_ARB_depth_texture and GL_ARB_shadow. 2002-02-15 16:32:06 +00:00
Brian Paul
c9ceef41fe GL_ARB_window_pos fog fix 2002-02-15 16:27:13 +00:00
Brian Paul
a8f2efd147 finished up GL_ARB_window_pos 2002-02-15 16:26:08 +00:00
Brian Paul
70b8d304bb added a glClear() error check 2002-02-15 16:25:16 +00:00
Brian Paul
4ba35633d6 fixed a multitexture MatrixMode() bug 2002-02-15 16:24:37 +00:00
Brian Paul
c4c4213b69 obsolete 2002-02-15 14:10:19 +00:00
Brian Paul
ce57201825 uniformly pass texcoords as GLfloat [4] 2002-02-15 03:41:47 +00:00
Brian Paul
09700ee358 added alternate glBitmap code (disabled) 2002-02-15 03:41:00 +00:00
Brian Paul
a048da0767 added SPAN_SPEC flag in smooth_multitextured_line() 2002-02-15 03:39:37 +00:00
Brian Paul
3ff07d2062 fixed float->int conversion. Fix conditional for 16-bit Z buffer path 2002-02-15 03:38:12 +00:00
Brian Paul
ca7596e834 updated GL_VENDOR string 2002-02-14 00:40:24 +00:00
Brian Paul
95e2c72fd5 minor clean-up 2002-02-14 00:39:53 +00:00
Keith Whitwell
d4e02d6026 Remove debug 2002-02-13 23:53:19 +00:00
Brian Paul
cbd9a0254e now supports > 2 texture units 2002-02-13 02:23:33 +00:00
Keith Whitwell
0cb28418d0 More suport for t&l drivers
Fix GLuint compare bugs
Fix RESET_STIPPLE calls
2002-02-13 00:53:19 +00:00
Karl Schultz
12a1024d9d fix compiler warning (windows) 2002-02-12 16:45:22 +00:00
Brian Paul
38d042a4ad silence compiler warnings 2002-02-12 16:07:47 +00:00
Brian Paul
69d4ae7bb3 add new DOS files to tar file list 2002-02-12 03:28:48 +00:00
Brian Paul
db41d2ea8c Daniel Borca's new DOS/DJGPP driver. 2002-02-12 03:24:56 +00:00
Brian Paul
cc27365d77 Daniel Borca's GLUT for DOS/DGJPP. 2002-02-12 03:24:06 +00:00
Brian Paul
bcb148de92 added an assertion, fix typo 2002-02-06 03:22:47 +00:00
Brian Paul
2784dadafc fixed typo in depth_test_pixels(), should fix reported VTK failures 2002-02-06 03:22:00 +00:00
Brian Paul
c4afba36c3 fix evaluator data and matrix stack mem leaks (Robert Bergkvist) 2002-02-05 23:21:45 +00:00
Brian Paul
79c2f53491 Clean-up and remove dead code related to depth/stecil testing. 2002-02-04 15:59:29 +00:00
Brian Paul
ac8c241e64 removed references to removed source files 2002-02-02 21:41:58 +00:00
Brian Paul
b37a084357 Converted line drawing over to new span code, pb no longer used.
Big clean-up of line drawing code.
Removed many obsolete span processing functions.
2002-02-02 21:40:33 +00:00
Brian Paul
733a4b602b sw_span can now hold x/y arrays of fragment positions - getting ready to
ditch the pb (pixel buffer) code.
Converted point drawing, bitmaps and aa lines to use new span functions.
2002-02-02 17:24:11 +00:00
Brian Paul
ceb39f4f8d Clean-up and optimize alpha test code.
Major clean-up of pixel zoom code.
2002-01-31 00:27:43 +00:00
Brian Paul
e79de014c5 removed GLUT reference 2002-01-30 21:54:37 +00:00
Brian Paul
e0bafefd7a don't use affine/persp_textured_triangle funcs when CHAN_BITS > 8 2002-01-30 16:54:02 +00:00
Brian Paul
1cefc83a88 return GL_RENDERER = Mesa Offscreen16/32 when CHAN_BITS = 16 or 32 2002-01-30 16:53:03 +00:00
Brian Paul
eae38ca1b2 replace GLushort w/ GLubyte in DEST_4US template (fixes 16-bit GLchan problem 2002-01-30 16:52:02 +00:00
Brian Paul
6e1666437e Still more texture/span simplification and clean-up.
Updated comments, fixed indentation, etc.
2002-01-28 04:25:56 +00:00
Brian Paul
7956292a76 More span improvements. Removed _mesa_write_monocolor_span().
Removed last of span.filled* flags and Klaus's macros.
More simplification of triangle functions.
2002-01-28 03:42:28 +00:00
Brian Paul
f1e2369878 More span clean-up, mostly texture-related.
_mesa_rasterize_span() is gone, replaced by new _mesa_write_textured_span().
Removed some unneeded triangle functions - more simplification possible.
2002-01-28 00:07:33 +00:00
Brian Paul
2a182a9897 LOTS of changes, building upon Klaus's work.
struct sw_span is used throughout span/fragment processing.
This is leading to less code and more chances for optimization.
2002-01-27 18:32:03 +00:00
Brian Paul
6a731f343e added fog and raster Z position controls 2002-01-26 17:49:30 +00:00
Brian Paul
ad7e727024 more info about building for Motif 2002-01-25 16:05:31 +00:00
Brian Paul
6ee7a02852 added missing IsEnabled() cases for fog coord and secondary color arrays 2002-01-22 18:40:46 +00:00
Brian Paul
8bd13de4cc fixed array_cache.tag mistake 2002-01-22 18:37:05 +00:00
Brian Paul
4c8fadc6d9 Clean-up/renaming of the per-vertex attribute bits, specifically, the
VERT_BIT_* flags are new and used in many places (esp in T&L code).
Updated some comments for doxygen.
Various code clean-ups.
2002-01-22 14:35:16 +00:00
Brian Paul
9b681dcc17 added array_cache to TAGFILES 2002-01-22 14:31:09 +00:00
Brian Paul
2bc668d092 minor update 2002-01-21 21:21:22 +00:00
Brian Paul
ac9aa22174 files to support doxygen (source code documentation) 2002-01-21 19:29:55 +00:00
Brian Paul
2ef866d1fc Klaus's latest patches and some clean-up 2002-01-21 18:12:34 +00:00
Brian Paul
674012f083 updated gl_mangle.h (Ray Tice) 2002-01-18 14:55:40 +00:00
Brian Paul
9958ace401 new gl_mangle.h with korn shell script to regenerate itself from gl.h and glext.h (Ray Tice) 2002-01-16 23:51:09 +00:00
Brian Paul
658702df97 changed PB (pixel buffer) to use texcoord[4] array 2002-01-16 20:15:00 +00:00
Brian Paul
028fe46fc5 set PB->haveSpec in line functions that emit specular color 2002-01-16 18:22:19 +00:00
Brian Paul
72574b959c added another test in regions_overlap() (Klaus) 2002-01-16 16:04:50 +00:00
Brian Paul
78940758e9 latest changes from Klaus 2002-01-16 16:00:03 +00:00
Brian Paul
b311950dde added latest bug fixes 2002-01-16 15:45:54 +00:00
Karl Schultz
4197c0ea9b Fixes for 24-bit Windows devices. The old code was trying to do 3-byte
stores with a full DWORD store (yuk).  (Jeff Lewis)
2002-01-16 15:42:17 +00:00
Jouk Jansen
43df32e438 Committing in .
-Compile support for tests on OpenVMS
 -Fixed missing header file
 -Fixed missing return value on function return

 Modified Files:
 	Mesa/descrip.mms Mesa/tests/sharedtex.c
 Added Files:
 	Mesa/tests/descrip.mms
 ----------------------------------------------------------------------
2002-01-16 14:32:46 +00:00
Karl Schultz
40fac75370 get tests working on windows (Robert Bergkvist) 2002-01-16 01:03:25 +00:00
Karl Schultz
3d587f6432 Samples working for Windows (Robert Bergkvist) 2002-01-16 00:57:54 +00:00
Karl Schultz
164ce12202 Demo updates for Windows (Robert Bergkvist) 2002-01-16 00:48:43 +00:00
Karl Schultz
83356781e1 Removed missing files and added new ones (Robert Bergkvist) 2002-01-16 00:41:16 +00:00
Brian Paul
858b694b64 added some missing error checks 2002-01-15 21:49:57 +00:00
Brian Paul
25c5f1b448 Fixed Windows compile problem with gl__unused413() function. 2002-01-15 19:04:52 +00:00
Karl Schultz
2ff30b21bc Correct typo (vpstate.c) so that makefile works. 2002-01-15 18:41:53 +00:00
Karl Schultz
e19f5d7cb7 Remove phantom tab on a blank line to allow compile on IRIX. 2002-01-15 18:30:58 +00:00
Brian Paul
47507f4464 removed api_compat stuff 2002-01-15 18:27:33 +00:00
Karl Schultz
f2e5c19a2f Fixed pixel color component problem and clear code for 24-bit Windows
devices.  (Jeff Lewis)
2002-01-15 18:14:34 +00:00
Karl Schultz
807aea838b Remove trailing CR's. No logical changes. 2002-01-15 18:11:36 +00:00
Brian Paul
24f7c0c944 remove api_compat.c 2002-01-14 16:07:33 +00:00
Brian Paul
03c0c2e8aa Removed api_compat stuff, there's a better way.
Fixed FogCoord / SecondaryColor mix-ups in api_arrayelt.c
2002-01-14 16:06:35 +00:00
Brian Paul
fe9f62ff18 oops, missed vpstate.c 2002-01-14 15:47:10 +00:00
Brian Paul
7fc487d38b added vertex program sources 2002-01-14 15:46:19 +00:00
Brian Paul
1bb17ed0f2 added glReadPixels / scissor bug fix 2002-01-12 16:19:04 +00:00
Brian Paul
21cb88911a don't apply scissor box in read_fast_rgba_pixels() 2002-01-12 16:12:52 +00:00
Brian Paul
3e276d43a2 added some comments 2002-01-12 03:01:23 +00:00
Brian Paul
166718f749 updated some comments 2002-01-12 02:57:14 +00:00
Brian Paul
c6755aa6d5 set _NeedEyeCoords to zero if vertex program is enabled 2002-01-12 02:55:30 +00:00
Brian Paul
8e6d305c89 Changed gl_client_array's Enabled field to GLuint so it can actually
hold the flags we're storing in it!
2002-01-11 17:26:54 +00:00
Brian Paul
2edd1807f8 Moved _mesa_VertexAttribPointerNV into varray.c.
Removed dead placeholder functions from vpstate.[ch].
Changed gl_client_array's Enabled field to GLuint so it can actually
hold the flags we're storing in it!
Always do the switch (type) code in the vertex array functions to that
<type> gets error checked!
2002-01-11 17:25:35 +00:00
Brian Paul
9927f1978d Klaus's latest patches: change texcoord[3] to texcoord[4] everywhere 2002-01-10 16:54:28 +00:00
Brian Paul
2e99cbd953 init whole immediate struct to zero 2002-01-10 15:50:12 +00:00
Brian Paul
26c878ac16 added glTexEnviv bug fix 2002-01-09 02:16:58 +00:00
Brian Paul
0c5c1392ab fixed int->float conversion bug in _mesa_TexEnviv() 2002-01-09 02:14:29 +00:00
Brian Paul
a701a1445c added GL_REPLACE / GL_RGB texture bug fix 2002-01-09 00:30:01 +00:00
Brian Paul
35e5e89f56 fixed GL_REPLACE / GL_RGB bug 2002-01-09 00:27:49 +00:00
Brian Paul
8927fbe9c5 added GL_BLEND/texenv color bug fix 2002-01-09 00:14:13 +00:00
Brian Paul
fd1727bd10 texture env color wasn't used correctly in GL_BLEND mode 2002-01-09 00:09:33 +00:00
Brian Paul
d599190575 compile with -DNDEBUG 2002-01-08 15:58:32 +00:00
Brian Paul
97291208cb work-around for QNX compiler problem 2002-01-08 14:56:51 +00:00
Brian Paul
571a1ac6ee implemented vertex program point size control 2002-01-06 20:39:03 +00:00
Brian Paul
363049160d Another vertex program checkpoint: clean-up of vertex attribute storage
in vertex_buffer.   Improved vertex program pipeline stage such that
output registers can be processed in a loop.  Getting closer to where
we need to be in order to implement performance optimizations...
2002-01-06 03:54:12 +00:00
Brian Paul
e2053d1690 minor clean-ups 2002-01-05 21:58:42 +00:00
Brian Paul
bc42c19f22 infrastructure for vertex program attribute evaluators 2002-01-05 21:53:20 +00:00
Brian Paul
bd1a9dacf6 Vertex program checkpoint commit: converted all vertex attributes (color,
normal, texcoords, fogcoord, secondary color, etc) to GLfloat[4] datatype.
Aliasing of glVertex, glNormal, glColor, glFogCoord, etc. to glVertexAttrib
now complete.
2002-01-05 20:51:12 +00:00
Brian Paul
ca209ae1f9 comments, clean-ups, added lots of const qualifiers 2002-01-05 14:12:24 +00:00
Brian Paul
cab83b8aa9 comments, clean-ups, added lots of const qualifiers 2002-01-05 14:03:33 +00:00
Brian Paul
f48bfd66da test multitexture and vertex arrays 2002-01-04 23:00:19 +00:00
Brian Paul
714cdd88a4 added some assertions to exercise glIsTexture() 2002-01-04 21:05:57 +00:00
Brian Paul
5e1a4fdc3c added info about which drivers work and don't work 2002-01-04 14:42:35 +00:00
Brian Paul
8d0499b75e fix bug 498555 - test for __GNUC__ 2002-01-04 14:35:46 +00:00
Gareth Hughes
735d92029c - Clean up state bitmask.
- Add (somewhat broken) PolygonMode bit, toggles between GL_FILL and
  GL_LINE.  Somewhat useful in mimicking certain Viewperf tests.
2002-01-04 09:47:17 +00:00
Brian Paul
78c2aa0b51 regenerated from updated glsparcasm.py script 2002-01-03 16:35:08 +00:00
Brian Paul
efe2baadb8 don't use macros, just expand them in-line 2002-01-03 16:33:59 +00:00
Gareth Hughes
a0f923d286 Add missing items from .cvsignore files, tests/Makefile 2001-12-28 06:37:40 +00:00
Gareth Hughes
1fb0a43c16 Remove warnings about the difference between function pointers and
(void *) pointers.
2001-12-28 06:28:10 +00:00
Keith Whitwell
1a6f488908 add _compat_VertexAttrib4fNV 2001-12-21 15:48:23 +00:00
Karl Schultz
2391f4cec6 Define finite as _finite for Windows. 2001-12-20 18:59:39 +00:00
Keith Whitwell
fc00cbe8d1 Further help with dri libGL version skew 2001-12-20 15:30:45 +00:00
Keith Whitwell
1643203a93 Fix clipping problem on mga 2001-12-20 09:54:20 +00:00
Brian Paul
a359d3488a some display list support for vertex program extension 2001-12-19 02:36:05 +00:00
Brian Paul
3f9be68dc4 added separate specular bug fix to 4.0.1 list 2001-12-19 01:29:58 +00:00
Brian Paul
fa6b2fba7a fix a comment typo 2001-12-19 01:09:46 +00:00
Brian Paul
f47efb5ab3 have to clamp color+specular in _swrast_add_spec_terms_triangle()! (fixes Chimera bug) 2001-12-19 01:08:49 +00:00
Brian Paul
c6a14906c6 remove some cruft 2001-12-19 01:07:50 +00:00
Brian Paul
530da27edb bring 4.0.1 info into trunk 2001-12-18 14:08:23 +00:00
Brian Paul
30f51ae067 Replace old matrix stacks with new code based on struct matrix_stack.
Moved vertex program hash table into shared context state.
Implemented reference counting for vertex programs.
Replaced tnl "ProjectedClip" with "Ndc" (normalized device coordinates).
2001-12-18 04:06:44 +00:00
Brian Paul
645ced2955 disable prototype matrix stack code 2001-12-17 22:41:45 +00:00
Jouk Jansen
aea09490f5 Committing in .
Update OpenVMS makefile for vertex-routines
 #ifndef __VMS added for one print statement containing __FUNCTION__

 Modified Files:
 	Mesa/src/descrip.mms Mesa/src/tnl/t_imm_api.c
 ----------------------------------------------------------------------
2001-12-17 09:02:55 +00:00
Brian Paul
3ade8af7ff added some debug printfs (disabled) 2001-12-17 04:58:50 +00:00
Brian Paul
10f30eb438 first checkpoint commit of Klaus's new span code (struct sw_span) 2001-12-17 04:54:35 +00:00
Brian Paul
57d6e1aebf first checkpoint commit of Klaus's new span code (struct sw_span) 2001-12-17 04:47:57 +00:00
Brian Paul
c843a1a039 remove conditional in RESET_STIPPLE to fix conformance failure 2001-12-17 01:46:58 +00:00
Brian Paul
54772892bd updated vertex buffer identifiers 2001-12-16 11:28:20 +00:00
Brian Paul
c11120270c warp a quadmesh with a gravitational source via vertex program 2001-12-15 23:28:15 +00:00
Brian Paul
9cb3947c56 rotating, lit torus via vertex program 2001-12-15 22:33:59 +00:00
Brian Paul
e3a0f39824 divide by W and clipping now work - in pretty good shape now 2001-12-15 22:31:23 +00:00
Brian Paul
56790ced1a temporary hack for divide by W 2001-12-15 21:31:28 +00:00
Brian Paul
b15a3b4d13 better api trace/log messages 2001-12-15 16:42:59 +00:00
Brian Paul
d2237d48ec vertex program fixes 2001-12-15 02:14:43 +00:00
Brian Paul
c3d90f3211 disable debug printf's, fix a crash 2001-12-15 02:13:32 +00:00
Brian Paul
36c77a81ad free the NormalLengthPtr if non-null in _tnl_free_immediate() 2001-12-15 00:49:00 +00:00
Brian Paul
9745d47991 added newline characters to trace strings 2001-12-14 21:56:50 +00:00
Karl Schultz
5cbd179121 Use $(MAKE) on the irix targets, instead of hard-coding pmake,
as suggested in SF bug 482149.  People can still use
pmake -v -f Makefile.X11 if they want to use pmake (works great for me).
Sorry, this should have been in the last check-in.
2001-12-14 17:48:19 +00:00
Karl Schultz
92512085d5 Add .cc as a valid suffix. 2001-12-14 17:19:32 +00:00
Karl Schultz
16e2d94cc7 Cleanup for IRIX 6 platforms. Build src-glu instead of si-glu due
to problems with building the c++ code in the si-glu.
2001-12-14 17:14:45 +00:00
Karl Schultz
c589af2fe2 Fix up targets for
irix6-o32, irix6-o32-dso, irix6-n32, irix6-n32-dso
2001-12-14 16:42:23 +00:00
Karl Schultz
7c8db694cc Remove rules that were put into place to deal with compiling files that
are in subdirectories of this directory.  The list of rules that were here
was out of date for Mesa 4 and would likely get out of date again.  It is
better to have make handle it (e.g., use pmake -v on IRIX).
2001-12-14 16:35:55 +00:00
Brian Paul
1668d4bab8 s/glxGetProcAddress/glXGetProcAddressARB/ 2001-12-14 11:40:14 +00:00
Brian Paul
eaf0eac7d3 oops, wrong value for GLX_SAMPLES 2001-12-14 03:19:06 +00:00
Brian Paul
b70f5c21e7 added GLX_SAMPLE_BUFFERS, GLX_SAMPLES 2001-12-14 03:18:08 +00:00
Brian Paul
15d4a2327d minor tweaks 2001-12-14 03:17:00 +00:00
Brian Paul
a19d7c35cd 4.1 extensions 2001-12-14 03:16:06 +00:00
Brian Paul
1d1635d27b planned extensions for 4.1 2001-12-14 03:14:49 +00:00
Brian Paul
b638c34381 minor dispatach table changes 2001-12-14 03:13:04 +00:00
Brian Paul
797ea81d63 vertex program test program 2001-12-14 03:03:38 +00:00
Brian Paul
86b842790b vertex program check-in 2001-12-14 02:50:01 +00:00
Brian Paul
680522f74c add dispatch offsets for vertex program functions 2001-12-14 02:48:10 +00:00
Karl Schultz
faaa88fc48 Remove const from save_TexParameteri to match prototype for glTexParameteri.
Allows compilation on IRIX.
2001-12-13 19:58:20 +00:00
Karl Schultz
d313068dc8 Added missing entry points 2001-12-13 19:15:58 +00:00
Brian Paul
d9331ae71e fixed errors in feedback for glDraw/CopyPixels and glBitmap 2001-12-13 19:12:42 +00:00
Brian Paul
59235bd5da special case blend optmizations (Jeremy Fitzhardinge) 2001-12-13 16:14:26 +00:00
Brian Paul
c3209d45ad call FLUSH_VERTICES() in _mesaTexParameterfv() (bug 491832) 2001-12-13 16:02:11 +00:00
Keith Whitwell
5246b6c9d1 fix for ubyte colors 2001-12-13 10:51:41 +00:00
Keith Whitwell
59e5b90452 fix primitive calculation in 1-line dlist immediates (molecules) 2001-12-13 10:49:04 +00:00
Keith Whitwell
09fc9324f6 fix glut tess lockup 2001-12-11 15:13:57 +00:00
Brian Paul
74df2ef732 added enums for GL_ARB_depth_texture/shadow/shadow_ambient (temporary) 2001-12-05 22:01:13 +00:00
Keith Whitwell
ef4f5b391e add inf and nan tests to swrast functions 2001-12-05 10:24:31 +00:00
Brian Paul
aecfb51c30 fixed potential array overwrite problem 2001-12-04 23:45:31 +00:00
Brian Paul
014ec1ac5e prototype implementation of GL_ARB_depth_texture, GL_ARB_shadow, GL_ARB_shadow_ambient 2001-12-04 23:44:55 +00:00
Brian Paul
471a774f43 dispatch changes to minimize hassle with XFree86 libGL 2001-12-04 23:43:31 +00:00
Keith Whitwell
c34cb25bdd further tweak to dlist change 2001-12-04 13:04:29 +00:00
Keith Whitwell
aa46094ca6 guard ResetStipple calls 2001-12-03 17:48:58 +00:00
Keith Whitwell
4ea18fc2dc fx another place where PRIM_PARITY is calculated 2001-12-03 17:47:04 +00:00
Keith Whitwell
a8b25ada45 simplify drawarrays paths 2001-12-03 17:41:58 +00:00
Keith Whitwell
3a825a85f1 avoid side-effects in macro param 2001-12-03 17:39:12 +00:00
Keith Whitwell
bfd2ae6e99 correctly reset input after dlist execution 2001-12-03 17:19:14 +00:00
Karl Schultz
e6373ba6d7 Corrected bad line breaks in macro definitions within code compiled
when BEOS_THREADS is defined.  This usually does not cause a problem when
BEOS_THREADS is not defined, but the bad line break in this case put
the "#name" text as the first non-white space in a line, causing the
IRIX C preprocessor to think that it was a preprocessor directive, and
that generated a distracting warning.  I also fixed a couple of other
line breaks that seemed wrong to me.
2001-11-30 22:11:45 +00:00
Karl Schultz
3ac348c17a Add darwin target 2001-11-30 19:41:19 +00:00
Karl Schultz
fcc0abe6cf malloc() prototype is in stdlib.h for darwin 2001-11-30 19:35:22 +00:00
Alan Hourihane
bce1689d5b Don't reset _tnl_CurrentInput when in DestroyContext. 2001-11-30 15:43:53 +00:00
Karl Schultz
7b2a146d3a main trunk is now 4.1 2001-11-29 23:13:12 +00:00
Karl Schultz
209e1348bd update to version 4.0 2001-11-29 22:54:33 +00:00
Karl Schultz
8ff271548a Update notes on si-glu NURBS. 2001-11-29 16:55:37 +00:00
Karl Schultz
9c8cbe6950 Fix compilation errors and warnings for NURBS support. (Robert Bergkvist) 2001-11-29 16:16:55 +00:00
Keith Whitwell
4e6c835210 use smaller buffer when decomposing large drawarrays, for cache goodness 2001-11-29 15:15:20 +00:00
Brian Paul
d8af040f5e updated comment about CHAN_BITS 2001-11-28 17:18:36 +00:00
Brian Paul
e4eba73060 use v2 color, not v0 in flat_ci_triangle() 2001-11-28 16:11:32 +00:00
Brian Paul
253270dfcc use glXGetProcAddressARB to avoid extension linkage problems 2001-11-27 02:55:58 +00:00
Brian Paul
2f3d620398 don't directly call glSecondaryColor*EXT() or glFogCoord*EXT() 2001-11-27 00:05:35 +00:00
Brian Paul
70c05e6781 don't use near and far for parameter names 2001-11-26 23:41:24 +00:00
Karl Schultz
20517ce040 avoid using near and far as variable names since they are reserved words
in the windows compiler.
2001-11-26 22:55:28 +00:00
Brian Paul
1b2976f79b fix some warnings 2001-11-26 17:21:46 +00:00
Keith Whitwell
f660ec6ff8 Possible fix for vtk tristrip bug 2001-11-26 12:56:07 +00:00
Brian Paul
358ed73e1d fix for bug 474479, remove Trace/* stuff 2001-11-23 20:44:12 +00:00
Brian Paul
3183af39d0 fixed bug 484142, missing backslash 2001-11-23 20:09:26 +00:00
Keith Whitwell
cbf9731119 Another locked drawarrys fix 2001-11-22 09:23:36 +00:00
Brian Paul
d4ece7b2f4 minor update 2001-11-21 17:21:41 +00:00
Keith Whitwell
d3be982783 3dnow normalize_normals broken, disable 2001-11-19 13:52:41 +00:00
Keith Whitwell
3f766b7a89 possible fix for cva ignore start index bug 2001-11-19 10:22:41 +00:00
Brian Paul
71340e861e More span rendering optimizations from Klaus Niederkrueger 2001-11-19 01:18:28 +00:00
Brian Paul
71515b9175 added test implementation of GL_ARB_window_pos 2001-11-19 00:41:32 +00:00
Brian Paul
6d9b899342 fixed a glitch 2001-11-19 00:40:33 +00:00
Brian Paul
50c31d6861 added test implementation of GL_ARB_window_pos 2001-11-19 00:13:45 +00:00
Brian Paul
5b7dab2e4c added test implementation of GL_ARB_window_pos 2001-11-18 23:52:37 +00:00
Brian Paul
17fe22d3bf test for glXGetProcAddress() 2001-11-18 23:16:56 +00:00
Brian Paul
a6fdefa322 remove -DMESA_TRACE from linux-debug config 2001-11-18 23:11:45 +00:00
Brian Paul
94dd6b8927 remove Glide and SVGA support from mesa-debug config 2001-11-18 23:03:53 +00:00
Brian Paul
a6a997c234 included by glapi.c 2001-11-18 22:52:22 +00:00
Brian Paul
b5fd886ee1 API dispath updates 2001-11-18 22:48:11 +00:00
Brian Paul
4fe0f9d2a9 new, simpler API specification file 2001-11-18 22:43:16 +00:00
Brian Paul
6c0d72f9c0 new Python API generator scripts 2001-11-18 22:42:57 +00:00
Brian Paul
199b931c07 added missing const to glXGetContextIDEXT() prototype 2001-11-18 22:16:07 +00:00
Brian Paul
0ee6a5604d improved AA subpixel sample positions (Ray Tice) 2001-11-13 00:26:39 +00:00
Brian Paul
1b37d6c305 BeOS thread support (Philippe Houdoin) 2001-11-12 23:50:12 +00:00
Brian Paul
cd060fc3b4 fix typedef problem found with MSDev 6.0 2001-11-09 22:04:24 +00:00
Brian Paul
c32fe22168 added GLX 1.4 function manglers 2001-11-09 22:01:02 +00:00
Brian Paul
853a4abab2 added 1.3 function manglers 2001-11-09 22:00:53 +00:00
Brian Paul
fe9b705a2c define GL_VERSION_1_3 (doh!) 2001-11-09 21:54:30 +00:00
Brian Paul
4b7ccad682 casts to silence warnings from gcc 2.96 2001-11-06 16:01:19 +00:00
Brian Paul
87c964d388 added missing GL_MAX_TEXTURE_LOD_BIAS_EXT query 2001-11-06 15:53:00 +00:00
Brian Paul
85e7d7c1d8 fix error in error checking conditional (bug 476846) 2001-11-03 04:11:26 +00:00
Brian Paul
dc31d67c0e init the hash table mutex in _mesa_NewHashTable (Won-Suk Chun) 2001-11-02 00:57:04 +00:00
Karl Schultz
acf0c0a1e1 Updates for improved DirectDraw support (Daniel Slater) 2001-11-01 22:44:47 +00:00
Brian Paul
52ef4cc59a added some (void *) casts to silence gcc 2.96 warnings 2001-11-01 00:39:24 +00:00
Karl Schultz
9baad8e1ff Change name of glut lib from glut32 to MesaGlut.
This helps avoid confusion with other gluts on the system that may be
lined with OpenGl32.dll and Glu32.dll.
2001-10-26 21:21:11 +00:00
Karl Schultz
b10f995edf Copy the readtex.[ch] files from ../util 2001-10-26 21:01:45 +00:00
Brian Paul
a4b42200e9 added a bunch of missing breaks for multisample gets 2001-10-25 23:21:28 +00:00
Brian Paul
0878456b46 template for 4.1 release notes 2001-10-22 22:57:23 +00:00
Brian Paul
3de5462ab1 version bumps, etc for 4.1 2001-10-22 22:45:18 +00:00
Brian Paul
a7f8117153 added latest bug fixes 2001-10-22 16:04:46 +00:00
Brian Paul
45d21ca587 applied Andrew Lewycky's patches 2001-10-22 01:21:16 +00:00
Keith Whitwell
52d4c6ebb5 forgotten diffuse alpha fix 2001-10-20 00:13:45 +00:00
Jouk Jansen
12e875ce4d Committing in .
Modified Files:
 	Mesa/src/context.c

 Initializing ctx->Driver.CurrentExecPrimitive to 0, just after the allocation
 of the context. I hope this solved a very rare crash of the molecule mode
 of xlockmore on my VMS-machine. (I have not seen any crash the last week.
 Normally it crashed at least once in the 3 days)

----------------------------------------------------------------------
2001-10-18 08:04:57 +00:00
Brian Paul
5d26219288 added a few comments 2001-10-17 23:03:56 +00:00
Brian Paul
40ba618a6f warning fixes (Karl Schultz) 2001-10-17 23:03:34 +00:00
Brian Paul
e8245c1409 added some missing Win32 files to tar file list 2001-10-17 20:44:26 +00:00
Brian Paul
ebc8b0aa5a minor updates 2001-10-17 14:59:21 +00:00
Brian Paul
7d63ac1e6b removed src/mms_depend from tar file list 2001-10-17 14:57:16 +00:00
Brian Paul
fca1ce3a26 added new entrypoints for 1.3 2001-10-17 14:33:05 +00:00
Brian Paul
e715c91000 updated for new glext.h 2001-10-17 13:34:08 +00:00
Brian Paul
e11f089f82 added GL_ARB_texture_mirrored_repeat 2001-10-17 13:31:07 +00:00
Brian Paul
470d3cd4a2 minor updates for new glext.h 2001-10-17 13:29:02 +00:00
Brian Paul
3d16c369d9 updated extensions 2001-10-17 13:28:14 +00:00
Karl Schultz
b5bfe2f6ae Updated for Mesa 4.0 2001-10-15 20:38:12 +00:00
Karl Schultz
439ded4e2a Fix comments. 2001-10-15 17:28:53 +00:00
Karl Schultz
b66103971c Fix the clear() function
- add checks for the ColorMask and IndexMask (like osmesa)
- correctly handle the DD_*_BIT flags so that we don't also ask the
  swrast to clear the color buffer after we cleared it ourselves. (doh!)
  This gives nearly a 2X improvement in the frame rate in a program like
  gears.
2001-10-05 15:47:28 +00:00
Karl Schultz
bffae58175 Allow to compile in Windows. 2001-10-04 19:14:26 +00:00
Karl Schultz
3978d026ea Build a few demos that now work with Windows. 2001-10-04 19:13:36 +00:00
Karl Schultz
8f47563559 Need to define MESA_DEBUG in debug builds. Otherwise, NDEBUG gets
defined, which is bad for things like assert().
2001-10-04 19:06:31 +00:00
Karl Schultz
47bcda78e2 Updated Windows driver for Mesa 4.0.
Needs optimization.
2001-10-04 19:04:56 +00:00
Karl Schultz
d3788b60ae remove extra CR chars 2001-10-04 19:03:11 +00:00
Keith Whitwell
31c40f0905 use correct vertex for flatshading 2001-09-25 17:38:11 +00:00
Karl Schultz
954f511473 Fix up Windows makefiles so that the debug build leaves debugger info
in the libraries.  Make with NODEBUG=1 builds optimized without debug
info (doc'ed in top level Makefile.win).
2001-09-25 16:25:41 +00:00
Karl Schultz
968e557dcd disable some more code so that it compiles quietly on Windows. 2001-09-25 16:22:40 +00:00
Brian Paul
b1ee387ab5 replaced x86_xform_raw4.S with x86_xform4.S 2001-09-24 19:18:03 +00:00
Karl Schultz
220e77a3f7 use OSMESA_* enums for OSMesaCreateContext instead of GL_*. 2001-09-24 15:29:27 +00:00
Brian Paul
0e94067d0d removed duplicate GLX_AUX_BUFFERS_BIT definition 2001-09-24 14:15:58 +00:00
Jouk Jansen
001f826f71 Committing in .
Modified Files:
 	Mesa/si-glu/libutil/glue.c

 added some type casts to silence compiler warnings.

----------------------------------------------------------------------
2001-09-24 09:40:40 +00:00
Brian Paul
2427575c21 [rgba]shift values weren't always correct, only effected blended lines 2001-09-23 21:17:03 +00:00
Brian Paul
7bb6fcc19d added missing tnl_dd files 2001-09-23 18:32:51 +00:00
Brian Paul
5734421078 4.0 updates 2001-09-23 18:19:30 +00:00
Brian Paul
97856fd98a updated version info 2001-09-23 16:53:28 +00:00
Brian Paul
5ac8282a22 fixed some configure;make build problems. cleaned-up copyright info. 2001-09-23 16:50:01 +00:00
Brian Paul
a573803ed3 updates for Mesa 4.0 2001-09-23 16:10:02 +00:00
Brian Paul
78a03d3c45 bump versions to 4.0 2001-09-23 16:06:13 +00:00
Keith Whitwell
497d6eab66 More of the same 2001-09-23 15:19:16 +00:00
Karl Schultz
05ba9becc3 Make osmesa a DLL instead of a static lib (Windows). This is more
consistent with the other modules and platforms.  It also makes the
API and linkage on Windows more consistent.
2001-09-21 21:32:14 +00:00
Karl Schultz
445e3cbd0d Add GLAPIENTRY to typedef for callback functions (used by tessellator).
This is important now that we're using __stdcall instead of the (default)
__cdecl on WIN32.  This gets apps using the tessellator working again
on Windows.
2001-09-21 20:39:03 +00:00
Brian Paul
38112f5b60 added __glCoreCreateContext and __glCoreNopDispatch 2001-09-21 17:23:30 +00:00
Karl Schultz
80d5855692 add the same conditional mangling stuff that gl.h has. 2001-09-20 22:19:41 +00:00
Karl Schultz
448b88bb80 add mangling for new entry points 2001-09-20 22:18:47 +00:00
Karl Schultz
cfe52d8ae0 Don't use "errno" as a parameter name - it is also a function and that
confused the Windows compiler.  Also make messages unsigned char for
consistency.
2001-09-20 21:50:53 +00:00
Karl Schultz
f2a50b141e compiler warnings 2001-09-20 21:47:52 +00:00
Karl Schultz
8674e709ee Change UnProject4 prototype to use nearVal and farVal instead of near
and far because Windows compiler can get confused over these old keywords.
2001-09-20 20:47:26 +00:00
Keith Whitwell
62eb2e5909 very brief overview of swrast 2001-09-20 19:25:31 +00:00
Keith Whitwell
fffc27015b (very) Brief overview of tnl module 2001-09-20 18:59:05 +00:00
Brian Paul
7152305e0a GL_ADD texture mode was incorrect, renamed some vars 2001-09-19 22:21:13 +00:00
Karl Schultz
7c4268176e silence compiler warnings (last batch for src) 2001-09-19 20:30:44 +00:00
Brian Paul
2fc06af470 set GR_STWHINT_ST_DIFF_TMU1 flag in the init() function (fixes multiarb demo) 2001-09-19 03:37:16 +00:00
Brian Paul
b6bcfc1f6a fix fallback for stippled polygons, removed a debug message 2001-09-19 02:55:45 +00:00
Brian Paul
37f2d5e696 compute dst->ooz, not dst->z in clip interpolation function 2001-09-19 02:54:56 +00:00
Karl Schultz
7b9fe820a3 more compiler warning fixes 2001-09-18 23:06:14 +00:00
Keith Whitwell
c98541f54b remove some debug 2001-09-18 22:07:54 +00:00
Keith Whitwell
e9479f24ab Fix FX driver to the point where gears & morph3d work.
Textures are broken (eg. isosurf).
2001-09-18 22:05:36 +00:00
Karl Schultz
573dd2206b clean up makefiles some more for Windows 2001-09-18 20:47:23 +00:00
Karl Schultz
4742735a5c compiler warnings 2001-09-18 16:51:45 +00:00
Karl Schultz
b14dcea418 remove carriage return chars 2001-09-18 16:39:38 +00:00
Karl Schultz
94a6ec8f0c compiler warnings 2001-09-18 16:16:21 +00:00
Karl Schultz
57c946096e compiler warnings 2001-09-18 15:27:18 +00:00
Brian Paul
fde5e2c5f1 more warning fixes (Karl Schultz) 2001-09-15 18:02:49 +00:00
Brian Paul
1f20952a92 removed carriage return chars 2001-09-15 18:00:28 +00:00
Brian Paul
04120f6cce Win32 updates (Karl Schultz) 2001-09-14 22:19:18 +00:00
Brian Paul
7c276329e8 more warning fixes (Karl Schultz) 2001-09-14 21:36:43 +00:00
Brian Paul
edf8c06270 more warning fixes (Karl Schultz) 2001-09-14 21:30:31 +00:00
Brian Paul
7cc49c2dc8 silence more warnings (Karl Schultz) 2001-09-14 17:23:39 +00:00
Brian Paul
5ce1f374da silence minor warnings 2001-09-14 17:00:42 +00:00
Brian Paul
675343c517 replaced gets() with fgets() 2001-09-14 02:59:08 +00:00
Brian Paul
94666c4b55 more GL 1.3 updates 2001-09-14 02:48:53 +00:00
Brian Paul
ba57e5297d more GL 1.3 and GLX 1.4 updates 2001-09-14 02:43:03 +00:00
Brian Paul
dcbe4d6d2f minor optimizations for flat shading (Klaus Niederkrueger) 2001-09-13 22:12:54 +00:00
Brian Paul
d22554d2ce replaced some tabs with spaces 2001-09-13 21:54:29 +00:00
Brian Paul
097d2a025e minor re-org 2001-09-12 03:32:29 +00:00
Brian Paul
e79f4b08d5 hook compressed texture functions into driver 2001-09-12 03:30:02 +00:00
Brian Paul
517903edcd add new WindML/Mesa man pages to tar file list 2001-09-10 19:28:22 +00:00
Brian Paul
306933046c WindML updates (Stephane Raimbault) 2001-09-10 19:21:13 +00:00
Brian Paul
30230a9cd1 fixed s/w alpha bug 458411 2001-09-10 18:53:45 +00:00
Jouk Jansen
9348cfc6e8 Committing in .
Modified Files:
 	Mesa/src/tnl/t_imm_alloc.c

 added initialization for Normals

----------------------------------------------------------------------
2001-09-07 06:55:59 +00:00
Brian Paul
190d34874c minor changes, prototype Pbuffer support 2001-09-01 20:27:31 +00:00
Brian Paul
62f75054cb update version to 3.5.1, minor OSMesa changes 2001-09-01 20:26:51 +00:00
Brian Paul
7d5656bee7 prototype work for Pbuffer support 2001-09-01 20:23:25 +00:00
Brian Paul
7e975ba3aa added GLX_RGBA_TYPE, fixed GLX_LARGEST_PBUFFER typo 2001-09-01 20:17:16 +00:00
Brian Paul
9bed64cbf1 fixed dangling pointer problem (Chris Burghart) 2001-08-31 04:30:14 +00:00
Brian Paul
04ec0fd71e changes to allow the driver to compile - still doesn't work though 2001-08-29 03:58:42 +00:00
Brian Paul
a0037ad8b3 added OSMESA_MAX_WIDTH/HEIGHT queries 2001-08-28 23:12:37 +00:00
Brian Paul
a07e02fd01 version 3.5.1 updates 2001-08-28 22:54:47 +00:00
Brian Paul
0d6fd15840 minor updates regarding OpenGL 1.3 2001-08-28 22:53:44 +00:00
Brian Paul
a8b07a539b added OpenGL 1.3 tokens and prototypes 2001-08-28 22:49:32 +00:00
Brian Paul
2a88946f9a OpenGL 1.3 support 2001-08-28 22:46:22 +00:00
Brian Paul
afe4f5e6c1 simple multi-window GLUT test prog 2001-08-21 14:25:31 +00:00
Gareth Hughes
e7df7cd6ad Get rid of unfinished demo. 2001-08-21 05:42:11 +00:00
Brian Paul
c123a9b2ed removed a semicolon in the USE() macro 2001-08-20 21:45:15 +00:00
Brian Paul
9babb73789 added textured line bug fix 2001-08-20 16:45:02 +00:00
Brian Paul
d9fc8e20e3 bumped version string to 3.5.1 2001-08-20 16:44:43 +00:00
Brian Paul
ac6daf97e1 better error messages 2001-08-20 16:43:02 +00:00
Brian Paul
df631a866d better error reporting 2001-08-20 16:42:40 +00:00
Brian Paul
233aafbb30 new debugging code 2001-08-20 16:41:47 +00:00
Brian Paul
fc1eadefeb added WindML driver 2001-08-20 16:16:36 +00:00
Brian Paul
976c26ca34 WindML driver (Stephane Raimbault) 2001-08-20 16:07:10 +00:00
Brian Paul
60174c1aef Fixes for 32-bit GLchans: smooth/flat/textured triangles seem to work now. 2001-08-14 14:08:44 +00:00
Keith Whitwell
76a52525c7 Reenable, but only in the size four case... 2001-08-14 00:59:08 +00:00
Keith Whitwell
bd9b4056d7 Undo last change - breaks other stuff. 2001-08-14 00:52:47 +00:00
Keith Whitwell
3d1df5554e Compute first partials before taking cross product to calculate normal.
Fixes diego santa cruz' nurbs lighting bug.
2001-08-14 00:50:44 +00:00
Brian Paul
9a90775010 replace PI with pi 2001-08-13 22:36:31 +00:00
Keith Whitwell
b1a2393bb7 Fix problem with colormaterial (bug #441859) 2001-08-13 22:17:19 +00:00
Keith Whitwell
c8a27838a0 Removed optimizations (this code is now seldom used) 2001-08-13 22:15:54 +00:00
Brian Paul
d922109eb3 added GL_EXT_texture_edge_clamp 2001-08-13 18:09:34 +00:00
Brian Paul
978a2a0a43 fixed Solaris compilation problems (Bug 441817) 2001-08-13 16:52:18 +00:00
Brian Paul
2e5a20ae21 rm .lo .la files for make clean 2001-08-13 16:51:08 +00:00
Brian Paul
b22fe91cdb removed ss_interp.c 2001-08-13 16:37:44 +00:00
Brian Paul
8b59b52297 added latest 3.5.1 bug fixes 2001-08-07 23:13:54 +00:00
Brian Paul
58cfa0fd90 fixed a glPush/PopAttrib bug related to texture binding (reported by Wes Bethel) 2001-08-07 23:10:55 +00:00
Brian Paul
c6182ab54c fixed bug in DEST_4F template function 2001-08-07 22:16:06 +00:00
Brian Paul
94f494e780 removed some now bogus assertions (due to Klaus's latest optimization) 2001-08-07 22:05:11 +00:00
Brian Paul
ebc9f221b2 fixed NewState update bugs in _mesa_PopClientAttrib() 2001-08-07 21:46:52 +00:00
Brian Paul
b5797a5085 Win32 fixes, etc. (Gerk Huisma) 2001-08-07 17:34:10 +00:00
Brian Paul
696cd3d2b6 optimization to sample_lambda_2d() (Klaus Niederkrueger) 2001-08-07 17:26:10 +00:00
Brian Paul
bb40d07830 added GLX context share bug fix 2001-08-07 16:02:48 +00:00
Brian Paul
5e1680ce1d fixed GLX context sharing bug (reported by Eric Plante) 2001-08-07 16:01:34 +00:00
davem69
636fb6cae7 Use #function instead of @function
in .type directive so it works with Solaris
assembler as well as GNU assembler.
2001-08-03 13:16:31 +00:00
Keith Whitwell
84170351db Fix VERT_RGBA special case. 2001-08-03 00:16:36 +00:00
Keith Whitwell
76ca0f5232 Fix SGL testLights.exe bugs (interaction of copying and fixup in display lists) 2001-08-02 22:39:51 +00:00
Keith Whitwell
554ceab8ec Fix SGL testGeoSets.exe polygon mode problem (wrong interpretation of
count parameter in DrawArrays)
2001-08-02 21:30:10 +00:00
Keith Whitwell
51184566fb Fix SGL monoindexed bug (glDrawRangeElements in dlist) 2001-08-02 19:58:07 +00:00
Keith Whitwell
c618005dcf Fix copying problem (light spots) on evaluated surfaces. 2001-08-01 05:10:42 +00:00
Keith Whitwell
3670e206a7 Fix core in fixup_normal_lengths 2001-07-28 21:04:21 +00:00
Keith Whitwell
46af1f87c8 Remove _BaseAlpha, fix reflect lighting bug. 2001-07-28 19:28:49 +00:00
Brian Paul
616f470629 more GLAPIENTRY fixes (Karl Schultz) 2001-07-27 19:09:58 +00:00
Brian Paul
2f65b316ff added latest 3.5.1 bug fixes 2001-07-27 14:49:08 +00:00
Brian Paul
8a8d474068 undo previous check-in (restore the @ symbols) 2001-07-27 14:38:17 +00:00
Brian Paul
dae1774e20 check if deleting _Current texobj in _mesa_DeleteTextures (Bart Barenbrug) 2001-07-27 14:30:50 +00:00
Brian Paul
086f1b8428 added four missing GLX 1.3 tokens 2001-07-27 14:26:27 +00:00
Brian Paul
24d9350897 replaced @ with ## or # to allow compilation on SunOS 5.6 (Bug 442742) 2001-07-27 14:06:35 +00:00
Brian Paul
73fc243420 wglUseFontBitmapsA() update (Frank Warmerdam) 2001-07-27 14:03:55 +00:00
Brian Paul
172281dad8 fixes for proxy cube map texture images 2001-07-26 20:02:10 +00:00
Brian Paul
e2df5de01c use GLAPIENTRY when declaring a couple function pointers (Gerk Huisma) 2001-07-26 16:04:10 +00:00
Brian Paul
d4cff4f2fa Applied Klaus Niederkrueger's latest flat-shading clean-ups and some of my own. 2001-07-26 15:57:49 +00:00
Brian Paul
bbf6a41d2f GLchan and GL_ADD clamping changes (Klaus Niederkrueger) 2001-07-23 16:47:53 +00:00
Brian Paul
62c734f499 don't make default teximage if glTexImage's pixels=NULL (Gerk Huisma) 2001-07-23 16:18:18 +00:00
Brian Paul
ae40b2281d rename ERROR macro to TE_ERROR (Gerk Huisma) 2001-07-23 16:10:03 +00:00
Brian Paul
3c03f3232d fix some Win32 warnings (Gerk Huisma) 2001-07-23 16:08:59 +00:00
Brian Paul
4fa5c1966a don't clamp colors if GLchan==GLfloat in add_colors() 2001-07-23 16:08:19 +00:00
Brian Paul
55180f4b92 GLubyte -> GLchan change 2001-07-23 16:07:39 +00:00
Brian Paul
f3b85c983f check for pixels=NULL in _mesa_store_teximage[123]d() 2001-07-23 16:07:12 +00:00
Brian Paul
89480f7382 added vms_x_fix.h to tar file list 2001-07-23 15:09:52 +00:00
Jouk Jansen
46e6c7ad54 Committing in .
Modified Files:
 	Mesa/si-glu/libtess/memalloc.h

 malloc.h is non-standard on OpenVMS. If it is present it only includes
 stdlib.h. therefore for VMS malloc.h is replaced by stdlib.h.
----------------------------------------------------------------------
2001-07-20 11:20:32 +00:00
Brian Paul
48f3bdaeb3 GLchan changes 2001-07-19 16:12:03 +00:00
Brian Paul
fd28445e10 Added Win32 memory debugging and fixed a few memory leaks (Gerk Huisma) 2001-07-19 15:54:34 +00:00
Brian Paul
2a9eca0ed4 do some 16-bit GLchan computations in floating point (Gerk Huisma) 2001-07-18 14:10:51 +00:00
Jouk Jansen
3b925120a6 Committing in .
Modified Files:
 	Mesa/si-glu/libnurbs/interface/glcurveval.cc

 Corrected declaration of putCallBack

----------------------------------------------------------------------
2001-07-18 11:17:35 +00:00
Keith Whitwell
277fd2e66e Fix Alan Barnett's 'try10' display list bug. 2001-07-17 21:44:37 +00:00
Keith Whitwell
5356031129 Lighting now emits colors as CHAN_TYPE, as it used to. This will require
minor adjustments in the dri drivers for twosided lighting to work again.
2001-07-17 19:39:32 +00:00
Brian Paul
4ae22b9721 include glu.h 2001-07-17 15:39:13 +00:00
Brian Paul
461b990508 disable MMX blend code until it gets fixed 2001-07-16 20:45:55 +00:00
Brian Paul
a1503b00f8 Various 16-bit GLchan fixes and Win32 fixes (Gerk Huisma) 2001-07-16 15:54:23 +00:00
Brian Paul
fba5e95468 assorted fixes for Win32 (Gerk Huisma) 2001-07-16 15:46:42 +00:00
Brian Paul
96385fa155 more work on float colors (still not finished) 2001-07-14 17:53:04 +00:00
Brian Paul
274fc30d31 added latest 3.5.1 bug fixes 2001-07-14 16:30:56 +00:00
Brian Paul
ac3958ea1b removed unused tiny triangle test code 2001-07-14 16:05:44 +00:00
Brian Paul
ee6cf4c6b0 undo previous check-in (unfinished code) 2001-07-13 20:12:44 +00:00
Brian Paul
601ce1d624 minor tweaks 2001-07-13 20:09:18 +00:00
Brian Paul
5b22aa1e33 added linux-osmesa32 config 2001-07-13 20:08:42 +00:00
Brian Paul
f431a3fb4d assorted changes for supporting GLfloat color channels (not done) 2001-07-13 20:07:37 +00:00
Brian Paul
bc07a99cc3 replaced __inline with INLINE 2001-07-13 17:26:39 +00:00
Brian Paul
cff1cfd90d silence an uninitialized var warning 2001-07-13 16:39:19 +00:00
Brian Paul
5c749d9e3c silence a warning 2001-07-13 16:38:44 +00:00
Brian Paul
b23f5b5a5c replace _NEW_PIXEL with _IMAGE_NEW_TRANSFER_STATE to catch color matrix changes 2001-07-13 15:44:21 +00:00
Brian Paul
77a4754d73 fixed two bad casts (Stephane Conversy) 2001-07-13 15:24:34 +00:00
Jouk Jansen
0cab1db776 Committing in .
Modified Files:
 	Mesa/src/descrip.mms Mesa/src/FX/fxtris.c Mesa/src/FX/fxvb.c

 -updated OpenVMS makefile
 -fixed compilation if FX is NOT defined.
----------------------------------------------------------------------
2001-07-13 11:28:07 +00:00
Keith Whitwell
1182ffeec3 Rename some of the tnl->Driver.* functions to tnl->Driver.Render.*, to make it
clear that these are owned by t_vb_render.c.

Make swrast_setup opaque - it now hooks itself directly into
tnl->Driver.Render.*.  Add a _swsetup_Wakeup() call that does this.

Update X11 (tested), osmesa and FX drivers for this change.

FX compiles but is probably broken as the changes there are large.  It was the
only remaining driver that used the internal _swsetup_ functions for
interp and copy_pv.  This usage has been replaced with code from the DRI
tdfx driver.
2001-07-12 22:09:21 +00:00
Brian Paul
fae7b778b8 fixed flat shading bug in affine_ and persp_textured_triangle() functions 2001-07-09 16:24:30 +00:00
Brian Paul
571c8ecc8f added missing \'s 2001-07-09 16:16:20 +00:00
Brian Paul
ac54173414 fixed segfault (NULL _ShineTable[0]) in shade_rastpos() 2001-07-05 15:31:21 +00:00
Brian Paul
5233ca8d30 fixed logic error in OSMesaMakeCurrent() for 565 pixel support (Lars Andersson) 2001-07-05 15:12:13 +00:00
pesco
8564f0536b More .cvsignore updates. 2001-07-02 11:41:02 +00:00
Keith Whitwell
47a28c0b4d restore normal length optimization in dlists 2001-06-28 17:34:14 +00:00
Brian Paul
206eda8b69 support for RGB_565 pixels (Lars Andersson), untested 2001-06-27 13:56:17 +00:00
Keith Whitwell
9c38ae35eb Add -f to rm in make clean to avoid error messages 2001-06-27 12:52:12 +00:00
Brian Paul
acc722d4b8 More raster fog coord fixes.
New truncate vs. floor comments in drawpixels.c
Added current raster secondary color state, not used yet.
2001-06-26 21:15:35 +00:00
Brian Paul
33170eeb18 optimized texture triangle updates (Klaus Niederkrueger) 2001-06-26 15:33:28 +00:00
Brian Paul
4f76d0e215 added initial 3.5.1 info 2001-06-26 01:33:15 +00:00
Brian Paul
8c2f6c5059 added GL_IBM_rasterpos_clip extension 2001-06-26 01:32:48 +00:00
Brian Paul
657323bf03 added missing GLX_PBUFFER_WIDTH/HEIGHT tokens 2001-06-25 15:29:11 +00:00
Jouk Jansen
5e7591f94c Modified Files:
Mesa/src/descrip.mms

 Removed obsolete .obj files.

----------------------------------------------------------------------
2001-06-21 12:19:43 +00:00
Brian Paul
9e5e5e35a0 bumped version numbers 2001-06-20 19:52:11 +00:00
Brian Paul
4d99e5b2e7 also print GL_MAX_TEXTURE_SIZE 2001-06-20 19:12:30 +00:00
Brian Paul
f6df34ecbe updates for the 3.5 release 2001-06-20 19:02:48 +00:00
Brian Paul
d491f7bc14 removed beta from version string 2001-06-20 18:54:43 +00:00
Brian Paul
1fb583c50d added a few missing si-glu files 2001-06-19 21:49:06 +00:00
Brian Paul
6738d2ac78 add m4/ directory to tar file list 2001-06-19 19:51:23 +00:00
Brian Paul
293b786cee more updates to tar file lists for 3.5 2001-06-19 18:06:41 +00:00
Brian Paul
af197f5f8f fix glDraw/CopyPixels w/ fog bug. minor fog code clean-ups. 2001-06-18 23:55:18 +00:00
Brian Paul
aba535e765 tar file list updates for 3.5 2001-06-18 23:39:38 +00:00
Brian Paul
76f8274daf replaced -g with -O3 under linux-x86 2001-06-18 22:45:16 +00:00
Brian Paul
1b25898946 Consolidated source files. Since the re-org a number of source files
only had one or two functions left in them.
2001-06-18 17:26:08 +00:00
Brian Paul
24ae7c4c1f Added fi_type union typedef to glheader.h.
Replace various float/int casts with the fi_type union cast.
Fixes -fstrict-aliasing problems.
2001-06-15 15:22:07 +00:00
Brian Paul
e4276667da Enable GL_ARB_texture_compression for XMesa/GLX driver. Texture
compression isn't really implmented.  Just updated glTexImageXD()
to accept compressed internal format tokens.
2001-06-15 14:18:46 +00:00
Brian Paul
65c6ca9179 replace 255 with CHAN_MAX 2001-06-15 13:41:12 +00:00
Brian Paul
03d6c4c2db define both GL_ALL_CLIENT_ATTRIB_BITS and GL_CLIENT_ALL_ATTRIB_BITS (spec and SI don't agree) 2001-06-14 21:37:43 +00:00
Brian Paul
2db44ffe9d fixed a comment 2001-06-14 18:30:14 +00:00
Brian Paul
e9ba8e9214 disabled an assertion that doesn't seem to be needed 2001-06-13 14:57:55 +00:00
Brian Paul
cd1cefae91 Allow different max texture sizes for 1/2D, 3D and cube maps. 2001-06-13 14:56:14 +00:00
Brian Paul
cc22179cd8 fixed an assertion 2001-06-13 14:55:25 +00:00
Brian Paul
1178ed817f fixed a +/- typo in the Y coord setup 2001-06-13 14:53:52 +00:00
Brian Paul
688601911c moved glTexEnvi calls to better logical locations 2001-06-13 14:33:16 +00:00
Brian Paul
ae47121fa3 removed old, redundant CurrentTransformUnit state var 2001-06-12 22:08:41 +00:00
Brian Paul
1676268eab always feedback unit 0 texcoords 2001-06-12 22:06:53 +00:00
Brian Paul
baace9ffca don't compile glClientActiveTextureARB() into display lists, per the spec 2001-06-12 22:06:10 +00:00
Brian Paul
5ed63e0895 disable pixel transfer ops for glGetTexImage(), per the spec 2001-06-12 22:05:34 +00:00
Brian Paul
d3778fc129 added latest line and triangle bug fixes 2001-06-12 14:32:15 +00:00
Brian Paul
a2162e4228 Snap triangle x,y vertices to 1/16 subpixel positions.
Disabled tiny triangle threshold test.
2001-06-12 14:18:58 +00:00
Brian Paul
57b46ee6ea check for PB overflow in general_flat_rgba_line() 2001-06-11 19:44:01 +00:00
Brian Paul
e67d632d99 fixed minor display list bugs (#431517) 2001-06-11 19:17:11 +00:00
Jouk Jansen
5891a5dd55 Committing in .
Modified Files:
 	Mesa/src/macros.h

 Added
  #define COPY_4UBV()
 for non i386 machines
----------------------------------------------------------------------
2001-06-11 07:52:51 +00:00
Brian Paul
0ce9f39d23 add check for NULL malloc (from Stanford metacompilation analysis) 2001-06-08 20:10:55 +00:00
Brian Paul
5fd13173a1 added COPY_4UBV bug fix 2001-06-08 15:47:48 +00:00
Brian Paul
fabc30cfdd only copy GLubyte[4] as a GLuint on x86 2001-06-08 15:46:30 +00:00
Brian Paul
36822c50ad use unoptimized COPY_4UBV code on SPARC to avoid memory alignment problems (bug 430689) 2001-06-08 12:49:38 +00:00
davem69
4a497e649b Remove dependency on MESA sources from gl* files
in SPARC glapi optimizations by moving the icache
flush into the glapi_sparc.S file.

Brian, how is this?
2001-06-06 22:55:28 +00:00
Brian Paul
a5455bb374 test for X86_FXSR_MAGIC to be sure we have the _fpstate.magic field, needed for SSE signal handler 2001-06-06 18:12:35 +00:00
davem69
6f365c21d7 SPARC normal tnl optimizations. 2001-06-06 11:46:04 +00:00
davem69
775355a88a Sparc optimized GLAPI dispatch table. 2001-06-05 23:54:00 +00:00
davem69
0fab0702b0 Generate this now that I know which
gl.spec file to use.
2001-06-05 22:25:07 +00:00
Brian Paul
470a7b4874 minor clean-ups 2001-06-05 21:41:05 +00:00
Brian Paul
a1164746e7 filled in a bunch of the function template strings 2001-06-05 19:29:41 +00:00
davem69
ae14499101 Python script for making glapi_sparc.S
Unused until Brian shows me what gl.spec file he is
actually using for glapi_x86.S as all the ones I can
find seem out of sync.
2001-06-05 04:30:03 +00:00
davem69
e4f84b4936 Add USE_SPARC_ASM diagnostics to print_info. 2001-06-05 03:58:20 +00:00
Brian Paul
b20cea3902 removed some code in XMesaDestroyContext() which could lead to a segfault 2001-06-04 22:33:02 +00:00
Keith Whitwell
51b36396ae Adaptor code that lets tnl convert compiled (display list) cassettes back
to glVertex() type calls.  Allows driver-supplied tnl modules to avoid
fallback on glCallList inside begin/end pairs.

Still a little buggy...
2001-06-04 16:09:28 +00:00
Keith Whitwell
abd5134965 fixed some GL_POINTS probs 2001-06-04 15:34:31 +00:00
Keith Whitwell
bd58a63fe8 New files to provide glEvalPoint, glEvalCoord implementations for
driver tnl modules.
2001-06-04 13:57:35 +00:00
Keith Whitwell
2c2a956a3a Add api_arrayelt.c 2001-06-01 22:22:41 +00:00
Keith Whitwell
4b7d6f216b Working implementation of glArrayElt that decomposes to regular
glVertex/glNormal/etc calls.
2001-06-01 22:22:10 +00:00
Brian Paul
a7de8b6776 added minor comments 2001-06-01 16:29:18 +00:00
Brian Paul
8a039ffe0a applied Klaus Niederkrueger's CHAN_BITS==32 patch 2001-06-01 13:23:27 +00:00
Keith Whitwell
741c2e6434 apply David Miller's quad/backcolor patch 2001-06-01 12:07:15 +00:00
Brian Paul
4097590bc6 replaced #ifdef 0 with #if 0 2001-05-31 23:06:01 +00:00
Brian Paul
21f80baa35 swapped in/out arguments to interp_func. Improved comments 2001-05-31 23:03:05 +00:00
Brian Paul
e715c4a62d fixed s/w alpha channel bug 2001-05-31 19:25:25 +00:00
Brian Paul
987caacbeb GLubyte -> GLchan fix 2001-05-30 17:44:14 +00:00
Brian Paul
b5d3f2c521 added current raster fog coord and related code 2001-05-30 15:22:04 +00:00
Brian Paul
529e48bb0f added test for EXT_fog_coord 2001-05-30 14:43:17 +00:00
Brian Paul
47a3c67fa6 forgot to check-in yesterday 2001-05-30 14:39:47 +00:00
Keith Whitwell
71f2c401c5 rerun vertex stage on _MESA_NEW_NEED_EYE_COORDS 2001-05-30 10:01:41 +00:00
Brian Paul
84cac8441f more DRI libGL-related changes 2001-05-29 23:15:07 +00:00
Brian Paul
e4a01fd7e1 added math/m_debug_clip.c 2001-05-29 22:06:13 +00:00
Brian Paul
655ba5d992 removed some old DRI-isms 2001-05-29 19:48:46 +00:00
Brian Paul
ffa10b1c3b added new functions to GLX_functions[] 2001-05-29 16:23:26 +00:00
Brian Paul
645c1cef13 s/void */GLvoid */ 2001-05-29 15:44:06 +00:00
Brian Paul
736fcbec47 infrastructure for GL_ARB_multisample 2001-05-29 15:23:48 +00:00
Brian Paul
5ff1c613ea removed unused var 2001-05-29 15:23:15 +00:00
Brian Paul
b0bb4f6226 more work on XMesa / libGL integration 2001-05-25 21:51:02 +00:00
Brian Paul
b95884c53d added void to __GLXextFuncPtr 2001-05-25 15:44:06 +00:00
Brian Paul
2a3cc7d907 added missing GLX_SGIS_multisample tokens 2001-05-25 15:41:29 +00:00
Brian Paul
c98da4d99a changed #if OLD_VMS to #ifdef OLD_VMS 2001-05-25 15:40:29 +00:00
Brian Paul
12c1bee87f added some casts so that older glx.h can be used 2001-05-24 20:05:32 +00:00
Brian Paul
e203c9cdd8 change GLXContext and GLXFBConfig typedefs 2001-05-24 19:07:14 +00:00
Brian Paul
7cf50e137d Initial changes to allow Mesa and its fake GLX to be built into XFree86 libGL. 2001-05-24 19:06:21 +00:00
Brian Paul
bcebfe647f added GL_SGIS_generate_mipmap 2001-05-24 14:49:14 +00:00
Brian Paul
9228e17bb5 Finished GL_SGIS_generate_mipmap. Should be trivial to enable in DRI drivers. 2001-05-24 14:47:56 +00:00
Brian Paul
55ed11bac5 prototyping some new stuff 2001-05-24 00:00:57 +00:00
Brian Paul
874ae72495 added color table clamp bugfix 2001-05-23 23:55:52 +00:00
Brian Paul
f6e0e92beb fix bug 426657: need to clamp RGBA before color table lookups 2001-05-23 23:55:01 +00:00
Brian Paul
6f0ab1d868 import from 3.4 branch 2001-05-23 14:45:01 +00:00
Brian Paul
e34d63f087 added 3.4.2 changes, SPARC assembly 2001-05-23 14:44:12 +00:00
Brian Paul
04a6c35819 updated copyright 2001-05-23 14:42:47 +00:00
Brian Paul
7943b349d6 SPARC assembly optimizations from David Miller. 2001-05-23 14:27:03 +00:00
Brian Paul
8bd0693101 a little more work on GL_SGIS_generate_mipmap 2001-05-22 21:49:03 +00:00
Brian Paul
6b1e4ea5a5 fixed a number of multi-texture line bugs 2001-05-21 18:13:43 +00:00
Brian Paul
300e1056f5 added multitexture support 2001-05-21 17:45:25 +00:00
Brian Paul
3893e638e6 initial support for GL_SGIS_generate_mipmap extension 2001-05-21 16:41:03 +00:00
Gareth Hughes
e7e38a47a8 Initial commit of cliptest work. More to come shortly.
- Add debug, benchmark code.
 - Change linux/x86 FAST_MATH code to GCC/x86, and clear FP exceptions
   before exiting the fast math block.
 - Remove divide-by-zero test in x86 cliptest, and set clipped vertices
   to [0,0,0,1] instead of leaving them uninitialized.
2001-05-21 16:33:41 +00:00
Brian Paul
e9482d004f s/Height/height/ (Jeff Potter) 2001-05-21 14:46:33 +00:00
Brian Paul
d577248b89 added missing #undefs at end of file 2001-05-18 23:58:26 +00:00
Brian Paul
ca78774fc7 fixed a bad error string in ClientActiveTexture() 2001-05-18 22:10:49 +00:00
Brian Paul
569b5f32b9 fixed two GL error calls 2001-05-17 21:33:14 +00:00
Brian Paul
758a21f104 fixed Width/Height typo (Jeff Hartmann) 2001-05-17 20:18:45 +00:00
Brian Paul
1341f40dfe removed (void) index; statement 2001-05-17 14:49:38 +00:00
Keith Whitwell
5439ab0683 Comment out __FUNCTION__ usage. 2001-05-17 11:33:33 +00:00
Keith Whitwell
89dae684aa Fix order of decomposition of quad.
Remove 'swrast->_MultiTexEnabled' derived value.
2001-05-17 09:32:17 +00:00
Brian Paul
47cf442c11 use DEFARRAY, etc macros to work around 32k data limit on Macs (Tom Goon) 2001-05-16 20:27:12 +00:00
Brian Paul
441a4af435 generate INVALID_OPERATION if active texture != 0 in glMap[12][fd] 2001-05-16 17:06:28 +00:00
Keith Whitwell
dbd0dad580 fix for Jouk's glplanet bug 2001-05-16 09:28:32 +00:00
Brian Paul
c47a5327d3 added latest 3.5 changes 2001-05-15 21:31:36 +00:00
Brian Paul
5071b0812f Apply antialiasing coverage factor to alpha after texture application,
not before.
2001-05-15 21:30:26 +00:00
Brian Paul
a51f07d5a1 _mesa_pack_index_span() was broken for non-GLubyte datatypes 2001-05-15 21:21:08 +00:00
Brian Paul
9e48553ccc increase FOG_MAX to 10.0 to fix CI conformace failure 2001-05-15 20:52:51 +00:00
Brian Paul
80532da3bf minor clean-ups and more comments 2001-05-15 16:18:13 +00:00
Brian Paul
d57bcbed46 moved some misplaced compiler flags from CC assigment to CFLAGS 2001-05-15 15:27:43 +00:00
Brian Paul
0ab16e0134 New IFLOOR, ICEIL macros from Josh Vanderhoof. Fixes problems with
IFLOOR(1.99999)==2, for example.  Moved some macros from config.h to glheader.h
2001-05-14 23:11:12 +00:00
Keith Whitwell
649971518c typo 2001-05-14 16:34:24 +00:00
Brian Paul
f89035b8c4 changed MAX_HEIGHT to 2048 2001-05-14 16:25:18 +00:00
Brian Paul
9bf68ad963 New triangle rasterization code. Store per-span initial/step values in the
new triangle_span struct.  Much cleaner code and possibilities for future
optimizations.
2001-05-14 16:23:04 +00:00
Keith Whitwell
9cf779e7ac Fix for glean texgen test. 2001-05-14 09:00:51 +00:00
Keith Whitwell
b8d091d350 increase blocksize, remove dead opcodes 2001-05-14 08:57:36 +00:00
Gareth Hughes
53e4ebd4e3 Fix long-standing FP exception bug in _mesa_x86_cliptest_points4(). 2001-05-13 18:55:15 +00:00
Brian Paul
d29e9dfe93 fixed scissor clear problem (Michael Saunders) 2001-05-11 18:58:32 +00:00
Keith Whitwell
c6083e1dc4 Clean up _tnl_Begin/begin/hard_begin.
Fix some problems with draw_arrays, draw_elements.
2001-05-11 15:53:06 +00:00
Keith Whitwell
b8f9980999 fix a couple of small bugs 2001-05-11 15:47:02 +00:00
Keith Whitwell
5759f53934 made render path selection more flexible 2001-05-11 12:08:15 +00:00
Keith Whitwell
6d1055c967 Clean up translation of array elements, copying of elts in pure-elt
cassettes.  Fixes problem with isosurf/compiled-array-elt/strips.
2001-05-11 08:11:31 +00:00
Brian Paul
1a3e034b12 redo previous change in a more defensive way 2001-05-10 18:01:19 +00:00
Brian Paul
a5cc6155d4 added check for zero-length spans, avoids potential problems later 2001-05-10 17:55:54 +00:00
Brian Paul
dbed202744 fixed some divide by zero problems found w/ conform 2001-05-10 17:41:41 +00:00
Brian Paul
bd3d9b9d04 RGBA mode GL_NAND was wrong, fixed 16-bit GLchan support 2001-05-10 16:54:12 +00:00
Keith Whitwell
8b6a91a93f Set 'prefer_float_colors' true, now that tnl uses them natively.
Apply Jeff Epler's optimization to ci spans as well, remove old code.
2001-05-10 15:42:42 +00:00
Brian Paul
e296d7f0e4 applied Jeff & Keith's optimization to write_span_mono_pixmap() 2001-05-10 14:21:17 +00:00
Brian Paul
ad51be1ad4 fixed bad texture border test (sometimes caused a segfault) 2001-05-10 12:57:12 +00:00
Brian Paul
72deb502d7 minor clean-up 2001-05-10 12:33:28 +00:00
Keith Whitwell
bc69de5f21 Driver interface changes 2001-05-10 12:22:32 +00:00
Keith Whitwell
7954a0cafd Replace PipelineStart, PipelineFinish with RunPipeline. Clean up
_tnl_run_pipeline() a little.
2001-05-10 12:18:38 +00:00
Brian Paul
f2bcadec7c removed linux-386-opt-V2-glide config since FX_V2 symbol has no significance anymore 2001-05-10 03:00:58 +00:00
Brian Paul
f50bbbf855 check hardware type and use SETUP_SNAP if needed 2001-05-10 02:59:04 +00:00
Brian Paul
8acb7e9ea2 fixed loop bug in _mesa_ConvolutionFilter2D() 2001-05-09 22:24:22 +00:00
Brian Paul
20dc7e6945 minor clean-ups 2001-05-09 21:58:19 +00:00
Brian Paul
b9f2494bfc fixed FP underflow problem in kfact computation 2001-05-09 21:36:52 +00:00
Brian Paul
91979127ec fixed font/bitmap x-offset bug (Frank Warmerdam) 2001-05-09 20:45:00 +00:00
Brian Paul
7884aa151f fixed Y flip problem in read_rgba_pixels() (Frank Warmerdam) 2001-05-09 20:42:37 +00:00
Brian Paul
a41edc31ce check for tiny values in dir[] vector in calcposobjs(), prevents FP underflows later 2001-05-09 20:02:28 +00:00
Brian Paul
61cb081a35 missed a GLfixed->GLfloat fog change 2001-05-09 17:31:46 +00:00
Brian Paul
78023e9808 don't call _mesa_win_fog_coords_from_z() if fog is disabled, fixes FP exception 2001-05-09 17:21:51 +00:00
Brian Paul
7b9ff48d02 make sure rotation plugged into sin/cos lookup tables is always positive, fixes FP exception 2001-05-09 17:14:19 +00:00
Brian Paul
f2bfc66c5d fixed minor logic error in _mesa_StencilOp() 2001-05-09 16:34:09 +00:00
Keith Whitwell
cd487af90b remove debug code 2001-05-09 15:34:08 +00:00
Keith Whitwell
5f2230c7bf add missing translate functions 2001-05-09 14:12:34 +00:00
Keith Whitwell
bcf749e83a fix possible segfault on destroy context 2001-05-09 13:53:36 +00:00
Keith Whitwell
335634b807 Add FLUSH_CURRENT() calls to fix ordering problems (incl. hierarchical
dlist calls).
2001-05-09 12:48:21 +00:00
Keith Whitwell
e809379caf Use correct PV when clipping. 2001-05-09 12:25:40 +00:00
Keith Whitwell
0a716cdff8 Don't scale basealpha by 255 now it's a float. 2001-05-09 12:24:51 +00:00
Keith Whitwell
0ff31445f2 fix eval/colormaterial interaction 2001-05-09 11:06:30 +00:00
Brian Paul
bc920f08f5 set MRD to 1.0, fixes new Glean polygon offset failure 2001-05-07 16:32:51 +00:00
Brian Paul
dae62174c5 sample plane equations at fragment centers, not lower-left corner 2001-05-07 16:01:59 +00:00
Gareth Hughes
c5e907e501 Add new tests. 2001-05-07 14:16:19 +00:00
Gareth Hughes
95d0fe9c11 More cleanups. 2001-05-07 14:06:15 +00:00
Gareth Hughes
c329f0824c Initial new Win32 build support. More to come. 2001-05-07 13:58:00 +00:00
Brian Paul
43caa5c09a added info about driver status in 3.5 2001-05-04 17:42:53 +00:00
Brian Paul
a2519c8aed do FLUSH_VERTICES() in glGet*() functions to make occlusion testing work, perhaps needed for other cases, like GL_CURRENT_COLOR 2001-05-03 23:55:38 +00:00
Brian Paul
1b3528fe63 interpolate fog valus as floats, not fixed - fixed the swrast fog problem 2001-05-03 22:13:32 +00:00
Keith Whitwell
652a14a215 fix for moebius infinite loop 2001-05-03 16:49:27 +00:00
Brian Paul
a03463303d added assertion to catch infinite loop in _tnl_fixup_compiled_cassette() - might help Keith 2001-05-03 16:11:16 +00:00
Brian Paul
9e351d52ae minor clean-ups and warning fixes 2001-05-03 14:11:18 +00:00
Keith Whitwell
5028216c81 add disabled test to turn on vertex snapping. 2001-05-03 09:11:03 +00:00
Brian Paul
531ac77263 fixed vertex color problems 2001-05-02 23:08:35 +00:00
Brian Paul
fe5cb830b1 teximage updates. seems to work fine. 2001-05-02 21:04:08 +00:00
Brian Paul
104c9fde4e changed parameters to _mesa_rescale_teximage2d() 2001-05-02 21:02:38 +00:00
Brian Paul
70bb907286 minor XFree86 change 2001-05-01 22:01:11 +00:00
Keith Whitwell
adcc2ce92b float color changes 2001-05-01 19:17:15 +00:00
Brian Paul
7448e33768 applied Diego Santa Cruz's patch to triangulateRectCenter() 2001-05-01 14:56:00 +00:00
Keith Whitwell
5b976943ee removed debug 2001-05-01 13:15:28 +00:00
Keith Whitwell
f4a003c3ca fix from Jouk 2001-05-01 07:25:41 +00:00
Keith Whitwell
0e14d6d68e Lots more eval fixes 2001-04-30 21:08:51 +00:00
Keith Whitwell
16837e4219 Restore optimization for cva glArrayElement operation. 2001-04-30 09:04:00 +00:00
Brian Paul
ac4a41d198 sync with XFree86/DRI glcore.h, now identical 2001-04-29 19:31:45 +00:00
Keith Whitwell
3d49061bfc typo 2001-04-29 08:48:43 +00:00
Keith Whitwell
d92f615fe5 More HW_DIVIDE checks. 2001-04-29 08:44:30 +00:00
Keith Whitwell
1018a16f39 Allow drivers to provide a dynamic CHECK_HW_DIVIDE, to turn the divide off
according to a runtime test.
2001-04-29 08:41:09 +00:00
Keith Whitwell
f358988f2e fix color copying in twosided quads 2001-04-28 15:47:48 +00:00
Keith Whitwell
04a374bd05 add specialized interp for backcolor, edgeflags 2001-04-28 15:26:43 +00:00
Keith Whitwell
51c0c71811 Support for floating point color representation in tnl module. 2001-04-28 08:39:17 +00:00
Brian Paul
27b0758a94 added -display option 2001-04-27 21:19:13 +00:00
Brian Paul
1832f1cc86 changed xmesa_visual and xmesa_buffer structs to directly include GLvisual and GLframebuffer structs instead of pointers 2001-04-27 21:18:25 +00:00
Brian Paul
75978bd85e added _mesa_free_framebuffer_data() 2001-04-27 21:17:20 +00:00
Brian Paul
4dbd625eaf added 16-bit/channel rendering info 2001-04-26 22:33:34 +00:00
Brian Paul
785c3469f4 Added Makefile support for building libOSMesa16.so which is Mesa compiled
for 16-bit color channels, using the OSMesa driver.
2001-04-26 22:27:09 +00:00
Brian Paul
f20ea88f88 fixed mem leak in XFreeFontInfo() call 2001-04-26 19:28:02 +00:00
Brian Paul
11785d441d flush pipeline in WMesaSwapBuffers (Frank Warmerdam) 2001-04-26 19:14:35 +00:00
Keith Whitwell
908be619fd first pass at eval fixes 2001-04-26 14:53:48 +00:00
Keith Whitwell
8bce6a217a no-copy drawarrays for remaining non-fan primitives 2001-04-26 14:51:06 +00:00
Brian Paul
5a2f32b102 fixed a potential tex obj reference count problem involving multi-texture 2001-04-25 18:21:05 +00:00
Brian Paul
830bf65275 added -Wundef to linux-debug compiler flags 2001-04-25 15:52:15 +00:00
Brian Paul
73ccfa0e9a added ShowAlphaBuffer feature - 'a' key 2001-04-25 15:51:32 +00:00
Brian Paul
3bfd0e6f9f minor simplification in glGetTexLevelParameter 2001-04-25 15:41:22 +00:00
Brian Paul
31acab88f2 fixed typo in GL_ARB_transpose_matrix 2001-04-24 21:52:36 +00:00
Brian Paul
08b3ff10d3 added -i and -h options 2001-04-24 20:57:36 +00:00
Brian Paul
df4fd765d5 reordered a few blend enums 2001-04-24 16:12:48 +00:00
Brian Paul
8753bd8900 fixed problems with texel component size queries in glGetTexLevelParameter() 2001-04-24 16:11:35 +00:00
Brian Paul
691f58930b texture image code updates (not finished) 2001-04-24 03:02:23 +00:00
Brian Paul
29acfe5bd4 assign texImage->FetchTexel only if NULL 2001-04-24 03:00:17 +00:00
Brian Paul
ad608fe44d fixed two mistakes in texture combine code 2001-04-23 18:06:09 +00:00
Brian Paul
cb6ae7b16b compilation fixes - texturing isn't working at this time 2001-04-20 22:51:55 +00:00
Brian Paul
b570a180da Minor fixes for Win32 (Karl Schultz). 2001-04-20 19:21:41 +00:00
Brian Paul
0a31a67269 improved a glBindTexture error message 2001-04-20 17:16:52 +00:00
Brian Paul
1c85aa3332 Fixed a texture conversion problem: sometimes need to produce an intermediate
texture image in the base internal format between user->Mesa format
conversion.  See comments in texstore.c
2001-04-20 16:46:04 +00:00
Brian Paul
3518a7950f check-in of old updates 2001-04-20 02:34:12 +00:00
Brian Paul
e3a7cc1f9e removed glext.h hacks 2001-04-19 22:40:45 +00:00
Brian Paul
5ff4075a69 bug fixes, added missing state query cases 2001-04-19 22:39:50 +00:00
Brian Paul
4c00e30ef0 added GL_ARB_texture_env_combine GL_ARB_texture_env_dot3 GL_ARB_texture_border_clamp (temporary until SGI updates this file) 2001-04-19 22:34:05 +00:00
Brian Paul
54207dfde6 added SecondaryColor functions 2001-04-19 22:33:03 +00:00
Keith Whitwell
18acf6e6f1 Add more options, including '-10','-100' and '-1000' to limit nr of vertices. 2001-04-19 13:12:40 +00:00
Keith Whitwell
3004bf8fd7 Remove values from VB->importable_data as those arrays are removed
from the VB.
2001-04-19 12:23:07 +00:00
Keith Whitwell
2b7c042525 Fix striding of color material inputs. (Fixes glean colorLitPerf) 2001-04-19 12:22:09 +00:00
Brian Paul
72fc93302c minor optimization to dot3 computation 2001-04-17 22:08:28 +00:00
Brian Paul
bcfe3936a8 Fixed a number of minor GL_ARB_texture_env_combine/dot3 issues. 2001-04-17 21:25:53 +00:00
Brian Paul
15eddf38fb another fix in import_texcoord() 2001-04-17 21:08:32 +00:00
Brian Paul
a6c6fce7e8 replaced ac->count with ac->count - ac->start in import_texcoord(), as in the other import functions 2001-04-17 20:37:44 +00:00
Brian Paul
0d47d26a68 fixed mis-ordered args to _math_trans_4f() in _tnl_fill_immediate_drawarrays() 2001-04-17 17:01:33 +00:00
Brian Paul
62c24f315b return hex string for unknown tokens in _mesa_lookup_enum_by_nr() 2001-04-16 21:07:33 +00:00
Brian Paul
a2ade36eb1 added missing 'break' in _mesa_TexEnvfv(), better error messages 2001-04-16 21:06:54 +00:00
Brian Paul
bf478280eb added a work-around in _swrast_copy_texsubimage[123]d() to fix alpha channel problem in some DRI drivers (see comments) 2001-04-13 00:13:51 +00:00
Brian Paul
77ff5e038a b-key toggles between textures w/ and w/out border 2001-04-12 20:50:26 +00:00
Brian Paul
608889d18f Moved FRAC macro out of mmath.h into s_texture.c since it's only used there
and doesn't do what one might expect for negative values.
Reimplemented FRAC in terms of floor() to fix glitches seen in tests/texwrap.c.
Minor fix for problem with GL_CLAMP_TO_BORDER_ARB with GL_NEAREST sampling.
2001-04-12 15:18:07 +00:00
Brian Paul
93de8d3d86 Reimplemented glPopAttrib code for GL_TEXTURE_BIT. It now calls the
various texture API functions to restore state.  Before, the device
drivers weren't getting notified of important texture state changes.
2001-04-11 23:22:20 +00:00
Brian Paul
6ac852d45b fixed some divide by zero conformance problems 2001-04-10 15:46:51 +00:00
Brian Paul
33143303fe Added IROUND_POS() macro to mmath.h and use where appropriate. (Klaus Niederkrueger) 2001-04-10 15:25:45 +00:00
Alan Hourihane
148bd34079 remove a HAVE_ELTS that I'd stuck before. 2001-04-09 15:41:11 +00:00
Keith Whitwell
8a09c3a34b Perform fixup on material values 2001-04-09 14:47:34 +00:00
Alan Hourihane
c818d6cce5 fix use of projected vertices with notex vertices when DO_PTEX isn't set. 2001-04-09 10:16:01 +00:00
Alan Hourihane
30c75badd1 Add quad and quad_strip 2001-04-07 16:16:58 +00:00
Alan Hourihane
d3abe14a3a add FINISH function at end of each render_* function
fix typo.
2001-04-06 16:26:41 +00:00
Brian Paul
2aacac9a5d replaced IntFormat GL_BGRA with GL_RGBA, fixes problems calling _mesa_base_texture_format() 2001-04-04 23:56:33 +00:00
Brian Paul
01429fa46a GL_INTENSITY case was incorrect in extract_float_rgba() 2001-04-04 23:22:38 +00:00
Brian Paul
36f3712e85 fixed tmpTexelSize computation bug 2001-04-04 22:41:23 +00:00
Brian Paul
7d58f44f73 More texture image changes.
1. Added ctx->Driver.ChooseTextureFormat() function.  Examines user's
   internalFormat, format, type params and returns a gl_texture_format.
2. _mesa_store_teximage[123]d() calls ctx->Driver.ChooseTextureFormat(),
   allocates storage and transfers the image into the desired format.
3. _mesa_transfer_teximage() now takes a gl_texture_format to describe
   the destination format.  Any combination of input format/type and
   output gl_texture_format is accepted.  Uses optimized _mesa_convert_-
   texsubimage[123]d() functions when possible.
3. DRI driver's TexImage[123]D functions should be a lot simpler now.
2001-04-04 21:54:20 +00:00
Brian Paul
bb0830da9e Updated bug report info in _mesa_problem() 2001-04-04 13:38:51 +00:00
Jouk Jansen
bb95cf8934 Committing in .
Modified Files:
 	Mesa/src/descrip.mms

 Removed glapinoop

----------------------------------------------------------------------
2001-04-04 12:02:12 +00:00
Brian Paul
bc80faa7d9 another fix to clear_32bit_ximage() 2001-04-03 17:35:54 +00:00
Brian Paul
a9e2abdcfb include fxdrv.h before other headers (Ivan Kalvatchev) 2001-04-03 16:32:29 +00:00
Brian Paul
2e1ed6447a fixed wglUseFontBitmapsA() bugs (Frank Warmerdam) 2001-04-03 16:25:54 +00:00
Brian Paul
9d205e3542 clear pixel value wasn't byteswapped for scissored clears in clear_32bit_ximage() 2001-04-03 16:19:54 +00:00
Brian Paul
373aea11c8 applied David's patch for parsing display's server:screen string 2001-04-02 22:45:07 +00:00
Brian Paul
67f7554232 querying proxy texture image info was segfaulting because of NULL TexFormat pointer 2001-03-30 21:14:30 +00:00
Brian Paul
347b3f0daf add texture border width to x/y/zoffset in gl[Copy]TexSubImage*D() functions to accomodate negative offsets correctly 2001-03-30 21:12:15 +00:00
Brian Paul
e116d3b3e5 texImage->FetchTexel wasn't getting initialized in _mesa_CopyTexImage1/2D() 2001-03-30 15:31:44 +00:00
Brian Paul
7b0b2ec73a fixed compilation problems related to ctx->_Enabled removal 2001-03-30 15:16:12 +00:00
Gareth Hughes
5e23af22f7 Remove all traces of CULL_MASK_ACTIVE. 2001-03-30 14:44:43 +00:00
Keith Whitwell
afc5699b08 Fix calculation of fog coordinate in translate_vertex(). 2001-03-30 00:39:02 +00:00
Keith Whitwell
ed39a43b8c Remove ENABLE_* flags, ctx->_Enabled.
Replace with ctx->Texture._TexMatEnabled, ctx->Texture._TexGenEnabled.
2001-03-29 21:16:25 +00:00
Brian Paul
2780ed4b97 silence a compiler warning 2001-03-29 17:15:21 +00:00
Keith Whitwell
3d5815f463 Removed DD_STENCIL, DD_FEEDBACK, DD_SELECT.
Added some switchable debug to s_context.c
2001-03-29 17:08:26 +00:00
Brian Paul
ee403ff0ba Removed DD_Z_NEVER.
Replaced SEPERATE with SEPARATE.
Renumbered _NEW_ flags.
Removed _NEW_COLORTABLE.
2001-03-29 16:50:31 +00:00
Gareth Hughes
1b2fef5c28 Consolidation of asm code in 3.5 2001-03-29 06:46:15 +00:00
Gareth Hughes
8e48a232fe Make generation of matypes.h more transparent. 2001-03-29 03:41:39 +00:00
Gareth Hughes
c41edfb7c4 Add missing GEN_SOURCES definitions. 2001-03-29 03:14:48 +00:00
Brian Paul
3d9168025c compilation updates 2001-03-28 21:39:49 +00:00
Brian Paul
f1f288182e adjustment to coverage sample positions 2001-03-28 21:37:24 +00:00
Gareth Hughes
16a8e986ce - Restore texImage->IntFormat.
- Fix FX driver texture image conversions.
2001-03-28 21:36:31 +00:00
Brian Paul
d082417dae check for startX off the right edge of the window 2001-03-28 21:36:31 +00:00
Brian Paul
5bfaa2f12e use Image[i]->TexFormat to check for mipmap consistency 2001-03-28 21:31:54 +00:00
Brian Paul
38e3675d7d simplify test for specific texture formats 2001-03-28 21:31:24 +00:00
Gareth Hughes
0a59ca6cae New type system for assembly code. Asm files should now include
matypes.h, which includes assyntax.h and is generated from the core Mesa
header files.
2001-03-28 20:44:43 +00:00
Gareth Hughes
38f28665bf More texture format updates. Drivers now need only plug an appropriate
format into texImage->TexFormat, the rest is handled by core Mesa.
2001-03-28 20:40:51 +00:00
Gareth Hughes
53933fe9db More informative display of texture parameters. 2001-03-28 20:25:14 +00:00
Gareth Hughes
29cded2654 Delete libGLU.so* from ../lib before installing it. 2001-03-28 20:17:55 +00:00
Brian Paul
c7aeb8bf1f removed a debug message 2001-03-28 17:39:12 +00:00
Brian Paul
46560b94ae remove TEST_L and JZ instructions; always jump through the _glapi_Dispatch pointer 2001-03-28 17:22:11 +00:00
Brian Paul
3c257e187b New mechanism for thread-safe GL API dispatch. C-based dispatch is faster.
Folded glapinoop.c code into glapi.c.
Added code to glapitemp.h to fill in dispatch tables.
Updated Makefiles.
2001-03-28 17:19:58 +00:00
Brian Paul
fb8af6fc97 pass dst and src to CONVERT_TEXEL() macros to fix non-ANSI problems 2001-03-27 20:32:24 +00:00
Brian Paul
81e3955acf fixed RGBA/RGB typo 2001-03-27 20:26:37 +00:00
Brian Paul
197c526d63 texFormat was a random value in _mesa_store_teximage3d(), fix by undoing last changes 2001-03-27 20:26:10 +00:00
Gareth Hughes
19d1e43261 Updates required for DRI drivers on mesa-3-5-branch. 2001-03-27 19:18:02 +00:00
Brian Paul
a767bff929 added rules for readtex.c and readtex.h 2001-03-27 17:44:35 +00:00
Brian Paul
5479e93031 double buffer by default. if drawSmooth, use 50% alpha at top of polygon 2001-03-27 17:38:28 +00:00
Brian Paul
8afa9e593b set initial window pos 2001-03-27 17:35:26 +00:00
Brian Paul
0a355dc010 clean-up of tunnel demos 2001-03-27 17:30:51 +00:00
Brian Paul
25a5dc2ea7 moved shadow code into teapot.c 2001-03-27 17:08:20 +00:00
Brian Paul
06ed3f0a0a silence compiler warnings 2001-03-27 16:42:37 +00:00
Brian Paul
6dbb39025c removed DO_GEOMETRY 2001-03-26 23:36:51 +00:00
Brian Paul
5535aca5df change glTexImage3D() internalFormat to GLenum to match other OpenGLs 2001-03-26 20:02:38 +00:00
Brian Paul
0bc933a460 test texture wrap modes 2001-03-26 19:45:57 +00:00
Brian Paul
2bb04cad14 added GL_ARB_texture_border_clamp 2001-03-26 19:42:40 +00:00
Gareth Hughes
425fea1c34 - Minor cleanups of ctx->Driver.Current*Primitive usage.
- Remove unused gl_reduce_prim array.
2001-03-24 06:01:27 +00:00
Gareth Hughes
577f318e0e Fix ASSERT_OUTSIDE_SAVE_BEGIN_END() macro as well. 2001-03-24 05:23:46 +00:00
Brian Paul
63fae71713 added glxgears 2001-03-23 22:48:35 +00:00
Brian Paul
355da23785 gears using GLX instead of GLUT 2001-03-23 22:46:26 +00:00
Brian Paul
39557c3921 added silly mesa_hack() function and -b option 2001-03-23 21:41:44 +00:00
Brian Paul
6d62d7f321 minor tweak to visual setup for accum buffers 2001-03-23 21:37:05 +00:00
Brian Paul
4672b2d88c fixed Min/Max lod clamp bug 2001-03-23 18:53:26 +00:00
Gareth Hughes
b3678f1080 Some more minor cleanups of macros. 2001-03-23 06:07:31 +00:00
Gareth Hughes
8b7dfa8526 Remove compiler warnings about ASSERT_OUTSIDE_BEGIN_END() macro. 2001-03-23 06:01:03 +00:00
Gareth Hughes
7387394e59 Initial demo of GL_EXT_texture_filter_anisotropic extension. 2001-03-22 15:24:15 +00:00
Brian Paul
19bf744556 enable GL_ARB_texture_env_combine and GL_ARB_texture_env_dot3 in _mesa_enable_sw_extensions() 2001-03-22 14:42:24 +00:00
Jouk Jansen
3427e3547e Modified Files:
Mesa/si-glu/libnurbs/nurbtess/monoTriangulation.cc
 	Mesa/si-glu/libnurbs/nurbtess/sampleCompRight.cc

 gluos.h included in order to bypass compiler warnings on unreachable code on
 VMS systems.
----------------------------------------------------------------------
2001-03-22 11:41:40 +00:00
Jouk Jansen
df1e73af7a Modified Files:
Mesa/descrip.mms Mesa/mms-config Mesa/demos/descrip.mms
 	Mesa/si-glu/include/gluos.h
 	Mesa/si-glu/libnurbs/internals/bufpool.h
 	Mesa/si-glu/libnurbs/internals/mysetjmp.h
 	Mesa/src-glut/descrip.mms
 Added Files:
 	Mesa/si-glu/descrip.mms Mesa/si-glu/mesaglu.opt

 changes needed to compile SI-GLU on VMS.

----------------------------------------------------------------------
2001-03-22 11:38:36 +00:00
Gareth Hughes
ea1bfcc80a Remove formats that no longer exist. 2001-03-22 06:26:18 +00:00
Gareth Hughes
2f177e2906 Minor updates. 2001-03-22 06:25:23 +00:00
Gareth Hughes
7acad72a1a Fix texture format enum values (Brian Paul). 2001-03-22 06:23:56 +00:00
Brian Paul
8806915c3a added GL_ARB_texture_env_dot3 enums 2001-03-22 04:57:09 +00:00
Brian Paul
a13df148df minor comment update 2001-03-22 04:56:50 +00:00
Brian Paul
1a59875367 added GL_ARB_texture_env_combine, GL_ARB_texture_env_dot3 2001-03-22 04:54:58 +00:00
Brian Paul
e9313a64c1 clean-up in _swrast_choose_triangle() 2001-03-22 04:54:08 +00:00
Gareth Hughes
d2733fa196 Add PolygonOffset driver callback. 2001-03-22 00:36:27 +00:00
Brian Paul
8ac1f97e9e added teximage rescaling code. untested at this point 2001-03-21 18:23:39 +00:00
pesco
6f3178a3be * src/swrast_setup/ss_tritmp.h (quad): Changed name of this function to
quadfunc.
* common_rules.make: Use tabs for command indentation.
2001-03-21 17:11:32 +00:00
Brian Paul
1639518b64 minor updates for 3.5 2001-03-21 16:47:33 +00:00
Brian Paul
935d5e5daa use new texture conversion code, still have to do image rescaling 2001-03-21 16:47:19 +00:00
Brian Paul
0299ad7532 renamed some vars, added a bunch of comments 2001-03-21 16:44:08 +00:00
Brian Paul
c8cfbf7c19 minor re-org in sample_depth_texture() 2001-03-21 16:04:49 +00:00
Brian Paul
2743def830 sync'd with the latest changes in XFree86 (cygwin stuff) 2001-03-21 16:00:17 +00:00
Gareth Hughes
fa6be6e77a Fix compilation with GLU 1.1 2001-03-21 02:47:32 +00:00
Gareth Hughes
f5328c534d Make ESC quit. 2001-03-21 02:44:36 +00:00
Gareth Hughes
16cdc6ab12 Revert back to new tessellator, check version string to be sure we're
running with a valid GLU library.
2001-03-21 02:43:14 +00:00
Brian Paul
56671022f9 depth images were broken by latest teximage changes, this fixes the problem 2001-03-21 01:08:37 +00:00
Gareth Hughes
b5f0de18b9 Make COPY_FLOAT available to a wider audience. 2001-03-20 18:35:23 +00:00
Gareth Hughes
23f48064b8 More updates. Radeon tnl module still disabled by default. 2001-03-20 18:33:41 +00:00
Brian Paul
815ad714b4 fixes to make old GLU code compile with new GLU 1.3 header 2001-03-20 17:56:10 +00:00
Jouk Jansen
f3e3178751 Committing in .
Modified Files:
 	Mesa/src/descrip.mms Mesa/src/texutil_tmp.h

 -Updated VMS makefile
 -__FUNCTION__ is not a defined on VMS (and maybe other systems) For VMS
  __FUNCTION__ is defined to  in texutil_tmp.h



----------------------------------------------------------------------
2001-03-20 10:18:13 +00:00
pesco
68af9a0773 * common_rules.make: Created to hold the conditional build rule
override. All Makefile.am's updated.
2001-03-20 00:33:18 +00:00
Brian Paul
4e856077b7 fix for gl_ztrick bug (Ove Kaaven) 2001-03-19 22:45:52 +00:00
pesco
6507d9249d * si-glu/libnurbs/: Undid move of glimports.h, mystdio.h, mystdlib.h. 2001-03-19 17:52:02 +00:00
Alan Hourihane
e18599a6c3 fix glxinfo to query current display. 2001-03-19 13:58:45 +00:00
Alan Hourihane
92eac1c765 fix cast 2001-03-19 13:27:15 +00:00
Keith Whitwell
b048d8e084 New files 2001-03-19 02:28:59 +00:00
Keith Whitwell
7098924599 Split driver struct into swrast/tnl/core components. 2001-03-19 02:25:35 +00:00
pesco
d9bf6ccce9 * gen_srclists.sh: Use getopt to parse the command line. Added command
line option -n (dry run) and -h. Directory list can be specified on the
command line.
Added command line options -p and -l. Some other tweaks.

* si-glu/libnurbs/glimports.h, si-glu/libnurbs/mystdio.h,
si-glu/libnurbs/mystdlib.h: Pulled these out of
si-glu/libnurbs/interface and si-glu/libnurbs/internals. All include
paths updated.
2001-03-18 15:40:45 +00:00
Gareth Hughes
371ef9c058 Add missing header file include. 2001-03-18 14:06:25 +00:00
Gareth Hughes
ad7ce73609 Remove #endif. 2001-03-18 14:05:32 +00:00
Gareth Hughes
264c6fd177 Make assertions take new GLchan formats into account. 2001-03-18 13:40:58 +00:00
Gareth Hughes
3fa4bd008c Fix error message. 2001-03-18 13:37:18 +00:00
Gareth Hughes
7ea33579e7 Fix header info. 2001-03-18 13:34:24 +00:00
Gareth Hughes
6b406bf09d Remove old code, fix a few comments. 2001-03-18 13:31:52 +00:00
pesco
2f9757f344 Forgot to add newly created files. 2001-03-18 13:06:19 +00:00
Gareth Hughes
2c3d34c905 - Port 3.4 texture utils, texture format work to 3.5 (including new
FetchTexel routines).
- Initial hooks for GL_EXT_texture_filter_anisotropic.
2001-03-18 08:53:49 +00:00
Keith Whitwell
6e550baa0a Fix lineloops. 2001-03-18 00:46:04 +00:00
Keith Whitwell
bcc513ebf5 Fix cut&paste bug exposed by clipbug.c demo. 2001-03-17 18:04:54 +00:00
Keith Whitwell
47489c0721 Remove dead #define.
Add case for triangles culled front and back -- not handled by the
culling code inside swrast triangle routines.
2001-03-17 17:43:04 +00:00
Keith Whitwell
c6e2d29cde Revert earlier changes protecting against null VB->TexCoordPtr[x]. Do
this a better way via check_tex_sizes().
2001-03-17 17:31:42 +00:00
Brian Paul
eb11fa73ec added SI GLU info 2001-03-17 00:47:19 +00:00
Brian Paul
47cbbcc1b6 updated for SGI SI GLU 2001-03-17 00:45:01 +00:00
Brian Paul
1bb327ebdb SGI SI GLU 1.3 header 2001-03-17 00:29:47 +00:00
Brian Paul
84c8964116 added CCFLAGS and CPLUSPLUS definitions 2001-03-17 00:27:04 +00:00
Brian Paul
77cc447b96 SGI SI GLU library 2001-03-17 00:25:40 +00:00
Brian Paul
24fab8e250 removed ARB_texture_env_add bool flag, use EXT_texture_env_add flag 2001-03-15 18:21:01 +00:00
Brian Paul
b082abc28f use IROUND() instead of (int) cast (Klaus Niederkrueger) 2001-03-15 16:45:30 +00:00
Gareth Hughes
c6742cedee Fix typo. 2001-03-14 08:51:09 +00:00
Gareth Hughes
3709db0e17 Initial templates for immediate mode fastpaths, or custom tnl modules.
Completely untested and incomplete.  More to follow.
2001-03-13 17:39:56 +00:00
Gareth Hughes
3df1e04b10 Nope, -ansi spoils that... 2001-03-12 02:24:53 +00:00
Gareth Hughes
2a938d3ab7 Undo -D_POSIX_SOURCE change, fix the way the katmai support test is
done.
2001-03-12 02:13:39 +00:00
Gareth Hughes
79b2d13ae2 - Add -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L to linux builds, we've
been using it with the DRI for long enough without any issues and we
  need it to include the katmai functions.
- Make katmai assembly work with the debug tests.
- A few general cleanups.
2001-03-12 02:02:36 +00:00
Gareth Hughes
d4eb665c60 Add missing header file. 2001-03-12 01:32:20 +00:00
Gareth Hughes
467037de22 Add missing header file include. 2001-03-12 01:06:44 +00:00
Gareth Hughes
22144ab755 Consistent copyright info (version number, date) across all files. 2001-03-12 00:48:37 +00:00
Gareth Hughes
57ffddba98 Minor cleanups. 2001-03-11 23:55:19 +00:00
Gareth Hughes
de6a2e0d19 Clean up install, restore for exec vtxfmts. 2001-03-11 23:49:20 +00:00
Gareth Hughes
d8aa0269cd Support for swappable tnl modules.
Core Mesa provides a neutral tnl module that verifies the currently
module before installing the tnl function pointers in a lazy fashion.
It also records which tnl functions have been swapped out, and only
restores these when tnl modules themselves are swapped.

Fallback strategies:

Drivers set a bitmask of dangerous stage changes.  When such a state
change occurs, the driver should restore the neutral tnl module via
_mesa_restore_exec_vtxfmt().  The neutral tnl module will call
_mesa_update_state(), followed by ctx->Driver.ValidateTnlModule() if the
validation bitmask matches the new state bitmask.  The driver should
call _tnl_wakeup_exec() if it can no longer handle the current state,
which will revert to the default tnl module.  In this case, previous
vertices should be replayed as required (depending on the current
primitive) after the new tnl module is installed.

If the driver uses chooser functions for any part of the tnl module,
these should generally be reinstalled as part of the fallback to the
neutral tnl module.  For example, if the lighting state changes, a
driver might fall back to the neutral tnl module, verify that the
current lighting state can be handled, and use the chooser function to
pick the most efficient implementation of the current lighting state.

It is up to the drivers to detect and handle fallback cases caused by
tnl function calls themselves (such as glTexCoord4f* if the current tnl
module can't handle projected textures, for example).
2001-03-11 18:49:11 +00:00
Gareth Hughes
b1b4036656 Add a couple of missing functions. 2001-03-10 02:50:42 +00:00
Gareth Hughes
53e4bf9afd More generic vtxfmt template, useful for creating neutral tnl module as
well as fallback functions for driver tnl modules.
2001-03-09 16:08:13 +00:00
Brian Paul
ca8c6a0337 fixed RBGA ifdef typo 2001-03-08 22:27:41 +00:00
Brian Paul
95e02a210e do fog interpolation if INTERP_FOG is defined, not when INTERP_Z is defined 2001-03-08 17:33:33 +00:00
Brian Paul
896e8bd2d7 processed by indent to improve readability 2001-03-08 17:17:28 +00:00
Brian Paul
417ed16a88 changed bincoeff var to GLfloat, fixes bug introduced in previous check-in 2001-03-08 17:15:01 +00:00
Brian Paul
a28fa45ab7 test 16-bit/channel rendering 2001-03-08 15:24:18 +00:00
Brian Paul
01915e90e6 More g++ warning fixes. Fixes for CHAN_BITS==16, it seems to work. 2001-03-08 15:23:46 +00:00
Brian Paul
eac57f009e added an assertion in the init code, just to be safe 2001-03-07 23:22:08 +00:00
Jon Taylor
9cb9401e87 Misc build fixes 2001-03-07 20:42:14 +00:00
Gareth Hughes
4da75f6d91 Add missing copy in _mesa_noop_Color4fv(). 2001-03-07 18:16:40 +00:00
Brian Paul
b51b0a847d fixed a bunch of g++ warnings/errors. Compiling with g++ can help find lots of potential problems 2001-03-07 05:06:11 +00:00
Brian Paul
249aebdd35 _MinMagThresh[] should be GLfloat 2001-03-07 04:50:49 +00:00
Brian Paul
90ea526114 added some casts in the 16-bit GLchan macros, just to be safe 2001-03-07 03:20:38 +00:00
Brian Paul
be3d539dac added Driver.BlendColor() function, for completeness 2001-03-07 00:21:32 +00:00
Brian Paul
ac859a4cbd fixed segfaults when tex unit 1 enabled, but not unit 0 (conform) 2001-03-05 22:40:10 +00:00
Brian Paul
75280a2c74 added missing ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH() macros 2001-03-05 22:18:23 +00:00
Keith Whitwell
89700a4abd DO_POINT renamed DO_POINTS 2001-03-05 19:54:03 +00:00
Keith Whitwell
0ceb82b838 Changes for ffb 2001-03-05 18:52:18 +00:00
Keith Whitwell
3db5374e66 Fix typo 2001-03-05 18:04:38 +00:00
Brian Paul
d395251b35 GL_EXT_secondary_color test 2001-03-05 17:50:35 +00:00
Brian Paul
d49081302a GL_EXT_fog_coord test 2001-03-05 17:31:57 +00:00
Keith Whitwell
3c646597cf Add missing cases for viewport transform. Remove INVALIDATE_STORED_VERTICS
macro
2001-03-05 16:41:47 +00:00
Brian Paul
a11c0bcf97 replaced gl_test_os_katmai*() with _mesa_test_os_katmai*() 2001-03-05 15:57:59 +00:00
Brian Paul
865322f931 more clean-ups 2001-03-03 21:11:32 +00:00
Brian Paul
d62269757b used indent to clean-up the code 2001-03-03 20:59:06 +00:00
Brian Paul
188f2949ea more namespace clean-ups 2001-03-03 20:56:59 +00:00
Brian Paul
0883634178 lots of gl_*() to _mesa_*() namespace clean-up 2001-03-03 20:33:27 +00:00
Brian Paul
19bbfc6263 optimized lambda calculation (Klaus Niederkrueger) 2001-03-03 00:37:27 +00:00
Brian Paul
85312e6db1 changed AlphaFunc() ref from GLclampf to GLchan 2001-03-03 00:12:47 +00:00
Brian Paul
eb2b63877a fixed _mesa_getenv() weirdness 2001-03-02 16:01:22 +00:00
Brian Paul
6a2d72ecff fixed mistake in alpha buffer clear test 2001-03-01 18:30:47 +00:00
Keith Whitwell
6da33b1249 Uncomment some defaults. 2001-03-01 18:18:05 +00:00
Keith Whitwell
0fe593a71e Bugfixes for vertex format, templates 2001-03-01 17:40:14 +00:00
Brian Paul
d89c87ac40 added s/w alpha buffer clearing 2001-03-01 00:05:05 +00:00
Brian Paul
b4203c1c49 removed some bogus error checks 2001-02-28 19:31:39 +00:00
Brian Paul
0221e4d6c8 Now there's four possible display modes:
1. normal, shadowed rendering
2. display depth texture image
3. display depth texture mapped onto scene
4. render grayscale scene where gray level = distance from light source
2001-02-28 18:41:50 +00:00
Keith Whitwell
feb555af03 Templates are in working order. 2001-02-28 18:19:27 +00:00
Brian Paul
be3602da41 GLvisual inside GLframebuffer is no longer a pointer, copy the struct instead.
Added context/drawbuffer visual config sanity checking in _mesa_make_current2().
Added some 'const' keywords.
2001-02-28 00:27:48 +00:00
Brian Paul
6a9851d72d fixed glitches in error checking of imaging extensions 2001-02-27 22:33:59 +00:00
Brian Paul
bf8b5f99a1 signal _NEW_TEXTURE in all teximage functions 2001-02-27 22:16:27 +00:00
Brian Paul
2eb801cda2 added fog coord clamping 2001-02-27 21:58:59 +00:00
Brian Paul
8753b1c397 colortable w/ size=0 wasn't handled correctly 2001-02-27 16:42:01 +00:00
Keith Whitwell
bed4c5bf58 Initialize Line._Width 2001-02-27 16:14:35 +00:00
Brian Paul
18c516655f more tweaks 2001-02-27 00:13:25 +00:00
Brian Paul
01a5dd879b minor extension tweaks 2001-02-27 00:05:27 +00:00
Brian Paul
6975540db2 Disable most extensions by default. Drivers should enable them as needed.
Renamed gl_*() functions as _mesa_*().
2001-02-26 23:58:12 +00:00
Brian Paul
806e20f463 fixed extension checking in _mesa_BlendEquation() 2001-02-26 22:07:03 +00:00
Brian Paul
511378b05d added filtering option, compute shadow tex size from window size 2001-02-26 18:26:32 +00:00
Brian Paul
eb198d2702 tiny change to a gl_problem() call 2001-02-26 18:25:25 +00:00
Brian Paul
1f57563b9d added a cube map error check 2001-02-26 18:24:55 +00:00
Brian Paul
30038ecaa2 bilinear sampling of depth textures 2001-02-26 18:24:37 +00:00
Keith Whitwell
feca368c29 Template work 2001-02-24 18:25:52 +00:00
Brian Paul
0d04827f6d another fix in _mesa_stencil_and_ztest_pixels() for hardware fallbacks 2001-02-23 23:14:11 +00:00
Brian Paul
74b775e14d fixed bug in _mesa_stencil_and_ztest_pixels() found w/ DRI mga driver 2001-02-23 20:08:29 +00:00
Brian Paul
dab76b4dc5 improvements to regions_overlap() function 2001-02-22 17:59:24 +00:00
Brian Paul
ea83bacf9c removed some bogus code 2001-02-22 17:50:13 +00:00
Jouk Jansen
69c283e061 Committing in .
Modified Files:
 	Mesa/src/descrip.mms

 old files removed/ new files included in VMS makefile
----------------------------------------------------------------------
2001-02-22 08:52:30 +00:00
Brian Paul
abe094e4a1 fixed GL_LUMINANCE_ALPHA bug in fetch_2d_texel() 2001-02-21 16:02:27 +00:00
Keith Whitwell
4eebc90a17 Added GLvector4chan type, removed lots of CHAN_TYPE ifdefs. 2001-02-20 18:28:52 +00:00
Brian Paul
8bbc71f2eb more 3.5 updates 2001-02-20 17:08:55 +00:00
Brian Paul
0a0595f2d3 added extension #ifdef/#endifs 2001-02-20 17:06:35 +00:00
Brian Paul
03ca5eb58f added shadow extensions 2001-02-20 17:05:04 +00:00
Brian Paul
d6c3f73fb4 added shadowtex 2001-02-20 17:04:52 +00:00
Brian Paul
1399d7650d demo of GL_SGIX_shadow 2001-02-20 16:43:50 +00:00
Brian Paul
c499ce31ba Implemented GL_SGIX_shadow and GL_SGIX_shadow_texture.
Added some const keywords in the s/w texturing code.
2001-02-20 16:42:25 +00:00
Brian Paul
0c75c4c417 plug in fallback teximage DD functions 2001-02-19 20:14:57 +00:00
Brian Paul
2aadbf41df Updated Driver.CopyTexImage[12]D and Driver.CopyTexSubImage[123]D functions
so they work like the other teximage functions.  Added fallback routines to
texstore.c for drivers to use.
2001-02-19 20:01:41 +00:00
Brian Paul
aaf5a9bb08 added a bunch of extensions (Ray Tice) 2001-02-19 18:28:59 +00:00
Brian Paul
e75d2424e5 Changed FetchTexel() function pointer arguments.
Implemented glGetTexImage(format=GL_COLOR_INDEX).
Changed _mesa_unpack_depth_span() args.
Minor changes/clean-ups in mtypes.h.
Histogram counter component sizes were wrong.
2001-02-17 18:41:01 +00:00
Brian Paul
8f9a594ac8 added MESA_GLX_FORCE_CI env var (useful for conformance testing) 2001-02-17 00:17:31 +00:00
Brian Paul
f7e1dfeaef Work in glGetTexImage() to return GL_COLOR_INDEX images.
Prototype code for GL_SGIX_depth_texture / more flexible teximage code.
2001-02-17 00:15:39 +00:00
Brian Paul
23e8d46e07 moved depth/index/stencil span packing into image.c 2001-02-16 23:29:14 +00:00
Brian Paul
8a42f6b359 added n-key to toggle nice fog, other minor clean-ups 2001-02-16 21:48:16 +00:00
Keith Whitwell
4539e9195d Fix state bitmasks for invalidating line,tri,point functions. (won't fix
the fog problem, I don't think)
2001-02-16 18:56:46 +00:00
Keith Whitwell
46b0988c67 Allow swrast to cope (fairly) cleanly with GL_SEPERATE_SPECULAR when
texturing is not enabled, and without requiring the two colors be
added externally.

As a part of this, collapsed the decomposition of quads into triangles
inside swrast to be hardwired into _swrast_Quad; removed s_quads.[ch].

Removed checks on texture state from t_vb_light.c, which was previously
required by swrast.

Moved the t_dd_ templates to a new directory.
2001-02-16 18:14:41 +00:00
Keith Whitwell
2448fc7dee Fixed conform problems with recent material tracking change.
Remove redundant 'update_materials' stage.
Fix conform segfault with seperate specular colors in mustpass.c.  These
tests still fail, however.
2001-02-16 00:35:34 +00:00
Brian Paul
86ca15ece7 minor scissor optimizations (Klaus Niederkrueger) 2001-02-15 22:59:01 +00:00
Keith Whitwell
c6b2a92613 Fix propogation of material values in VB's that don't reach the lighting
stage.  (Materials now treated more like colors, etc.).

Continue whipping the dd templates into shape.

Remove old NormalLength code; may come back as a driver helper, but not
useful for, eg. hardware t&l drivers.
2001-02-15 01:33:52 +00:00
Brian Paul
4e52e192b2 fixed a CI-mode spot light conformance failure, but still not clear why 2001-02-14 23:00:42 +00:00
Brian Paul
4de3ded28a updated with 3.4 and 3.4.1 entries 2001-02-14 22:59:50 +00:00
Brian Paul
4e492363f0 removed a misplaced _mesa_logicop_ci_span() call 2001-02-14 22:40:21 +00:00
Brian Paul
b5fb4fd55b fixed a CI mode segfault, minor clean-ups 2001-02-13 23:59:34 +00:00
Brian Paul
88c5ceb650 fixed an assertion 2001-02-13 23:58:38 +00:00
Brian Paul
c3a4dbfbd6 fixed a few CI mode span bugs and a dither bug 2001-02-13 23:57:48 +00:00
Brian Paul
45323646bd fixed bug in gl_validate_all_lighting_tables() found with CI mode conformance tests 2001-02-13 23:55:30 +00:00
Brian Paul
10686f42c9 removed bogus assertions 2001-02-13 23:54:12 +00:00
Brian Paul
dc866313af gl_error clean-ups 2001-02-13 23:51:34 +00:00
Brian Paul
8f28f4850b fixed GL_SET bug 2001-02-13 23:50:25 +00:00
Brian Paul
479fa1db1d added debug assertions to be sure drivers initialize all required function pointers 2001-02-12 19:04:30 +00:00
Brian Paul
a81b3532f7 added ctx->Driver.ResetLineStipple, misc clean-up 2001-02-12 18:32:26 +00:00
Brian Paul
3c84ab90f2 fixed RGB over/underflow bug for tiny triangles (bug 128969) 2001-02-12 17:02:00 +00:00
Brian Paul
15bf1cd129 minor updates to sync w/ XFree86 changes 2001-02-09 23:39:02 +00:00
Brian Paul
ccc8b9239c minor changes from XFree86 (dawes) 2001-02-09 23:23:43 +00:00
Jouk Jansen
18ce0f1254 Committing in .
Modified Files:
 	Mesa/src-glut/glut_event.c Mesa/src-glut/glut_get.c
 	Mesa/src-glut/glut_init.c Mesa/src-glut/glutint.h

 Patch for compilation on very old VMS (version 6.2 and earlier)

----------------------------------------------------------------------
2001-02-09 12:19:17 +00:00
Brian Paul
9db3f95ace fixed bytesPerValue bug in OSMesaGetDepthBuffer() 2001-02-08 23:52:29 +00:00
Brian Paul
1f12a07380 fixed bugs in _mesa_clear_depth_buffer(), bug #131366 2001-02-08 15:57:01 +00:00
Brian Paul
1ceda0f84f GLchan fixes 2001-02-07 19:02:23 +00:00
Brian Paul
9a0b12ab00 fixed texel indexing bug in _mesa_GetTexImage() 2001-02-07 18:59:45 +00:00
Brian Paul
b4736f5e17 added divide by zero checks 2001-02-07 18:44:55 +00:00
Brian Paul
5c55aa4e61 fixed divide by zero problem 2001-02-07 18:36:52 +00:00
Brian Paul
a1f1586bcb added some code for proxy texture tests 2001-02-07 16:27:41 +00:00
Keith Whitwell
b8e1c70ec1 Correctly calculate size for disabled texcoord arrays. 2001-02-07 16:00:58 +00:00
Jouk Jansen
fb1565bcdd VMS compile update 2001-02-07 09:15:41 +00:00
Brian Paul
6830123a4c check texture texel type before using optimized sampling functions 2001-02-07 03:55:31 +00:00
Brian Paul
43bc364af4 remove unused functions 2001-02-07 03:53:07 +00:00
Brian Paul
03d967abb5 new texture image routines work now 2001-02-07 03:30:07 +00:00
Brian Paul
6628bc9cff made some changes to the initialization of gl_texture_image fields 2001-02-07 03:27:41 +00:00
Gareth Hughes
dde2da64b5 Force texture download every time to handle lazy texture downloads. 2001-02-07 03:04:58 +00:00
Brian Paul
78ad878b66 updated texture image handling - STILL UNTESTED 2001-02-06 23:35:49 +00:00
Brian Paul
f378ab825c added a number of debugging tests to be sure drivers handle texture images correctly 2001-02-06 23:35:26 +00:00
Brian Paul
8e39ad2cd6 Overhaul of texture image handling.
1. gl_texture_image struct's Data pointer points to images in driver's format.
2. Added FetchTexel() function pointer to struct gl_texture_image.
3. Changed Driver Tex[Sub]Image functions, return void now.
4. Texture storage/fetch code in new texstore.c file.
5. Removed texture.[ch] - functions moved to state.c

Note: FX driver updates not finished yet.
2001-02-06 21:42:48 +00:00
Brian Paul
16461f7c53 added _mesa_adjust_image_for_convolution() 2001-02-06 17:22:16 +00:00
Keith Whitwell
d1baa05439 Use a lookup table to compute exponents in tnl fogging code. Slightly
clean up the shine table lookup macro.
2001-02-06 04:06:34 +00:00
Brian Paul
8fd9f1748d misc updates to match latest device driver changes 2001-02-06 00:03:47 +00:00
Brian Paul
228748bc49 added mesa_profile extern decl 2001-02-05 19:17:31 +00:00
Brian Paul
d8bc5a9eba replaced frustrum with frustum 2001-02-05 18:48:52 +00:00
Jouk Jansen
db7a3318aa Committing in .
Modified Files:
 	Mesa/src/descrip.mms

 Updated VMS make-files

----------------------------------------------------------------------
2001-02-05 08:56:12 +00:00
Keith Whitwell
71270195d5 rework to correctly respect _ac_import_range() 2001-02-04 00:47:28 +00:00
Keith Whitwell
6e9f8b7cdb Fast no-copy drawarrays for large tristrips 2001-02-04 00:44:36 +00:00
Gareth Hughes
fe69cb4b9b Some more work on interal debugging, timing routines for things that
will have implementations in assembly code.  To come: texture image
conversions, more of internal T&L pipeline and so on.
2001-02-03 08:41:03 +00:00
Jouk Jansen
6d689e8a69 Committing in .
Modified Files:
 	Mesa/src/descrip.mms

 Updates VMS compile-support
----------------------------------------------------------------------
2001-01-31 14:10:16 +00:00
Brian Paul
eeb861df0b make gluPerspective() call glMultMatrix() instead of glFrustum() to get correct error semantics 2001-01-30 18:08:51 +00:00
Brian Paul
d68b699291 added packed types to glGetMinMax and glGetHistogram error checks 2001-01-30 17:46:34 +00:00
Brian Paul
e56cc3970f fixed half pixel offset bug in aa point code 2001-01-30 16:38:20 +00:00
Gareth Hughes
f2515fa83e Upgrade to (patched) version 7 of glext.h 2001-01-30 15:02:34 +00:00
Brian Paul
426628c374 last segment of AA stippled lines wasn't drawn 2001-01-29 23:38:41 +00:00
Brian Paul
326f9ddd8a fixed inverted Y coord for dithering in write_span_DITHER_5R6G5B_ximage() 2001-01-29 22:40:23 +00:00
Brian Paul
ba70e59e82 GL_SHADE_MODEL wasn't popped correctly 2001-01-29 22:15:44 +00:00
Brian Paul
961b7cad05 removed unused vars 2001-01-29 22:10:37 +00:00
Brian Paul
184a575a00 only compute separate specular if texturing really enabled 2001-01-29 22:10:24 +00:00
Brian Paul
407b487017 fixed computation of _MultiTextureEnabled (again) 2001-01-29 21:47:13 +00:00
Keith Whitwell
d98fdad3bf Update implementations of Driver.Clear(). 2001-01-29 20:56:32 +00:00
Keith Whitwell
5c1e7fa6ee Removed knowledge of swrast Clear/Bitmap/Accum/Draw/Read/CopyPixels
functions from core mesa -- if drivers need these fallbacks they
must now call them themselves.

Introduced hooks for clip-vertex-interpolation and the rendering
of clipped lines and polygons.  Allows drivers to interpolate
their hardware-format vertices directly.  Used in dri drivers to
replace fastpath code.

Slight optimizations to pipeline build/run routines.
2001-01-29 20:47:39 +00:00
Brian Paul
4b90e68ac6 optimized lambda computation (Klaus Niederkrueger) 2001-01-29 18:51:25 +00:00
Brian Paul
e5dfe384ad updates to the trace extension 2001-01-29 16:18:37 +00:00
Brian Paul
d6dd0fceb1 updated spec 2001-01-29 16:10:18 +00:00
Brian Paul
f3da389ae0 redo _mesa_PopAttrib() to call Mesa state functions so derived state is updated 2001-01-24 15:27:10 +00:00
Brian Paul
ab36c9aa1c removed the unused/broken GL_PGI_misc_hints extension 2001-01-24 04:56:19 +00:00
Brian Paul
9533fd1842 minor tweaks 2001-01-24 00:07:01 +00:00
Brian Paul
74b493a5e6 Lots of GLchan datatype changes.
Added GLvector4us datatype in math/m_vector.[ch]
Added _math_trans_4us() in math/m_translate.[ch]
Choose GLvector4ub, GLvector4us, GLvector4f at compile time based on CHAN_BITS.
Made Driver.ClearColor() and Driver.ClearIndex() optional driver functions.
Changed args to Driver.ClearColor(), updated drivers.
Reordered files in Makefile.X11
2001-01-24 00:04:58 +00:00
Brian Paul
125fddc31d added DestroyHeads() to test clean-up code 2001-01-23 23:45:05 +00:00
Brian Paul
6140a8c65f minor tweaks 2001-01-23 23:44:39 +00:00
Brian Paul
4e3e9ac8fb added support for 4 texture units 2001-01-23 23:44:15 +00:00
Brian Paul
2b2e62154d space-bar = pause animation 2001-01-23 23:43:53 +00:00
Brian Paul
b6bcae5698 Replaced struct gl_visual with struct __GLcontextModesRec from glcore.h.
Replace "RGBAMode" with "rgbMode", etc.
Other minor clean-ups.
2001-01-23 23:39:36 +00:00
Brian Paul
ab0c886a6c added dispatch override mechanism, used by trace extension 2001-01-23 23:35:47 +00:00
Brian Paul
f2718b0966 fixed glTexSubImage error check bug #128775 2001-01-23 23:35:23 +00:00
Brian Paul
39927e60ea test check-in 2001-01-23 23:29:15 +00:00
Keith Whitwell
c0bcd2ca99 Fixes for performance bug on compiled array element paths. 2001-01-17 02:49:38 +00:00
Brian Paul
547bbcabff updated ctx->Driver functions for s/w setup 2001-01-16 21:16:56 +00:00
Brian Paul
d292b83d1a fixed a small error in import_color(), include m_translate.h 2001-01-16 15:25:11 +00:00
Keith Whitwell
d43a5943d8 Fix several conformance problems. Hack solution to line stipple problem. 2001-01-16 05:29:42 +00:00
Brian Paul
230928ad5f removed unneeded TXTR_COORD macros (Stephen Tse) 2001-01-15 20:04:28 +00:00
Keith Whitwell
3fd01320f1 Fixed conform feedback and drawelements tests.
Use correct pv when rasterizing unfilled polys.
2001-01-14 06:14:21 +00:00
Keith Whitwell
ab8b047ae5 fix conform dlist test 2001-01-13 18:28:19 +00:00
Keith Whitwell
8415686ea2 Use correct pv in swrast lines routines 2001-01-13 07:13:28 +00:00
Keith Whitwell
321f67c472 Fix crash in book/stencil.
Allow drivers to perform the perspective divide themselves.  Assembly
to do cliptesting without perspective divide for size-4 vectors.
2001-01-13 05:48:25 +00:00
Keith Whitwell
a087c7421b Resync with new XFree version of this file 2001-01-13 05:47:06 +00:00
Brian Paul
3f9ee180a8 initialize Driver.RenderPrimitive to _swsetup_RenderPrimNoop 2001-01-12 22:34:27 +00:00
Brian Paul
e448d6cf0c Added PointSize and PointParametersfv to dd interface, for completeness.
Clean-up and updated comments in dd.h file.
2001-01-09 00:02:55 +00:00
Keith Whitwell
ce656b6a0a Fixed 'IRound' to 'IROUND' in mmath.h
Fixed fallback path for drawarrays/_tnl_hard_begin.

Removed disabled debug code.
2001-01-08 21:55:59 +00:00
Keith Whitwell
bfa023921c Still need 'DD_TRI_CULL_FRONT_BACK' 2001-01-08 17:42:13 +00:00
Keith Whitwell
d7fc376de8 Add call to Driver.RenderPrimitive() 2001-01-08 17:41:15 +00:00
Keith Whitwell
7a1f3a37a1 revert XMesaCreateContext changes 2001-01-08 04:55:22 +00:00
Keith Whitwell
b980b2eeb6 Add a 'RenderPrimitive' callback to t_vb_render.c. Helps out drivers
that used to require a 'ReducedPrimitiveChange' callback.

Various compilation fixes for XFree86.

Reverted to the older version of glcore.h used internally in XFree86, and
moved it to 'Mesa/include/GL/internal/glcore.h', for compatibility with
XFree86.
2001-01-08 04:09:41 +00:00
Keith Whitwell
44d8de433e Bring the FX driver into line with core mesa changes. 2001-01-08 04:06:56 +00:00
Keith Whitwell
e9bf776711 Modify X11 driver and fake glx to store a GLcontext
(ie a 'struct __GLcontextRec *') instead of an 'XMesaContext'.

This is to fix conflicts in XFree86 where both the indirect XMesaContext
and the GLcontext were calling themselves __GLcontextRec's.
2001-01-08 04:06:20 +00:00
Keith Whitwell
78477947de Moved glcore.h to a location prefixed by 'GL/internal', for compatibility
with XFree86 and the SI code there.
2001-01-08 03:56:53 +00:00
Gareth Hughes
ba8f6172bd Implementation of GL_EXT_texture_env_dot3. 2001-01-06 22:46:13 +00:00
Gareth Hughes
c851646050 Add GL_POINTS as a primitive, including with CVA DrawElements. Useful
for testing non-triangle primitives on hardware driver fastpaths.
2001-01-06 20:38:03 +00:00
Brian Paul
8cbc573eae Fixed bug in MinMagThresh computation.
Renamed gl_texture_pixels() to _swrast_texture_fragments()
2001-01-05 21:28:31 +00:00
Jouk Jansen
2d7e25c9ff Committing in .
Modified Files:
 	Mesa/src/descrip.mms

 VMS makefile update
----------------------------------------------------------------------
2001-01-05 08:09:46 +00:00
Keith Whitwell
f4b02d1a26 various compilation/warning fixes 2001-01-05 05:31:42 +00:00
Keith Whitwell
58e9917053 Remove 'pv' parameter from Line/Tri/Point funcs. The provoking vertex
is always the last vertex parameter.
Modify clipping to preserve pv colors.
Modify swrast and X11 driver to expect the pv in the last vertex
(was looking in the first vertex previously).
Remove all handling of flatshading from swrast_setup.

Allow drivers to override the unclipped render tabs in tnl_render_stage
directly.  (Like in 3.4).  Removed fxsimplerender stage.

Modified t_vb_rendertmp.h to remove the need for 'parity' arguments
in RENDER_TRI macros.
2001-01-05 02:26:48 +00:00
Brian Paul
f22c04cdae added underflow check in validate_shine_table() 2001-01-04 16:22:18 +00:00
Brian Paul
6517211e12 added divide by zero check 2001-01-04 15:32:32 +00:00
Brian Paul
2fd9c8690f changed some point functions, new picking code 2001-01-04 15:32:10 +00:00
Brian Paul
63cca75e63 minor bug fixes 2001-01-04 15:31:38 +00:00
Brian Paul
1c768645c5 added divide by zero check 2001-01-03 22:56:23 +00:00
Brian Paul
d14fce03f0 added divide by zero checks 2001-01-03 22:55:26 +00:00
Brian Paul
08dfacd425 New point rasterization functions based on template code that
handles CI/RGB, texture, antialiasing, attenuation, etc.
2001-01-03 22:17:16 +00:00
Brian Paul
6532db9868 More color macro clean-ups.
FLOAT_TO_CHAN() macro removed.
2001-01-03 15:59:30 +00:00
Brian Paul
3b399df638 minor clean-up 2001-01-03 15:56:41 +00:00
Jon Taylor
c1d89d4391 Added missing #include "mmath.h" 2001-01-03 02:43:46 +00:00
Brian Paul
a580e1adb7 missed a few color macro changes 2001-01-02 22:05:55 +00:00
Brian Paul
3041d05bbc Removed fixed.h (GLfixed now in mtypes.h, fixed-pt macros in mmath.h)
Clean-up of color conversion macros.
New mmath.h macros (IROUND, IFLOOR, ICEIL, FRAC) used in various places.
2001-01-02 22:02:51 +00:00
Brian Paul
8446d1bab1 include state.h 2001-01-02 21:40:57 +00:00
Brian Paul
6f89984fed minor GLchan-related changes 2001-01-02 21:09:50 +00:00
Jouk Jansen
ef68e7bf71 Committing in .
Modified Files:
 	Mesa/demos/descrip.mms Mesa/src/descrip.mms
 	Mesa/src/dispatch.c

 -Updated VMS compile suppport
 -Included glthread.h in dispatch.c to make sure that THREADS is defined if
   i.e. PTHREADS is defined in the makefile.

----------------------------------------------------------------------
2001-01-02 10:07:33 +00:00
Keith Whitwell
88f3b89a2c Add render stage for unclipped vb's to fx driver.
Bump MAX_TEXTURE_UNITS to 8
Fix mem. leak in destroy_lists
Fix crash in q3 (cva generally)
2000-12-28 22:11:04 +00:00
Keith Whitwell
e5d6fb20a5 try and force a log message 2000-12-28 16:42:37 +00:00
Keith Whitwell
123ff6549b try and force a log message 2000-12-28 16:35:42 +00:00
Keith Whitwell
bc28306f4a try and force a log message 2000-12-28 16:32:22 +00:00
Jon Taylor
4e96ac080a Fixed GGIMesa build problems.
Swrast triangle drawing fixes.
2000-12-28 02:00:27 +00:00
Keith Whitwell
a884b4b811 try and force a log message 2000-12-27 23:01:25 +00:00
Keith Whitwell
4292e9c06b try and force a log message 2000-12-27 22:59:46 +00:00
Keith Whitwell
20911cb17c try and force a log message 2000-12-27 22:57:13 +00:00
Keith Whitwell
1b686cedf4 try and force a log message 2000-12-27 22:55:09 +00:00
Keith Whitwell
376d022e4a fix demos/fire, enable lazy vertex flushing 2000-12-27 22:52:45 +00:00
Keith Whitwell
ae8ec0b30d Fix evalpoints bug (samples/nurb) 2000-12-27 22:30:29 +00:00
Keith Whitwell
93259cdfa1 fix sproingies bug 2000-12-27 21:49:40 +00:00
Keith Whitwell
719344b23e Fixes for compiling assembly (disable unused 'masked' versions)
Fixes for compiling without debug.
Fix line clipping
Fix unfilled polygon clipping (should be correct now).
2000-12-27 19:57:37 +00:00
Keith Whitwell
770169f230 The array cache. 2000-12-26 15:14:04 +00:00
Keith Whitwell
9ef50d5826 fix xscreensaver cores 2000-12-26 07:41:32 +00:00
Keith Whitwell
cab974cf6c Major rework of tnl module
New array_cache module
Support 8 texture units in core mesa (now support 8 everywhere)
Rework core mesa statechange operations to avoid flushing on many
noop statechanges.
2000-12-26 05:09:27 +00:00
pesco
d1ff1f6798 * demos/Makefile.am (INCLUDES): Added -I$(top_srcdir)/util.
* demos/Makefile.X11, demos/Makefile.BeOS-R4, demos/Makefile.cygnus:
Essentially the same.
Program files updated to include "readtex.c", not "../util/readtex.c".
* demos/reflect.c: Likewise for "showbuffer.c".


* Makefile.am (EXTRA_DIST): Added top-level regular files.

* include/GL/Makefile.am (INC_X11): Added glxext.h.


* src/GGI/include/ggi/mesa/Makefile.am (EXTRA_HEADERS): Include
Mesa GGI headers in dist even if HAVE_GGI is not given.

* configure.in: Look for GLUT and demo source dirs in $srcdir.

* src/swrast/Makefile.am (libMesaSwrast_la_SOURCES): Set to *.[ch].
More source list updates in various Makefile.am's.

* Makefile.am (dist-hook): Remove CVS directory from distribution.
(DIST_SUBDIRS): List all possible subdirs here.
(SUBDIRS): Only list subdirs selected for build again.
The above two applied to all subdir Makefile.am's also.
2000-12-24 22:53:54 +00:00
pesco
05ecec6f49 * include/GL/Makefile.am: ENABLE_GLUT_BUILD -> NEED_GLUT
* bootstrap: Fixed stupid mistakes.
* configure.in (LIBGL_VERSION): Include Mesa version as tiny number.
(LIBGLU_VERSION): Likewise.
2000-12-21 20:04:14 +00:00
Brian Paul
9da422c639 set visual->MRD to 2.0 2000-12-16 00:21:28 +00:00
Brian Paul
f1d6b38441 Polygon._OffsetAny wasn't being computed 2000-12-16 00:19:12 +00:00
Brian Paul
74e2dd38ed minor fog clean-ups (Klaus Niederkrueger) 2000-12-15 16:42:30 +00:00
Brian Paul
783d7dfcbf added more GLX extension function stubs 2000-12-15 04:02:50 +00:00
Brian Paul
083e466f88 Renamed texture object _P to _MaxLevel and _M to _MaxLambda.
Now add BaseLevel in _MaxLevel computation.
2000-12-14 20:25:56 +00:00
Brian Paul
daabce72db updated glXSet3DfxModeMESA() prototype types 2000-12-14 17:44:42 +00:00
Brian Paul
4536021a62 added some more GLX extension entrypoints (fix GLUT link problems when using glxext.h) 2000-12-14 17:44:08 +00:00
Brian Paul
a2003c2895 fixed conformance problems in min/max and histogram result packing 2000-12-13 23:13:45 +00:00
Brian Paul
b0dbd3ed13 replaced GLfixed with GLfloat in _mesa_fog_ci_pixels() (Klaus Niederkrueger) 2000-12-13 17:35:43 +00:00
Brian Paul
ac522d4756 use inverted Y coordinate for choosing dither value (conformance fixes) 2000-12-13 16:24:39 +00:00
Brian Paul
813882526d added glReadPixels item 2000-12-13 00:48:02 +00:00
Brian Paul
3cbbef53bc tweaked truecolor dither kernel setup code 2000-12-13 00:47:10 +00:00
Brian Paul
062bc07bde improved precision of glReadPixels for colorbuffers < 24bpp 2000-12-13 00:46:21 +00:00
Brian Paul
75639547e7 disabled two optimized textured triangle functions because of texcoord interpolation errors 2000-12-12 00:31:45 +00:00
Brian Paul
b38ad54c41 clipping, fog, texture optimizations (Klaus Niederkrueger) 2000-12-12 00:27:51 +00:00
Brian Paul
3afb7a0f70 disabled GLX_SGIS_multisample (temporarily) since its tokens aren't defined 2000-12-11 15:42:53 +00:00
Brian Paul
b04bcd14ee minor changes to fix compile problems/warnings 2000-12-11 15:41:47 +00:00
Jon Taylor
14586916b9 Added a new configure.in flag, --enable-glut-build.
This defaults to "off", so GLUT is not built by default.
2000-12-11 05:22:11 +00:00
Brian Paul
90f042ae8d generate GL_INVALID_OPERATION error for bad image format/type combinations 2000-12-10 19:23:19 +00:00
Brian Paul
8aa019d2ef _MultiTextureEnabled was being computed incorrectly 2000-12-09 22:09:50 +00:00
Brian Paul
ab6e78f3a0 adjust texture size for convolution in glCopyTex[Sub]Image[123]D() 2000-12-09 21:30:43 +00:00
Brian Paul
89c9a4cbf2 set default table size to 0, minor error check fix 2000-12-09 20:51:12 +00:00
Brian Paul
2f911cdf17 define GL_ARB_imaging 2000-12-09 20:36:18 +00:00
Brian Paul
67adba15a2 initialize convolution filters to zero 2000-12-09 20:35:54 +00:00
Brian Paul
90f8ebfd8f added queries for convolution enables 2000-12-09 20:35:32 +00:00
Brian Paul
2e5819270b added GL_RESCALE_NORMAL cases 2000-12-09 19:55:18 +00:00
Brian Paul
ec15398681 more detailed texture error messages 2000-12-08 18:09:33 +00:00
Brian Paul
23b1503d79 include glxext.h unless GLX_GLXEXT_LEGACY is defined 2000-12-08 18:08:15 +00:00
Brian Paul
fed386cdc0 standardized GLX extensions header 2000-12-08 18:06:35 +00:00
Brian Paul
536ede7e00 fixed bug 123918: glXCopySubBuffer() y position off by one 2000-12-08 17:37:00 +00:00
Brian Paul
1c6701e1e1 added LL_MESA_sprite_point extension 2000-12-08 00:28:59 +00:00
Brian Paul
cba2ca94f1 initial draft 2000-12-08 00:21:02 +00:00
Brian Paul
06d05afdd6 Initial work on GL_MESA_sprite_point extension.
Still need to resolve clipping issues, finalize the spec.
2000-12-08 00:20:15 +00:00
Brian Paul
fb7899bfec Compute attenuated point size in a new pipeline stage.
Store computed point size in the SWvertex struct.
2000-12-08 00:18:39 +00:00
Brian Paul
c1b97d91c7 minor comments, clean-up 2000-12-08 00:09:24 +00:00
Brian Paul
83886a5a7f call glFinish() before getting t1 time 2000-12-07 21:50:39 +00:00
Gareth Hughes
ab9e273c75 Allow operating system SSE support test to be overridden with an
environment variable.
2000-12-07 02:36:38 +00:00
Gareth Hughes
2ac44e2509 Merge Mesa 3.4 test for operating system support for SSE. 2000-12-06 14:41:47 +00:00
Brian Paul
fac5fd258c added -s option to control when glXSwapBuffers() is called 2000-12-02 20:33:05 +00:00
Gareth Hughes
7853901372 Enable double-buffering, count not even multiple of three. 2000-11-30 03:06:56 +00:00
Gareth Hughes
28861b192f Add basic timing information. 2000-11-30 01:44:24 +00:00
Brian Paul
7f55eb2b14 changed error tests for depth and stencil buffers 2000-11-28 22:34:46 +00:00
Brian Paul
86ca491ade fixed parameter mis-ordering bug in Driver.StencilSpan calls 2000-11-28 21:34:04 +00:00
Jouk Jansen
bfea97321c Committing in .
Modified Files:
 	Mesa/src/swrast/s_copypix.c

 changed one occurence of rgba to rgbaFloat
----------------------------------------------------------------------
2000-11-28 08:03:22 +00:00
Brian Paul
45015e4d79 Pass scale and bias values to _mesa_scale_and_bias_rgba().
Implemented post-convolution scale and bias operation.
2000-11-28 00:07:51 +00:00
Brian Paul
4304790e3e fixed a convolution pixel store bug 2000-11-28 00:04:39 +00:00
Brian Paul
6a35de3cc3 added new source directories to LIB_FILES 2000-11-27 19:13:16 +00:00
Brian Paul
72ef753d5c Set ENABLE_LIGHT according to ctx->Light.Enabled whether or not
individual light sources are enabled.
2000-11-27 18:59:09 +00:00
Brian Paul
297dfa0fbf minor changes to fix compiler warnings 2000-11-27 18:53:59 +00:00
Brian Paul
a864432fb4 Added MaxClipPlanes and MaxLights to gl_constants struct so T&L
drivers can report non-default numbers of lights and clip planes.
2000-11-27 18:22:13 +00:00
Brian Paul
50478ded80 map glIndex* functions to glIndexi() (glIndexub was looping back to glIndexub) 2000-11-27 18:17:09 +00:00
Jouk Jansen
33b2dcf0da Modified Files:
Mesa/src/tnl/t_context.c Mesa/src/tnl/t_debug.c
 	Mesa/src/tnl/t_pipeline.c

 Some updates to silence warnings on my VMS-machine

----------------------------------------------------------------------
2000-11-27 09:05:52 +00:00
Brian Paul
68656667b2 fixed GLX_PBUFFER value 2000-11-25 18:52:58 +00:00
Keith Whitwell
9aff6cfdc3 Fixed a couple of bugs that crept into last commit
- Eval not compiled correctly
	- Material colors computed incorrectly

Reworked the VERT_TEX flags, now support upto 12 texture units in tnl.
2000-11-24 15:21:59 +00:00
Jouk Jansen
65dcc30599 Committing in .
Modified Files:
 	Mesa/src/descrip.mms

 Updated VMS-compile support
----------------------------------------------------------------------
2000-11-24 13:55:59 +00:00
Keith Whitwell
b014986fdb New files... 2000-11-24 10:30:04 +00:00
Keith Whitwell
ad2ac216fa Support for swappable t&l modules, including an example one in the FX
driver (enable with FX_ALLOW_VTXFMT=t).
2000-11-24 10:25:05 +00:00
Brian Paul
00608a79dc minor updates for widgets-mesa/ 2000-11-23 16:36:36 +00:00
Jon Taylor
cdfba5d375 More auto* build system updates 2000-11-23 02:50:56 +00:00
Jouk Jansen
30e5ef86a0 Modified Files:
Mesa/macos/src-gli/MDD.h Mesa/macos/src-gli/mgliContext.c
 	Mesa/macos/src-gli/mgliContext.h
 	Mesa/macos/src-gli/mgliError.c Mesa/src/D3D/D3DMESA.H
 	Mesa/src/D3D/D3Dvbrender.c Mesa/src/D3D/NullProcs.c
 	Mesa/src/S3/S3mesa.c

Some more files with capitals.

----------------------------------------------------------------------
2000-11-22 09:01:04 +00:00
Jouk Jansen
dbd1e2b599 Modified Files:
Mesa/src/Allegro/amesa.c Mesa/src/DOS/dosmesa.c
 	Mesa/src/FX/fxdd.c Mesa/src/FX/fxdrv.h
 	Mesa/src/FX/fxfastpath.c
 	Mesa/src/GGI/include/ggi/mesa/ggimesa.h
 	Mesa/src/OSmesa/osmesa.c Mesa/src/SVGA/svgamesa.c
 	Mesa/src/Trace/tr_control.c Mesa/src/Windows/wgl.c
 	Mesa/src/X/xmesaP.h Mesa/src/X86/3dnow.c Mesa/src/X86/katmai.c
 	Mesa/src/X86/x86.c
 Removed Files:
 	Mesa/src/mms_depend

 Oops,... all files containing Caps in directory name or file name were
 missing in my types->mtypes commit.

----------------------------------------------------------------------
2000-11-22 08:55:51 +00:00
Jouk Jansen
22f5dc74c7 Modified Files:
Mesa/src/descrip.mms Mesa/src/swrast/s_lines.c

 VMS compile support
 Added some Type casts to avoid warnings
----------------------------------------------------------------------
2000-11-22 08:42:14 +00:00
Jouk Jansen
5e3bc0c2a2 Committing in .
Modified Files:
 	Mesa/macos/gli_api/gliapi1.h Mesa/macos/gli_api/gliapi2.h
 	Mesa/macos/gli_api/gliapiext.h Mesa/macos/src-gli/fxgli.c
 	Mesa/macos/src-gli/fxgli.h Mesa/macos/src-gli/fxgli2.c
 	Mesa/macos/src-gli/fxgli_tridebug.c Mesa/src/accum.c
 	Mesa/src/accum.h Mesa/src/all.h Mesa/src/alpha.c
 	Mesa/src/alpha.h Mesa/src/attrib.c Mesa/src/attrib.h
 	Mesa/src/bitmap.c Mesa/src/bitmap.h Mesa/src/blend.c
 	Mesa/src/blend.h Mesa/src/buffers.c Mesa/src/buffers.h
 	Mesa/src/clip.c Mesa/src/clip.h Mesa/src/colortab.h
 	Mesa/src/config.c Mesa/src/context.c Mesa/src/context.h
 	Mesa/src/convolve.c Mesa/src/convolve.h Mesa/src/copypix.c
 	Mesa/src/copypix.h Mesa/src/debug.c Mesa/src/depth.c
 	Mesa/src/depth.h Mesa/src/dlist.c Mesa/src/dlist.h
 	Mesa/src/drawpix.c Mesa/src/drawpix.h Mesa/src/enable.c
 	Mesa/src/enable.h Mesa/src/eval.c Mesa/src/eval.h
 	Mesa/src/extensions.c Mesa/src/extensions.h
 	Mesa/src/feedback.c Mesa/src/feedback.h Mesa/src/fog.c
 	Mesa/src/fog.h Mesa/src/get.c Mesa/src/get.h Mesa/src/glapi.c
 	Mesa/src/glthread.h Mesa/src/highpc.c Mesa/src/hint.h
 	Mesa/src/histogram.h Mesa/src/image.c Mesa/src/image.h
 	Mesa/src/imports.c Mesa/src/light.c Mesa/src/light.h
 	Mesa/src/lines.c Mesa/src/lines.h Mesa/src/logic.c
 	Mesa/src/logic.h Mesa/src/masking.c Mesa/src/masking.h
 	Mesa/src/matrix.c Mesa/src/matrix.h Mesa/src/pixel.c
 	Mesa/src/pixel.h Mesa/src/points.c Mesa/src/points.h
 	Mesa/src/polygon.c Mesa/src/polygon.h Mesa/src/rastpos.c
 	Mesa/src/readpix.c Mesa/src/scissor.c Mesa/src/scissor.h
 	Mesa/src/state.c Mesa/src/state.h Mesa/src/stencil.c
 	Mesa/src/stencil.h Mesa/src/teximage.c Mesa/src/teximage.h
 	Mesa/src/texobj.c Mesa/src/texobj.h Mesa/src/texstate.c
 	Mesa/src/texstate.h Mesa/src/texture.c Mesa/src/texture.h
 	Mesa/src/texutil.c Mesa/src/texutil.h Mesa/src/varray.c
 	Mesa/src/varray.h Mesa/src/X/fakeglx.c Mesa/src/X/xm_api.c
 	Mesa/src/X/xm_dd.c Mesa/src/X/xm_line.c Mesa/src/X/xm_span.c
 	Mesa/src/X/xm_tri.c Mesa/src/swrast/s_aaline.c
 	Mesa/src/swrast/s_aaline.h Mesa/src/swrast/s_aatriangle.h
 	Mesa/src/swrast/s_accum.h Mesa/src/swrast/s_alpha.h
 	Mesa/src/swrast/s_alphabuf.h Mesa/src/swrast/s_blend.h
 	Mesa/src/swrast/s_context.c Mesa/src/swrast/s_context.h
 	Mesa/src/swrast/s_depth.h Mesa/src/swrast/s_drawpix.h
 	Mesa/src/swrast/s_feedback.h Mesa/src/swrast/s_fog.h
 	Mesa/src/swrast/s_histogram.h Mesa/src/swrast/s_lines.h
 	Mesa/src/swrast/s_logic.h Mesa/src/swrast/s_masking.h
 	Mesa/src/swrast/s_pb.h Mesa/src/swrast/s_pixeltex.h
 	Mesa/src/swrast/s_points.h Mesa/src/swrast/s_quads.c
 	Mesa/src/swrast/s_quads.h Mesa/src/swrast/s_scissor.h
 	Mesa/src/swrast/s_span.h Mesa/src/swrast/s_stencil.h
 	Mesa/src/swrast/s_texture.h Mesa/src/swrast/s_triangle.h
 	Mesa/src/swrast/s_zoom.h Mesa/src/swrast/swrast.h
 	Mesa/src/swrast_setup/ss_context.h
 	Mesa/src/swrast_setup/ss_triangle.c
 	Mesa/src/swrast_setup/ss_triangle.h
 	Mesa/src/swrast_setup/ss_vb.h Mesa/src/tnl/t_clip.c
 	Mesa/src/tnl/t_clip.h Mesa/src/tnl/t_context.c
 	Mesa/src/tnl/t_context.h Mesa/src/tnl/t_cva.c
 	Mesa/src/tnl/t_cva.h Mesa/src/tnl/t_debug.c
 	Mesa/src/tnl/t_debug.h Mesa/src/tnl/t_dlist.h
 	Mesa/src/tnl/t_eval.c Mesa/src/tnl/t_eval.h
 	Mesa/src/tnl/t_fog.c Mesa/src/tnl/t_fog.h
 	Mesa/src/tnl/t_light.c Mesa/src/tnl/t_light.h
 	Mesa/src/tnl/t_pipeline.c Mesa/src/tnl/t_pipeline.h
 	Mesa/src/tnl/t_shade.c Mesa/src/tnl/t_shade.h
 	Mesa/src/tnl/t_stages.c Mesa/src/tnl/t_stages.h
 	Mesa/src/tnl/t_texture.c Mesa/src/tnl/t_texture.h
 	Mesa/src/tnl/t_trans_elt.c Mesa/src/tnl/t_trans_elt.h
 	Mesa/src/tnl/t_varray.c Mesa/src/tnl/t_varray.h
 	Mesa/src/tnl/t_vb.c Mesa/src/tnl/t_vb.h
 	Mesa/src/tnl/t_vbcull.c Mesa/src/tnl/t_vbcull.h
 	Mesa/src/tnl/t_vbfill.c Mesa/src/tnl/t_vbfill.h
 	Mesa/src/tnl/t_vbindirect.c Mesa/src/tnl/t_vbindirect.h
 	Mesa/src/tnl/t_vbrender.c Mesa/src/tnl/t_vbrender.h
 	Mesa/src/tnl/t_vbxform.c Mesa/src/tnl/t_vbxform.h
 	Mesa/src/tnl/tnl.h
 Added Files:
 	Mesa/src/mtypes.h
 Removed Files:
 	Mesa/src/types.h

 Changed Mesa/src/types to Mesa/src/mtypes.h to avoid conflicts while
compiling on a VMS system.

----------------------------------------------------------------------
2000-11-22 07:32:16 +00:00
Jon Taylor
fbe3726050 More auto* build system fixes 2000-11-22 06:49:43 +00:00
Jon Taylor
e3048be8ba swrast setup fixes 2000-11-22 06:45:38 +00:00
Brian Paul
0c000ec90c call gl_update_state() if needed in glGetColorTable, glGetConvolutionFilter 2000-11-21 23:26:13 +00:00
Brian Paul
c34cea7de5 call RENDER_START/FINISH in read_color_image() 2000-11-21 23:25:40 +00:00
Brian Paul
26d729581f minor clean-ups (Klaus Niederkrueger) 2000-11-21 23:17:36 +00:00
Brian Paul
5c0dccc896 minor clean-ups 2000-11-21 23:09:18 +00:00
Brian Paul
baf3e77ee2 added some RENDER_START/RENDER_FINISH macros. Minor GLchan changes 2000-11-21 23:01:22 +00:00
Jon Taylor
3c2e1022ed More auto* build fixes
Removed spurious trace/Makefile from repository
2000-11-21 05:17:13 +00:00
Brian Paul
189476f265 minor multi-tex changes, changed MAX_TEXTURE_UNITS to 4 2000-11-20 18:06:11 +00:00
Brian Paul
ce2733b7cc removed #include <tgmath.h> 2000-11-20 15:16:33 +00:00
Keith Whitwell
2ac294e67f fix lvalue cast on ctx->swtnl_im 2000-11-20 13:39:36 +00:00
Jon Taylor
1487b3ea3e * More work on the auto* build system
* Added missing #includes all over the place
* Added GGI-style debugging harness to GGIMesa
2000-11-19 23:42:32 +00:00
Brian Paul
a852378a62 Replaced Texture.CurrentD[] with separate Texture.Current1/2/3D vars.
Completely removed the dirty texture object list.  Set texObj->Complete
to GL_FALSE to indicate dirty.
Made point/line/triangle/quad SWvertex parameters const.
Minor code clean-ups.
2000-11-19 23:10:25 +00:00
Jon Taylor
b12d8e3b0d Added GGI-style debugging harness to GGIGLUT. 2000-11-19 07:41:26 +00:00
Gareth Hughes
54d7a74532 - Fix tnl/t_context.h inclusion.
- Some SSE asm updates, more to come.
2000-11-19 02:18:33 +00:00
Brian Paul
a13fab59ae added more programs 2000-11-18 17:13:04 +00:00
Brian Paul
ede37839ae test texture palettes with multitexture 2000-11-18 17:12:33 +00:00
Brian Paul
9b5bb5939b Mark Kilgard's reflection/shadow dino demo 2000-11-18 17:10:07 +00:00
Brian Paul
6b2eab1869 hacked demo to test multi-texture projective textures 2000-11-18 17:07:39 +00:00
Jon Taylor
912d3a04c1 * Auto* build fixes
* Added missing includes to math/*
2000-11-18 08:10:21 +00:00
Brian Paul
5a9026c65d Minor header file changes to silence warnings.
Added _mesa_enable_sw_extensions(), called by software-only drivers
to enable all s/w-supported GL extensions.
2000-11-17 21:01:25 +00:00
Jouk Jansen
9e83e8c790 Committing in .
Patches to compile Mesa on VMS.
   -Updated for new directory tree
   -Now compile with PTHREADS on


 The patch in glthread.h is temporarily. The include file src/types.h
 conflicts with the system defined types.h. In future the mesa supplied one
 should be renamed.

 Modified Files:
 	Mesa/include/GL/vms_x_fix.h Mesa/src/descrip.mms
 	Mesa/src/glthread.h Mesa/src/mms_depend
 ----------------------------------------------------------------------
2000-11-17 11:00:55 +00:00
Keith Whitwell
23caf20169 Move the transform and lighting code to two new directories
math:  Provides basic matrix and vector functionality that
               might be useful to multiple software t&l
	       implementations, and is used by core mesa to
	       manage the Model, Project, etc matrices.

	tnl:   The real transform & lighting code from core mesa,
	       including everything from glVertex3f through vertex
	       buffer handling, transformation, clipping, lighting
	       and handoff to a driver for rasterization.

The interfaces of these can be further tightened up, but the basic
splitting up of state and code move is done.
2000-11-16 21:05:34 +00:00
Jon Taylor
1795166732 Small compile fix 2000-11-16 10:38:39 +00:00
Brian Paul
0a82c75eab added includes to silence warnings 2000-11-15 16:38:59 +00:00
Brian Paul
24a32627d9 Replaced ctx->Point.Size with ctx->Point._Size
Replaced ctx->Point.UserSize with ctx->Point.Size
2000-11-15 16:38:40 +00:00
Brian Paul
30971cd098 rewrite of _mesa_win_fog_coords_from_z() so that both perspective and orthographic projection are handled correctly 2000-11-15 00:26:01 +00:00
Brian Paul
4fae0260a6 more Driver.Color, Driver.Index updates 2000-11-14 17:51:15 +00:00
Brian Paul
f930330d5f removed unused set_color() and set_index() functions 2000-11-14 17:50:07 +00:00
Brian Paul
c19d783e07 Removed Driver.Color() and Driver.Index() functions.
Pass color or color index directly to WriteMono*() span functions.
Updated current s/w drivers accordingly.
Clean-up of X gc handling in XMesa driver.
2000-11-14 17:40:13 +00:00
Keith Whitwell
1e1aac034c Cleanup of derived state calculation prior to seperating software T&L
into a new directory.  Specifically the handling of changes to lighting
lighting space (light in model vs. light in eye) have been revamped.

Moved several derived values used only by swrast into that directory.

Removed direct calls to swrast_flush() from vbrender.c -- pushed into
ctx->Driver.RenderFinish.

Optimized flat-shading case in swrast_setup.
2000-11-13 20:02:56 +00:00
Brian Paul
6b8ae62d6b removed unused var 2000-11-13 15:33:56 +00:00
Brian Paul
a2c4c98023 bumped version to 3.5 2000-11-13 15:33:17 +00:00
Brian Paul
d45fdeae35 fixed another texImage mistake in _mesa_GetTexImage() 2000-11-13 15:25:26 +00:00
Jon Taylor
dd11e7664d * Updated the autoconf/automake/libtool build system
* GGIMesa's stubs targets now uses swrast
2000-11-13 04:15:44 +00:00
Brian Paul
7351049dba init WrapR to GL_REPEAT mode 2000-11-11 20:23:47 +00:00
Brian Paul
e7f55e76db removed tr_attrib.c 2000-11-11 19:09:29 +00:00
Brian Paul
bc58b7b409 latest sources from Loki 2000-11-11 01:43:03 +00:00
Brian Paul
b5012e1ee1 replaced _NEW_IMAGING with _NEW_PIXEL 2000-11-10 18:31:04 +00:00
Brian Paul
df37d5f2db replaced s_imaging.h with s_histogram.h 2000-11-10 18:29:18 +00:00
Brian Paul
8a9507442a renamed imaging files to histogram since that's what's inside 2000-11-10 18:06:14 +00:00
Brian Paul
78bb78d1c3 renamed to histogram 2000-11-10 18:05:13 +00:00
Brian Paul
ba41b8afb1 minor changes to silence compiler warnings 2000-11-10 17:45:15 +00:00
Brian Paul
6c4268204b removed old TexImage() and TexSubImage() functions 2000-11-10 17:36:42 +00:00
Brian Paul
db6aa58267 patched to silence compiler warnings (Martin Lindhe) 2000-11-10 17:23:02 +00:00
Brian Paul
8e3366fda7 restored call to _mesa_select_tex_image() in _mesa_GetTexImage() 2000-11-10 15:32:07 +00:00
Brian Paul
3d960a0d84 GL_BGR case was misplaced in _mesa_is_legal_format_and_type() (Jeff Hartmann) 2000-11-09 23:25:06 +00:00
Brian Paul
71be653edc updated with bug fix from 3.4 branch 2000-11-09 22:41:25 +00:00
Brian Paul
5605385194 fixed mipmap setup bug 2000-11-09 16:53:26 +00:00
Keith Whitwell
14425aeca1 fixed very obvious fog bug 2000-11-07 19:17:23 +00:00
Brian Paul
7298e71360 adjust x/y/zoffset parameters to fill_texture_image() by texture border width 2000-11-07 16:40:37 +00:00
Brian Paul
2d595d7020 test ctx->RenderMode in chooser functions 2000-11-06 17:28:51 +00:00
Brian Paul
8d915cb6fb test ctx->RenderMode in chooser functions, removed dead code 2000-11-06 17:28:20 +00:00
Brian Paul
4f3e7cd3cf added a setup function for selection/feedback 2000-11-06 17:08:02 +00:00
Brian Paul
8fa6b363db added buffer test to xmesa_choose_point(), fixes X protocol error 2000-11-06 15:52:48 +00:00
Jouk Jansen
790ea3dc7f Committing in .
Modified Files:
 	Mesa/src/descrip.mms Mesa/src/mms_depend

 Updating VMS compile support

----------------------------------------------------------------------
2000-11-06 13:04:05 +00:00
Brian Paul
861ca519ab removed obsolete VB vars 2000-11-05 23:21:12 +00:00
Brian Paul
b2ad0754b0 added swrast/s_aaline.c 2000-11-05 23:19:23 +00:00
Brian Paul
0070d398d1 hooked in new AA line code, minor clean-up 2000-11-05 23:18:36 +00:00
Brian Paul
7798374e47 New implementation of antialiased lines. Mesa should now pass the remaining
GL conformance tests for AA lines (but not tried yet).
TODO: improve code sharing with the AA triangle code.
2000-11-05 23:15:16 +00:00
Keith Whitwell
14940c4ffe - Changes for new software rasterizer modules
- Remove support for choosing software fallbacks from core code
- Remove partial fallback code from vbrender.c -- drivers are now
  expected to be able to find a triangle/quad function for every state,
  even if they have to use _swsetup_Triangle or _swsetup_Quad.
- Marked derived variables in the GLcontext struct with a leading
  underscore '_'.
2000-11-05 18:40:57 +00:00
Keith Whitwell
1e885f6e6c Reworked to use the new software rasterizer. Optimized line/tri functions
are hooked into the software rasterizer.
2000-11-05 18:28:01 +00:00
Keith Whitwell
ec0585883a Use the new software rasterizer. Reworked optimized line,tri,point
functions to fit into the framework provided for extending the
software rasterizer.
2000-11-05 18:26:12 +00:00
Keith Whitwell
cd03ed4f54 Reorganized software rasterizer as a module which manages its own state,
with tighter interfaces with the rest of the world.

Proper documentation to come.
2000-11-05 18:24:40 +00:00
Keith Whitwell
7c20642b10 A new module to provide RasterSetup and advanced triangle/line/point
functionality layered on top of the software rasterizer.

An example entrypoint:
	void _swsetup_Triangle( GLcontext, GLuint, GLuint, GLuint, GLuint )

will coerce the software rasterizer to draw flat, twoside-lit,
unfilled and offset triangles (including decomposition to points or lines).
2000-11-05 18:20:18 +00:00
Keith Whitwell
c6f348cbc9 Lots of changes:
- use the new interface to the software rasterizer.
	- manage all fallbacks internally, hooking in swrast or
	  swrast_setup if necessary.
	- removed lots of marginal code no longer appropriate in a
	  maturing driver.
	- reworked the vertex-setup and triangle routines, including
	  drawing unfilled triangles from within the driver.
2000-11-05 18:16:51 +00:00
Brian Paul
a190221f70 update to GL_MESA_trace extension enums 2000-11-03 15:14:18 +00:00
Brian Paul
8e4fa8c3e6 MESA_trace extension (Loki) 2000-11-03 15:10:04 +00:00
Brian Paul
44bd53f259 added GL_MESA_packed_depth_stencil extension 2000-11-03 15:01:38 +00:00
Brian Paul
fcb23bbd6e GL_MESA_packed_depth_stencil extension spec 2000-11-03 14:58:45 +00:00
Brian Paul
75d7425061 added some missing backslashes 2000-11-03 01:37:10 +00:00
Gareth Hughes
5f5632c424 Change transformation from ortho to perspective so we get the MGA elt
path by default.
2000-11-03 00:09:31 +00:00
Brian Paul
861eb8eb16 update for separate libOSMesa.so lib 2000-11-01 16:02:52 +00:00
Brian Paul
563d26b247 print number of texture units 2000-11-01 16:02:01 +00:00
Jouk Jansen
b35ec1ca05 Committing in .
Modified Files:
 	Mesa/src/descrip.mms

 Updated Makefiles for VMS
----------------------------------------------------------------------
2000-11-01 15:53:02 +00:00
Gareth Hughes
9f568e512f Added trivial CVA test for testing HW driver fastpaths, good for testing
indexed vertex buffer implementations for instance.

Cleaned up Makefile to make building and adding more tests easier.
2000-11-01 03:14:12 +00:00
Brian Paul
acdb6db846 Always call Driver.SetReadBuffer() in copy pixels functions, just to be safe 2000-10-31 23:11:06 +00:00
Brian Paul
fda3b1a4b1 added comment explaining why the demo is flawed 2000-10-31 20:41:06 +00:00
Keith Whitwell
724abeb058 Moved the software rasterizer to a new directory. 2000-10-31 18:09:44 +00:00
Keith Whitwell
e3a051e053 Moved software rasterizer functionality to new directory. 2000-10-31 18:00:04 +00:00
Keith Whitwell
6e0f0f51e0 Remove dead code in FX driver. 2000-10-31 12:40:57 +00:00
Brian Paul
039bf534aa removed debug printf 2000-10-31 01:20:06 +00:00
Brian Paul
efeddebe81 big overhaul of the demo, works better now 2000-10-30 22:38:55 +00:00
Keith Whitwell
365dc68c39 Rearrange VERT_* flags to support 4 texture units. 2000-10-30 18:50:42 +00:00
Brian Paul
9499e017b7 Removed UPDATE_IMAGE_TRANSFER_STATE, use _NEW_PIXEL flag instead.
More minor GLchan changes.
Silence some compiler warnings in cva.[ch]
2000-10-30 16:32:42 +00:00
Keith Whitwell
caef4a35d6 Removed references to gcc's __FUNCTION__ macro.
Removed dead file fog_tmp.h
2000-10-30 16:30:56 +00:00
Brian Paul
6ad2c5b59a set *t->flag = enabled in gl_extensions_add(), otherwise, extension booleans weren't set 2000-10-30 16:27:21 +00:00
Keith Whitwell
69676ac379 test cvs commit logging 2000-10-30 16:00:42 +00:00
Keith Whitwell
a96308c37d Replace the flags Mesa was using for ctx->NewState with a new set
based on the GL attribute groups.

Introduced constants describing the circumstances under which some
key derived values can change:
	_SWRAST_NEW_RASTERMASK -- ctx->RasterMask
	_SWRAST_NEW_TRIANGLE   -- The software rasterizer's triangle
	                          function
	_DD_NEW_FEEDBACK -- the 'DD_FEEDBACK' bit in ctx->TriangleCaps

These are helpful in deciding whether you need to recalculate state if your
recalculation involves reference to a derived value.
2000-10-30 13:31:59 +00:00
Jouk Jansen
a457549967 Committing in .
Modified Files:
 	Mesa/src/X/xm_api.c

 included macros.h

----------------------------------------------------------------------
2000-10-30 08:39:38 +00:00
Brian Paul
193005393d renamed Current.ByteColor Current.Color 2000-10-29 19:02:23 +00:00
Brian Paul
ebb248aa5c more minor header file re-org (moved CONST, ASSERT, INLINE to config.h) 2000-10-29 18:23:16 +00:00
Brian Paul
699bc7b73d More GLchan color channel changes.
Some header file re-org:
   Move matrix, vertex buffer structs to types.h to fix #include mess.
   Remove typedef, extern declarations from config.h
2000-10-29 18:12:14 +00:00
Brian Paul
c893a015d8 New colormac.h file for color-related macros.
Lot's of clean-up in macros.h and mmath.h
2000-10-28 20:41:13 +00:00
Brian Paul
ba643a2094 Basic work to support deep color channels:
Replace GLubyte with GLchan
  Replace 255 with CHAN_MAX
2000-10-28 18:34:48 +00:00
Keith Whitwell
a897b335be Do per-pixel fog when GL_FOG_HINT is GL_NICEST.
Fix scaling bug in per-pixel fog calculations.
2000-10-28 11:42:12 +00:00
Jon Taylor
1aa958bc9c Lots of misc. bugfixes to bring GGIMesa in sync with the latest Mesa sources. 2000-10-28 10:02:44 +00:00
Brian Paul
1c4b3f4dfb restored test for __alpha in _mesa_win_fog_coords_from_z() 2000-10-27 18:38:35 +00:00
Brian Paul
7dd57a48e1 added info about GL_EXT_secondary_color and GL_EXT_fog_coord 2000-10-27 18:32:55 +00:00
Brian Paul
a14cbff8e5 Enabled GL_EXT_secondary_color. Fixed a bunch of typos in the dlist.c
and state.c file for plugging those functions into the dispatch table.
Don't use Mesa 3.5 for DRI until SGI approves the new dispatch offsets.
Commented-out references to ctx->FogMode and VB->Specular in FX driver.
Minor clean-up in extensions.c
Removed unused prototype in fog.h
2000-10-27 18:31:21 +00:00
Keith Whitwell
fe5d67d95f Implement EXT_fog_coord and EXT_secondary_color.
EXT_secondary_color is disabled until we get some dispatch offsets from SGI.
2000-10-27 16:44:40 +00:00
Gareth Hughes
ba58a6665f Change animated apps to double-buffered visuals by default. 2000-10-27 02:49:17 +00:00
Brian Paul
b4df56fcd9 added GL_BGR case to bytes_per_pixel() 2000-10-26 21:48:18 +00:00
Brian Paul
7460cfabbc removed X86/*.m4 files from tar archive 2000-10-26 19:36:14 +00:00
Brian Paul
66202b75d5 clarified meaning of DEFAULT_SOFTWARE_DEPTH_BITS value 2000-10-26 19:26:18 +00:00
Brian Paul
7ceffd0e0d fixed value for GLU_NURBS_MODE 2000-10-26 15:32:54 +00:00
Brian Paul
27a26bfc4b added a glFinish() call 2000-10-26 15:26:14 +00:00
Brian Paul
21d073d55a added incomplete() debug function/macro 2000-10-24 02:53:18 +00:00
Brian Paul
9a4a958a5c signal NEW_TEXTURING if there's a Driver.BindTexture() function 2000-10-24 01:13:58 +00:00
Brian Paul
6cdf09749c Put a white texel in each corner of each texture.
Draw polygons using the texture's aspect ratio.
The tdfx-3-0-0 texcoord bug is obvious with the -randomsize option.
2000-10-23 23:32:22 +00:00
Brian Paul
0448488e11 added idle() func, enable fog by default 2000-10-23 20:06:36 +00:00
Brian Paul
5a501fbd09 added libOSMesa.so info 2000-10-23 19:46:11 +00:00
Brian Paul
5bb27edac0 generate separate libOSMesa library ala XFree86/DRI 2000-10-23 19:43:36 +00:00
Brian Paul
edda9ae9fb fixed 386/x86 mismatches, reordered a few configs 2000-10-23 19:33:55 +00:00
Gareth Hughes
ac018f5494 Major audit of all Mesa's x86 assembly code. This round is basically
general cleanups - more to come.

Added P6 architecture timing to debug_xform routines.  Still need to add
test_all_vertex_functions test for the v16 asm.  Dynamic reconfiguration
of counter overhead for more accurate benchmarking.

Removed redundant x86 assembly build options, replace with linux-x86 and
so on.  This will build all x86, MMX, 3DNow!, SSE etc assembly into
libGL - preferred over many different options to include some but not
all assembly code.  Note that linux-3dnow and linux-katmai options have
thus been removed.
2000-10-23 00:20:50 +00:00
Gareth Hughes
fc2427e81b Major audit of all Mesa's x86 assembly code. This round is basically
general cleanups - more to come.

Added P6 architecture timing to debug_xform routines.  Still need to add
test_all_vertex_functions test for the v16 asm.  Dynamic reconfiguration
of counter overhead for more accurate benchmarking.
2000-10-23 00:16:28 +00:00
Brian Paul
e188b6e1f1 added a proper idle() function 2000-10-21 04:29:02 +00:00
Brian Paul
eb326f5f01 fixed a texture enable bug 2000-10-21 01:29:12 +00:00
Brian Paul
d0d7d62120 polygon offset changes; added Visual->MRD field 2000-10-21 00:02:47 +00:00
Brian Paul
d475730357 Changes for multitexture > 3, code clean-ups.
Added GLboolean ctx->Texture.MultiTextureEnabled to determine when
multitexture is enabled.  Eventually ctx->Texture.ReallyEnabled may
become a boolean.
2000-10-20 19:54:49 +00:00
Brian Paul
a2d2aed64a use 1.1 glPolygonOffset instead of glPolygonOffsetEXT 2000-10-20 17:26:57 +00:00
Brian Paul
9c7ca850fd Rewrote get_static_proc_address(). It made mistakes in some situations 2000-10-19 20:13:12 +00:00
Brian Paul
a5b66333fb glPixelStore(GL_PACK/UNPACK_SKIP_IMAGES) wasn't handled correctly 2000-10-19 20:09:47 +00:00
Brian Paul
9f0bb59c53 call Driver.SetReadBuffer() in clear_color_buffers() to fix colormasked clear bug 2000-10-19 18:17:19 +00:00
Brian Paul
cc50ed60b3 improved blending accuracy to fix Glean test failures 2000-10-19 18:08:05 +00:00
Brian Paul
6aafd2491c GL_MAX_TEXTURE_UNITS_ARB is now 3 2000-10-18 15:14:48 +00:00
Brian Paul
ce938b307e More fixes for MAX_TEXTURE_UNITS > 2. Seems to work now.
Misc code clean-ups, minor bug fixes.
MAX_TEXTURE_UNITS now defaults to 3.
2000-10-18 15:02:59 +00:00
Brian Paul
d367216678 ported render begin/end calls from Mesa 3.4 2000-10-17 00:42:02 +00:00
Brian Paul
1873b567b2 added _mesa_get_teximages_from_driver() 2000-10-16 23:43:12 +00:00
Brian Paul
1100b4daa3 use gray background, memset TempImage to white to help with debugging 2000-10-16 21:24:39 +00:00
Brian Paul
35324a6c60 if depthBits == 0, set DepthMask = 2^16 to fix per-fragment fog problems 2000-10-09 22:42:40 +00:00
Brian Paul
1791901468 update TriangleCaps in GL_POINT/POLYGON_SMOOTH cases 2000-10-05 23:10:42 +00:00
Brian Paul
fdf2033bda brighter colors 2000-10-05 21:57:00 +00:00
Brian Paul
2c7e6334ec better handling of GLX_DEPTH_SIZE in glXChooseVisual() 2000-10-05 17:38:21 +00:00
Brian Paul
fa849a0e16 drawing color-index image to RGB window was broken 2000-10-05 16:22:22 +00:00
Jouk Jansen
55590ee810 Committing in .
Modified Files:
 	Mesa/demos/paltex.c

 Silenced compiler warnings

----------------------------------------------------------------------
2000-10-05 07:17:43 +00:00
Brian Paul
476609c539 improved to test alpha blending with texture palette 2000-10-04 18:15:39 +00:00
Brian Paul
16eb23a0cb more work to support N texture units 2000-10-02 15:45:12 +00:00
Brian Paul
22f1ca0131 textured line test 2000-09-30 18:48:33 +00:00
Brian Paul
9c05c0494d support for N texture units 2000-09-30 18:42:29 +00:00
Brian Paul
4f66498304 added fps output 2000-09-29 23:09:39 +00:00
Brian Paul
e92dd16605 generalized support for N texure units 2000-09-29 16:58:44 +00:00
Brian Paul
eb6c6439ae removed ctx->Texture.Enabled, use ctx->Texture.ReallyEnabled instead 2000-09-28 22:44:30 +00:00
Brian Paul
37a6211795 new params for SpecificCompressedTexFormat() (Bill White) 2000-09-28 18:30:39 +00:00
Jouk Jansen
574c456a5a Committing in .
Modified Files:
 	Mesa/src/descrip.mms

 inserted imports.c
----------------------------------------------------------------------
2000-09-27 10:59:15 +00:00
Brian Paul
f142a0830a include types.h 2000-09-27 03:30:49 +00:00
Brian Paul
643be95416 renamed gl_copy_context to _mesa_copy_context 2000-09-26 21:28:39 +00:00
Brian Paul
6542324cb0 added imports.c 2000-09-26 21:22:20 +00:00
Brian Paul
b1394fa92a First batch of OpenGL SI related changes:
Renamed struct gl_context to struct __GLcontextRec.
Include glcore.h, setup GL imports/exports.
Replaced gl_ prefix with _mesa_ prefix in context.[ch] functions.
GLcontext's Visual field is no longer a pointer.
2000-09-26 20:53:53 +00:00
Brian Paul
3b18a36f21 Replaced preprocessor symbol GL_MESA_TRACE with MESA_TRACE.
Changed src/Makefile.X11 to compile Trace sources like other drivers.
2000-09-26 15:27:20 +00:00
Brian Paul
63c113a31b use GL_NEAREST texture filter 2000-09-26 15:25:01 +00:00
Brian Paul
423f2b2884 added GL_ARB_texture_env_add 2000-09-25 16:03:59 +00:00
Brian Paul
b9b329d1e5 removed unused display_list struct 2000-09-24 16:11:55 +00:00
Gareth Hughes
5e0bb98abd Added SSE streaming store instructions, external symbol directives. 2000-09-18 22:49:04 +00:00
Gareth Hughes
5aa1c1cd5f Added SSE prefetching instructions. General cleanups. 2000-09-18 16:57:16 +00:00
Brian Paul
1c56fdc707 new comments, misc clean-up 2000-09-17 21:56:07 +00:00
Gareth Hughes
f3c399ec11 General cleanups. Disable gl_katmai_project_vertices and
gl_katmai_project_clipped_vertices for now as they are broken.
2000-09-17 21:12:40 +00:00
Brian Paul
345a71a9cb set default window pos, changed 4 to GL_RGBA 2000-09-15 23:59:46 +00:00
Brian Paul
4ed1d0b2c0 added some missing const keywords in GetString 2000-09-15 19:57:51 +00:00
Brian Paul
1ff933b452 added GL_MESA_trace support 2000-09-15 19:45:40 +00:00
Brian Paul
98b3dd40f7 Added GL_MESA_trace extension (Loki) 2000-09-15 19:45:00 +00:00
Brian Paul
771b975528 added trace support (Loki) 2000-09-15 19:44:39 +00:00
Brian Paul
4360bd7c76 removed unused struct display_list_compilation 2000-09-15 17:04:35 +00:00
Brian Paul
cefc42f1ba added FPS calculation 2000-09-15 16:43:57 +00:00
Brian Paul
008e4e7e39 added more warning options to linux-elf-debug config 2000-09-15 15:55:24 +00:00
Brian Paul
0e52184c48 moved DECLARE_XFORM_GROUP macros outside of gl_init_3dnow_asm_transforms() to silence compiler warnings 2000-09-15 15:54:25 +00:00
Brian Paul
f7a4bcaf79 use cpml.h on Alpha (AlanH) 2000-09-15 15:42:45 +00:00
Brian Paul
64a23a0f9c updated comments 2000-09-14 23:13:51 +00:00
Brian Paul
23316033db explicitly init some texture vars 2000-09-14 23:13:23 +00:00
Brian Paul
ae18872bc7 added cursor key info to instructions 2000-09-13 23:01:52 +00:00
Brian Paul
a94ee16534 replaced GL_RGBA with GL_BGRA for GL_UNSIGNED_SHORT_1_5_5_5_REV datatype 2000-09-13 22:07:20 +00:00
Brian Paul
881ec9ee67 packing of GLushort packed types was broken 2000-09-12 21:10:25 +00:00
Brian Paul
8d4bd87c1a added format/type error check to draw_rgba_pixels() 2000-09-12 21:09:24 +00:00
Brian Paul
e4b684ce49 init mutex 2000-09-12 21:07:40 +00:00
Brian Paul
d49b34a233 better FPS calculation 2000-09-12 18:44:45 +00:00
Brian Paul
b8cc150836 terrain demo data 2000-09-12 17:58:27 +00:00
Brian Paul
4df1f7c7ba better fps computation 2000-09-12 17:38:22 +00:00
Brian Paul
82cfcfa63a added some casts (Takaaki Nomura) 2000-09-12 17:03:59 +00:00
Brian Paul
b9466fca3e Win32 updates (Chris Morley) 2000-09-12 15:46:43 +00:00
Brian Paul
8f39dd1e62 Win32 update (Chris Morley) 2000-09-12 15:41:46 +00:00
Brian Paul
038573aae7 Removed immediate struct's maybe_transform_vb pointer.
Call _mesa_maybe_transform_vb() directly.
2000-09-11 18:49:06 +00:00
Jouk Jansen
b506d8753d Committing in .
Modified Files:
 	Mesa/src/descrip.mms

 Corrected a typo
----------------------------------------------------------------------
2000-09-09 07:05:32 +00:00
Brian Paul
9a2da667f3 added Dither, NEW_DRVSTATE info 2000-09-08 22:39:09 +00:00
Brian Paul
399ae35ac6 removed unused NEW_DRVSTATE flags 2000-09-08 22:07:29 +00:00
Brian Paul
9d3e5db9fc added dither key option 2000-09-08 21:45:21 +00:00
Brian Paul
7f7b205259 removed ctx->Driver.Dither function 2000-09-08 21:44:55 +00:00
Brian Paul
48c6a6ecd2 changed gl_frame_buffer Xmax and Ymax to be exclusive boundary values 2000-09-08 21:28:04 +00:00
Brian Paul
e18e0e98fe added OSMesaCreateContextExt item 2000-09-08 16:42:44 +00:00
Brian Paul
46dbaec56a Use OSMesaCreateContextExt() if using Mesa 3.5 or later 2000-09-08 16:42:06 +00:00
Brian Paul
2bf5d9470d added OSMesaCreateContextExt() 2000-09-08 16:41:38 +00:00
Brian Paul
8ad306baf6 added device driver changes 2000-09-07 15:46:05 +00:00
Brian Paul
c4c639c9a4 Removed ctx->Driver.LogicOp().
ctx->Driver.Index/ColorMask() now return void.
Removed SWmasking and SWLogicOpEnabled variables.
LogicOps and color/index masking are no longer special-case device
driver functions.  The Xlib driver was the only driver that used
them.  Things are more uniform now.
2000-09-07 15:45:26 +00:00
Brian Paul
18f73b622f added xmesa_update_span_funcs() 2000-09-07 15:42:38 +00:00
Brian Paul
16c3ea9459 renamed Xlib driver files 2000-09-07 15:42:13 +00:00
Brian Paul
693f81be4c newly organized Xlib driver files 2000-09-07 15:40:30 +00:00
Brian Paul
38d3f3d660 added device driver function for texture proxy testing 2000-09-07 15:38:49 +00:00
Brian Paul
724f2939f4 silence compiler warning (zoomY0) 2000-09-06 17:44:52 +00:00
Brian Paul
afa61173a8 test for __bsdi__ for XFree86 2000-09-06 17:34:41 +00:00
Brian Paul
37cfb3b5c2 replaced ## with CONCAT macro 2000-09-06 17:33:40 +00:00
Brian Paul
f96ce6a707 oops- forgot convolution for glGetTexImage. Done now. 2000-09-06 15:15:43 +00:00
Brian Paul
c52fc9b49c passing proxy targets to glGetTexImage() should generate GL_INVALID_ENUM 2000-09-05 22:11:38 +00:00
Brian Paul
9c27278acf use clear_proxy_teximage() instead of MEMSET() 2000-09-05 22:04:30 +00:00
Brian Paul
f75d697c03 GetConvolution/SeparableFilter() now finished 2000-09-05 20:28:56 +00:00
Brian Paul
45f3634ce3 added tracing facility from Loki 2000-09-05 20:28:06 +00:00
Brian Paul
3a71d05e53 added tracing facility from Loki 2000-09-05 20:17:37 +00:00
Brian Paul
dca39e8911 added const to _mesa_select_tex_object() 2000-09-05 15:41:25 +00:00
Brian Paul
01e54753ff Fixed bug in fill_texture_image(). Clean-up in _mesaGetTexImage() 2000-09-05 15:40:34 +00:00
Brian Paul
bc6f07856f added convolution, ARB_imaging items 2000-09-02 17:54:28 +00:00
Brian Paul
513d486e75 enabled GL_EXT_convolution and GL_ARB_imaging 2000-09-02 17:52:53 +00:00
Brian Paul
a805bb9691 finished convolution 2000-09-02 17:52:21 +00:00
Brian Paul
bfc6ee1b13 destBytesPerRow was uninitialized in make_texture_image() 2000-09-01 22:01:12 +00:00
Brian Paul
e8a84a93aa initial check-in 2000-09-01 21:01:18 +00:00
Brian Paul
bed573586e added new extensions 2000-08-31 23:04:17 +00:00
Brian Paul
328cb0b512 added Glide3 bug fix info 2000-08-31 23:04:03 +00:00
Brian Paul
b3fdfa1246 fbiRev and tmuRev weren't getting initialized when using Glide3 2000-08-31 22:32:45 +00:00
Brian Paul
15915b03d0 added more resolutions (Andy Sloane) 2000-08-31 22:08:04 +00:00
Brian Paul
5a0d3dc7b3 convolution for glTexImage[123]D now works 2000-08-31 15:24:39 +00:00
Brian Paul
b92d64e150 renamed some variables 2000-08-31 15:24:07 +00:00
Brian Paul
f93b3dd69e more convolution work 2000-08-30 18:22:28 +00:00
Brian Paul
116970154d added _mesa_pack_float_rgba_span() 2000-08-30 18:21:37 +00:00
Brian Paul
8e053916c8 added more extensions testing code 2000-08-30 18:21:06 +00:00
Brian Paul
289d47eee5 finished compressed texture support (Bill White) 2000-08-29 23:31:23 +00:00
Brian Paul
148fb313c5 added MESA_FF_R8_G8_B8 (alpha filled to 0xff) format 2000-08-29 23:30:53 +00:00
Brian Paul
e8e20ae598 changed default Shininess to 6 2000-08-29 21:17:38 +00:00
Brian Paul
8aee2a3326 don't free ctx inside _mesa_initialize_context() if error, caller does that. 2000-08-29 18:57:58 +00:00
Brian Paul
ef9025a641 updated some comments 2000-08-29 14:25:30 +00:00
Jouk Jansen
5d3a95714c Committing in .
Modified Files:
 	Mesa/demos/descrip.mms

 One forgotten file for VMS to support /name=(as_is,short)

----------------------------------------------------------------------
2000-08-24 08:48:27 +00:00
Brian Paul
cf8eebee07 added convolve.h header 2000-08-23 14:33:04 +00:00
Brian Paul
732dd6f417 enabling 1D convolution caused a problem 2000-08-23 14:32:06 +00:00
Brian Paul
147b08328a moved convolution API functions to convolve.c 2000-08-23 14:31:25 +00:00
Brian Paul
7e70874420 finished separable filter functions 2000-08-22 18:54:25 +00:00
Jouk Jansen
b5b5c52034 Committing in .
Modified Files:
 	Mesa/include/GL/glx.h Mesa/include/GL/xmesa.h
 	Mesa/src/descrip.mms Mesa/src/X/glxheader.h
 	Mesa/src/X/xfonts.c Mesa/src/X/xfonts.h
 	Mesa/src-glu/descrip.mms Mesa/src-glut/capturexfont.c
 	Mesa/src-glut/descrip.mms Mesa/src-glut/glut_cmap.c
 	Mesa/src-glut/glut_event.c Mesa/src-glut/glut_fullscrn.c
 	Mesa/src-glut/glut_gamemode.c Mesa/src-glut/glut_init.c
 	Mesa/src-glut/glut_input.c Mesa/src-glut/glut_menu.c
 	Mesa/src-glut/glut_menu2.c Mesa/src-glut/glut_overlay.c
 	Mesa/src-glut/glut_win.c Mesa/src-glut/glut_winmisc.c
 	Mesa/src-glut/glutint.h Mesa/src-glut/layerutil.h
 	Mesa/vms/analyze_map.com
 Added Files:
 	Mesa/include/GL/vms_x_fix.h

 Patches effective on VMS only. This allows for compiling with
 /name=(as_is,short). This breaks the binary compatibility with previous
 versions for VMS, but is the only way to combine Mesa with GTK for VMS.


                      Jouk
----------------------------------------------------------------------
2000-08-22 13:31:00 +00:00
Brian Paul
f4f4dab25a changed quad vertex colors to be tessellation invariant 2000-08-21 21:05:39 +00:00
Brian Paul
043654bbfb print UNDEFINED MODE over samples that are undefined in the GL spec 2000-08-21 20:04:55 +00:00
Brian Paul
9b61162d43 use ImageTransferState 2000-08-21 14:26:01 +00:00
Brian Paul
3f8a70e5dd added convolve.c to file list 2000-08-21 14:25:25 +00:00
Brian Paul
a6d46f6b99 increased max convolution filter size 2000-08-21 14:24:53 +00:00
Brian Paul
d4b799b60c more convolution work, not done 2000-08-21 14:24:30 +00:00
Brian Paul
46e8a51383 basic glDrawPixels convolution implemented 2000-08-21 14:24:10 +00:00
Brian Paul
6339e621f5 fixed image transfer errors 2000-08-21 14:23:09 +00:00
Brian Paul
fa4525e289 implemented new ImageTransferState bitmask 2000-08-21 14:22:24 +00:00
Brian Paul
b1097f24a8 optimized glDrawPixels for glPixelZoom(1,-1) (Andrew Gee) 2000-08-16 20:51:53 +00:00
Brian Paul
e716184cae added missing radius multiplication factor to sphere code 2000-08-16 20:36:34 +00:00
Brian Paul
6f0294ca47 fixed typo which disabled simple_DrawPixels 2000-08-16 17:32:42 +00:00
Brian Paul
e98276c859 fixed some warnings (Alan H.) 2000-08-16 17:26:06 +00:00
Brian Paul
dff7924e25 removed all dependencies on XMesa 2000-08-13 03:57:21 +00:00
Brian Paul
094e2f1a67 fixed segfault problem when using MESA_GLX_FX 2000-08-13 03:44:08 +00:00
Brian Paul
7aac6d6b8e fixed depth mask bug in fxddClear(DD_DEPTH_BIT) 2000-08-09 17:56:27 +00:00
Jouk Jansen
8deec7bf5f Committing in .
Modified Files:
 	Mesa/src-glu/descrip.mms

 Update VMS-makefile for "old" GLU
----------------------------------------------------------------------
2000-08-09 06:24:55 +00:00
Brian Paul
963946d3d7 updated version to 3.5 2000-08-08 16:20:32 +00:00
Brian Paul
d4f6695a3e bumped MESA_MINOR to 5 2000-08-08 16:16:22 +00:00
Brian Paul
042066887b added GetInteger/Float/Double/Boolean/Pointer device driver functions 2000-08-08 16:15:14 +00:00
Brian Paul
507d83e4cc added NULL parameter checking to API functions 2000-08-03 14:03:17 +00:00
Brian Paul
ddf69f247f updated Phil's email address 2000-08-02 20:35:09 +00:00
Brian Paul
585d191ae7 updates from mesa3d@billbaxter.com 2000-08-02 20:29:03 +00:00
Brian Paul
bd0f7f42d6 fixed return val bug in glAreTexturesResident() 2000-08-02 20:16:03 +00:00
Brian Paul
6f173cafbd added include/GL/mesa_wgl.h to tar file list 2000-08-02 20:14:23 +00:00
Brian Paul
b8d907a9bb updated by Alessandro Pisani 2000-08-02 20:09:09 +00:00
Brian Paul
ee2ef90b7f test handling of lots of textures 2000-08-02 17:57:56 +00:00
Brian Paul
769439a23d removed GLU 1.2 symbols 2000-08-02 14:08:48 +00:00
Brian Paul
00277e836d define GL_GLEXT_PROTOTYPES before including mesa_wgl.h 2000-08-02 00:41:21 +00:00
Brian Paul
6d04725282 initialize texture priorities to 1.0, clean-up of _mesa_PrioritizeTextures() 2000-08-02 00:38:25 +00:00
Brian Paul
390488d12e glGetTexParameter(GL_TEXTURE_RESIDENT) didn't query device driver 2000-08-01 17:33:53 +00:00
Brian Paul
85dc4e7a77 test against an epsilon magnitude in gl_rotation_matrix() 2000-07-31 15:31:29 +00:00
Brian Paul
974e468e6d install glext.h too 2000-07-31 15:27:11 +00:00
Brian Paul
6998c71458 added missing widgets-mesa/src/*.c files, updated version numbers to 3.5 2000-07-31 13:59:22 +00:00
Brian Paul
5c8de84f5f 3.5 release notes 2000-07-31 13:58:04 +00:00
Brian Paul
1357249aa9 added placeholders for 3.4 and 3.5 info 2000-07-31 13:57:40 +00:00
859 changed files with 263251 additions and 56898 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,9 @@
# $Id: Makefile.X11,v 1.32 2000/07/21 16:36:35 brianp Exp $
# $Id: Makefile.X11,v 1.69 2002/11/13 15:33:51 brianp Exp $
# Mesa 3-D graphics library
# Version: 3.3
# Version: 5.0
#
# Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
# Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -42,6 +42,7 @@ default:
@echo " make bsdos4 for BSD/OS 4.x, dynamic libraries"
@echo " make cygnus for Win95/NT using Cygnus-Win32"
@echo " make cygnus-linux for Win95/NT using Cygnus-Win32 under Linux"
@echo " make darwin for Darwin - Mac OS X"
@echo " make dgux for Data General"
@echo " make freebsd for FreeBSD systems with GCC"
@echo " make freebsd-386 for FreeBSD systems with GCC, w/ Intel assembly"
@@ -50,8 +51,8 @@ default:
@echo " make hpux9-sl for HP systems with HPUX 9.x, make shared libs"
@echo " make hpux9-gcc for HP systems with HPUX 9.x using GCC"
@echo " make hpux9-gcc-sl for HP systems with HPUX 9.x, GCC, make shared libs"
@echo " make hpux10 for HP systems with HPUX 10.x"
@echo " make hpux10-sl for HP systems with HPUX 10.x, shared libs"
@echo " make hpux10 for HP systems with HPUX 10.x and 11.x"
@echo " make hpux10-sl for HP systems with HPUX 10.x and 11.x, shared libs"
@echo " make hpux10-gcc for HP systems with HPUX 10.x w/ GCC"
@echo " make hpux10-gcc-sl for HP systems with HPUX 10.x w/ GCC, shared libs"
@echo " make irix4 for SGI systems with IRIX 4.x"
@@ -68,18 +69,15 @@ default:
@echo " make linux for Linux systems, make shared .so libs"
@echo " make linux-static for Linux systems, make static .a libs"
@echo " make linux-386 for Linux on Intel, make shared .so libs"
@echo " make linux-386-static for Linux on Intel, make static .a libs"
@echo " make linux-trace for Linux systems, with API trace extension"
@echo " make linux-x86 for Linux on Intel, make shared .so libs"
@echo " make linux-x86-static for Linux on Intel, make static .a libs"
@echo " make linux-ggi for Linux systems with libggi"
@echo " make linux-386-ggi for Linux systems with libggi w/ Intel assembly"
@echo " make linux-glide for Linux w/ 3Dfx Glide driver"
@echo " make linux-386-glide for Linux w/ 3Dfx Glide driver, Intel assembly"
@echo " make linux-386-opt-glide for Linux with 3Dfx Voodoo1 for GLQuake"
@echo " make linux-386-opt-V2-glide for Linux with 3Dfx Voodoo2 for GLQuake"
@echo " make linux-3dnow for Linux on AMD w/ 3DNow!"
@echo " make linux-3dnow-glide for Linux on AMD w/ 3DNow! for Glide"
@echo " make linux-katmai for Linux on PentiumIII w/ SSE"
@echo " make linux-katmai-glide for Linux on PentiumIII w/ SSE for Glide"
@echo " make linux-x86-glide for Linux w/ all x86 asm for Glide"
@echo " make linux-alpha for Linux on Alpha systems"
@echo " make linux-alpha-static for Linux on Alpha systems, static libs"
@echo " make linux-ppc for Linux on PowerPC systems"
@@ -87,6 +85,9 @@ default:
@echo " make linux-sparc for Linux on Sparc systems"
@echo " make linux-sparc5-elf for Sparc5 systems, make ELF shared libs"
@echo " make linux-sparc-ultra for UltraSparc systems, make ELF shared libs"
@echo " make linux-osmesa16 for 16-bit/channel OSMesa"
@echo " make linux-osmesa32 for 32-bit/channel OSMesa"
@echo " make linux-icc for Linux with the Intel C/C++ compiler"
@echo " make lynxos for LynxOS systems with GCC"
@echo " make macintosh for Macintosh"
@echo " make machten-2.2 for Macs w/ MachTen 2.2 (68k w/ FPU)"
@@ -135,17 +136,17 @@ default:
aix aix-sl amix bsdos bsdos4 dgux freebsd freebsd-386 gcc \
# XXX we may have to split up this group of targets into those that
# have a C++ compiler and those that don't for the SI-GLU library.
aix aix-sl amix bsdos bsdos4 darwin dgux freebsd freebsd-386 gcc \
hpux9 hpux9-sl hpux9-gcc hpux9-gcc-sl \
hpux10 hpux10-sl hpux10-gcc hpux10-gcc-sl \
irix4 irix5 irix5-gcc irix5-dso irix6-o32 irix6-o32-dso \
linux-static-debug linux-elf-debug linux-prof linux-glide-debug \
linux linux-static \
linux-386 linux-386-static \
irix4 irix5 irix5-gcc irix5-dso \
linux linux-static linux-debug linux-static-debug linux-prof \
linux-x86 linux-icc linux-x86-static linux-x86-debug \
linux-glide linux-386-glide linux-386-opt-glide \
linux-386-opt-V2-glide \
linux-3dnow linux-3dnow-glide \
linux-katmai linux-katmai-glide \
linux-x86-glide linux-glide-debug linux-glide-prof \
linux-alpha-static linux-alpha \
linux-ppc-static linux-ppc \
linux-sparc \
@@ -160,11 +161,11 @@ sunos5-thread sunos5-pthread sunos5-gcc-thread sunos5-gcc-pthread \
sunos5-x11r6-gcc-sl ultrix-gcc unicos unixware uwin vistra:
-mkdir lib
if [ -d src ] ; then touch src/depend ; fi
if [ -d src-glu ] ; then touch src-glu/depend ; fi
if [ -d si-glu ] ; then touch si-glu/depend ; fi
if [ -d src-glut ] ; then touch src-glut/depend ; fi
if [ -d widgets-sgi ] ; then touch widgets-sgi/depend ; fi
if [ -d src ] ; then cd src ; $(MAKE) -f Makefile.X11 $@ ; fi
if [ -d src-glu ] ; then cd src-glu ; $(MAKE) -f Makefile.X11 $@ ; fi
if [ -d si-glu ] ; then cd si-glu ; $(MAKE) -f Makefile.X11 $@ ; fi
if [ -d src-glut ] ; then cd src-glut ; $(MAKE) -f Makefile.X11 $@ ; fi
if [ -d demos ] ; then cd demos ; $(MAKE) -f Makefile.X11 $@ ; fi
if [ -d xdemos ] ; then cd xdemos ; $(MAKE) -f Makefile.X11 $@ ; fi
@@ -172,12 +173,11 @@ sunos5-x11r6-gcc-sl ultrix-gcc unicos unixware uwin vistra:
if [ -d book ] ; then cd book ; $(MAKE) -f Makefile.X11 $@ ; fi
if [ -d widgets-sgi ] ; then cd widgets-sgi; $(MAKE) -f Makefile.X11 $@ ; fi
irix6-n32 irix6-n32-dso irix6-gcc-n32-sl irix-debug:
irix6-o32 irix6-o32-dso irix6-n32 irix6-n32-dso irix6-gcc-n32-sl irix-debug:
-mkdir lib32
if [ -d src ] ; then touch src/depend ; fi
if [ -d src-glu ] ; then touch src-glu/depend ; fi
if [ -d src-glut ] ; then touch src-glut/depend ; fi
if [ -d src-glut ] ; then touch src-glut/depend ; fi
if [ -d widgets-sgi ] ; then touch widgets-sgi/depend ; fi
if [ -d src ] ; then cd src ; $(MAKE) -f Makefile.X11 $@ ; fi
if [ -d src-glu ] ; then cd src-glu ; $(MAKE) -f Makefile.X11 $@ ; fi
@@ -266,14 +266,14 @@ os2-x11:
linux-ggi linux-386-ggi:
-mkdir lib
touch src/depend
touch src-glu/depend
touch si-glu/depend
if [ -d src-glut ] ; then touch src-glut/depend ; fi
if [ -d widgets-sgi ] ; then touch widgets-sgi/depend ; fi
if [ -d ggi ] ; then touch ggi/depend ; fi
if [ -d src ] ; then cd src ; $(MAKE) -f Makefile.X11 $@ ; fi
if [ -d src/GGI/default ] ; then cd src/GGI/default ; $(MAKE) ; fi
if [ -d src/GGI/display ] ; then cd src/GGI/display ; $(MAKE) ; fi
if [ -d src-glut ] ; then cd src-glu ; $(MAKE) -f Makefile.X11 $@ ; fi
if [ -d si-glu ] ; then cd si-glu ; $(MAKE) -f Makefile.X11 $@ ; fi
# if [ -d src-glut ] ; then cd src-glut ; $(MAKE) -f Makefile.X11 $@ ; fi
if [ -d ggi ] ; then cd ggi ; $(MAKE) -f Makefile.X11 $@ ; fi
if [ -d ggi ] ; then cd ggi/demos; $(MAKE) ; fi
@@ -296,6 +296,12 @@ linux-ggi-install linux-386-ggi-install:
# echo ".include $(DESTDIR)/etc/ggi/ggimesa.conf" >> $(DESTDIR)/etc/ggi/libggi.conf ; \
# fi
linux-osmesa16 linux-osmesa32:
-mkdir lib
if [ -d src ] ; then touch src/depend ; fi
if [ -d src ] ; then cd src ; $(MAKE) -f Makefile.OSMesa16 $@ ; fi
# Remove .o files, emacs backup files, etc.
clean:
-rm -f ggi/*~ *.o
@@ -305,6 +311,7 @@ clean:
-rm -f include/GL/*~
-rm -f src/*.o src/*~ src/*.a src/*/*.o src/*/*~
-rm -f src-glu/*.o src-glu/*~ src-glu/*.a
-rm -f si-glu/*/*.o si-glu/*/*/*.o
-rm -f src-glut/*.o
-rm -f demos/*.o
-rm -f book/*.o book/*~
@@ -316,234 +323,296 @@ clean:
# Remove everything that can be remade
realclean: clean
-rm -f lib/*
-rm -fr lib lib32 lib64
cd demos && $(MAKE) -f Makefile.X11 realclean || true
cd xdemos && $(MAKE) -f Makefile.X11 realclean || true
cd book && $(MAKE) -f Makefile.X11 realclean || true
cd samples && $(MAKE) -f Makefile.X11 realclean || true
cd ggi/demos && $(MAKE) -f Makefile.X11 realclean || true
cd src/GGI/default && $(MAKE) -f Makefile.X11 realclean || true
DIRECTORY = Mesa-3.3
LIB_NAME = MesaLib-3.3
DEMO_NAME = MesaDemos-3.3
GLU_NAME = MesaGLU-3.3
DIRECTORY = Mesa-5.0
LIB_NAME = MesaLib-5.0
DEMO_NAME = MesaDemos-5.0
GLU_NAME = MesaGLU-5.0
GLUT_NAME = GLUT-3.7
LIB_FILES = \
$(DIRECTORY)/Makefile* \
$(DIRECTORY)/Make-config \
$(DIRECTORY)/acconfig.h \
$(DIRECTORY)/acinclude.m4 \
$(DIRECTORY)/aclocal.m4 \
$(DIRECTORY)/conf.h.in \
$(DIRECTORY)/config.guess \
$(DIRECTORY)/config.sub \
$(DIRECTORY)/configure \
$(DIRECTORY)/configure.in \
$(DIRECTORY)/install-sh \
$(DIRECTORY)/ltconfig \
$(DIRECTORY)/ltmain.sh \
$(DIRECTORY)/missing \
$(DIRECTORY)/mkinstalldirs \
$(DIRECTORY)/stamp-h.in \
$(DIRECTORY)/docs/CONFIG \
$(DIRECTORY)/docs/CONFORM \
$(DIRECTORY)/docs/COPYING \
$(DIRECTORY)/docs/COPYRIGHT \
$(DIRECTORY)/docs/DEVINFO \
$(DIRECTORY)/docs/IAFA-PACKAGE \
$(DIRECTORY)/docs/INSTALL \
$(DIRECTORY)/docs/INSTALL.GNU \
$(DIRECTORY)/docs/README \
$(DIRECTORY)/docs/README.* \
$(DIRECTORY)/docs/RELNOTES* \
$(DIRECTORY)/docs/VERSIONS \
$(DIRECTORY)/docs/*.spec \
$(DIRECTORY)/bin/README \
$(DIRECTORY)/bin/mklib* \
$(DIRECTORY)/*.BAT \
$(DIRECTORY)/*.bat \
$(DIRECTORY)/descrip.mms \
$(DIRECTORY)/mms-config \
$(DIRECTORY)/xlib.opt \
$(DIRECTORY)/STARTUP.MK \
$(DIRECTORY)/mesawin32.mak \
$(DIRECTORY)/Names.win \
$(DIRECTORY)/win32-openstep.sh \
$(DIRECTORY)/common.dja \
$(DIRECTORY)/include/GL/Makefile.in \
$(DIRECTORY)/include/GL/Makefile.am \
$(DIRECTORY)/include/GL/dosmesa.h \
$(DIRECTORY)/include/GL/amesa.h \
$(DIRECTORY)/include/GL/fxmesa.h \
$(DIRECTORY)/include/GL/ggimesa.h \
$(DIRECTORY)/include/GL/gl.h \
$(DIRECTORY)/include/GL/glext.h \
$(DIRECTORY)/include/GL/gl_mangle.h \
$(DIRECTORY)/include/GL/glu.h \
$(DIRECTORY)/include/GL/glu_mangle.h \
$(DIRECTORY)/include/GL/glx.h \
$(DIRECTORY)/include/GL/glx_mangle.h \
$(DIRECTORY)/include/GL/mglmesa.h \
$(DIRECTORY)/include/GL/osmesa.h \
$(DIRECTORY)/include/GL/svgamesa.h \
$(DIRECTORY)/include/GL/wmesa.h \
$(DIRECTORY)/include/GL/xmesa.h \
$(DIRECTORY)/include/GL/xmesa_x.h \
$(DIRECTORY)/include/GL/xmesa_xf86.h \
$(DIRECTORY)/include/GLView.h \
$(DIRECTORY)/include/Makefile.in \
$(DIRECTORY)/include/Makefile.am \
$(DIRECTORY)/src/Makefile* \
$(DIRECTORY)/src/descrip.mms \
$(DIRECTORY)/src/mms_depend \
$(DIRECTORY)/src/mesa.conf \
$(DIRECTORY)/src/*.def \
$(DIRECTORY)/src/depend \
$(DIRECTORY)/src/*.[chS] \
$(DIRECTORY)/src/Allegro/*.[ch] \
$(DIRECTORY)/src/BeOS/*.cpp \
$(DIRECTORY)/src/D3D/*.cpp \
$(DIRECTORY)/src/D3D/*.CPP \
$(DIRECTORY)/src/D3D/*.h \
$(DIRECTORY)/src/D3D/*.H \
$(DIRECTORY)/src/D3D/*.c \
$(DIRECTORY)/src/D3D/*.C \
$(DIRECTORY)/src/D3D/MAKEFILE \
$(DIRECTORY)/src/D3D/*bat \
$(DIRECTORY)/src/D3D/*DEF \
$(DIRECTORY)/src/DOS/DEPEND.DOS \
$(DIRECTORY)/src/DOS/*.c \
$(DIRECTORY)/src/FX/Makefile.am \
$(DIRECTORY)/src/FX/Makefile.in \
$(DIRECTORY)/src/FX/*.[ch] \
$(DIRECTORY)/src/FX/*.def \
$(DIRECTORY)/src/FX/X86/Makefile.am \
$(DIRECTORY)/src/FX/X86/Makefile.in \
$(DIRECTORY)/src/FX/X86/*.[Shc] \
$(DIRECTORY)/src/GGI/Makefile.am \
$(DIRECTORY)/src/GGI/Makefile.in \
$(DIRECTORY)/src/GGI/*.[ch] \
$(DIRECTORY)/src/GGI/ggimesa.conf.in \
$(DIRECTORY)/src/GGI/default/*.c \
$(DIRECTORY)/src/GGI/default/Makefile.am \
$(DIRECTORY)/src/GGI/default/Makefile.in \
$(DIRECTORY)/src/GGI/default/genkgi.conf.in \
$(DIRECTORY)/src/GGI/display/*.c \
$(DIRECTORY)/src/GGI/display/Makefile.am \
$(DIRECTORY)/src/GGI/display/Makefile.in \
$(DIRECTORY)/src/GGI/display/fbdev.conf.in \
$(DIRECTORY)/src/GGI/include/Makefile.am \
$(DIRECTORY)/src/GGI/include/Makefile.in \
$(DIRECTORY)/src/GGI/include/ggi/Makefile.am \
$(DIRECTORY)/src/GGI/include/ggi/Makefile.in \
$(DIRECTORY)/src/GGI/include/ggi/mesa/Makefile.am \
$(DIRECTORY)/src/GGI/include/ggi/mesa/Makefile.in \
$(DIRECTORY)/src/GGI/include/ggi/mesa/*.h \
$(DIRECTORY)/src/KNOWN_BUGS \
$(DIRECTORY)/src/OSmesa/Makefile.am \
$(DIRECTORY)/src/OSmesa/Makefile.in \
$(DIRECTORY)/src/OSmesa/*.[ch] \
$(DIRECTORY)/src/S3/*.[ch] \
$(DIRECTORY)/src/S3/*.def \
$(DIRECTORY)/src/S3/*.mak \
$(DIRECTORY)/src/S3/*.rc \
$(DIRECTORY)/src/SVGA/Makefile.am \
$(DIRECTORY)/src/SVGA/Makefile.in \
$(DIRECTORY)/src/SVGA/*.[ch] \
$(DIRECTORY)/src/Windows/*.[ch] \
$(DIRECTORY)/src/Windows/*.def \
$(DIRECTORY)/src/X/Makefile.am \
$(DIRECTORY)/src/X/Makefile.in \
$(DIRECTORY)/src/X/*.[ch] \
$(DIRECTORY)/src/X86/*.[ch] \
$(DIRECTORY)/src/X86/Makefile.am \
$(DIRECTORY)/src/X86/Makefile.in \
$(DIRECTORY)/src/X86/*.m4 \
$(DIRECTORY)/src/X86/*.S \
$(DIRECTORY)/src-glu/README[12] \
$(DIRECTORY)/src-glu/Makefile* \
$(DIRECTORY)/src-glu/descrip.mms \
$(DIRECTORY)/src-glu/mms_depend \
$(DIRECTORY)/src-glu/*.def \
$(DIRECTORY)/src-glu/depend \
$(DIRECTORY)/src-glu/*.[ch] \
$(DIRECTORY)/widgets-mesa/ChangeLog \
$(DIRECTORY)/widgets-mesa/INSTALL \
$(DIRECTORY)/widgets-mesa/Makefile.in \
$(DIRECTORY)/widgets-mesa/README \
$(DIRECTORY)/widgets-mesa/TODO \
$(DIRECTORY)/widgets-mesa/configure \
$(DIRECTORY)/widgets-mesa/demos/ChangeLog \
$(DIRECTORY)/widgets-mesa/demos/Cube \
$(DIRECTORY)/widgets-mesa/demos/Ed \
$(DIRECTORY)/widgets-mesa/demos/Makefile.in \
$(DIRECTORY)/widgets-mesa/demos/Mcube \
$(DIRECTORY)/widgets-mesa/demos/Tea \
$(DIRECTORY)/widgets-mesa/demos/*.[ch] \
$(DIRECTORY)/widgets-mesa/demos/events \
$(DIRECTORY)/widgets-mesa/include/GL/ChangeLog \
$(DIRECTORY)/widgets-mesa/include/GL/*.h \
$(DIRECTORY)/widgets-mesa/include/GL/Makefile.in \
$(DIRECTORY)/widgets-mesa/man/ChangeLog \
$(DIRECTORY)/widgets-mesa/man/GL* \
$(DIRECTORY)/widgets-mesa/man/Makefile.in \
$(DIRECTORY)/widgets-mesa/man/Mesa* \
$(DIRECTORY)/widgets-mesa/src/ChangeLog \
$(DIRECTORY)/widgets-sgi/*.[ch] \
$(DIRECTORY)/widgets-sgi/Makefile* \
$(DIRECTORY)/widgets-sgi/README \
$(DIRECTORY)/util/README \
$(DIRECTORY)/util/Makefile.am \
$(DIRECTORY)/util/Makefile.in \
$(DIRECTORY)/util/*.[ch] \
$(DIRECTORY)/util/sampleMakefile \
$(DIRECTORY)/vms/analyze_map.com \
$(DIRECTORY)/vms/xlib.opt \
$(DIRECTORY)/vms/xlib_share.opt \
$(DIRECTORY)/BeOS/Makefile \
$(DIRECTORY)/BeOS/*.cpp \
$(DIRECTORY)/WIN32/NMAKE.MAK \
$(DIRECTORY)/WIN32/NMAKE.MIF \
$(DIRECTORY)/WIN32/RES/*rc \
$(DIRECTORY)/WIN32/RES/*def \
$(DIRECTORY)/WIN32/RULES/lib.* \
$(DIRECTORY)/WIN32/RULES/progs.* \
$(DIRECTORY)/macos/README \
$(DIRECTORY)/macos/gli_api/*.h \
$(DIRECTORY)/macos/cglpane/CGLPane.* \
$(DIRECTORY)/macos/include-mac/*.h \
$(DIRECTORY)/macos/libraries/*.stub \
$(DIRECTORY)/macos/libraries/*Stub \
$(DIRECTORY)/macos/projects/*.mcp \
$(DIRECTORY)/macos/projects/*.exp \
$(DIRECTORY)/macos/projects/*.h \
$(DIRECTORY)/macos/resources/*.c \
$(DIRECTORY)/macos/resources/*.r \
$(DIRECTORY)/macos/resources/*.rsrc \
$(DIRECTORY)/macos/src-agl/*.exp \
$(DIRECTORY)/macos/src-agl/*.[ch] \
$(DIRECTORY)/macos/src-gli/*.[ch] \
$(DIRECTORY)/Makefile* \
$(DIRECTORY)/Make-config \
$(DIRECTORY)/acconfig.h \
$(DIRECTORY)/acinclude.m4 \
$(DIRECTORY)/aclocal.m4 \
$(DIRECTORY)/common_rules.make \
$(DIRECTORY)/conf.h.in \
$(DIRECTORY)/config.guess \
$(DIRECTORY)/config.sub \
$(DIRECTORY)/configure \
$(DIRECTORY)/configure.in \
$(DIRECTORY)/install-sh \
$(DIRECTORY)/ltmain.sh \
$(DIRECTORY)/missing \
$(DIRECTORY)/mkinstalldirs \
$(DIRECTORY)/stamp-h.in \
$(DIRECTORY)/docs/CONFORM \
$(DIRECTORY)/docs/COPYING \
$(DIRECTORY)/docs/COPYRIGHT \
$(DIRECTORY)/docs/DEVINFO \
$(DIRECTORY)/docs/INSTALL \
$(DIRECTORY)/docs/INSTALL.GNU \
$(DIRECTORY)/docs/README \
$(DIRECTORY)/docs/README.* \
$(DIRECTORY)/docs/RELNOTES* \
$(DIRECTORY)/docs/VERSIONS \
$(DIRECTORY)/docs/*.spec \
$(DIRECTORY)/bin/README \
$(DIRECTORY)/bin/mklib* \
$(DIRECTORY)/descrip.mms \
$(DIRECTORY)/mms-config \
$(DIRECTORY)/m4/*.m4 \
$(DIRECTORY)/xlib.opt \
$(DIRECTORY)/mesawin32.mak \
$(DIRECTORY)/include/GL/internal/glcore.h \
$(DIRECTORY)/include/GL/Makefile.in \
$(DIRECTORY)/include/GL/Makefile.am \
$(DIRECTORY)/include/GL/dmesa.h \
$(DIRECTORY)/include/GL/amesa.h \
$(DIRECTORY)/include/GL/fxmesa.h \
$(DIRECTORY)/include/GL/ggimesa.h \
$(DIRECTORY)/include/GL/gl.h \
$(DIRECTORY)/include/GL/glext.h \
$(DIRECTORY)/include/GL/gl_mangle.h \
$(DIRECTORY)/include/GL/glu.h \
$(DIRECTORY)/include/GL/glu_mangle.h \
$(DIRECTORY)/include/GL/glx.h \
$(DIRECTORY)/include/GL/glxext.h \
$(DIRECTORY)/include/GL/glx_mangle.h \
$(DIRECTORY)/include/GL/mesa_wgl.h \
$(DIRECTORY)/include/GL/mglmesa.h \
$(DIRECTORY)/include/GL/osmesa.h \
$(DIRECTORY)/include/GL/svgamesa.h \
$(DIRECTORY)/include/GL/ugl*.h \
$(DIRECTORY)/include/GL/vms_x_fix.h \
$(DIRECTORY)/include/GL/wmesa.h \
$(DIRECTORY)/include/GL/xmesa.h \
$(DIRECTORY)/include/GL/xmesa_x.h \
$(DIRECTORY)/include/GL/xmesa_xf86.h \
$(DIRECTORY)/include/GLView.h \
$(DIRECTORY)/include/Makefile.in \
$(DIRECTORY)/include/Makefile.am \
$(DIRECTORY)/src/Makefile* \
$(DIRECTORY)/src/libGL_la_SOURCES \
$(DIRECTORY)/src/descrip.mms \
$(DIRECTORY)/src/mesa.conf \
$(DIRECTORY)/src/*.def \
$(DIRECTORY)/src/depend \
$(DIRECTORY)/src/*.[chS] \
$(DIRECTORY)/src/array_cache/*.[ch] \
$(DIRECTORY)/src/array_cache/Makefile* \
$(DIRECTORY)/src/array_cache/libMesaAC_la_SOURCES \
$(DIRECTORY)/src/math/*.[ch] \
$(DIRECTORY)/src/math/Makefile* \
$(DIRECTORY)/src/swrast/*.[ch] \
$(DIRECTORY)/src/swrast/Makefile* \
$(DIRECTORY)/src/swrast/libMesaSwrast_la_SOURCES \
$(DIRECTORY)/src/swrast_setup/*.[ch] \
$(DIRECTORY)/src/swrast_setup/Makefile* \
$(DIRECTORY)/src/tnl/*.[ch] \
$(DIRECTORY)/src/tnl/Makefile* \
$(DIRECTORY)/src/tnl/libMesaTnl_la_SOURCES \
$(DIRECTORY)/src/tnl_dd/*.[ch] \
$(DIRECTORY)/src/tnl_dd/imm/*.[ch] \
$(DIRECTORY)/src/tnl_dd/imm/NOTES.imm \
$(DIRECTORY)/src/windml/*.[ch] \
$(DIRECTORY)/src/windml/tornado/*.c \
$(DIRECTORY)/src/windml/tornado/*.cdf \
$(DIRECTORY)/src/windml/man3/*.3 \
$(DIRECTORY)/src/windml/man3/*.html \
$(DIRECTORY)/src/DOS/*.[chS] \
$(DIRECTORY)/src/DOS/vesa/*.[ch] \
$(DIRECTORY)/src/BeOS/*.cpp \
$(DIRECTORY)/src/FX/Makefile.am \
$(DIRECTORY)/src/FX/Makefile.in \
$(DIRECTORY)/src/FX/libMesaFX_la_SOURCES \
$(DIRECTORY)/src/FX/*.[ch] \
$(DIRECTORY)/src/FX/*.def \
$(DIRECTORY)/src/FX/X86/Makefile.am \
$(DIRECTORY)/src/FX/X86/Makefile.in \
$(DIRECTORY)/src/FX/X86/*.[Shc] \
$(DIRECTORY)/src/GGI/Makefile.am \
$(DIRECTORY)/src/GGI/Makefile.in \
$(DIRECTORY)/src/GGI/*.[ch] \
$(DIRECTORY)/src/GGI/ggimesa.conf.in \
$(DIRECTORY)/src/GGI/default/*.c \
$(DIRECTORY)/src/GGI/default/Makefile.am \
$(DIRECTORY)/src/GGI/default/Makefile.in \
$(DIRECTORY)/src/GGI/default/genkgi.conf.in \
$(DIRECTORY)/src/GGI/display/*.c \
$(DIRECTORY)/src/GGI/display/Makefile.am \
$(DIRECTORY)/src/GGI/display/Makefile.in \
$(DIRECTORY)/src/GGI/display/fbdev.conf.in \
$(DIRECTORY)/src/GGI/include/Makefile.am \
$(DIRECTORY)/src/GGI/include/Makefile.in \
$(DIRECTORY)/src/GGI/include/ggi/Makefile.am \
$(DIRECTORY)/src/GGI/include/ggi/Makefile.in \
$(DIRECTORY)/src/GGI/include/ggi/mesa/Makefile.am \
$(DIRECTORY)/src/GGI/include/ggi/mesa/Makefile.in \
$(DIRECTORY)/src/GGI/include/ggi/mesa/*.h \
$(DIRECTORY)/src/KNOWN_BUGS \
$(DIRECTORY)/src/OSmesa/Makefile.am \
$(DIRECTORY)/src/OSmesa/Makefile.in \
$(DIRECTORY)/src/OSmesa/Makefile.win \
$(DIRECTORY)/src/OSmesa/osmesa.def \
$(DIRECTORY)/src/OSmesa/*.[ch] \
$(DIRECTORY)/src/SPARC/*.[chS] \
$(DIRECTORY)/src/SPARC/Makefile.am \
$(DIRECTORY)/src/SPARC/Makefile.in \
$(DIRECTORY)/src/SVGA/Makefile.am \
$(DIRECTORY)/src/SVGA/Makefile.in \
$(DIRECTORY)/src/SVGA/*.[ch] \
$(DIRECTORY)/src/Trace/*.[ch] \
$(DIRECTORY)/src/Trace/Makefile.am \
$(DIRECTORY)/src/Trace/Makefile.in \
$(DIRECTORY)/src/Windows/*.[ch] \
$(DIRECTORY)/src/Windows/*.def \
$(DIRECTORY)/src/X/Makefile.am \
$(DIRECTORY)/src/X/Makefile.in \
$(DIRECTORY)/src/X/*.[ch] \
$(DIRECTORY)/src/X86/*.[ch] \
$(DIRECTORY)/src/X86/Makefile.am \
$(DIRECTORY)/src/X86/Makefile.in \
$(DIRECTORY)/src/X86/*.S \
$(DIRECTORY)/si-glu/Makefile.am \
$(DIRECTORY)/si-glu/Makefile.in \
$(DIRECTORY)/si-glu/Makefile.X11 \
$(DIRECTORY)/si-glu/Makefile.win \
$(DIRECTORY)/si-glu/glu.def \
$(DIRECTORY)/si-glu/dummy.cc \
$(DIRECTORY)/si-glu/descrip.mms \
$(DIRECTORY)/si-glu/mesaglu.opt \
$(DIRECTORY)/si-glu/include/gluos.h \
$(DIRECTORY)/si-glu/include/Makefile.am \
$(DIRECTORY)/si-glu/include/Makefile.in \
$(DIRECTORY)/si-glu/libnurbs/Makefile.am \
$(DIRECTORY)/si-glu/libnurbs/Makefile.in \
$(DIRECTORY)/si-glu/libnurbs/interface/*.h \
$(DIRECTORY)/si-glu/libnurbs/interface/*.cc \
$(DIRECTORY)/si-glu/libnurbs/interface/libNIFac_la_SOURCES \
$(DIRECTORY)/si-glu/libnurbs/interface/Makefile.am \
$(DIRECTORY)/si-glu/libnurbs/interface/Makefile.in \
$(DIRECTORY)/si-glu/libnurbs/internals/*.h \
$(DIRECTORY)/si-glu/libnurbs/internals/*.cc \
$(DIRECTORY)/si-glu/libnurbs/internals/libNInt_la_SOURCES \
$(DIRECTORY)/si-glu/libnurbs/internals/Makefile.am \
$(DIRECTORY)/si-glu/libnurbs/internals/Makefile.in \
$(DIRECTORY)/si-glu/libnurbs/nurbtess/*.h \
$(DIRECTORY)/si-glu/libnurbs/nurbtess/*.cc \
$(DIRECTORY)/si-glu/libnurbs/nurbtess/libNTess_la_SOURCES \
$(DIRECTORY)/si-glu/libnurbs/nurbtess/Makefile.am \
$(DIRECTORY)/si-glu/libnurbs/nurbtess/Makefile.in \
$(DIRECTORY)/si-glu/libtess/README \
$(DIRECTORY)/si-glu/libtess/alg-outline \
$(DIRECTORY)/si-glu/libtess/*.[ch] \
$(DIRECTORY)/si-glu/libtess/libtess_la_SOURCES \
$(DIRECTORY)/si-glu/libtess/Makefile.am \
$(DIRECTORY)/si-glu/libtess/Makefile.in \
$(DIRECTORY)/si-glu/libutil/*.[ch] \
$(DIRECTORY)/si-glu/libutil/libutil_la_SOURCES \
$(DIRECTORY)/si-glu/libutil/Makefile.am \
$(DIRECTORY)/si-glu/libutil/Makefile.in \
$(DIRECTORY)/src-glu/README[12] \
$(DIRECTORY)/src-glu/Makefile* \
$(DIRECTORY)/src-glu/descrip.mms \
$(DIRECTORY)/src-glu/mms_depend \
$(DIRECTORY)/src-glu/*.def \
$(DIRECTORY)/src-glu/depend \
$(DIRECTORY)/src-glu/*.[ch] \
$(DIRECTORY)/widgets-mesa/ChangeLog \
$(DIRECTORY)/widgets-mesa/INSTALL \
$(DIRECTORY)/widgets-mesa/Makefile.in \
$(DIRECTORY)/widgets-mesa/README \
$(DIRECTORY)/widgets-mesa/TODO \
$(DIRECTORY)/widgets-mesa/configure \
$(DIRECTORY)/widgets-mesa/configure.in \
$(DIRECTORY)/widgets-mesa/demos/ChangeLog \
$(DIRECTORY)/widgets-mesa/demos/Cube \
$(DIRECTORY)/widgets-mesa/demos/Ed \
$(DIRECTORY)/widgets-mesa/demos/Makefile.in \
$(DIRECTORY)/widgets-mesa/demos/Mcube \
$(DIRECTORY)/widgets-mesa/demos/Tea \
$(DIRECTORY)/widgets-mesa/demos/*.[ch] \
$(DIRECTORY)/widgets-mesa/demos/events \
$(DIRECTORY)/widgets-mesa/include/GL/ChangeLog \
$(DIRECTORY)/widgets-mesa/include/GL/*.h \
$(DIRECTORY)/widgets-mesa/include/GL/Makefile.in \
$(DIRECTORY)/widgets-mesa/man/ChangeLog \
$(DIRECTORY)/widgets-mesa/man/GL* \
$(DIRECTORY)/widgets-mesa/man/Makefile.in \
$(DIRECTORY)/widgets-mesa/man/Mesa* \
$(DIRECTORY)/widgets-mesa/src/ChangeLog \
$(DIRECTORY)/widgets-mesa/src/*.c \
$(DIRECTORY)/widgets-mesa/src/Makefile.in \
$(DIRECTORY)/widgets-sgi/*.[ch] \
$(DIRECTORY)/widgets-sgi/Makefile* \
$(DIRECTORY)/widgets-sgi/README \
$(DIRECTORY)/util/README \
$(DIRECTORY)/util/Makefile.am \
$(DIRECTORY)/util/Makefile.in \
$(DIRECTORY)/util/*.[ch] \
$(DIRECTORY)/util/sampleMakefile \
$(DIRECTORY)/vms/analyze_map.com \
$(DIRECTORY)/vms/xlib.opt \
$(DIRECTORY)/vms/xlib_share.opt \
$(DIRECTORY)/BeOS/Makefile \
$(DIRECTORY)/BeOS/*.cpp
OBSOLETE_LIB_FILES = \
$(DIRECTORY)/src/Allegro/*.[ch] \
$(DIRECTORY)/src/D3D/*.cpp \
$(DIRECTORY)/src/D3D/*.CPP \
$(DIRECTORY)/src/D3D/*.h \
$(DIRECTORY)/src/D3D/*.H \
$(DIRECTORY)/src/D3D/*.c \
$(DIRECTORY)/src/D3D/*.C \
$(DIRECTORY)/src/D3D/MAKEFILE \
$(DIRECTORY)/src/D3D/*bat \
$(DIRECTORY)/src/D3D/*DEF \
$(DIRECTORY)/src/DOS/DEPEND.DOS \
$(DIRECTORY)/src/S3/*.[ch] \
$(DIRECTORY)/src/S3/*.def \
$(DIRECTORY)/src/S3/*.mak \
$(DIRECTORY)/src/S3/*.rc \
$(DIRECTORY)/macos/README \
$(DIRECTORY)/macos/gli_api/*.h \
$(DIRECTORY)/macos/cglpane/CGLPane.* \
$(DIRECTORY)/macos/include-mac/*.h \
$(DIRECTORY)/macos/libraries/*.stub \
$(DIRECTORY)/macos/libraries/*Stub \
$(DIRECTORY)/macos/projects/*.mcp \
$(DIRECTORY)/macos/projects/*.exp \
$(DIRECTORY)/macos/projects/*.h \
$(DIRECTORY)/macos/resources/*.c \
$(DIRECTORY)/macos/resources/*.r \
$(DIRECTORY)/macos/resources/*.rsrc \
$(DIRECTORY)/macos/src-agl/*.exp \
$(DIRECTORY)/macos/src-agl/*.[ch] \
$(DIRECTORY)/macos/src-gli/*.[ch] \
$(DIRECTORY)/OpenStep
DEMO_FILES = \
$(DIRECTORY)/include/GL/glut.h \
$(DIRECTORY)/include/GL/glutf90.h \
$(DIRECTORY)/include/GL/glut_h.dja \
$(DIRECTORY)/src-glut/Makefile* \
$(DIRECTORY)/src-glut/depend \
$(DIRECTORY)/src-glut/*def \
$(DIRECTORY)/src-glut/descrip.mms \
$(DIRECTORY)/src-glut/mms_depend \
$(DIRECTORY)/src-glut/*.[ch] \
$(DIRECTORY)/src-glut.dja/* \
$(DIRECTORY)/src-glut.beos/Makefile \
$(DIRECTORY)/src-glut.beos/*.cpp \
$(DIRECTORY)/src-glut.beos/*.h \
$(DIRECTORY)/src-glut.dos/*.[ch] \
$(DIRECTORY)/src-glut.dos/Makefile.DJ \
$(DIRECTORY)/src-glut.dos/PC_HW/*.[chS] \
$(DIRECTORY)/images/* \
$(DIRECTORY)/demos/Makefile* \
$(DIRECTORY)/demos/descrip.mms \
@@ -553,7 +622,7 @@ DEMO_FILES = \
$(DIRECTORY)/demos/README \
$(DIRECTORY)/xdemos/Makefile* \
$(DIRECTORY)/xdemos/descrip.mms \
$(DIRECTORY)/xdemos/*.[cf] \
$(DIRECTORY)/xdemos/*.[chf] \
$(DIRECTORY)/book/Makefile* \
$(DIRECTORY)/book/README \
$(DIRECTORY)/book/*.[ch] \
@@ -561,8 +630,37 @@ DEMO_FILES = \
$(DIRECTORY)/samples/README \
$(DIRECTORY)/samples/*.c \
$(DIRECTORY)/mtdemos \
$(DIRECTORY)/windmldemos/Makefile.ugl \
$(DIRECTORY)/windmldemos/*.c \
$(DIRECTORY)/windmldemos/*.bmp \
$(DIRECTORY)/ggi
OBSOLETE_DEMO_FILES = \
$(DIRECTORY)/include/GL/glut_h.dja \
$(DIRECTORY)/src-glut.dja/* \
$(DIRECTORY)/src-glut.beos/Makefile \
$(DIRECTORY)/src-glut.beos/*.cpp \
$(DIRECTORY)/src-glut.beos/*.h \
SI_GLU_FILES = \
$(DIRECTORY)/Makefile* \
$(DIRECTORY)/Make-config \
$(DIRECTORY)/bin/mklib* \
$(DIRECTORY)/include/GL/glu.h \
$(DIRECTORY)/si-glu/Makefile.X11 \
$(DIRECTORY)/si-glu/include/gluos.h \
$(DIRECTORY)/si-glu/libnurbs/interface/*.h \
$(DIRECTORY)/si-glu/libnurbs/interface/*.cc \
$(DIRECTORY)/si-glu/libnurbs/internals/*.h \
$(DIRECTORY)/si-glu/libnurbs/internals/*.cc \
$(DIRECTORY)/si-glu/libnurbs/nurbstess/*.h \
$(DIRECTORY)/si-glu/libnurbs/nurbstess/*.cc \
$(DIRECTORY)/si-glu/libtess/README \
$(DIRECTORY)/si-glu/libtess/alg-outline \
$(DIRECTORY)/si-glu/libtess/*.[ch] \
$(DIRECTORY)/si-glu/libutil/*.[ch]
GLU_FILES = \
$(DIRECTORY)/Makefile* \
$(DIRECTORY)/Make-config \
@@ -591,13 +689,16 @@ GLUT_FILES = \
$(DIRECTORY)/include/GL/glu_mangle.h \
$(DIRECTORY)/include/GL/glut.h \
$(DIRECTORY)/include/GL/glutf90.h \
$(DIRECTORY)/include/GL/glut_h.dja \
$(DIRECTORY)/src-glut/Makefile* \
$(DIRECTORY)/src-glut/depend \
$(DIRECTORY)/src-glut/*def \
$(DIRECTORY)/src-glut/descrip.mms \
$(DIRECTORY)/src-glut/mms_depend \
$(DIRECTORY)/src-glut/*.[ch] \
$(DIRECTORY)/src-glut/*.[ch]
OBSOLETE_GLUT_FILES = \
$(DIRECTORY)/include/GL/glut_h.dja \
$(DIRECTORY)/src-glut.dja/* \
$(DIRECTORY)/src-glut.beos/Makefile \
$(DIRECTORY)/src-glut.beos/*.cpp \

94
docs/MESA_agp_offset.spec Normal file
View File

@@ -0,0 +1,94 @@
Name
MESA_agp_offset
Name Strings
GLX_MESA_agp_offset
Contact
Brian Paul, Tungsten Graphics, Inc. (brian 'at' tungstengraphics.com)
Keith Whitwell, Tungsten Graphics, Inc. (keith 'at' tungstengraphics.com)
Status
Shipping (Mesa 4.0.4 and later. Only implemented in particular
XFree86/DRI drivers.)
Version
1.0
Number
TBD
Dependencies
OpenGL 1.0 or later is required
GLX_NV_vertex_array_range is required.
This extensions is written against the OpenGL 1.4 Specification.
Overview
This extensions provides a way to convert pointers in an AGP memory
region into byte offsets into the AGP aperture.
Note, this extension depends on GLX_NV_vertex_array_range, for which
no real specification exists. See GL_NV_vertex_array_range for more
information.
IP Status
None
Issues
None
New Procedures and Functions
GLuint glXGetAGPOffsetMESA( const GLvoid *pointer )
New Tokens
None
Additions to the OpenGL 1.4 Specification
None
Additions to Chapter 3 the GLX 1.4 Specification (Functions and Errors)
Add a new section, 3.6 as follows:
3.6 AGP Memory Access
On "PC" computers, AGP memory can be allocated with glXAllocateMemoryNV
and freed with glXFreeMemoryNV. Sometimes it's useful to know where a
block of AGP memory is located with respect to the start of the AGP
aperature. The function
GLuint glXGetAGPOffsetMESA( const GLvoid *pointer )
Returns the offset of the given memory block from the start of AGP
memory in basic machine units (i.e. bytes). If pointer is invalid
the value ~0 will be returned.
GLX Protocol
None. This is a client side-only extension.
Errors
glXGetAGPOffsetMESA will return ~0 if the pointer does not point to
an AGP memory region.
New State
None
Revision History
20 September 2002 - Initial draft
2 October 2002 - finished GLX chapter 3 additions

138
docs/MESA_pack_invert.spec Normal file
View File

@@ -0,0 +1,138 @@
Name
MESA_pack_invert
Name Strings
GL_MESA_pack_invert
Contact
Brian Paul, Tungsten Graphics, Inc. (brian 'at' tungstengraphics.com)
Keith Whitwell, Tungsten Graphics, Inc. (keith 'at' tungstengraphics.com)
Status
Shipping (Mesa 4.0.4 and later)
Version
1.0
Number
TBD
Dependencies
OpenGL 1.0 or later is required
This extensions is written against the OpenGL 1.4 Specification.
Overview
This extension adds a new pixel storage parameter to indicate that
images are to be packed in top-to-bottom order instead of OpenGL's
conventional bottom-to-top order. Only pixel packing can be
inverted (i.e. for glReadPixels, glGetTexImage, glGetConvolutionFilter,
etc).
Almost all known image file formats store images in top-to-bottom
order. As it is, OpenGL reads images from the frame buffer in
bottom-to-top order. Thus, images usually have to be inverted before
writing them to a file with image I/O libraries. This extension
allows images to be read such that inverting isn't needed.
IP Status
None
Issues
1. Should we also defined UNPACK_INVERT_MESA for glDrawPixels, etc?
Resolved: No, we're only concerned with pixel packing. There are other
solutions for inverting images when using glDrawPixels (negative Y pixel
zoom) or glTexImage (invert the vertex T coordinates). It would be easy
enough to define a complementary extension for pixel packing in the
future if needed.
New Procedures and Functions
None
New Tokens
Accepted by the <pname> parameter of PixelStorei and PixelStoref
and the <pname> parameter of GetIntegerv, GetFloatv, GetDoublev
and GetBooleanv:
PACK_INVERT_MESA 0x8758
Additions to Chapter 2 of the OpenGL 1.4 Specification (OpenGL Operation)
None
Additions to Chapter 3 of the OpenGL 1.4 Specification (Rasterization)
None
Additions to Chapter 4 of the OpenGL 1.4 Specification (Per-Fragment
Operations and the Frame Buffer)
Add the following entry to table 4.4 (PixelStore parameters) on page 182:
Parameter Name Type Initial Value Valid Range
---------------------------------------------------------
PACK_INVERT_MESA boolean FALSE TRUE/FALSE
In the section labeled "Placement in Client Memory" on page 184
insert the following text into the paragraph before the sentence
that starts with "If the format is RED, GREEN, BLUE...":
"The parameter PACK_INVERT_MESA controls whether the image is packed
in bottom-to-top order (the default) or top-to-bottom order. Equation
3.8 is modified as follows:
... the first element of the Nth row is indicated by
p + Nk, if PACK_INVERT_MESA is false
p + k * (H - 1) - Nk, if PACK_INVERT_MESA is true, where H is the
image height
"
Additions to Chapter 5 of the OpenGL 1.4 Specification (Special Functions)
None
Additions to Chapter 6 of the OpenGL 1.4 Specification (State and
State Requests)
None
Additions to Appendix A of the OpenGL 1.4 Specification (Invariance)
None
Additions to the AGL/GLX/WGL Specifications
None
GLX Protocol
None
Errors
None
New State
Add the following entry to table 6.20 (Pixels) on page 235:
Get Value Type Get Cmd Initial Value Description Sec Attribute
--------------------------------------------------------------------------------------------------
PACK_INVERT_MESA boolean GetBoolean FALSE Value of PACK_INVERT_MESA 4.3.2 pixel-store
Revision History
21 September 2002 - Initial draft

View File

@@ -0,0 +1,233 @@
XXX - Not complete yet!!!
Name
MESA_packed_depth_stencil
Name Strings
GL_MESA_packed_depth_stencil
Contact
Keith Whitwell, VA Linux Systems Inc. (keithw 'at' valinux.com)
Brian Paul, VA Linux Systems Inc. (brianp 'at' valinux.com)
Status
Not yet shipping.
Version
$Id: MESA_packed_depth_stencil.spec,v 1.1 2000/11/03 14:58:45 brianp Exp $
Number
???
Dependencies
EXT_abgr affects the definition of this extension
SGIS_texture4D affects the definition of this extension
EXT_cmyka affects the definition of this extension
ARB_packed_pixels affects the definition of this extension
Overview
Provides a mechanism for DrawPixels and ReadPixels to efficiently
transfer depth and stencil image data. Specifically, we defined new
packed pixel formats and types which pack both stencil and depth
into one value.
Issues:
1. Is this the right way to distinguish between 24/8 and 8/24
pixel formats? Should we instead provide both:
GL_DEPTH_STENCIL_MESA
GL_STENCIL_DEPTH_MESA
And perhaps just use GL_UNSIGNED_INT, GL_UNSIGNED_SHORT ?
2. If not, is it correct to use _REV to indicate that stencil
preceeds depth in the 1_15 and 8_24 formats?
3. Do we really want the GL_UNSIGNED_SHORT formats?
New Procedures and Functions
None.
New Tokens
Accepted by the <format> parameter of ReadPixels and DrawPixels:
GL_DEPTH_STENCIL_MESA 0x8750
Accepted by the <type> parameter of ReadPixels and DrawPixels:
GL_UNSIGNED_INT_24_8_MESA 0x8751
GL_UNSIGNED_INT_8_24_REV_MESA 0x8752
GL_UNSIGNED_SHORT_15_1_MESA 0x8753
GL_UNSIGNED_SHORT_1_15_REV_MESA 0x8754
Additions to Chapter 2 of the 1.1 Specification (OpenGL Operation)
None
Additions to Chapter 3 of the 1.1 Specification (Rasterization)
One entry is added to table 3.5 (DrawPixels and ReadPixels formats).
The new table is:
Target
Format Name Buffer Element Meaning and Order
----------- ------ -------------------------
COLOR_INDEX Color Color index
STENCIL_INDEX Stencil Stencil index
DEPTH_COMPONENT Depth Depth component
RED Color R component
GREEN Color G component
BLUE Color B component
ALPHA Color A component
RGB Color R, G, B components
RGBA Color R, G, B, A components
BGRA Color B, G, R, A components
ABGR_EXT Color A, B, G, R components
CMYK_EXT Color Cyan, Magenta, Yellow, Black components
CMYKA_EXT Color Cyan, Magenta, Yellow, Black, A components
LUMINANCE Color Luminance component
LUMINANCE_ALPHA Color Luminance, A components
DEPTH_STENCIL Depth, Depth component, stencil index.
Stencil
Table 3.5: DrawPixels and ReadPixels formats. The third column
gives a description of and the number and order of elements in a
group.
Add to the description of packed pixel formats:
<type> Parameter Data of Matching
Token Name Type Elements Pixel Formats
---------------- ---- -------- -------------
UNSIGNED_BYTE_3_3_2 ubyte 3 RGB
UNSIGNED_BYTE_2_3_3_REV ubyte 3 RGB
UNSIGNED_SHORT_5_6_5 ushort 3 RGB
UNSIGNED_SHORT_5_6_5_REV ushort 3 RGB
UNSIGNED_SHORT_4_4_4_4 ushort 4 RGBA,BGRA,ABGR_EXT,CMYK_EXT
UNSIGNED_SHORT_4_4_4_4_REV ushort 4 RGBA,BGRA
UNSIGNED_SHORT_5_5_5_1 ushort 4 RGBA,BGRA,ABGR_EXT,CMYK_EXT
UNSIGNED_SHORT_1_5_5_5_REV ushort 4 RGBA,BGRA
UNSIGNED_INT_8_8_8_8 uint 4 RGBA,BGRA,ABGR_EXT,CMYK_EXT
UNSIGNED_INT_8_8_8_8_REV uint 4 RGBA,BGRA
UNSIGNED_INT_10_10_10_2 uint 4 RGBA,BGRA,ABGR_EXT,CMYK_EXT
UNSIGNED_INT_2_10_10_10_REV uint 4 RGBA,BGRA
UNSIGNED_SHORT_15_1_MESA ushort 2 DEPTH_STENCIL_MESA
UNSIGNED_SHORT_1_15_REV_MESA ushort 2 DEPTH_STENCIL_MESA
UNSIGNED_SHORT_24_8_MESA ushort 2 DEPTH_STENCIL_MESA
UNSIGNED_SHORT_8_24_REV_MESA ushort 2 DEPTH_STENCIL_MESA
UNSIGNED_INT_8_24:
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
+-----------------------+-----------------------------------------------------------------------+
| | |
+-----------------------+-----------------------------------------------------------------------+
first second
element element
UNSIGNED_INT_24_8:
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
+----------------------------------------------------------------------+------------------------+
| | |
+----------------------------------------------------------------------+------------------------+
first second
element element
UNSIGNED_SHORT_15_1:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
+-----------------------------------------------------------+---+
| | |
+-----------------------------------------------------------+---+
first second
element element
UNSIGNED_SHORT_1_15_REV:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
+---+-----------------------------------------------------------+
| | |
+---+-----------------------------------------------------------+
second first
element element
The assignment of elements to fields in the packed pixel is as
described in the table below:
First Second Third Fourth
Format Element Element Element Element
------ ------- ------- ------- -------
RGB red green blue
RGBA red green blue alpha
BGRA blue green red alpha
ABGR_EXT alpha blue green red
CMYK_EXT cyan magenta yellow black
DEPTH_STENCIL_MESA depth stencil
Additions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations
and the Frame Buffer)
The new format is added to the discussion of Obtaining Pixels from the
Framebuffer. It should read " If the <format> is one of RED, GREEN,
BLUE, ALPHA, RGB, RGBA, ABGR_EXT, LUMINANCE, or LUMINANCE_ALPHA, and
the GL is in color index mode, then the color index is obtained."
The new format is added to the discussion of Index Lookup. It should
read "If <format> is one of RED, GREEN, BLUE, ALPHA, RGB, RGBA,
ABGR_EXT, LUMINANCE, or LUMINANCE_ALPHA, then the index is used to
reference 4 tables of color components: PIXEL_MAP_I_TO_R,
PIXEL_MAP_I_TO_G, PIXEL_MAP_I_TO_B, and PIXEL_MAP_I_TO_A."
Additions to Chapter 5 of the 1.1 Specification (Special Functions)
None
Additions to Chapter 6 of the 1.1 Specification (State and State Requests)
None
Additions to the GLX Specification
None
GLX Protocol
TBD
Errors
None
New State
None
Revision History
Version 1.0 - 23 Sep 2000
Keith's original version.
Version 1.1 - 3 Nov 2000
Brian's edits, assigned values to new enums.

193
docs/MESA_sprite_point.spec Normal file
View File

@@ -0,0 +1,193 @@
XXX - Not complete yet!!!
Name
MESA_sprite_point
Name Strings
GL_MESA_sprite_point
Contact
Brian Paul, VA Linux Systems Inc. (brianp 'at' valinux.com)
Status
Not yet shipping.
Version
$Id: MESA_sprite_point.spec,v 1.1 2000/12/08 00:21:02 brianp Exp $
Number
???
Dependencies
GL_EXT_point_parameters effects the definition of this extension
GL_ARB_multitexture effects the definition of this extension
Overview
This extension modifies the way in which points are rendered,
specifically when they're textured. When SPRITE_POINT_MESA is enabled
a point is rendered as if it were a quadrilateral with unique texture
coordinates at each vertex. This extension effectively turns points
into sprites which may be rendered more easily and quickly than using
conventional textured quadrilaterals.
When using point size > 1 or attenuated points this extension is an
effective way to render many small sprite images for particle systems
or other effects.
Issues:
1. How are the texture coordinates computed?
The lower-left corner has texture coordinate (0,0,r,q).
The lower-right, (1,0,r,q). The upper-right, (1,1,r,q).
The upper-left, (0,1,r,q).
2. What about texgen and texture matrices?
Texgen and the texture matrix have no effect on the point's s and t
texture coordinates. The r and q coordinates may have been computed
by texgen or the texture matrix. Note that with a 3D texture and/or
texgen that the r coordinate could be used to select a slice in the
3D texture.
3. What about point smoothing?
When point smoothing is enabled, a triangle fan could be rendered
to approximate a circular point. This could be problematic to
define and implement so POINT_SMOOTH is ignored when drawing sprite
points.
Smoothed points can be approximated by using an appropriate texture
images, alpha testing and blending.
POLYGON_SMOOTH does effect the rendering of the quadrilateral, however.
4. What about sprite rotation?
There is none. Sprite points are always rendered as window-aligned
squares. One could define rotated texture images if desired. A 3D
texture and appropriate texture r coordinates could be used to
effectively specify image rotation per point.
5. What about POLYGON_MODE?
POLYGON_MODE does not effect the rasterization of the quadrilateral.
6. What about POLYGON_CULL?
TBD. Polygon culling is normally specified and implemented in the
transformation stage of OpenGL. However, some rasterization hardware
implements it later during triangle setup.
Polygon culling wouldn't be useful for sprite points since the
quadrilaterals are always defined in counter-clockwise order in
window space. For that reason, polygon culling should probably be
ignored.
7. Should sprite points be alpha-attenuated if their size is below the
point parameter's threshold size?
8. Should there be an advertisized maximum sprite point size?
No. Since we're rendering the point as a quadrilateral there's no
need to limit the size.
New Procedures and Functions
None.
New Tokens
Accepted by the <pname> parameter of Enable, Disable, IsEnabled,
GetIntegerv, GetBooleanv, GetFloatv and GetDoublev:
SPRITE_POINT_MESA 0x????
MAX_SPRITE_POINT_SIZE_MESA 0x???? (need this?)
Additions to Chapter 2 of the 1.1 Specification (OpenGL Operation)
None
Additions to Chapter 3 of the 1.1 Specification (Rasterization)
Section ???.
When SPRITE_POINT_MESA is enabled points are rasterized as screen-
aligned quadrilaterals. If the four vertices of the quadrilateral
are labeled A, B, C, and D, starting at the lower-left corner and moving
counter-clockwise around the quadrilateral, then the vertex and
texture coordinates are computed as follows:
vertex window coordinate texture coordinate
A (x-r, y-r, z, w) (0, 0, r, q)
B (x+r, y-r, z, w) (1, 0, r, q)
C (x+r, y+r, z, w) (1, 1, r, q)
D (x-r, y+r, z, w) (0, 1, r, q)
where x, y, z, w are the point's window coordinates, r and q are the
point's 3rd and 4th texture coordinates and r is half the point's
size. The other vertex attributes (such as the color and fog coordinate)
are simply duplicated from the original point vertex.
Point size may either be specified with PointSize or computed
according to the EXT_point_parameters extension.
The new texture coordinates are not effected by texgen or the texture
matrix. Note, however, that the texture r and q coordinates are passed
unchanged and may have been computed with texgen and/or the texture
matrix.
If multiple texture units are present the same texture coordinate is
used for all texture units.
The point is then rendered as if it were a quadrilateral using the
normal point sampling rules. POLYGON_MODE does not effect the
rasterization of the quadrilateral but POLYGON_SMOOTH does.
POINT_SMOOTH has no effect when SPRITE_POINT_MESA is enabled.
Additions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations
and the Frame Buffer)
None.
Additions to Chapter 5 of the 1.1 Specification (Special Functions)
None
Additions to Chapter 6 of the 1.1 Specification (State and State Requests)
None
Additions to the GLX Specification
None
GLX Protocol
TBD
Errors
None
New State
Add boolean variable SPRITE_POINT_MESA to the point attribute group.
Revision History
Version 1.0 - 4 Dec 2000
Original draft.

360
docs/MESA_trace.spec Normal file
View File

@@ -0,0 +1,360 @@
Name
MESA_trace
Name Strings
GL_MESA_TRACE
Contact
Bernd Kreimeier, Loki Entertainment, bk 'at' lokigames.com
Brian Paul, VA Linux Systems, Inc., brianp 'at' valinux.com
Status
XXX - Not complete yet!!!
Version
$Id: MESA_trace.spec,v 1.2 2001/01/29 16:10:18 brianp Exp $
Number
none yet
Dependencies
OpenGL 1.2 is required.
The extension is written against the OpenGL 1.2 Specification
Overview
Provides the application with means to enable and disable logging
of GL calls including parameters as readable text. The verbosity
of the generated log can be controlled. The resulting logs are
valid (but possibly incomplete) C code and can be compiled and
linked for standalone test programs. The set of calls and the
amount of static data that is logged can be controlled at runtime.
The application can add comments and enable or disable tracing of GL
operations at any time. The data flow from the application to GL
and back is unaffected except for timing.
Application-side implementation of these features raises namespace
and linkage issues. In the driver dispatch table a simple
"chain of responsibility" pattern (aka "composable piepline")
can be added.
IP Status
The extension spec is in the public domain. The current implementation
in Mesa is covered by Mesa's XFree86-style copyright by the authors above.
This extension is partially inspired by the Quake2 QGL wrapper.
Issues
(1) Is this Extension obsolete because it can
be implemented as a wrapper DLL?
RESOLVED: No. While certain operating systems (Win32) provide linkers
that facilitate this kind of solution, other operating systems
(Linux) do not support hierarchical linking, so a wrapper solution
would result in symbol collisions.
Further, IHV's might have builtin support for tracing GL execution
that enjoys privileged access, or that they do not wish to separate
the tracing code from their driver code base.
(2) Should the Trace API explicitely support the notion of "frames?
This would require hooking into glXSwapBuffers calls as well.
RESOLVED: No. The application can use NewTraceMESA/EndTraceMESA
and TraceComment along with external parsing tools to split the
trace into frames, in whatever way considered adequate.
(2a) Should GLX calls be traced?
PBuffers and other render-to-texture solutions demonstrate that
context level commands beyond SwapBuffers might have to be
traced. The GL DLL exports the entry points, so this would not
be out of the question.
(3) Should the specification mandate the actual output format?
RESOLVED: No. It is sufficient to guarantee that all data and commands
will be traced as requested by Enable/DisableTraceMESA, in the order
encountered. Whether the resulting trace is available as a readable
text file, binary metafile, compilable source code, much less which
indentation and formatting has been used, is up to the implementation.
For the same reason this specification does not enforce or prohibit
additional information added to the trace (statistics, profiling/timing,
warnings on possible error conditions).
(4) Should the comment strings associated with names and pointer (ranges)
be considered persistent state?
RESOLVED: No. The implementation is not forced to use this information
on subsequent occurences of name/pointer, and is free to consider it
transient state.
(5) Should comment commands be prohibited between Begin/End?
RESOLVED: Yes, with the exception of TraceCommentMESA. TraceCommentMESA
is transient, the other commands might cause storage of persistent
data in the context. There is no need to have the ability mark names
or pointers between Begin and End.
New Procedures and Functions
void NewTraceMESA( bitfield mask, const ubyte * traceName )
void EndTraceMESA( void )
void EnableTraceMESA( bitfield mask )
void DisableTraceMESA( bitfield mask )
void TraceAssertAttribMESA( bitfield attribMask )
void TraceCommentMESA( const ubyte* comment )
void TraceTextureMESA( uint name, const ubyte* comment )
void TraceListMESA( uint name, const ubyte* comment )
void TracePointerMESA( void* pointer, const ubyte* comment )
void TracePointerRangeMESA( const void* first,
const void* last,
const ubyte* comment )
New Tokens
Accepted by the <mask> parameter of EnableTrace and DisableTrace:
TRACE_ALL_BITS_MESA 0xFFFF
TRACE_OPERATIONS_BIT_MESA 0x0001
TRACE_PRIMITIVES_BIT_MESA 0x0002
TRACE_ARRAYS_BIT_MESA 0x0004
TRACE_TEXTURES_BIT_MESA 0x0008
TRACE_PIXELS_BIT_MESA 0x0010
TRACE_ERRORS_BIT_MESA 0x0020
Accepted by the <pname> parameter of GetIntegerv, GetBooleanv,
GetFloatv, and GetDoublev:
TRACE_MASK_MESA 0x8755
Accepted by the <pname> parameter to GetString:
TRACE_NAME_MESA 0x8756
Additions to Chapter 2 of the OpenGL 1.2.1 Specification (OpenGL Operation)
None.
Additions to Chapter 3 of the OpenGL 1.2.1 Specification (OpenGL Operation)
None.
Additions to Chapter 4 of the OpenGL 1.2.1 Specification (OpenGL Operation)
None.
Additions to Chapter 5 of the OpenGL 1.2.1 Specification (Special Functions)
Add a new section:
5.7 Tracing
The tracing facility is used to record the execution of a GL program
to a human-readable log. The log appears as a sequence of GL commands
using C syntax. The primary intention of tracing is to aid in program
debugging.
A trace is started with the command
void NewTraceMESA( bitfield mask, const GLubyte * traceName )
<mask> may be any value accepted by PushAttrib and specifies a set of
attribute groups. The state values included in those attribute groups
is written to the trace as a sequence of GL commands.
<traceName> specifies a name or label for the trace. It is expected
that <traceName> will be interpreted as a filename in most implementations.
A trace is ended by calling the command
void EndTraceMESA( void )
It is illegal to call NewTraceMESA or EndTraceMESA between Begin and End.
The commands
void EnableTraceMESA( bitfield mask )
void DisableTraceMESA( bitfield mask )
enable or disable tracing of different classes of GL commands.
<mask> may be the union of any of TRACE_OPERATIONS_BIT_MESA,
TRACE_PRIMITIVES_BIT_MESA, TRACE_ARRAYS_BIT_MESA, TRACE_TEXTURES_BIT_MESA,
and TRACE_PIXELS_BIT_MESA. The special token TRACE_ALL_BITS_MESA
indicates all classes of commands are to be logged.
TRACE_OPERATIONS_BIT_MESA controls logging of all commands outside of
Begin/End, including Begin/End.
TRACE_PRIMITIVES_BIT_MESA controls logging of all commands inside of
Begin/End, including Begin/End.
TRACE_ARRAYS_BIT_MESA controls logging of VertexPointer, NormalPointer,
ColorPointer, IndexPointer, TexCoordPointer and EdgeFlagPointer commands.
TRACE_TEXTURES_BIT_MESA controls logging of texture data dereferenced by
TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, and
TexSubImage3D commands.
TRACE_PIXELS_BIT_MESA controls logging of image data dereferenced by
Bitmap and DrawPixels commands.
TRACE_ERRORS_BIT_MESA controls logging of all errors. If this bit is
set, GetError will be executed whereever applicable, and the result will
be added to the trace as a comment. The error returns are cached and
returned to the application on its GetError calls. If the user does not
wish the additional GetError calls to be performed, this bit should not
be set.
The command
void TraceCommentMESA( const ubyte* comment )
immediately adds the <comment> string to the trace output, surrounded
by C-style comment delimiters.
The commands
void TraceTextureMESA( uint name, const ubyte* comment )
void TraceListMESA( uint name, const ubyte* comment )
associates <comment> with the texture object or display list specified
by <name>. Logged commands which reference the named texture object or
display list will be annotated with <comment>. If IsTexture(name) or
IsList(name) fail (respectively) the command is quietly ignored.
The commands
void TracePointerMESA( void* pointer, const ubyte* comment )
void TracePointerRangeMESA( const void* first,
const void* last,
const ubyte* comment )
associate <comment> with the address specified by <pointer> or with
a range of addresses specified by <first> through <last>.
Any logged commands which reference <pointer> or an address between
<first> and <last> will be annotated with <comment>.
The command
void TraceAssertAttribMESA( bitfield attribMask )
will add GL state queries and assertion statements to the log to
confirm that the current state at the time TraceAssertAttrib is
executed matches the current state when the trace log is executed
in the future.
<attribMask> is any value accepted by PushAttrib and specifies
the groups of state variables which are to be asserted.
The commands NewTraceMESA, EndTraceMESA, EnableTraceMESA, DisableTraceMESA,
TraceAssertAttribMESA, TraceCommentMESA, TraceTextureMESA, TraceListMESA,
TracePointerMESA and TracePointerRangeMESA are not compiled into display lists.
Examples:
The command NewTraceMESA(DEPTH_BUFFER_BIT, "log") will query the state
variables DEPTH_TEST, DEPTH_FUNC, DEPTH_WRITEMASK, and DEPTH_CLEAR_VALUE
to get the values <test>, <func>, <mask>, and <clear> respectively.
Statements equivalent to the following will then be logged:
glEnable(GL_DEPTH_TEST); (if <test> is true)
glDisable(GL_DEPTH_TEST); (if <test> is false)
glDepthFunc(<func>);
glDepthMask(<mask>);
glClearDepth(<clear>);
The command TraceAssertAttribMESA(DEPTH_BUFFER_BIT) will query the state
variables DEPTH_TEST, DEPTH_FUNC, DEPTH_WRITEMASK, and DEPTH_CLEAR_VALUE
to get the values <test>, <func>, <mask>, and <clear> respectively.
The resulting trace might then look will like this:
{
GLboolean b;
GLint i;
GLfloat f;
b = glIsEnabled(GL_DEPTH_TEST);
assert(b == <test>);
glGetIntegerv(GL_DEPTH_FUNC, &i);
assert(i == <func>);
glGetIntegerv(GL_DEPTH_MASK, &i);
assert(i == <mask>);
glGetFloatv(GL_DEPTH_CLEAR_VALUE, &f);
assert(f == <clear>);
}
Additions to Chapter 6 of the OpenGL 1.2.1 Specification
(State and State Requests)
Querying TRACE_MASK_MESA with GetIntegerv, GetFloatv, GetBooleanv or
GetDoublev returns the current command class trace mask.
Querying TRACE_NAME_MESA with GetString returns the current trace name.
Additions to Appendix A of the OpenGL 1.2.1 Specification (Invariance)
The MESA_trace extension can be used in a way that does not affect data
flow from application to OpenGL, as well as data flow from OpenGL to
application, except for timing, possible print I/O. TRACE_ERRORS_BIT_MESA
will add additional GetError queries. Setting a trace mask with NewTraceMESA
as well as use of TraceAssertAttribMESA might cause additional state queries.
With the possible exception of performance, OpenGL rendering should not be
affected at all by a properly chosen logging operation.
Additions to the AGL/GLX/WGL Specifications
None.
GLX Protocol
None. The logging operation is carried out client-side, by exporting
entry points to the wrapper functions that execute the logging operation.
Errors
INVALID_OPERATION is generated if any trace command except TraceCommentMESA
is called between Begin and End.
New State
The current trace name and current command class mask are stored
per-context.
New Implementation Dependent State
None.
Revision History
* Revision 0.1 - Initial draft from template (bk000415)
* Revision 0.2 - Draft (bk000906)
* Revision 0.3 - Draft (bk000913)
* Revision 0.4 - Reworked text, fixed typos (bp000914)
* Revision 0.5 - Assigned final GLenum values (bp001103)
* Revision 0.6 - TRACE_ERRORS_BIT_MESA (bk000916)
* Revision 0.7 - Added MESA postfix (bk010126)

View File

@@ -0,0 +1,197 @@
Name
MESA_ycbcr_texture
Name Strings
GL_MESA_ycbcr_texture
Contact
Brian Paul, Tungsten Graphics, Inc. (brian 'at' tungstengraphics.com)
Keith Whitwell, Tungsten Graphics, Inc. (keith 'at' tungstengraphics.com)
Status
Shipping (Mesa 4.0.4 and later)
Version
1.0
Number
TBD
Dependencies
OpenGL 1.0 or later is required
This extensions is written against the OpenGL 1.4 Specification.
NV_texture_rectangle effects the definition of this extension.
Overview
This extension supports texture images in the YCbCr format. There is
no support for converting YCbCr images to RGB or vice versa. The
intention is for YCbCr image data to be directly sent to the renderer
without any pixel transfer operations. Only 2D texture images are
supported (not glDrawPixels, glReadPixels, etc).
A YCbCr pixel (texel) is a 16-bit unsigned short with two components.
The first component is luminance (Y). For pixels in even-numbered
image columns, the second component is Cb. For pixels in odd-numbered
image columns, the second component is Cr. If one were to convert the
data to RGB one would need to examine two pixels from columns N and N+1
(where N is even) to deduce the RGB color.
IP Status
None
Issues
None
New Procedures and Functions
None
New Tokens
Accepted by the <internalFormat> and <format> parameters of
TexImage2D and TexSubImage2D:
GL_YCBCR_MESA 0x8757
Accepted by the <type> parameter of TexImage2D and TexSubImage2D:
GL_UNSIGNED_SHORT_8_8_MESA 0x85BA /* same as Apple's */
GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB /* same as Apple's */
Additions to Chapter 2 of the OpenGL 1.4 Specification (OpenGL Operation)
None
Additions to Chapter 3 of the OpenGL 1.4 Specification (Rasterization)
In section 3.6.4, Rasterization of Pixel Rectangles, on page 102,
add the following to Table 3.8 (Packed pixel formats):
type Parameter GL Data Number of Matching
Token Name Type Components Pixel Formats
-------------- ------- ---------- -------------
UNSIGNED_SHORT_8_8_MESA ushort 3 YCBCR_422_MESA
UNSIGNED_SHORT_8_8_REV_MESA ushort 3 YCBCR_422_MESA
In section 3.6.4, Rasterization of Pixel Rectangles, on page 102,
add the following to Table 3.10 (UNSIGNED_SHORT formats):
UNSIGNED_SHORT_8_8_MESA:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
+-------------------------------+-------------------------------+
| 1st | 2nd |
+-------------------------------+-------------------------------+
UNSIGNED_SHORT_8_8_REV_MESA:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
+-------------------------------+-------------------------------+
| 2nd | 1st |
+-------------------------------+-------------------------------+
In section 3.6.4, Rasterization of Pixel Rectangles, on page 102,
add the following to Table 3.12 (Packed pixel fiedl assignments):
First Second Third Fourth
Format Element Element Element Element
------ ------- ------- ------- -------
YCBCR_422_MESA luminance chroma
In section 3.8.1, Texture Image Specification, on page 125, add
another item to the list of TexImage2D and TexImage3D equivalence
exceptions:
* The value of internalformat and format may be YCBCR_MESA to
indicate that the image data is in YCbCr format. type must
be either UNSIGNED_SHORT_8_8_MESA or UNSIGNED_SHORT_8_8_REV_MESA
as seen in tables 3.8 and 3.10. Table 3.12 describes the mapping
between Y and Cb/Cr to the components.
If NV_texture_rectangle is supported target may also be
TEXTURE_RECTANGLE_NV or PROXY_TEXTURE_RECTANGLE_NV.
All pixel transfer operations are bypassed. The texture is stored as
YCbCr, not RGB. Queries of the texture's red, green and blue component
sizes will return zero.
In section 3.8.1, Texture Image Specification, on page 126, add
another item to the list of TexImage1D and TexImage2D equivalence
exceptions:
* The value of internalformat and format can not be YCBCR_MESA.
In section 3.8.2, Alternate Texture Image Specification Commands, on
page 129, insert this paragraph after the first full paragraph on the
page:
"If the internal storage format of the image being updated by
TexSubImage2D is YCBCR_MESA then format must be YCBCR_MESA.
The error INVALID_OPERATION will be generated otherwise."
Additions to Chapter 4 of the OpenGL 1.4 Specification (Per-Fragment
Operations and the Frame Buffer)
None
Additions to Chapter 5 of the OpenGL 1.4 Specification (Special Functions)
None
Additions to Chapter 6 of the OpenGL 1.4 Specification (State and
State Requests)
None
Additions to Appendix A of the OpenGL 1.4 Specification (Invariance)
None
Additions to the AGL/GLX/WGL Specifications
None
GLX Protocol
None
Errors
INVALID_ENUM is generated by TexImage2D if <internalFormat> is
MESA_YCBCR but <format> is not MESA_YCBCR.
INVALID_ENUM is generated by TexImage2D if <format> is MESA_YCBCR but
<internalFormat> is not MESA_YCBCR.
INVALID_VALUE is generated by TexImage2D if <format> is MESA_YCBCR and
<internalFormat> is MESA_YCBCR and <border> is not zero.
INVALID_OPERATION is generated by TexSubImage2D if the internal image
format is YCBCR_MESA and format is not YCBCR_MESA.
INVALID_OPERATION is generated by CopyTexSubImage2D if the internal
image is YCBCR_MESA.
New State
Edit table 6.16 on page 231: change the type of TEXTURE_INTERNAL_FORMAT
from n x Z42 to n x Z43 to indicate that internal format may also be
YCBCR_MESA.
Revision History
20 September 2002 - Initial draft

View File

@@ -1,6 +1,25 @@
3Dfx Glide device driver for Mesa 3.3
(see below for FAQ)
3Dfx Glide device driver
Info for Mesa 4.1
-----------------
The 3dfx Glide driver in Mesa is disabled by default. Not too many people
use this driver anymore and at some point down the road it will be dropped.
To use/enable the Glide driver either do this:
'./configure --with-glide=DIR' Where DIR is the location of Glide, like
/usr/ or /usr/local
OR
'make linux-x86-glide' If using the old-style Makefile system.
The rest of this file hasn't changed since Mesa 3.3. Some of it's out of
date, but some is still valid.
@@ -13,8 +32,6 @@ What do you need ?
under Linux (more information in the "Useful Glide Environment
Variables");
- Mesa 3.1;
- The 3Dfx Glide library 2.3 or later for your OS (the 2.4 works fine).
The Voodoo2 requires the Glide library 2.51. The Glide 3.1 is not
compatible with the Glide 2.x so it doesn't work with the current
@@ -23,8 +40,6 @@ What do you need ?
- A compiler supported by the Glide library (Micro$oft VC++ (tested),
Watcom (tested), GCC for Linux (tested), etc.);
- A lot of patience, this is an alpha release.
- It's nice to have two monitors - one for your normal graphics
card and one for your 3Dfx card. If something goes wrong with
an application using the 3Dfx hardware you can still see your

View File

@@ -3,61 +3,71 @@
Introduction
* Introduction
Mesa 3.1 features a new driver for the BeOS. The new driver implements
Mesa 4.1 features a driver for the BeOS. The driver implements
a clone of the BGLView class. This class, derived from BView, allows
OpenGL rendering into a BeOS window.
The 4.1 BeOS driver is an update of Brian Paul's BeOS driver released in Mesa 3.1.
Any application which uses the BGLView should be able to use Mesa
instead of Be's OpenGL without changing any code.
Since Be's OpenGL implementation (as of R4) is basically just the
Since Be's OpenGL implementation (as of R5) is basically just the
SGI sample implementation, it's pretty slow. You'll see that Mesa
is considerably faster.
Source Code
* Source Code
The source code for the driver is in Mesa-3.1/src/BeOS/GLView.cpp
The source code for the driver is in Mesa-4.1/src/BeOS/ directory.
It's not 100% finished at this time but many GLUT-based demos are
working. No optimizations have been made at this time.
Compiling
* Compiling
In the Mesa-3.x directory type "make -f Makefile.X11 beos-r4".
When it finishes the libMesaGL.so and libMesaGLU.so libraries for
BeOS will be in the Mesa-3.x/lib/ directory.
Requirements:
- gcc version 2.95.3 for BeOS
You can find it here: http://www.bebits.com/app/2157
Move to the Mesa-4.x src sub-directory and then type "make -f Makefile.BeOS-R5".
When it finishes the Mesa based libGL.so library for
BeOS will be in the Mesa-4.x/src/obj.{x86|ppc}/ directory.
To install it as Be's default libGL.so replacement, put it in your
/boot/home/config/lib/ directory. All your GL/GLUTapps will use
the Mesa based then.
By default, it build a non-debug version library.
The x86 (MMX, SSE and 3DNOW) optimizations are also supported for x86 target.
Sorry, Mesa don't have ppc (Altivec) optimizations yet.
* Example Programs
Example Programs
Look in the Mesa-3.x/BeOS/ directory for one or two BGLView demo
Look in the Mesa-4.x/BeOS/ directory for one or two BGLView demo
programs. They should have been compiled along with the Mesa
library.
* GLUT
GLUT
A version of GLUT 2.5 for BeOS can be found in src-glut.beos/.
A beta version of GLUT 3.7 port for BeOS can be found at
http://anobject.com/jehamby/Code/Glut-3.7-x86.zip.
There's is a 2.5 version in src-glut.beos/, too.
The original distribution can be obtained from
http://home.beoscentral.com/jehamby/Glut-3.5-x86.zip
This is a special version of GLUT adapted for the BeOS. I don't
They are special version of GLUT adapted for the BeOS. I don't
believe Mark Kilgard's normal GLUT distribution includes BeOS
support.
It seems that you have to recompile GLUT with libMesaGL.so instead
of libGL.so in order for everything to work. I'm not sure why.
Special Features
* Special Features
Mesa's implementation of the BGLView class has an extra member
function: CopySubBufferMESA(). It basically works like SwapBuffers()
@@ -69,7 +79,9 @@ cause a fatal error when running with Be's OpenGL.
Work Left To Do
* Work Left To Do
BDirectWindow single buffering support is not implemented yet.
Color index mode is not implemented yet.
@@ -80,7 +92,7 @@ rendering. This should also be implemented for Mesa.
Old BeOS Driver
* Old BeOS Driver
Mesa 2.6 had an earlier BeOS driver. It was based on Mesa's Off-screen
rendering interface, not BGLView. If you're interested in the older
@@ -88,7 +100,7 @@ driver you should get Mesa 2.6.
BeOS and Glide
* BeOS and Glide
Mesa 3.0 supported the 3Dfx/Glide library on Beos. Download Mesa 3.0
if interested. Ideally, the 3Dfx/Glide support should be updated to
@@ -99,4 +111,4 @@ of February, 1999.
----------------------------------------------------------------------
$Id: README.BEOS,v 1.6 1999/11/27 01:40:40 brianp Exp $
$Id: README.BEOS,v 1.7 2002/09/19 16:19:44 brianp Exp $

209
docs/README.DJ Normal file
View File

@@ -0,0 +1,209 @@
Mesa 4.1 DOS/DJGPP Port v1.2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Description:
~~~~~~~~~~~~
Well, guess what... this is the DOS port of Mesa 4.1, for DJGPP fans... Whoa!
The driver has its origins in ddsample.c, written by Brian Paul and found by me
in Mesa 3.4.2.
Legal:
~~~~~~
Mesa copyright applies, provided this package is used within Mesa. For anything
else, see GPL.
Installation:
~~~~~~~~~~~~~
Unzip and type:
make -f Makefile.DJ [OPTIONS...]
Available options:
Environment variables:
CPU optimize for the given processor.
default = k6
BIG_OPT=1 crazy optimizations; not very useful, though...
default = no
GLIDE absolute path to Glide library; used with FX.
default = $(TOP)/include/glide3
FX=1 build for 3dfx Glide3; use it if you have the Glide
SDK (designed for your platform), and, of course, a
3dfx card... Note that this disables compilation of
actual DMesa code, as Glide does all the stuff!
default = no
HAVE_X86=1 optimize for i386.
default = no
HAVE_MMX=1 MMX instructions; use only if you assembler/compiler
supports MMX instruction set; backwards compatibility
with older processors is still preserved.
default = no
HAVE_SSE=1 (see HAVE_MMX)
default = no
HAVE_3DNOW=1 (see HAVE_MMX)
default = no
Targets:
all: build everything
libgl: build GL
libglu: build GLU
libglut: build GLUT
clean: remove object files
realclean: remove all generated files
Tested on:
CPU: K6-2 (CXT) @500(412.5) MHz
Mainboard: ViA Apollo VP2/97 w/ 128 MB SDRAM
Video card: PowerColor Evil King3 (Voodoo3 3000) w/ 16384 kB SDRAM
DJGPP: djdev 2.04 + gcc v3.2 + make v3.79.1
FAQ:
~~~~
1. Compilation
Q) I tried to run `make' and it exits because `gcc' complains it cannot find
some stupid file.
A) You need LFN support.
A) When compiling for Glide (FX=1), pay attention to Glide path.
2. Dynamic modules
Q) What are you mumbling about dynamic modules?
A) You must have the DXE2 package (available on SimTel.Net, courtesy of
Andrew Zabolotny) installed in order to build the dynamic modules.
Q) I have DXE2, but I couldn't build the `dxe2gen.exe'.
Q) I built `dxe2gen.exe', but it doesn't do the job right.
A) There is a patched version on my web page.
Q) DXE2 modules give me headaches...
A) The DXE2 modules are not compulsory. The static libraries are still built
and you can use them in the old-fashioned, classic way... and learn to
live with your ~2MB executable size. For example:
gcc -o OUT.exe IN.c -lglut -lglu -lgl
Q) Okay, DXE2 modules are built. How can I use them?
A) Build your export object file; then link it with your application.
For example:
dxe2res -o dmesadxe.c gl.dxe glu.dxe glut.dxe
gcc -o dmesadxe.o dmesadxe.c
gcc -o OUT.exe dmesadxe.o IN.c -liglut -liglu -ligl -ldl
Q) What is that `dxe2res.exe' thing?
A) That is an utility that generates the export file for a given set of
modules. If you can't find it in the DXE2 package, you must be looking at
the wrong archive :)
3. Using Mesa for DJGPP
Q) Does this build work in Win9x?
A) Yes.
Q) Does it work under NT (W2k, XP) core?
A) Uh... probably not!
Q) I made a simple application and it does nothing. It exits right away. Not
even a blank screen.
A) The current version supports only RGB[A] modes, for it made no sense to
me to endorse color-index (aka palette) modes.
A) Single-buffered is not allowed at all. Until I can find a way to use
*REAL* hardware acceleration, it won't get implemented.
A) Another weird "feature" is that buffer width must be multiple of 4 (I'm a
lazy programmer and I found that the easiest way to keep buffer handling
at peak performance ;-).
Q) My demo doesn't display text. I know I used the glut font routines!
A) Then you probably use GLUT as a DXE. Well, there is no direct access to
variables due to the way DXE works. Read the documentation. The author of
GLUT took this into account for _WIN32 DLL's only; I don't want to modify
his headers. The only workaround is to link GLUT the old way :-(
Q) DMesa is so SLOOOW! The Win32 OpenGL performs so much
better...
A) Is that a question? If you have a Voodoo3/Banshee card, you're lucky. The
Glide port is on my web page. If you haven't, sorry; everything is done
in software. Suggestions?
Q) I have a super/mega/ultra monitor and all you can do is 60Hz? My eyes are
leaking from the orbits...
A) If you were compiling for Glide, see Glide info. If not, be aware that
refresh rate control works only for VESA 3.0. The environment variable
DMESA_REFRESH sets the default screen refresh. For example:
set DMESA_REFRESH=75
libGLUT (the toolkit):
~~~~~~~~~~~~~~~~~~~~~~
Well, this "skeletal" GLUT implementation is not mine. Thanks should go to
Bernhard Tschirren, Mark Kilgard, Brian Paul and probably others (or probably
not ;-). I only changed it to be self-standing (Allegro-free). The keyboard,
mouse and timer drivers were inspired from an old project of mine (D3Xl) and
fixed with many Allegro "infusions"; I deeply thank to Shawn Hargreaves et co.
My keyboard driver used only scancodes, but since GLUT requires ASCII values
for keys, I borrowed the translation tables (and maybe more) from Allegro.
Ctrl-Alt-Del (plus Ctrl-Alt-End, for Windows users) will shut down the GLUT
engine unconditionally: it will raise SIGINT, which in turn will call the
destructors (let's hope), thus cleaning up your/my mess ;-) NB: since the
DJGPP guys ensured signal handlers won't go beyond program's space (and since
dynamic modules shall) the SIGINT can't be hooked (well, it can, but it is
useless), therefore you must live with the 'Exiting due to signal SIGINT'
message...
The mouse driver is far from complete (lack of positioning, drawing, etc),
but is enough to make almost all the demos work.
The timer is pretty versatile for it supports multiple timers with different
frequencies. It may not be the most accurate timer in the known universe, but
I think it's OK. Take this example: you have timer A with a very high rate,
and then you have timer B with very low rate compared to A; now, A ticks OK,
but timer B will probably loose precision!
As an addition, stdout and stderr are redirected and dumped upon exit. This
means that printf can be safely called during graphics, but all messages come
in bulk! A bit of a hack, I know, but I think it's better than to miss them
at all. "Borrowed" from RHIDE (Robert Hoehne) or SETEDIT (Salvador Eduardo
Tropea)... I'm not sure.
Window creating defaults: 640x480x16 at (0,0), 8-bit stencil, 16-bit accum.
However, the video mode is chosen in such a way that first window will fit.
History:
~~~~~~~~
v1.0 mar-2002 initial release
v1.1 sep-2002 + added 3dfx Glide3 support
+ added refresh rate control
+ added fonts in glut
* lots of minor changes
v1.2 nov-2002 * synced w/ Mesa-4.1
- removed dmesadxe.h
Contact:
~~~~~~~~
Name: Borca Daniel
E-mail: dborca@yahoo.com
WWW: http://www.geocities.com/dborca/

View File

@@ -1,623 +1,98 @@
Mesa/Readme.win32
Last Updated: Sunday, September 19th, 1999 - tjump@tertius.com
*** What's New
- Updated for Mesa 3.1beta3/CVS. Debug and Release command-line builds of
Mesa, fxMesa, GLU, GLUT and all sample programs DLL-based. Manual
executions tests with minimum requisite results (aka: things looked like
I expected them to).
What did you expect, complete regression testing maybe?
- NASM build support. Any file in the project coded as a .S file will
automatically be recognized and built as a NASM-source assember file.
To enable building using NASM, set the environment variable NASM to
indicate that command to execute to run nasm on a file. If NASM is in
your command search path then all this needs be set to is 'nasmw' -
otherwise you will need to include the complete drive and directory path.
NASM may be retrieved here: http://www.web-sites.co.uk/nasm/
- DevStudio projects suspended for compatability reasons: projects modified
by DevStudio 6 are not compatible with DevStudio 5.
These will slowly be rebuilt and put into CVS as I can.
- Build environment change: The Glide SDK is no longer assumed to be in
the global INCLUDE/LIB environment vars, it is required that you set the
value 'GLIDE2X' as either an environment variable pointing to your Glide
SDK install directory or that you configure that as a build option to
nmake.exe when building fxmesagl32. Examples:
nmake /f nmake.mak GLIDE2X=g:\sdk\glide2x fxmesagl32
<or>
nmake /f nmake.mak GLIDE2X=g:\sdk\glide2x allfx
<or>
nmake /f nmake.mak GLIDE2X=g:\sdk\glide2x progs.3dfx.demos
The DevStudio workspace files for 3Dfx OpenGL require the definition of
GLIDE2SDK as an environment variable pointing to where your copy of the
Glide SDK has been installed. Adding this to your AUTOEXEC.BAT would do
so (change the directories to match):
SET GLIDE2SDK=G:\SDK\GLIDE2X
*** Legalese
These build files are provided as-is and are submitted to be included with
the "Mesa 3-D Graphics Library" package as (currently) maintained by Brian
Paul. These project build files are free software; you can redistribute it
and/or modify it under the terms of the GNU Library General Public License
as published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
These project files are distributed in the hope that they will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; if not, write to the Free Software Foundation,
Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*** Maintenance Responsiblity and Technical Support
While these files are now part of the Mesa core distribution please do NOT
contact Mr. Paul for help with them if you encounter problems as he can't
help you (currently). I will, however, attempt my straightforward best in
assisting anyone with using these files on their system. I can NOT
guarantee instant responses owing to other responsiblities, but I do try
dang hard to answer any mail w/in 24 hours. I may be contacted at the
above email address for the forseeable future.
-Ted
mailto://tjump@tertius.com
http://www.tertius.com/tjump
*** General Information
These build files facilitate convenient building of many variants of Mesa,
both as static link libraries (including mesaglu) and as dynamic link
libraries that in some cases may be used as "drop-in" replacements for
OpenGL32.DLL on both Windows95 and Windows NT.
The construction of the Win32 command-line build files and projects has
been something of a pet project of mine, and is based upon my own
"standard" Win32 build environment as supplied by the "nmake.mif" file.
They have been tested under Windows95 OSR2, Windows NT 4.0SP3, and Windows
NT 5.0 beta 1. The libraries that they generated have been tested (via the
demo programs) in a *limited* fashion on the above three systems, including
the 3Dfx versions.
The reason I went with command-line build environment instead of the more
convenient IDE-based project files is for two reasons: 1. These appear to
have some amount of portability between versions (the nmake syntax hasn't
changed much since Microsoft C 7.0) while the IDE project files seem to
change drastically each version. and 2. These are readable with any ascii
editor and such are better self-documentation of the file relationships for
more people such that it will facilitate supporting other Win32 compilers.
While these files only deal with building for x86 targeted code it *should*
be possible to add the necessary logic to them to build for the other MSVC
supported CPU targets, I simply have no hardware to test them on nor the
alternative compilers to build with.
*** Prerequisites for use
1. You must have a 32-bit Microsoft compiler installed. I have tested
this with Visual C 5.0 (SP3) and Visual C 4.2, but with minor
(possibly no) modification to the nmake.mak and nmake.mif files this
sequence should work on Visual C 2.0 also. The workspace files
(mesalib.dsw and mesademos-*.dsw) and their included project files
(*.dsp) are specific to the DevStudio IDE - I have made no attempt at
building a VC4 IDE project set as I do not use that any more. Note
that the VC workspace files NO LONGER use NORE are dependant upon the
nmake.mak and nmake.mif files for construction of definition (*.DEF)
and resource (*.RC) files.
*** Visual C 4.x Users Warning ****
Note that early editions of VC4 do NOT have header files current enough
for use building this code base. If you are using VC4 you will either need
to get an update to version 4.2 *or* you may download the Platform SDK
directly from Microsoft's web site (www.microsoft.com) and update your
build environment that way.
*** Visual C 4.x Users Warning ****
2. You must have the PATH, INCLUDE, and LIB environment variables set
properly. With VC5 you can easily get this by executing the VCVARS32.BAT
file that was created for you upon installation. It is found in the
DevStudio\VC\BIN directory, wherever you installed DevStudio. VC4 provides
a similar batch file in it's BIN directory also.
3. (optional) If you're going to build for 3Dfx/Voodoo you will need to
have previously installed the Glide SDK version 2.3 or later, if I
recall. This may be retrieved from www.3dfx.com for no money and some
download time. ;-) These build files assume that you have the Glide SDK
added to the respective environment variables (LIB and INCLUDE).
4. (optional) If you're going to build for S3/Virge you will need the S3
Developers Toolkit which may be downloaded from www.s3.com for the price of
registering on-line and some time. NOTE: I can build the s3mesa.dll file to
completion, however the compilation of s3mesa.c currently generates a large
amount of compiler warnings and between that and the fact that I can not at
all test it I can make no claims to it's ability to execute. Again, like
the 3Dfx version before this, these build files assume you have the S3Dtk H
and LIB files in the path of their respective environment variables.
Note 2: As of Mesa3.0beta6 I have build files, both command-line and IDE,
which should be able to build the s3mesa code base if it weren't for updates
being required in the S3 DD code support (Mesa-3.0/src/s3 directory).
I advise putting any include and lib files for secondary toolkits (Glide,
S3Tk, whatever) in their respective environment variables *before* the
Microsoft-assigned default values.
*** FAQ: Frequenty Asked Questions and Other Important Information ***
- When running the 3Dfx demos under Windows NT, they crash on exit, what's
up?
This is apparently a problem in Glide itself. The workaround is to go to
your C:\WINNT\SYSTEM32 directory and rename the file FXOEM2X.DLL to
FXOEM2X.DL_ to prevent Glide from loading and initializing it upon
startup. This is known to be an issue with cards that do not have "TV
out" and is known to cause crashes on Diamond Monster II 8M and 3Dfx
Reference boards, all using 3Dfx Reference Drivers version 2.53. Other
hardware/driver combinations will also likely exhibit this behavior.
- I'm having a problem building Mesa for static library linking.
This was caused by some incomplete testing on my part, and a fix is now
available in the form of an add-on to the base Mesa 3.0 release. The
file to get is:
via FTP download from: iris.ssec.wisc.edu
you want to go here: /pub/Mesa/patches_to_3.0/
you want to get file: Mesa-3.0-w32-static-fixes.tar.gz
This required a minor addition to INCLUDE/GL for a clean solution, the
file "include/gl/mesa_wgl.h" is automatically included by
"include/gl/gl.h" when a Win32 non-DLL build is in progress to provide
prototypes for the various wgl functions.
The only remaining hitch in this setup is that the 3Dfx build is not yet
running as a static build, because of problems with conflicts in
existance of the various GDI functions like ChoosePixelFormat,
etc. *sigh*
Anyway, the "allstatic" target now works as expected and builds all
book/sample/demos programs to boot. ;^)
- How do I get fxMesa to render in a window on the desktop instead of only
full-screen?
Use the Microsoft Windows fxMesa-in-a-window hack!
Seriously, if you want fxMesaGL to render using the 3Dfx Voodoo1 or
Voodoo2 hardware into a window on the desktop then all you need to do is
set the MESA_WGL_FX environment variable to anything other than
"fullscreen" and it will render into a window. If you wish to go
fullscreen then you only need to NOT have the environment variable, or
have it set to "fullscreen". You may also switch at runtime between
fullscreen-mode and windowed by pressing ALT-ENTER on the keyboard
(unless the application using Mesa does something with those keystrokes,
of course).
As of 8/13/98 this should be running a LOT better for more people as a
low-compatability item was cleaned up which prevented it from working on
many (most?) display drivers under Windows 9x.
- I have my 3Dfx card hooked to it's own monitor and I want the output to
stay on even if I switch to another program, is this possible?
If the Glide environment variable SST_DUALHEAD is set to '1' then fxMesa
will never disable the Voodoo output on a Voodoo1 or Voodoo2 display
regardless of whether the fxMesa application is "current" or not. This
works regardless of whether it's rendering using the window hack
mentioned above or not.
- I want to run the Mesa demos on my Intel740 card using it's own OpenGL
acceleration, how do I do this?
Build GLUT standalone for use with system OpenGL and GLU drivers!
The Command-line project supports building all test/demo programs against
these drivers also! This allows you full use of GLUT on Windows using
hardware accelerated OpenGL. Wheee! This includes the "3dfx/demos"
directory of which only two programs will not run on "standard"
opengl. Note that there are a few of the sample programs which will NOT
work without Mesa as they directly call into Mesa instead of using the
extension mechanism.
*** Included programs that exhibit unfortunate or bad behavior
- demos/bounce - doesn't run on high-colors screens? It's requesting an
INDEX display from GLUT and that fails on my true-color desktop. Changing
this to _RGB let's the program work, but it doesn't display
properly. This is probably just an idiosyncracy of my machine though, as
if I test the program using GLUT for System OpenGL on my Intel740 OpenGL
accelerated machine it's just hunky-dory.
- demos/glutfx - runs, but crashes on exit (but not on my Intel740 machine)
- demos/texobj - runs, but crashes on exit if ESC is pressed. Exits cleanly
if the Close box on the window frame is pressed with the mouse. Go figure.
- book/aaindex - doesn't run, can't get pixel format, because it wants an
INDEX display maybe (but is okay on my Intel740 machine)?
- most of the book/* demos don't respond to ESC being pressed.
- 3dfx/demos/* - all demos run, however they all crash on exit. I've traced
this so far as to determine the call it's happening with. The crash comes
from within Glide during the processing of the grGlideShutdown() call, as
in invalid memory reference exception. I'm wondering if this is because
of some state or processing not being completed before the call. Dunno,
but putting grSstIdle() in just before grGlideShutdown() does NOT fix the
problem.
- 3dfx/demos/tunnel2 - does not run on my system even with SLI mode
disabled. Hmmmm, maybe I need to disconnect my Voodoo2 cards?
*** Important Notes and Changing Default values
- The optimizer settings have been manually reworked in both command line
and DevStudio IDE files to hopefully prevent possible irrational code on
the part of the code generator. Formerly, it was configured for "/Ox",
now it is configured for safer handling at a slight potential performance
cost. This may not be required for Visual Studio 6 but I can't test that
(yet).
- These files build with the code targeted for Pentium processors and
8-byte structure padding.
- The IDE-built programs seem to be "happier" in that the command line
build of the 3Dfx demo "fire" will grenade on exit (?). Otherwise pretty
much everything may be built with either interface.
- The currently configured Mesa version is 3.1, and MesaDemos version is
the same. To change this permanently you will need to edit NMAKE.MAK and
change the lines that look like this (they start o/a line 116):
# Currently, Mesa is at rev 3.1 ...
#
!IF "$(MESAVER)" == ""
MESAVER=3.1
!ENDIF
# used in building all of the resource files for the Mesa DLLs
#
!IF "$(MESAFILEVER)" == ""
MESAFILEVER=3,1,0,0
!ENDIF
- Currently the build files are configured to be used from a Win32
directory that is included inside the main Mesa-3.1 heirarchy.
- The build files are smart enough to find the files for the core lib, glu,
glut, and the various demo programs if they are unpacked in the current
Mesa-3.1 heirarchy, like this:
\Mesa-3.1
\Mesa-3.1\src
\Mesa-3.1\src-glu
\Mesa-3.1\src-glut
\Mesa-3.1\Win32
\Mesa-3.1\samples
\Mesa-3.1\demos
\Mesa-3.1\book
\Mesa-3.1\3Dfx\demos
... should work. This arose because my initial build tests for the
demo files were done before MesaDemos 2.6 had been released.
- With the exception of the static link libraries generated by this file
set (mesagl.lib, mesaglu.lib, mesaglut.lib) all DLLs and executables are
built against the "Multithreaded DLL" runtime - this means that they
require MSVCRT.DLL or MSVCRTD.DLL in the path to execute.
** CHANGED 8/11/98 ***
Note also that the demos are all built aginst the "OpenGL32, GLU32, and
GLUT32" and as such they are fairly agnostic wrt: building against Mesa
for CPU-rendering, Mesa-for-3Dfx, Mesa-for-S3, or System OpenGL.
If you want to build them for use on your system and your display card
provides full OpenGL acceleration (Permedia, Intel740, Intergraph,
whatever) then you only need to build GLUT prior to building any of the
demo programs. For convenience, the GLUT project is included in each of
the demo projects Workspace files for the DevStudio IDE builds BUT it is
not automatically built - you still need to build it first manually.
Note that if you have GLUT already installed on your system (gl/glut.h in
yoru INCLUDE path, glut32.lib/glut32d.lib in your LIB path, and the DLL
in your PATH) then you do NOT need to build GLUT prior to the test
programs.
- The 3Dfx build of Mesa has primarily been tested with Quake 2 and it runs
(mostly) fine on my PC (take that for what you want it)...
** CHANGED 8/11/98 ***
There is still something going on that causes Glide to crash on shutdown,
when I run fxMesa under Windows NT, however it does not appear to occur
under Windows 9x on either Voodoo1 or Voodoo2 cards. *sigh*
- I can not test the S3 build as I have no machines available with Virge
based display cards.
- The multithreaded test code is *not* built as it requires pthreads and I
have as of yet spent not time trying to get that running. The latest word
that I saw WRT threading support on win32 was that they are intending to
support it natively within Win32 - so I'm waiting it out until they get
it done.
- Similarly, the 'xdemos' are not currently built because I haven't gotten
around to building the client libs for native win32 and getting it all
setup for use.
*** Output Files
All final output files (DLL/LIB) are placed in the Mesa-3.1/lib directory,
with the exception of the fxMesaGL32 build which is placed in
Mesa-3./lib/FX and the executable images which are placed in their source
directories.
To be able to execute the various test programs, you will need to copy the
requisite DLL files into the same directory as the EXE files. Note that
most of the 3Dfx/demos/* programs WILL run with the non-FX build of Mesa -
just very slowly. The two programs which are hard-linked with the FX build
and will not run without it are "glbpaltx" which uses "gl3DfxSetPaletteEXT"
directly instead of via the extensions mechanism and "tunnel2" which uses
"fxMesaSelectCurrentBoard" API for selecting between multiple 3Dfx cards
installed in one system. Likewise, "paltex" directly uses the
"glColorTableEXT" extension and thus may not run on anything except
Mesa. If these applications used the proper extension mechanism they could
then be used on more than "just" fxMesa to good effect (for example, the
rest of the "3Dfx/demos" run just peachy on the Intel740 card in my test
machine) under WinNT.
Because I'm anal about my computer and it's organization, and I like to
prevent collision between builds, each of the subprojects has their own
intermediate file directory inside .\win32\release (for example, when
building mesagl.lib all of it's intermediate files will be found in
.\win32\release\lib.mesagl). This makes it very easy to cleanup as you
only need to remove .\win32\release.
*** Okay, Enough, how do I build with this stuff already Ted!
Okay, no major calamity here. The basic way to use the project file is to
call it via NMAKE from the command line. The format is:
nmake[.exe] /f nmake.mak [options] [target]
The most likely [options] values you will use may be any combination of the
following:
DEBUG=1 or DEBUG=0
USE_CRTDLL=1 or USE_CRTDLL=0
Note that all three of these options are OFF by default.
The [target] includes but is not limited to the following (for full details
please peruse the NMAKE.MAK and NMAKE.MIF files - but be warned that
NMAKE.MIF is rather large and sometimes hard to follow):
--- convenience targets ---
all - builds everything
libfiles - builds all linking library files
progs - builds all executable images
--- library files, static and dynamic ---
mesagl - static lib build of Mesa core.
mesaglu - static lib build of MesaGLU core.
mesaglut - static lib build of Mesa GLUT core.
mesagl32 - dynamic lib build of Mesa core.
mesaglu32 - dynamic lib build of GLU core, generates
GLU32.DLL and/or GLU32d.DLL.
mesaglut32 - dynamic lib build of GLUT core, generates
GLUT32.DLL and/or GLUT32d.dll.
--- hardware accelerated mesa builds ---
fxmesagl32 - builds Mesa for use on top of the 3Dfx
Glide runtime libs
s3mesagl32 - builds mesa for use on top of the S3
'S3Tk' runtime libs.
--- executable images ---
progs.book - builds all programs in \book directory
progs.demos - builds all programs in \demos directory
progs.samples - builds all programs in \samples directory
These targets generate all of the programs in their respective
directories and link the executables against OpenGL32.DLL,
GLU32.DLL, and GLUT32.DLL (or their debug equivalents).
progs.3dfx.demos - builds all programs in \3dfx\demos directory
This target generates the 3Dfx/Demo executables, linking them
against GLUT32.DLL, GLU32.DLL, OPENGL32.DLL and are thus NOT
hard-bound to using Mesa per-se as you can simply NOT build the
Mesa core and GLU libraries.
--- Microsoft/SGI OpenGL-based GLUT and Demo program builds ----
*** IMPORTANT SAFETY TIP: If you're going to build these variants of
GLUT then DO NOT build any other target libraries in this package
first, OR from the command line run the "nmake /f nmake.mak clean"
command first! This is because generation of the GLUT for SGI
OpenGL target libraries conflicts in naming with the static build
libraries of Mesa and it's supporting GLUT build.
Currently, you may build GLUT as either GLUT32.DLL or GLUT.DLL for
use running against either Microsoft or SGI OpenGL for Window,
respectively. This allows for the general use of GLUT 3.7 on Windows
systems with fully compliant OpenGL.
You can build the GLUT DLL files either with the command line by
issuing either of these commands:
nmake /f nmake.mak glut.sysgl
<or>
nmake /f nmake.mak glut.sgigl
OR by using the DevStudio MesaLib Worksapce build the GLUT_SGIGL or
GLUT_SYSGL projects within the DevStudio IDE.
Unfortunately, the only way to build the test programs against this
build of GLUT is via the command line, and I will NOT be making
duplicate demo program projects for the IDE as it's just not worth it,
sorry.
To build the test programs against either MS or SGI OpenGL, you do so
via either of these two commands:
nmake /f nmake.mak progs.sysgl
<or>
nmake /f nmake.mak progs.sgigl
To use the GLUT-for-system-OpenGL in your own programs, you need to do
three things by way of preparation, after building GLUT of course:
1. Copy include\gl\glut.h to somewhere in your %INCLUDE% path, one
likely candidate location would be in your
"DevStudio\VC\INCLUDE\GL" directory.
2. Copy the linking libraries to somewhere in your %LIB% path, one
likely candidate location would be in your "DevStudio\VC\LIB"
directory. The linking libraries you need to copy are as
follows:
.\Release\GLUT32.LIB
.\Release\GLUT.LIB
.\Debug\GLUT32.LIB
.\Debug\GLUT.LIB
3. Copy the runtime libraries to somewhere in your %PATH%, one
likely candidate location would be in WINDOWS\SYSTEM. the files
that you should copy are as follows:
.\Release\GLUT32.DLL
.\Release\GLUT32.PDB
.\Release\GLUT.DLL
.\Release\GLUT.PDB
.\Debug\GLUT32d.DLL
.\Debug\GLUT32d.PDB
.\Debug\GLUTd.DLL
.\Debug\GLUTd.PDB
Some examples are in order ...
... build all dynamic-link libs using MSVCRT.DLL for C runtime:
nmake /f nmake.mak USE_CRTDLL=1 alldynamic
... To build all library variants and all test and demonstration
programs with the default settings you do this:
nmake /f nmake.mak all
... to build all static link libs and nothing else you do this:
nmake /f nmake.mak allstatic
... to build all non-accelerated dynamic link libs you do this:
nmake /f nmake.mak alldynamic
... to build all 3Dfx targeted dynamic link libs you do this:
nmake /f nmake.mak allaccel
... to build all S3 Virge targetd dynamic link libs you do this:
nmake /f nmake.mak alls3
... to build all libraries, static and dynamic, in all versions
you do this:
nmake /f nmake.mak libfiles
... to subsequently build all demo and test programs you do this:
nmake /f nmake.mak progs
... to cleanup all intermediate files you do this:
nmake /f clean
You get the picture. (I hope) ;^) You may also specify specify
single targets in a convenient fashion. The rule is simple, any of the
above named lib files, static or dynamic, may be built by providing it's
name on the command line as the target. Examples:
... to build only Mesa as OpenGL32.DLL ...
nmake /f nmake.mak opengl32
... to build only Mesa on top of the 3Dfx Glide API ...
nmake /f nmake.mak fxMesaGL32
<or>
nmake /f nmake.mak fxMesaGL
... to build only Mesa on top of the S3 Toolkit ...
nmake /f nmake.mak s3MesaGL32
<or>
nmake /f nmake.mak s3mesaGL
*** Revision history for ./win32 project files
1/18/98 - initial cut submitted and included with core mesa
2/5/98 - fixed internal dependency within nmake.mif upon there being
a $(DEVDIR) variable to make some temporary batch files
dependant upon (thanks to Keven T. McDonnell for finding
that there was this particular bug). I also updated the
build files for 2.6beta6.
2/8/98 - added DevStudio workspace and project files for all lib
files and some test programs. Updated readme.win32.
6/25/98 - initial revision for Mesa 3.0, does not include IDE files,
not everything is running. *sigh*
7/20/98 - Mesa 3.0beta6 rev of all build files, all libs built and
minimally tested, all demo programs built and minimally
tested to within limits of my PC. ;^) Eveything looks
MUCH better now ...
7/30/98 - Minor updates/edits based upon feedback from
Eero Pajarre <epajarre@koti.tpo.fi>. These updates include a fix
to the Mesa-on-3Dfx build such that Quake-II now runs almost
properly on my system. It runs, just *very* slowly and with *no*
textures. Hmmm. Doesn't make any difference whether Quake is set
to use 8-bit textures or not.
8/13/98 - Lots of build cleanups, minor bug fixes in fxwgl.c, and
compatability fix in fxapi.c for in-window rendering using 3Dfx
hardware.
8/26/98 - Final revisions for Mesa 3 release checked
9/22/98 - Fixed static builds for all but fxMesaGL32 and s3MesaGL32 targets
9/29/98 - Reorganized FAQ information and added Added faq entry about Glide
bug under NT (crash on exit) and a workaround.
11/21/98 - Updated files for Mesa 3.1 beta 1
Updated fxMesa window-hack code
Updated fxMesa resolution support to handle 1600x1200 & 1280x1024
7/9/99 - Rev'd for Mesa 3.1 beta 2
File: docs/README.WIN32
Last updated: Nov 08, 2002 - Karl Schultz - kschultz@users.sourceforge.net
Quick Start
Unzip both ZIP files (MesaLib and MesaDemos) into the same directory.
This is important because the current makefiles in MesaLib assume that
the directories in MesaDemos are present.
If you have Microsoft Visual C++ 6.0 installed, simply go to the top directory
of the Mesa distribution and type 'nmake -f Makefile.win NODEBUG=1' for
an optimized build. Note that you may have to run ...VC98/BIN/VCVARS32.BAT
to set up the appropriate compiler environment variables.
Details and Notes
- Building Mesa as noted above should visit and build the following:
src MesaGL.dll, MesaGL.lib, osmesa.dll, osmesa.lib
si-glu MesaGLU.dll, MesaGLU.lib
src-glut glut32.dll, glut32.lib
demos a handful of demo executables.
book more examples
samples more examples
- After building, you can copy the above DLL files to a place in your PATH
such as $SystemRoot/SYSTEM32. If you don't like putting things in a
system directory, place them in the same directory as the executable(s).
For example, you can copy the DLL files to the demos directory if you
just want to run the demos. The build process places the DLL and LIB files
in the ./lib directory. The makefile creates this directory if it does
not already exist.
- The make targets 'clean' and 'clobber' will remove objects and libraries.
But the files in ./lib are never cleaned.
- The make target 'install' will take its best shot at copying DLL files,
LIB files, and headers to the right places. I strongly suggest that
you examine the makefiles to make sure that 'install' doesn't do anything
that you can't live with.
- The makefiles are designed to work with Microsoft's NMAKE, and do,
unfortunately, have some Microsoft-specific things in them. If you
would like to use gcc or some other build tools like the Cygnus tools,
then you will have to hack the makefiles to make them work with your
tools. I'm sorry about this; I wasn't motivated to make this any
different, but if you end up modifying the makefiles for your tools,
you can send me the changes and I can apply the changes to the
source tree.
- There are no Microsoft Visual Studio project files. However, these
should be very easy to create. One can use the compiler and linker
options found in the makefiles to make quick progress in creating
projects.
- The DLL files are built so that the external entry points use the
stdcall calling convention.
- Static LIB files are not built. The LIB files that are built with
the current makefiles are the linker import files associated with
the DLL files. If static LIB's are desired, it should not be too
difficult to modify the makefiles to generate them.
- The si-glu sources are used to build the GLU libs. This was done
mainly to get the better tessellator code.
- The osmesa driver builds and should work on Windows as well as
any other platform.
- The Windows driver (in src/Windows) builds and runs at least at
a minimal level. I modified this driver to work with the new
Mesa 4.0 code and driver architecture, but I did not do a great
deal of optimization and testing. There are many opportunities
for optimization, many of which can be done by coding more specific
paths for the rasterizers. See src/osmesa/osmesa.c for some good
examples.
- There is DirectDraw support in the Windows driver, updated by
Daniel Slater. You'll need to uncomment the #define DDRAW line
in src/Windows/wmesadef.h and add ddraw.lib to the list of libraries
in src/Makefile.win. On some systems, you will acheive significantly
higher framerates with DirectDraw.
- Some of the more specialized code like FX drivers, stereo, and
parallel support isn't compiled or tested. I left much of this
code alone, but it may need some work to get it 'turned on' again.
- No assembly code is compiled or assembled. Again, this may need
some work to turn it back on or use it again.
If you have a Windows-related build problem or question, it is
probably better to direct it to me (kschultz@users.sourceforge.net),
rather than directly to the other Mesa developers. I will help you
as much as I can. I also monitor the Mesa mailing lists and will
answer questions in this area there as well.
Karl Schultz

146
docs/README.WINDML Normal file
View File

@@ -0,0 +1,146 @@
WindML Driver for Mesa 4.0
Requirements
------------
Tornado 2 + WindML, Cumulative Patchs are recommended.
I suppose you have a valid WindML installation. Double buffer hardware
gives better performance than double buffer software so if you can
compile your WindML driver with this option, just do it. I/O
redirection is adviced in target server.
Tested on
---------
During the development, my main target was a CoolMonster:
- Video card: CT69000
- CPU: PENTIUM 266MHz
and my host a Windows NT + Tornado 2.
Installation
------------
1. Mesa sources must be in root directory (C:\)
2. Add the following line to your torVars.bat:
set MESA_BASE=C:\Mesa
OR copy the new torVars.bat in your bin path:
c:/Mesa/src/ugl/tornado/torVars.sample ->
/mnt/nt/Tornado/host/x86-win32/bin/torVars (for example)
3. In a command prompt:
$ torVars
$ cd c:\Mesa
$ make -f Makefile.ugl CPU=PENTIUM
Take a long while...
5. Include all the files from ugldemos folder to build some downloadable
application modules
4. Download UGL/Mesa object files on target
For example via the WindShell:
ld < c:\Tornado\target\lib\objMesaGL.o
ld < c:\Tornado\target\lib\objMesaUGL.o
ld < c:\Tornado\target\lib\objMesaGLU.o
ld < c:\Tornado\target\lib\objGLUTshapes.o
ld < c:\Tornado\target\lib\objMesaOS.o
You can put the previous lines in a file and use:
< filename
6. Download the application modules.
7. In WindShell, run:
-> uglalldemos
During the show some messages will appear, it provides some useful
information on key management.
Coding
------
Sample Usage:
In addition to the usual ugl calls to initialize UGL, (may be find an
input driver), you must do the following to use the UGL/Mesa interface:
1. Call uglMesaCreateContext() to create a UGL/Mesa rendering context,
given the display format.
2. Call uglMesaMakeCurrent() to bind the UGL/Mesa buffers to an
UGL/Mesa Context and to make the context the current one.
3. Make gl* calls to render your graphics.
4. Use uglMesaSwapBuffers() when double buffering to swap front/back buffers.
5. Before the UGL is destroyed, call MesaDestroyContext().
6. Before exiting, call if required uglEventQDestroy and then
uglDeinitialize();
Limitations
-----------
I found the following limitations in my driver :
- Color Indexed management is only in 8 bits
- It's possible to mix UGL/OpenGL application with a software
double buffer
Modifications
------------
New files in Mesa:
- Makefile.ugl
- rules.windmlmesa
- docs/README.UGL
- include/GL/uglmesa.h
- si-glu/Makefile.ugl
- src/Makefile.ugl
- src/ugl/torGLUTShapesInit.c
- src/ugl/torMesaUGLInit.c
- src/ugl/ugl_api.c
- src/ugl/ugl_dd.c
- src/ugl/ugl_glutshapes.c
- src/ugl/ugl_line.c
- src/ugl/ugl_span.c
- src/ugl/ugl_tri.c
- src/ugl/uglmesaP.h
- ugldemos/*
Modified files in Tornado 2.0:
- c:\Tornado\host\x86-win32\bin\torVars.bat
rem Command line build environments
set WIND_HOST_TYPE=x86-win32
set WIND_BASE=C:\Tornado
set MESA_BASE=C:\Mesa
set PATH=%WIND_BASE%\host\%WIND_HOST_TYPE%\bin;%PATH%
- c:\Tornado\target\config\comps\VxWorks\01uglmesa.cdf
- c:\Tornado\target\h\GL\*
Todo
----
- GCC 2.96, ASM compilation
Thanks to:
----------
Precision Insight team for their great job around Mesa, XFree, and DRI.
Wind River Systems to take me as an intern.
Stephane Raimbault
<stephane.raimbault@windriver.com>
<stephane.raimbault@deesse.univ-lemans.fr>
July 24, 2001

View File

@@ -1,5 +1,5 @@
Mesa 3.3 Unix/X11 Information
Mesa Unix/X11 Information
@@ -18,21 +18,15 @@ There are two ways to compile Mesa on Unix/X11 systems:
the top-level Makefile and Make-config files. There are instructions in
each file.
When finished, the Mesa libraries will be in the Mesa-x.y/lib/ directory.
2. The new way:
Type './configure' and then 'make'. This uses GNU autoconfig.
Run 'make check' to build the demos.
See docs/INSTALL for more details.
The top-level makefile will execute the makefiles in a number of sub-
directories. When finished, the Mesa libraries will be in the Mesa-3.3/lib/
directory. A few GLUT demos in the demos/ directory should be ready to run.
If you also downloaded and unpacked the demos there should be executables
in the "xdemos/", "samples/", and "book/" directories for you to try out.
If you have compilation problems you should try to fix them and return the
patches to the author.
When finished, the Mesa libraries will be in the Mesa-x.y/src/.libs/,
Mesa-x.y/si-glu/.libs, etc directories.
Notes on assembly language optimizations:
@@ -323,4 +317,4 @@ Summary of X-related environment variables:
----------------------------------------------------------------------
$Id: README.X11,v 3.5 2000/04/04 15:14:48 brianp Exp $
$Id: README.X11,v 3.9 2002/10/29 23:42:48 brianp Exp $

22
docs/RELNOTES-3.4 Normal file
View File

@@ -0,0 +1,22 @@
Mesa 3.4 release notes
November 3, 2000
PLEASE READ!!!!
Introduction
------------
Mesa uses an even/odd version number scheme like the Linux kernel.
Odd numbered versions (such as 3.3) designate new developmental releases.
Even numbered versions (such as 3.4) designate stable releases.
Mesa 3.4 simply fixes bugs found in the Mesa 3.3 release. For details,
see the VERSIONS file.
----------------------------------------------------------------------
$Id: RELNOTES-3.4,v 1.2 2002/03/23 02:37:17 brianp Exp $

22
docs/RELNOTES-3.4.1 Normal file
View File

@@ -0,0 +1,22 @@
Mesa 3.4.1 release notes
February 9, 2001
PLEASE READ!!!!
Introduction
------------
Mesa uses an even/odd version number scheme like the Linux kernel.
Odd numbered versions (such as 3.3) designate new developmental releases.
Even numbered versions (such as 3.4) designate stable releases.
Mesa 3.4.1 is a maintenance release that simply fixes bugs found since
the Mesa 3.4 release. For details, see the VERSIONS file.
----------------------------------------------------------------------
$Id: RELNOTES-3.4.1,v 1.2 2001/05/23 14:45:01 brianp Exp $

22
docs/RELNOTES-3.4.2 Normal file
View File

@@ -0,0 +1,22 @@
Mesa 3.4.2 release notes
May 17, 2001
PLEASE READ!!!!
Introduction
------------
Mesa uses an even/odd version number scheme like the Linux kernel.
Odd numbered versions (such as 3.3) designate new developmental releases.
Even numbered versions (such as 3.4) designate stable releases.
Mesa 3.4.2 is a maintenance release that simply fixes bugs found since
the Mesa 3.4.1 release. For details, see the VERSIONS file.
----------------------------------------------------------------------
$Id: RELNOTES-3.4.2,v 1.2 2001/05/23 14:45:01 brianp Exp $

228
docs/RELNOTES-3.5 Normal file
View File

@@ -0,0 +1,228 @@
Mesa 3.5 release notes
June 21, 2001
PLEASE READ!!!!
Introduction
------------
Mesa uses an even/odd version number scheme like the Linux kernel.
Odd numbered versions (such as 3.5) designate new developmental releases.
Even numbered versions (such as 3.4) designate stable releases.
The biggest change in Mesa 3.5 is a complete overhaul of the source
code in order to make it more modular. This was driven by the DRI
hardware drivers. It simplifies the DRI drivers and opens the door
to hardware transform/clip/lighting (TCL). Keith Whitwell can take
the credit for that.
Driver Support
--------------
The device driver interface in Mesa 3.5 has changed a lot since Mesa 3.4
Not all of the older Mesa drivers have been updated. Here's the status:
Driver Status
---------------------- -----------
XMesa (Xlib) updated
OSMesa (off-screen) updated
FX (3dfx Voodoo1/2) updated
SVGA updated
GGI not updated
Windows/Win32 not updated
DOS/DJGPP not updated
BeOS not updated
Allegro not updated
D3D not updated
DOS not updated
We're looking for volunteers to update the remaining drivers. Please
post to the Mesa3d-dev mailing list if you can help.
GLU 1.3
-------
Mesa 3.5 includes the SGI Sample Implementation (SI) GLU library.
This version of GLU supports the GLU 1.3 specification. The old
Mesa GLU library implemented the 1.1 specification. The SI GLU
library should work much better.
You'll need a C++ compiler to compile the SI GLU library. This may
be a problem on some systems.
New Extensions
--------------
GL_EXT_convolution
Adds image convolution to glRead/Copy/DrawPixels/TexImage.
GL_ARB_imaging
This is the optional imaging subset of OpenGL 1.2.
It's the GL_EXT_convolution, GL_HP_convolution_border_modes,
GL_EXT_histogram, GL_EXT_color_table, GL_EXT_color_subtable
GL_EXT_blend_color, GL_EXT_blend_minmax, GL_EXT_blend_subtract
and GL_SGI_color_matrix extensions all rolled together.
This is supported in all software renderers but not in all
hardware drivers (3dfx for example).
GL_ARB_texture_compression
This is supported in Mesa but only used by the 3dfx DRI drivers
for Voodoo4 and later.
GL_ARB_texture_env_add
This is identical to GL_EXT_texture_env_add.
GL_NV_blend_square
Adds extra blend source and dest factors which allow squaring
of color values.
GL_EXT_fog_coord
Allows specification of a per-vertex fog coordinate instead of
having fog always computed from the eye distance.
GL_EXT_secondary_color
Allows specifying the secondary (specular) color for each vertex
instead of getting it only from lighting in GL_SEPARATE_SPECULAR_COLOR
mode.
GL_ARB_texture_env_combine
Basically the same as GL_EXT_texture_env_combine
GL_ARB_texture_env_add extension
Texture addition mode.
GL_ARB_texture_env_dot3 extension
Dot product texture environment.
GL_ARB_texture_border_clamp
Adds GL_CLAMP_TO_BORDER_ARB texture wrap mode
GL_SGIX_depth_texture, GL_SGIX_shadow and GL_SGIX_shadow_ambient
Implements a shadow casting algorithm based on depth map textures
GL_SGIS_generate_mipmap
Automatically generate lower mipmap images whenever the base mipmap
image is changed with glTexImage, glCopyTexImage, etc.
libOSMesa.so
------------
libOSMesa.so is a new library which contains the OSMesa interface for
off-screen rendering. Apps which need the OSMesa interface should link
with both -lOSMesa and -lGL. This change was made so that stand-alone
Mesa works the same way as XFree86/DRI's libGL.
Device Driver Changes / Core Mesa Changes
-----------------------------------------
The ctx->Driver.LogicOp() function has been removed. It used to
be called during state update in order to determine if the driver
could do glLogicOp() operations, and if not, set the SWLogicOpEnabled
flag. Drivers should instead examine the LogicOp state themselves
and choose specialized point, line, and triangle functions appropriately,
or fall back to software rendering. The Xlib driver was the only driver
to use this function. And since the Xlib driver no longer draws
points, lines or triangles using Xlib, the LogicOp function isn't needed.
The ctx->Driver.Dither() function has been removed. Drivers should
detect dither enable/disable via ctx->Driver.Enable() instead.
The ctx->Driver.IndexMask() and ctx->Driver.ColorMask() functions
are now just called from glIndexMask and glColorMask like the other
GL state-changing functions. They are no longer called from inside
gl_update_state(). Also, they now return void. The change was made
mostly for sake of uniformity.
The NEW_DRVSTATE[0123] flags have been removed. They weren't being used
and are obsolete w.r.t. the way state updates are done in DRI drivers.
Removed obsolete gl_create_visual() and gl_destroy_visual().
Renamed functions (new namespace):
old new
gl_create_framebuffer _mesa_create_framebuffer
gl_destroy_framebuffer _mesa_destroy_framebuffer
gl_create_context _mesa_create_context
gl_destroy_context _mesa_destroy_context
gl_context_initialize _mesa_context_initialize
gl_copy_context _mesa_copy_context
gl_make_current _mesa_make_current
gl_make_current2 _mesa_make_current2
gl_get_current_context _mesa_get_current_context
gl_flush_vb _mesa_flush_vb
gl_warning _mesa_warning
gl_compile_error _mesa_compile_error
All the drivers have been updated, but not all of them have been
tested since I can't test some platforms (DOS, Windows, Allegro, etc).
X/Mesa Driver
-------------
The source files for the X/Mesa driver in src/X have been renamed.
The xmesa[1234].c files are gone. The new files are xm_api.c,
xm_dd.c, xm_line.c, xm_span.c and xm_tri.c.
Multitexture
------------
Eight texture units are now supported by default.
OpenGL SI related changes
-------------------------
In an effort to make Mesa's internal interfaces more like the OpenGL
SI interfaces, a number of changes have been made:
1. Importing the SI's glcore.h file which defines a number of
interface structures like __GLimports and __GLexports.
2. Renamed "struct gl_context" to "struct __GLcontextRec".
3. Added __glCoreCreateContext() and __glCoreNopDispatch() functions.
4. The GLcontext member Visual is no longer a pointer.
5. New file: imports.c to setup default import functions for Mesa.
16-bit color channels
---------------------
There's experimental support for 16-bit color channels (64-bit pixels)
in Mesa 3.5. Only the OSMesa interface can be used for 16-bit rendering.
Type "make linux-osmesa16" in the top-level directory to build the
special libOSMesa16.so library.
This hasn't been tested very thoroughly yet so please file bug reports
if you have trouble.
In the future I hope to implement support for 32-bit, floating point
color channels.
----------------------------------------------------------------------
$Id: RELNOTES-3.5,v 1.14 2001/06/20 19:02:48 brianp Exp $

163
docs/RELNOTES-4.0 Normal file
View File

@@ -0,0 +1,163 @@
Mesa 4.0 release notes
October 18, 2001
PLEASE READ!!!!
Introduction
------------
Mesa uses an even/odd version number scheme like the Linux kernel.
Odd numbered versions (such as 3.3) designate new developmental releases.
Even numbered versions (such as 3.4) designate stable releases.
Mesa version 4.0 signifies two things:
1. A stabilization of the 3.5 development release
2. Implementation of the OpenGL 1.3 specification
Note that the Mesa major version number is incremented with the OpenGL
minor version number:
Mesa 1.x == OpenGL 1.0
Mesa 2.x == OpenGL 1.1
Mesa 3.x == OpenGL 1.2
Mesa 4.x == OpenGL 1.3
New Features
------------
Mesa 3.5 already had all the new features of OpenGL 1.3, implemented as
extensions. These extensions were simply promoted to standard features:
GL_ARB_multisample
GL_ARB_multitexture
GL_ARB_texture_border_clamp
GL_ARB_texture_compression
GL_ARB_texture_cube_map
GL_ARB_texture_env_add
GL_ARB_texture_env_combine
GL_ARB_texture_env_dot3
GL_ARB_transpose_matrix
In Mesa 4.0 the functions defined by these extensions are now available
without the "ARB" suffix. For example, glLoadTransposeMatrixf() is now
a standard API function. The new functions in OpenGL 1.3 and Mesa 4.0 are:
glActiveTexture
glClientActiveTexture
glCompressedTexImage1D
glCompressedTexImage2D
glCompressedTexImage3D
glCompressedTexSubImage1D
glCompressedTexSubImage2D
glCompressedTexSubImage3D
glGetCompressedTexImage
glLoadTransposeMatrixd
glLoadTransposeMatrixf
glMultiTexCoord1d
glMultiTexCoord1dv
glMultiTexCoord1f
glMultiTexCoord1fv
glMultiTexCoord1i
glMultiTexCoord1iv
glMultiTexCoord1s
glMultiTexCoord1sv
glMultiTexCoord2d
glMultiTexCoord2dv
glMultiTexCoord2f
glMultiTexCoord2fv
glMultiTexCoord2i
glMultiTexCoord2iv
glMultiTexCoord2s
glMultiTexCoord2sv
glMultiTexCoord3d
glMultiTexCoord3dv
glMultiTexCoord3f
glMultiTexCoord3fv
glMultiTexCoord3i
glMultiTexCoord3iv
glMultiTexCoord3s
glMultiTexCoord3sv
glMultiTexCoord4d
glMultiTexCoord4dv
glMultiTexCoord4f
glMultiTexCoord4fv
glMultiTexCoord4i
glMultiTexCoord4iv
glMultiTexCoord4s
glMultiTexCoord4sv
glMultTransposeMatrixd
glMultTransposeMatrixf
glSampleCoverage
glSamplePass
GLX 1.4 is the companion to OpenGL 1.3. The only new features in GLX 1.4
are support for multisampling and the GLX_ARB_get_proc_address extension.
glXGetProcAddress() is the only new function in GLX 1.4.
Multisample and Texture Compression
-----------------------------------
The OpenGL 1.3 specification allows the multisample and texture compression
features to essentially be no-ops. For example, if you query for multisample
support you'll find none, but the API functions work.
Similarly, texture compression is not implemented by any of the software
drivers but you can specify a generic compressed texture format (like
GL_COMPRESSED_RGBA) to glTexImage2D and it'll be accepted.
Device Drivers
--------------
Mesa advertises itself as either OpenGL 1.2 or OpenGL 1.3 depending on the
device driver. If the driver enables all the ARB extensions which are part
of OpenGL 1.3 then glGetString(GL_VERSION) will return "1.3". Otherwise,
it'll return "1.2".
A number of Mesa's software drivers haven't been actively maintained for
some time. We rely on volunteers to maintain many of the drivers.
Here's the current status of all included drivers:
Driver Status
---------------------- ---------------------
XMesa (Xlib) implements OpenGL 1.3
OSMesa (off-screen) implements OpenGL 1.3
FX (3dfx Voodoo1/2) implements OpenGL 1.3
SVGA implements OpenGL 1.3
Wind River UGL implements OpenGL 1.3
Windows/Win32 implements OpenGL 1.3
GGI needs updating
DOS/DJGPP needs updating
BeOS needs updating
Allegro needs updating
D3D needs updating
DOS needs updating
Special thanks go to Karl Schultz for updating the Windows driver.
The XFree86/DRI drivers have not yet been updated to use Mesa 4.0 as of
September 2001, but that should happen eventually.
Other Changes
-------------
See the VERSIONS file for more details about bug fixes, etc. in Mesa 4.0.
----------------------------------------------------------------------
$Id: RELNOTES-4.0,v 3.2 2001/10/17 14:59:21 brianp Exp $

22
docs/RELNOTES-4.0.1 Normal file
View File

@@ -0,0 +1,22 @@
Mesa 4.0.1 release notes
December 17, 2001
PLEASE READ!!!!
Introduction
------------
Mesa uses an even/odd version number scheme like the Linux kernel.
Odd numbered versions (such as 3.3) designate new developmental releases.
Even numbered versions (such as 3.4) designate stable releases.
Mesa 4.0.1 only contains bug fixes since version 4.0.
See the docs/VERSIONS file for the list of bug fixes.
----------------------------------------------------------------------
$Id: RELNOTES-4.0.1,v 1.2 2001/12/18 14:08:23 brianp Exp $

50
docs/RELNOTES-4.0.2 Normal file
View File

@@ -0,0 +1,50 @@
Mesa 4.0.2 release notes
March 25, 2002
PLEASE READ!!!!
Introduction
------------
Mesa uses an even/odd version number scheme like the Linux kernel.
Odd numbered versions (such as 3.3) designate new developmental releases.
Even numbered versions (such as 3.4) designate stable releases.
Mesa 4.0.2 only contains bug fixes and a new DOS driver since version 4.0.1.
See the docs/VERSIONS file for the list of bug fixes.
Device Drivers
--------------
Mesa advertises itself as either OpenGL 1.2 or OpenGL 1.3 depending on the
device driver. If the driver enables all the ARB extensions which are part
of OpenGL 1.3 then glGetString(GL_VERSION) will return "1.3". Otherwise,
it'll return "1.2".
A number of Mesa's software drivers haven't been actively maintained for
some time. We rely on volunteers to maintain many of the drivers.
Here's the current status of all included drivers:
Driver Status
---------------------- ---------------------
XMesa (Xlib) implements OpenGL 1.3
OSMesa (off-screen) implements OpenGL 1.3
FX (3dfx Voodoo1/2) implements OpenGL 1.3
SVGA implements OpenGL 1.3
Wind River UGL implements OpenGL 1.3
Windows/Win32 implements OpenGL 1.3
DOS/DJGPP implements OpenGL 1.3 (new in Mesa 4.0.2)
GGI needs updating
BeOS needs updating
Allegro needs updating
D3D needs updating
----------------------------------------------------------------------
$Id: RELNOTES-4.0.2,v 1.2 2002/03/23 02:38:39 brianp Exp $

52
docs/RELNOTES-4.0.3 Normal file
View File

@@ -0,0 +1,52 @@
Mesa 4.0.3 release notes
June 25, 2002
PLEASE READ!!!!
Introduction
------------
Mesa uses an even/odd version number scheme like the Linux kernel.
Odd numbered versions (such as 3.3) designate new developmental releases.
Even numbered versions (such as 3.4) designate stable releases.
Mesa 4.0.3 basically just contains bug fixes version 4.0.2.
See the docs/VERSIONS file for the list of bug fixes.
The GGI driver has been updated, thanks to Filip Spacek.
Device Drivers
--------------
Mesa advertises itself as either OpenGL 1.2 or OpenGL 1.3 depending on the
device driver. If the driver enables all the ARB extensions which are part
of OpenGL 1.3 then glGetString(GL_VERSION) will return "1.3". Otherwise,
it'll return "1.2".
A number of Mesa's software drivers haven't been actively maintained for
some time. We rely on volunteers to maintain many of the drivers.
Here's the current status of all included drivers:
Driver Status
---------------------- ---------------------
XMesa (Xlib) implements OpenGL 1.3
OSMesa (off-screen) implements OpenGL 1.3
FX (3dfx Voodoo1/2) implements OpenGL 1.3
SVGA implements OpenGL 1.3
Wind River UGL implements OpenGL 1.3
Windows/Win32 implements OpenGL 1.3
DOS/DJGPP implements OpenGL 1.3 (new in Mesa 4.0.2)
GGI implements OpenGL 1.3
BeOS needs updating
Allegro needs updating
D3D needs updating
----------------------------------------------------------------------
$Id: RELNOTES-4.0.3,v 1.2 2002/06/26 02:36:34 brianp Exp $

308
docs/RELNOTES-4.1 Normal file
View File

@@ -0,0 +1,308 @@
Mesa 4.1 release notes
October 29, 2002
PLEASE READ!!!!
Introduction
------------
Mesa uses an even/odd version number scheme like the Linux kernel.
Even numbered versions (such as 4.0) designate stable releases.
Odd numbered versions (such as 4.1) designate new developmental releases.
New Features in Mesa 4.1
------------------------
New extensions. Docs at http://oss.sgi.com/projects/ogl-sample/registry/
GL_NV_vertex_program
NVIDIA's vertex programming extension
GL_NV_vertex_program1_1
A few features built on top of GL_NV_vertex_program
GL_ARB_window_pos
This is the ARB-approved version of GL_MESA_window_pos
GL_ARB_depth_texture
This is the ARB-approved version of GL_SGIX_depth_texture.
It allows depth (Z buffer) data to be stored in textures.
This is used by GL_ARB_shadow
GL_ARB_shadow
Shadow mapping with depth textures.
This is the ARB-approved version of GL_SGIX_shadow.
GL_ARB_shadow_ambient
Allows one to specify the luminance of shadowed pixels.
This is the ARB-approved version of GL_SGIX_shadow_ambient.
GL_EXT_shadow_funcs
Extends the set of GL_ARB_shadow texture comparision functions to
include all eight of standard OpenGL dept-test functions.
GL_ARB_point_parameters
This is basically the same as GL_EXT_point_parameters.
GL_ARB_texture_env_crossbar
Allows any texture combine stage to reference any texture source unit.
GL_NV_point_sprite
For rendering points as textured quads. Useful for particle effects.
GL_NV_texture_rectangle (new in 4.0.4 actually)
Allows one to use textures with sizes that are not powers of two.
Note that mipmapping and several texture wrap modes are not allowed.
GL_EXT_multi_draw_arrays
Allows arrays of vertex arrays to be rendered with one call.
GL_EXT_stencil_two_side
Separate stencil modes for front and back-facing polygons.
GLX_SGIX_fbconfig & GLX_SGIX_pbuffer
Off-screen rendering support.
GL_ATI_texture_mirror_once
Adds two new texture wrap modes: GL_MIRROR_CLAMP_ATI and
GL_MIRROR_CLAMP_TO_EDGE_ATI.
Device Driver Status
--------------------
A number of Mesa's software drivers haven't been actively maintained for
some time. We rely on volunteers to maintain many of these drivers.
Here's the current status of all included drivers:
Driver Status
---------------------- ---------------------
XMesa (Xlib) implements OpenGL 1.3
OSMesa (off-screen) implements OpenGL 1.3
FX (3dfx Voodoo1/2) implements OpenGL 1.3
SVGA implements OpenGL 1.3
Wind River UGL implements OpenGL 1.3
Windows/Win32 implements OpenGL 1.3
DOS/DJGPP implements OpenGL 1.3
GGI implements OpenGL 1.3
BeOS needs updating (underway)
Allegro needs updating
D3D needs updating
DOS needs updating
New features in GLUT
--------------------
1. Frames per second printing
GLUT now looks for an environment variable called "GLUT_FPS". If it's
set, GLUT will print out a frames/second statistic to stderr when
glutSwapBuffers() is called. By default, frames/second is computed
and displayed once every 5 seconds. You can specify a different
interval (in milliseconds) when you set the env var. For example
'export GLUT_FPS=1000' or 'setenv GLUT_FPS 1000' will set the interval
to one second.
NOTE: the demo or application must call the glutInit() function for
this to work. Otherwise, the env var will be ignored.
Finally, this feature may not be reliable in multi-window programs.
2. glutGetProcAddress() function
The new function:
void *glutGetProcAddress(const char *procName)
is a wrapper for glXGetProcAddressARB() and wglGetProcAddress(). It
lets you dynamically get the address of an OpenGL function at runtime.
The GLUT_API_VERSION has been bumped to 5, but I haven't bumped the
GLUT version number from 3.7 since that's probably Mark Kilgard's role.
This function should probably also be able to return the address of
GLUT functions themselves, but it doesn't do that yet.
XXX Things To Do Yet XXXX
-------------------------
isosurf with vertex program exhibits some missing triangles (probably
when recycling the vertex buffer for long prims).
Porting Info
------------
If you're porting a DRI or other driver from Mesa 4.0.x to Mesa 4.1 here
are some things to change:
1. ctx->Texture._ReallyEnabled is obsolete.
Since there are now 5 texture targets (1D, 2D, 3D, cube and rect) that
left room for only 6 units (6*5 < 32) in this field.
This field is being replaced by ctx->Texture._EnabledUnits which has one
bit per texture unit. If the bit k of _EnabledUnits is set, that means
ctx->Texture.Unit[k]._ReallyEnabled is non-zero. You'll have to look at
ctx->Texture.Unit[k]._ReallyEnabled to learn if the 1D, 2D, 3D, cube or
rect texture is enabled for unit k.
This also means that the constants TEXTURE1_*, TEXTURE2_*, etc are
obsolete.
The tokens TEXTURE0_* have been replaced as well (since there's no
significance to the "0" part:
old token new token
TEXTURE0_1D TEXTURE_1D_BIT
TEXTURE0_2D TEXTURE_2D_BIT
TEXTURE0_3D TEXTURE_3D_BIT
TEXTURE0_CUBE TEXTURE_CUBE_BIT
<none> TEXTURE_RECT_BIT
These tokens are only used for the ctx->Texture.Unit[i].Enabled and
ctx->Texture.Unit[i]._ReallyEnabled fields. Exactly 0 or 1 bits will
be set in _ReallyEnabled at any time!
Q: "What's the purpose of Unit[i].Enabled vs Unit[i]._ReallyEnabled?"
A: The user can enable GL_TEXTURE_1D, GL_TEXTURE_2D, etc for any
texure unit all at once (an unusual thing to do).
OpenGL defines priorities that basically say GL_TEXTURE_2D has
higher priority than GL_TEXTURE_1D, etc. Also, just because a
texture target is enabled by the user doesn't mean we'll actually
use that texture! If a texture object is incomplete (missing mip-
map levels, etc) it's as if texturing is disabled for that target.
The _ReallyEnabled field will have a bit set ONLY if the texture
target is enabled and complete. This spares the driver writer from
examining a _lot_ of GL state to determine which texture target is
to be used.
2. Tnl tokens changes
During the implementation of GL_NV_vertex_program some of the vertex
buffer code was changed. Specifically, the VERT_* bits defined in
tnl/t_context.h have been renamed to better match the conventions of
GL_NV_vertex_program. The old names are still present but obsolete.
Drivers should use the newer names.
For example: VERT_RGBA is now VERT_BIT_COLOR0 and
VERT_SPEC_RGB is now VERT_BIT_COLOR1.
3. Read/Draw Buffer changes
The business of setting the current read/draw buffers in Mesa 4.0.x
was complicated. It's much simpler now in Mesa 4.1.
Here are the changes:
- Renamed ctx->Color.DrawDestMask to ctx->Color._DrawDestMask
- Removed ctx->Color.DriverDrawBuffer
- Removed ctx->Pixel.DriverReadBuffer
- Removed ctx->Color.MultiDrawBuffer
- Removed ctx->Driver.SetDrawBuffer()
- Removed swrast->Driver.SetReadBuffer().
- Added ctx->Color._DrawDestMask - a bitmask of FRONT/BACK_LEFT/RIGHT_BIT
values to indicate the current draw buffers.
- Added ctx->Pixel._ReadSrcMask to indicate the source for pixel reading.
The value is _one_ of the FRONT/BACK_LEFT/RIGHT_BIT values.
- Added ctx->Driver.DrawBuffer() and ctx->Driver.ReadBuffer().
These functions exactly correspond to glDrawBuffer and glReadBuffer calls.
Many drivers will set ctx->Driver.DrawBuffer = _swrast_DrawBuffer and
leave ctx->Draw.ReadBuffer NULL.
DRI drivers should implement their own function for ctx->Driver.DrawBuffer
and use it to set the current hardware drawing buffer. You'll probably
also want to check for GL_FRONT_AND_BACK mode and fall back to software.
Call _swrast_DrawBuffer() too, to update the swrast state.
- Added swrast->Driver.SetBuffer().
This function should be implemented by all device drivers that use swrast.
Mesa will call it to specify the buffer to use for span reading AND
writing and point/line/triangle rendering.
There should be no confusion between current read or draw buffer anymore.
- Added swrast->CurrentBuffer to indicate which color buffer to read/draw.
Will be FRONT_LEFT_BIT, BACK_LEFT_BIT, FRONT_RIGHT_BIT or BACK_RIGHT_BIT.
This value is usually passed to swrast->Driver.SetBuffer().
4. _mesa_create_context() changes. This function now takes a pointer to
a __GLimports object. The __GLimports structure contains function
pointers to system functions like fprintf(), malloc(), etc.
The _mesa_init_default_imports() function can be used to initialize
a __GLimports object. Most device drivers (like the DRI drivers)
should use this.
5. In tnl's struct vertex_buffer, the field "ProjectedClipCoords"
has been replaced by "NdcPtr" to better match the OpenGL spec's
terminology.
6. Since GL_EXT_stencil_two_side has been implemented, many of the
ctx->Stencil fields are now 2-element arrays. For example,
"GLenum Ref" is now "GLenum Ref[2]" The [0] elements are the front-face
values and the [1] elements are the back-face values.
ctx->Stencil.ActiveFace is 0 or 1 to indicate the current face for
the glStencilOp/Func/Mask() functions.
ctx->Stencil.TestTwoSide controls whether or not 1 or 2-sided stenciling
is enabled.
7. Removed ctx->Polygon._OffsetAny. Removed ctx->Polygon.OffsetMRD.
8. GLfloat / GLchan changes:
- Changed ctx->Driver.ClearColor() to take GLfloat[4] instead of GLchan[4].
ctx->Color.ClearColor is now GLfloat[4] too.
- Changed ctx->Driver.AlphaRef() to take GLfloat instead of GLchan.
- ctx->Color.AlphaRef is now GLfloat.
- texObj->BorderColor is now GLfloat[4]. texObj->_BorderChan is GLchan[4].
This is part of an effort to remove all GLchan types from core Mesa so
that someday we can support 8, 16 and 32-bit color channels dynamically
at runtime, instead of at compile-time.
9. GLboolean ctx->Tranform.ClipEnabled[MAX_CLIP_PLANES] has been replaced
by GLuint ctx->Transform.ClipPlanesEnabled. The later is a bitfield.
10. There's a new matrix_stack type in mtypes.h used for the Modelview,
Projection, Color and Texcoord matrix stacks.
11. The ctx->Current.* fields have changed a lot. Now, there's a
ctx->Current.Attrib[] array for all vertex attributes which matches
the NV vertex program conventions.
----------------------------------------------------------------------
$Id: RELNOTES-4.1,v 1.22 2002/10/29 15:06:37 brianp Exp $

85
docs/RELNOTES-5.0 Normal file
View File

@@ -0,0 +1,85 @@
Mesa 5.0 release notes
November 13, 2002
PLEASE READ!!!!
Introduction
------------
Mesa uses an even/odd version number scheme like the Linux kernel.
Even-numbered versions (such as 5.0) designate stable releases.
Odd-numbered versions (such as 4.1) designate new developmental releases.
Mesa 5.0 is basically just a stabilization of Mesa 4.1. To see a list of
bug fixes, etc. see the VERSIONS file.
New Features in Mesa 5.0
------------------------
Mesa 5.0 supports OpenGL 1.4. Note Mesa's versioning convention:
OpenGL Version Mesa Version
------------------------------
1.0 1.x
1.1 2.x
1.2 3.x
1.3 4.x
1.4 5.x
OpenGL 1.4 (and Mesa 5.0) incorporates the following OpenGL extensions as
standard features:
GL_ARB_depth_texture
GL_ARB_shadow
GL_ARB_texture_env_crossbar
GL_ARB_texture_mirror_repeat
GL_ARB_window_pos
GL_EXT_blend_color
GL_EXT_blend_func_separate
GL_EXT_blend_logic_op
GL_EXT_blend_minmax
GL_EXT_blend_subtract
GL_EXT_fog_coord
GL_EXT_multi_draw_arrays
GL_EXT_point_parameters
GL_EXT_secondary_color
GL_EXT_stencil_wrap
GL_SGIS_generate_mipmap
Device Driver Status
--------------------
A number of Mesa's software drivers haven't been actively maintained for
some time. We rely on volunteers to maintain many of these drivers.
Here's the current status of all included drivers:
Driver Status
---------------------- ---------------------
XMesa (Xlib) implements OpenGL 1.4
OSMesa (off-screen) implements OpenGL 1.4
FX (3dfx Voodoo1/2) implements OpenGL 1.3
SVGA implements OpenGL 1.3
Wind River UGL implements OpenGL 1.3
Windows/Win32 implements OpenGL 1.4
DOS/DJGPP implements OpenGL 1.3
GGI implements OpenGL 1.3
DOS implements OpenGL 1.4
BeOS needs updating (underway)
Allegro needs updating
D3D needs updating
Note: supporting OpenGL 1.4 (vs. 1.3 or 1.2) usually only requires that the
driver call the _mesa_enable_1_4_extensions() function.
----------------------------------------------------------------------
$Id: RELNOTES-5.0,v 3.2 2002/11/13 15:33:51 brianp Exp $

View File

@@ -1,4 +1,4 @@
$Id: VERSIONS,v 1.38 2000/07/21 15:41:59 brianp Exp $
$Id: VERSIONS,v 1.118 2002/11/13 15:33:50 brianp Exp $
Mesa Version History
@@ -746,3 +746,337 @@ Mesa Version History
- gl.h now uses #defines instead of C enums for all tokens
- glu.h now uses #defines instead of C enums for all tokens
- moved programs from 3Dfx/demos/ into demos/ directory
3.4 November 3, 2000
New:
- optimized glDrawPixels for glPixelZoom(1,-1)
Bug Fixes:
- widgets-mesa/src/*.c files were missing from 3.3 distro
- include/GL/mesa_wgl.h file was missing from 3.3 distro
- fixed some Win32 compile problems
- texture object priorities weren't getting initialized to 1.0
- glAreTexturesResident return value was wrong when using hardware
- glXUseXFont segfaulted when using 3dfx driver (via MESA_GLX_FX)
- glReadPixels with GLushort packed types was broken
- fixed a few bugs in the GL_EXT_texture_env_combine texture code
- glPush/PopAttrib(GL_ENABLE_BIT) mishandled multi-texture enables
- fixed some typos/bugs in the VB code
- glDrawPixels(GL_COLOR_INDEX) to RGB window didn't work
- optimized glDrawPixels paths weren't being used
- per-fragment fog calculation didn't work without a Z buffer
- improved blending accuracy, fixes Glean blendFunc test failures
- glPixelStore(GL_PACK/UNPACK_SKIP_IMAGES) wasn't handled correctly
- glXGetProcAddressARB() didn't always return the right address
- gluBuild[12]DMipmaps() didn't grok the GL_BGR pixel format
- texture matrix changes weren't always detected (GLUT projtex demo)
- fixed random color problem in vertex fog code
- fixed Glide-related bug that let Quake get a 24-bit Z buffer
Changes:
- finished internal support for compressed textures for DRI
3.4.1 February 14, 2001
New:
- fixed some Linux build problems
- fixed some Windows build problems
- GL_EXT_texture_env_dot3 extension (Gareth Hughes)
Bug fixes:
- added RENDER_START/RENDER_FINISH macros for glCopyTexImage in DRI
- various state-update code changes needed for DRI bugs
- disabled pixel transfer ops in glColorTable commands, not needed
- fixed bugs in glCopyConvolutionFilter1D/2D, glGetConvolutionFilter
- updated sources and fixed compile problems in widgets-mesa/
- GLX_PBUFFER enum value was wrong in glx.h
- fixed a glColorMaterial lighting bug
- fixed bad args to Read/WriteStencilSpan in h/w stencil clear function
- glXCopySubBufferMESA() Y position was off by one
- Error checking of glTexSubImage3D() was broken (bug 128775)
- glPopAttrib() didn't restore all derived Mesa state correctly
- Better glReadPixels accuracy for 16bpp color - fixes lots of OpenGL
conformance problems at 16bpp.
- clearing depth buffer with scissoring was broken, would segfault
- OSMesaGetDepthBuffer() returned bad bytesPerValue value
- fixed a line clipping bug (reported by Craig McDaniel)
- fixed RGB color over/underflow bug for very tiny triangles
Known problems:
- NURBS or evaluator surfaces inside display lists don't always work
3.4.2 May 17, 2001
Bug fixes:
- deleting the currently bound texture could cause bad problems
- using fog could result in random vertex alpha values
- AA triangle rendering could touch pixels outside right window bound
- fixed byteswapping problem in clear_32bit_ximage() function
- fixed bugs in wglUseFontBitmapsA(), by Frank Warmerdam
- fixed memory leak in glXUseXFont()
- fragment sampling in AA triangle function was off by 1/2 pixel
- Windows: reading pixels from framebuffer didn't always work
- glConvolutionFilter2D could segfault or cause FP exception
- fixed segfaults in FX and X drivers when using tex unit 1 but not 0
- GL_NAND logicop didn't work right in RGBA mode
- fixed a memory corruption bug in vertex buffer reset code
- clearing the softwara alpha buffer with scissoring was broken
- fixed a few color index mode fog bugs
- fixed some bad assertions in color index mode
- fixed FX line 'stipple' bug #420091
- fixed stencil buffer clear width/height typo
- fixed GL error glitches in gl[Client]ActiveTextureARB()
- fixed Windows compilation problem in texutil.c
- fixed 1/8-pixel AA triangle sampling error
Changes:
- optimized writing mono-colored pixel spans to X pixmaps
- increased max viewport size to 2048 x 2048
3.5 June 21, 2001
New:
- internals of Mesa divided into modular pieces (Keith Whitwell)
- 100% OpenGL 1.2 conformance (passes all conformance tests)
- new AA line algorithm
- GL_EXT_convolution extension
- GL_ARB_imaging subset
- OSMesaCreateContextExt() function
- GL_ARB_texture_env_add extension (same as GL_EXT_texture_env_add)
- GL_MAX_TEXTURE_UNITS_ARB now defaults to eight
- GL_EXT_fog_coord extension (Keith Whitwell)
- GL_EXT_secondary_color extension (Keith Whitwell)
- GL_ARB_texture_env_add extension (same as GL_EXT_texture_env_add)
- GL_SGIX_depth_texture extension
- GL_SGIX_shadow and GL_SGIX_shadow_ambient extensions
- demos/shadowtex.c demo of GL_SGIX_depth_texture and GL_SGIX_shadow
- GL_ARB_texture_env_combine extension
- GL_ARB_texture_env_dot3 extension
- GL_ARB_texture_border_clamp (aka GL_SGIS_texture_border_clamp)
- OSMesaCreateContextExt() function
- libOSMesa.so library, contains the OSMesa driver interface
- GL/glxext.h header file for GLX extensions
- somewhat faster software texturing, fogging, depth testing
- all color-index conformance tests now pass (only 8bpp tested)
- SPARC assembly language TCL optimizations (David Miller)
- GL_SGIS_generate_mipmap extension
Bug Fixes:
- fbiRev and tmuRev were unitialized when using Glide3
- fixed a few color index mode conformance failures; all pass now
- now appling antialiasing coverage to alpha after texturing
- colors weren't getting clamped to [0,1] before color table lookup
- fixed RISC alignment errors caused by COPY_4UBV macro
- drawing wide, flat-shaded lines could cause a segfault
- vertices now snapped to 1/16 pixel to fix rendering of tiny triangles
Changes:
- SGI's Sample Implementation (SI) 1.3 GLU library replaces Mesa GLU
- new libOSMesa.so library, contains the OSMesa driver interface
4.0 October 22, 2001
New:
- Mesa 4.0 implements the OpenGL 1.3 specification
- GL_IBM_rasterpos_clip extension
- GL_EXT_texture_edge_clamp extension (aka GL_SGIS_texture_edge_clamp)
- GL_ARB_texture_mirrored_repeat extension
- WindML UGL driver (Stephane Raimbault)
- added OSMESA_MAX_WIDTH/HEIGHT queries
- attempted compiliation fixes for Solaris 5, 7 and 8
- updated glext.h and glxext.h files
- updated Windows driver (Karl Schultz)
Bug fixes:
- added some missing GLX 1.3 tokens to include/GL/glx.h
- GL_COLOR_MATRIX changes weren't recognized by teximage functions
- glCopyPixels with scale and bias was broken
- glRasterPos with lighting could segfault
- glDeleteTextures could leave a dangling pointer
- Proxy textures for cube maps didn't work
- fixed a number of 16-bit color channel bugs
- fixed a few minor memory leaks
- GLX context sharing was broken in 3.5
- fixed state-update bugs in glPopClientAttrib()
- fixed glDrawRangeElements() bug
- fixed a glPush/PopAttrib() bug related to texture binding
- flat-shaded, textured lines were broken
- fixed a dangling pointer problem in the XMesa code (Chris Burghart)
- lighting didn't always produce the correct alpha value
- fixed 3DNow! code to not read past end of arrays (Andrew Lewycky)
4.0.1 December 17, 2001
New:
- better sub-pixel sample positions for AA triangles (Ray Tice)
- slightly faster blending for (GL_ZERO, GL_ONE) and (GL_ONE, GL_ZERO)
Bug fixes:
- added missing break statements in glGet*() for multisample cases
- fixed uninitialized hash table mutex bug (display lists / texobjs)
- fixed bad teximage error check conditional (bug 476846)
- fixed demos readtex.c compilation problem on Windows (Karl Schultz)
- added missing glGet() query for GL_MAX_TEXTURE_LOD_BIAS_EXT
- silence some compiler warnings (gcc 2.96)
- enable the #define GL_VERSION_1_3 in GL/gl.h
- added GL 1.3 and GLX 1.4 entries to gl_mangle.h and glx_mangle.h
- fixed glu.h typedef problem found with MSDev 6.0
- build libGL.so with -Bsymbolic (fixes bug found with Chromium)
- added missing 'const' to glXGetContextIDEXT() in glxext.h
- fixed a few glXGetProcAddress() errors (texture compression, etc)
- fixed start index bug in compiled vertex arrays (Keith)
- fixed compilation problems in src/SPARC/glapi_sparc.S
- fixed triangle strip "parity" bug found in VTK medical1 demo (Keith)
- use glXGetProcAddressARB in GLUT to avoid extension linking problems
- provoking vertex of flat-shaded, color-index triangles was wrong
- fixed a few display list bugs (GLUT walker, molecule, etc) (Keith)
- glTexParameter didn't flush the vertex buffer (Ray Tice)
- feedback attributes for glDraw/CopyPixels and glBitmap were wrong
- fixed bug in normal length caching (ParaView lighting bug)
- fixed separate_specular color bug found in Chimera (18 Dec 2001)
4.0.2 April 2, 2002
New:
- New DOS (DJGPP) driver written by Daniel Borca
- New driver interface functions for TCL drivers (such as Radeon DRI)
- GL_RENDERER string returns "Mesa Offscreen16" or "Mesa Offscreen32"
if using deep color channels
- latest GL/glext.h and GL/glxext.h headers from SGI
Bug fixes:
- GL_BLEND with non-black texture env color wasn't always correct
- GL_REPLACE with GL_RGB texture format wasn't always correct (alpha)
- glTexEnviv( pname != GL_TEXTURE_ENV_COLOR ) was broken
- glReadPixels was sometimes mistakenly clipped by the scissor box
- glDraw/ReadPixels didn't catch all the errors that they should have
- Fixed 24bpp rendering problem in Windows driver (Karl Schultz)
- 16-bit GLchan mode fixes (m_trans_tmp.h, s_triangle.c)
- Fixed 1-bit float->int conversion bug in glDrawPixels(GL_DEPTH_COMP)
- glColorMask as sometimes effecting glXSwapBuffers()
- fixed a potential bug in XMesaGarbageCollect()
- N threads rendering into one window didn't work reliably
- glCopyPixels didn't work for deep color channels
- improved 8 -> 16bit/channel texture image conversion (Gerk Huisma)
- glPopAttrib() didn't correctly restore user clip planes
- user clip planes failed for some perspective projections (Chromium)
Known bugs:
- mipmap LOD computation
4.0.3 June 25, 2002
New:
- updated GL/glext.h file (version 15)
- corrected MMX blend code (Jose Fonseca)
- support for software-based alpha planes in Windows driver
- updated GGI driver (Filip Spacek)
Bug fixes:
- glext.h had wrong values for GL_DOT3_RGB[A]_EXT tokens
- OSMesaMakeCurrent() didn't recognize buffer size changes
- assorted conformance fixes for 16-bit/channel rendering
- texcombine alpha subtraction mode was broken
- fixed lighting bug with non-uniform scaling and display lists
- fixed bug when deleting shared display lists
- disabled SPARC cliptest assembly code (Mesa bug 544665)
- fixed a couple Solaris compilation/link problems
- blending clipped glDrawPixels didn't always work
- glGetTexImage() didn't accept packed pixel types
- glPixelMapu[is]v() could explode given too large of pixelmap
- glGetTexParameter[if]v() didn't accept GL_TEXTURE_MAX_ANISOTROPY_EXT
- glXCopyContext() could lead to segfaults
- glCullFace(GL_FRONT_AND_BACK) didn't work (bug 572665)
Changes:
- lots of C++ (g++) code clean-ups
- lots of T&L updates for the Radeon DRI driver
Known bugs:
- mipmap LOD computation (fixed for Mesa 4.1)
4.0.4 October 3, 2002
New:
- GL_NV_texture_rectangle extension
- updated glext.h header (version 17)
- updated DOS driver (Daniel Borca)
- updated BeOS R5 driver (Philippe Houdoin)
- added GL_IBM_texture_mirror_repeat
- glxinfo now takes -l option to print interesting OpenGL limits info
- GL_MESA_ycbcr_texture extension
- GL_APPLE_client_storage extension (for some DRI drivers only)
- GL_MESA_pack_invert extension
Bug fixes:
- fixed GL_LINEAR fog bug by adding clamping
- fixed FP exceptions found using Alpha CPU
- 3dfx MESA_GLX_FX=window (render to window) didn't work
- fixed memory leak in wglCreateContest (Karl Schultz)
- define GLAPIENTRY and GLAPI if undefined in glu.h
- wglGetProcAddress didn't handle all API functions
- when testing for OpenGL 1.2 vs 1.3, check for GL_ARB_texture_cube_map
- removed GL_MAX_CONVOLUTION_WIDTH/HEIGHT from glGetInteger/Float/etc()
- error checking in compressed tex image functions had some glitches
- fixed AIX compile problem in src/config.c
- glGetTexImage was using pixel unpacking instead of packing params
- auto-mipmap generation for cube maps was incorrect
Changes:
- max texture units reduced to six to accomodate texture rectangles
- removed unfinished GL_MESA_sprite_point extension code
4.1 October 29, 2002
New:
- GL_NV_vertex_program extension
- GL_NV_vertex_program1_1 extension
- GL_ARB_window_pos extension
- GL_ARB_depth_texture extension
- GL_ARB_shadow extension
- GL_ARB_shadow_ambient extension
- GL_EXT_shadow_funcs extension
- GL_ARB_point_parameters extension
- GL_ARB_texture_env_crossbar
- GL_NV_point_sprite extension
- GL_NV_texture_rectangle extension
- GL_EXT_multi_draw_arrays extension
- GL_EXT_stencil_two_side extension
- GLX_SGIX_fbconfig and GLX_SGIX_pbuffer extensions
- GL_ATI_texture_mirror_once extension (Ian Romanick)
- massive overhaul/simplification of software rasterizer module,
many contributions from Klaus Niederkrueger
- faster software texturing in some cases (i.e. trilinear filtering)
- new OSMesaGetProcAddress() function
- more blend modes implemented with MMX code (Jose Fonseca)
- added glutGetProcAddress() to GLUT
- added GLUT_FPS env var to compute frames/second in glutSwapBuffers()
- pbinfo and pbdemo PBuffer programs
- glxinfo -v prints transprent pixel info (Gerd Sussner)
Bug fixes:
- better mipmap LOD computation (prevents excessive blurriness)
- OSMesaMakeCurrent() didn't recognize buffer size changes
- assorted conformance fixes for 16-bit/channel rendering
- texcombine alpha subtraction mode was broken
- fixed some blend problems when GLchan==GLfloat (Gerk Huisma)
- clamp colors to [0,inf] in OSMesa if GLchan==GLfloat (Gerk Huisma)
- fixed divide by zero error in NURBS tessellator (Jon Perry)
- fixed GL_LINEAR fog bug by adding clamping
- fixed FP exceptions found using Alpha CPU
- 3dfx/glide driver render-to-window feature was broken
- added missing GLX_TRANSPARENT_RGB token to glx.h
- fixed error checking related to paletted textures
- fixed reference count error in glDeleteTextures (Randy Fayan)
Changes:
- New spec file and Python code to generate some GL dispatch files
- Glide driver defaults to "no" with autoconf/automake
- updated demos/stex3d with new options
5.0 November 13, 2002
New:
- OpenGL 1.4 support (glGetString(GL_VERSION) returns "1.4")
- removed some overlooked debugging code
- glxinfo updated to support GLX_ARB_multisample
- GLUT now support GLX_ARB_multisample
- updated DOS driver (Daniel Borca)
Bug fixes:
- GL_POINT and GL_LINE-mode polygons didn't obey cull state
- fixed potential bug in _mesa_align_malloc/calloc()
- fixed missing triangle bug when running vertex programs
- fixed a few HPUX compilation problems
- FX (Glide) driver didn't compile
- setting GL_TEXTURE_BORDER_COLOR with glTexParameteriv() didn't work
- a few EXT functions, like glGenTexturesEXT, were no-ops
- a few OpenGL 1.4 functions like glFogCoord*, glBlendFuncSeparate,
glMultiDrawArrays and glMultiDrawElements were missing
- glGet*(GL_ACTIVE_STENCIL_FACE_EXT) was broken
- Pentium 4 Mobile was mistakenly identified as having 3DNow!
- fixed one-bit error in point/line fragment Z calculation
- fixed potential segfault in fakeglx code
- fixed color overflow problem in DOT3 texture env mode

90
docs/index.html Normal file
View File

@@ -0,0 +1,90 @@
<HTML>
<HEAD>
<TITLE>Index to Mesa Documentation</TITLE>
</HEAD>
<BODY>
<H1>Main Documentation</H1>
<UL>
<LI><A HREF="README">README</A> - general, top-level documentation
<LI><A HREF="INSTALL">INSTALL</A> - compilation/installation instructions
<LI><A HREF="VERSIONS">VERSIONS</A> - version history / change log
<LI><A HREF="COPYRIGHT">COPYRIGHT</A> - copyright and license information
<LI><A HREF="COPYING">COPYING</A> - some parts of Mesa are GPL'd
<LI><A HREF="CONFORM">CONFORM</A>
- results of running the OpenGL conformance tests
<LI><A HREF="DEVINFO">DEVINFO</A> - information for Mesa developers
<LI><A HREF="http://www.mesa3d.org/">www.mesa3d.org</A> - Mesa website
</UL>
<H1>Platform and Driver Information</H1>
<P>
Be warned, some of these files may be very out of date.
</P>
<UL>
<LI><A HREF="README.X11">README.X11</A> - X Window System / Unix / Linux
<LI><A HREF="README.WIN32">README.WIN32</A> - Microsoft Windows
<LI><A HREF="README.VMS">README.VMS</A> - DEC VMS
<LI><A HREF="README.GGI">README.GGI</A> - GGI
<LI><A HREF="README.3DFX">README.3DFX</A> - 3Dfx/Glide driver
<LI><A HREF="README.AMIWIN">README.AMIWIN</A> - Amiga Amiwin
<LI><A HREF="README.BEOS">README.BEOS</A> - BeOS
<LI><A HREF="README.D3D">README.D3D</A> - Direct3D driver
<LI><A HREF="README.DJ">README.DJ</A> - DJGPP
<LI><A HREF="README.LYNXOS">README.LYNXOS</A> - LynxOS
<LI><A HREF="README.MINGW32">README.MINGW32</A> - Mingw32
<LI><A HREF="README.NeXT">README.NeXT</A> - NeXT
<LI><A HREF="README.OpenStep">README.OpenStep</A> - OpenStep
<LI><A HREF="README.OS2">README.OS2</A> - OS/2
<LI><A HREF="README.WINDML">README.WINDML</A> - WindML
</UL>
<H1>Release Notes</H1>
<UL>
<LI><A HREF="RELNOTES-5.0">RELNOTES-5.0</A>
<LI><A HREF="RELNOTES-4.1">RELNOTES-4.1</A>
<LI><A HREF="RELNOTES-4.0.3">RELNOTES-4.0.3</A>
<LI><A HREF="RELNOTES-4.0.2">RELNOTES-4.0.2</A>
<LI><A HREF="RELNOTES-4.0.1">RELNOTES-4.0.1</A>
<LI><A HREF="RELNOTES-4.0">RELNOTES-4.0</A>
<LI><A HREF="RELNOTES-3.5">RELNOTES-3.5</A>
<LI><A HREF="RELNOTES-3.4.2">RELNOTES-3.4.2</A>
<LI><A HREF="RELNOTES-3.4.1">RELNOTES-3.4.1</A>
<LI><A HREF="RELNOTES-3.4">RELNOTES-3.4</A>
<LI><A HREF="RELNOTES-3.3">RELNOTES-3.3</A>
<LI><A HREF="RELNOTES-3.2.1">RELNOTES-3.2.1</A>
<LI><A HREF="RELNOTES-3.2">RELNOTES-3.2</A>
<LI><A HREF="RELNOTES-3.1">RELNOTES-3.1</A>
</UL>
<H1>Mesa Extension Specifications</H1>
<UL>
<LI><A HREF="MESA_agp_offset.spec">MESA_agp_offset.spec</A>
<LI><A HREF="MESA_copy_sub_buffer.spec">MESA_copy_sub_buffer.spec</A>
<LI><A HREF="MESA_packed_depth_stencil.spec">MESA_packed_depth_stencil.spec</A>
<LI><A HREF="MESA_pack_invert.spec">MESA_pack_invert.spec</A>
<LI><A HREF="MESA_pixmap_colormap.spec">MESA_pixmap_colormap.spec</A>
<LI><A HREF="MESA_release_buffers.spec">MESA_release_buffers.spec</A>
<LI><A HREF="MESA_resize_buffers.spec">MESA_resize_buffers.spec</A>
<LI><A HREF="MESA_set_3dfx_mode.spec">MESA_set_3dfx_mode.spec</A>
<LI><A HREF="MESA_sprite_point.spec">MESA_sprite_point.spec</A> (obsolete)
<LI><A HREF="MESA_trace.spec">MESA_trace.spec</A> (obsolete)
<LI><A HREF="MESA_window_pos.spec">MESA_window_pos.spec</A>
<LI><A HREF="MESA_ycbcr_texture.spec">MESA_ycbcr_texture.spec</A>
</UL>
<H1>Source Code Documentation</H1>
<P>
<A HREF="http://www.doxygen.org">Doxygen</A> is used to automatically
produce cross-referenced documentation from the Mesa sources.
This is not included in the normal Mesa distribution.
Download Mesa from CVS if interested.
</P>
<P>
<A HREF="../doxy/core/index.html">Source documentation</A>
</P>
</BODY>
</HTML>

9
doxygen/README Normal file
View File

@@ -0,0 +1,9 @@
This directory is for doxygen (a source code documentation system).
See http://www.doxygen.org/ for more info.
Either run 'make' (Unix) or 'doxy.bat' (Windows) to run doxygen
and generate souce code documentation.
Then, load doxy/core.index.html into your web browser.

183
doxygen/array_cache.doxy Normal file
View File

@@ -0,0 +1,183 @@
# Doxyfile 0.1
#---------------------------------------------------------------------------
# General configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = "Mesa array_cache"
PROJECT_NUMBER = 4.1
OUTPUT_DIRECTORY = .
OUTPUT_LANGUAGE = English
EXTRACT_ALL = YES
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = NO
EXTRACT_LOCAL_CLASSES = YES
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = NO
STRIP_FROM_PATH =
INTERNAL_DOCS = NO
STRIP_CODE_COMMENTS = YES
CASE_SENSE_NAMES = YES
SHORT_NAMES = NO
HIDE_SCOPE_NAMES = NO
VERBATIM_HEADERS = YES
SHOW_INCLUDE_FILES = YES
JAVADOC_AUTOBRIEF = NO
INHERIT_DOCS = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = NO
DISTRIBUTE_GROUP_DOC = NO
TAB_SIZE = 8
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
ALIASES =
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
OPTIMIZE_OUTPUT_FOR_C = YES
SHOW_USED_FILES = YES
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = YES
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_FORMAT =
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = ../src/array_cache/
FILE_PATTERNS = *.c \
*.h
RECURSIVE = NO
EXCLUDE =
EXCLUDE_PATTERNS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = NO
INLINE_SOURCES = NO
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = array_cache
HTML_HEADER = header.html
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT =
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT =
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT =
MAN_EXTENSION =
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to external references
#---------------------------------------------------------------------------
TAGFILES = core.tag=../core \
tnl.tag=../tnl \
swrast_setup.tag=../swrast_setup \
swrast.tag=../swrast \
math.tag=../math \
tnl_dd.tag=../tnl_dd
GENERATE_TAGFILE = array_cache.tag
ALLEXTERNALS = NO
PERL_PATH =
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
HAVE_DOT = NO
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
TEMPLATE_RELATIONS = YES
HIDE_UNDOC_RELATIONS = YES
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
GRAPHICAL_HIERARCHY = YES
DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO
CGI_NAME =
CGI_URL =
DOC_URL =
DOC_ABSPATH =
BIN_ABSPATH =
EXT_DOC_PATHS =

183
doxygen/core.doxy Normal file
View File

@@ -0,0 +1,183 @@
# Doxyfile 0.1
#---------------------------------------------------------------------------
# General configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = "Mesa Core"
PROJECT_NUMBER = 4.1
OUTPUT_DIRECTORY =
OUTPUT_LANGUAGE = English
EXTRACT_ALL = YES
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = NO
EXTRACT_LOCAL_CLASSES = YES
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = NO
STRIP_FROM_PATH =
INTERNAL_DOCS = NO
STRIP_CODE_COMMENTS = YES
CASE_SENSE_NAMES = YES
SHORT_NAMES = NO
HIDE_SCOPE_NAMES = NO
VERBATIM_HEADERS = YES
SHOW_INCLUDE_FILES = YES
JAVADOC_AUTOBRIEF = NO
INHERIT_DOCS = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = NO
DISTRIBUTE_GROUP_DOC = NO
TAB_SIZE = 8
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
ALIASES =
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
OPTIMIZE_OUTPUT_FOR_C = YES
SHOW_USED_FILES = YES
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = YES
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_FORMAT =
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = ../src/
FILE_PATTERNS = *.h *.c
RECURSIVE = NO
EXCLUDE = ../src/glapitemp.h ../src/glapioffsets.h
EXCLUDE_PATTERNS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = NO
INLINE_SOURCES = NO
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX = _
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = core
HTML_HEADER = header.html
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT =
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT =
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT =
MAN_EXTENSION =
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH = ../include/
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to external references
#---------------------------------------------------------------------------
TAGFILES = tnl_dd.tag=../tnl_dd \
array_cache.tag=../array_cache \
math.tag=../math \
swrast.tag=../swrast \
swrast_setup.tag=../swrast_setup \
tnl.tag=../tnl \
array_cache.tag=array_cache
GENERATE_TAGFILE = core.tag
ALLEXTERNALS = NO
PERL_PATH =
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = NO
HAVE_DOT = NO
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
TEMPLATE_RELATIONS = YES
HIDE_UNDOC_RELATIONS = YES
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
GRAPHICAL_HIERARCHY = YES
DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO
CGI_NAME =
CGI_URL =
DOC_URL =
DOC_ABSPATH =
BIN_ABSPATH =
EXT_DOC_PATHS =

14
doxygen/doxy.bat Normal file
View File

@@ -0,0 +1,14 @@
doxygen tnl_dd.doxy
doxygen array_cache.doxy
doxygen math.doxy
doxygen swrast.doxy
doxygen swrast_setup.doxy
doxygen tnl.doxy
doxygen core.doxy
echo Building again, to resolve tags
doxygen tnl_dd.doxy
doxygen array_cache.doxy
doxygen math.doxy
doxygen swrast.doxy
doxygen swrast_setup.doxy
doxygen tnl.doxy

12
doxygen/header.html Normal file
View File

@@ -0,0 +1,12 @@
<html><head><title>Mesa API docs</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head>
<body><center>
<a href="../array_cache/index.html">array_cache</a>&nbsp;
<a href="../core/index.html">core</a>&nbsp;
<a href="../math/index.html">math</a>&nbsp;
<a href="../swrast/index.html">swrast</a>&nbsp;
<a href="../swrast_setup/index.html">swrast_setup</a>&nbsp;
<a href="../tnl/index.html">tnl</a>&nbsp;
<a href="../tnl_dd/index.html">tnl_dd</a>&nbsp;
</center>

21
doxygen/makefile Normal file
View File

@@ -0,0 +1,21 @@
default:
doxygen tnl_dd.doxy
doxygen array_cache.doxy
doxygen math.doxy
doxygen swrast.doxy
doxygen swrast_setup.doxy
doxygen tnl.doxy
doxygen core.doxy
echo "Building again, to resolve tags"
doxygen tnl_dd.doxy
doxygen array_cache.doxy
doxygen math.doxy
doxygen swrast.doxy
doxygen swrast_setup.doxy
doxygen tnl.doxy
clean:
rm -rf array_cache core math swrast swrast_setup tnl_dd tnl
rm -rf *.tag

183
doxygen/math.doxy Normal file
View File

@@ -0,0 +1,183 @@
# Doxyfile 0.1
#---------------------------------------------------------------------------
# General configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = "Mesa math"
PROJECT_NUMBER = 4.1
OUTPUT_DIRECTORY = .
OUTPUT_LANGUAGE = English
EXTRACT_ALL = YES
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = NO
EXTRACT_LOCAL_CLASSES = YES
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = NO
STRIP_FROM_PATH =
INTERNAL_DOCS = NO
STRIP_CODE_COMMENTS = YES
CASE_SENSE_NAMES = YES
SHORT_NAMES = NO
HIDE_SCOPE_NAMES = NO
VERBATIM_HEADERS = YES
SHOW_INCLUDE_FILES = YES
JAVADOC_AUTOBRIEF = NO
INHERIT_DOCS = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = NO
DISTRIBUTE_GROUP_DOC = NO
TAB_SIZE = 8
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
ALIASES =
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
OPTIMIZE_OUTPUT_FOR_C = YES
SHOW_USED_FILES = YES
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = YES
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_FORMAT =
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = ../src/math/
FILE_PATTERNS = *.c \
*.h
RECURSIVE = NO
EXCLUDE =
EXCLUDE_PATTERNS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = NO
INLINE_SOURCES = NO
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = math
HTML_HEADER = header.html
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT =
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT =
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT =
MAN_EXTENSION =
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to external references
#---------------------------------------------------------------------------
TAGFILES = tnl_dd.tag=../tnl_dd \
core.tag=../core \
swrast.tag=../swrast \
swrast_setup.tag=../swrast_setup \
tnl.tag=../tnl \
array_cache.tag=../array_cache
GENERATE_TAGFILE = math.tag
ALLEXTERNALS = NO
PERL_PATH =
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
HAVE_DOT = NO
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
TEMPLATE_RELATIONS = YES
HIDE_UNDOC_RELATIONS = YES
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
GRAPHICAL_HIERARCHY = YES
DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO
CGI_NAME =
CGI_URL =
DOC_URL =
DOC_ABSPATH =
BIN_ABSPATH =
EXT_DOC_PATHS =

183
doxygen/swrast.doxy Normal file
View File

@@ -0,0 +1,183 @@
# Doxyfile 0.1
#---------------------------------------------------------------------------
# General configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = "Mesa swrast"
PROJECT_NUMBER = 4.1
OUTPUT_DIRECTORY =
OUTPUT_LANGUAGE = English
EXTRACT_ALL = NO
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = NO
EXTRACT_LOCAL_CLASSES = YES
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = NO
STRIP_FROM_PATH =
INTERNAL_DOCS = NO
STRIP_CODE_COMMENTS = YES
CASE_SENSE_NAMES = YES
SHORT_NAMES = NO
HIDE_SCOPE_NAMES = NO
VERBATIM_HEADERS = YES
SHOW_INCLUDE_FILES = YES
JAVADOC_AUTOBRIEF = NO
INHERIT_DOCS = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = NO
DISTRIBUTE_GROUP_DOC = NO
TAB_SIZE = 8
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
ALIASES =
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
OPTIMIZE_OUTPUT_FOR_C = NO
SHOW_USED_FILES = YES
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = YES
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_FORMAT =
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = ../src/swrast/
FILE_PATTERNS = *.c \
*.h
RECURSIVE = NO
EXCLUDE =
EXCLUDE_PATTERNS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = NO
INLINE_SOURCES = NO
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = swrast
HTML_HEADER = header.html
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT =
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT =
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT =
MAN_EXTENSION =
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to external references
#---------------------------------------------------------------------------
TAGFILES = core.tag=../core \
math.tag=../math \
tnl_dd.tag=../tnl_dd \
swrast_setup.tag=../swrast_setup \
tnl.tag=../tnl \
array_cache.tag=array_cache
GENERATE_TAGFILE = swrast.tag
ALLEXTERNALS = NO
PERL_PATH =
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
HAVE_DOT = NO
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
TEMPLATE_RELATIONS = YES
HIDE_UNDOC_RELATIONS = YES
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
GRAPHICAL_HIERARCHY = YES
DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO
CGI_NAME =
CGI_URL =
DOC_URL =
DOC_ABSPATH =
BIN_ABSPATH =
EXT_DOC_PATHS =

183
doxygen/swrast_setup.doxy Normal file
View File

@@ -0,0 +1,183 @@
# Doxyfile 0.1
#---------------------------------------------------------------------------
# General configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = "Mesa swrast_setup"
PROJECT_NUMBER = 4.1
OUTPUT_DIRECTORY =
OUTPUT_LANGUAGE = English
EXTRACT_ALL = YES
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = NO
EXTRACT_LOCAL_CLASSES = YES
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = NO
STRIP_FROM_PATH =
INTERNAL_DOCS = NO
STRIP_CODE_COMMENTS = YES
CASE_SENSE_NAMES = YES
SHORT_NAMES = NO
HIDE_SCOPE_NAMES = NO
VERBATIM_HEADERS = YES
SHOW_INCLUDE_FILES = YES
JAVADOC_AUTOBRIEF = NO
INHERIT_DOCS = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = NO
DISTRIBUTE_GROUP_DOC = NO
TAB_SIZE = 8
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
ALIASES =
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
OPTIMIZE_OUTPUT_FOR_C = YES
SHOW_USED_FILES = YES
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = YES
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_FORMAT =
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = ../src/swrast_setup/
FILE_PATTERNS = *.c \
*.h
RECURSIVE = NO
EXCLUDE =
EXCLUDE_PATTERNS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = NO
INLINE_SOURCES = NO
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = swrast_setup
HTML_HEADER = header.html
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT =
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT =
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT =
MAN_EXTENSION =
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to external references
#---------------------------------------------------------------------------
TAGFILES = tnl_dd.tag=../tnl_dd \
core.tag=../core \
math.tag=../math \
swrast.tag=../swrast \
tnl.tag=../tnl \
array_cache.tag=../array_cache
GENERATE_TAGFILE = swrast_setup.tag
ALLEXTERNALS = YES
PERL_PATH =
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
HAVE_DOT = NO
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
TEMPLATE_RELATIONS = YES
HIDE_UNDOC_RELATIONS = YES
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
GRAPHICAL_HIERARCHY = YES
DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO
CGI_NAME =
CGI_URL =
DOC_URL =
DOC_ABSPATH =
BIN_ABSPATH =
EXT_DOC_PATHS =

183
doxygen/tnl.doxy Normal file
View File

@@ -0,0 +1,183 @@
# Doxyfile 0.1
#---------------------------------------------------------------------------
# General configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = "Mesa tnl"
PROJECT_NUMBER = 4.1
OUTPUT_DIRECTORY =
OUTPUT_LANGUAGE = English
EXTRACT_ALL = YES
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = NO
EXTRACT_LOCAL_CLASSES = YES
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = NO
STRIP_FROM_PATH =
INTERNAL_DOCS = NO
STRIP_CODE_COMMENTS = YES
CASE_SENSE_NAMES = YES
SHORT_NAMES = NO
HIDE_SCOPE_NAMES = NO
VERBATIM_HEADERS = YES
SHOW_INCLUDE_FILES = YES
JAVADOC_AUTOBRIEF = NO
INHERIT_DOCS = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = NO
DISTRIBUTE_GROUP_DOC = NO
TAB_SIZE = 8
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
ALIASES =
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
OPTIMIZE_OUTPUT_FOR_C = YES
SHOW_USED_FILES = YES
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = YES
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_FORMAT =
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = ../src/tnl/
FILE_PATTERNS = *.c \
*.h
RECURSIVE = NO
EXCLUDE =
EXCLUDE_PATTERNS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = NO
INLINE_SOURCES = NO
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = tnl
HTML_HEADER = header.html
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT =
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT =
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT =
MAN_EXTENSION =
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to external references
#---------------------------------------------------------------------------
TAGFILES = tnl_dd.tag=../tnl \
core.tag=../core \
math.tag=../math \
swrast.tag=../swrast \
swrast_setup.tag=swrast_setup \
array_cache.tag=array_cache
GENERATE_TAGFILE = tnl.tag
ALLEXTERNALS = YES
PERL_PATH =
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
HAVE_DOT = NO
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
TEMPLATE_RELATIONS = YES
HIDE_UNDOC_RELATIONS = YES
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
GRAPHICAL_HIERARCHY = YES
DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO
CGI_NAME =
CGI_URL =
DOC_URL =
DOC_ABSPATH =
BIN_ABSPATH =
EXT_DOC_PATHS =

182
doxygen/tnl_dd.doxy Normal file
View File

@@ -0,0 +1,182 @@
# Doxyfile 0.1
#---------------------------------------------------------------------------
# General configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = "Mesa tnl_dd"
PROJECT_NUMBER = 4.1
OUTPUT_DIRECTORY =
OUTPUT_LANGUAGE = English
EXTRACT_ALL = YES
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = NO
EXTRACT_LOCAL_CLASSES = YES
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = NO
STRIP_FROM_PATH =
INTERNAL_DOCS = NO
STRIP_CODE_COMMENTS = YES
CASE_SENSE_NAMES = YES
SHORT_NAMES = NO
HIDE_SCOPE_NAMES = NO
VERBATIM_HEADERS = YES
SHOW_INCLUDE_FILES = YES
JAVADOC_AUTOBRIEF = NO
INHERIT_DOCS = YES
INLINE_INFO = NO
SORT_MEMBER_DOCS = NO
DISTRIBUTE_GROUP_DOC = NO
TAB_SIZE = 8
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
ALIASES =
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
OPTIMIZE_OUTPUT_FOR_C = YES
SHOW_USED_FILES = YES
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = YES
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_FORMAT =
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = ../src/tnl_dd/
FILE_PATTERNS = *.h
RECURSIVE = YES
EXCLUDE =
EXCLUDE_PATTERNS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = NO
INLINE_SOURCES = NO
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = tnl_dd
HTML_HEADER = header.html
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT =
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT =
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT =
MAN_EXTENSION =
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to external references
#---------------------------------------------------------------------------
TAGFILES = core.tag=../core \
math.tag=../math \
swrast.tag=../swrast \
swrast_setup.tag=../swrast_setup \
tnl.tag=../tnl \
array_cache.tag=array_cache
GENERATE_TAGFILE = tnl_dd.tag
ALLEXTERNALS = NO
PERL_PATH =
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
HAVE_DOT = NO
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
TEMPLATE_RELATIONS = YES
HIDE_UNDOC_RELATIONS = YES
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
GRAPHICAL_HIERARCHY = YES
DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO
CGI_NAME =
CGI_URL =
DOC_URL =
DOC_ABSPATH =
BIN_ABSPATH =
EXT_DOC_PATHS =

View File

@@ -2,33 +2,42 @@
GLincludedir = $(includedir)/GL
if HAVE_FX
INC_FX = fxmesa.h
INC_GGI = ggimesa.h
INC_OSMESA = osmesa.h
INC_SVGA = svgamesa.h
INC_X11 = glx.h glxext.h glx_mangle.h xmesa.h xmesa_x.h xmesa_xf86.h
INC_GLUT = glut.h glutf90.h
if HAVE_FX
sel_inc_fx = $(INC_FX)
endif
if HAVE_GGI
INC_GGI = ggimesa.h
sel_inc_ggi = $(INC_GGI)
endif
if HAVE_OSMESA
INC_OSMESA = osmesa.h
sel_inc_osmesa = $(INC_OSMESA)
endif
if HAVE_SVGA
INC_SVGA = svgamesa.h
sel_inc_svga = $(INC_SVGA)
endif
if HAVE_X11
INC_X11 = glx.h glx_mangle.h xmesa.h xmesa_x.h xmesa_xf86.h
sel_inc_x11 = $(INC_X11)
endif
if NEED_GLUT
INC_GLUT = glut.h
sel_inc_glut = $(INC_GLUT)
endif
EXTRA_DIST = fxmesa.h ggimesa.h osmesa.h svgamesa.h \
glx.h glx_mangle.h xmesa.h xmesa_x.h xmesa_xf86.h
GLinclude_HEADERS = gl.h gl_mangle.h glu.h glu_mangle.h \
EXTRA_HEADERS = amesa.h dosmesa.h foomesa.h glut_h.dja mesa_wgl.h mglmesa.h \
vms_x_fix.h wmesa.h \
$(INC_FX) $(INC_GGI) $(INC_OSMESA) $(INC_SVGA) $(INC_X11) $(INC_GLUT)
GLinclude_HEADERS = gl.h glext.h gl_mangle.h glu.h glu_mangle.h \
$(sel_inc_fx) $(sel_inc_ggi) $(sel_inc_osmesa) $(sel_inc_svga) \
$(sel_inc_x11) $(sel_inc_glut)
include $(top_srcdir)/common_rules.make

79
include/GL/dmesa.h Normal file
View File

@@ -0,0 +1,79 @@
/*
* Mesa 3-D graphics library
* Version: 5.0
*
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/*
* DOS/DJGPP device driver v1.2 for Mesa 4.1
*
* Copyright (C) 2002 - Borca Daniel
* Email : dborca@yahoo.com
* Web : http://www.geocities.com/dborca
*/
#ifndef DMESA_H_included
#define DMESA_H_included
#define DMESA_MAJOR_VERSION 5
#define DMESA_MINOR_VERSION 0
typedef struct dmesa_context *DMesaContext;
typedef struct dmesa_visual *DMesaVisual;
typedef struct dmesa_buffer *DMesaBuffer;
#ifdef __cplusplus
extern "C" {
#endif
DMesaVisual DMesaCreateVisual (GLint width, GLint height,
GLint colDepth,
GLboolean dbFlag,
GLint depthSize,
GLint stencilSize,
GLint accumSize);
void DMesaDestroyVisual (DMesaVisual v);
DMesaBuffer DMesaCreateBuffer (DMesaVisual visual,
GLint xpos, GLint ypos,
GLint width, GLint height);
void DMesaDestroyBuffer (DMesaBuffer b);
DMesaContext DMesaCreateContext (DMesaVisual visual, DMesaContext share);
void DMesaDestroyContext (DMesaContext c);
GLboolean DMesaViewport (DMesaBuffer b,
GLint xpos, GLint ypos,
GLint width, GLint height);
GLboolean DMesaMakeCurrent (DMesaContext c, DMesaBuffer b);
void DMesaSwapBuffers (DMesaBuffer b);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -1,9 +1,9 @@
/* $Id: fxmesa.h,v 1.2 1999/11/24 18:44:53 brianp Exp $ */
/* $Id: fxmesa.h,v 1.4 2001/09/23 16:06:13 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
* Copyright (C) 1995-1999 Brian Paul
* Version: 4.0
* Copyright (C) 1995-2001 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -40,8 +40,8 @@ extern "C" {
#endif
#define FXMESA_MAJOR_VERSION 3
#define FXMESA_MINOR_VERSION 3
#define FXMESA_MAJOR_VERSION 4
#define FXMESA_MINOR_VERSION 0
/*

View File

@@ -1,10 +1,11 @@
/* $Id: ggimesa.h,v 1.3 2000/02/09 19:03:28 brianp Exp $ */
/* $Id: ggimesa.h,v 1.4 2002/06/10 15:16:44 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
* Mesa 3-D graphics library GGI bindings (GGIGL [giggle])
* Version: 4.0
* Copyright (C) 1995-2000 Brian Paul
* Copyright (C) 1998 Uwe Maurer
* Copyrigth (C) 2001 Filip Spacek
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -25,34 +26,59 @@
#ifndef GGIMESA_H
#define GGIMESA_H
#define GGIMESA_MAJOR_VERSION 3
#define GGIMESA_MINOR_VERSION 3
#define GGIMESA_MAJOR_VERSION 4
#define GGIMESA_MINOR_VERSION 0
#ifdef __cplusplus
extern "C" {
#endif
#include "GL/gl.h"
typedef struct ggi_mesa_context *GGIMesaContext;
#include <ggi/ggi.h>
#include "GL/gl.h"
typedef struct ggi_mesa_context *ggi_mesa_context_t;
extern GGIMesaContext GGIMesaCreateContext(void);
/*
* Initialize Mesa GGI extension
*/
int ggiMesaInit(void);
/*
* Clean up Mesa GGI exension
*/
int ggiMesaExit(void);
extern void GGIMesaDestroyContext(GGIMesaContext ctx);
/*
* Attach Mesa GGI extension to the visual 'vis'
*/
int ggiMesaAttach(ggi_visual_t vis);
/*
* Detach Mesa GGI extension from the visual 'vis'
*/
int ggiMesaDetach(ggi_visual_t vis);
extern void GGIMesaMakeCurrent(GGIMesaContext ctx);
int ggiMesaExtendVisual(ggi_visual_t vis, GLboolean alpha_flag,
GLboolean stereo_flag, GLint depth_size,
GLint stencil_size, GLint accum_red_size,
GLint accum_green_size, GLint accum_blue_size,
GLint accum_alpha_size, GLint num_samples);
extern GGIMesaContext GGIMesaGetCurrentContext(void);
/*
* Create a new context capable of displaying on the visual vis.
*/
ggi_mesa_context_t ggiMesaCreateContext(ggi_visual_t vis);
/*
* Destroy the context 'ctx'
*/
void ggiMesaDestroyContext(ggi_mesa_context_t ctx);
extern void GGIMesaSwapBuffers(void);
/*
* Make context 'ctx' the current context and bind it to visual 'vis'.
* Note that the context must have been created with respect to that visual.
*/
void ggiMesaMakeCurrent(ggi_mesa_context_t ctx, ggi_visual_t vis);
void ggiMesaSwapBuffers(void);
extern int GGIMesaSetVisual(GGIMesaContext ctx, ggi_visual_t vis,
GLboolean rgb_flag, GLboolean db_flag);
#ifdef __cplusplus
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,534 +1,335 @@
/* $Id: glu.h,v 1.22 2000/07/11 14:11:44 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
* Copyright (C) 1995-2000 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef GLU_H
#define GLU_H
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
** Software License B, Version 1.1 (the "License"), the contents of this
** file are subject only to the provisions of the License. You may not use
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
**
** http://oss.sgi.com/projects/FreeB
**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
**
** Additional Notice Provisions: This software was created using the
** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
** not been independently verified as being compliant with the OpenGL(R)
** version 1.2.1 Specification.
*/
#ifndef __glu_h__
#define __glu_h__
#if defined(USE_MGL_NAMESPACE)
#include "glu_mangle.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#include <GL/gl.h>
/* to facilitate clean DLL building ... */
#if !defined(OPENSTEP) && (defined(__WIN32__) || defined(__CYGWIN__))
# if defined(_MSC_VER) && defined(BUILD_GLU32) /* tag specify we're building mesa as a DLL */
# define GLUAPI __declspec(dllexport)
# elif defined(_MSC_VER) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
# define GLUAPI __declspec(dllimport)
# else /* for use with static link lib build of Win32 edition only */
# define GLUAPI extern
# endif /* _STATIC_MESA support */
# define GLCALLBACK __stdcall
# define GLCALLBACKP __stdcall *
#else
# define GLUAPI extern
# define GLCALLBACK
# define GLCALLBACKP *
#endif /* WIN32 / CYGWIN bracket */
/* compatability guard so we don't need to change client code */
#if defined(_WIN32) && !defined(_WINDEF_) && !defined(_GNU_H_WINDOWS32_BASE) && !defined(OPENSTEP)
# define CALLBACK GLCALLBACK
#endif
#ifdef macintosh
#pragma enumsalwaysint on
#if PRAGMA_IMPORT_SUPPORTED
#pragma import on
#endif
#endif
#ifndef GLUAPI
#define GLUAPI
#endif
#ifndef GLAPIENTRY
#define GLAPIENTRY
#endif
#ifndef GLCALLBACK
#define GLCALLBACK
#ifndef GLAPI
#define GLAPI
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define GLU_VERSION_1_1 1
/*************************************************************/
/* Extensions */
#define GLU_EXT_object_space_tess 1
#define GLU_EXT_nurbs_tessellator 1
/* Boolean */
#define GLU_FALSE 0
#define GLU_TRUE 1
/* Version */
#define GLU_VERSION_1_1 1
#define GLU_VERSION_1_2 1
#define GLU_VERSION_1_3 1
/* StringName */
#define GLU_VERSION 100800
#define GLU_EXTENSIONS 100801
/* ErrorCode */
#define GLU_INVALID_ENUM 100900
#define GLU_INVALID_VALUE 100901
#define GLU_OUT_OF_MEMORY 100902
#define GLU_INVALID_OPERATION 100904
/* NurbsDisplay */
/* GLU_FILL */
#define GLU_OUTLINE_POLYGON 100240
#define GLU_OUTLINE_PATCH 100241
/* NurbsCallback */
#define GLU_NURBS_ERROR 100103
#define GLU_ERROR 100103
#define GLU_NURBS_BEGIN 100164
#define GLU_NURBS_BEGIN_EXT 100164
#define GLU_NURBS_VERTEX 100165
#define GLU_NURBS_VERTEX_EXT 100165
#define GLU_NURBS_NORMAL 100166
#define GLU_NURBS_NORMAL_EXT 100166
#define GLU_NURBS_COLOR 100167
#define GLU_NURBS_COLOR_EXT 100167
#define GLU_NURBS_TEXTURE_COORD 100168
#define GLU_NURBS_TEX_COORD_EXT 100168
#define GLU_NURBS_END 100169
#define GLU_NURBS_END_EXT 100169
#define GLU_NURBS_BEGIN_DATA 100170
#define GLU_NURBS_BEGIN_DATA_EXT 100170
#define GLU_NURBS_VERTEX_DATA 100171
#define GLU_NURBS_VERTEX_DATA_EXT 100171
#define GLU_NURBS_NORMAL_DATA 100172
#define GLU_NURBS_NORMAL_DATA_EXT 100172
#define GLU_NURBS_COLOR_DATA 100173
#define GLU_NURBS_COLOR_DATA_EXT 100173
#define GLU_NURBS_TEXTURE_COORD_DATA 100174
#define GLU_NURBS_TEX_COORD_DATA_EXT 100174
#define GLU_NURBS_END_DATA 100175
#define GLU_NURBS_END_DATA_EXT 100175
/* NurbsError */
#define GLU_NURBS_ERROR1 100251
#define GLU_NURBS_ERROR2 100252
#define GLU_NURBS_ERROR3 100253
#define GLU_NURBS_ERROR4 100254
#define GLU_NURBS_ERROR5 100255
#define GLU_NURBS_ERROR6 100256
#define GLU_NURBS_ERROR7 100257
#define GLU_NURBS_ERROR8 100258
#define GLU_NURBS_ERROR9 100259
#define GLU_NURBS_ERROR10 100260
#define GLU_NURBS_ERROR11 100261
#define GLU_NURBS_ERROR12 100262
#define GLU_NURBS_ERROR13 100263
#define GLU_NURBS_ERROR14 100264
#define GLU_NURBS_ERROR15 100265
#define GLU_NURBS_ERROR16 100266
#define GLU_NURBS_ERROR17 100267
#define GLU_NURBS_ERROR18 100268
#define GLU_NURBS_ERROR19 100269
#define GLU_NURBS_ERROR20 100270
#define GLU_NURBS_ERROR21 100271
#define GLU_NURBS_ERROR22 100272
#define GLU_NURBS_ERROR23 100273
#define GLU_NURBS_ERROR24 100274
#define GLU_NURBS_ERROR25 100275
#define GLU_NURBS_ERROR26 100276
#define GLU_NURBS_ERROR27 100277
#define GLU_NURBS_ERROR28 100278
#define GLU_NURBS_ERROR29 100279
#define GLU_NURBS_ERROR30 100280
#define GLU_NURBS_ERROR31 100281
#define GLU_NURBS_ERROR32 100282
#define GLU_NURBS_ERROR33 100283
#define GLU_NURBS_ERROR34 100284
#define GLU_NURBS_ERROR35 100285
#define GLU_NURBS_ERROR36 100286
#define GLU_NURBS_ERROR37 100287
/* NurbsProperty */
#define GLU_AUTO_LOAD_MATRIX 100200
#define GLU_CULLING 100201
#define GLU_SAMPLING_TOLERANCE 100203
#define GLU_DISPLAY_MODE 100204
#define GLU_PARAMETRIC_TOLERANCE 100202
#define GLU_SAMPLING_METHOD 100205
#define GLU_U_STEP 100206
#define GLU_V_STEP 100207
#define GLU_NURBS_MODE 100160
#define GLU_NURBS_MODE_EXT 100160
#define GLU_NURBS_TESSELLATOR 100161
#define GLU_NURBS_TESSELLATOR_EXT 100161
#define GLU_NURBS_RENDERER 100162
#define GLU_NURBS_RENDERER_EXT 100162
/* NurbsSampling */
#define GLU_OBJECT_PARAMETRIC_ERROR 100208
#define GLU_OBJECT_PARAMETRIC_ERROR_EXT 100208
#define GLU_OBJECT_PATH_LENGTH 100209
#define GLU_OBJECT_PATH_LENGTH_EXT 100209
#define GLU_PATH_LENGTH 100215
#define GLU_PARAMETRIC_ERROR 100216
#define GLU_DOMAIN_DISTANCE 100217
/* NurbsTrim */
#define GLU_MAP1_TRIM_2 100210
#define GLU_MAP1_TRIM_3 100211
/* QuadricDrawStyle */
#define GLU_POINT 100010
#define GLU_LINE 100011
#define GLU_FILL 100012
#define GLU_SILHOUETTE 100013
/* QuadricCallback */
/* GLU_ERROR */
/* QuadricNormal */
#define GLU_SMOOTH 100000
#define GLU_FLAT 100001
#define GLU_NONE 100002
/* QuadricOrientation */
#define GLU_OUTSIDE 100020
#define GLU_INSIDE 100021
/* TessCallback */
#define GLU_TESS_BEGIN 100100
#define GLU_BEGIN 100100
#define GLU_TESS_VERTEX 100101
#define GLU_VERTEX 100101
#define GLU_TESS_END 100102
#define GLU_END 100102
#define GLU_TESS_ERROR 100103
#define GLU_TESS_EDGE_FLAG 100104
#define GLU_EDGE_FLAG 100104
#define GLU_TESS_COMBINE 100105
#define GLU_TESS_BEGIN_DATA 100106
#define GLU_TESS_VERTEX_DATA 100107
#define GLU_TESS_END_DATA 100108
#define GLU_TESS_ERROR_DATA 100109
#define GLU_TESS_EDGE_FLAG_DATA 100110
#define GLU_TESS_COMBINE_DATA 100111
/* TessContour */
#define GLU_CW 100120
#define GLU_CCW 100121
#define GLU_INTERIOR 100122
#define GLU_EXTERIOR 100123
#define GLU_UNKNOWN 100124
/* TessProperty */
#define GLU_TESS_WINDING_RULE 100140
#define GLU_TESS_BOUNDARY_ONLY 100141
#define GLU_TESS_TOLERANCE 100142
/* TessError */
#define GLU_TESS_ERROR1 100151
#define GLU_TESS_ERROR2 100152
#define GLU_TESS_ERROR3 100153
#define GLU_TESS_ERROR4 100154
#define GLU_TESS_ERROR5 100155
#define GLU_TESS_ERROR6 100156
#define GLU_TESS_ERROR7 100157
#define GLU_TESS_ERROR8 100158
#define GLU_TESS_MISSING_BEGIN_POLYGON 100151
#define GLU_TESS_MISSING_BEGIN_CONTOUR 100152
#define GLU_TESS_MISSING_END_POLYGON 100153
#define GLU_TESS_MISSING_END_CONTOUR 100154
#define GLU_TESS_COORD_TOO_LARGE 100155
#define GLU_TESS_NEED_COMBINE_CALLBACK 100156
/* TessWinding */
#define GLU_TESS_WINDING_ODD 100130
#define GLU_TESS_WINDING_NONZERO 100131
#define GLU_TESS_WINDING_POSITIVE 100132
#define GLU_TESS_WINDING_NEGATIVE 100133
#define GLU_TESS_WINDING_ABS_GEQ_TWO 100134
/*************************************************************/
#define GLU_TRUE 1
#define GLU_FALSE 0
/* Normal vectors */
#define GLU_SMOOTH 100000
#define GLU_FLAT 100001
#define GLU_NONE 100002
/* Quadric draw styles */
#define GLU_POINT 100010
#define GLU_LINE 100011
#define GLU_FILL 100012
#define GLU_SILHOUETTE 100013
/* Quadric orientation */
#define GLU_OUTSIDE 100020
#define GLU_INSIDE 100021
/* Tessellator */
#define GLU_TESS_BEGIN 100100
#define GLU_TESS_VERTEX 100101
#define GLU_TESS_END 100102
#define GLU_TESS_ERROR 100103
#define GLU_TESS_EDGE_FLAG 100104
#define GLU_TESS_COMBINE 100105
#define GLU_TESS_BEGIN_DATA 100106
#define GLU_TESS_VERTEX_DATA 100107
#define GLU_TESS_END_DATA 100108
#define GLU_TESS_ERROR_DATA 100109
#define GLU_TESS_EDGE_FLAG_DATA 100110
#define GLU_TESS_COMBINE_DATA 100111
/* Winding rules */
#define GLU_TESS_WINDING_ODD 100130
#define GLU_TESS_WINDING_NONZERO 100131
#define GLU_TESS_WINDING_POSITIVE 100132
#define GLU_TESS_WINDING_NEGATIVE 100133
#define GLU_TESS_WINDING_ABS_GEQ_TWO 100134
/* Tessellation properties */
#define GLU_TESS_WINDING_RULE 100140
#define GLU_TESS_BOUNDARY_ONLY 100141
#define GLU_TESS_TOLERANCE 100142
/* Tessellation errors */
#define GLU_TESS_ERROR1 100151 /* Missing gluBeginPolygon */
#define GLU_TESS_ERROR2 100152 /* Missing gluBeginContour */
#define GLU_TESS_ERROR3 100153 /* Missing gluEndPolygon */
#define GLU_TESS_ERROR4 100154 /* Missing gluEndContour */
#define GLU_TESS_ERROR5 100155 /* */
#define GLU_TESS_ERROR6 100156 /* */
#define GLU_TESS_ERROR7 100157 /* */
#define GLU_TESS_ERROR8 100158 /* */
/* NURBS */
#define GLU_AUTO_LOAD_MATRIX 100200
#define GLU_CULLING 100201
#define GLU_PARAMETRIC_TOLERANCE 100202
#define GLU_SAMPLING_TOLERANCE 100203
#define GLU_DISPLAY_MODE 100204
#define GLU_SAMPLING_METHOD 100205
#define GLU_U_STEP 100206
#define GLU_V_STEP 100207
#define GLU_PATH_LENGTH 100215
#define GLU_PARAMETRIC_ERROR 100216
#define GLU_DOMAIN_DISTANCE 100217
#define GLU_MAP1_TRIM_2 100210
#define GLU_MAP1_TRIM_3 100211
#define GLU_OUTLINE_POLYGON 100240
#define GLU_OUTLINE_PATCH 100241
#define GLU_NURBS_ERROR1 100251 /* spline order un-supported */
#define GLU_NURBS_ERROR2 100252 /* too few knots */
#define GLU_NURBS_ERROR3 100253 /* valid knot range is empty */
#define GLU_NURBS_ERROR4 100254 /* decreasing knot sequence */
#define GLU_NURBS_ERROR5 100255 /* knot multiplicity > spline order */
#define GLU_NURBS_ERROR6 100256 /* endcurve() must follow bgncurve() */
#define GLU_NURBS_ERROR7 100257 /* bgncurve() must precede endcurve() */
#define GLU_NURBS_ERROR8 100258 /* ctrlarray or knot vector is NULL */
#define GLU_NURBS_ERROR9 100259 /* can't draw pwlcurves */
#define GLU_NURBS_ERROR10 100260 /* missing gluNurbsCurve() */
#define GLU_NURBS_ERROR11 100261 /* missing gluNurbsSurface() */
#define GLU_NURBS_ERROR12 100262 /* endtrim() must precede endsurface() */
#define GLU_NURBS_ERROR13 100263 /* bgnsurface() must precede endsurface() */
#define GLU_NURBS_ERROR14 100264 /* curve of improper type passed as trim curve */
#define GLU_NURBS_ERROR15 100265 /* bgnsurface() must precede bgntrim() */
#define GLU_NURBS_ERROR16 100266 /* endtrim() must follow bgntrim() */
#define GLU_NURBS_ERROR17 100267 /* bgntrim() must precede endtrim()*/
#define GLU_NURBS_ERROR18 100268 /* invalid or missing trim curve*/
#define GLU_NURBS_ERROR19 100269 /* bgntrim() must precede pwlcurve() */
#define GLU_NURBS_ERROR20 100270 /* pwlcurve referenced twice*/
#define GLU_NURBS_ERROR21 100271 /* pwlcurve and nurbscurve mixed */
#define GLU_NURBS_ERROR22 100272 /* improper usage of trim data type */
#define GLU_NURBS_ERROR23 100273 /* nurbscurve referenced twice */
#define GLU_NURBS_ERROR24 100274 /* nurbscurve and pwlcurve mixed */
#define GLU_NURBS_ERROR25 100275 /* nurbssurface referenced twice */
#define GLU_NURBS_ERROR26 100276 /* invalid property */
#define GLU_NURBS_ERROR27 100277 /* endsurface() must follow bgnsurface() */
#define GLU_NURBS_ERROR28 100278 /* intersecting or misoriented trim curves */
#define GLU_NURBS_ERROR29 100279 /* intersecting trim curves */
#define GLU_NURBS_ERROR30 100280 /* UNUSED */
#define GLU_NURBS_ERROR31 100281 /* unconnected trim curves */
#define GLU_NURBS_ERROR32 100282 /* unknown knot error */
#define GLU_NURBS_ERROR33 100283 /* negative vertex count encountered */
#define GLU_NURBS_ERROR34 100284 /* negative byte-stride */
#define GLU_NURBS_ERROR35 100285 /* unknown type descriptor */
#define GLU_NURBS_ERROR36 100286 /* null control point reference */
#define GLU_NURBS_ERROR37 100287 /* duplicate point on pwlcurve */
/* GLU 1.3 and later */
#define GLU_NURBS_MODE ?
/* Errors */
#define GLU_INVALID_ENUM 100900
#define GLU_INVALID_VALUE 100901
#define GLU_OUT_OF_MEMORY 100902
#define GLU_INCOMPATIBLE_GL_VERSION 100903
/* GLU 1.1 and later */
#define GLU_VERSION 100800
#define GLU_EXTENSIONS 100801
/*** GLU 1.0 tessellation ***/
/* Contour types */
#define GLU_CW 100120
#define GLU_CCW 100121
#define GLU_INTERIOR 100122
#define GLU_EXTERIOR 100123
#define GLU_UNKNOWN 100124
/* Tessellator */
#define GLU_BEGIN GLU_TESS_BEGIN
#define GLU_VERTEX GLU_TESS_VERTEX
#define GLU_END GLU_TESS_END
#define GLU_ERROR GLU_TESS_ERROR
#define GLU_EDGE_FLAG GLU_TESS_EDGE_FLAG
#if defined(__BEOS__)
/* The BeOS does something funky and makes these typedefs in one
* of its system headers.
*/
#ifdef __cplusplus
class GLUnurbs;
class GLUquadric;
class GLUtesselator;
#else
#if defined GLU_VERSION_1_2
typedef struct GLUquadric GLUquadricObj;
typedef struct GLUnurbs GLUnurbsObj;
/* FIXME: We need to implement the other 1.3 typedefs - GH */
typedef struct GLUtesselator GLUtesselator;
typedef GLUtesselator GLUtriangulatorObj;
#else
/* GLU 1.1 and older */
typedef struct GLUquadric GLUquadricObj;
typedef struct GLUtriangulatorObj GLUtriangulatorObj;
typedef struct GLUnurbs GLUnurbsObj;
#endif
#endif
#if defined(__BEOS__) || defined(__QUICKDRAW__)
#pragma export on
#endif
/*
*
* Miscellaneous functions
*
*/
GLUAPI void GLAPIENTRY gluLookAt( GLdouble eyex, GLdouble eyey, GLdouble eyez,
GLdouble centerx, GLdouble centery,
GLdouble centerz,
GLdouble upx, GLdouble upy, GLdouble upz );
GLUAPI void GLAPIENTRY gluOrtho2D( GLdouble left, GLdouble right,
GLdouble bottom, GLdouble top );
GLUAPI void GLAPIENTRY gluPerspective( GLdouble fovy, GLdouble aspect,
GLdouble zNear, GLdouble zFar );
GLUAPI void GLAPIENTRY gluPickMatrix( GLdouble x, GLdouble y,
GLdouble width, GLdouble height,
const GLint viewport[4] );
GLUAPI GLint GLAPIENTRY gluProject( GLdouble objx, GLdouble objy, GLdouble objz,
const GLdouble modelMatrix[16],
const GLdouble projMatrix[16],
const GLint viewport[4],
GLdouble *winx, GLdouble *winy,
GLdouble *winz );
GLUAPI GLint GLAPIENTRY gluUnProject( GLdouble winx, GLdouble winy,
GLdouble winz,
const GLdouble modelMatrix[16],
const GLdouble projMatrix[16],
const GLint viewport[4],
GLdouble *objx, GLdouble *objy,
GLdouble *objz );
GLUAPI const GLubyte* GLAPIENTRY gluErrorString( GLenum errorCode );
/*
*
* Mipmapping and image scaling
*
*/
GLUAPI GLint GLAPIENTRY gluScaleImage( GLenum format,
GLsizei widthin, GLsizei heightin,
GLenum typein, const void *datain,
GLsizei widthout, GLsizei heightout,
GLenum typeout, void *dataout );
GLUAPI GLint GLAPIENTRY gluBuild1DMipmaps( GLenum target, GLint components,
GLsizei width, GLenum format,
GLenum type, const void *data );
GLUAPI GLint GLAPIENTRY gluBuild2DMipmaps( GLenum target, GLint components,
GLsizei width, GLsizei height,
GLenum format,
GLenum type, const void *data );
/*
*
* Quadrics
*
*/
GLUAPI GLUquadricObj* GLAPIENTRY gluNewQuadric( void );
GLUAPI void GLAPIENTRY gluDeleteQuadric( GLUquadricObj *state );
GLUAPI void GLAPIENTRY gluQuadricDrawStyle( GLUquadricObj *quadObject,
GLenum drawStyle );
GLUAPI void GLAPIENTRY gluQuadricOrientation( GLUquadricObj *quadObject,
GLenum orientation );
GLUAPI void GLAPIENTRY gluQuadricNormals( GLUquadricObj *quadObject,
GLenum normals );
GLUAPI void GLAPIENTRY gluQuadricTexture( GLUquadricObj *quadObject,
GLboolean textureCoords );
GLUAPI void GLAPIENTRY gluQuadricCallback( GLUquadricObj *qobj,
GLenum which,
void (GLCALLBACK *fn)() );
GLUAPI void GLAPIENTRY gluCylinder( GLUquadricObj *qobj,
GLdouble baseRadius,
GLdouble topRadius,
GLdouble height,
GLint slices, GLint stacks );
GLUAPI void GLAPIENTRY gluSphere( GLUquadricObj *qobj,
GLdouble radius,
GLint slices, GLint stacks );
GLUAPI void GLAPIENTRY gluDisk( GLUquadricObj *qobj,
GLdouble innerRadius, GLdouble outerRadius,
GLint slices, GLint loops );
GLUAPI void GLAPIENTRY gluPartialDisk( GLUquadricObj *qobj,
GLdouble innerRadius,
GLdouble outerRadius, GLint slices,
GLint loops, GLdouble startAngle,
GLdouble sweepAngle );
/*
*
* Nurbs
*
*/
GLUAPI GLUnurbsObj* GLAPIENTRY gluNewNurbsRenderer( void );
GLUAPI void GLAPIENTRY gluDeleteNurbsRenderer( GLUnurbsObj *nobj );
GLUAPI void GLAPIENTRY gluLoadSamplingMatrices( GLUnurbsObj *nobj,
const GLfloat modelMatrix[16],
const GLfloat projMatrix[16],
const GLint viewport[4] );
GLUAPI void GLAPIENTRY gluNurbsProperty( GLUnurbsObj *nobj, GLenum property,
GLfloat value );
GLUAPI void GLAPIENTRY gluGetNurbsProperty( GLUnurbsObj *nobj, GLenum property,
GLfloat *value );
GLUAPI void GLAPIENTRY gluBeginCurve( GLUnurbsObj *nobj );
GLUAPI void GLAPIENTRY gluEndCurve( GLUnurbsObj * nobj );
GLUAPI void GLAPIENTRY gluNurbsCurve( GLUnurbsObj *nobj, GLint nknots,
GLfloat *knot, GLint stride,
GLfloat *ctlarray, GLint order,
GLenum type );
GLUAPI void GLAPIENTRY gluBeginSurface( GLUnurbsObj *nobj );
GLUAPI void GLAPIENTRY gluEndSurface( GLUnurbsObj * nobj );
GLUAPI void GLAPIENTRY gluNurbsSurface( GLUnurbsObj *nobj,
GLint sknot_count, GLfloat *sknot,
GLint tknot_count, GLfloat *tknot,
GLint s_stride, GLint t_stride,
GLfloat *ctlarray,
GLint sorder, GLint torder,
GLenum type );
GLUAPI void GLAPIENTRY gluBeginTrim( GLUnurbsObj *nobj );
GLUAPI void GLAPIENTRY gluEndTrim( GLUnurbsObj *nobj );
GLUAPI void GLAPIENTRY gluPwlCurve( GLUnurbsObj *nobj, GLint count,
GLfloat *array,
GLint stride, GLenum type );
GLUAPI void GLAPIENTRY gluNurbsCallback( GLUnurbsObj *nobj, GLenum which,
void (GLCALLBACK *fn)() );
/*
*
* Polygon tessellation
*
*/
#ifdef GLU_VERSION_1_2
GLUAPI GLUtesselator* GLAPIENTRY gluNewTess( void );
GLUAPI void GLAPIENTRY gluDeleteTess( GLUtesselator *tobj );
GLUAPI void GLAPIENTRY gluTessBeginPolygon( GLUtesselator *tobj,
void *polygon_data );
GLUAPI void GLAPIENTRY gluTessBeginContour( GLUtesselator *tobj );
GLUAPI void GLAPIENTRY gluTessVertex( GLUtesselator *tobj, GLdouble coords[3],
void *vertex_data );
GLUAPI void GLAPIENTRY gluTessEndContour( GLUtesselator *tobj );
GLUAPI void GLAPIENTRY gluTessEndPolygon( GLUtesselator *tobj );
GLUAPI void GLAPIENTRY gluTessProperty( GLUtesselator *tobj, GLenum which,
GLdouble value );
GLUAPI void GLAPIENTRY gluTessNormal( GLUtesselator *tobj, GLdouble x,
GLdouble y, GLdouble z );
GLUAPI void GLAPIENTRY gluTessCallback( GLUtesselator *tobj, GLenum which,
void (GLCALLBACK *fn)() );
GLUAPI void GLAPIENTRY gluGetTessProperty( GLUtesselator *tobj, GLenum which,
GLdouble *value );
#else
GLUAPI GLUtriangulatorObj* GLAPIENTRY gluNewTess( void );
GLUAPI void GLAPIENTRY gluTessCallback( GLUtriangulatorObj *tobj, GLenum which,
void (GLCALLBACK *fn)() );
GLUAPI void GLAPIENTRY gluDeleteTess( GLUtriangulatorObj *tobj );
GLUAPI void GLAPIENTRY gluBeginPolygon( GLUtriangulatorObj *tobj );
GLUAPI void GLAPIENTRY gluEndPolygon( GLUtriangulatorObj *tobj );
GLUAPI void GLAPIENTRY gluNextContour( GLUtriangulatorObj *tobj, GLenum type );
GLUAPI void GLAPIENTRY gluTessVertex( GLUtriangulatorObj *tobj, GLdouble v[3],
void *data );
#endif
/*
*
* New functions in GLU 1.1
*
*/
GLUAPI const GLubyte* GLAPIENTRY gluGetString( GLenum name );
/*
*
* GLU 1.3 functions
*
*/
#ifdef GLU_VERSION_1_3
GLUAPI GLboolean GLAPIENTRY
gluCheckExtension( const char *extName, const GLubyte *extString );
#endif
#if defined(__BEOS__) || defined(__QUICKDRAW__)
#pragma export off
#endif
#ifdef macintosh
#pragma enumsalwaysint reset
#if PRAGMA_IMPORT_SUPPORTED
#pragma import off
#endif
typedef struct GLUnurbs GLUnurbs;
typedef struct GLUquadric GLUquadric;
typedef struct GLUtesselator GLUtesselator;
#endif
typedef GLUnurbs GLUnurbsObj;
typedef GLUquadric GLUquadricObj;
typedef GLUtesselator GLUtesselatorObj;
typedef GLUtesselator GLUtriangulatorObj;
#define GLU_TESS_MAX_COORD 1.0e150
/* Internal convenience typedefs */
typedef void (GLAPIENTRY *_GLUfuncptr)();
GLAPI void GLAPIENTRY gluBeginCurve (GLUnurbs* nurb);
GLAPI void GLAPIENTRY gluBeginPolygon (GLUtesselator* tess);
GLAPI void GLAPIENTRY gluBeginSurface (GLUnurbs* nurb);
GLAPI void GLAPIENTRY gluBeginTrim (GLUnurbs* nurb);
GLAPI GLint GLAPIENTRY gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
GLAPI GLint GLAPIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data);
GLAPI GLint GLAPIENTRY gluBuild2DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
GLAPI GLint GLAPIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data);
GLAPI GLint GLAPIENTRY gluBuild3DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
GLAPI GLint GLAPIENTRY gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
GLAPI GLboolean GLAPIENTRY gluCheckExtension (const GLubyte *extName, const GLubyte *extString);
GLAPI void GLAPIENTRY gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
GLAPI void GLAPIENTRY gluDeleteNurbsRenderer (GLUnurbs* nurb);
GLAPI void GLAPIENTRY gluDeleteQuadric (GLUquadric* quad);
GLAPI void GLAPIENTRY gluDeleteTess (GLUtesselator* tess);
GLAPI void GLAPIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
GLAPI void GLAPIENTRY gluEndCurve (GLUnurbs* nurb);
GLAPI void GLAPIENTRY gluEndPolygon (GLUtesselator* tess);
GLAPI void GLAPIENTRY gluEndSurface (GLUnurbs* nurb);
GLAPI void GLAPIENTRY gluEndTrim (GLUnurbs* nurb);
GLAPI const GLubyte * GLAPIENTRY gluErrorString (GLenum error);
GLAPI void GLAPIENTRY gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data);
GLAPI const GLubyte * GLAPIENTRY gluGetString (GLenum name);
GLAPI void GLAPIENTRY gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data);
GLAPI void GLAPIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
GLAPI void GLAPIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
GLAPI GLUnurbs* GLAPIENTRY gluNewNurbsRenderer (void);
GLAPI GLUquadric* GLAPIENTRY gluNewQuadric (void);
GLAPI GLUtesselator* GLAPIENTRY gluNewTess (void);
GLAPI void GLAPIENTRY gluNextContour (GLUtesselator* tess, GLenum type);
GLAPI void GLAPIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
GLAPI void GLAPIENTRY gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData);
GLAPI void GLAPIENTRY gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData);
GLAPI void GLAPIENTRY gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
GLAPI void GLAPIENTRY gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value);
GLAPI void GLAPIENTRY gluNurbsSurface (GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, GLint tStride, GLfloat* control, GLint sOrder, GLint tOrder, GLenum type);
GLAPI void GLAPIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
GLAPI void GLAPIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
GLAPI void GLAPIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
GLAPI void GLAPIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
GLAPI GLint GLAPIENTRY gluProject (GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ);
GLAPI void GLAPIENTRY gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
GLAPI void GLAPIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
GLAPI void GLAPIENTRY gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
GLAPI void GLAPIENTRY gluQuadricNormals (GLUquadric* quad, GLenum normal);
GLAPI void GLAPIENTRY gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
GLAPI void GLAPIENTRY gluQuadricTexture (GLUquadric* quad, GLboolean texture);
GLAPI GLint GLAPIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
GLAPI void GLAPIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
GLAPI void GLAPIENTRY gluTessBeginContour (GLUtesselator* tess);
GLAPI void GLAPIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
GLAPI void GLAPIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
GLAPI void GLAPIENTRY gluTessEndContour (GLUtesselator* tess);
GLAPI void GLAPIENTRY gluTessEndPolygon (GLUtesselator* tess);
GLAPI void GLAPIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
GLAPI void GLAPIENTRY gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
GLAPI void GLAPIENTRY gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
GLAPI GLint GLAPIENTRY gluUnProject (GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ);
GLAPI GLint GLAPIENTRY gluUnProject4 (GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble nearVal, GLdouble farVal, GLdouble* objX, GLdouble* objY, GLdouble* objZ, GLdouble* objW);
#ifdef __cplusplus
}
#endif
#endif
#endif /* __glu_h__ */

View File

@@ -1,4 +1,4 @@
/* $Id: glu_mangle.h,v 1.2 1999/09/10 02:08:19 gareth Exp $ */
/* $Id: glu_mangle.h,v 1.3 2001/09/20 22:18:47 kschultz Exp $ */
/*
* Mesa 3-D graphics library
@@ -23,6 +23,9 @@
/*
* $Log: glu_mangle.h,v $
* Revision 1.3 2001/09/20 22:18:47 kschultz
* add mangling for new entry points
*
* Revision 1.2 1999/09/10 02:08:19 gareth
* Added GLU 1.3 tessellation (except winding rule code).
*
@@ -92,5 +95,11 @@
#define gluNextContour mgluNextContour
#define gluEndPolygon mgluEndPolygon
#define gluGetString mgluGetString
#define gluBuild1DMipmapLevels mgluBuild1DMipmapLevels
#define gluBuild2DMipmapLevels mgluBuild2DMipmapLevels
#define gluBuild3DMipmapLevels mgluBuild3DMipmapLevels
#define gluBuild3DMipmaps mgluBuild3DMipmaps
#define gluCheckExtension mgluCheckExtension
#define gluUnProject4 mgluUnProject4
#endif

View File

@@ -223,9 +223,11 @@ WGLAPI int GLAPIENTRY SetPixelFormat(HDC,int,const PIXELFORMATDESCRIPTOR *);
video resize subAPI, glutPostWindowRedisplay, glutKeyboardUpFunc,
glutSpecialUpFunc, glutIgnoreKeyRepeat, glutSetKeyRepeat,
glutJoystickFunc, glutForceJoystickFunc (NOT FINALIZED!).
GLUT_API_VERSION=5 glutGetProcAddress (added by BrianP)
**/
#ifndef GLUT_API_VERSION /* allow this to be overriden */
#define GLUT_API_VERSION 3
#define GLUT_API_VERSION 5
#endif
/**
@@ -661,6 +663,9 @@ GLUTAPI int GLUTAPIENTRY glutExtensionSupported(const char *name);
GLUTAPI int GLUTAPIENTRY glutGetModifiers(void);
GLUTAPI int GLUTAPIENTRY glutLayerGet(GLenum type);
#endif
#if (GLUT_API_VERSION >= 5)
GLUTAPI void * GLUTAPIENTRY glutGetProcAddress(const char *procName);
#endif
/* GLUT font sub-API */
GLUTAPI void GLUTAPIENTRY glutBitmapCharacter(void *font, int character);

View File

@@ -3,8 +3,8 @@
/* Copyright (c) Mark J. Kilgard & Willam F. Mitchell, 1998. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
/* This header provides the binding interface for William Mitchell's
@@ -75,7 +75,7 @@ typedef void (GLUTCALLBACK *GLUTmenuStatusFCB) (int *, int *, int *);
typedef void (GLUTCALLBACK *GLUTidleFCB) (void);
/* Functions that set and return Fortran callback functions. */
extern void* GLUTAPIENTRY __glutGetFCB(int which);
extern void GLUTAPIENTRY __glutSetFCB(int which, void *func);
GLUTAPI void* APIENTRY __glutGetFCB(int which);
GLUTAPI void APIENTRY __glutSetFCB(int which, void *func);
#endif /* __glutf90_h__ */

View File

@@ -1,10 +1,10 @@
/* $Id: glx.h,v 1.22 2000/06/23 17:39:18 brianp Exp $ */
/* $Id: glx.h,v 1.38 2002/10/14 13:52:27 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
* Version: 4.1
*
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -30,6 +30,7 @@
#ifdef __VMS
#include <GL/vms_x_fix.h>
# ifdef __cplusplus
/* VMS Xlib.h gives problems with C++.
* this avoids a bunch of trivial warnings */
@@ -43,11 +44,11 @@
#pragma message enable nosimpint
#endif
#endif
#include "GL/gl.h"
#include <GL/gl.h>
#if defined(USE_MGL_NAMESPACE)
#include "glx_mangle.h"
#include <GL/glx_mangle.h>
#endif
@@ -59,6 +60,7 @@ extern "C" {
#define GLX_VERSION_1_1 1
#define GLX_VERSION_1_2 1
#define GLX_VERSION_1_3 1
#define GLX_VERSION_1_4 1
#define GLX_EXTENSION_NAME "GLX"
@@ -124,7 +126,10 @@ extern "C" {
#define GLX_MAX_PBUFFER_HEIGHT 0x8017
#define GLX_MAX_PBUFFER_PIXELS 0x8018
#define GLX_PRESERVED_CONTENTS 0x801B
#define GLX_LARGEST_BUFFER 0x801C
#define GLX_LARGEST_PBUFFER 0x801C
#define GLX_WIDTH 0x801D
#define GLX_HEIGHT 0x801E
#define GLX_EVENT_MASK 0x801F
#define GLX_DRAWABLE_TYPE 0x8010
#define GLX_FBCONFIG_ID 0x8013
#define GLX_VISUAL_ID 0x800B
@@ -136,7 +141,6 @@ extern "C" {
#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
#define GLX_AUX_BUFFERS_BIT 0x00000010
#define GLX_DEPTH_BUFFER_BIT 0x00000020
#define GLX_STENCIL_BUFFER_BIT 0x00000040
#define GLX_ACCUM_BUFFER_BIT 0x00000080
@@ -150,23 +154,35 @@ extern "C" {
#define GLX_STATIC_COLOR 0x8005
#define GLX_GRAY_SCALE 0x8006
#define GLX_STATIC_GRAY 0x8007
#define GLX_TRANSPARENT_RGB 0x8008
#define GLX_TRANSPARENT_INDEX 0x8009
#define GLX_RGBA_TYPE 0x8014
#define GLX_COLOR_INDEX_TYPE 0x8015
#define GLX_COLOR_INDEX_BIT 0x00000002
#define GLX_RGBA_BIT 0x00000001
#define GLX_SCREEN 0x800C
#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
#define GLX_DAMAGED 0x8020
#define GLX_SAVED 0x8021
#define GLX_WINDOW 0x8022
#define GLX_PBUFFER 0x8033
#define GLX_PBUFFER 0x8023
#define GLX_PBUFFER_HEIGHT 0x8040
#define GLX_PBUFFER_WIDTH 0x8041
/*
* GLX 1.4 and later:
*/
#define GLX_SAMPLE_BUFFERS 0x186a0 /*100000*/
#define GLX_SAMPLES 0x186a1 /*100001*/
typedef void * GLXContext;
typedef struct __GLXcontextRec *GLXContext;
typedef XID GLXPixmap;
typedef XID GLXDrawable;
/* GLX 1.3 and later */
typedef void * GLXFBConfig;
typedef struct __GLXFBConfigRec *GLXFBConfig;
typedef XID GLXFBConfigID;
typedef XID GLXContextID;
typedef XID GLXWindow;
@@ -278,12 +294,15 @@ extern void glXGetSelectedEvent( Display *dpy, GLXDrawable drawable,
unsigned long *mask );
/* GLX 1.4 and later */
extern void (*glXGetProcAddress(const GLubyte *procname))();
/*#ifndef GLX_GLXEXT_LEGACY*/
/*#include <GL/glxext.h>*/
#ifndef GLX_GLXEXT_LEGACY
/*#else*/
#include <GL/glxext.h>
#else
/*
@@ -413,7 +432,7 @@ extern Bool glXReleaseBuffersMESA( Display *dpy, GLXDrawable d );
#define GLX_3DFX_WINDOW_MODE_MESA 0x1
#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
extern GLboolean glXSet3DfxModeMESA( GLint mode );
extern Bool glXSet3DfxModeMESA( int mode );
#endif /* GLX_MESA_set_3dfx_mode */
@@ -431,7 +450,39 @@ extern void (*glXGetProcAddressARB(const GLubyte *procName))();
/*#endif*/ /* GLX_GLXEXT_LEGACY */
#endif /* GLX_GLXEXT_LEGACY */
/**
** The following aren't in glxext.h yet.
**/
/*
* ???. GLX_NV_vertex_array_range
*/
#ifndef GLX_NV_vertex_array_range
#define GLX_NV_vertex_array_range
extern void *glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
extern void glXFreeMemoryNV(GLvoid *pointer);
typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
typedef void ( * PFNGLXFREEMEMORYNVPROC) (GLvoid *pointer);
#endif /* GLX_NV_vertex_array_range */
/*
* ???. GLX_MESA_agp_offset
*/
#ifndef GLX_MESA_agp_offset
#define GLX_MESA_agp_offset 1
extern GLuint glXGetAGPOffsetMESA(const GLvoid *pointer);
typedef GLuint (* PFNGLXGETAGPOFFSETMESAPROC) (const GLvoid *pointer);
#endif /* GLX_MESA_agp_offset */

View File

@@ -1,8 +1,8 @@
/* $Id: glx_mangle.h,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
/* $Id: glx_mangle.h,v 1.2 2001/11/09 22:01:02 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.0
* Version: 4.1
* Copyright (C) 1995-1998 Brian Paul
*
* This library is free software; you can redistribute it and/or
@@ -21,25 +21,6 @@
*/
/*
* $Log: glx_mangle.h,v $
* Revision 1.1 1999/08/19 00:55:40 jtg
* Initial revision
*
* Revision 3.3 1999/06/21 22:01:00 brianp
* added #ifndef GLX_MANGLE_H stuff, video sync extension functions
*
* Revision 3.2 1998/03/26 02:44:53 brianp
* removed ^M characters
*
* Revision 3.1 1998/03/17 02:41:19 brianp
* updated by Randy Frank
*
* Revision 3.0 1998/02/20 05:04:45 brianp
* initial rev
*
*/
#ifndef GLX_MANGLE_H
#define GLX_MANGLE_H
@@ -69,4 +50,8 @@
#define glXGetVideoSyncSGI mglXGetVideoSyncSGI
#define glXWaitVideoSyncSGI mglXWaitVideoSyncSGI
/* GLX 1.4 */
#define glXGetProcAddress mglXGetProcAddress
#endif

607
include/GL/glxext.h Normal file
View File

@@ -0,0 +1,607 @@
#ifndef __glxext_h_
#define __glxext_h_
#ifdef __cplusplus
extern "C" {
#endif
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
** Software License B, Version 1.1 (the "License"), the contents of this
** file are subject only to the provisions of the License. You may not use
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
**
** http://oss.sgi.com/projects/FreeB
**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
**
** Additional Notice Provisions: This software was created using the
** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
** not been independently verified as being compliant with the OpenGL(R)
** version 1.2.1 Specification.
*/
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
#define WIN32_LEAN_AND_MEAN 1
#include <windows.h>
#endif
#ifndef APIENTRY
#define APIENTRY
#endif
#ifndef GLAPI
#define GLAPI extern
#endif
/*************************************************************/
/* Header file version number, required by OpenGL ABI for Linux */
/* glxext.h last updated 2002/03/22 */
/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */
#define GLX_GLXEXT_VERSION 5
#ifndef GLX_VERSION_1_3
#define GLX_WINDOW_BIT 0x00000001
#define GLX_PIXMAP_BIT 0x00000002
#define GLX_PBUFFER_BIT 0x00000004
#define GLX_RGBA_BIT 0x00000001
#define GLX_COLOR_INDEX_BIT 0x00000002
#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
#define GLX_AUX_BUFFERS_BIT 0x00000010
#define GLX_DEPTH_BUFFER_BIT 0x00000020
#define GLX_STENCIL_BUFFER_BIT 0x00000040
#define GLX_ACCUM_BUFFER_BIT 0x00000080
#define GLX_CONFIG_CAVEAT 0x20
#define GLX_X_VISUAL_TYPE 0x22
#define GLX_TRANSPARENT_TYPE 0x23
#define GLX_TRANSPARENT_INDEX_VALUE 0x24
#define GLX_TRANSPARENT_RED_VALUE 0x25
#define GLX_TRANSPARENT_GREEN_VALUE 0x26
#define GLX_TRANSPARENT_BLUE_VALUE 0x27
#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
#define GLX_DONT_CARE 0xFFFFFFFF
#define GLX_NONE 0x8000
#define GLX_SLOW_CONFIG 0x8001
#define GLX_TRUE_COLOR 0x8002
#define GLX_DIRECT_COLOR 0x8003
#define GLX_PSEUDO_COLOR 0x8004
#define GLX_STATIC_COLOR 0x8005
#define GLX_GRAY_SCALE 0x8006
#define GLX_STATIC_GRAY 0x8007
#define GLX_TRANSPARENT_RGB 0x8008
#define GLX_TRANSPARENT_INDEX 0x8009
#define GLX_VISUAL_ID 0x800B
#define GLX_SCREEN 0x800C
#define GLX_NON_CONFORMANT_CONFIG 0x800D
#define GLX_DRAWABLE_TYPE 0x8010
#define GLX_RENDER_TYPE 0x8011
#define GLX_X_RENDERABLE 0x8012
#define GLX_FBCONFIG_ID 0x8013
#define GLX_RGBA_TYPE 0x8014
#define GLX_COLOR_INDEX_TYPE 0x8015
#define GLX_MAX_PBUFFER_WIDTH 0x8016
#define GLX_MAX_PBUFFER_HEIGHT 0x8017
#define GLX_MAX_PBUFFER_PIXELS 0x8018
#define GLX_PRESERVED_CONTENTS 0x801B
#define GLX_LARGEST_PBUFFER 0x801C
#define GLX_WIDTH 0x801D
#define GLX_HEIGHT 0x801E
#define GLX_EVENT_MASK 0x801F
#define GLX_DAMAGED 0x8020
#define GLX_SAVED 0x8021
#define GLX_WINDOW 0x8022
#define GLX_PBUFFER 0x8023
#define GLX_PBUFFER_HEIGHT 0x8040
#define GLX_PBUFFER_WIDTH 0x8041
#endif
#ifndef GLX_VERSION_1_4
#define GLX_SAMPLE_BUFFERS 100000
#define GLX_SAMPLES 100001
#endif
#ifndef GLX_ARB_get_proc_address
#endif
#ifndef GLX_ARB_multisample
#define GLX_SAMPLE_BUFFERS_ARB 100000
#define GLX_SAMPLES_ARB 100001
#endif
#ifndef GLX_SGIS_multisample
#define GLX_SAMPLE_BUFFERS_SGIS 100000
#define GLX_SAMPLES_SGIS 100001
#endif
#ifndef GLX_EXT_visual_info
#define GLX_X_VISUAL_TYPE_EXT 0x22
#define GLX_TRANSPARENT_TYPE_EXT 0x23
#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
#define GLX_NONE_EXT 0x8000
#define GLX_TRUE_COLOR_EXT 0x8002
#define GLX_DIRECT_COLOR_EXT 0x8003
#define GLX_PSEUDO_COLOR_EXT 0x8004
#define GLX_STATIC_COLOR_EXT 0x8005
#define GLX_GRAY_SCALE_EXT 0x8006
#define GLX_STATIC_GRAY_EXT 0x8007
#define GLX_TRANSPARENT_RGB_EXT 0x8008
#define GLX_TRANSPARENT_INDEX_EXT 0x8009
#endif
#ifndef GLX_SGI_swap_control
#endif
#ifndef GLX_SGI_video_sync
#endif
#ifndef GLX_SGI_make_current_read
#endif
#ifndef GLX_SGIX_video_source
#endif
#ifndef GLX_EXT_visual_rating
#define GLX_VISUAL_CAVEAT_EXT 0x20
#define GLX_SLOW_VISUAL_EXT 0x8001
#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
/* reuse GLX_NONE_EXT */
#endif
#ifndef GLX_EXT_import_context
#define GLX_SHARE_CONTEXT_EXT 0x800A
#define GLX_VISUAL_ID_EXT 0x800B
#define GLX_SCREEN_EXT 0x800C
#endif
#ifndef GLX_SGIX_fbconfig
#define GLX_WINDOW_BIT_SGIX 0x00000001
#define GLX_PIXMAP_BIT_SGIX 0x00000002
#define GLX_RGBA_BIT_SGIX 0x00000001
#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
#define GLX_DRAWABLE_TYPE_SGIX 0x8010
#define GLX_RENDER_TYPE_SGIX 0x8011
#define GLX_X_RENDERABLE_SGIX 0x8012
#define GLX_FBCONFIG_ID_SGIX 0x8013
#define GLX_RGBA_TYPE_SGIX 0x8014
#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
/* reuse GLX_SCREEN_EXT */
#endif
#ifndef GLX_SGIX_pbuffer
#define GLX_PBUFFER_BIT_SGIX 0x00000004
#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
#define GLX_PRESERVED_CONTENTS_SGIX 0x801B
#define GLX_LARGEST_PBUFFER_SGIX 0x801C
#define GLX_WIDTH_SGIX 0x801D
#define GLX_HEIGHT_SGIX 0x801E
#define GLX_EVENT_MASK_SGIX 0x801F
#define GLX_DAMAGED_SGIX 0x8020
#define GLX_SAVED_SGIX 0x8021
#define GLX_WINDOW_SGIX 0x8022
#define GLX_PBUFFER_SGIX 0x8023
#endif
#ifndef GLX_SGI_cushion
#endif
#ifndef GLX_SGIX_video_resize
#define GLX_SYNC_FRAME_SGIX 0x00000000
#define GLX_SYNC_SWAP_SGIX 0x00000001
#endif
#ifndef GLX_SGIX_dmbuffer
#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024
#endif
#ifndef GLX_SGIX_swap_group
#endif
#ifndef GLX_SGIX_swap_barrier
#endif
#ifndef GLX_SGIS_blended_overlay
#define GLX_BLENDED_RGBA_SGIS 0x8025
#endif
#ifndef GLX_SGIS_shared_multisample
#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
#endif
#ifndef GLX_SUN_get_transparent_index
#endif
#ifndef GLX_3DFX_multisample
#define GLX_SAMPLE_BUFFERS_3DFX 0x8050
#define GLX_SAMPLES_3DFX 0x8051
#endif
#ifndef GLX_MESA_copy_sub_buffer
#endif
#ifndef GLX_MESA_pixmap_colormap
#endif
#ifndef GLX_MESA_release_buffers
#endif
#ifndef GLX_MESA_set_3dfx_mode
#define GLX_3DFX_WINDOW_MODE_MESA 0x1
#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
#endif
#ifndef GLX_SGIX_visual_select_group
#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028
#endif
#ifndef GLX_OML_swap_method
#define GLX_SWAP_METHOD_OML 0x8060
#define GLX_SWAP_EXCHANGE_OML 0x8061
#define GLX_SWAP_COPY_OML 0x8062
#define GLX_SWAP_UNDEFINED_OML 0x8063
#endif
#ifndef GLX_OML_sync_control
#endif
/*************************************************************/
#ifndef GLX_ARB_get_proc_address
typedef void (*__GLXextFuncPtr)(void);
#endif
#ifndef GLX_SGIX_video_source
typedef XID GLXVideoSourceSGIX;
#endif
#ifndef GLX_SGIX_fbconfig
typedef XID GLXFBConfigIDSGIX;
typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
#endif
#ifndef GLX_SGIX_pbuffer
typedef XID GLXPbufferSGIX;
typedef struct {
int type;
unsigned long serial; /* # of last request processed by server */
Bool send_event; /* true if this came for SendEvent request */
Display *display; /* display the event was read from */
GLXDrawable drawable; /* i.d. of Drawable */
int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */
int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */
unsigned int mask; /* mask indicating which buffers are affected*/
int x, y;
int width, height;
int count; /* if nonzero, at least this many more */
} GLXBufferClobberEventSGIX;
#endif
#ifndef GLX_VERSION_1_3
#define GLX_VERSION_1_3 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern GLXFBConfig * glXGetFBConfigs (Display *, int, int *);
extern GLXFBConfig * glXChooseFBConfig (Display *, int, const int *, int *);
extern int glXGetFBConfigAttrib (Display *, GLXFBConfig, int, int *);
extern XVisualInfo * glXGetVisualFromFBConfig (Display *, GLXFBConfig);
extern GLXWindow glXCreateWindow (Display *, GLXFBConfig, Window, const int *);
extern void glXDestroyWindow (Display *, GLXWindow);
extern GLXPixmap glXCreatePixmap (Display *, GLXFBConfig, Pixmap, const int *);
extern void glXDestroyPixmap (Display *, GLXPixmap);
extern GLXPbuffer glXCreatePbuffer (Display *, GLXFBConfig, const int *);
extern void glXDestroyPbuffer (Display *, GLXPbuffer);
extern void glXQueryDrawable (Display *, GLXDrawable, int, unsigned int *);
extern GLXContext glXCreateNewContext (Display *, GLXFBConfig, int, GLXContext, Bool);
extern Bool glXMakeContextCurrent (Display *, GLXDrawable, GLXDrawable, GLXContext);
extern GLXDrawable glXGetCurrentReadDrawable (void);
extern Display * glXGetCurrentDisplay (void);
extern int glXQueryContext (Display *, GLXContext, int, int *);
extern void glXSelectEvent (Display *, GLXDrawable, unsigned long);
extern void glXGetSelectedEvent (Display *, GLXDrawable, unsigned long *);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
#endif
#ifndef GLX_VERSION_1_4
#define GLX_VERSION_1_4 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
#endif
#ifndef GLX_ARB_get_proc_address
#define GLX_ARB_get_proc_address 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
#endif
#ifndef GLX_ARB_multisample
#define GLX_ARB_multisample 1
#endif
#ifndef GLX_SGIS_multisample
#define GLX_SGIS_multisample 1
#endif
#ifndef GLX_EXT_visual_info
#define GLX_EXT_visual_info 1
#endif
#ifndef GLX_SGI_swap_control
#define GLX_SGI_swap_control 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern int glXSwapIntervalSGI (int);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
#endif
#ifndef GLX_SGI_video_sync
#define GLX_SGI_video_sync 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern int glXGetVideoSyncSGI (unsigned int *);
extern int glXWaitVideoSyncSGI (int, int, unsigned int *);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
#endif
#ifndef GLX_SGI_make_current_read
#define GLX_SGI_make_current_read 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern Bool glXMakeCurrentReadSGI (Display *, GLXDrawable, GLXDrawable, GLXContext);
extern GLXDrawable glXGetCurrentReadDrawableSGI (void);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
#endif
#ifdef _VL_H
#ifndef GLX_SGIX_video_source
#define GLX_SGIX_video_source 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode);
extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
#endif
#endif /* _VL_H */
#ifndef GLX_EXT_visual_rating
#define GLX_EXT_visual_rating 1
#endif
#ifndef GLX_EXT_import_context
#define GLX_EXT_import_context 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern Display * glXGetCurrentDisplayEXT (void);
extern int glXQueryContextInfoEXT (Display *, GLXContext, int, int *);
extern GLXContextID glXGetContextIDEXT (const GLXContext);
extern GLXContext glXImportContextEXT (Display *, GLXContextID);
extern void glXFreeContextEXT (Display *, GLXContext);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
#endif
#ifndef GLX_SGIX_fbconfig
#define GLX_SGIX_fbconfig 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern int glXGetFBConfigAttribSGIX (Display *, GLXFBConfigSGIX, int, int *);
extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *, int, int *, int *);
extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *, GLXFBConfigSGIX, Pixmap);
extern GLXContext glXCreateContextWithConfigSGIX (Display *, GLXFBConfigSGIX, int, GLXContext, Bool);
extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *, GLXFBConfigSGIX);
extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *, XVisualInfo *);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config);
typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis);
#endif
#ifndef GLX_SGIX_pbuffer
#define GLX_SGIX_pbuffer 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *);
extern void glXDestroyGLXPbufferSGIX (Display *, GLXPbufferSGIX);
extern int glXQueryGLXPbufferSGIX (Display *, GLXPbufferSGIX, int, unsigned int *);
extern void glXSelectEventSGIX (Display *, GLXDrawable, unsigned long);
extern void glXGetSelectedEventSGIX (Display *, GLXDrawable, unsigned long *);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
#endif
#ifndef GLX_SGI_cushion
#define GLX_SGI_cushion 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern void glXCushionSGI (Display *, Window, float);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
#endif
#ifndef GLX_SGIX_video_resize
#define GLX_SGIX_video_resize 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern int glXBindChannelToWindowSGIX (Display *, int, int, Window);
extern int glXChannelRectSGIX (Display *, int, int, int, int, int, int);
extern int glXQueryChannelRectSGIX (Display *, int, int, int *, int *, int *, int *);
extern int glXQueryChannelDeltasSGIX (Display *, int, int, int *, int *, int *, int *);
extern int glXChannelRectSyncSGIX (Display *, int, int, GLenum);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype);
#endif
#ifdef _DM_BUFFER_H_
#ifndef GLX_SGIX_dmbuffer
#define GLX_SGIX_dmbuffer 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
#endif
#endif /* _DM_BUFFER_H_ */
#ifndef GLX_SGIX_swap_group
#define GLX_SGIX_swap_group 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
#endif
#ifndef GLX_SGIX_swap_barrier
#define GLX_SGIX_swap_barrier 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern void glXBindSwapBarrierSGIX (Display *, GLXDrawable, int);
extern Bool glXQueryMaxSwapBarriersSGIX (Display *, int, int *);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
#endif
#ifndef GLX_SUN_get_transparent_index
#define GLX_SUN_get_transparent_index 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern Status glXGetTransparentIndexSUN (Display *, Window, Window, long *);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
#endif
#ifndef GLX_MESA_copy_sub_buffer
#define GLX_MESA_copy_sub_buffer 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern void glXCopySubBufferMESA (Display *, GLXDrawable, int, int, int, int);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
#endif
#ifndef GLX_MESA_pixmap_colormap
#define GLX_MESA_pixmap_colormap 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern GLXPixmap glXCreateGLXPixmapMESA (Display *, XVisualInfo *, Pixmap, Colormap);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
#endif
#ifndef GLX_MESA_release_buffers
#define GLX_MESA_release_buffers 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern Bool glXReleaseBuffersMESA (Display *, GLXDrawable);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
#endif
#ifndef GLX_MESA_set_3dfx_mode
#define GLX_MESA_set_3dfx_mode 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern Bool glXSet3DfxModeMESA (int);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
#endif
#ifndef GLX_SGIX_visual_select_group
#define GLX_SGIX_visual_select_group 1
#endif
#ifndef GLX_OML_swap_method
#define GLX_OML_swap_method 1
#endif
#if defined(__STDC_VERSION__)
#if __STDC_VERSION__ >= 199901L
/* Include ISO C99 integer types for OML_sync_control; need a better test */
#include <inttypes.h>
#ifndef GLX_OML_sync_control
#define GLX_OML_sync_control 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern Bool glXGetSyncValuesOML (Display *, GLXDrawable, int64_t *, int64_t *, int64_t *);
extern Bool glXGetMscRateOML (Display *, GLXDrawable, int32_t *, int32_t *);
extern int64_t glXSwapBuffersMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t);
extern Bool glXWaitForMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *);
extern Bool glXWaitForSbcOML (Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
typedef Bool ( * PFNGLXWAITFORMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc);
typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
#endif
#endif /* C99 version test */
#endif /* STDC test */
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,424 @@
#ifndef __gl_core_h_
#define __gl_core_h_
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
** Software License B, Version 1.1 (the "License"), the contents of this
** file are subject only to the provisions of the License. You may not use
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
**
** http://oss.sgi.com/projects/FreeB
**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
** Window System(R) (Version 1.3), released October 19, 1998. This software
** was created using the OpenGL(R) version 1.2.1 Sample Implementation
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
**
** $Date: 2001/01/08 03:56:53 $ $Revision: 1.1 $
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/include/GL/internal/Attic/glcore-new.h,v 1.1 2001/01/08 03:56:53 keithw Exp $
*/
#ifdef XFree86LOADER
#include "xf86_ansic.h"
#else
#include <sys/types.h>
#endif
typedef struct __GLcontextRec __GLcontext;
typedef struct __GLinterfaceRec __GLinterface;
/*
** This file defines the interface between the GL core and the surrounding
** "operating system" that supports it (currently the GLX or WGL extensions).
**
** Members (data and function pointers) are documented as imported or
** exported according to how they are used by the core rendering functions.
** Imported members are initialized by the "operating system" and used by
** the core functions. Exported members are initialized by the core functions
** and used by the "operating system".
*/
/*
** Mode and limit information for a context. This information is
** kept around in the context so that values can be used during
** command execution, and for returning information about the
** context to the application.
*/
typedef struct __GLcontextModesRec {
GLboolean rgbMode;
GLboolean colorIndexMode;
GLboolean doubleBufferMode;
GLboolean stereoMode;
GLboolean haveAccumBuffer;
GLboolean haveDepthBuffer;
GLboolean haveStencilBuffer;
GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */
GLuint redMask, greenMask, blueMask, alphaMask;
GLint rgbBits; /* total bits for rgb */
GLint indexBits; /* total bits for colorindex */
GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;
GLint depthBits;
GLint stencilBits;
GLint numAuxBuffers;
GLint level;
GLint pixmapMode;
} __GLcontextModes;
/************************************************************************/
/*
** Structure used for allocating and freeing drawable private memory.
** (like software buffers, for example).
**
** The memory allocation routines are provided by the surrounding
** "operating system" code, and they are to be used for allocating
** software buffers and things which are associated with the drawable,
** and used by any context which draws to that drawable. There are
** separate memory allocation functions for drawables and contexts
** since drawables and contexts can be created and destroyed independently
** of one another, and the "operating system" may want to use separate
** allocation arenas for each.
**
** The freePrivate function is filled in by the core routines when they
** allocates software buffers, and stick them in "private". The freePrivate
** function will destroy anything allocated to this drawable (to be called
** when the drawable is destroyed).
*/
typedef struct __GLdrawableRegionRec __GLdrawableRegion;
typedef struct __GLdrawableBufferRec __GLdrawableBuffer;
typedef struct __GLdrawablePrivateRec __GLdrawablePrivate;
typedef struct __GLregionRectRec {
/* lower left (inside the rectangle) */
GLint x0, y0;
/* upper right (outside the rectangle) */
GLint x1, y1;
} __GLregionRect;
struct __GLdrawableRegionRec {
GLint numRects;
__GLregionRect *rects;
__GLregionRect boundingRect;
};
/************************************************************************/
/* masks for the buffers */
#define __GL_FRONT_BUFFER_MASK 0x00000001
#define __GL_FRONT_LEFT_BUFFER_MASK 0x00000001
#define __GL_FRONT_RIGHT_BUFFER_MASK 0x00000002
#define __GL_BACK_BUFFER_MASK 0x00000004
#define __GL_BACK_LEFT_BUFFER_MASK 0x00000004
#define __GL_BACK_RIGHT_BUFFER_MASK 0x00000008
#define __GL_ACCUM_BUFFER_MASK 0x00000010
#define __GL_DEPTH_BUFFER_MASK 0x00000020
#define __GL_STENCIL_BUFFER_MASK 0x00000040
#define __GL_AUX_BUFFER_MASK(i) (0x0000080 << (i))
#define __GL_ALL_BUFFER_MASK 0xffffffff
/* what Resize routines return if resize resorted to fallback case */
#define __GL_BUFFER_FALLBACK 0x10
typedef void (*__GLbufFallbackInitFn)(__GLdrawableBuffer *buf,
__GLdrawablePrivate *glPriv, GLint bits);
typedef void (*__GLbufMainInitFn)(__GLdrawableBuffer *buf,
__GLdrawablePrivate *glPriv, GLint bits,
__GLbufFallbackInitFn back);
/*
** A drawable buffer
**
** This data structure describes the context side of a drawable.
**
** According to the spec there could be multiple contexts bound to the same
** drawable at the same time (from different threads). In order to avoid
** multiple-access conflicts, locks are used to serialize access. When a
** thread needs to access (read or write) a member of the drawable, it takes
** a lock first. Some of the entries in the drawable are treated "mostly
** constant", so we take the freedom of allowing access to them without
** taking a lock (for optimization reasons).
**
** For more details regarding locking, see buffers.h in the GL core
*/
struct __GLdrawableBufferRec {
/*
** Buffer dimensions
*/
GLint width, height, depth;
/*
** Framebuffer base address
*/
void *base;
/*
** Framebuffer size (in bytes)
*/
GLuint size;
/*
** Size (in bytes) of each element in the framebuffer
*/
GLuint elementSize;
GLuint elementSizeLog2;
/*
** Element skip from one scanline to the next.
** If the buffer is part of another buffer (for example, fullscreen
** front buffer), outerWidth is the width of that buffer.
*/
GLint outerWidth;
/*
** outerWidth * elementSize
*/
GLint byteWidth;
/*
** Allocation/deallocation is done based on this handle. A handle
** is conceptually different from the framebuffer 'base'.
*/
void *handle;
/* imported */
GLboolean (*resize)(__GLdrawableBuffer *buf,
GLint x, GLint y, GLuint width, GLuint height,
__GLdrawablePrivate *glPriv, GLuint bufferMask);
void (*lock)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
void (*unlock)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
void (*fill)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv,
GLuint val, GLint x, GLint y, GLint w, GLint h);
void (*free)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
/* exported */
void (*freePrivate)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
#ifdef __cplusplus
void *privatePtr;
#else
void *private;
#endif
/* private */
void *other; /* implementation private data */
__GLbufMainInitFn mainInit;
__GLbufFallbackInitFn fallbackInit;
};
/*
** The context side of the drawable private
*/
struct __GLdrawablePrivateRec {
/*
** Drawable Modes
*/
__GLcontextModes *modes;
/*
** Drawable size
*/
GLuint width, height;
/*
** Origin in screen coordinates of the drawable
*/
GLint xOrigin, yOrigin;
#ifdef __GL_ALIGNED_BUFFERS
/*
** Drawable offset from screen origin
*/
GLint xOffset, yOffset;
/*
** Alignment restriction
*/
GLint xAlignment, yAlignment;
#endif
/*
** Should we invert the y axis?
*/
GLint yInverted;
/*
** Mask specifying which buffers are renderable by the hw
*/
GLuint accelBufferMask;
/*
** the buffers themselves
*/
__GLdrawableBuffer frontBuffer;
__GLdrawableBuffer backBuffer;
__GLdrawableBuffer accumBuffer;
__GLdrawableBuffer depthBuffer;
__GLdrawableBuffer stencilBuffer;
#if __GL_NUMBER_OF_AUX_BUFFERS > 0
__GLdrawableBuffer *auxBuffer;
#endif
__GLdrawableRegion ownershipRegion;
/*
** Lock for the drawable private structure
*/
void *lock;
#ifdef DEBUG
/* lock debugging info */
int lockRefCount;
int lockLine[10];
char *lockFile[10];
#endif
/* imported */
void *(*malloc)(size_t size);
void *(*calloc)(size_t numElem, size_t elemSize);
void *(*realloc)(void *oldAddr, size_t newSize);
void (*free)(void *addr);
GLboolean (*addSwapRect)(__GLdrawablePrivate *glPriv,
GLint x, GLint y, GLsizei width, GLsizei height);
void (*setClipRect)(__GLdrawablePrivate *glPriv,
GLint x, GLint y, GLsizei width, GLsizei height);
void (*updateClipRegion)(__GLdrawablePrivate *glPriv);
GLboolean (*resize)(__GLdrawablePrivate *glPriv);
void (*getDrawableSize)(__GLdrawablePrivate *glPriv,
GLint *x, GLint *y, GLuint *width, GLuint *height);
void (*lockDP)(__GLdrawablePrivate *glPriv, __GLcontext *gc);
void (*unlockDP)(__GLdrawablePrivate *glPriv);
/* exported */
void *wsPriv; /* pointer to the window system DrawablePrivate */
#ifdef __cplusplus
void *privatePtr;
#else
void *private;
#endif
void (*freePrivate)(__GLdrawablePrivate *);
/* client data */
void *other;
};
/*
** Macros to lock/unlock the drawable private
*/
#if defined(DEBUG)
#define __GL_LOCK_DP(glPriv,gc) \
(*(glPriv)->lockDP)(glPriv,gc); \
(glPriv)->lockLine[(glPriv)->lockRefCount] = __LINE__; \
(glPriv)->lockFile[(glPriv)->lockRefCount] = __FILE__; \
(glPriv)->lockRefCount++
#define __GL_UNLOCK_DP(glPriv) \
(glPriv)->lockRefCount--; \
(glPriv)->lockLine[(glPriv)->lockRefCount] = 0; \
(glPriv)->lockFile[(glPriv)->lockRefCount] = NULL; \
(*(glPriv)->unlockDP)(glPriv)
#else /* DEBUG */
#define __GL_LOCK_DP(glPriv,gc) (*(glPriv)->lockDP)(glPriv,gc)
#define __GL_UNLOCK_DP(glPriv) (*(glPriv)->unlockDP)(glPriv)
#endif /* DEBUG */
/*
** Procedures which are imported by the GL from the surrounding
** "operating system". Math functions are not considered part of the
** "operating system".
*/
typedef struct __GLimportsRec {
/* Memory management */
void * (*malloc)(__GLcontext *gc, size_t size);
void *(*calloc)(__GLcontext *gc, size_t numElem, size_t elemSize);
void *(*realloc)(__GLcontext *gc, void *oldAddr, size_t newSize);
void (*free)(__GLcontext *gc, void *addr);
/* Error handling */
void (*warning)(__GLcontext *gc, char *fmt);
void (*fatal)(__GLcontext *gc, char *fmt);
/* other system calls */
char *(CAPI *getenv)(__GLcontext *gc, const char *var);
int (CAPI *atoi)(__GLcontext *gc, const char *str);
int (CAPI *sprintf)(__GLcontext *gc, char *str, const char *fmt, ...);
void *(CAPI *fopen)(__GLcontext *gc, const char *path, const char *mode);
int (CAPI *fclose)(__GLcontext *gc, void *stream);
int (CAPI *fprintf)(__GLcontext *gc, void *stream, const char *fmt, ...);
/* Drawing surface management */
__GLdrawablePrivate *(*getDrawablePrivate)(__GLcontext *gc);
/* Pointer to the window system context */
void *wscx;
/* Operating system dependent data goes here */
void *other;
} __GLimports;
/************************************************************************/
/*
** Procedures which are exported by the GL to the surrounding "operating
** system" so that it can manage multiple GL context's.
*/
typedef struct __GLexportsRec {
/* Context management (return GL_FALSE on failure) */
GLboolean (*destroyContext)(__GLcontext *gc);
GLboolean (*loseCurrent)(__GLcontext *gc);
GLboolean (*makeCurrent)(__GLcontext *gc);
GLboolean (*shareContext)(__GLcontext *gc, __GLcontext *gcShare);
GLboolean (*copyContext)(__GLcontext *dst, const __GLcontext *src, GLuint mask);
GLboolean (*forceCurrent)(__GLcontext *gc);
/* Drawing surface notification callbacks */
GLboolean (*notifyResize)(__GLcontext *gc);
void (*notifyDestroy)(__GLcontext *gc);
void (*notifySwapBuffers)(__GLcontext *gc);
/* Dispatch table override control for external agents like libGLS */
struct __GLdispatchStateRec* (*dispatchExec)(__GLcontext *gc);
void (*beginDispatchOverride)(__GLcontext *gc);
void (*endDispatchOverride)(__GLcontext *gc);
} __GLexports;
/************************************************************************/
/*
** This must be the first member of a __GLcontext structure. This is the
** only part of a context that is exposed to the outside world; everything
** else is opaque.
*/
struct __GLinterfaceRec {
__GLimports imports;
__GLexports exports;
};
extern __GLcontext *__glCoreCreateContext(__GLimports *, __GLcontextModes *);
extern void __glCoreNopDispatch(void);
#endif /* __gl_core_h_ */

View File

@@ -0,0 +1,431 @@
/* $XFree86: xc/lib/GL/include/GL/internal/glcore.h,v 1.7 2001/03/25 05:32:00 tsi Exp $ */
#ifndef __gl_core_h_
#define __gl_core_h_
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
** Software License B, Version 1.1 (the "License"), the contents of this
** file are subject only to the provisions of the License. You may not use
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
**
** http://oss.sgi.com/projects/FreeB
**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
** Window System(R) (Version 1.3), released October 19, 1998. This software
** was created using the OpenGL(R) version 1.2.1 Sample Implementation
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
**
*/
#ifndef XFree86LOADER
#include <sys/types.h>
#endif
#define GL_CORE_SGI 1
#define GL_CORE_MESA 2
typedef struct __GLcontextRec __GLcontext;
typedef struct __GLinterfaceRec __GLinterface;
/*
** This file defines the interface between the GL core and the surrounding
** "operating system" that supports it (currently the GLX or WGL extensions).
**
** Members (data and function pointers) are documented as imported or
** exported according to how they are used by the core rendering functions.
** Imported members are initialized by the "operating system" and used by
** the core functions. Exported members are initialized by the core functions
** and used by the "operating system".
*/
/*
** Mode and limit information for a context. This information is
** kept around in the context so that values can be used during
** command execution, and for returning information about the
** context to the application.
*/
typedef struct __GLcontextModesRec {
GLboolean rgbMode;
GLboolean colorIndexMode;
GLboolean doubleBufferMode;
GLboolean stereoMode;
GLboolean haveAccumBuffer;
GLboolean haveDepthBuffer;
GLboolean haveStencilBuffer;
GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */
GLuint redMask, greenMask, blueMask, alphaMask;
GLint rgbBits; /* total bits for rgb */
GLint indexBits; /* total bits for colorindex */
GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;
GLint depthBits;
GLint stencilBits;
GLint numAuxBuffers;
GLint level;
GLint pixmapMode;
} __GLcontextModes;
/************************************************************************/
/*
** Structure used for allocating and freeing drawable private memory.
** (like software buffers, for example).
**
** The memory allocation routines are provided by the surrounding
** "operating system" code, and they are to be used for allocating
** software buffers and things which are associated with the drawable,
** and used by any context which draws to that drawable. There are
** separate memory allocation functions for drawables and contexts
** since drawables and contexts can be created and destroyed independently
** of one another, and the "operating system" may want to use separate
** allocation arenas for each.
**
** The freePrivate function is filled in by the core routines when they
** allocates software buffers, and stick them in "private". The freePrivate
** function will destroy anything allocated to this drawable (to be called
** when the drawable is destroyed).
*/
typedef struct __GLdrawableRegionRec __GLdrawableRegion;
typedef struct __GLdrawableBufferRec __GLdrawableBuffer;
typedef struct __GLdrawablePrivateRec __GLdrawablePrivate;
typedef struct __GLregionRectRec {
/* lower left (inside the rectangle) */
GLint x0, y0;
/* upper right (outside the rectangle) */
GLint x1, y1;
} __GLregionRect;
struct __GLdrawableRegionRec {
GLint numRects;
__GLregionRect *rects;
__GLregionRect boundingRect;
};
/************************************************************************/
/* masks for the buffers */
#define __GL_FRONT_BUFFER_MASK 0x00000001
#define __GL_FRONT_LEFT_BUFFER_MASK 0x00000001
#define __GL_FRONT_RIGHT_BUFFER_MASK 0x00000002
#define __GL_BACK_BUFFER_MASK 0x00000004
#define __GL_BACK_LEFT_BUFFER_MASK 0x00000004
#define __GL_BACK_RIGHT_BUFFER_MASK 0x00000008
#define __GL_ACCUM_BUFFER_MASK 0x00000010
#define __GL_DEPTH_BUFFER_MASK 0x00000020
#define __GL_STENCIL_BUFFER_MASK 0x00000040
#define __GL_AUX_BUFFER_MASK(i) (0x0000080 << (i))
#define __GL_ALL_BUFFER_MASK 0xffffffff
/* what Resize routines return if resize resorted to fallback case */
#define __GL_BUFFER_FALLBACK 0x10
typedef void (*__GLbufFallbackInitFn)(__GLdrawableBuffer *buf,
__GLdrawablePrivate *glPriv, GLint bits);
typedef void (*__GLbufMainInitFn)(__GLdrawableBuffer *buf,
__GLdrawablePrivate *glPriv, GLint bits,
__GLbufFallbackInitFn back);
/*
** A drawable buffer
**
** This data structure describes the context side of a drawable.
**
** According to the spec there could be multiple contexts bound to the same
** drawable at the same time (from different threads). In order to avoid
** multiple-access conflicts, locks are used to serialize access. When a
** thread needs to access (read or write) a member of the drawable, it takes
** a lock first. Some of the entries in the drawable are treated "mostly
** constant", so we take the freedom of allowing access to them without
** taking a lock (for optimization reasons).
**
** For more details regarding locking, see buffers.h in the GL core
*/
struct __GLdrawableBufferRec {
/*
** Buffer dimensions
*/
GLint width, height, depth;
/*
** Framebuffer base address
*/
void *base;
/*
** Framebuffer size (in bytes)
*/
GLuint size;
/*
** Size (in bytes) of each element in the framebuffer
*/
GLuint elementSize;
GLuint elementSizeLog2;
/*
** Element skip from one scanline to the next.
** If the buffer is part of another buffer (for example, fullscreen
** front buffer), outerWidth is the width of that buffer.
*/
GLint outerWidth;
/*
** outerWidth * elementSize
*/
GLint byteWidth;
/*
** Allocation/deallocation is done based on this handle. A handle
** is conceptually different from the framebuffer 'base'.
*/
void *handle;
/* imported */
GLboolean (*resize)(__GLdrawableBuffer *buf,
GLint x, GLint y, GLuint width, GLuint height,
__GLdrawablePrivate *glPriv, GLuint bufferMask);
void (*lock)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
void (*unlock)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
void (*fill)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv,
GLuint val, GLint x, GLint y, GLint w, GLint h);
void (*free)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
/* exported */
void (*freePrivate)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
#ifdef __cplusplus
void *privatePtr;
#else
void *private;
#endif
/* private */
void *other; /* implementation private data */
__GLbufMainInitFn mainInit;
__GLbufFallbackInitFn fallbackInit;
};
/*
** The context side of the drawable private
*/
struct __GLdrawablePrivateRec {
/*
** Drawable Modes
*/
__GLcontextModes *modes;
/*
** Drawable size
*/
GLuint width, height;
/*
** Origin in screen coordinates of the drawable
*/
GLint xOrigin, yOrigin;
#ifdef __GL_ALIGNED_BUFFERS
/*
** Drawable offset from screen origin
*/
GLint xOffset, yOffset;
/*
** Alignment restriction
*/
GLint xAlignment, yAlignment;
#endif
/*
** Should we invert the y axis?
*/
GLint yInverted;
/*
** Mask specifying which buffers are renderable by the hw
*/
GLuint accelBufferMask;
/*
** the buffers themselves
*/
__GLdrawableBuffer frontBuffer;
__GLdrawableBuffer backBuffer;
__GLdrawableBuffer accumBuffer;
__GLdrawableBuffer depthBuffer;
__GLdrawableBuffer stencilBuffer;
#if defined(__GL_NUMBER_OF_AUX_BUFFERS) && (__GL_NUMBER_OF_AUX_BUFFERS > 0)
__GLdrawableBuffer *auxBuffer;
#endif
__GLdrawableRegion ownershipRegion;
/*
** Lock for the drawable private structure
*/
void *lock;
#ifdef DEBUG
/* lock debugging info */
int lockRefCount;
int lockLine[10];
char *lockFile[10];
#endif
/* imported */
void *(*malloc)(size_t size);
void *(*calloc)(size_t numElem, size_t elemSize);
void *(*realloc)(void *oldAddr, size_t newSize);
void (*free)(void *addr);
GLboolean (*addSwapRect)(__GLdrawablePrivate *glPriv,
GLint x, GLint y, GLsizei width, GLsizei height);
void (*setClipRect)(__GLdrawablePrivate *glPriv,
GLint x, GLint y, GLsizei width, GLsizei height);
void (*updateClipRegion)(__GLdrawablePrivate *glPriv);
GLboolean (*resize)(__GLdrawablePrivate *glPriv);
void (*getDrawableSize)(__GLdrawablePrivate *glPriv,
GLint *x, GLint *y, GLuint *width, GLuint *height);
void (*lockDP)(__GLdrawablePrivate *glPriv, __GLcontext *gc);
void (*unlockDP)(__GLdrawablePrivate *glPriv);
/* exported */
#if 0 /* disable, just like in __GLimportsRec */
void *wsPriv; /* pointer to the window system DrawablePrivate */
#endif
#ifdef __cplusplus
void *privatePtr;
#else
void *private;
#endif
void (*freePrivate)(__GLdrawablePrivate *);
/* client data */
void *other;
};
/*
** Macros to lock/unlock the drawable private
*/
#if defined(DEBUG)
#define __GL_LOCK_DP(glPriv,gc) \
(*(glPriv)->lockDP)(glPriv,gc); \
(glPriv)->lockLine[(glPriv)->lockRefCount] = __LINE__; \
(glPriv)->lockFile[(glPriv)->lockRefCount] = __FILE__; \
(glPriv)->lockRefCount++
#define __GL_UNLOCK_DP(glPriv) \
(glPriv)->lockRefCount--; \
(glPriv)->lockLine[(glPriv)->lockRefCount] = 0; \
(glPriv)->lockFile[(glPriv)->lockRefCount] = NULL; \
(*(glPriv)->unlockDP)(glPriv)
#else /* DEBUG */
#define __GL_LOCK_DP(glPriv,gc) (*(glPriv)->lockDP)(glPriv,gc)
#define __GL_UNLOCK_DP(glPriv) (*(glPriv)->unlockDP)(glPriv)
#endif /* DEBUG */
/*
** Procedures which are imported by the GL from the surrounding
** "operating system". Math functions are not considered part of the
** "operating system".
*/
typedef struct __GLimportsRec {
/* Memory management */
void * (*malloc)(__GLcontext *gc, size_t size);
void *(*calloc)(__GLcontext *gc, size_t numElem, size_t elemSize);
void *(*realloc)(__GLcontext *gc, void *oldAddr, size_t newSize);
void (*free)(__GLcontext *gc, void *addr);
/* Error handling */
void (*warning)(__GLcontext *gc, char *fmt);
void (*fatal)(__GLcontext *gc, char *fmt);
/* other system calls */
char *(CAPI *getenv)(__GLcontext *gc, const char *var);
int (CAPI *atoi)(__GLcontext *gc, const char *str);
int (CAPI *sprintf)(__GLcontext *gc, char *str, const char *fmt, ...);
void *(CAPI *fopen)(__GLcontext *gc, const char *path, const char *mode);
int (CAPI *fclose)(__GLcontext *gc, void *stream);
int (CAPI *fprintf)(__GLcontext *gc, void *stream, const char *fmt, ...);
/* Drawing surface management */
__GLdrawablePrivate *(*getDrawablePrivate)(__GLcontext *gc);
#if 0
/* At some point, this field got removed from the XFree86 glcore.h file.
* we're removing it here to prevent interop problems. (Brian)
*/
/* Pointer to the window system context */
void *wscx;
#endif
/* Operating system dependent data goes here */
void *other;
} __GLimports;
/************************************************************************/
/*
** Procedures which are exported by the GL to the surrounding "operating
** system" so that it can manage multiple GL context's.
*/
typedef struct __GLexportsRec {
/* Context management (return GL_FALSE on failure) */
GLboolean (*destroyContext)(__GLcontext *gc);
GLboolean (*loseCurrent)(__GLcontext *gc);
GLboolean (*makeCurrent)(__GLcontext *gc);
GLboolean (*shareContext)(__GLcontext *gc, __GLcontext *gcShare);
GLboolean (*copyContext)(__GLcontext *dst, const __GLcontext *src, GLuint mask);
GLboolean (*forceCurrent)(__GLcontext *gc);
/* Drawing surface notification callbacks */
GLboolean (*notifyResize)(__GLcontext *gc);
void (*notifyDestroy)(__GLcontext *gc);
void (*notifySwapBuffers)(__GLcontext *gc);
/* Dispatch table override control for external agents like libGLS */
struct __GLdispatchStateRec* (*dispatchExec)(__GLcontext *gc);
void (*beginDispatchOverride)(__GLcontext *gc);
void (*endDispatchOverride)(__GLcontext *gc);
} __GLexports;
/************************************************************************/
/*
** This must be the first member of a __GLcontext structure. This is the
** only part of a context that is exposed to the outside world; everything
** else is opaque.
*/
struct __GLinterfaceRec {
__GLimports imports;
__GLexports exports;
};
extern __GLcontext *__glCoreCreateContext(__GLimports *, __GLcontextModes *);
extern void __glCoreNopDispatch(void);
#endif /* __gl_core_h_ */

View File

@@ -1,123 +1,125 @@
/* $Id: mesa_wgl.h,v 1.5 2000/05/22 16:21:27 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.1
*
* Copyright (C) 1999 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/* prototypes for the Mesa WGL functions */
/* relocated here so that I could make GLUT get them properly */
#ifndef _mesa_wgl_h_
#define _mesa_wgl_h_
#include <gl/gl.h>
#ifdef __cplusplus
extern "C" {
#endif
#if !defined(OPENSTEP) && (defined(__WIN32__) || defined(__CYGWIN32__))
# if defined(_MSC_VER) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
# define GLAPI __declspec(dllexport)
# define WGLAPI __declspec(dllexport)
# elif defined(_MSC_VER) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
# define GLAPI __declspec(dllimport)
# define WGLAPI __declspec(dllimport)
# else /* for use with static link lib build of Win32 edition only */
# define GLAPI extern
# define WGLAPI __declspec(dllimport)
# endif /* _STATIC_MESA support */
# define GLAPIENTRY __stdcall
#else
/* non-Windows compilation */
# define GLAPI extern
# define GLAPIENTRY
#endif /* WIN32 / CYGWIN32 bracket */
#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP)
#ifndef _GNU_H_WINDOWS32_FUNCTIONS
# ifdef UNICODE
# define wglUseFontBitmaps wglUseFontBitmapsW
# define wglUseFontOutlines wglUseFontOutlinesW
# else
# define wglUseFontBitmaps wglUseFontBitmapsA
# define wglUseFontOutlines wglUseFontOutlinesA
# endif /* !UNICODE */
#endif /* _GNU_H_WINDOWS32_FUNCTIONS */
typedef struct tagLAYERPLANEDESCRIPTOR LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR;
typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT;
typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, *LPPIXELFORMATDESCRIPTOR;
#endif
#ifdef _MSC_VER
# pragma warning( disable : 4615 ) /* pragma warning : unknown user warning type*/
# pragma warning( push )
# pragma warning( disable : 4273 ) /* 'function' : inconsistent DLL linkage. dllexport assumed. */
#endif
WGLAPI int GLAPIENTRY wglDeleteContext(HGLRC);
WGLAPI int GLAPIENTRY wglMakeCurrent(HDC,HGLRC);
WGLAPI int GLAPIENTRY wglSetPixelFormat(HDC, int, const PIXELFORMATDESCRIPTOR *);
WGLAPI int GLAPIENTRY wglSwapBuffers(HDC hdc);
WGLAPI HDC GLAPIENTRY wglGetCurrentDC(void);
WGLAPI HGLRC GLAPIENTRY wglCreateContext(HDC);
WGLAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC,int);
WGLAPI HGLRC GLAPIENTRY wglGetCurrentContext(void);
WGLAPI PROC GLAPIENTRY wglGetProcAddress(const char*);
WGLAPI int GLAPIENTRY wglChoosePixelFormat(HDC, const PIXELFORMATDESCRIPTOR *);
WGLAPI int GLAPIENTRY wglCopyContext(HGLRC, HGLRC, unsigned int);
WGLAPI int GLAPIENTRY wglDeleteContext(HGLRC);
WGLAPI int GLAPIENTRY wglDescribeLayerPlane(HDC, int, int, unsigned int,LPLAYERPLANEDESCRIPTOR);
WGLAPI int GLAPIENTRY wglDescribePixelFormat(HDC,int, unsigned int, LPPIXELFORMATDESCRIPTOR);
WGLAPI int GLAPIENTRY wglGetLayerPaletteEntries(HDC, int, int, int,COLORREF *);
WGLAPI int GLAPIENTRY wglGetPixelFormat(HDC hdc);
WGLAPI int GLAPIENTRY wglMakeCurrent(HDC, HGLRC);
WGLAPI int GLAPIENTRY wglRealizeLayerPalette(HDC, int, int);
WGLAPI int GLAPIENTRY wglSetLayerPaletteEntries(HDC, int, int, int,const COLORREF *);
WGLAPI int GLAPIENTRY wglShareLists(HGLRC, HGLRC);
WGLAPI int GLAPIENTRY wglSwapLayerBuffers(HDC, unsigned int);
WGLAPI int GLAPIENTRY wglUseFontBitmapsA(HDC, unsigned long, unsigned long, unsigned long);
WGLAPI int GLAPIENTRY wglUseFontBitmapsW(HDC, unsigned long, unsigned long, unsigned long);
WGLAPI int GLAPIENTRY wglUseFontOutlinesA(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
WGLAPI int GLAPIENTRY wglUseFontOutlinesW(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
WGLAPI int GLAPIENTRY SwapBuffers(HDC);
WGLAPI int GLAPIENTRY ChoosePixelFormat(HDC,const PIXELFORMATDESCRIPTOR *);
WGLAPI int GLAPIENTRY DescribePixelFormat(HDC,int,unsigned int,LPPIXELFORMATDESCRIPTOR);
WGLAPI int GLAPIENTRY GetPixelFormat(HDC);
WGLAPI int GLAPIENTRY SetPixelFormat(HDC,int,const PIXELFORMATDESCRIPTOR *);
#ifdef _MSC_VER
# pragma warning( pop )
#endif
#ifdef __cplusplus
}
#endif
#endif /* _mesa_wgl_h_ */
/* $Id: mesa_wgl.h,v 1.6 2001/05/07 13:58:00 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.1
*
* Copyright (C) 1999 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/* prototypes for the Mesa WGL functions */
/* relocated here so that I could make GLUT get them properly */
#define _mesa_wgl_h_
#ifndef _mesa_wgl_h_
#define _mesa_wgl_h_
#include <gl/gl.h>
#ifdef __cplusplus
extern "C" {
#endif
#if !defined(OPENSTEP) && (defined(__WIN32__) || defined(__CYGWIN32__))
# if defined(_MSC_VER) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
# define GLAPI __declspec(dllexport)
# define WGLAPI __declspec(dllexport)
# elif defined(_MSC_VER) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
# define GLAPI __declspec(dllimport)
# define WGLAPI __declspec(dllimport)
# else /* for use with static link lib build of Win32 edition only */
# define GLAPI extern
# define WGLAPI __declspec(dllimport)
# endif /* _STATIC_MESA support */
# define GLAPIENTRY __stdcall
#else
/* non-Windows compilation */
# define GLAPI extern
# define GLAPIENTRY
#endif /* WIN32 / CYGWIN32 bracket */
#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP)
#ifndef _GNU_H_WINDOWS32_FUNCTIONS
# ifdef UNICODE
# define wglUseFontBitmaps wglUseFontBitmapsW
# define wglUseFontOutlines wglUseFontOutlinesW
# else
# define wglUseFontBitmaps wglUseFontBitmapsA
# define wglUseFontOutlines wglUseFontOutlinesA
# endif /* !UNICODE */
#endif /* _GNU_H_WINDOWS32_FUNCTIONS */
typedef struct tagLAYERPLANEDESCRIPTOR LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR;
typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT;
typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, *LPPIXELFORMATDESCRIPTOR;
#endif
#ifdef _MSC_VER
# pragma warning( disable : 4615 ) /* pragma warning : unknown user warning type*/
# pragma warning( push )
# pragma warning( disable : 4273 ) /* 'function' : inconsistent DLL linkage. dllexport assumed. */
#endif
WGLAPI int GLAPIENTRY wglDeleteContext(HGLRC);
WGLAPI int GLAPIENTRY wglMakeCurrent(HDC,HGLRC);
WGLAPI int GLAPIENTRY wglSetPixelFormat(HDC, int, const PIXELFORMATDESCRIPTOR *);
WGLAPI int GLAPIENTRY wglSwapBuffers(HDC hdc);
WGLAPI HDC GLAPIENTRY wglGetCurrentDC(void);
WGLAPI HGLRC GLAPIENTRY wglCreateContext(HDC);
WGLAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC,int);
WGLAPI HGLRC GLAPIENTRY wglGetCurrentContext(void);
WGLAPI PROC GLAPIENTRY wglGetProcAddress(const char*);
WGLAPI int GLAPIENTRY wglChoosePixelFormat(HDC, const PIXELFORMATDESCRIPTOR *);
WGLAPI int GLAPIENTRY wglCopyContext(HGLRC, HGLRC, unsigned int);
WGLAPI int GLAPIENTRY wglDeleteContext(HGLRC);
WGLAPI int GLAPIENTRY wglDescribeLayerPlane(HDC, int, int, unsigned int,LPLAYERPLANEDESCRIPTOR);
WGLAPI int GLAPIENTRY wglDescribePixelFormat(HDC,int, unsigned int, LPPIXELFORMATDESCRIPTOR);
WGLAPI int GLAPIENTRY wglGetLayerPaletteEntries(HDC, int, int, int,COLORREF *);
WGLAPI int GLAPIENTRY wglGetPixelFormat(HDC hdc);
WGLAPI int GLAPIENTRY wglMakeCurrent(HDC, HGLRC);
WGLAPI int GLAPIENTRY wglRealizeLayerPalette(HDC, int, int);
WGLAPI int GLAPIENTRY wglSetLayerPaletteEntries(HDC, int, int, int,const COLORREF *);
WGLAPI int GLAPIENTRY wglShareLists(HGLRC, HGLRC);
WGLAPI int GLAPIENTRY wglSwapLayerBuffers(HDC, unsigned int);
WGLAPI int GLAPIENTRY wglUseFontBitmapsA(HDC, unsigned long, unsigned long, unsigned long);
WGLAPI int GLAPIENTRY wglUseFontBitmapsW(HDC, unsigned long, unsigned long, unsigned long);
WGLAPI int GLAPIENTRY wglUseFontOutlinesA(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
WGLAPI int GLAPIENTRY wglUseFontOutlinesW(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
WGLAPI int GLAPIENTRY SwapBuffers(HDC);
WGLAPI int GLAPIENTRY ChoosePixelFormat(HDC,const PIXELFORMATDESCRIPTOR *);
WGLAPI int GLAPIENTRY DescribePixelFormat(HDC,int,unsigned int,LPPIXELFORMATDESCRIPTOR);
WGLAPI int GLAPIENTRY GetPixelFormat(HDC);
WGLAPI int GLAPIENTRY SetPixelFormat(HDC,int,const PIXELFORMATDESCRIPTOR *);
#ifdef _MSC_VER
# pragma warning( pop )
#endif
#ifdef __cplusplus
}
#endif
#endif /* _mesa_wgl_h_ */

View File

@@ -1,10 +1,10 @@
/* $Id: osmesa.h,v 1.5 2000/03/28 16:59:39 rjfrank Exp $ */
/* $Id: osmesa.h,v 1.10 2002/04/04 16:58:04 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
* Version: 4.1
*
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -59,11 +59,12 @@ extern "C" {
#endif
#include "GL/gl.h"
#include <GL/gl.h>
#define OSMESA_MAJOR_VERSION 3
#define OSMESA_MINOR_VERSION 3
#define OSMESA_MAJOR_VERSION 4
#define OSMESA_MINOR_VERSION 1
#define OSMESA_PATCH_VERSION 0
@@ -77,6 +78,7 @@ extern "C" {
#define OSMESA_ARGB 0x2
#define OSMESA_RGB GL_RGB
#define OSMESA_BGR 0x4
#define OSMESA_RGB_565 0x5
/*
@@ -94,6 +96,8 @@ extern "C" {
#define OSMESA_HEIGHT 0x21
#define OSMESA_FORMAT 0x22
#define OSMESA_TYPE 0x23
#define OSMESA_MAX_WIDTH 0x24 /* new in 4.0 */
#define OSMESA_MAX_HEIGHT 0x25 /* new in 4.0 */
typedef struct osmesa_context *OSMesaContext;
@@ -114,18 +118,31 @@ typedef struct osmesa_context *OSMesaContext;
* display lists. NULL indicates no sharing.
* Return: an OSMesaContext or 0 if error
*/
GLAPI OSMesaContext GLAPIENTRY OSMesaCreateContext( GLenum format,
OSMesaContext sharelist );
GLAPI OSMesaContext GLAPIENTRY
OSMesaCreateContext( GLenum format, OSMesaContext sharelist );
/*
* Create an Off-Screen Mesa rendering context and specify desired
* size of depth buffer, stencil buffer and accumulation buffer.
* If you specify zero for depthBits, stencilBits, accumBits you
* can save some memory.
*
* New in Mesa 3.5
*/
GLAPI OSMesaContext GLAPIENTRY
OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
GLint accumBits, OSMesaContext sharelist);
/*
* Destroy an Off-Screen Mesa rendering context.
*
* Input: ctx - the context to destroy
*/
GLAPI void GLAPIENTRY OSMesaDestroyContext( OSMesaContext ctx );
GLAPI void GLAPIENTRY
OSMesaDestroyContext( OSMesaContext ctx );
@@ -156,9 +173,9 @@ GLAPI void GLAPIENTRY OSMesaDestroyContext( OSMesaContext ctx );
* invalid buffer address, type!=GL_UNSIGNED_BYTE, width<1, height<1,
* width>internal limit or height>internal limit.
*/
GLAPI GLboolean GLAPIENTRY OSMesaMakeCurrent( OSMesaContext ctx,
void *buffer, GLenum type,
GLsizei width, GLsizei height );
GLAPI GLboolean GLAPIENTRY
OSMesaMakeCurrent( OSMesaContext ctx, void *buffer, GLenum type,
GLsizei width, GLsizei height );
@@ -166,7 +183,8 @@ GLAPI GLboolean GLAPIENTRY OSMesaMakeCurrent( OSMesaContext ctx,
/*
* Return the current Off-Screen Mesa rendering context handle.
*/
GLAPI OSMesaContext GLAPIENTRY OSMesaGetCurrentContext( void );
GLAPI OSMesaContext GLAPIENTRY
OSMesaGetCurrentContext( void );
@@ -183,7 +201,8 @@ GLAPI OSMesaContext GLAPIENTRY OSMesaGetCurrentContext( void );
*
* New in version 2.0.
*/
GLAPI void GLAPIENTRY OSMesaPixelStore( GLint pname, GLint value );
GLAPI void GLAPIENTRY
OSMesaPixelStore( GLint pname, GLint value );
@@ -198,7 +217,8 @@ GLAPI void GLAPIENTRY OSMesaPixelStore( GLint pname, GLint value );
* OSMESA_Y_UP returns 1 or 0 to indicate Y axis direction
* value - pointer to integer in which to return result.
*/
GLAPI void GLAPIENTRY OSMesaGetIntegerv( GLint pname, GLint *value );
GLAPI void GLAPIENTRY
OSMesaGetIntegerv( GLint pname, GLint *value );
@@ -212,10 +232,10 @@ GLAPI void GLAPIENTRY OSMesaGetIntegerv( GLint pname, GLint *value );
*
* New in Mesa 2.4.
*/
GLAPI GLboolean GLAPIENTRY OSMesaGetDepthBuffer( OSMesaContext c,
GLint *width, GLint *height,
GLint *bytesPerValue,
void **buffer );
GLAPI GLboolean GLAPIENTRY
OSMesaGetDepthBuffer( OSMesaContext c, GLint *width, GLint *height,
GLint *bytesPerValue, void **buffer );
/*
@@ -228,10 +248,19 @@ GLAPI GLboolean GLAPIENTRY OSMesaGetDepthBuffer( OSMesaContext c,
*
* New in Mesa 3.3.
*/
GLAPI GLboolean GLAPIENTRY OSMesaGetColorBuffer( OSMesaContext c,
GLint *width, GLint *height,
GLint *format,
void **buffer );
GLAPI GLboolean GLAPIENTRY
OSMesaGetColorBuffer( OSMesaContext c, GLint *width, GLint *height,
GLint *format, void **buffer );
/*
* Return pointer to the named function.
*
* New in Mesa 4.1
*/
GLAPI void * GLAPIENTRY
OSMesaGetProcAddress( const char *funcName );
#if defined(__BEOS__) || defined(__QUICKDRAW__)

View File

@@ -1,9 +1,9 @@
/* $Id: svgamesa.h,v 1.4 2000/02/09 19:03:28 brianp Exp $ */
/* $Id: svgamesa.h,v 1.6 2001/09/23 16:06:13 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
* Copyright (C) 1995-2000 Brian Paul
* Version: 4.0
* Copyright (C) 1995-2001 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -52,8 +52,8 @@
#define SVGAMESA_H
#define SVGAMESA_MAJOR_VERSION 3
#define SVGAMESA_MINOR_VERSION 3
#define SVGAMESA_MAJOR_VERSION 4
#define SVGAMESA_MINOR_VERSION 0
#ifdef __cplusplus

View File

@@ -0,0 +1,45 @@
/* uglglutshapes.h - Public header GLUT Shapes */
/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1998. */
/* This program is freely distributable without licensing fees and is
provided without guarantee or warrantee expressed or implied. This
program is -not- in the public domain. */
#ifndef GLUTSHAPES_H
#define GLUTSHAPES_H
#ifdef __cplusplus
extern "C" {
#endif
#include <GL/gl.h>
void glutWireSphere (GLdouble radius, GLint slices, GLint stacks);
void glutSolidSphere (GLdouble radius, GLint slices, GLint stacks);
void glutWireCone (GLdouble base, GLdouble height,
GLint slices, GLint stacks);
void glutSolidCone (GLdouble base, GLdouble height,
GLint slices, GLint stacks);
void glutWireCube (GLdouble size);
void glutSolidCube (GLdouble size);
void glutWireTorus (GLdouble innerRadius, GLdouble outerRadius,
GLint sides, GLint rings);
void glutSolidTorus (GLdouble innerRadius, GLdouble outerRadius,
GLint sides, GLint rings);
void glutWireDodecahedron (void);
void glutSolidDodecahedron (void);
void glutWireOctahedron (void);
void glutSolidOctahedron (void);
void glutWireTetrahedron (void);
void glutSolidTetrahedron (void);
void glutWireIcosahedron (void);
void glutSolidIcosahedron (void);
void glutWireTeapot (GLdouble size);
void glutSolidTeapot (GLdouble size);
#ifdef __cplusplus
}
#endif
#endif

155
include/GL/uglmesa.h Normal file
View File

@@ -0,0 +1,155 @@
/* uglmesa.h - Public header UGL/Mesa */
/* Copyright (C) 2001 by Wind River Systems, Inc */
/*
* Mesa 3-D graphics library
* Version: 4.0
*
* The MIT License
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
/*
* Author:
* Stephane Raimbault <stephane.raimbault@windriver.com>
*/
#ifndef UGLMESA_H
#define UGLMESA_H
#ifdef __cplusplus
extern "C" {
#endif
#define UGL_MESA_MAJOR_VERSION 4
#define UGL_MESA_MINOR_VERSION 0
#include <GL/gl.h>
#include <ugl/ugl.h>
/*
* Values for display mode of uglMesaCreateContext ()
*/
/*
* With these mask values, it's possible to test double buffer mode
* with UGL_MESA_DOUBLE mask
*
* SINGLE 0000 0001
* DOUBLE 0000 0110
* - SOFT 0000 0010
* - HARD 0000 0100
* WINDML 0001 0000
*
*
*/
#define UGL_MESA_SINGLE 0x01
#define UGL_MESA_DOUBLE 0x06
#define UGL_MESA_DOUBLE_SOFTWARE 0x02
#define UGL_MESA_DOUBLE_HARDWARE 0x04
#define UGL_MESA_WINDML_EXCLUSIVE 0x10
#define UGL_MESA_FULLSCREEN_WIDTH 0x0
#define UGL_MESA_FULLSCREEN_HEIGHT 0x0
/*
* uglMesaPixelStore() parameters:
*/
#define UGL_MESA_ROW_LENGTH 0x20
#define UGL_MESA_Y_UP 0x21
/*
* Accepted by uglMesaGetIntegerv:
*/
#define UGL_MESA_LEFT_X 0x01
#define UGL_MESA_TOP_Y 0x02
#define UGL_MESA_WIDTH 0x03
#define UGL_MESA_HEIGHT 0x04
#define UGL_MESA_DISPLAY_WIDTH 0x05
#define UGL_MESA_DISPLAY_HEIGHT 0x06
#define UGL_MESA_COLOR_FORMAT 0x07
#define UGL_MESA_COLOR_MODEL 0x08
#define UGL_MESA_PIXEL_FORMAT 0x09
#define UGL_MESA_TYPE 0x0A
#define UGL_MESA_RGB 0x0B
#define UGL_MESA_COLOR_INDEXED 0x0C
#define UGL_MESA_SINGLE_BUFFER 0x0D
#define UGL_MESA_DOUBLE_BUFFER 0x0E
#define UGL_MESA_DOUBLE_BUFFER_SOFTWARE 0x0F
#define UGL_MESA_DOUBLE_BUFFER_HARDWARE 0x10
/*
* typedefs
*/
typedef struct uglMesaContext * UGL_MESA_CONTEXT;
UGL_MESA_CONTEXT uglMesaCreateNewContext (GLenum mode,
UGL_MESA_CONTEXT share_list);
UGL_MESA_CONTEXT uglMesaCreateNewContextExt (GLenum mode,
GLint depth_bits,
GLint stencil_bits,
GLint accum_red_bits,
GLint accum_green_bits,
GLint accum_blue_bits,
GLint accum_alpha_bits,
UGL_MESA_CONTEXT share_list);
GLboolean uglMesaMakeCurrentContext (UGL_MESA_CONTEXT umc,
GLsizei left, GLsizei top,
GLsizei width, GLsizei height);
GLboolean uglMesaMoveWindow (GLsizei dx, GLsizei dy);
GLboolean uglMesaMoveToWindow (GLsizei left, GLsizei top);
GLboolean uglMesaResizeWindow (GLsizei dw, GLsizei dh);
GLboolean uglMesaResizeToWindow (GLsizei width, GLsizei height);
void uglMesaDestroyContext (void);
UGL_MESA_CONTEXT uglMesaGetCurrentContext (void);
void uglMesaSwapBuffers (void);
void uglMesaPixelStore (GLint pname, GLint value);
void uglMesaGetIntegerv (GLint pname, GLint *value);
GLboolean uglMesaGetDepthBuffer (GLint *width, GLint *height,
GLint *bytesPerValue, void **buffer);
GLboolean uglMesaGetColorBuffer (GLint *width, GLint *height,
GLint *format, void **buffer);
GLboolean uglMesaSetColor (GLubyte index, GLfloat red,
GLfloat green, GLfloat blue);
#ifdef __cplusplus
}
#endif
#endif

880
include/GL/vms_x_fix.h Normal file
View File

@@ -0,0 +1,880 @@
/***************************************************************************
* *
* Repair definitions of Xlib when compileing with /name=(as_is) on VMS *
* *
* Author : Jouk Jansen (joukj@hrem.stm.tudelft.nl) *
* *
* Last revision : 22 August 2000 *
* *
***************************************************************************/
#ifndef VMS_X_FIX
#define VMS_X_FIX
#define _XRegisterFilterByType _XREGISTERFILTERBYTYPE
#define XAllocClassHint XALLOCCLASSHINT
#define XAllocColor XALLOCCOLOR
#define XAllocColorCells XALLOCCOLORCELLS
#define XAllocSizeHints XALLOCSIZEHINTS
#define XAllocWMHints XALLOCWMHINTS
#define XAutoRepeatOff XAUTOREPEATOFF
#define XAutoRepeatOn XAUTOREPEATON
#define XBaseFontNameListOfFontSet XBASEFONTNAMELISTOFFONTSET
#define XBell XBELL
#define XBitmapPad XBITMAPPAD
#define XChangeActivePointerGrab XCHANGEACTIVEPOINTERGRAB
#define XChangeGC XCHANGEGC
#define XChangeProperty XCHANGEPROPERTY
#define XChangeWindowAttributes XCHANGEWINDOWATTRIBUTES
#define XCheckIfEvent XCHECKIFEVENT
#define XCheckMaskEvent XCHECKMASKEVENT
#define XCheckTypedWindowEvent XCHECKTYPEDWINDOWEVENT
#define XCheckWindowEvent XCHECKWINDOWEVENT
#define XClearArea XCLEARAREA
#define XClearWindow XCLEARWINDOW
#define XClipBox XCLIPBOX
#define XCloseDisplay XCLOSEDISPLAY
#define XCloseIM XCLOSEIM
#define XConfigureWindow XCONFIGUREWINDOW
#define XConvertSelection XCONVERTSELECTION
#define XCopyArea XCOPYAREA
#define XCopyGC XCOPYGC
#define XCopyPlane XCOPYPLANE
#define XCreateBitmapFromData XCREATEBITMAPFROMDATA
#define XCreateColormap XCREATECOLORMAP
#define XCreateFontCursor XCREATEFONTCURSOR
#define XCreateFontSet XCREATEFONTSET
#define XCreateGC XCREATEGC
#define XCreateIC XCREATEIC
#define XCreateImage XCREATEIMAGE
#define XCreatePixmap XCREATEPIXMAP
#define XCreatePixmapCursor XCREATEPIXMAPCURSOR
#define XCreatePixmapFromBitmapData XCREATEPIXMAPFROMBITMAPDATA
#define XCreateRegion XCREATEREGION
#define XCreateSimpleWindow XCREATESIMPLEWINDOW
#define XCreateWindow XCREATEWINDOW
#define XDefaultScreenOfDisplay XDEFAULTSCREENOFDISPLAY
#define XDefineCursor XDEFINECURSOR
#define XDeleteProperty XDELETEPROPERTY
#define XDestroyIC XDESTROYIC
#define XDestroyRegion XDESTROYREGION
#define XDestroyWindow XDESTROYWINDOW
#define XDisplayName XDISPLAYNAME
#define XDisplayOfScreen XDISPLAYOFSCREEN
#define XDrawArc XDRAWARC
#define XDrawImageString XDRAWIMAGESTRING
#define XDrawImageString16 XDRAWIMAGESTRING16
#define XDrawLine XDRAWLINE
#define XDrawLines XDRAWLINES
#define XDrawPoint XDRAWPOINT
#define XDrawPoints XDRAWPOINTS
#define XDrawRectangle XDRAWRECTANGLE
#define XDrawSegments XDRAWSEGMENTS
#define XDrawString XDRAWSTRING
#define XDrawString16 XDRAWSTRING16
#define XEmptyRegion XEMPTYREGION
#define XEqualRegion XEQUALREGION
#define XEventsQueued XEVENTSQUEUED
#define XExtentsOfFontSet XEXTENTSOFFONTSET
#define XFillArc XFILLARC
#define XFillPolygon XFILLPOLYGON
#define XFillRectangle XFILLRECTANGLE
#define XFillRectangles XFILLRECTANGLES
#define XFilterEvent XFILTEREVENT
#define XFlush XFLUSH
#define XFontsOfFontSet XFONTSOFFONTSET
#define XFree XFREE
#define XFreeColormap XFREECOLORMAP
#define XFreeColors XFREECOLORS
#define XFreeCursor XFREECURSOR
#define XFreeFont XFREEFONT
#define XFreeFontInfo XFREEFONTINFO
#define XFreeFontNames XFREEFONTNAMES
#define XFreeFontSet XFREEFONTSET
#define XFreeGC XFREEGC
#define XFreeModifiermap XFREEMODIFIERMAP
#define XFreePixmap XFREEPIXMAP
#define XFreeStringList XFREESTRINGLIST
#define XGetAtomName XGETATOMNAME
#define XGetDefault XGETDEFAULT
#define XGetErrorDatabaseText XGETERRORDATABASETEXT
#define XGetErrorText XGETERRORTEXT
#define XGetFontProperty XGETFONTPROPERTY
#define XGetGCValues XGETGCVALUES
#define XGetGeometry XGETGEOMETRY
#define XGetICValues XGETICVALUES
#define XGetIMValues XGETIMVALUES
#define XGetImage XGETIMAGE
#define XGetKeyboardControl XGETKEYBOARDCONTROL
#define XGetModifierMapping XGETMODIFIERMAPPING
#define XGetMotionEvents XGETMOTIONEVENTS
#define XGetNormalHints XGETNORMALHINTS
#define XGetSelectionOwner XGETSELECTIONOWNER
#define XGetSubImage XGETSUBIMAGE
#define XGetVisualInfo XGETVISUALINFO
#define XGetWMColormapWindows XGETWMCOLORMAPWINDOWS
#define XGetWMHints XGETWMHINTS
#define XGetWMName XGETWMNAME
#define XGetWMNormalHints XGETWMNORMALHINTS
#define XGetWindowAttributes XGETWINDOWATTRIBUTES
#define XGetWindowProperty XGETWINDOWPROPERTY
#define XGrabKeyboard XGRABKEYBOARD
#define XGrabPointer XGRABPOINTER
#define XGrabServer XGRABSERVER
#define XHeightOfScreen XHEIGHTOFSCREEN
#define XIfEvent XIFEVENT
#define XInternAtom XINTERNATOM
#define XIntersectRegion XINTERSECTREGION
#define XKeycodeToKeysym XKEYCODETOKEYSYM
#define XKeysymToKeycode XKEYSYMTOKEYCODE
#define XKeysymToString XKEYSYMTOSTRING
#define XListFonts XLISTFONTS
#define XListFontsWithInfo XLISTFONTSWITHINFO
#define XListPixmapFormats XLISTPIXMAPFORMATS
#define XListProperties XLISTPROPERTIES
#define XLoadQueryFont XLOADQUERYFONT
#define XLookupString XLOOKUPSTRING
#define XLowerWindow XLOWERWINDOW
#define XMapRaised XMAPRAISED
#define XMapWindow XMAPWINDOW
#define XMatchVisualInfo XMATCHVISUALINFO
#define XMoveResizeWindow XMOVERESIZEWINDOW
#define XMoveWindow XMOVEWINDOW
#define XNextEvent XNEXTEVENT
#define XOffsetRegion XOFFSETREGION
#define XOpenDisplay XOPENDISPLAY
#define XOpenIM XOPENIM
#define XParseColor XPARSECOLOR
#define XParseGeometry XPARSEGEOMETRY
#define XPeekEvent XPEEKEVENT
#define XPending XPENDING
#define XPointInRegion XPOINTINREGION
#define XPolygonRegion XPOLYGONREGION
#define XPutBackEvent XPUTBACKEVENT
#define XPutImage XPUTIMAGE
#define XQueryColor XQUERYCOLOR
#define XQueryColors XQUERYCOLORS
#define XQueryExtension XQUERYEXTENSION
#define XQueryPointer XQUERYPOINTER
#define XQueryTree XQUERYTREE
#define XRaiseWindow XRAISEWINDOW
#define XReconfigureWMWindow XRECONFIGUREWMWINDOW
#define XRectInRegion XRECTINREGION
#define XRefreshKeyboardMapping XREFRESHKEYBOARDMAPPING
#define XReparentWindow XREPARENTWINDOW
#define XResizeWindow XRESIZEWINDOW
#define XRestackWindows XRESTACKWINDOWS
#define XRootWindowOfScreen XROOTWINDOWOFSCREEN
#define XScreenNumberOfScreen XSCREENNUMBEROFSCREEN
#define XSelectAsyncEvent XSELECTASYNCEVENT
#define XSelectAsyncInput XSELECTASYNCINPUT
#define XSelectInput XSELECTINPUT
#define XSendEvent XSENDEVENT
#define XServerVendor XSERVERVENDOR
#define XSetBackground XSETBACKGROUND
#define XSetClassHint XSETCLASSHINT
#define XSetClipMask XSETCLIPMASK
#define XSetClipOrigin XSETCLIPORIGIN
#define XSetClipRectangles XSETCLIPRECTANGLES
#define XSetCloseDownMode XSETCLOSEDOWNMODE
#define XSetCommand XSETCOMMAND
#define XSetDashes XSETDASHES
#define XSetErrorHandler XSETERRORHANDLER
#define XSetFillStyle XSETFILLSTYLE
#define XSetFont XSETFONT
#define XSetForeground XSETFOREGROUND
#define XSetFunction XSETFUNCTION
#define XSetGraphicsExposures XSETGRAPHICSEXPOSURES
#define XSetICFocus XSETICFOCUS
#define XSetICValues XSETICVALUES
#define XSetIOErrorHandler XSETIOERRORHANDLER
#define XSetInputFocus XSETINPUTFOCUS
#define XSetLineAttributes XSETLINEATTRIBUTES
#define XSetLocaleModifiers XSETLOCALEMODIFIERS
#define XSetNormalHints XSETNORMALHINTS
#define XSetRegion XSETREGION
#define XSetSelectionOwner XSETSELECTIONOWNER
#define XSetStipple XSETSTIPPLE
#define XSetSubwindowMode XSETSUBWINDOWMODE
#define XSetTSOrigin XSETTSORIGIN
#define XSetTile XSETTILE
#define XSetTransientForHint XSETTRANSIENTFORHINT
#define XSetWMColormapWindows XSETWMCOLORMAPWINDOWS
#define XSetWMHints XSETWMHINTS
#define XSetWMIconName XSETWMICONNAME
#define XSetWMName XSETWMNAME
#define XSetWMNormalHints XSETWMNORMALHINTS
#define XSetWMProperties XSETWMPROPERTIES
#define XSetWMProtocols XSETWMPROTOCOLS
#define XSetWindowBackground XSETWINDOWBACKGROUND
#define XSetWindowBackgroundPixmap XSETWINDOWBACKGROUNDPIXMAP
#define XSetWindowColormap XSETWINDOWCOLORMAP
#define XShapeCombineMask XSHAPECOMBINEMASK
#define XShapeCombineRectangles XSHAPECOMBINERECTANGLES
#define XShapeGetRectangles XSHAPEGETRECTANGLES
#define XShrinkRegion XSHRINKREGION
#define XStoreColor XSTORECOLOR
#define XStoreColors XSTORECOLORS
#define XStoreName XSTORENAME
#define XStringToKeysym XSTRINGTOKEYSYM
#define XSubtractRegion XSUBTRACTREGION
#define XSupportsLocale XSUPPORTSLOCALE
#define XSync XSYNC
#define XSynchronize XSYNCHRONIZE
#define XTextExtents XTEXTEXTENTS
#define XTextExtents16 XTEXTEXTENTS16
#define XTextWidth XTEXTWIDTH
#define XTextWidth16 XTEXTWIDTH16
#define XTranslateCoordinates XTRANSLATECOORDINATES
#define XUndefineCursor XUNDEFINECURSOR
#define XUngrabKeyboard XUNGRABKEYBOARD
#define XUngrabPointer XUNGRABPOINTER
#define XUngrabServer XUNGRABSERVER
#define XUnionRectWithRegion XUNIONRECTWITHREGION
#define XUnionRegion XUNIONREGION
#define XUnmapWindow XUNMAPWINDOW
#define _XUnregisterFilter _XUNREGISTERFILTER
#define XUnsetICFocus XUNSETICFOCUS
#define XVaCreateNestedList XVACREATENESTEDLIST
#define XVisualIDFromVisual XVISUALIDFROMVISUAL
#define XWidthOfScreen XWIDTHOFSCREEN
#define XWindowEvent XWINDOWEVENT
#define XWithdrawWindow XWITHDRAWWINDOW
#define XXorRegion XXORREGION
#define XmAddProtocolCallback XMADDPROTOCOLCALLBACK
#define XmAddProtocols XMADDPROTOCOLS
#define XmChangeColor XMCHANGECOLOR
#define XmClipboardCopy XMCLIPBOARDCOPY
#define XmClipboardEndCopy XMCLIPBOARDENDCOPY
#define XmClipboardInquireLength XMCLIPBOARDINQUIRELENGTH
#define XmClipboardLock XMCLIPBOARDLOCK
#define XmClipboardRetrieve XMCLIPBOARDRETRIEVE
#define XmClipboardStartCopy XMCLIPBOARDSTARTCOPY
#define XmClipboardUnlock XMCLIPBOARDUNLOCK
#define XmCreateArrowButton XMCREATEARROWBUTTON
#define XmCreateArrowButtonGadget XMCREATEARROWBUTTONGADGET
#define XmCreateCascadeButton XMCREATECASCADEBUTTON
#define XmCreateDialogShell XMCREATEDIALOGSHELL
#define XmCreateDragIcon XMCREATEDRAGICON
#define XmCreateDrawingArea XMCREATEDRAWINGAREA
#define XmCreateDrawnButton XMCREATEDRAWNBUTTON
#define XmCreateFileSelectionBox XMCREATEFILESELECTIONBOX
#define XmCreateFileSelectionDialog XMCREATEFILESELECTIONDIALOG
#define XmCreateForm XMCREATEFORM
#define XmCreateFormDialog XMCREATEFORMDIALOG
#define XmCreateFrame XMCREATEFRAME
#define XmCreateInformationDialog XMCREATEINFORMATIONDIALOG
#define XmCreateLabelGadget XMCREATELABELGADGET
#define XmCreateMainWindow XMCREATEMAINWINDOW
#define XmCreateMenuBar XMCREATEMENUBAR
#define XmCreateMessageBox XMCREATEMESSAGEBOX
#define XmCreateMessageDialog XMCREATEMESSAGEDIALOG
#define XmCreateOptionMenu XMCREATEOPTIONMENU
#define XmCreatePanedWindow XMCREATEPANEDWINDOW
#define XmCreatePopupMenu XMCREATEPOPUPMENU
#define XmCreatePromptDialog XMCREATEPROMPTDIALOG
#define XmCreatePulldownMenu XMCREATEPULLDOWNMENU
#define XmCreatePushButton XMCREATEPUSHBUTTON
#define XmCreatePushButtonGadget XMCREATEPUSHBUTTONGADGET
#define XmCreateQuestionDialog XMCREATEQUESTIONDIALOG
#define XmCreateRadioBox XMCREATERADIOBOX
#define XmCreateRowColumn XMCREATEROWCOLUMN
#define XmCreateScale XMCREATESCALE
#define XmCreateScrollBar XMCREATESCROLLBAR
#define XmCreateScrolledList XMCREATESCROLLEDLIST
#define XmCreateScrolledText XMCREATESCROLLEDTEXT
#define XmCreateScrolledWindow XMCREATESCROLLEDWINDOW
#define XmCreateSelectionDialog XMCREATESELECTIONDIALOG
#define XmCreateSeparator XMCREATESEPARATOR
#define XmCreateSeparatorGadget XMCREATESEPARATORGADGET
#define XmCreateTemplateDialog XMCREATETEMPLATEDIALOG
#define XmCreateText XMCREATETEXT
#define XmCreateTextField XMCREATETEXTFIELD
#define XmCreateToggleButton XMCREATETOGGLEBUTTON
#define XmCreateToggleButtonGadget XMCREATETOGGLEBUTTONGADGET
#define XmDragStart XMDRAGSTART
#define XmDropSiteRegister XMDROPSITEREGISTER
#define XmDropSiteUnregister XMDROPSITEUNREGISTER
#define XmDropSiteUpdate XMDROPSITEUPDATE
#define XmDropTransferStart XMDROPTRANSFERSTART
#define XmFileSelectionBoxGetChild XMFILESELECTIONBOXGETCHILD
#define XmFileSelectionDoSearch XMFILESELECTIONDOSEARCH
#define XmFontListAppendEntry XMFONTLISTAPPENDENTRY
#define XmFontListCopy XMFONTLISTCOPY
#define XmFontListCreate XMFONTLISTCREATE
#define XmFontListEntryCreate XMFONTLISTENTRYCREATE
#define XmFontListEntryFree XMFONTLISTENTRYFREE
#define XmFontListEntryGetFont XMFONTLISTENTRYGETFONT
#define XmFontListEntryGetTag XMFONTLISTENTRYGETTAG
#define XmFontListEntryLoad XMFONTLISTENTRYLOAD
#define XmFontListFree XMFONTLISTFREE
#define XmFontListFreeFontContext XMFONTLISTFREEFONTCONTEXT
#define XmFontListGetNextFont XMFONTLISTGETNEXTFONT
#define XmFontListInitFontContext XMFONTLISTINITFONTCONTEXT
#define XmFontListNextEntry XMFONTLISTNEXTENTRY
#define XmGetColors XMGETCOLORS
#define XmGetFocusWidget XMGETFOCUSWIDGET
#define XmGetMenuCursor XMGETMENUCURSOR
#define XmGetPixmapByDepth XMGETPIXMAPBYDEPTH
#define XmGetTearOffControl XMGETTEAROFFCONTROL
#define XmGetXmDisplay XMGETXMDISPLAY
#define XmImMbLookupString XMIMMBLOOKUPSTRING
#define XmImRegister XMIMREGISTER
#define XmImSetFocusValues XMIMSETFOCUSVALUES
#define XmImSetValues XMIMSETVALUES
#define XmImUnregister XMIMUNREGISTER
#define XmImUnsetFocus XMIMUNSETFOCUS
#define XmInternAtom XMINTERNATOM
#define XmIsMotifWMRunning XMISMOTIFWMRUNNING
#define XmListAddItem XMLISTADDITEM
#define XmListAddItemUnselected XMLISTADDITEMUNSELECTED
#define XmListAddItemsUnselected XMLISTADDITEMSUNSELECTED
#define XmListDeleteAllItems XMLISTDELETEALLITEMS
#define XmListDeleteItemsPos XMLISTDELETEITEMSPOS
#define XmListDeletePos XMLISTDELETEPOS
#define XmListDeselectAllItems XMLISTDESELECTALLITEMS
#define XmListDeselectPos XMLISTDESELECTPOS
#define XmListGetKbdItemPos XMLISTGETKBDITEMPOS
#define XmListGetMatchPos XMLISTGETMATCHPOS
#define XmListGetSelectedPos XMLISTGETSELECTEDPOS
#define XmListPosSelected XMLISTPOSSELECTED
#define XmListSelectItem XMLISTSELECTITEM
#define XmListSelectPos XMLISTSELECTPOS
#define XmListSetBottomPos XMLISTSETBOTTOMPOS
#define XmListSetItem XMLISTSETITEM
#define XmListSetKbdItemPos XMLISTSETKBDITEMPOS
#define XmListSetPos XMLISTSETPOS
#define XmMainWindowSetAreas XMMAINWINDOWSETAREAS
#define XmMenuPosition XMMENUPOSITION
#define XmMessageBoxGetChild XMMESSAGEBOXGETCHILD
#define XmOptionButtonGadget XMOPTIONBUTTONGADGET
#define XmOptionLabelGadget XMOPTIONLABELGADGET
#define XmProcessTraversal XMPROCESSTRAVERSAL
#define XmQmotif XMQMOTIF
#define XmRemoveProtocolCallback XMREMOVEPROTOCOLCALLBACK
#define XmRepTypeGetId XMREPTYPEGETID
#define XmRepTypeGetRecord XMREPTYPEGETRECORD
#define XmRepTypeRegister XMREPTYPEREGISTER
#define XmRepTypeValidValue XMREPTYPEVALIDVALUE
#define XmScrollBarSetValues XMSCROLLBARSETVALUES
#define XmScrolledWindowSetAreas XMSCROLLEDWINDOWSETAREAS
#define XmSelectionBoxGetChild XMSELECTIONBOXGETCHILD
#define XmStringByteCompare XMSTRINGBYTECOMPARE
#define XmStringCompare XMSTRINGCOMPARE
#define XmStringConcat XMSTRINGCONCAT
#define XmStringCopy XMSTRINGCOPY
#define XmStringCreate XMSTRINGCREATE
#define XmStringCreateLocalized XMSTRINGCREATELOCALIZED
#define XmStringCreateLtoR XMSTRINGCREATELTOR
#define XmStringCreateSimple XMSTRINGCREATESIMPLE
#define XmStringDraw XMSTRINGDRAW
#define XmStringDrawUnderline XMSTRINGDRAWUNDERLINE
#define XmStringExtent XMSTRINGEXTENT
#define XmStringFree XMSTRINGFREE
#define XmStringFreeContext XMSTRINGFREECONTEXT
#define XmStringGetLtoR XMSTRINGGETLTOR
#define XmStringGetNextComponent XMSTRINGGETNEXTCOMPONENT
#define XmStringGetNextSegment XMSTRINGGETNEXTSEGMENT
#define XmStringInitContext XMSTRINGINITCONTEXT
#define XmStringLength XMSTRINGLENGTH
#define XmStringLtoRCreate XMSTRINGLTORCREATE
#define XmStringNConcat XMSTRINGNCONCAT
#define XmStringSegmentCreate XMSTRINGSEGMENTCREATE
#define XmStringWidth XMSTRINGWIDTH
#define XmTextClearSelection XMTEXTCLEARSELECTION
#define XmTextFieldGetEditable XMTEXTFIELDGETEDITABLE
#define XmTextFieldGetInsertionPosition XMTEXTFIELDGETINSERTIONPOSITION
#define XmTextFieldGetLastPosition XMTEXTFIELDGETLASTPOSITION
#define XmTextFieldGetSelection XMTEXTFIELDGETSELECTION
#define XmTextFieldGetString XMTEXTFIELDGETSTRING
#define XmTextFieldInsert XMTEXTFIELDINSERT
#define XmTextFieldRemove XMTEXTFIELDREMOVE
#define XmTextFieldSetSelection XMTEXTFIELDSETSELECTION
#define XmTextFieldSetString XMTEXTFIELDSETSTRING
#define XmTextGetCursorPosition XMTEXTGETCURSORPOSITION
#define XmTextGetInsertionPosition XMTEXTGETINSERTIONPOSITION
#define XmTextGetLastPosition XMTEXTGETLASTPOSITION
#define XmTextGetMaxLength XMTEXTGETMAXLENGTH
#define XmTextGetSelection XMTEXTGETSELECTION
#define XmTextGetSelectionPosition XMTEXTGETSELECTIONPOSITION
#define XmTextGetString XMTEXTGETSTRING
#define XmTextInsert XMTEXTINSERT
#define XmTextRemove XMTEXTREMOVE
#define XmTextReplace XMTEXTREPLACE
#define XmTextSetCursorPosition XMTEXTSETCURSORPOSITION
#define XmTextSetHighlight XMTEXTSETHIGHLIGHT
#define XmTextSetInsertionPosition XMTEXTSETINSERTIONPOSITION
#define XmTextSetSelection XMTEXTSETSELECTION
#define XmTextSetString XMTEXTSETSTRING
#define XmToggleButtonGadgetGetState XMTOGGLEBUTTONGADGETGETSTATE
#define XmToggleButtonGadgetSetState XMTOGGLEBUTTONGADGETSETSTATE
#define XmToggleButtonGetState XMTOGGLEBUTTONGETSTATE
#define XmToggleButtonSetState XMTOGGLEBUTTONSETSTATE
#define XmUpdateDisplay XMUPDATEDISPLAY
#define XmVaCreateSimpleRadioBox XMVACREATESIMPLERADIOBOX
#define XmbDrawString XMBDRAWSTRING
#define XmbLookupString XMBLOOKUPSTRING
#define XmbResetIC XMBRESETIC
#define XmbSetWMProperties XMBSETWMPROPERTIES
#define XmbTextEscapement XMBTEXTESCAPEMENT
#define XmbTextExtents XMBTEXTEXTENTS
#define XmbTextListToTextProperty XMBTEXTLISTTOTEXTPROPERTY
#define XmbTextPropertyToTextList XMBTEXTPROPERTYTOTEXTLIST
#define XmuClientWindow XMUCLIENTWINDOW
#define XmuPrintDefaultErrorMessage XMUPRINTDEFAULTERRORMESSAGE
#define XrmGetDatabase XRMGETDATABASE
#define XrmGetResource XRMGETRESOURCE
#define XrmPutStringResource XRMPUTSTRINGRESOURCE
#define XrmQuarkToString XRMQUARKTOSTRING
#define XrmStringToQuark XRMSTRINGTOQUARK
#define XtAddCallback XTADDCALLBACK
#define XtAddCallbacks XTADDCALLBACKS
#define XtAddEventHandler XTADDEVENTHANDLER
#define XtAddGrab XTADDGRAB
#define XtAllocateGC XTALLOCATEGC
#define XtAppAddActions XTAPPADDACTIONS
#define XtAppAddInput XTAPPADDINPUT
#define XtAppAddTimeOut XTAPPADDTIMEOUT
#define XtAppCreateShell XTAPPCREATESHELL
#define XtAppInitialize XTAPPINITIALIZE
#define XtAppNextEvent XTAPPNEXTEVENT
#define XtAppPeekEvent XTAPPPEEKEVENT
#define XtAppPending XTAPPPENDING
#define XtAppProcessEvent XTAPPPROCESSEVENT
#define XtAppSetErrorHandler XTAPPSETERRORHANDLER
#define XtAppSetFallbackResources XTAPPSETFALLBACKRESOURCES
#define XtAppSetWarningHandler XTAPPSETWARNINGHANDLER
#define XtAppSetWarningMsgHandler XTAPPSETWARNINGMSGHANDLER
#define XtAppWarning XTAPPWARNING
#define XtCallActionProc XTCALLACTIONPROC
#define XtCallCallbackList XTCALLCALLBACKLIST
#define XtCallCallbacks XTCALLCALLBACKS
#define XtConfigureWidget XTCONFIGUREWIDGET
#define XtConvertAndStore XTCONVERTANDSTORE
#define XtCreateApplicationContext XTCREATEAPPLICATIONCONTEXT
#define XtCreateManagedWidget XTCREATEMANAGEDWIDGET
#define XtCreatePopupShell XTCREATEPOPUPSHELL
#define XtCreateWidget XTCREATEWIDGET
#define XtDatabase XTDATABASE
#define XtDestroyWidget XTDESTROYWIDGET
#define XtDisownSelection XTDISOWNSELECTION
#define XtDispatchEvent XTDISPATCHEVENT
#define XtDisplayOfObject XTDISPLAYOFOBJECT
#define XtDisplayStringConvWarning XTDISPLAYSTRINGCONVWARNING
#define XtDisplayToApplicationContext XTDISPLAYTOAPPLICATIONCONTEXT
#define XtAppAddWorkProc XTAPPADDWORKPROC
#define XtRemoveWorkProc XTREMOVEWORKPROC
#define XtFree XTFREE
#define XtGetActionKeysym XTGETACTIONKEYSYM
#define XtGetActionList XTGETACTIONLIST
#define XtGetApplicationNameAndClass XTGETAPPLICATIONNAMEANDCLASS
#define XtGetApplicationResources XTGETAPPLICATIONRESOURCES
#define XtGetGC XTGETGC
#define XtGetMultiClickTime XTGETMULTICLICKTIME
#define XtGetSelectionValue XTGETSELECTIONVALUE
#define XtGetSelectionValues XTGETSELECTIONVALUES
#define XtGetSubresources XTGETSUBRESOURCES
#define XtGetValues XTGETVALUES
#define XtGrabKeyboard XTGRABKEYBOARD
#define XtGrabPointer XTGRABPOINTER
#define XtHasCallbacks XTHASCALLBACKS
#define XtInitializeWidgetClass XTINITIALIZEWIDGETCLASS
#define XtInsertEventHandler XTINSERTEVENTHANDLER
#define XtIsManaged XTISMANAGED
#define XtIsObject XTISOBJECT
#define XtIsSensitive XTISSENSITIVE
#define XtIsSubclass XTISSUBCLASS
#define XtLastTimestampProcessed XTLASTTIMESTAMPPROCESSED
#define XtMakeGeometryRequest XTMAKEGEOMETRYREQUEST
#define XtMakeResizeRequest XTMAKERESIZEREQUEST
#define XtMalloc XTMALLOC
#define XtManageChild XTMANAGECHILD
#define XtManageChildren XTMANAGECHILDREN
#define XtMergeArgLists XTMERGEARGLISTS
#define XtMoveWidget XTMOVEWIDGET
#define XtName XTNAME
#define XtNameToWidget XTNAMETOWIDGET
#define XtOpenDisplay XTOPENDISPLAY
#define XtOverrideTranslations XTOVERRIDETRANSLATIONS
#define XtOwnSelection XTOWNSELECTION
#define XtParseTranslationTable XTPARSETRANSLATIONTABLE
#define XtPopdown XTPOPDOWN
#define XtPopup XTPOPUP
#define XtQueryGeometry XTQUERYGEOMETRY
#define XtRealizeWidget XTREALIZEWIDGET
#define XtRealloc XTREALLOC
#define XtReleaseGC XTRELEASEGC
#define XtRemoveAllCallbacks XTREMOVEALLCALLBACKS
#define XtRemoveCallback XTREMOVECALLBACK
#define XtRemoveEventHandler XTREMOVEEVENTHANDLER
#define XtRemoveGrab XTREMOVEGRAB
#define XtRemoveInput XTREMOVEINPUT
#define XtRemoveTimeOut XTREMOVETIMEOUT
#define XtResizeWidget XTRESIZEWIDGET
#define XtResolvePathname XTRESOLVEPATHNAME
#define XtSetKeyboardFocus XTSETKEYBOARDFOCUS
#define XtSetMappedWhenManaged XTSETMAPPEDWHENMANAGED
#define XtSetSensitive XTSETSENSITIVE
#define XtSetTypeConverter XTSETTYPECONVERTER
#define XtSetValues XTSETVALUES
#define XtShellStrings XTSHELLSTRINGS
#define XtStrings XTSTRINGS
#define XtToolkitInitialize XTTOOLKITINITIALIZE
#define XtTranslateCoords XTTRANSLATECOORDS
#define XtTranslateKeycode XTTRANSLATEKEYCODE
#define XtUngrabKeyboard XTUNGRABKEYBOARD
#define XtUngrabPointer XTUNGRABPOINTER
#define XtUnmanageChild XTUNMANAGECHILD
#define XtUnmanageChildren XTUNMANAGECHILDREN
#define XtUnrealizeWidget XTUNREALIZEWIDGET
#define XtVaCreateManagedWidget XTVACREATEMANAGEDWIDGET
#define XtVaCreateWidget XTVACREATEWIDGET
#define XtVaGetValues XTVAGETVALUES
#define XtVaSetValues XTVASETVALUES
#define XtWarning XTWARNING
#define XtWidgetToApplicationContext XTWIDGETTOAPPLICATIONCONTEXT
#define XtWindowOfObject XTWINDOWOFOBJECT
#define XtWindowToWidget XTWINDOWTOWIDGET
#define XwcDrawString XWCDRAWSTRING
#define XwcFreeStringList XWCFREESTRINGLIST
#define XwcTextEscapement XWCTEXTESCAPEMENT
#define XwcTextExtents XWCTEXTEXTENTS
#define XwcTextListToTextProperty XWCTEXTLISTTOTEXTPROPERTY
#define XwcTextPropertyToTextList XWCTEXTPROPERTYTOTEXTLIST
#define _XmBottomShadowColorDefault _XMBOTTOMSHADOWCOLORDEFAULT
#define _XmClearBorder _XMCLEARBORDER
#define _XmConfigureObject _XMCONFIGUREOBJECT
#define _XmDestroyParentCallback _XMDESTROYPARENTCALLBACK
#define _XmDrawArrow _XMDRAWARROW
#define _XmDrawShadows _XMDRAWSHADOWS
#define _XmFontListGetDefaultFont _XMFONTLISTGETDEFAULTFONT
#define _XmFromHorizontalPixels _XMFROMHORIZONTALPIXELS
#define _XmFromVerticalPixels _XMFROMVERTICALPIXELS
#define _XmGetClassExtensionPtr _XMGETCLASSEXTENSIONPTR
#define _XmGetDefaultFontList _XMGETDEFAULTFONTLIST
#define _XmGetTextualDragIcon _XMGETTEXTUALDRAGICON
#define _XmGetWidgetExtData _XMGETWIDGETEXTDATA
#define _XmGrabKeyboard _XMGRABKEYBOARD
#define _XmGrabPointer _XMGRABPOINTER
#define _XmInheritClass _XMINHERITCLASS
#define _XmInputInGadget _XMINPUTINGADGET
#define _XmMakeGeometryRequest _XMMAKEGEOMETRYREQUEST
#define _XmMenuPopDown _XMMENUPOPDOWN
#define _XmMoveObject _XMMOVEOBJECT
#define _XmNavigChangeManaged _XMNAVIGCHANGEMANAGED
#define _XmOSBuildFileList _XMOSBUILDFILELIST
#define _XmOSFileCompare _XMOSFILECOMPARE
#define _XmOSFindPatternPart _XMOSFINDPATTERNPART
#define _XmOSQualifyFileSpec _XMOSQUALIFYFILESPEC
#define _XmPostPopupMenu _XMPOSTPOPUPMENU
#define _XmPrimitiveEnter _XMPRIMITIVEENTER
#define _XmPrimitiveLeave _XMPRIMITIVELEAVE
#define _XmRedisplayGadgets _XMREDISPLAYGADGETS
#define _XmShellIsExclusive _XMSHELLISEXCLUSIVE
#define _XmStringDraw _XMSTRINGDRAW
#define _XmStringGetTextConcat _XMSTRINGGETTEXTCONCAT
#define _XmStrings _XMSTRINGS
#define _XmToHorizontalPixels _XMTOHORIZONTALPIXELS
#define _XmToVerticalPixels _XMTOVERTICALPIXELS
#define _XmTopShadowColorDefault _XMTOPSHADOWCOLORDEFAULT
#define _Xm_fastPtr _XM_FASTPTR
#define _XtCheckSubclassFlag _XTCHECKSUBCLASSFLAG
#define _XtInherit _XTINHERIT
#define _XtInheritTranslations _XTINHERITTRANSLATIONS
#define applicationShellWidgetClass APPLICATIONSHELLWIDGETCLASS
#define compositeWidgetClass COMPOSITEWIDGETCLASS
#define overrideShellWidgetClass OVERRIDESHELLWIDGETCLASS
#define shellWidgetClass SHELLWIDGETCLASS
#define topLevelShellClassRec TOPLEVELSHELLCLASSREC
#define topLevelShellWidgetClass TOPLEVELSHELLWIDGETCLASS
#define transientShellWidgetClass TRANSIENTSHELLWIDGETCLASS
#define vendorShellClassRec VENDORSHELLCLASSREC
#define vendorShellWidgetClass VENDORSHELLWIDGETCLASS
#define wmShellWidgetClass WMSHELLWIDGETCLASS
#define xmArrowButtonWidgetClass XMARROWBUTTONWIDGETCLASS
#define xmCascadeButtonClassRec XMCASCADEBUTTONCLASSREC
#define xmCascadeButtonGadgetClass XMCASCADEBUTTONGADGETCLASS
#define xmCascadeButtonWidgetClass XMCASCADEBUTTONWIDGETCLASS
#define xmDialogShellWidgetClass XMDIALOGSHELLWIDGETCLASS
#define xmDrawingAreaWidgetClass XMDRAWINGAREAWIDGETCLASS
#define xmDrawnButtonWidgetClass XMDRAWNBUTTONWIDGETCLASS
#define xmFileSelectionBoxWidgetClass XMFILESELECTIONBOXWIDGETCLASS
#define xmFormWidgetClass XMFORMWIDGETCLASS
#define xmFrameWidgetClass XMFRAMEWIDGETCLASS
#define xmGadgetClass XMGADGETCLASS
#define xmLabelGadgetClass XMLABELGADGETCLASS
#define xmLabelWidgetClass XMLABELWIDGETCLASS
#define xmListWidgetClass XMLISTWIDGETCLASS
#define xmMainWindowWidgetClass XMMAINWINDOWWIDGETCLASS
#define xmManagerClassRec XMMANAGERCLASSREC
#define xmManagerWidgetClass XMMANAGERWIDGETCLASS
#define xmMenuShellWidgetClass XMMENUSHELLWIDGETCLASS
#define xmMessageBoxWidgetClass XMMESSAGEBOXWIDGETCLASS
#define xmPrimitiveClassRec XMPRIMITIVECLASSREC
#define xmPrimitiveWidgetClass XMPRIMITIVEWIDGETCLASS
#define xmPushButtonClassRec XMPUSHBUTTONCLASSREC
#define xmPushButtonGadgetClass XMPUSHBUTTONGADGETCLASS
#define xmPushButtonWidgetClass XMPUSHBUTTONWIDGETCLASS
#define xmRowColumnWidgetClass XMROWCOLUMNWIDGETCLASS
#define xmSashWidgetClass XMSASHWIDGETCLASS
#define xmScrollBarWidgetClass XMSCROLLBARWIDGETCLASS
#define xmScrolledWindowClassRec XMSCROLLEDWINDOWCLASSREC
#define xmScrolledWindowWidgetClass XMSCROLLEDWINDOWWIDGETCLASS
#define xmSeparatorGadgetClass XMSEPARATORGADGETCLASS
#define xmSeparatorWidgetClass XMSEPARATORWIDGETCLASS
#define xmTextFieldWidgetClass XMTEXTFIELDWIDGETCLASS
#define xmTextWidgetClass XMTEXTWIDGETCLASS
#define xmToggleButtonGadgetClass XMTOGGLEBUTTONGADGETCLASS
#define xmToggleButtonWidgetClass XMTOGGLEBUTTONWIDGETCLASS
#define XtRegisterDrawable _XTREGISTERWINDOW
#define XtUnregisterDrawable _XTUNREGISTERWINDOW
#define XQueryFont XQUERYFONT
#define XSetPlaneMask XSETPLANEMASK
#define XChangeKeyboardControl XCHANGEKEYBOARDCONTROL
#define XDestroySubwindows XDESTROYSUBWINDOWS
#define XFreeDeviceList XFREEDEVICELIST
#define XFreeDeviceState XFREEDEVICESTATE
#define XGetExtensionVersion XGETEXTENSIONVERSION
#define XGetRGBColormaps XGETRGBCOLORMAPS
#define XIconifyWindow XICONIFYWINDOW
#define XInstallColormap XINSTALLCOLORMAP
#define XListInputDevices XLISTINPUTDEVICES
#define XLookupKeysym XLOOKUPKEYSYM
#define XOpenDevice XOPENDEVICE
#define XQueryDeviceState XQUERYDEVICESTATE
#define XSelectExtensionEvent XSELECTEXTENSIONEVENT
#define XWarpPointer XWARPPOINTER
#define XmuLookupStandardColormap XMULOOKUPSTANDARDCOLORMAP
#define XAllocNamedColor XALLOCNAMEDCOLOR
#define XBlackPixelOfScreen XBLACKPIXELOFSCREEN
#define XDefaultColormap XDEFAULTCOLORMAP
#define XDefaultColormapOfScreen XDEFAULTCOLORMAPOFSCREEN
#define XDefaultDepth XDEFAULTDEPTH
#define XDefaultScreen XDEFAULTSCREEN
#define XDefaultVisual XDEFAULTVISUAL
#define XSetIconName XSETICONNAME
#define XtInitialize XTINITIALIZE
#define XtMainLoop XTMAINLOOP
#define DtSaverGetWindows DTSAVERGETWINDOWS
#define XAddHosts XADDHOSTS
#define XDisableAccessControl XDISABLEACCESSCONTROL
#define XEnableAccessControl XENABLEACCESSCONTROL
#define XFillArcs XFILLARCS
#define XForceScreenSaver XFORCESCREENSAVER
#define XGetScreenSaver XGETSCREENSAVER
#define XListHosts XLISTHOSTS
#define XReadBitmapFile XREADBITMAPFILE
#define XRemoveHosts XREMOVEHOSTS
#define XResetScreenSaver XRESETSCREENSAVER
#define XResourceManagerString XRESOURCEMANAGERSTRING
#define XSetScreenSaver XSETSCREENSAVER
#define XStringListToTextProperty XSTRINGLISTTOTEXTPROPERTY
#define XrmDestroyDatabase XRMDESTROYDATABASE
#define XrmGetFileDatabase XRMGETFILEDATABASE
#define XrmGetStringDatabase XRMGETSTRINGDATABASE
#define XrmInitialize XRMINITIALIZE
#define XrmMergeDatabases XRMMERGEDATABASES
#define XrmParseCommand XRMPARSECOMMAND
#define XrmPutLineResource XRMPUTLINERESOURCE
#define XrmQPutStringResource XRMQPUTSTRINGRESOURCE
#define XrmStringToBindingQuarkList XRMSTRINGTOBINDINGQUARKLIST
#define XrmStringToQuark XRMSTRINGTOQUARK
#define XmCreateLabel XMCREATELABEL
#ifdef __cplusplus
extern "C" {
#endif
extern void XtFree(char*);
#ifdef __cplusplus
}
#endif
#define pthread_attr_create PTHREAD_ATTR_CREATE
#define pthread_attr_delete PTHREAD_ATTR_DELETE
#define pthread_attr_destroy PTHREAD_ATTR_DESTROY
#define pthread_attr_getdetach_np PTHREAD_ATTR_GETDETACH_NP
#define pthread_attr_getguardsize_np PTHREAD_ATTR_GETGUARDSIZE_NP
#define pthread_attr_getinheritsched PTHREAD_ATTR_GETINHERITSCHED
#define pthread_attr_getprio PTHREAD_ATTR_GETPRIO
#define pthread_attr_getsched PTHREAD_ATTR_GETSCHED
#define pthread_attr_getschedparam PTHREAD_ATTR_GETSCHEDPARAM
#define pthread_attr_getstacksize PTHREAD_ATTR_GETSTACKSIZE
#define pthread_attr_init PTHREAD_ATTR_INIT
#define pthread_attr_setdetach_np PTHREAD_ATTR_SETDETACH_NP
#define pthread_attr_setdetachstate PTHREAD_ATTR_SETDETACHSTATE
#define pthread_attr_setguardsize_np PTHREAD_ATTR_SETGUARDSIZE_NP
#define pthread_attr_setinheritsched PTHREAD_ATTR_SETINHERITSCHED
#define pthread_attr_setprio PTHREAD_ATTR_SETPRIO
#define pthread_attr_setsched PTHREAD_ATTR_SETSCHED
#define pthread_attr_setschedparam PTHREAD_ATTR_SETSCHEDPARAM
#define pthread_attr_setschedpolicy PTHREAD_ATTR_SETSCHEDPOLICY
#define pthread_attr_setstacksize PTHREAD_ATTR_SETSTACKSIZE
#define pthread_cancel PTHREAD_CANCEL
#define pthread_cancel_e PTHREAD_CANCEL_E
#define pthread_cond_broadcast PTHREAD_COND_BROADCAST
#define pthread_cond_destroy PTHREAD_COND_DESTROY
#define pthread_cond_init PTHREAD_COND_INIT
#define pthread_cond_sig_preempt_int_np PTHREAD_COND_SIG_PREEMPT_INT_NP
#define pthread_cond_signal PTHREAD_COND_SIGNAL
#define pthread_cond_signal_int_np PTHREAD_COND_SIGNAL_INT_NP
#define pthread_cond_timedwait PTHREAD_COND_TIMEDWAIT
#define pthread_cond_wait PTHREAD_COND_WAIT
#define pthread_condattr_create PTHREAD_CONDATTR_CREATE
#define pthread_condattr_delete PTHREAD_CONDATTR_DELETE
#define pthread_condattr_init PTHREAD_CONDATTR_INIT
#define pthread_create PTHREAD_CREATE
#define pthread_delay_np PTHREAD_DELAY_NP
#define pthread_detach PTHREAD_DETACH
#define pthread_equal PTHREAD_EQUAL
#define pthread_exc_fetch_fp_np PTHREAD_EXC_FETCH_FP_NP
#define pthread_exc_handler_np PTHREAD_EXC_HANDLER_NP
#define pthread_exc_pop_ctx_np PTHREAD_EXC_POP_CTX_NP
#define pthread_exc_push_ctx_np PTHREAD_EXC_PUSH_CTX_NP
#define pthread_exc_savecontext_np PTHREAD_EXC_SAVECONTEXT_NP
#define pthread_exit PTHREAD_EXIT
#define pthread_get_expiration_np PTHREAD_GET_EXPIRATION_NP
#define pthread_getprio PTHREAD_GETPRIO
#define pthread_getschedparam PTHREAD_GETSCHEDPARAM
#define pthread_getscheduler PTHREAD_GETSCHEDULER
#define pthread_getspecific PTHREAD_GETSPECIFIC
#define pthread_getunique_np PTHREAD_GETUNIQUE_NP
#define pthread_join PTHREAD_JOIN
#define pthread_join32 PTHREAD_JOIN32
#define pthread_keycreate PTHREAD_KEYCREATE
#define pthread_key_create PTHREAD_KEY_CREATE
#define pthread_kill PTHREAD_KILL
#define pthread_lock_global_np PTHREAD_LOCK_GLOBAL_NP
#define pthread_mutex_destroy PTHREAD_MUTEX_DESTROY
#define pthread_mutex_init PTHREAD_MUTEX_INIT
#define pthread_mutex_lock PTHREAD_MUTEX_LOCK
#define pthread_mutex_trylock PTHREAD_MUTEX_TRYLOCK
#define pthread_mutex_unlock PTHREAD_MUTEX_UNLOCK
#define pthread_mutexattr_create PTHREAD_MUTEXATTR_CREATE
#define pthread_mutexattr_delete PTHREAD_MUTEXATTR_DELETE
#define pthread_mutexattr_destroy PTHREAD_MUTEXATTR_DESTROY
#define pthread_mutexattr_getkind_np PTHREAD_MUTEXATTR_GETKIND_NP
#define pthread_mutexattr_init PTHREAD_MUTEXATTR_INIT
#define pthread_mutexattr_setkind_np PTHREAD_MUTEXATTR_SETKIND_NP
#define pthread_mutexattr_settype_np PTHREAD_MUTEXATTR_SETTYPE_NP
#define pthread_once PTHREAD_ONCE
#define pthread_resume_np PTHREAD_RESUME_NP
#define pthread_self PTHREAD_SELF
#define pthread_setasynccancel PTHREAD_SETASYNCCANCEL
#define pthread_setcancel PTHREAD_SETCANCEL
#define pthread_setcancelstate PTHREAD_SETCANCELSTATE
#define pthread_setprio PTHREAD_SETPRIO
#define pthread_setschedparam PTHREAD_SETSCHEDPARAM
#define pthread_setscheduler PTHREAD_SETSCHEDULER
#define pthread_setspecific PTHREAD_SETSPECIFIC
#define pthread_suspend_np PTHREAD_SUSPEND_NP
#define pthread_testcancel PTHREAD_TESTCANCEL
#define pthread_unlock_global_np PTHREAD_UNLOCK_GLOBAL_NP
#define pthread_yield PTHREAD_YIELD
#define pthread_yield_np PTHREAD_YIELD_NP
#define XDefaultRootWindow XDEFAULTROOTWINDOW
#define XDisplayCells XDISPLAYCELLS
#define XMaxRequestSize XMAXREQUESTSIZE
#define XScreenOfDisplay XSCREENOFDISPLAY
#define XSetFillRule XSETFILLRULE
#define XmActivateProtocol XMACTIVATEPROTOCOL
#define XmCreateBulletinBoardDialog XMCREATEBULLETINBOARDDIALOG
#define XmCreateErrorDialog XMCREATEERRORDIALOG
#define XmCreateWarningDialog XMCREATEWARNINGDIALOG
#define XmCvtCTToXmString XMCVTCTTOXMSTRING
#define XmDestroyPixmap XMDESTROYPIXMAP
#define XmGetPixmap XMGETPIXMAP
#define XmInstallImage XMINSTALLIMAGE
#define XmListAddItems XMLISTADDITEMS
#define XmListDeleteItem XMLISTDELETEITEM
#define XmListItemExists XMLISTITEMEXISTS
#define XmListItemPos XMLISTITEMPOS
#define XmListReplaceItems XMLISTREPLACEITEMS
#define XmListReplaceItemsPos XMLISTREPLACEITEMSPOS
#define XmRemoveProtocols XMREMOVEPROTOCOLS
#define XmRemoveTabGroup XMREMOVETABGROUP
#define XmSetColorCalculation XMSETCOLORCALCULATION
#define XmTextCopy XMTEXTCOPY
#define XmTextCut XMTEXTCUT
#define XmTextFieldClearSelection XMTEXTFIELDCLEARSELECTION
#define XmTextFieldCopy XMTEXTFIELDCOPY
#define XmTextFieldCut XMTEXTFIELDCUT
#define XmTextFieldGetMaxLength XMTEXTFIELDGETMAXLENGTH
#define XmTextFieldGetSelectionPosition XMTEXTFIELDGETSELECTIONPOSITION
#define XmTextFieldPaste XMTEXTFIELDPASTE
#define XmTextFieldReplace XMTEXTFIELDREPLACE
#define XmTextFieldSetAddMode XMTEXTFIELDSETADDMODE
#define XmTextFieldSetHighlight XMTEXTFIELDSETHIGHLIGHT
#define XmTextFieldSetInsertionPosition XMTEXTFIELDSETINSERTIONPOSITION
#define XmTextFieldSetMaxLength XMTEXTFIELDSETMAXLENGTH
#define XmTextFieldShowPosition XMTEXTFIELDSHOWPOSITION
#define XmTextGetEditable XMTEXTGETEDITABLE
#define XmTextPaste XMTEXTPASTE
#define XmTextPosToXY XMTEXTPOSTOXY
#define XmTextSetEditable XMTEXTSETEDITABLE
#define XmTextShowPosition XMTEXTSHOWPOSITION
#define XmUninstallImage XMUNINSTALLIMAGE
#define XmuCvtStringToBitmap XMUCVTSTRINGTOBITMAP
#define XrmPutFileDatabase XRMPUTFILEDATABASE
#define XtAddConverter XTADDCONVERTER
#define XtError XTERROR
#define XtVaCreatePopupShell XTVACREATEPOPUPSHELL
#define pthread_attr_getschedpolicy PTHREAD_ATTR_GETSCHEDPOLICY
#define pthread_key_delete PTHREAD_KEY_DELETE
#define xmBulletinBoardWidgetClass XMBULLETINBOARDWIDGETCLASS
#define xmScaleWidgetClass XMSCALEWIDGETCLASS
#define XtDisplay XTDISPLAY
#define XtScreen XTSCREEN
#define XAllocIconSize XALLOCICONSIZE
#define XAllocStandardColormap XALLOCSTANDARDCOLORMAP
#define XAllowEvents XALLOWEVENTS
#define XBlackPixel XBLACKPIXEL
#define XCopyColormapAndFree XCOPYCOLORMAPANDFREE
#define XDefaultGC XDEFAULTGC
#define XDisplayHeight XDISPLAYHEIGHT
#define XDisplayWidth XDISPLAYWIDTH
#define XGetCommand XGETCOMMAND
#define XGetIconSizes XGETICONSIZES
#define XKillClient XKILLCLIENT
#define XListInstalledColormaps XLISTINSTALLEDCOLORMAPS
#define XRootWindow XROOTWINDOW
#define XWMGeometry XWMGEOMETRY
#define XWhitePixel XWHITEPIXEL
#define XrmCombineDatabase XRMCOMBINEDATABASE
#define XrmCombineFileDatabase XRMCOMBINEFILEDATABASE
#define XSetStandardProperties XSETSTANDARDPROPERTIES
#define XSetState XSETSTATE
#define XDrawRectangles XDRAWRECTANGLES
#define XGrabButton XGRABBUTTON
#define XLookupColor XLOOKUPCOLOR
#define XMapSubwindows XMAPSUBWINDOWS
#define XRecolorCursor XRECOLORCURSOR
#define XStoreBytes XSTOREBYTES
#define XUngrabButton XUNGRABBUTTON
#define XUninstallColormap XUNINSTALLCOLORMAP
#define lib$wait LIB$WAIT
#define lib$find_file LIB$FIND_FILE
#define lib$find_file_end LIB$FIND_FILE_END
#define lib$set_symbol LIB$SET_SYMBOL
#define lib$sfree1_dd LIB$SFREE1_DD
#define lib$spawn LIB$SPAWN
#define sys$assign SYS$ASSIGN
#define sys$crembx SYS$CREMBX
#define sys$dassgn SYS$DASSGN
#define sys$dclexh SYS$DCLEXH
#define sys$getdviw SYS$GETDVIW
#define sys$getsyiw SYS$GETSYIW
#define sys$qio SYS$QIO
#define sys$qiow SYS$QIOW
#define sys$setef SYS$SETEF
#define sys$synch SYS$SYNCH
#define XDrawText XDRAWTEXT
#define XtCloseDisplay XTCLOSEDISPLAY
#define XtDestroyApplicationContext XTDESTROYAPPLICATIONCONTEXT
#define lib$ediv LIB$EDIV
#define lib$subx LIB$SUBX
#define sys$bintim SYS$BINTIM
#define sys$gettim SYS$GETTIM
#define XFetchName XFETCHNAME
#define XPeekIfEvent XPEEKIFEVENT
#define XQueryKeymap XQUERYKEYMAP
#endif

View File

@@ -1,4 +1,4 @@
/* $Id: wmesa.h,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
/* $Id: wmesa.h,v 1.2 2002/04/23 18:23:32 kschultz Exp $ */
/*
* Mesa 3-D graphics library
@@ -24,8 +24,17 @@
/*
* $Log: wmesa.h,v $
* Revision 1.1 1999/08/19 00:55:40 jtg
* Initial revision
* Revision 1.2 2002/04/23 18:23:32 kschultz
* Fix up alpha buffer handling for Windows.
* - add two new Pixel Format Descriptors that do not have alpha bits to
* mirror the two that do.
* - add logic to wglChoosePixelFormat to match PFD's with respect to alpha.
* - Create/clear software alpha buffer as required.
* Now a wgl or GLUT program can control the creation of a software alpha
* buffer via the PFD or GLUT parms, respectively.
*
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 3.2 1999/01/03 02:54:45 brianp
* updated per Ted Jump
@@ -101,13 +110,17 @@ typedef struct wmesa_context *WMesaContext;
* GL_FALSE = color index mode
* db_flag - GL_TRUE = double-buffered,
* GL_FALSE = single buffered
* alpha_flag - GL_TRUE = create software alpha buffer,
* GL_FALSE = no software alpha buffer
*
* Note: Indexed mode requires double buffering under Windows.
*
* Return: a WMesa_context or NULL if error.
*/
extern WMesaContext WMesaCreateContext(HWND hWnd,HPALETTE* pPal,
GLboolean rgb_flag,GLboolean db_flag);
GLboolean rgb_flag,
GLboolean db_flag,
GLboolean alpha_flag);
/*

View File

@@ -1,10 +1,10 @@
/* $Id: xmesa.h,v 1.8 2000/05/02 02:30:01 brianp Exp $ */
/* $Id: xmesa.h,v 1.14 2002/10/05 03:03:37 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
* Version: 4.1
*
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -58,7 +58,6 @@ and create a window, you must do the following to use the X/Mesa interface:
8. Before exiting, call XMesaDestroyVisual and XMesaDestroyContext.
See the demos/xdemo.c and xmesa1.c files for examples.
*/
@@ -67,12 +66,14 @@ See the demos/xdemo.c and xmesa1.c files for examples.
#ifndef XMESA_H
#define XMESA_H
#ifdef __VMS
#include <GL/vms_x_fix.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifdef XFree86Server
#include "xmesa_xf86.h"
#else
@@ -88,8 +89,8 @@ extern struct Library *XLibBase;
#endif
#define XMESA_MAJOR_VERSION 3
#define XMESA_MINOR_VERSION 3
#define XMESA_MAJOR_VERSION 4
#define XMESA_MINOR_VERSION 1
@@ -364,6 +365,25 @@ extern GLboolean XMesaSetFXmode( GLint mode );
/*
* Reallocate the back/depth/stencil/accum/etc/ buffers associated with
* buffer <b> if its size has changed.
*
* New in Mesa 4.0.2
*/
extern void XMesaResizeBuffers( XMesaBuffer b );
/*
* Create a pbuffer.
* New in Mesa 4.1
*/
extern XMesaBuffer XMesaCreatePBuffer(XMesaVisual v, XMesaColormap cmap,
unsigned int width, unsigned int height);
#ifdef __cplusplus
}
#endif

View File

@@ -32,7 +32,7 @@ class SampleGLWindow : public BWindow
{
public:
SampleGLWindow(BRect frame, uint32 type);
virtual bool QuitRequested() { return true; }
virtual bool QuitRequested() { be_app->PostMessage(B_QUIT_REQUESTED); return true; }
private:
SampleGLView *theView;
@@ -135,7 +135,7 @@ void SampleGLView::gInit(void)
use_stipple_mode = GL_FALSE;
use_smooth_mode = GL_TRUE;
linesize = 2;
pointsize = 4;
pointsize = 6;
}
@@ -147,35 +147,46 @@ void SampleGLView::gDraw(void)
glClear(GL_COLOR_BUFFER_BIT);
glLineWidth(linesize);
/*
if (use_stipple_mode) {
glEnable(GL_LINE_STIPPLE);
} else {
glDisable(GL_LINE_STIPPLE);
}
if (use_smooth_mode) {
glEnable(GL_LINE_SMOOTH);
glEnable(GL_BLEND);
} else {
glDisable(GL_LINE_SMOOTH);
glDisable(GL_BLEND);
}
*/
glDisable(GL_POINT_SMOOTH);
glPushMatrix();
glPointSize(pointsize); // Set size for point
for (i = 0; i < 360; i += 5) {
glRotatef(5.0, 0,0,1); // Rotate right 5 degrees
if (use_smooth_mode) {
glEnable(GL_LINE_SMOOTH);
glEnable(GL_BLEND);
} else {
glDisable(GL_LINE_SMOOTH);
glDisable(GL_BLEND);
}
glColor3f(1.0, 1.0, 0.0); // Set color for line
glBegin(GL_LINE_STRIP); // And create the line
glVertex3fv(pntA);
glVertex3fv(pntB);
glVertex3fv(pntA);
glVertex3fv(pntB);
glEnd();
glPointSize(pointsize); // Set size for point
glDisable(GL_POINT_SMOOTH);
glDisable(GL_BLEND);
glColor3f(0.0, 1.0, 0.0); // Set color for point
glBegin(GL_POINTS);
glVertex3fv(pntA); // Draw point at one end
glVertex3fv(pntB); // Draw point at other end
glVertex3fv(pntA); // Draw point at one end
glVertex3fv(pntB); // Draw point at other end
glEnd();
}

View File

@@ -1,8 +1,8 @@
# $Id: Makefile.BeOS-R4,v 1.12 2000/06/27 16:54:18 brianp Exp $
# $Id: Makefile.BeOS-R4,v 1.14 2001/02/20 17:04:52 brianp Exp $
# Mesa 3-D graphics library
# Version: 3.3
# Copyright (C) 1995-2000 Brian Paul
# Version: 3.5
# Copyright (C) 1995-2001 Brian Paul
# Makefile for GLUT-based demo programs for BeOS R4
@@ -43,6 +43,7 @@ PROGS = bounce \
readpix \
reflect \
renormal \
shadowtex \
spectex \
stex3d \
teapot \
@@ -64,7 +65,7 @@ PROGS = bounce \
.SUFFIXES: .c
.c: $(LIB_DEP)
$(CC) -I$(INCDIR) $(CFLAGS) $< $(GL_LIBS) -o $@
$(CC) -I$(INCDIR) -I../util $(CFLAGS) $< $(GL_LIBS) -o $@

View File

@@ -1,8 +1,8 @@
# $Id: Makefile.X11,v 1.14 2000/06/27 16:54:18 brianp Exp $
# $Id: Makefile.X11,v 1.20 2001/08/21 05:42:11 gareth Exp $
# Mesa 3-D graphics library
# Version: 3.3
# Copyright (C) 1995-2000 Brian Paul
# Version: 3.5
# Copyright (C) 1995-2001 Brian Paul
# Makefile for GLUT-based demo programs for Unix/X11
@@ -14,6 +14,8 @@ LIBDIR = ../lib
GL_LIBS = -L$(LIBDIR) -lglut -lGLU -lGL $(APP_LIB_DEPS)
OSMESA_LIBS = -L$(LIBDIR) -lglut -lOSMesa -lGLU -lGL $(APP_LIB_DEPS)
LIB_DEP = $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(GLU_LIB) $(LIBDIR)/$(GLUT_LIB)
PROGS = bounce \
@@ -42,6 +44,7 @@ PROGS = bounce \
readpix \
reflect \
renormal \
shadowtex \
spectex \
stex3d \
teapot \
@@ -62,9 +65,14 @@ PROGS = bounce \
.SUFFIXES:
.SUFFIXES: .c
.c: $(LIB_DEP)
$(CC) -I$(INCDIR) $(CFLAGS) $< $(GL_LIBS) -o $@
# make executable from .c file:
.c: $(LIB_DEP)
$(CC) -I$(INCDIR) -I../util $(CFLAGS) $< $(GL_LIBS) -o $@
# special case: need the -lOSMesa library:
osdemo: osdemo.c
$(CC) -I$(INCDIR) $(CFLAGS) osdemo.c $(OSMESA_LIBS) -o $@
##### TARGETS #####
@@ -78,8 +86,17 @@ clean:
realclean:
-rm $(PROGS)
-rm *.o *~
-rm readtex.[ch]
targets: readtex.c readtex.h $(PROGS)
readtex.c:
cp ../util/readtex.c .
readtex.h:
cp ../util/readtex.c .
targets: $(PROGS)
# execute all programs
exec: $(PROGS)
@@ -92,4 +109,3 @@ exec: $(PROGS)
include ../Make-config

View File

@@ -1,4 +1,4 @@
# $Id: Makefile.cygnus,v 1.11 2000/06/27 16:54:18 brianp Exp $
# $Id: Makefile.cygnus,v 1.12 2000/12/24 22:53:54 pesco Exp $
# Mesa 3-D graphics library
# Version: 3.3
@@ -66,7 +66,7 @@ PROGS = bounce \
.SUFFIXES: .c
.c: $(LIB_DEP)
$(CC) -I$(INCDIR) $(CFLAGS) $< $(GL_LIBS) -o $@
$(CC) -I$(INCDIR) -I../util $(CFLAGS) $< $(GL_LIBS) -o $@
##### TARGETS #####

130
progs/demos/Makefile.win Normal file
View File

@@ -0,0 +1,130 @@
# $Id: Makefile.win,v 1.7 2002/01/16 00:48:43 kschultz Exp $
# Mesa 3-D graphics library
# Version: 3.5
# Copyright (C) 1995-2001 Brian Paul
# Makefile for GLUT-based demo programs for Windows
!include <win32.mak>
##### MACROS #####
TOP = ..
INCDIR = ..\include
LIBDIR = ..\lib
PROGS = anisotropic \
bounce \
clearspd \
cubemap \
drawpix \
fire \
gamma \
gears \
geartrain \
glinfo \
gloss \
gltestperf \
glutfx \
isosurf \
ipers \
lodbias \
morph3d \
multiarb \
occlude \
osdemo \
paltex \
pixeltex \
pointblast \
ray \
readpix \
reflect \
renormal \
shadowtex \
spectex \
stex3d \
teapot \
terrain \
tessdemo \
texcyl \
texdown \
texenv \
texobj \
trispd \
tunnel \
tunnel2 \
winpos
SRCS = \
bounce.c \
clearspd.c \
cubemap.c \
drawpix.c \
fire.c \
gamma.c \
gears.c \
geartrain.c \
glinfo.c \
gloss.c \
gltestperf.c \
glutfx.c \
isosurf.c \
lodbias.c \
morph3d.c \
multiarb.c \
occlude.c \
paltex.c \
pixeltex.c \
pointblast.c \
ray.c \
readpix.c \
reflect.c \
renormal.c \
shadowtex.c \
spectex.c \
stex3d.c \
teapot.c \
terrain.c \
tessdemo.c \
texcyl.c \
texdown.c \
texenv.c \
texobj.c \
trispd.c \
tunnel.c \
tunnel2.c \
winpos.c
CXXSRCS = \
rain.cxx
OSMESASRCS = osdemo.c
IPERSSRCS = ipers.c
IPERSEXES = $(IPERSSRCS:.c=.exe)
!include "../mesawin32.mak"
##### TARGETS #####
clean::
clobber::
@del readtex.c readtex.h
$(EXES) : $*.obj readtex.c readtex.h
@echo $@
$(link) -out:$@ $* /LIBPATH:$(LIBDIR) $(LIBS)
$(OSMESAEXES) : $*.obj
@echo $@
$(link) $(lcommon) -out:$@ $* /LIBPATH:$(LIBDIR) $(LIBS) $(EXTRALIBS)
$(IPERSEXES) : $*.obj
@echo $@
$(link) -out:$@ $* /LIBPATH:$(LIBDIR) $(LIBS) winmm.lib
readtex.c:
-copy ..\util\readtex.c .
readtex.h:
-copy ..\util\readtex.h .

View File

@@ -1,36 +1,13 @@
/* $Id: bounce.c,v 1.2 2000/06/27 17:04:43 brianp Exp $ */
/* $Id: bounce.c,v 1.3 2000/08/16 20:36:34 brianp Exp $ */
/*
* Bouncing ball demo. Color index mode only!
* Bouncing ball demo.
*
* This program is in the public domain
*
* Brian Paul
*/
/* Conversion to GLUT by Mark J. Kilgard */
/*
* $Log: bounce.c,v $
* Revision 1.2 2000/06/27 17:04:43 brianp
* fixed compiler warnings
*
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 3.3 1999/03/18 08:16:14 joukj
*
* cmpstr needs string.h to included to avoid warnings
*
* Revision 3.2 1998/11/28 01:13:02 brianp
* now sets an initial window position and size
*
* Revision 3.1 1998/11/28 01:06:57 brianp
* now works in RGB mode by default
*
* Revision 3.0 1998/02/14 18:42:29 brianp
* initial rev
*
* Conversion to GLUT by Mark J. Kilgard
*/
@@ -84,9 +61,9 @@ make_ball(void)
glColor3f(1, 1, 1);
}
x = COS(b) * COS(a);
y = SIN(b) * COS(a);
z = SIN(a);
x = radius * COS(b) * COS(a);
y = radius * SIN(b) * COS(a);
z = radius * SIN(a);
glVertex3f(x, y, z);
x = radius * COS(b) * COS(a + da);

View File

@@ -1,33 +1,10 @@
/* $Id: clearspd.c,v 1.2 2000/04/10 16:25:15 brianp Exp $ */
/* $Id: clearspd.c,v 1.5 2002/10/31 12:38:32 keithw Exp $ */
/*
* Simple GLUT program to measure glClear() and glutSwapBuffers() speed.
* Brian Paul February 15, 1997 This file in public domain.
*/
/*
* $Log: clearspd.c,v $
* Revision 1.2 2000/04/10 16:25:15 brianp
* fixed visual selection and reporting results
*
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 3.3 1999/03/28 18:18:33 brianp
* minor clean-up
*
* Revision 3.2 1999/03/18 08:16:34 joukj
*
* cmpstr needs string.h to included to avoid warnings
*
* Revision 3.1 1998/06/29 02:38:30 brianp
* removed unneeded includes
*
* Revision 3.0 1998/02/14 18:42:29 brianp
* initial rev
*
*/
#include <stdio.h>
#include <stdlib.h>
@@ -71,18 +48,25 @@ static void Display( void )
glClear( BufferMask );
glutSwapBuffers();
}
glFinish();
t1 = glutGet(GLUT_ELAPSED_TIME) * 0.001;
}
else {
t0 = glutGet(GLUT_ELAPSED_TIME) * 0.001;
for (i=0;i<Loops;i++) {
glClear( BufferMask );
glFlush();
}
glFinish();
t1 = glutGet(GLUT_ELAPSED_TIME) * 0.001;
glutSwapBuffers();
}
/* NOTE: If clearspd doesn't map it's window immediately on
* starting, swaps will be istantaneous, so this will send Loops
* towards infinity. When a window is finally mapped, it may be
* minutes before the first call to glutSwapBuffers, making it look
* like there's a driver bug.
*/
if (t1-t0 < MinPeriod) {
/* Next time do more clears to get longer elapsed time */
Loops *= 2;

View File

@@ -1,4 +1,4 @@
/* $Id: cubemap.c,v 1.3 2000/06/27 17:04:43 brianp Exp $ */
/* $Id: cubemap.c,v 1.4 2002/10/25 17:20:26 brianp Exp $ */
/*
* GL_ARB_texture_cube_map demo
@@ -36,25 +36,100 @@
*/
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "GL/glut.h"
#include "../util/readtex.c" /* a hack */
static GLfloat Xrot = 0, Yrot = 0;
static GLfloat EyeDist = 10;
static void draw_skybox( void )
{
const GLfloat eps1 = 0.99;
const GLfloat br = 20.0; /* box radius */
glBegin(GL_QUADS);
/* +X side */
glTexCoord3f(1.0, -eps1, -eps1); glVertex3f(br, -br, -br);
glTexCoord3f(1.0, -eps1, eps1); glVertex3f(br, -br, br);
glTexCoord3f(1.0, eps1, eps1); glVertex3f(br, br, br);
glTexCoord3f(1.0, eps1, -eps1); glVertex3f(br, br, -br);
/* -X side */
glTexCoord3f(-1.0, eps1, -eps1); glVertex3f(-br, br, -br);
glTexCoord3f(-1.0, eps1, eps1); glVertex3f(-br, br, br);
glTexCoord3f(-1.0, -eps1, eps1); glVertex3f(-br, -br, br);
glTexCoord3f(-1.0, -eps1, -eps1); glVertex3f(-br, -br, -br);
/* +Y side */
glTexCoord3f(-eps1, 1.0, -eps1); glVertex3f(-br, br, -br);
glTexCoord3f(-eps1, 1.0, eps1); glVertex3f(-br, br, br);
glTexCoord3f( eps1, 1.0, eps1); glVertex3f( br, br, br);
glTexCoord3f( eps1, 1.0, -eps1); glVertex3f( br, br, -br);
/* -Y side */
glTexCoord3f(-eps1, -1.0, -eps1); glVertex3f(-br, -br, -br);
glTexCoord3f(-eps1, -1.0, eps1); glVertex3f(-br, -br, br);
glTexCoord3f( eps1, -1.0, eps1); glVertex3f( br, -br, br);
glTexCoord3f( eps1, -1.0, -eps1); glVertex3f( br, -br, -br);
/* +Z side */
glTexCoord3f( eps1, -eps1, 1.0); glVertex3f( br, -br, br);
glTexCoord3f(-eps1, -eps1, 1.0); glVertex3f(-br, -br, br);
glTexCoord3f(-eps1, eps1, 1.0); glVertex3f(-br, br, br);
glTexCoord3f( eps1, eps1, 1.0); glVertex3f( br, br, br);
/* -Z side */
glTexCoord3f( eps1, eps1, -1.0); glVertex3f( br, br, -br);
glTexCoord3f(-eps1, eps1, -1.0); glVertex3f(-br, br, -br);
glTexCoord3f(-eps1, -eps1, -1.0); glVertex3f(-br, -br, -br);
glTexCoord3f( eps1, -eps1, -1.0); glVertex3f( br, -br, -br);
glEnd();
}
static void draw( void )
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glRotatef(Xrot, 1, 0, 0);
glRotatef(Yrot, 0, 1, 0);
glutSolidSphere(2.0, 20, 20);
glMatrixMode(GL_MODELVIEW);
glPushMatrix(); /*MODELVIEW*/
glTranslatef( 0.0, 0.0, -EyeDist );
/* skybox */
glDisable(GL_TEXTURE_GEN_S);
glDisable(GL_TEXTURE_GEN_T);
glDisable(GL_TEXTURE_GEN_R);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glRotatef(Xrot, 1, 0, 0);
glRotatef(Yrot, 0, 1, 0);
draw_skybox();
glPopMatrix();
/* sphere */
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glRotatef(-Yrot, 0, 1, 0);
glRotatef(-Xrot, 1, 0, 0);
glEnable(GL_TEXTURE_GEN_S);
glEnable(GL_TEXTURE_GEN_T);
glEnable(GL_TEXTURE_GEN_R);
glutSolidSphere(2.0, 20, 20);
glLoadIdentity(); /* texture */
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
glutSwapBuffers();
}
@@ -62,7 +137,8 @@ static void draw( void )
static void idle(void)
{
Yrot += 5.0;
GLfloat t = 0.05 * glutGet(GLUT_ELAPSED_TIME);
Yrot = t;
glutPostRedisplay();
}
@@ -81,9 +157,6 @@ static void set_mode(GLuint mode)
glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP_ARB);
printf("GL_NORMAL_MAP_ARB mode\n");
}
glEnable(GL_TEXTURE_GEN_S);
glEnable(GL_TEXTURE_GEN_T);
glEnable(GL_TEXTURE_GEN_R);
}
@@ -105,6 +178,16 @@ static void key(unsigned char k, int x, int y)
mode = !mode;
set_mode(mode);
break;
case 'z':
EyeDist -= 0.5;
if (EyeDist < 6.0)
EyeDist = 6.0;
break;
case 'Z':
EyeDist += 0.5;
if (EyeDist > 90.0)
EyeDist = 90;
break;
case 27:
exit(0);
}
@@ -114,15 +197,15 @@ static void key(unsigned char k, int x, int y)
static void specialkey(int key, int x, int y)
{
GLfloat step = 10;
GLfloat step = 5;
(void) x;
(void) y;
switch (key) {
case GLUT_KEY_UP:
Xrot -= step;
Xrot += step;
break;
case GLUT_KEY_DOWN:
Xrot += step;
Xrot -= step;
break;
case GLUT_KEY_LEFT:
Yrot -= step;
@@ -138,17 +221,17 @@ static void specialkey(int key, int x, int y)
/* new window size or exposure */
static void reshape(int width, int height)
{
GLfloat ar = (float) width / (float) height;
glViewport(0, 0, (GLint)width, (GLint)height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum( -2.0, 2.0, -2.0, 2.0, 6.0, 20.0 );
glFrustum( -2.0*ar, 2.0*ar, -2.0, 2.0, 4.0, 100.0 );
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef( 0.0, 0.0, -8.0 );
}
static void init( void )
static void init_checkers( void )
{
#define CUBE_TEX_SIZE 64
GLubyte image[CUBE_TEX_SIZE][CUBE_TEX_SIZE][3];
@@ -171,16 +254,6 @@ static void init( void )
GLint i, j, f;
/* check for extension */
{
char *exten = (char *) glGetString(GL_EXTENSIONS);
if (!strstr(exten, "GL_ARB_texture_cube_map")) {
printf("Sorry, this demo requires GL_ARB_texture_cube_map\n");
exit(0);
}
}
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
/* make colored checkerboard cube faces */
@@ -203,18 +276,102 @@ static void init( void )
glTexImage2D(targets[f], 0, GL_RGB, CUBE_TEX_SIZE, CUBE_TEX_SIZE, 0,
GL_RGB, GL_UNSIGNED_BYTE, image);
}
}
#if 1
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
#else
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
#endif
static void load(GLenum target, const char *filename,
GLboolean flipTB, GLboolean flipLR)
{
GLint w, h;
GLenum format;
GLubyte *img = LoadRGBImage( filename, &w, &h, &format );
if (!img) {
printf("Error: couldn't load texture image %s\n", filename);
exit(1);
}
assert(format == GL_RGB);
/* <sigh> the way the texture cube mapping works, we have to flip
* images to make things look right.
*/
if (flipTB) {
const int stride = 3 * w;
GLubyte temp[3*1024];
int i;
for (i = 0; i < h / 2; i++) {
memcpy(temp, img + i * stride, stride);
memcpy(img + i * stride, img + (h - i - 1) * stride, stride);
memcpy(img + (h - i - 1) * stride, temp, stride);
}
}
if (flipLR) {
const int stride = 3 * w;
GLubyte temp[3];
GLubyte *row;
int i, j;
for (i = 0; i < h; i++) {
row = img + i * stride;
for (j = 0; j < w / 2; j++) {
int k = w - j - 1;
temp[0] = row[j*3+0];
temp[1] = row[j*3+1];
temp[2] = row[j*3+2];
row[j*3+0] = row[k*3+0];
row[j*3+1] = row[k*3+1];
row[j*3+2] = row[k*3+2];
row[k*3+0] = temp[0];
row[k*3+1] = temp[1];
row[k*3+2] = temp[2];
}
}
}
gluBuild2DMipmaps(target, GL_RGB, w, h, format, GL_UNSIGNED_BYTE, img);
free(img);
}
static void load_envmaps(void)
{
load(GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB, "right.rgb", GL_TRUE, GL_FALSE);
load(GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB, "left.rgb", GL_TRUE, GL_FALSE);
load(GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, "top.rgb", GL_FALSE, GL_TRUE);
load(GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB, "bottom.rgb", GL_FALSE, GL_TRUE);
load(GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB, "front.rgb", GL_TRUE, GL_FALSE);
load(GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB, "back.rgb", GL_TRUE, GL_FALSE);
}
static void init( GLboolean useImageFiles )
{
GLenum filter;
/* check for extension */
{
char *exten = (char *) glGetString(GL_EXTENSIONS);
if (!strstr(exten, "GL_ARB_texture_cube_map")) {
printf("Sorry, this demo requires GL_ARB_texture_cube_map\n");
exit(0);
}
}
printf("GL_RENDERER: %s\n", (char *) glGetString(GL_RENDERER));
if (useImageFiles) {
load_envmaps();
filter = GL_LINEAR;
}
else {
init_checkers();
filter = GL_NEAREST;
}
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MIN_FILTER, filter);
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MAG_FILTER, filter);
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glEnable(GL_TEXTURE_CUBE_MAP_ARB);
glEnable(GL_DEPTH_TEST);
glClearColor(.3, .3, .3, 0);
glColor3f( 1.0, 1.0, 1.0 );
@@ -229,16 +386,21 @@ static void usage(void)
printf(" SPACE - toggle animation\n");
printf(" CURSOR KEYS - rotation\n");
printf(" m - toggle texgen reflection mode\n");
printf(" z/Z - change viewing distance\n");
}
int main( int argc, char *argv[] )
{
glutInitWindowPosition(0, 0);
glutInitWindowSize(300, 300);
glutInitWindowSize(600, 500);
glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
glutCreateWindow("Texture Cube Maping");
init();
if (argc > 1 && strcmp(argv[1] , "-i") == 0)
init( 1 );
else
init( 0 );
glutReshapeFunc( reshape );
glutKeyboardFunc( key );
glutSpecialFunc( specialkey );

View File

@@ -9,8 +9,8 @@
##### MACROS #####
INCDIR = [-.include]
CFLAGS = /include=$(INCDIR)/prefix=all
INCDIR = ([-.include],[-.util])
CFLAGS = /include=$(INCDIR)/prefix=all/name=(as_is,short)
.ifdef SHARE
GL_LIBS = $(XLIBS)
@@ -28,7 +28,7 @@ PROGS = bounce.exe;,clearspd.exe;,drawpix.exe;,gamma.exe;,gears.exe;,\
##### RULES #####
.obj.exe :
link $(MMS$TARGET_NAME),$(GL_LIBS)
cxxlink $(MMS$TARGET_NAME),$(GL_LIBS)
##### TARGETS #####
default :

View File

@@ -1,4 +1,4 @@
/* $Id: drawpix.c,v 1.3 1999/10/28 18:23:29 brianp Exp $ */
/* $Id: drawpix.c,v 1.8 2002/07/12 15:54:02 brianp Exp $ */
/*
* glDrawPixels demo/test/benchmark
@@ -6,38 +6,12 @@
* Brian Paul September 25, 1997 This file is in the public domain.
*/
/*
* $Log: drawpix.c,v $
* Revision 1.3 1999/10/28 18:23:29 brianp
* minor changes to Usage() function
*
* Revision 1.2 1999/10/21 22:13:58 brianp
* added f key to toggle front/back drawing
*
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 3.3 1999/03/28 18:18:33 brianp
* minor clean-up
*
* Revision 3.2 1998/11/05 04:34:04 brianp
* moved image files to ../images/ directory
*
* Revision 3.1 1998/02/22 16:43:17 brianp
* added a few casts to silence compiler warnings
*
* Revision 3.0 1998/02/14 18:42:29 brianp
* initial rev
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <GL/glut.h>
#include "../util/readtex.c" /* a hack, I know */
#include "readtex.c"
#define IMAGE_FILE "../images/girl.rgb"
@@ -49,9 +23,11 @@ static int Xpos, Ypos;
static int SkipPixels, SkipRows;
static int DrawWidth, DrawHeight;
static int Scissor = 0;
static int Fog = 0;
static GLfloat Zpos = -1.0;
static float Xzoom, Yzoom;
static GLboolean DrawFront = GL_FALSE;
static GLboolean Dither = GL_TRUE;
static void Reset( void )
@@ -61,6 +37,8 @@ static void Reset( void )
DrawHeight = ImgHeight;
SkipPixels = SkipRows = 0;
Scissor = 0;
Fog = 0;
Zpos = -1.0;
Xzoom = Yzoom = 1.0;
}
@@ -73,7 +51,7 @@ static void Display( void )
glRasterPos2i(Xpos, Ypos);
#else
/* This allows negative raster positions: */
glRasterPos2i(0, 0);
glRasterPos3f(0, 0, Zpos);
glBitmap(0, 0, 0, 0, Xpos, Ypos, NULL);
#endif
@@ -85,9 +63,13 @@ static void Display( void )
if (Scissor)
glEnable(GL_SCISSOR_TEST);
if (Fog)
glEnable(GL_FOG);
glDrawPixels(DrawWidth, DrawHeight, ImgFormat, GL_UNSIGNED_BYTE, Image);
glDisable(GL_SCISSOR_TEST);
glDisable(GL_FOG);
if (!DrawFront)
glutSwapBuffers();
@@ -107,6 +89,8 @@ static void Benchmark( void )
glPixelZoom( Xzoom, Yzoom );
if (Scissor)
glEnable(GL_SCISSOR_TEST);
if (Fog)
glEnable(GL_FOG);
if (DrawFront)
glDrawBuffer(GL_FRONT);
@@ -124,6 +108,7 @@ static void Benchmark( void )
/* GL clean-up */
glDisable(GL_SCISSOR_TEST);
glDisable(GL_FOG);
/* Results */
seconds = (double) (endTime - startTime) / 1000.0;
@@ -138,7 +123,7 @@ static void Reshape( int width, int height )
glViewport( 0, 0, width, height );
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glOrtho( 0.0, width, 0.0, height, -1.0, 1.0 );
glOrtho( 0.0, width, 0.0, height, 0.0, 2.0 );
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
@@ -154,6 +139,13 @@ static void Key( unsigned char key, int x, int y )
case ' ':
Reset();
break;
case 'd':
Dither = !Dither;
if (Dither)
glEnable(GL_DITHER);
else
glDisable(GL_DITHER);
break;
case 'w':
if (DrawWidth > 0)
DrawWidth--;
@@ -197,9 +189,21 @@ static void Key( unsigned char key, int x, int y )
case 'Y':
Yzoom += 0.1;
break;
case 'z':
Zpos -= 0.1;
printf("RasterPos Z = %g\n", Zpos);
break;
case 'Z':
Zpos += 0.1;
printf("RasterPos Z = %g\n", Zpos);
break;
case 'b':
Benchmark();
break;
case 'F':
Fog = !Fog;
printf("Fog %d\n", Fog);
break;
case 'f':
DrawFront = !DrawFront;
if (DrawFront)
@@ -240,6 +244,8 @@ static void SpecialKey( int key, int x, int y )
static void Init( GLboolean ciMode )
{
static const GLfloat fogColor[4] = {0, 1, 0, 0};
printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
@@ -251,7 +257,7 @@ static void Init( GLboolean ciMode )
if (ciMode) {
/* Convert RGB image to grayscale */
GLubyte *indexImage = malloc( ImgWidth * ImgHeight );
GLubyte *indexImage = (GLubyte *) malloc( ImgWidth * ImgHeight );
GLint i;
for (i=0; i<ImgWidth*ImgHeight; i++) {
int gray = Image[i*3] + Image[i*3+1] + Image[i*3+2];
@@ -272,6 +278,11 @@ static void Init( GLboolean ciMode )
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glPixelStorei(GL_UNPACK_ROW_LENGTH, ImgWidth);
glFogi(GL_FOG_MODE, GL_LINEAR);
glFogf(GL_FOG_START, 0);
glFogf(GL_FOG_END, 2);
glFogfv(GL_FOG_COLOR, fogColor);
Reset();
}
@@ -295,6 +306,10 @@ static void Usage(void)
printf(" r Decrease GL_UNPACK_SKIP_ROWS*\n");
printf(" R Increase GL_UNPACK_SKIP_ROWS*\n");
printf(" s Toggle GL_SCISSOR_TEST\n");
printf(" F Toggle GL_FOG\n");
printf(" z Decrease RasterPos Z\n");
printf(" Z Increase RasterPos Z\n");
printf(" f Toggle front/back buffer drawing\n");
printf(" b Benchmark test\n");
printf(" ESC Exit\n");
@@ -318,7 +333,7 @@ int main( int argc, char *argv[] )
if (ciMode)
glutInitDisplayMode( GLUT_INDEX | GLUT_DOUBLE );
else
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE);
glutCreateWindow(argv[0]);

View File

@@ -17,7 +17,7 @@
#endif
#include <GL/glut.h>
#include "../util/readtex.c"
#include "readtex.c"
#ifdef XMESA
#include "GL/xmesa.h"
@@ -71,7 +71,10 @@ static int fullscreen = 1;
static int WIDTH = 640;
static int HEIGHT = 480;
#define FRAME 50
static GLint T0 = 0;
static GLint Frames = 0;
static GLint NiceFog = 1;
#define DIMP 20.0
#define DIMTP 16.0
@@ -136,21 +139,6 @@ static float v = 0.0;
static float alpha = -90.0;
static float beta = 90.0;
static float
gettime(void)
{
static clock_t told = 0;
clock_t tnew, ris;
tnew = clock();
ris = tnew - told;
told = tnew;
return (ris / (float) CLOCKS_PER_SEC);
}
static float
vrnd(void)
{
@@ -269,6 +257,13 @@ calcposobs(void)
dir[2] = cos(alpha * M_PI / 180.0) * sin(beta * M_PI / 180.0);
dir[1] = cos(beta * M_PI / 180.0);
if (dir[0] < 1.0e-5 && dir[0] > -1.0e-5)
dir[0] = 0;
if (dir[1] < 1.0e-5 && dir[1] > -1.0e-5)
dir[1] = 0;
if (dir[2] < 1.0e-5 && dir[2] > -1.0e-5)
dir[2] = 0;
obs[0] += v * dir[0];
obs[1] += v * dir[1];
obs[2] += v * dir[2];
@@ -387,13 +382,16 @@ dojoy(void)
static void
drawfire(void)
{
static int count = 0;
static char frbuf[80];
static char frbuf[80] = "";
int j;
float fr;
dojoy();
if (NiceFog)
glHint(GL_FOG_HINT, GL_NICEST);
else
glHint(GL_FOG_HINT, GL_DONT_CARE);
glEnable(GL_DEPTH_TEST);
if (fog)
@@ -416,6 +414,7 @@ drawfire(void)
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, groundid);
#if 1
glBegin(GL_QUADS);
glTexCoord2fv(qt[0]);
glVertex3fv(q[0]);
@@ -426,6 +425,26 @@ drawfire(void)
glTexCoord2fv(qt[3]);
glVertex3fv(q[3]);
glEnd();
#else
/* Subdivide the ground into a bunch of quads. This improves fog
* if GL_FOG_HINT != GL_NICEST
*/
{
float x, y;
float dx = 1.0, dy = 1.0;
glBegin(GL_QUADS);
for (y = -DIMP; y < DIMP; y += 1.0) {
for (x = -DIMP; x < DIMP; x += 1.0) {
glTexCoord2f(0, 0); glVertex3f(x, 0, y);
glTexCoord2f(1, 0); glVertex3f(x+dx, 0, y);
glTexCoord2f(1, 1); glVertex3f(x+dx, 0, y+dy);
glTexCoord2f(0, 1); glVertex3f(x, 0, y+dy);
}
}
glEnd();
}
#endif
glEnable(GL_ALPHA_TEST);
glAlphaFunc(GL_GEQUAL, 0.9);
@@ -468,11 +487,6 @@ drawfire(void)
}
glEnd();
if ((count % FRAME) == 0) {
fr = gettime();
sprintf(frbuf, "Frame rate: %f", FRAME / fr);
}
glDisable(GL_TEXTURE_2D);
glDisable(GL_ALPHA_TEST);
glDisable(GL_DEPTH_TEST);
@@ -499,7 +513,24 @@ drawfire(void)
glutSwapBuffers();
count++;
Frames++;
{
GLint t = glutGet(GLUT_ELAPSED_TIME);
if (t - T0 >= 2000) {
GLfloat seconds = (t - T0) / 1000.0;
GLfloat fps = Frames / seconds;
sprintf(frbuf, "Frame rate: %f", fps);
T0 = t;
Frames = 0;
}
}
}
static void
idle(void)
{
glutPostRedisplay();
}
@@ -520,6 +551,7 @@ special(int key, int x, int y)
beta += 2.0;
break;
}
glutPostRedisplay();
}
static void
@@ -567,7 +599,12 @@ key(unsigned char key, int x, int y)
fullscreen = (!fullscreen);
break;
#endif
case 'n':
NiceFog = !NiceFog;
printf("NiceFog %d\n", NiceFog);
break;
}
glutPostRedisplay();
}
static void
@@ -623,7 +660,7 @@ inittextures(void)
if ((gluerr = gluBuild2DMipmaps(GL_TEXTURE_2D, 4, 128, 128, GL_RGBA,
GL_UNSIGNED_BYTE, (GLvoid *) (tex)))) {
fprintf(stderr, "GLULib%s\n", gluErrorString(gluerr));
fprintf(stderr, "GLULib%s\n", (char *) gluErrorString(gluerr));
exit(-1);
}
}
@@ -671,8 +708,6 @@ main(int ac, char **av)
/* Default settings */
WIDTH = 640;
HEIGHT = 480;
np = 800;
eject_r = 0.1;
dt = 0.015;
@@ -716,11 +751,8 @@ main(int ac, char **av)
glFogi(GL_FOG_MODE, GL_EXP);
glFogfv(GL_FOG_COLOR, fogcolor);
glFogf(GL_FOG_DENSITY, 0.1);
#ifdef FX
glHint(GL_FOG_HINT, GL_NICEST);
#endif
p = malloc(sizeof(part) * np);
p = (part *) malloc(sizeof(part) * np);
for (i = 0; i < np; i++)
setnewpart(&p[i]);
@@ -730,7 +762,7 @@ main(int ac, char **av)
glutKeyboardFunc(key);
glutSpecialFunc(special);
glutDisplayFunc(drawfire);
glutIdleFunc(drawfire);
glutIdleFunc(idle);
glutReshapeFunc(reshape);
glutMainLoop();

View File

@@ -1,5 +1,4 @@
/* $Id: gamma.c,v 1.2 2000/03/18 01:13:29 brianp Exp $ */
/* $Id: gamma.c,v 1.3 2002/04/22 16:03:37 brianp Exp $ */
/* Draw test patterns to help determine correct gamma value for a display.
When the intensities of the inner squares nearly match the intensities
@@ -23,22 +22,6 @@
/* Conversion to GLUT by Mark J. Kilgard */
/*
* $Log: gamma.c,v $
* Revision 1.2 2000/03/18 01:13:29 brianp
* colors were computed incorrectly (Hans Nelles)
*
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 3.1 1999/06/19 01:35:38 brianp
* merged in Kai Schuetz's RGB changes
*
* Revision 3.0 1998/02/14 18:42:29 brianp
* initial rev
*
*/
#include <stdio.h>
#include <string.h>

View File

@@ -1,4 +1,4 @@
/* $Id: geartrain.c,v 1.6 2000/04/06 02:22:59 brianp Exp $ */
/* $Id: geartrain.c,v 1.8 2001/10/04 19:14:26 kschultz Exp $ */
/*
* GearTrain Simulator * Version: 1.00
@@ -32,7 +32,9 @@
#include <string.h>
#include <stdio.h>
#ifndef min
#define min(x, y) ( x < y ? x : y )
#endif
#ifndef M_PI
#define M_PI 3.14159265
@@ -42,7 +44,7 @@ typedef GLfloat TDA[4];
TDA background;
struct AXLE
struct AXLE
{
char name[20];
GLint id;
@@ -57,7 +59,7 @@ struct AXLE
};
struct GEAR
struct GEAR
{
char name[20];
char type[7];
@@ -79,7 +81,7 @@ struct GEAR
};
struct BELT
struct BELT
{
char name[20];
GLint id;
@@ -99,18 +101,23 @@ int number_of_belts;
char Buf1[256], Buf2[256], Buf3[256], Buf4[256], Buf5[256];
static GLint T0 = 0;
static GLint Frames = 0;
static void
strset (char buf[], char ch)
#ifndef _WIN32
static void
strset (char buf[], char ch)
{
int i;
for (i = 0; i < strlen (buf); i++)
buf[i] = ch;
}
#endif
static void
Clear_Buffers ()
static void
Clear_Buffers ()
{
strset (Buf1, 0);
strset (Buf2, 0);
@@ -120,8 +127,8 @@ Clear_Buffers ()
}
static void
LoadTriplet (TDA A)
static void
LoadTriplet (TDA A)
{
Clear_Buffers ();
fscanf (mainfile, "%s %s %s %s", Buf1, Buf2, Buf3, Buf4);
@@ -131,8 +138,8 @@ LoadTriplet (TDA A)
}
static void
LoadReal (float *a)
static void
LoadReal (float *a)
{
Clear_Buffers ();
fscanf (mainfile, "%s %s", Buf1, Buf2);
@@ -140,8 +147,8 @@ LoadReal (float *a)
}
static void
LoadInteger (int *a)
static void
LoadInteger (int *a)
{
Clear_Buffers ();
fscanf (mainfile, "%s %s", Buf1, Buf2);
@@ -149,8 +156,8 @@ LoadInteger (int *a)
}
static void
LoadText (char *a)
static void
LoadText (char *a)
{
Clear_Buffers ();
fscanf (mainfile, "%s %s", Buf1, Buf2);
@@ -158,11 +165,11 @@ LoadText (char *a)
}
static void
getdata (char filename[])
static void
getdata (char filename[])
{
int gear_count = 0, axle_count = 0, belt_count = 0, i;
mainfile = fopen (filename, "r");
if (!mainfile) {
printf("Error: couldn't open %s\n", filename);
@@ -181,92 +188,92 @@ getdata (char filename[])
if (!(strcmp (Buf1, "BACKGROUND")))
LoadTriplet (background);
if (!(strcmp (Buf1, "ANAME")))
{
LoadText (a[axle_count].name);
axle_count++;
}
if (!(strcmp (Buf1, "ARADIUS")))
LoadReal (&a[axle_count - 1].radius);
if (!(strcmp (Buf1, "AAXIS")))
LoadInteger (&a[axle_count - 1].axis);
if (!(strcmp (Buf1, "ACOLOR")))
LoadTriplet (a[axle_count - 1].color);
if (!(strcmp (Buf1, "APOSITION")))
LoadTriplet (a[axle_count - 1].position);
if (!(strcmp (Buf1, "ALENGTH")))
LoadReal (&a[axle_count - 1].length);
if (!(strcmp (Buf1, "AMOTORED")))
LoadInteger (&a[axle_count - 1].motored);
if (!(strcmp (Buf1, "AANGULARVELOCITY")))
LoadReal (&a[axle_count - 1].angular_velocity);
if (!(strcmp (Buf1, "ADIRECTION")))
LoadInteger (&a[axle_count - 1].direction);
if (!(strcmp (Buf1, "GNAME")))
{
LoadText (g[gear_count].name);
gear_count++;
}
if (!(strcmp (Buf1, "GTYPE")))
LoadText (g[gear_count - 1].type);
if (!(strcmp (Buf1, "GFACE")))
LoadInteger (&g[gear_count - 1].face);
if (!(strcmp (Buf1, "GRADIUS")))
LoadReal (&g[gear_count - 1].radius);
if (!(strcmp (Buf1, "GWIDTH")))
LoadReal (&g[gear_count - 1].width);
if (!(strcmp (Buf1, "GTEETH")))
LoadInteger (&g[gear_count - 1].teeth);
if (!(strcmp (Buf1, "GTOOTHDEPTH")))
LoadReal (&g[gear_count - 1].tooth_depth);
if (!(strcmp (Buf1, "GCOLOR")))
LoadTriplet (g[gear_count - 1].color);
if (!(strcmp (Buf1, "GAXLE")))
LoadText (g[gear_count - 1].axle_name);
if (!(strcmp (Buf1, "GPOSITION")))
LoadInteger (&g[gear_count - 1].relative_position);
if (!(strcmp (Buf1, "BELTNAME")))
{
LoadText (b[belt_count].name);
belt_count++;
}
if (!(strcmp (Buf1, "GEAR1NAME")))
LoadText (b[belt_count - 1].gear1_name);
if (!(strcmp (Buf1, "GEAR2NAME")))
LoadText (b[belt_count - 1].gear2_name);
}
while (Buf1[0] != 0);
for (i = 0; i < number_of_gears; i++)
{
g[i].axis = -1;
g[i].direction = 0;
g[i].angular_velocity = 0.0;
}
number_of_gears = gear_count;
number_of_axles = axle_count;
number_of_belts = belt_count;
@@ -274,12 +281,12 @@ getdata (char filename[])
}
static void
axle (GLint j, GLfloat radius, GLfloat length)
static void
axle (GLint j, GLfloat radius, GLfloat length)
{
GLfloat angle, rad, incr = 10.0 * M_PI / 180.0;
/* draw main cylinder */
/* draw main cylinder */
glBegin (GL_QUADS);
for (angle = 0.0; angle < 360.0; angle += 5.0)
{
@@ -291,8 +298,8 @@ axle (GLint j, GLfloat radius, GLfloat length)
glVertex3f (radius * cos (rad + incr), radius * sin (rad + incr), length / 2);
}
glEnd ();
/* draw front face */
/* draw front face */
glNormal3f (0.0, 0.0, 1.0);
glBegin (GL_TRIANGLES);
for (angle = 0.0; angle < 360.0; angle += 5.0)
@@ -304,8 +311,8 @@ axle (GLint j, GLfloat radius, GLfloat length)
glVertex3f (0.0, 0.0, length / 2);
}
glEnd ();
/* draw back face */
/* draw back face */
glNormal3f (0.0, 0.0, -1.0);
glBegin (GL_TRIANGLES);
for (angle = 0.0; angle <= 360.0; angle += 5.0)
@@ -321,9 +328,9 @@ axle (GLint j, GLfloat radius, GLfloat length)
static void
gear (GLint j, char type[], GLfloat radius, GLfloat width,
GLint teeth, GLfloat tooth_depth)
static void
gear (GLint j, char type[], GLfloat radius, GLfloat width,
GLint teeth, GLfloat tooth_depth)
{
GLint i;
GLfloat r1, r2;
@@ -333,7 +340,7 @@ gear (GLint j, char type[], GLfloat radius, GLfloat width,
r1 = radius - tooth_depth;
r2 = radius;
da = 2.0 * M_PI / teeth / 4.0;
if (!g[j].face)
{
@@ -346,7 +353,7 @@ gear (GLint j, char type[], GLfloat radius, GLfloat width,
n = 1.0;
}
/* draw front face */
/* draw front face */
if (!(strcmp (type, "NORMAL")))
{
glNormal3f (0.0, 0.0, 1.0 * n);
@@ -375,8 +382,8 @@ gear (GLint j, char type[], GLfloat radius, GLfloat width,
}
glEnd ();
}
/* draw front sides of teeth */
/* draw front sides of teeth */
if (!(strcmp (type, "NORMAL")))
{
glNormal3f (0.0, 0.0, 1.0 * n);
@@ -392,10 +399,10 @@ gear (GLint j, char type[], GLfloat radius, GLfloat width,
}
glEnd ();
}
glNormal3f (0.0, 0.0, -1.0 * n);
/* draw back face */
/* draw back face */
glBegin (GL_QUAD_STRIP);
for (i = 0; i <= teeth; i++)
{
@@ -406,8 +413,8 @@ gear (GLint j, char type[], GLfloat radius, GLfloat width,
glVertex3f (0.0, 0.0, -width * fraction);
}
glEnd ();
/* draw back sides of teeth */
/* draw back sides of teeth */
glNormal3f (0.0, 0.0, -1.0 * n);
glBegin (GL_QUADS);
da = 2.0 * M_PI / teeth / 4.0;
@@ -420,16 +427,16 @@ gear (GLint j, char type[], GLfloat radius, GLfloat width,
glVertex3f (r1 * cos (angle), r1 * sin (angle), -width * fraction);
}
glEnd ();
/* draw outward faces of teeth */
/* draw outward faces of teeth */
if (!(strcmp (type, "NORMAL")))
{
glBegin (GL_QUAD_STRIP);
for (i = 0; i < teeth; i++)
{
angle = i * 2.0 * M_PI / teeth;
glVertex3f (r1 * cos (angle), r1 * sin (angle), width * fraction);
glVertex3f (r1 * cos (angle), r1 * sin (angle), -width * fraction);
u = r2 * cos (angle + da) - r1 * cos (angle);
@@ -478,27 +485,27 @@ gear (GLint j, char type[], GLfloat radius, GLfloat width,
glNormal3f (cos (angle), sin (angle), n);
}
}
glVertex3f (r1 * cos (0), r1 * sin (0), width * fraction);
glVertex3f (r1 * cos (0), r1 * sin (0), -width * fraction);
glEnd ();
}
static void
belt (struct GEAR g1, struct GEAR g2)
static void
belt (struct GEAR g1, struct GEAR g2)
{
GLfloat D, alpha, phi, angle, incr, width;
GLint indexes[3] =
{
0, 0, 0
};
GLfloat col[3] =
{
0.0, 0.0, 0.0
};
width = min (g1.width, g2.width);
D = sqrt (pow (g1.position[0] - g2.position[0], 2) + pow (g1.position[1] - g2.position[1], 2) + pow (g1.position[2] - g2.position[2], 2));
alpha = acos ((g2.position[0] - g1.position[0]) / D);
@@ -545,11 +552,11 @@ belt (struct GEAR g1, struct GEAR g2)
}
static int
axle_find (char axle_name[])
static int
axle_find (char axle_name[])
{
int i;
for (i = 0; i < number_of_axles; i++)
{
if (!(strcmp (axle_name, a[i].name)))
@@ -559,11 +566,11 @@ axle_find (char axle_name[])
}
static int
gear_find (char gear_name[])
static int
gear_find (char gear_name[])
{
int i;
for (i = 0; i < number_of_gears; i++)
{
if (!(strcmp (gear_name, g[i].name)))
@@ -573,13 +580,13 @@ gear_find (char gear_name[])
}
static void
process ()
static void
process ()
{
GLfloat x, y, z, D, dist;
GLint axle_index, i, j, g1, g2, k;
char error[80];
for (i = 0; i < number_of_gears; i++)
{
x = 0.0;
@@ -599,12 +606,12 @@ process ()
y = 1.0;
else
z = 1.0;
g[i].position[0] = a[axle_index].position[0] + x * g[i].relative_position;
g[i].position[1] = a[axle_index].position[1] + y * g[i].relative_position;
g[i].position[2] = a[axle_index].position[2] + z * g[i].relative_position;
}
for (k = 0; k < number_of_axles; k++)
{
for (i = 0; i < number_of_gears - 1; i++)
@@ -617,11 +624,11 @@ process ()
if (D < 1.1 * (g[i].radius - g[i].tooth_depth + g[j].radius - g[j].tooth_depth))
{
printf (error, "Gear %s and %s are too close to each other.", g[i].name, g[j].name);
/*MessageBox(NULL,error,windowName,MB_ICONEXCLAMATION|MB_OK);*/
exit (1);
}
if (g[i].axis == 0)
{
dist = g[i].position[0] - g[j].position[0];
@@ -632,9 +639,9 @@ process ()
}
else
dist = g[i].position[2] - g[j].position[2];
dist = fabs (dist);
if (dist < (g[i].width / 2 + g[j].width / 2))
{
if ((g[i].motored) && (!(g[j].motored)) && (D < 0.95 * (g[i].radius + g[j].radius)))
@@ -646,13 +653,13 @@ process ()
/*MessageBox(NULL,error,windowName,MB_ICONEXCLAMATION|MB_OK);*/
exit (1);
}
g[j].motored = (a[axle_index].motored = 1);
g[j].direction = (a[axle_index].direction = -g[i].direction);
a[axle_index].angular_velocity = g[i].angular_velocity * g[i].teeth / g[j].teeth;
g[j].angular_velocity = (a[axle_index].angular_velocity *= g[i].radius / g[j].radius);
}
if ((!(g[i].motored)) && (g[j].motored) && (D < 0.95 * (g[i].radius + g[j].radius)))
{
axle_index = axle_find (g[i].axle_name);
@@ -662,16 +669,16 @@ process ()
/*MessageBox(NULL,error,windowName,MB_ICONEXCLAMATION|MB_OK);*/
exit (1);
}
g[i].motored = (a[axle_index].motored = 1);
g[i].direction = (a[axle_index].direction = -g[j].direction);
a[axle_index].angular_velocity = g[j].angular_velocity * g[j].teeth / g[i].teeth;
g[i].angular_velocity = (a[axle_index].angular_velocity *= g[j].radius / g[i].radius);
}
}
}
if (!(strcmp (g[i].type, g[j].type)) && (!(strcmp (g[i].type, "BEVEL"))) && ((strcmp (g[i].axle_name, g[j].axle_name) != 0)) && (g[i].axis != g[j].axis))
{
D = sqrt (pow (g[i].position[0] - g[j].position[0], 2) + pow (g[i].position[1] - g[j].position[1], 2) + pow (g[i].position[2] - g[j].position[2], 2));
@@ -689,8 +696,8 @@ process ()
a[axle_index].angular_velocity = g[i].angular_velocity * g[i].teeth / g[j].teeth;
g[j].angular_velocity = (a[axle_index].angular_velocity *= g[i].radius / g[j].radius);
}
if ((!(g[i].motored)) && (g[j].motored) && (D < 0.95 * sqrt (g[i].radius * g[i].radius + g[j].radius * g[j].radius)))
{
axle_index = axle_find (g[i].axle_name);
@@ -708,7 +715,7 @@ process ()
}
}
}
for (i = 0; i < number_of_gears; i++)
{
axle_index = axle_find (g[i].axle_name);
@@ -719,7 +726,7 @@ process ()
g[i].angular_velocity = a[axle_index].angular_velocity;
}
}
for (i = 0; i < number_of_belts; i++)
{
g1 = gear_find (b[i].gear1_name);
@@ -731,7 +738,7 @@ process ()
/*MessageBox(NULL,error,windowName,MB_ICONEXCLAMATION|MB_OK);*/
exit (1);
}
if ((g[g1].axis == g[g2].axis) && (!strcmp (g[g1].type, g[g2].type)) && (!strcmp (g[g1].type, "NORMAL")))
{
/*
@@ -742,7 +749,7 @@ process ()
MessageBox(NULL,error,windowName,MB_ICONEXCLAMATION|MB_OK);
exit(1);
}
*/
*/
if (g[g1].axis == 0)
{
dist = g[g1].position[0] - g[g2].position[0];
@@ -753,16 +760,16 @@ process ()
}
else
dist = g[g1].position[2] - g[g2].position[2];
dist = fabs (dist);
if (dist > (g[g1].width / 2 + g[g2].width / 2))
{
printf (error, "Belt %s invalid.", b[i].name);
/*MessageBox(NULL,error,windowName,MB_ICONEXCLAMATION|MB_OK);*/
exit (1);
}
if (dist < (g[g1].width / 2 + g[g2].width / 2))
{
if (D < g[g1].radius + g[g2].radius)
@@ -771,7 +778,7 @@ process ()
/*MessageBox(NULL,error,windowName,MB_ICONEXCLAMATION|MB_OK);*/
exit (1);
}
if ((g[g1].motored) && (!(g[g2].motored)))
{
axle_index = axle_find (g[g2].axle_name);
@@ -779,7 +786,7 @@ process ()
g[g2].direction = (a[axle_index].direction = g[g1].direction);
g[g2].angular_velocity = (a[axle_index].angular_velocity = g[g1].angular_velocity * g[g1].radius / g[g2].radius);
}
if ((!(g[g1].motored)) && (g[g2].motored))
{
axle_index = axle_find (g[g1].axle_name);
@@ -790,7 +797,7 @@ process ()
}
}
}
for (i = 0; i < number_of_gears; i++)
{
axle_index = axle_find (g[i].axle_name);
@@ -809,20 +816,20 @@ process ()
GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 10.0;
static void
draw (void)
static void
draw (void)
{
int i;
GLfloat x, y, z;
int index;
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glPushMatrix ();
glRotatef (view_rotx, 1.0, 0.0, 0.0);
glRotatef (view_roty, 0.0, 1.0, 0.0);
glRotatef (view_rotz, 0.0, 0.0, 1.0);
for (i = 0; i < number_of_gears; i++)
{
x = 0.0;
@@ -837,15 +844,15 @@ draw (void)
x = 1.0;
else
z = 1.0;
if (z != 1.0)
glRotatef (90.0, x, y, z);
glRotatef (g[i].direction * g[i].angle, 0.0, 0.0, 1.0);
glCallList (g[i].id);
glPopMatrix ();
}
for (i = 0; i < number_of_axles; i++)
{
x = 0.0;
@@ -862,11 +869,11 @@ draw (void)
if (z != 1.0)
glRotatef (90.0, x, y, z);
glCallList (a[i].id);
glPopMatrix ();
}
for (i = 0; i < number_of_belts; i++)
{
x = 0.0;
@@ -881,23 +888,35 @@ draw (void)
x = 1.0;
else
z = 1.0;
if (z != 1.0)
glRotatef (90.0, x, y, z);
glCallList (b[i].id);
glPopMatrix ();
}
glPopMatrix ();
glutSwapBuffers ();
{
GLint t = glutGet(GLUT_ELAPSED_TIME);
Frames++;
if (t - T0 >= 5000) {
GLfloat seconds = (t - T0) / 1000.0;
GLfloat fps = Frames / seconds;
printf("%d frames in %g seconds = %g FPS\n", Frames, seconds, fps);
T0 = t;
Frames = 0;
}
}
}
static void
idle (void)
static void
idle (void)
{
int i;
for (i = 0; i < number_of_gears; i++)
@@ -908,9 +927,9 @@ idle (void)
/* change view angle, exit upon ESC */
static void
key (unsigned char k, int x, int y)
/* change view angle, exit upon ESC */
static void
key (unsigned char k, int x, int y)
{
switch (k)
{
@@ -940,9 +959,9 @@ key (unsigned char k, int x, int y)
/* new window size or exposure */
static void
reshape (int width, int height)
/* new window size or exposure */
static void
reshape (int width, int height)
{
glViewport (0, 0, (GLint) width, (GLint) height);
glMatrixMode (GL_PROJECTION);
@@ -957,7 +976,7 @@ reshape (int width, int height)
GLfloat h = (GLfloat) height / (GLfloat) width;
glFrustum (-1.0, 1.0, -h, h, 5.0, 60.0);
}
glMatrixMode (GL_MODELVIEW);
glLoadIdentity ();
glTranslatef (0.0, 0.0, -40.0);
@@ -966,8 +985,8 @@ reshape (int width, int height)
static void
init (void)
static void
init (void)
{
GLfloat matShine = 20.00F;
GLfloat light0Pos[4] =
@@ -975,19 +994,19 @@ init (void)
0.70F, 0.70F, 1.25F, 0.50F
};
int i;
glClearColor (background[0], background[1], background[2], 1.0F);
glClearIndex ((GLfloat) 0.0);
glMaterialf (GL_FRONT_AND_BACK, GL_SHININESS, matShine);
glLightfv (GL_LIGHT0, GL_POSITION, light0Pos);
glEnable (GL_LIGHT0);
glEnable (GL_LIGHTING);
glEnable (GL_DEPTH_TEST);
for (i = 0; i < number_of_gears; i++)
g[i].angle = 0.0;
for (i = 0; i < number_of_gears; i++)
{
g[i].id = glGenLists (1);
@@ -997,7 +1016,7 @@ init (void)
gear (i, g[i].type, g[i].radius, g[i].width, g[i].teeth, g[i].tooth_depth);
glEndList ();
}
for (i = 0; i < number_of_axles; i++)
{
a[i].id = glGenLists (1);
@@ -1007,7 +1026,7 @@ init (void)
axle (i, a[i].radius, a[i].length);
glEndList ();
}
for (i = 0; i < number_of_belts; i++)
{
b[i].id = glGenLists (1);
@@ -1015,14 +1034,14 @@ init (void)
belt (g[gear_find (b[i].gear1_name)], g[gear_find (b[i].gear2_name)]);
glEndList ();
}
glEnable (GL_COLOR_MATERIAL);
}
int
main (int argc, char *argv[])
int
main (int argc, char *argv[])
{
char *file;
@@ -1034,14 +1053,14 @@ main (int argc, char *argv[])
glutInitWindowPosition (0, 0);
glutInitWindowSize(640,480);
glutInitDisplayMode (GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
if (glutCreateWindow ("Gear Train Simulation") == GL_FALSE)
exit (1);
getdata (file);
process ();
init ();
glutDisplayFunc (draw);
glutReshapeFunc (reshape);
glutKeyboardFunc (key);
@@ -1049,4 +1068,3 @@ main (int argc, char *argv[])
glutMainLoop ();
return 0;
}

View File

@@ -1,4 +1,4 @@
/* $Id: glinfo.c,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
/* $Id: glinfo.c,v 1.2 2002/04/22 16:03:37 brianp Exp $ */
/*
* Print GL, GLU and GLUT version and extension info
@@ -8,23 +8,6 @@
*/
/*
* $Log: glinfo.c,v $
* Revision 1.1 1999/08/19 00:55:40 jtg
* Initial revision
*
* Revision 3.2 1999/02/02 04:45:49 brianp
* include stdio.h before glut.h
*
* Revision 3.1 1998/02/22 16:42:54 brianp
* added casts to prevent compiler warnings
*
* Revision 3.0 1998/02/14 18:42:29 brianp
* initial rev
*
*/
#include <stdio.h>
#include <GL/glut.h>

View File

@@ -1,4 +1,4 @@
/* $Id: gloss.c,v 1.4 2000/06/27 17:04:43 brianp Exp $ */
/* $Id: gloss.c,v 1.6 2000/12/24 22:53:54 pesco Exp $ */
/*
* Specular reflection demo. The specular highlight is modulated by
@@ -24,7 +24,7 @@
#include <math.h>
#include <GL/glut.h>
#include "../util/readtex.c" /* I know, this is a hack. */
#include "readtex.c" /* I know, this is a hack. */
#define SPECULAR_TEXTURE_FILE "../images/reflect.rgb"
#define BASE_TEXTURE_FILE "../images/tile.rgb"
@@ -46,7 +46,7 @@ static GLfloat DXrot = 1.0, DYrot = 2.5;
static GLfloat Black[4] = { 0, 0, 0, 0 };
static GLfloat White[4] = { 1, 1, 1, 1 };
static GLfloat Diffuse[4] = { .3, .3, 1.0, 1.0 }; /* blue */
static GLfloat Shininess = 15;
static GLfloat Shininess = 6;
static GLuint BaseTexture, SpecularTexture;
static GLboolean DoSpecTexture = GL_TRUE;

View File

@@ -1,4 +1,4 @@
/* $Id: glutfx.c,v 1.2 2000/06/27 17:04:43 brianp Exp $ */
/* $Id: glutfx.c,v 1.3 2002/04/22 16:03:37 brianp Exp $ */
/*
* Example of how one might use GLUT with the 3Dfx driver in full-screen mode.
@@ -14,25 +14,6 @@
* Brian Paul This file is in the public domain.
*/
/*
* $Log: glutfx.c,v $
* Revision 1.2 2000/06/27 17:04:43 brianp
* fixed compiler warnings
*
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 3.2 1999/03/28 18:18:33 brianp
* minor clean-up
*
* Revision 3.1 1998/06/29 02:37:30 brianp
* minor changes for Windows (Ted Jump)
*
* Revision 3.0 1998/02/14 18:42:29 brianp
* initial rev
*
*/
#include <stdio.h>
#include <stdlib.h>

View File

@@ -11,14 +11,14 @@
#include <math.h>
#include <time.h>
#ifdef WIN32
#if defined (WIN32)|| defined(_WIN32)
#include <windows.h>
#include <mmsystem.h>
#endif
#include <GL/glut.h>
#include "../util/readtex.c"
#include "readtex.c"
#ifdef XMESA
#include "GL/xmesa.h"
@@ -28,6 +28,9 @@ static int fullscreen = 1;
static int WIDTH = 640;
static int HEIGHT = 480;
static GLint T0;
static GLint Frames;
#define MAX_LOD 9
#define TEX_SKY_WIDTH 256
@@ -183,7 +186,7 @@ inittextures(void)
(gluerr =
gluBuild2DMipmaps(GL_TEXTURE_2D, 3, TEX_SKY_WIDTH, TEX_SKY_HEIGHT,
GL_RGB, GL_UNSIGNED_BYTE, (GLvoid *) (tsky)))) {
fprintf(stderr, "GLULib%s\n", gluErrorString(gluerr));
fprintf(stderr, "GLULib%s\n", (char *) gluErrorString(gluerr));
exit(-1);
}
@@ -195,21 +198,6 @@ inittextures(void)
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
}
static float
gettime(void)
{
static clock_t told = 0;
clock_t tnew, ris;
tnew = clock();
ris = tnew - told;
told = tnew;
return (ris / (float) CLOCKS_PER_SEC);
}
static void
calcposobs(void)
{
@@ -217,6 +205,13 @@ calcposobs(void)
dir[1] = cos(alpha * M_PI / 180.0) * sin(beta * M_PI / 180.0);
dir[2] = cos(beta * M_PI / 180.0);
if (dir[0] < 1.0e-5 && dir[0] > -1.0e-5)
dir[0] = 0;
if (dir[1] < 1.0e-5 && dir[1] > -1.0e-5)
dir[1] = 0;
if (dir[2] < 1.0e-5 && dir[2] > -1.0e-5)
dir[2] = 0;
obs[0] += v * dir[0];
obs[1] += v * dir[1];
obs[2] += v * dir[2];
@@ -544,11 +539,10 @@ drawipers(int depth, int from)
static void
draw(void)
{
static int count = 0;
static char frbuf[80];
static char frbuf[80] = "";
static GLfloat alpha = 0.0f;
static GLfloat beta = 0.0f;
float fr;
static float fr = 0.0;
dojoy();
@@ -610,10 +604,9 @@ draw(void)
/* Help Screen */
fr = gettime();
sprintf(frbuf,
"Frame rate: %0.2f LOD: %d Tot. poly.: %d Poly/sec: %.1f",
1.0 / fr, LODbias, totpoly, totpoly / fr);
fr, LODbias, totpoly, totpoly * fr);
glDisable(GL_TEXTURE_2D);
glDisable(GL_FOG);
@@ -644,7 +637,16 @@ draw(void)
glutSwapBuffers();
count++;
Frames++;
{
GLint t = glutGet(GLUT_ELAPSED_TIME);
if (t - T0 >= 2000) {
GLfloat seconds = (t - T0) / 1000.0;
fr = Frames / seconds;
T0 = t;
Frames = 0;
}
}
}
int

File diff suppressed because it is too large Load Diff

View File

@@ -33,14 +33,14 @@
#include <GL/glut.h>
#include <GL/glext.h>
#include "../util/readtex.c" /* I know, this is a hack. */
#include "readtex.c" /* I know, this is a hack. */
#define TEXTURE_FILE "../images/girl.rgb"
static GLfloat Xrot = 0, Yrot = -30, Zrot = 0;
static GLboolean Anim = GL_TRUE;
static GLint Bias = 0, BiasStepSign = +1; /* ints avoid fp precision problem */
static GLint BiasMin = -200, BiasMax = 500;
static GLint BiasMin = -400, BiasMax = 400;
@@ -192,6 +192,8 @@ static void SpecialKey( int key, int x, int y )
static void Init( void )
{
const char *exten = (const char *) glGetString(GL_EXTENSIONS);
GLfloat maxBias;
if (!strstr(exten, "GL_EXT_texture_lod_bias")) {
printf("Sorry, GL_EXT_texture_lod_bias not supported by this renderer.\n");
exit(1);
@@ -207,6 +209,11 @@ static void Init( void )
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glGetFloatv(GL_MAX_TEXTURE_LOD_BIAS_EXT, &maxBias);
printf("LOD bias range: [%g, %g]\n", -maxBias, maxBias);
BiasMin = -100 * maxBias;
BiasMax = 100 * maxBias;
}

View File

@@ -1,4 +1,4 @@
/* $Id: multiarb.c,v 1.6 2000/05/23 23:21:00 brianp Exp $ */
/* $Id: multiarb.c,v 1.11 2002/02/13 02:23:33 brianp Exp $ */
/*
* GL_ARB_multitexture demo
@@ -8,37 +8,7 @@
*
*
* Brian Paul November 1998 This program is in the public domain.
*/
/*
* $Log: multiarb.c,v $
* Revision 1.6 2000/05/23 23:21:00 brianp
* set default window pos
*
* Revision 1.5 2000/02/02 17:31:45 brianp
* changed > to >=
*
* Revision 1.4 2000/02/02 01:07:21 brianp
* limit Drift to [0, 1]
*
* Revision 1.3 1999/10/21 16:40:32 brianp
* added -info command line option
*
* Revision 1.2 1999/10/13 12:02:13 brianp
* use texture objects now
*
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 1.3 1999/03/28 18:20:49 brianp
* minor clean-up
*
* Revision 1.2 1998/11/05 04:34:04 brianp
* moved image files to ../images/ directory
*
* Revision 1.1 1998/11/03 01:36:33 brianp
* Initial revision
*
* Modified on 12 Feb 2002 for > 2 texture units.
*/
@@ -48,18 +18,19 @@
#include <string.h>
#include <GL/glut.h>
#include "../util/readtex.c" /* I know, this is a hack. */
#include "readtex.c" /* I know, this is a hack. */
#define TEXTURE_1_FILE "../images/girl.rgb"
#define TEXTURE_2_FILE "../images/reflect.rgb"
#define TEX0 1
#define TEX1 2
#define TEXBOTH 3
#define TEX7 8
#define ANIMATE 10
#define QUIT 100
static GLboolean Animate = GL_TRUE;
static GLint NumUnits = 1;
static GLboolean TexEnabled[8];
static GLfloat Drift = 0.0;
static GLfloat Xrot = 20.0, Yrot = 30.0, Zrot = 0.0;
@@ -69,24 +40,30 @@ static GLfloat Xrot = 20.0, Yrot = 30.0, Zrot = 0.0;
static void Idle( void )
{
if (Animate) {
GLint i;
Drift += 0.05;
if (Drift >= 1.0)
Drift = 0.0;
#ifdef GL_ARB_multitexture
glActiveTextureARB(GL_TEXTURE0_ARB);
#endif
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glTranslatef(Drift, 0.0, 0.0);
glMatrixMode(GL_MODELVIEW);
#ifdef GL_ARB_multitexture
glActiveTextureARB(GL_TEXTURE1_ARB);
#endif
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glTranslatef(0.0, Drift, 0.0);
for (i = 0; i < NumUnits; i++) {
glActiveTextureARB(GL_TEXTURE0_ARB + i);
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
if (i == 0) {
glTranslatef(Drift, 0.0, 0.0);
glScalef(2, 2, 2);
}
else if (i == 1) {
glTranslatef(0.0, Drift, 0.0);
}
else {
glTranslatef(0.5, 0.5, 0.0);
glRotatef(180.0 * Drift, 0, 0, 1);
glScalef(1.0/i, 1.0/i, 1.0/i);
glTranslatef(-0.5, -0.5, 0.0);
}
}
glMatrixMode(GL_MODELVIEW);
glutPostRedisplay();
@@ -96,37 +73,30 @@ static void Idle( void )
static void DrawObject(void)
{
GLint i;
if (!TexEnabled[0] && !TexEnabled[1])
glColor3f(0.1, 0.1, 0.1); /* add onto this */
else
glColor3f(1, 1, 1); /* modulate this */
glBegin(GL_QUADS);
#ifdef GL_ARB_multitexture
glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 0.0, 0.0);
glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 0.0, 0.0);
for (i = 0; i < NumUnits; i++)
glMultiTexCoord2fARB(GL_TEXTURE0_ARB + i, 0.0, 0.0);
glVertex2f(-1.0, -1.0);
glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 2.0, 0.0);
glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 1.0, 0.0);
for (i = 0; i < NumUnits; i++)
glMultiTexCoord2fARB(GL_TEXTURE0_ARB + i, 1.0, 0.0);
glVertex2f(1.0, -1.0);
glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 2.0, 2.0);
glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 1.0, 1.0);
for (i = 0; i < NumUnits; i++)
glMultiTexCoord2fARB(GL_TEXTURE0_ARB + i, 1.0, 1.0);
glVertex2f(1.0, 1.0);
glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 0.0, 2.0);
glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 0.0, 1.0);
for (i = 0; i < NumUnits; i++)
glMultiTexCoord2fARB(GL_TEXTURE0_ARB + i, 0.0, 1.0);
glVertex2f(-1.0, 1.0);
#else
glTexCoord2f(0.0, 0.0);
glVertex2f(-1.0, -1.0);
glTexCoord2f(1.0, 0.0);
glVertex2f(1.0, -1.0);
glTexCoord2f(1.0, 1.0);
glVertex2f(1.0, 1.0);
glTexCoord2f(0.0, 1.0);
glVertex2f(-1.0, 1.0);
#endif
glEnd();
}
@@ -164,16 +134,19 @@ static void Reshape( int width, int height )
static void ModeMenu(int entry)
{
GLboolean enable0 = GL_FALSE, enable1 = GL_FALSE;
if (entry==TEX0) {
enable0 = GL_TRUE;
}
else if (entry==TEX1) {
enable1 = GL_TRUE;
}
else if (entry==TEXBOTH) {
enable0 = GL_TRUE;
enable1 = GL_TRUE;
if (entry >= TEX0 && entry <= TEX7) {
/* toggle */
GLint i = entry - TEX0;
TexEnabled[i] = !TexEnabled[i];
glActiveTextureARB(GL_TEXTURE0_ARB + i);
if (TexEnabled[i])
glEnable(GL_TEXTURE_2D);
else
glDisable(GL_TEXTURE_2D);
printf("Enabled: ");
for (i = 0; i < NumUnits; i++)
printf("%d ", (int) TexEnabled[i]);
printf("\n");
}
else if (entry==ANIMATE) {
Animate = !Animate;
@@ -182,26 +155,6 @@ static void ModeMenu(int entry)
exit(0);
}
if (entry != ANIMATE) {
#ifdef GL_ARB_multitexture
glActiveTextureARB(GL_TEXTURE0_ARB);
#endif
if (enable0) {
glEnable(GL_TEXTURE_2D);
}
else
glDisable(GL_TEXTURE_2D);
#ifdef GL_ARB_multitexture
glActiveTextureARB(GL_TEXTURE1_ARB);
#endif
if (enable1) {
glEnable(GL_TEXTURE_2D);
}
else
glDisable(GL_TEXTURE_2D);
}
glutPostRedisplay();
}
@@ -245,7 +198,8 @@ static void SpecialKey( int key, int x, int y )
static void Init( int argc, char *argv[] )
{
GLuint texObj[2];
GLuint texObj[8];
GLint size, i;
const char *exten = (const char *) glGetString(GL_EXTENSIONS);
if (!strstr(exten, "GL_ARB_multitexture")) {
@@ -253,62 +207,82 @@ static void Init( int argc, char *argv[] )
exit(1);
}
/* allocate two texture objects */
glGenTextures(2, texObj);
glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &NumUnits);
printf("%d texture units supported\n", NumUnits);
if (NumUnits > 8)
NumUnits = 8;
/* setup texture obj 0 */
glBindTexture(GL_TEXTURE_2D, texObj[0]);
#ifdef LINEAR_FILTER
/* linear filtering looks much nicer but is much slower for Mesa */
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
#else
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
#endif
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &size);
printf("%d x %d max texture size\n", size, size);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
if (!LoadRGBMipmaps(TEXTURE_1_FILE, GL_RGB)) {
printf("Error: couldn't load texture image\n");
exit(1);
for (i = 0; i < NumUnits; i++) {
if (i < 2)
TexEnabled[i] = GL_TRUE;
else
TexEnabled[i] = GL_FALSE;
}
/* allocate two texture objects */
glGenTextures(NumUnits, texObj);
/* setup texture obj 1 */
glBindTexture(GL_TEXTURE_2D, texObj[1]);
#ifdef LINEAR_FILTER
/* linear filtering looks much nicer but is much slower for Mesa */
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
#else
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
#endif
/* setup the texture objects */
for (i = 0; i < NumUnits; i++) {
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glActiveTextureARB(GL_TEXTURE0_ARB + i);
glBindTexture(GL_TEXTURE_2D, texObj[i]);
if (!LoadRGBMipmaps(TEXTURE_2_FILE, GL_RGB)) {
printf("Error: couldn't load texture image\n");
exit(1);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
if (i == 0) {
if (!LoadRGBMipmaps(TEXTURE_1_FILE, GL_RGB)) {
printf("Error: couldn't load texture image\n");
exit(1);
}
}
else if (i == 1) {
if (!LoadRGBMipmaps(TEXTURE_2_FILE, GL_RGB)) {
printf("Error: couldn't load texture image\n");
exit(1);
}
}
else {
/* checker */
GLubyte image[8][8][3];
GLint i, j;
for (i = 0; i < 8; i++) {
for (j = 0; j < 8; j++) {
if ((i + j) & 1) {
image[i][j][0] = 50;
image[i][j][1] = 50;
image[i][j][2] = 50;
}
else {
image[i][j][0] = 25;
image[i][j][1] = 25;
image[i][j][2] = 25;
}
}
}
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 8, 8, 0,
GL_RGB, GL_UNSIGNED_BYTE, (GLvoid *) image);
}
/* Bind texObj[i] to ith texture unit */
if (i < 2)
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
else
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD);
if (TexEnabled[i])
glEnable(GL_TEXTURE_2D);
}
/* now bind the texture objects to the respective texture units */
#ifdef GL_ARB_multitexture
glActiveTextureARB(GL_TEXTURE0_ARB);
glBindTexture(GL_TEXTURE_2D, texObj[0]);
glActiveTextureARB(GL_TEXTURE1_ARB);
glBindTexture(GL_TEXTURE_2D, texObj[1]);
#endif
glShadeModel(GL_FLAT);
glClearColor(0.3, 0.3, 0.4, 1.0);
ModeMenu(TEXBOTH);
if (argc > 1 && strcmp(argv[1], "-info")==0) {
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
@@ -320,6 +294,8 @@ static void Init( int argc, char *argv[] )
int main( int argc, char *argv[] )
{
GLint i;
glutInit( &argc, argv );
glutInitWindowSize( 300, 300 );
glutInitWindowPosition( 0, 0 );
@@ -335,9 +311,12 @@ int main( int argc, char *argv[] )
glutIdleFunc( Idle );
glutCreateMenu(ModeMenu);
glutAddMenuEntry("Texture 0", TEX0);
glutAddMenuEntry("Texture 1", TEX1);
glutAddMenuEntry("Multi-texture", TEXBOTH);
for (i = 0; i < NumUnits; i++) {
char s[100];
sprintf(s, "Toggle Texture %d", i);
glutAddMenuEntry(s, TEX0 + i);
}
glutAddMenuEntry("Toggle Animation", ANIMATE);
glutAddMenuEntry("Quit", QUIT);
glutAttachMenu(GLUT_RIGHT_BUTTON);

View File

@@ -1,4 +1,4 @@
/* $Id: osdemo.c,v 1.4 2000/03/28 16:59:39 rjfrank Exp $ */
/* $Id: osdemo.c,v 1.9 2002/07/12 15:54:19 brianp Exp $ */
/*
* Demo of off-screen Mesa rendering
@@ -14,11 +14,17 @@
*
* PPM output provided by Joerg Schmalzl.
* ASCII PPM output added by Brian Paul.
*
* Usage: osdemo [-perf] [filename]
*
* -perf: Redraws the image 1000 times, displaying the FPS every 5 secs.
* filename: file to store the TGA or PPM output
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "GL/osmesa.h"
#include "GL/glut.h"
@@ -29,7 +35,9 @@
#define WIDTH 400
#define HEIGHT 400
static GLint T0 = 0;
static GLint Frames = 0;
static int perf = 0;
static void render_image( void )
{
@@ -76,7 +84,7 @@ static void render_image( void )
glPopMatrix();
#ifdef GL_HP_occlusion_test
{
if (perf == 0) {
GLboolean bRet;
glDepthMask(GL_FALSE);
glColorMask(GL_FALSE,GL_FALSE,GL_FALSE,GL_FALSE);
@@ -105,7 +113,7 @@ static void render_image( void )
glPopMatrix();
#ifdef GL_HP_occlusion_test
{
if (perf == 0){
GLboolean bRet;
glDepthMask(GL_FALSE);
@@ -130,9 +138,22 @@ static void render_image( void )
#endif
glPopMatrix();
Frames++;
if (perf) {
GLint t = glutGet(GLUT_ELAPSED_TIME);
if (t - T0 >= 5000) {
GLfloat seconds = (t - T0) / 1000.0;
GLfloat fps = Frames / seconds;
printf("%d frames in %6.3f seconds = %6.3f FPS\n", Frames, seconds, fps);
T0 = t;
Frames = 0;
}
}
}
#ifdef SAVE_TARGA
static void
write_targa(const char *filename, const GLubyte *buffer, int width, int height)
@@ -173,6 +194,7 @@ write_targa(const char *filename, const GLubyte *buffer, int width, int height)
}
}
#else
static void
write_ppm(const char *filename, const GLubyte *buffer, int width, int height)
@@ -219,26 +241,65 @@ write_ppm(const char *filename, const GLubyte *buffer, int width, int height)
}
}
#endif
int main( int argc, char *argv[] )
{
void *buffer;
int i;
char *filename = NULL;
/* Create an RGBA-mode context */
OSMesaContext ctx = OSMesaCreateContext( GL_RGBA, NULL );
#if OSMESA_MAJOR_VERSION * 100 + OSMESA_MINOR_VERSION >= 305
/* specify Z, stencil, accum sizes */
OSMesaContext ctx = OSMesaCreateContextExt( OSMESA_RGBA, 16, 0, 0, NULL );
#else
OSMesaContext ctx = OSMesaCreateContext( OSMESA_RGBA, NULL );
#endif
if (!ctx) {
printf("OSMesaCreateContext failed!\n");
return 0;
}
for ( i=1; i<argc; i++ ) {
if (argv[i][0] != '-') filename = argv[i];
if (strcmp(argv[i], "-perf")==0) perf = 1;
}
/* Allocate the image buffer */
void *buffer = malloc( WIDTH * HEIGHT * 4 );
buffer = malloc( WIDTH * HEIGHT * 4 * sizeof(GLubyte) );
if (!buffer) {
printf("Alloc image buffer failed!\n");
return 0;
}
/* Bind the buffer to the context and make it current */
OSMesaMakeCurrent( ctx, buffer, GL_UNSIGNED_BYTE, WIDTH, HEIGHT );
if (!OSMesaMakeCurrent( ctx, buffer, GL_UNSIGNED_BYTE, WIDTH, HEIGHT )) {
printf("OSMesaMakeCurrent failed!\n");
return 0;
}
{
int z, s, a;
glGetIntegerv(GL_DEPTH_BITS, &z);
glGetIntegerv(GL_STENCIL_BITS, &s);
glGetIntegerv(GL_ACCUM_RED_BITS, &a);
printf("Depth=%d Stencil=%d Accum=%d\n", z, s, a);
}
render_image();
if (perf)
for(i=0; i< 1000; i++)
render_image();
if (argc>1) {
if (filename != NULL) {
#ifdef SAVE_TARGA
write_targa(argv[1], buffer, WIDTH, HEIGHT);
write_targa(filename, buffer, WIDTH, HEIGHT);
#else
write_ppm(argv[1], buffer, WIDTH, HEIGHT);
write_ppm(filename, buffer, WIDTH, HEIGHT);
#endif
}
else {

View File

@@ -1,4 +1,4 @@
/* $Id: paltex.c,v 1.4 2000/06/27 17:12:10 brianp Exp $ */
/* $Id: paltex.c,v 1.9 2002/07/22 13:45:31 brianp Exp $ */
/*
* Paletted texture demo. Written by Brian Paul.
@@ -8,27 +8,41 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#ifdef _WIN32
#include <windows.h>
#endif
#define GL_GLEXT_LEGACY
#include <GL/glut.h>
static float Rot = 0.0;
static GLboolean Anim = 1;
static void Idle( void )
{
Rot += 5.0;
float t = glutGet(GLUT_ELAPSED_TIME) * 0.001; /* in seconds */
Rot = t * 360 / 4; /* 1 rotation per 4 seconds */
glutPostRedisplay();
}
static void Display( void )
{
glClear( GL_COLOR_BUFFER_BIT );
/* draw background gradient */
glDisable(GL_TEXTURE_2D);
glBegin(GL_POLYGON);
glColor3f(1.0, 0.0, 0.2); glVertex2f(-1.5, -1.0);
glColor3f(1.0, 0.0, 0.2); glVertex2f( 1.5, -1.0);
glColor3f(0.0, 0.0, 1.0); glVertex2f( 1.5, 1.0);
glColor3f(0.0, 0.0, 1.0); glVertex2f(-1.5, 1.0);
glEnd();
glPushMatrix();
glRotatef(Rot, 0, 0, 1);
glEnable(GL_TEXTURE_2D);
glBegin(GL_POLYGON);
glTexCoord2f(0, 1); glVertex2f(-1, -0.5);
glTexCoord2f(1, 1); glVertex2f( 1, -0.5);
@@ -47,10 +61,9 @@ static void Reshape( int width, int height )
glViewport( 0, 0, width, height );
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 );
glOrtho( -1.5, 1.5, -1.0, 1.0, -1.0, 1.0 );
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
glTranslatef( 0.0, 0.0, -7.0 );
}
@@ -62,6 +75,16 @@ static void Key( unsigned char key, int x, int y )
case 27:
exit(0);
break;
case 's':
Rot += 0.5;
break;
case ' ':
Anim = !Anim;
if (Anim)
glutIdleFunc( Idle );
else
glutIdleFunc( NULL );
break;
}
glutPostRedisplay();
}
@@ -71,15 +94,16 @@ static void Init( void )
{
#define HEIGHT 8
#define WIDTH 32
static char texture[HEIGHT][WIDTH] = {
" ",
" MMM EEEE SSS AAA ",
" M M M E S S A A ",
" M M M EEEE SS A A ",
" M M M E SS AAAAA ",
" M M E S S A A ",
" M M EEEE SSS A A ",
" "
/* 257 = HEIGHT * WIDTH + 1 (for trailing '\0') */
static char texture[257] = {"\
\
MMM EEEE SSS AAA \
M M M E S S A A \
M M M EEEE SS A A \
M M M E SS AAAAA \
M M E S S A A \
M M EEEE SSS A A \
"
};
GLubyte table[256][4];
@@ -89,26 +113,99 @@ static void Init( void )
}
/* load the color table for each texel-index */
table[' '][0] = 50;
table[' '][1] = 50;
table[' '][2] = 50;
table[' '][3] = 50;
memset(table, 0, 256*4);
table[' '][0] = 255;
table[' '][1] = 255;
table[' '][2] = 255;
table[' '][3] = 64;
table['M'][0] = 255;
table['M'][1] = 0;
table['M'][2] = 0;
table['M'][3] = 0;
table['M'][3] = 255;
table['E'][0] = 0;
table['E'][1] = 255;
table['E'][2] = 0;
table['E'][3] = 0;
table['S'][0] = 40;
table['S'][1] = 40;
table['E'][3] = 255;
table['S'][0] = 0;
table['S'][1] = 0;
table['S'][2] = 255;
table['S'][3] = 0;
table['S'][3] = 255;
table['A'][0] = 255;
table['A'][1] = 255;
table['A'][2] = 0;
table['A'][3] = 0;
table['A'][3] = 255;
#ifdef GL_EXT_paletted_texture
#if defined(GL_EXT_shared_texture_palette) && defined(USE_SHARED_PALETTE)
printf("Using shared palette\n");
glColorTableEXT(GL_SHARED_TEXTURE_PALETTE_EXT, /* target */
GL_RGBA, /* internal format */
256, /* table size */
GL_RGBA, /* table format */
GL_UNSIGNED_BYTE, /* table type */
table); /* the color table */
glEnable(GL_SHARED_TEXTURE_PALETTE_EXT);
#else
glColorTableEXT(GL_TEXTURE_2D, /* target */
GL_RGBA, /* internal format */
256, /* table size */
GL_RGBA, /* table format */
GL_UNSIGNED_BYTE, /* table type */
table); /* the color table */
#endif
glTexImage2D(GL_TEXTURE_2D, /* target */
0, /* level */
GL_COLOR_INDEX8_EXT, /* internal format */
WIDTH, HEIGHT, /* width, height */
0, /* border */
GL_COLOR_INDEX, /* texture format */
GL_UNSIGNED_BYTE, /* texture type */
texture); /* the texture */
#endif
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
#undef HEIGHT
#undef WIDTH
}
/*
* Color ramp test
*/
static void Init2( void )
{
#define HEIGHT 32
#define WIDTH 256
static char texture[HEIGHT][WIDTH];
GLubyte table[256][4];
int i, j;
if (!glutExtensionSupported("GL_EXT_paletted_texture")) {
printf("Sorry, GL_EXT_paletted_texture not supported\n");
exit(0);
}
for (j = 0; j < HEIGHT; j++) {
for (i = 0; i < WIDTH; i++) {
texture[j][i] = i;
}
}
for (i = 0; i < 255; i++) {
table[i][0] = i;
table[i][1] = 0;
table[i][2] = 0;
table[i][3] = 255;
}
#ifdef GL_EXT_paletted_texture
@@ -144,6 +241,9 @@ static void Init( void )
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
}
@@ -151,7 +251,7 @@ int main( int argc, char *argv[] )
{
glutInit( &argc, argv );
glutInitWindowPosition( 0, 0 );
glutInitWindowSize( 400, 400 );
glutInitWindowSize( 400, 300 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
@@ -162,7 +262,8 @@ int main( int argc, char *argv[] )
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
glutIdleFunc( Idle );
if (Anim)
glutIdleFunc( Idle );
glutMainLoop();
return 0;

View File

@@ -56,7 +56,7 @@
#include <string.h>
#include <GL/glut.h>
#include <GL/glext.h>
#include "../util/readtex.c" /* I know, this is a hack. */
#include "readtex.c" /* I know, this is a hack. */
#define TEXTURE_FILE "../images/girl.rgb"
@@ -127,12 +127,12 @@ static void Idle(void)
static GLubyte warp(GLfloat s, int frame)
{
static const GLfloat PI = 3.14159265;
static const GLfloat pi = 3.14159265;
static int halfFrame = FRAMES / 2;
GLfloat y, weight, v;
if (frame >= halfFrame)
frame = halfFrame - (frame - halfFrame);
y = sin(s * PI);
y = sin(s * pi);
weight = (float) frame / (FRAMES-1);
v = y * (0.8 * weight + 0.2);
return (GLint) (v * 255.0F);

View File

@@ -11,33 +11,13 @@
is present , the particle size is attenuated based on eye distance. */
/*
* $Log: pointblast.c,v $
* Revision 1.2 2000/06/27 17:04:43 brianp
* fixed compiler warnings
*
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 3.3 1998/07/26 01:24:27 brianp
* removed include of gl.h
*
* Revision 3.2 1998/02/14 18:51:46 brianp
* fixed a small compiler warning
*
* Revision 3.1 1998/02/14 18:45:25 brianp
* optimized to use flat shading, don't blend ground polygon
*
* Revision 3.0 1998/02/14 18:42:29 brianp
* initial rev
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h> /* for cos(), sin(), and sqrt() */
#ifdef _WIN32
#include <windows.h>
#endif
#define GL_GLEXT_LEGACY
#include <GL/glut.h>

View File

@@ -11,15 +11,20 @@
#include <math.h>
#include <time.h>
#include <GL/glut.h>
#ifndef M_PI
#define M_PI 3.14159265
#endif
#include "particles.h"
extern "C" {
#include "image.h"
#include "readtex.h"
}
#ifdef WIN32
#ifdef _WIN32
#include <windows.h>
#include <mmsystem.h>
#include "particles.cxx"
#include "readtex.c"
#endif
#ifdef XMESA
@@ -297,20 +302,21 @@ static void key(unsigned char key, int x, int y)
static void inittextures(void)
{
IMAGE *img;
GLubyte *img;
GLint width,height;
GLenum format;
GLenum gluerr;
glGenTextures(1,&groundid);
glBindTexture(GL_TEXTURE_2D,groundid);
if(!(img=ImageLoad("s128.rgb"))) {
fprintf(stderr,"Error reading a texture.\n");
exit(-1);
if(!(img=LoadRGBImage("../images/s128.rgb",&width,&height,&format))){
fprintf(stderr,"Error reading a texture.\n");
exit(-1);
}
glPixelStorei(GL_UNPACK_ALIGNMENT,4);
if((gluerr=(GLenum)gluBuild2DMipmaps(GL_TEXTURE_2D, 3, img->sizeX, img->sizeY, GL_RGB,
GL_UNSIGNED_BYTE, (GLvoid *)(img->data)))) {
if((gluerr=(GLenum)gluBuild2DMipmaps(GL_TEXTURE_2D, 3, width, height,GL_RGB,
GL_UNSIGNED_BYTE, (GLvoid *)(img)))) {
fprintf(stderr,"GLULib%s\n",gluErrorString(gluerr));
exit(-1);
}

View File

@@ -8,6 +8,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#ifdef WIN32
@@ -24,7 +25,8 @@ static int fullscreen = 1;
static int WIDTH = 640;
static int HEIGHT = 480;
#define FRAME 50
static GLint T0 = 0;
static GLint Frames = 0;
#define BASESIZE 7.5f
#define SPHERE_RADIUS 0.75f
@@ -94,21 +96,6 @@ static int showreflectmap = 1;
static int joyavailable = 0;
static int joyactive = 0;
static float
gettime(void)
{
static float told = 0.0f;
float tnew, ris;
tnew = glutGet(GLUT_ELAPSED_TIME);
ris = tnew - told;
told = tnew;
return ris / 1000.0;
}
static void
calcposobs(void)
{
@@ -116,6 +103,13 @@ calcposobs(void)
dir[1] = cos(alpha * M_PI / 180.0) * sin(beta * M_PI / 180.0);
dir[2] = cos(beta * M_PI / 180.0);
if (dir[0] < 1.0e-5 && dir[0] > -1.0e-5)
dir[0] = 0;
if (dir[1] < 1.0e-5 && dir[1] > -1.0e-5)
dir[1] = 0;
if (dir[2] < 1.0e-5 && dir[2] > -1.0e-5)
dir[2] = 0;
obs[0] += v * dir[0];
obs[1] += v * dir[1];
obs[2] += v * dir[2];
@@ -393,8 +387,7 @@ colorcheckmap(float ppos[3], float c[3])
h[1] = 0.5f * (vdir[1] + ldir[1]);
h[2] = 0.5f * (vdir[2] + ldir[2]);
kfact = dprod(h, norm);
kfact =
kfact * kfact * kfact * kfact * kfact * kfact * kfact * 7.0f * 255.0f;
kfact = pow(kfact, 6.0) * 7.0 * 255.0;
r = r * dfact + kfact;
g = g * dfact + kfact;
@@ -494,12 +487,10 @@ updatereflectmap(int slot)
h[1] = 0.5f * (vdir[1] + ldir[1]);
h[2] = 0.5f * (vdir[2] + ldir[2]);
kfact = dprod(h, norm);
kfact *= kfact;
kfact *= kfact;
kfact *= kfact;
kfact *= kfact;
kfact *= 10.0f;
}
kfact = pow(kfact, 4.0);
if (kfact < 1.0e-10)
kfact = 0.0;
}
r = dfact + kfact;
g = dfact + kfact;
@@ -622,9 +613,7 @@ updatemaps(void)
static void
draw(void)
{
static int count = 0;
static char frbuf[80];
float fr;
static char frbuf[80] = "";
dojoy();
@@ -657,11 +646,6 @@ draw(void)
glPopMatrix();
if ((count % FRAME) == 0) {
fr = gettime();
sprintf(frbuf, "Frame rate: %f", FRAME / fr);
}
glDisable(GL_DEPTH_TEST);
glDisable(GL_FOG);
@@ -746,7 +730,17 @@ draw(void)
glutSwapBuffers();
count++;
Frames++;
{
GLint t = glutGet(GLUT_ELAPSED_TIME);
if (t - T0 >= 2000) {
GLfloat seconds = (t - T0) / 1000.0;
GLfloat fps = Frames / seconds;
sprintf(frbuf, "Frame rate: %f", fps);
T0 = t;
Frames = 0;
}
}
}
static void

View File

@@ -1,4 +1,4 @@
/* $Id: readpix.c,v 1.3 2000/03/31 01:01:31 brianp Exp $ */
/* $Id: readpix.c,v 1.8 2002/07/12 15:54:02 brianp Exp $ */
/*
* glReadPixels and glCopyPixels test
@@ -6,20 +6,6 @@
* Brian Paul March 1, 2000 This file is in the public domain.
*/
/*
* $Log: readpix.c,v $
* Revision 1.3 2000/03/31 01:01:31 brianp
* tweaks to allow different read formats/types
*
* Revision 1.2 2000/03/23 19:47:25 brianp
* added benchmarking
*
* Revision 1.1 2000/03/01 16:23:14 brianp
* test glDraw/Read/CopyPixels()
*
*/
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
@@ -43,11 +29,11 @@ static GLboolean ScaleAndBias = GL_FALSE;
static GLboolean Benchmark = GL_FALSE;
static GLubyte *TempImage = NULL;
#if 1
#if 0
#define ReadFormat ImgFormat
#define ReadType GL_UNSIGNED_BYTE
#endif
#if 0
#if 1
static GLenum ReadFormat = GL_RGBA;
static GLenum ReadType = GL_UNSIGNED_BYTE;
#endif
@@ -55,6 +41,18 @@ static GLenum ReadType = GL_UNSIGNED_BYTE;
static GLenum ReadFormat = GL_RGB;
static GLenum ReadType = GL_UNSIGNED_SHORT_5_6_5;
#endif
#if 0
static GLenum ReadFormat = GL_RGBA;
static GLenum ReadType = GL_UNSIGNED_SHORT_1_5_5_5_REV;
#endif
#if 0
static GLenum ReadFormat = GL_BGRA;
static GLenum ReadType = GL_UNSIGNED_SHORT_5_5_5_1;
#endif
#if 0
static GLenum ReadFormat = GL_BGRA;
static GLenum ReadType = GL_UNSIGNED_SHORT_4_4_4_4_REV;
#endif
static void
@@ -101,6 +99,7 @@ SetupPixelTransfer(GLboolean invert)
static void
Display( void )
{
glClearColor(.3, .3, .3, 1);
glClear( GL_COLOR_BUFFER_BIT );
glRasterPos2i(5, ImgHeight+25);
@@ -137,6 +136,8 @@ Display( void )
Benchmark = GL_FALSE;
}
else {
/* clear the temporary image to white (helpful for debugging */
memset(TempImage, 255, ImgWidth * ImgHeight * 4);
glReadPixels(APosX, APosY, ImgWidth, ImgHeight,
ReadFormat, ReadType, TempImage);
}
@@ -155,6 +156,8 @@ Display( void )
if (!DrawFront)
glutSwapBuffers();
else
glFinish();
}
@@ -216,7 +219,7 @@ Init( GLboolean ciMode )
if (ciMode) {
/* Convert RGB image to grayscale */
GLubyte *indexImage = malloc( ImgWidth * ImgHeight );
GLubyte *indexImage = (GLubyte *) malloc( ImgWidth * ImgHeight );
GLint i;
for (i=0; i<ImgWidth*ImgHeight; i++) {
int gray = Image[i*3] + Image[i*3+1] + Image[i*3+2];

View File

@@ -1,4 +1,4 @@
/* $Id: reflect.c,v 1.3 2000/06/15 14:25:48 brianp Exp $ */
/* $Id: reflect.c,v 1.7 2001/04/25 15:51:32 brianp Exp $ */
/*
* Demo of a reflective, texture-mapped surface with OpenGL.
@@ -53,7 +53,11 @@ static GLfloat spin;
static GLint Width = 400, Height = 300;
static GLenum ShowBuffer = GL_NONE;
static GLboolean Anim = GL_TRUE;
/* performance info */
static GLint T0 = 0;
static GLint Frames = 0;
static void make_table( void )
@@ -144,7 +148,7 @@ static void init( void )
glEnable( GL_LIGHT0 );
glEnable( GL_LIGHTING );
glClearColor( 0.5, 0.5, 0.9, 1.0 );
glClearColor( 0.5, 0.5, 0.9, 0.0 );
glEnable( GL_NORMALIZE );
}
@@ -293,8 +297,31 @@ static void draw_scene( void )
else if (ShowBuffer == GL_STENCIL) {
ShowStencilBuffer(Width, Height, 255.0, 0.0);
}
else if (ShowBuffer == GL_ALPHA) {
ShowAlphaBuffer(Width, Height);
}
glutSwapBuffers();
{
GLint t = glutGet(GLUT_ELAPSED_TIME);
Frames++;
if (t - T0 >= 5000) {
GLfloat seconds = (t - T0) / 1000.0;
GLfloat fps = Frames / seconds;
printf("%d frames in %g seconds = %g FPS\n", Frames, seconds, fps);
T0 = t;
Frames = 0;
}
}
}
static void idle( void )
{
spin += 2.0;
yrot += 3.0;
glutPostRedisplay();
}
@@ -308,6 +335,16 @@ static void Key( unsigned char key, int x, int y )
else if (key == 's') {
ShowBuffer = GL_STENCIL;
}
else if (key == 'a') {
ShowBuffer = GL_ALPHA;
}
else if (key == ' ') {
Anim = !Anim;
if (Anim)
glutIdleFunc(idle);
else
glutIdleFunc(NULL);
}
else if (key==27) {
exit(0);
}
@@ -344,16 +381,6 @@ static void SpecialKey( int key, int x, int y )
}
static void idle( void )
{
spin += 2.0;
yrot += 3.0;
glutPostRedisplay();
}
int main( int argc, char *argv[] )
{
glutInit(&argc, argv);

View File

@@ -1,119 +0,0 @@
/**
(c) Copyright 1993, Silicon Graphics, Inc.
ALL RIGHTS RESERVED
Permission to use, copy, modify, and distribute this software
for any purpose and without fee is hereby granted, provided
that the above copyright notice appear in all copies and that
both the copyright notice and this permission notice appear in
supporting documentation, and that the name of Silicon
Graphics, Inc. not be used in advertising or publicity
pertaining to distribution of the software without specific,
written prior permission.
THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU
"AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR
OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO
EVENT SHALL SILICON GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE
ELSE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR
CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER,
INCLUDING WITHOUT LIMITATION, LOSS OF PROFIT, LOSS OF USE,
SAVINGS OR REVENUE, OR THE CLAIMS OF THIRD PARTIES, WHETHER OR
NOT SILICON GRAPHICS, INC. HAS BEEN ADVISED OF THE POSSIBILITY
OF SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
ARISING OUT OF OR IN CONNECTION WITH THE POSSESSION, USE OR
PERFORMANCE OF THIS SOFTWARE.
US Government Users Restricted Rights
Use, duplication, or disclosure by the Government is subject to
restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
(c)(1)(ii) of the Rights in Technical Data and Computer
Software clause at DFARS 252.227-7013 and/or in similar or
successor clauses in the FAR or the DOD or NASA FAR
Supplement. Unpublished-- rights reserved under the copyright
laws of the United States. Contractor/manufacturer is Silicon
Graphics, Inc., 2011 N. Shoreline Blvd., Mountain View, CA
94039-7311.
OpenGL(TM) is a trademark of Silicon Graphics, Inc.
*/
/* Taken from the projshadow.c - by Tom McReynolds, SGI */
/* Modified by David Bucciarelli */
/* Rendering shadows using projective shadows. */
#include <GL/glut.h>
#include "shadow.h"
enum {
X, Y, Z, W
};
enum {
A, B, C, D
};
/* create a matrix that will project the desired shadow */
void
shadowmatrix(GLfloat shadowMat[4][4],
GLfloat groundplane[4],
GLfloat lightpos[4])
{
GLfloat dot;
/* find dot product between light position vector and ground plane normal */
dot = groundplane[X] * lightpos[X] +
groundplane[Y] * lightpos[Y] +
groundplane[Z] * lightpos[Z] +
groundplane[W] * lightpos[W];
shadowMat[0][0] = dot - lightpos[X] * groundplane[X];
shadowMat[1][0] = 0.f - lightpos[X] * groundplane[Y];
shadowMat[2][0] = 0.f - lightpos[X] * groundplane[Z];
shadowMat[3][0] = 0.f - lightpos[X] * groundplane[W];
shadowMat[X][1] = 0.f - lightpos[Y] * groundplane[X];
shadowMat[1][1] = dot - lightpos[Y] * groundplane[Y];
shadowMat[2][1] = 0.f - lightpos[Y] * groundplane[Z];
shadowMat[3][1] = 0.f - lightpos[Y] * groundplane[W];
shadowMat[X][2] = 0.f - lightpos[Z] * groundplane[X];
shadowMat[1][2] = 0.f - lightpos[Z] * groundplane[Y];
shadowMat[2][2] = dot - lightpos[Z] * groundplane[Z];
shadowMat[3][2] = 0.f - lightpos[Z] * groundplane[W];
shadowMat[X][3] = 0.f - lightpos[W] * groundplane[X];
shadowMat[1][3] = 0.f - lightpos[W] * groundplane[Y];
shadowMat[2][3] = 0.f - lightpos[W] * groundplane[Z];
shadowMat[3][3] = dot - lightpos[W] * groundplane[W];
}
/* find the plane equation given 3 points */
void
findplane(GLfloat plane[4],
GLfloat v0[3], GLfloat v1[3], GLfloat v2[3])
{
GLfloat vec0[3], vec1[3];
/* need 2 vectors to find cross product */
vec0[X] = v1[X] - v0[X];
vec0[Y] = v1[Y] - v0[Y];
vec0[Z] = v1[Z] - v0[Z];
vec1[X] = v2[X] - v0[X];
vec1[Y] = v2[Y] - v0[Y];
vec1[Z] = v2[Z] - v0[Z];
/* find cross product to get A, B, and C of plane equation */
plane[A] = vec0[Y] * vec1[Z] - vec0[Z] * vec1[Y];
plane[B] = -(vec0[X] * vec1[Z] - vec0[Z] * vec1[X]);
plane[C] = vec0[X] * vec1[Y] - vec0[Y] * vec1[X];
plane[D] = -(plane[A] * v0[X] + plane[B] * v0[Y] + plane[C] * v0[Z]);
}

View File

@@ -1,18 +0,0 @@
#ifndef SHADOW_H
#define SHADOW_H
extern void
shadowmatrix(GLfloat shadowMat[4][4],
GLfloat groundplane[4],
GLfloat lightpos[4]);
extern void
findplane(GLfloat plane[4],
GLfloat v0[3], GLfloat v1[3], GLfloat v2[3]);
#endif

596
progs/demos/shadowtex.c Normal file
View File

@@ -0,0 +1,596 @@
/* $Id: shadowtex.c,v 1.7 2002/07/12 15:54:02 brianp Exp $ */
/*
* Shadow demo using the GL_ARB_depth_texture, GL_ARB_shadow and
* GL_ARB_shadow_ambient extensions (or the old SGIX extensions).
*
* Brian Paul
* 19 Feb 2001
*
* Added GL_EXT_shadow_funcs support on 23 March 2002
*
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <GL/glut.h>
#include "../util/showbuffer.c"
#if 0 /* change to 1 if you want to use the old SGIX extensions */
#undef GL_ARB_depth_texture
#undef GL_ARB_shadow
#undef GL_ARB_shadow_ambient
#endif
#define DEG_TO_RAD (3.14159 / 180.0)
static GLint WindowWidth = 450, WindowHeight = 300;
static GLfloat Xrot = 15, Yrot = 0, Zrot = 0;
static GLfloat Red[4] = {1, 0, 0, 1};
static GLfloat Green[4] = {0, 1, 0, 1};
static GLfloat Blue[4] = {0, 0, 1, 1};
static GLfloat Yellow[4] = {1, 1, 0, 1};
static GLfloat LightDist = 10;
static GLfloat LightLatitude = 45.0;
static GLfloat LightLongitude = 45.0;
static GLfloat LightPos[4];
static GLfloat SpotDir[3];
static GLfloat SpotAngle = 40.0 * DEG_TO_RAD;
static GLfloat ShadowNear = 4.0, ShadowFar = 24.0;
static GLint ShadowTexWidth = 256, ShadowTexHeight = 256;
static GLboolean LinearFilter = GL_FALSE;
static GLfloat Bias = -0.06;
static GLboolean Anim = GL_TRUE;
static GLboolean HaveEXTshadowFuncs = GL_FALSE;
static GLint Operator = 0;
static const GLenum OperatorFunc[8] = {
GL_LEQUAL, GL_LESS, GL_GEQUAL, GL_GREATER,
GL_EQUAL, GL_NOTEQUAL, GL_ALWAYS, GL_NEVER };
static const char *OperatorName[8] = {
"GL_LEQUAL", "GL_LESS", "GL_GEQUAL", "GL_GREATER",
"GL_EQUAL", "GL_NOTEQUAL", "GL_ALWAYS", "GL_NEVER" };
static GLuint DisplayMode;
#define SHOW_NORMAL 0
#define SHOW_DEPTH_IMAGE 1
#define SHOW_DEPTH_MAPPING 2
#define SHOW_DISTANCE 3
static void
DrawScene(void)
{
GLfloat k = 6;
/* sphere */
glPushMatrix();
glTranslatef(1.6, 2.2, 2.7);
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, Green);
glColor4fv(Green);
glutSolidSphere(1.5, 15, 15);
glPopMatrix();
/* dodecahedron */
glPushMatrix();
glTranslatef(-2.0, 1.2, 2.1);
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, Red);
glColor4fv(Red);
glutSolidDodecahedron();
glPopMatrix();
/* icosahedron */
glPushMatrix();
glTranslatef(-0.6, 1.3, -0.5);
glScalef(1.5, 1.5, 1.5);
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, Yellow);
glColor4fv(Red);
glutSolidIcosahedron();
glPopMatrix();
/* a plane */
glPushMatrix();
glTranslatef(0, -1.1, 0);
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, Blue);
glColor4fv(Blue);
glNormal3f(0, 1, 0);
glBegin(GL_POLYGON);
glVertex3f(-k, 0, -k);
glVertex3f( k, 0, -k);
glVertex3f( k, 0, k);
glVertex3f(-k, 0, k);
glEnd();
glPopMatrix();
}
/*
* Load the GL_TEXTURE matrix with the projection from the light
* source's point of view.
*/
static void
MakeShadowMatrix(const GLfloat lightPos[4], const GLfloat spotDir[3],
GLfloat spotAngle, GLfloat shadowNear, GLfloat shadowFar)
{
GLfloat d;
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glTranslatef(0.5, 0.5, 0.5 + Bias);
glScalef(0.5, 0.5, 0.5);
d = shadowNear * tan(spotAngle);
glFrustum(-d, d, -d, d, shadowNear, shadowFar);
gluLookAt(lightPos[0], lightPos[1], lightPos[2],
lightPos[0] + spotDir[0],
lightPos[1] + spotDir[1],
lightPos[2] + spotDir[2],
0, 1, 0);
glMatrixMode(GL_MODELVIEW);
}
static void
EnableIdentityTexgen(void)
{
/* texgen so that texcoord = vertex coord */
static GLfloat sPlane[4] = { 1, 0, 0, 0 };
static GLfloat tPlane[4] = { 0, 1, 0, 0 };
static GLfloat rPlane[4] = { 0, 0, 1, 0 };
static GLfloat qPlane[4] = { 0, 0, 0, 1 };
glTexGenfv(GL_S, GL_EYE_PLANE, sPlane);
glTexGenfv(GL_T, GL_EYE_PLANE, tPlane);
glTexGenfv(GL_R, GL_EYE_PLANE, rPlane);
glTexGenfv(GL_Q, GL_EYE_PLANE, qPlane);
glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
glTexGeni(GL_Q, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
glEnable(GL_TEXTURE_GEN_S);
glEnable(GL_TEXTURE_GEN_T);
glEnable(GL_TEXTURE_GEN_R);
glEnable(GL_TEXTURE_GEN_Q);
}
/*
* Setup 1-D texgen so that the distance from the light source, between
* the near and far planes maps to s=0 and s=1. When we draw the scene,
* the grayness will indicate the fragment's distance from the light
* source.
*/
static void
EnableDistanceTexgen(const GLfloat lightPos[4], const GLfloat lightDir[3],
GLfloat lightNear, GLfloat lightFar)
{
GLfloat m, d;
GLfloat sPlane[4];
GLfloat nearPoint[3];
m = sqrt(lightDir[0] * lightDir[0] +
lightDir[1] * lightDir[1] +
lightDir[2] * lightDir[2]);
d = lightFar - lightNear;
/* nearPoint = point on light direction vector which intersects the
* near plane of the light frustum.
*/
nearPoint[0] = LightPos[0] + lightDir[0] / m * lightNear;
nearPoint[1] = LightPos[1] + lightDir[1] / m * lightNear;
nearPoint[2] = LightPos[2] + lightDir[2] / m * lightNear;
sPlane[0] = lightDir[0] / d / m;
sPlane[1] = lightDir[1] / d / m;
sPlane[2] = lightDir[2] / d / m;
sPlane[3] = -(sPlane[0] * nearPoint[0]
+ sPlane[1] * nearPoint[1]
+ sPlane[2] * nearPoint[2]);
glTexGenfv(GL_S, GL_EYE_PLANE, sPlane);
glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
glEnable(GL_TEXTURE_GEN_S);
}
static void
DisableTexgen(void)
{
glDisable(GL_TEXTURE_GEN_S);
glDisable(GL_TEXTURE_GEN_T);
glDisable(GL_TEXTURE_GEN_R);
glDisable(GL_TEXTURE_GEN_Q);
}
static void
ComputeLightPos(GLfloat dist, GLfloat latitude, GLfloat longitude,
GLfloat pos[4], GLfloat dir[3])
{
pos[0] = dist * sin(longitude * DEG_TO_RAD);
pos[1] = dist * sin(latitude * DEG_TO_RAD);
pos[2] = dist * cos(latitude * DEG_TO_RAD) * cos(longitude * DEG_TO_RAD);
pos[3] = 1;
dir[0] = -pos[0];
dir[1] = -pos[1];
dir[2] = -pos[2];
}
static void
Display(void)
{
GLfloat ar = (GLfloat) WindowWidth / (GLfloat) WindowHeight;
GLfloat d;
GLenum error;
ComputeLightPos(LightDist, LightLatitude, LightLongitude,
LightPos, SpotDir);
/*
* Step 1: render scene from point of view of the light source
*/
/* compute frustum to enclose spot light cone */
d = ShadowNear * tan(SpotAngle);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(-d, d, -d, d, ShadowNear, ShadowFar);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
gluLookAt(LightPos[0], LightPos[1], LightPos[2], /* from */
0, 0, 0, /* target */
0, 1, 0); /* up */
glViewport(0, 0, ShadowTexWidth, ShadowTexHeight);
glClear(GL_DEPTH_BUFFER_BIT);
DrawScene();
/*
* Step 2: copy depth buffer into texture map
*/
if (DisplayMode == SHOW_DEPTH_MAPPING) {
/* load depth image as gray-scale luminance texture */
GLfloat *depth = (GLfloat *) malloc(ShadowTexWidth * ShadowTexHeight
* sizeof(GLfloat));
if (depth) {
glReadPixels(0, 0, ShadowTexWidth, ShadowTexHeight,
GL_DEPTH_COMPONENT, GL_FLOAT, depth);
glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE,
ShadowTexWidth, ShadowTexHeight, 0,
GL_LUMINANCE, GL_FLOAT, depth);
free(depth);
}
}
else {
/* The normal shadow case */
glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT,
0, 0, ShadowTexWidth, ShadowTexHeight, 0);
}
/*
* Step 3: render scene from point of view of the camera
*/
glViewport(0, 0, WindowWidth, WindowHeight);
if (DisplayMode == SHOW_DEPTH_IMAGE) {
ShowDepthBuffer(WindowWidth, WindowHeight, 0, 1);
}
else {
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(-ar, ar, -1.0, 1.0, 4.0, 50.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(0.0, 0.0, -22.0);
glRotatef(Xrot, 1, 0, 0);
glRotatef(Yrot, 0, 1, 0);
glRotatef(Zrot, 0, 0, 1);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLightfv(GL_LIGHT0, GL_POSITION, LightPos);
if (LinearFilter) {
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
}
else {
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
}
if (DisplayMode == SHOW_DEPTH_MAPPING) {
#if defined(GL_ARB_shadow)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE);
#elif defined(GL_SGIX_shadow)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_SGIX, GL_FALSE);
#endif
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
glEnable(GL_TEXTURE_2D);
MakeShadowMatrix(LightPos, SpotDir, SpotAngle, ShadowNear, ShadowFar);
EnableIdentityTexgen();
}
else if (DisplayMode == SHOW_DISTANCE) {
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glMatrixMode(GL_MODELVIEW);
EnableDistanceTexgen(LightPos, SpotDir, ShadowNear+Bias, ShadowFar);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
glEnable(GL_TEXTURE_1D);
}
else {
assert(DisplayMode == SHOW_NORMAL);
#if defined(GL_ARB_shadow)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB,
GL_COMPARE_R_TO_TEXTURE_ARB);
#elif defined(GL_SGIX_shadow)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_SGIX, GL_TRUE);
#endif
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glEnable(GL_TEXTURE_2D);
MakeShadowMatrix(LightPos, SpotDir, SpotAngle, ShadowNear, ShadowFar);
EnableIdentityTexgen();
}
DrawScene();
DisableTexgen();
glDisable(GL_TEXTURE_1D);
glDisable(GL_TEXTURE_2D);
}
glutSwapBuffers();
error = glGetError();
if (error) {
printf("GL Error: %s\n", gluErrorString(error));
}
}
static void
Reshape(int width, int height)
{
WindowWidth = width;
WindowHeight = height;
if (width >= 512 && height >= 512) {
ShadowTexWidth = ShadowTexHeight = 512;
}
else if (width >= 256 && height >= 256) {
ShadowTexWidth = ShadowTexHeight = 256;
}
else {
ShadowTexWidth = ShadowTexHeight = 128;
}
printf("Using %d x %d depth texture\n", ShadowTexWidth, ShadowTexHeight);
}
static void
Idle(void)
{
Yrot += 5.0;
/*LightLongitude -= 5.0;*/
glutPostRedisplay();
}
static void
Key(unsigned char key, int x, int y)
{
const GLfloat step = 3.0;
(void) x;
(void) y;
switch (key) {
case 'a':
Anim = !Anim;
if (Anim)
glutIdleFunc(Idle);
else
glutIdleFunc(NULL);
break;
case 'b':
Bias -= 0.01;
printf("Bias %g\n", Bias);
break;
case 'B':
Bias += 0.01;
printf("Bias %g\n", Bias);
break;
case 'd':
DisplayMode = SHOW_DISTANCE;
break;
case 'f':
LinearFilter = !LinearFilter;
printf("%s filtering\n", LinearFilter ? "Bilinear" : "Nearest");
break;
case 'i':
DisplayMode = SHOW_DEPTH_IMAGE;
break;
case 'm':
DisplayMode = SHOW_DEPTH_MAPPING;
break;
case 'n':
case ' ':
DisplayMode = SHOW_NORMAL;
break;
case 'o':
if (HaveEXTshadowFuncs) {
Operator++;
if (Operator >= 8)
Operator = 0;
printf("Operator: %s\n", OperatorName[Operator]);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC_ARB,
OperatorFunc[Operator]);
}
break;
case 'z':
Zrot -= step;
break;
case 'Z':
Zrot += step;
break;
case 27:
exit(0);
break;
}
glutPostRedisplay();
}
static void
SpecialKey(int key, int x, int y)
{
const GLfloat step = 3.0;
const int mod = glutGetModifiers();
(void) x;
(void) y;
switch (key) {
case GLUT_KEY_UP:
if (mod)
LightLatitude += step;
else
Xrot += step;
break;
case GLUT_KEY_DOWN:
if (mod)
LightLatitude -= step;
else
Xrot -= step;
break;
case GLUT_KEY_LEFT:
if (mod)
LightLongitude += step;
else
Yrot += step;
break;
case GLUT_KEY_RIGHT:
if (mod)
LightLongitude -= step;
else
Yrot -= step;
break;
}
glutPostRedisplay();
}
static void
Init(void)
{
#if defined(GL_ARB_depth_texture) && defined(GL_ARB_shadow)
if (!glutExtensionSupported("GL_ARB_depth_texture") ||
!glutExtensionSupported("GL_ARB_shadow")) {
printf("Sorry, this demo requires the GL_ARB_depth_texture and GL_ARB_shadow extensions\n");
exit(1);
}
printf("Using GL_ARB_depth_texture and GL_ARB_shadow\n");
#elif defined(GL_SGIX_depth_texture) && defined(GL_SGIX_shadow)
if (!glutExtensionSupported("GL_SGIX_depth_texture") ||
!glutExtensionSupported("GL_SGIX_shadow")) {
printf("Sorry, this demo requires the GL_SGIX_depth_texture and GL_SGIX_shadow extensions\n");
exit(1);
}
printf("Using GL_SGIX_depth_texture and GL_SGIX_shadow\n");
#endif
HaveEXTshadowFuncs = glutExtensionSupported("GL_EXT_shadow_funcs");
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_T, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
#if defined(GL_ARB_shadow)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB,
GL_COMPARE_R_TO_TEXTURE_ARB);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC_ARB, GL_LEQUAL);
#elif defined(GL_SGIX_shadow)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_OPERATOR_SGIX,
GL_TEXTURE_LEQUAL_R_SGIX);
#endif
#if defined(GL_ARB_shadow_ambient)
if (glutExtensionSupported("GL_ARB_shadow_ambient")) {
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FAIL_VALUE_ARB, 0.3);
printf("and GL_ARB_shadow_ambient\n");
}
#elif defined(GL_SGIX_shadow_ambient)
if (glutExtensionSupported("GL_SGIX_shadow_ambient")) {
glTexParameterf(GL_TEXTURE_2D, GL_SHADOW_AMBIENT_SGIX, 0.3);
printf("and GL_SGIX_shadow_ambient\n");
}
#endif
/* setup 1-D grayscale texture image for SHOW_DISTANCE mode */
{
GLuint i;
GLubyte image[256];
for (i = 0; i < 256; i++)
image[i] = i;
glTexImage1D(GL_TEXTURE_1D, 0, GL_LUMINANCE,
256, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, image);
}
glEnable(GL_DEPTH_TEST);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
}
static void
PrintHelp(void)
{
printf("Keys:\n");
printf(" a = toggle animation\n");
printf(" i = show depth texture image\n");
printf(" m = show depth texture mapping\n");
printf(" d = show fragment distance from light source\n");
printf(" n = show normal, shadowed image\n");
printf(" f = toggle nearest/bilinear texture filtering\n");
printf(" b/B = decrease/increase shadow map Z bias\n");
printf(" cursor keys = rotate scene\n");
printf(" <shift> + cursor keys = rotate light source\n");
if (HaveEXTshadowFuncs)
printf(" o = cycle through comparison modes\n");
}
int
main(int argc, char *argv[])
{
glutInit(&argc, argv);
glutInitWindowPosition(0, 0);
glutInitWindowSize(WindowWidth, WindowHeight);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
glutCreateWindow(argv[0]);
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutSpecialFunc(SpecialKey);
glutDisplayFunc(Display);
if (Anim)
glutIdleFunc(Idle);
Init();
PrintHelp();
glutMainLoop();
return 0;
}

View File

@@ -1,4 +1,4 @@
/* $Id: spectex.c,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
/* $Id: spectex.c,v 1.2 2002/04/22 16:03:37 brianp Exp $ */
/*
* GLUT demonstration of texturing with specular highlights.
@@ -17,24 +17,6 @@
* Brian Paul February 1997
*/
/*
* $Log: spectex.c,v $
* Revision 1.1 1999/08/19 00:55:40 jtg
* Initial revision
*
* Revision 3.2 1999/03/28 18:22:05 brianp
* minor clean-up
*
* Revision 3.1 1998/02/14 18:47:48 brianp
* added OpenGL 1.2 separate specular interpolation support
*
* Revision 3.0 1998/02/14 18:42:29 brianp
* initial rev
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

File diff suppressed because it is too large Load Diff

View File

@@ -16,8 +16,7 @@
#endif
#include <GL/glut.h>
#include "../util/readtex.c"
#include "shadow.c"
#include "readtex.c"
#ifdef XMESA
#include "GL/xmesa.h"
@@ -27,7 +26,8 @@ static int fullscreen=1;
static int WIDTH=640;
static int HEIGHT=480;
#define FRAME 50
static GLint T0 = 0;
static GLint Frames = 0;
#define BASESIZE 10.0
@@ -65,20 +65,84 @@ static int joyactive=0;
static GLuint t1id,t2id;
static GLuint teapotdlist,basedlist,lightdlist;
static float gettime(void)
/******************** begin shadow code ********************/
/* Taken from the projshadow.c - by Tom McReynolds, SGI */
/* Modified by David Bucciarelli */
enum {
X, Y, Z, W
};
enum {
A, B, C, D
};
/* create a matrix that will project the desired shadow */
void
shadowmatrix(GLfloat shadowMat[4][4],
GLfloat groundplane[4],
GLfloat lightpos[4])
{
static clock_t told=0;
clock_t tnew,ris;
GLfloat dot;
tnew=clock();
/* find dot product between light position vector and ground plane normal */
dot = groundplane[X] * lightpos[X] +
groundplane[Y] * lightpos[Y] +
groundplane[Z] * lightpos[Z] +
groundplane[W] * lightpos[W];
ris=tnew-told;
shadowMat[0][0] = dot - lightpos[X] * groundplane[X];
shadowMat[1][0] = 0.f - lightpos[X] * groundplane[Y];
shadowMat[2][0] = 0.f - lightpos[X] * groundplane[Z];
shadowMat[3][0] = 0.f - lightpos[X] * groundplane[W];
told=tnew;
shadowMat[X][1] = 0.f - lightpos[Y] * groundplane[X];
shadowMat[1][1] = dot - lightpos[Y] * groundplane[Y];
shadowMat[2][1] = 0.f - lightpos[Y] * groundplane[Z];
shadowMat[3][1] = 0.f - lightpos[Y] * groundplane[W];
shadowMat[X][2] = 0.f - lightpos[Z] * groundplane[X];
shadowMat[1][2] = 0.f - lightpos[Z] * groundplane[Y];
shadowMat[2][2] = dot - lightpos[Z] * groundplane[Z];
shadowMat[3][2] = 0.f - lightpos[Z] * groundplane[W];
shadowMat[X][3] = 0.f - lightpos[W] * groundplane[X];
shadowMat[1][3] = 0.f - lightpos[W] * groundplane[Y];
shadowMat[2][3] = 0.f - lightpos[W] * groundplane[Z];
shadowMat[3][3] = dot - lightpos[W] * groundplane[W];
return(ris/(float)CLOCKS_PER_SEC);
}
/* find the plane equation given 3 points */
void
findplane(GLfloat plane[4],
GLfloat v0[3], GLfloat v1[3], GLfloat v2[3])
{
GLfloat vec0[3], vec1[3];
/* need 2 vectors to find cross product */
vec0[X] = v1[X] - v0[X];
vec0[Y] = v1[Y] - v0[Y];
vec0[Z] = v1[Z] - v0[Z];
vec1[X] = v2[X] - v0[X];
vec1[Y] = v2[Y] - v0[Y];
vec1[Z] = v2[Z] - v0[Z];
/* find cross product to get A, B, and C of plane equation */
plane[A] = vec0[Y] * vec1[Z] - vec0[Z] * vec1[Y];
plane[B] = -(vec0[X] * vec1[Z] - vec0[Z] * vec1[X]);
plane[C] = vec0[X] * vec1[Y] - vec0[Y] * vec1[X];
plane[D] = -(plane[A] * v0[X] + plane[B] * v0[Y] + plane[C] * v0[Z]);
}
/******************** end shadow code ********************/
static void calcposobs(void)
{
dir[0]=sin(alpha*M_PI/180.0);
@@ -208,11 +272,15 @@ static void printhelp(void)
static void drawbase(void)
{
static const GLfloat amb[4] = { 1, .5, 0.2, 1 };
static const GLfloat diff[4] = { 1, .4, 0.2, 1 };
int i,j;
float x,y,dx,dy;
glBindTexture(GL_TEXTURE_2D,t1id);
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, amb);
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, diff);
dx=BASESIZE/BASERES;
dy=-BASESIZE/BASERES;
for(y=BASESIZE/2.0,j=0;j<BASERES;y+=dy,j++) {
@@ -232,9 +300,14 @@ static void drawbase(void)
static void drawteapot(void)
{
static const GLfloat amb[4] = { 0.2, 0.2, 0.2, 1 };
static const GLfloat diff[4] = { 0.8, 0.3, 0.5, 1 };
static float xrot=0.0;
static float zrot=0.0;
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, amb);
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, diff);
glPushMatrix();
glRotatef(lightalpha,0.0,0.0,1.0);
glMultMatrixf((GLfloat *)baseshadow);
@@ -339,9 +412,7 @@ static void dojoy(void)
static void draw(void)
{
static int count=0;
static char frbuf[80];
float fr;
static char frbuf[80] = "";
dojoy();
@@ -375,11 +446,6 @@ static void draw(void)
drawlight2();
glPopMatrix();
if((count % FRAME)==0) {
fr=gettime();
sprintf(frbuf,"Frame rate: %f",FRAME/fr);
}
glDisable(GL_LIGHTING);
glDisable(GL_TEXTURE_2D);
glDisable(GL_DEPTH_TEST);
@@ -405,7 +471,18 @@ static void draw(void)
glutSwapBuffers();
count++;
Frames++;
{
GLint t = glutGet(GLUT_ELAPSED_TIME);
if (t - T0 >= 2000) {
GLfloat seconds = (t - T0) / 1000.0;
GLfloat fps = Frames / seconds;
sprintf(frbuf, "Frame rate: %f", fps);
T0 = t;
Frames = 0;
}
}
}
static void inittextures(void)
@@ -430,11 +507,26 @@ static void inittextures(void)
glGenTextures(1,&t2id);
glBindTexture(GL_TEXTURE_2D,t2id);
glPixelTransferf(GL_RED_SCALE, 0.75);
glPixelTransferf(GL_RED_BIAS, 0.25);
glPixelTransferf(GL_GREEN_SCALE, 0.75);
glPixelTransferf(GL_GREEN_BIAS, 0.25);
glPixelTransferf(GL_BLUE_SCALE, 0.75);
glPixelTransferf(GL_BLUE_BIAS, 0.25);
if (!LoadRGBMipmaps("../images/bw.rgb", GL_RGB)) {
fprintf(stderr,"Error reading a texture.\n");
exit(-1);
}
glPixelTransferf(GL_RED_SCALE, 1.0);
glPixelTransferf(GL_RED_BIAS, 0.0);
glPixelTransferf(GL_GREEN_SCALE, 1.0);
glPixelTransferf(GL_GREEN_BIAS, 0.0);
glPixelTransferf(GL_BLUE_SCALE, 1.0);
glPixelTransferf(GL_BLUE_BIAS, 0.0);
glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_REPEAT);
glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_REPEAT);
@@ -446,17 +538,26 @@ static void inittextures(void)
static void initlight(void)
{
float lamb[4]={0.2,0.2,0.2,1.0};
float lspec[4]={1.0,1.0,1.0,1.0};
float matamb[4] ={0.5, 0.5, 0.5, 1.0};
float matdiff[4]={0.9, 0.2, 0.2, 1.0};
float matspec[4]={1.0,1.0,1.0,1.0};
float lamb[4] ={1.5, 1.5, 1.5, 1.0};
float ldiff[4]={1.0, 1.0, 1.0, 1.0};
float lspec[4]={1.0, 1.0, 1.0, 1.0};
glLightf(GL_LIGHT0,GL_SPOT_CUTOFF,70.0);
glLightf(GL_LIGHT0,GL_SPOT_EXPONENT,20.0);
glLightfv(GL_LIGHT0,GL_AMBIENT,lamb);
glLightfv(GL_LIGHT0,GL_DIFFUSE,ldiff);
glLightfv(GL_LIGHT0,GL_SPECULAR,lspec);
glMaterialf(GL_FRONT_AND_BACK,GL_SHININESS,20.0);
glMaterialfv(GL_FRONT_AND_BACK,GL_SPECULAR,lspec);
glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 15.0);
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, matdiff);
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, matspec);
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, matamb);
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lamb);
glEnable(GL_LIGHT0);
}

View File

@@ -11,6 +11,7 @@
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#ifdef WIN32
@@ -38,9 +39,10 @@ static int fullscreen = 1;
#define WIDTH 640
#define HEIGHT 480
#define TSCALE 4
static GLint T0 = 0;
static GLint Frames = 0;
#define FRAME 50
#define TSCALE 4
#define FOV 85
@@ -71,21 +73,6 @@ static float v = 15.0;
static float alpha = 75.0;
static float beta = 90.0;
static float
gettime(void)
{
static clock_t told = 0;
clock_t tnew, ris;
tnew = clock();
ris = tnew - told;
told = tnew;
return (ris / (float) CLOCKS_PER_SEC);
}
static void
calcposobs(void)
{
@@ -95,6 +82,13 @@ calcposobs(void)
dir[2] = cos(alpha * M_PI / 180.0) * sin(beta * M_PI / 180.0);
dir[1] = cos(beta * M_PI / 180.0);
if (dir[0] < 1.0e-5 && dir[0] > -1.0e-5)
dir[0] = 0;
if (dir[1] < 1.0e-5 && dir[1] > -1.0e-5)
dir[1] = 0;
if (dir[2] < 1.0e-5 && dir[2] > -1.0e-5)
dir[2] = 0;
alpha1 = alpha + FOV / 2.0;
v1[0] = sin(alpha1 * M_PI / 180.0);
v1[1] = cos(alpha1 * M_PI / 180.0);
@@ -360,9 +354,7 @@ dojoy(void)
static void
drawscene(void)
{
static int count = 0;
static char frbuf[80];
float fr;
static char frbuf[80] = "";
dojoy();
@@ -391,11 +383,6 @@ drawscene(void)
drawterrain();
glPopMatrix();
if ((count % FRAME) == 0) {
fr = gettime();
sprintf(frbuf, "Frame rate: %.3f", FRAME / fr);
}
glDisable(GL_TEXTURE_2D);
glDisable(GL_DEPTH_TEST);
glDisable(GL_FOG);
@@ -424,7 +411,17 @@ drawscene(void)
glutSwapBuffers();
count++;
Frames++;
{
GLint t = glutGet(GLUT_ELAPSED_TIME);
if (t - T0 >= 2000) {
GLfloat seconds = (t - T0) / 1000.0;
GLfloat fps = Frames / seconds;
sprintf(frbuf, "Frame rate: %f", fps);
T0 = t;
Frames = 0;
}
}
}
static void
@@ -558,7 +555,7 @@ loadpic(void)
GLenum gluerr;
if ((FilePic = fopen("terrain.dat", "r")) == NULL) {
fprintf(stderr, "Error loading Mnt.bin\n");
fprintf(stderr, "Error loading terrain.dat\n");
exit(-1);
}
fread(bufferter, 256 * 256, 1, FilePic);
@@ -575,7 +572,7 @@ loadpic(void)
if ((gluerr = gluBuild2DMipmaps(GL_TEXTURE_2D, 1, 256, 256, GL_LUMINANCE,
GL_UNSIGNED_BYTE,
(GLvoid *) (&terrainpic[0])))) {
fprintf(stderr, "GLULib%s\n", gluErrorString(gluerr));
fprintf(stderr, "GLULib%s\n", (char *) gluErrorString(gluerr));
exit(-1);
}

1
progs/demos/terrain.dat Normal file

File diff suppressed because one or more lines are too long

View File

@@ -1,331 +1,413 @@
/* $Id: tessdemo.c,v 1.8 2000/07/11 14:11:58 brianp Exp $ */
/* $Id: tessdemo.c,v 1.13 2002/10/18 17:47:36 kschultz Exp $ */
/*
* A demo of the GLU polygon tesselation functions written by Bogdan Sikorski.
* Updated for GLU 1.3 tessellation by Gareth Hughes <gareth@valinux.com>
*/
#include <GL/glut.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_POINTS 200
#define MAX_CONTOURS 50
#define MAX_POINTS 256
#define MAX_CONTOURS 32
#define MAX_TRIANGLES 256
static int menu;
typedef enum
{ QUIT, TESSELATE, CLEAR }
menu_entries;
#ifndef GLCALLBACK
#ifdef CALLBACK
#define GLCALLBACK CALLBACK
#else
#define GLCALLBACK
#endif
#endif
typedef enum
{ DEFINE, TESSELATED }
mode_type;
#ifdef GLU_VERSION_1_2
struct
typedef enum{ QUIT, TESSELATE, CLEAR } menu_entries;
typedef enum{ DEFINE, TESSELATED } mode_type;
static GLsizei width, height;
static GLuint contour_cnt;
static GLuint triangle_cnt;
static mode_type mode;
static int menu;
static GLuint list_start;
static GLfloat edge_color[3];
static struct {
GLfloat p[MAX_POINTS][2];
GLuint point_cnt;
} contours[MAX_CONTOURS];
static struct {
GLsizei no;
GLfloat p[3][2];
GLclampf color[3][3];
} triangles[MAX_TRIANGLES];
static void GLCALLBACK error_callback( GLenum err )
{
GLint p[MAX_POINTS][2];
GLuint point_cnt;
}
contours[MAX_CONTOURS];
int len, i;
char const *str;
static GLuint contour_cnt;
static GLsizei width, height;
static mode_type mode;
glColor3f( 0.9, 0.9, 0.9 );
glRasterPos2i( 5, 5 );
struct
{
GLsizei no;
GLfloat color[3];
GLint p[3][2];
GLclampf p_color[3][3];
}
triangle;
str = (const char *) gluErrorString( err );
len = strlen( str );
static void GLCALLBACK
my_error(GLenum err)
{
int len, i;
char const *str;
glColor3f(0.9, 0.9, 0.9);
glRasterPos2i(5, 5);
str = (const char *) gluErrorString(err);
len = strlen(str);
for (i = 0; i < len; i++)
glutBitmapCharacter(GLUT_BITMAP_9_BY_15, str[i]);
}
static void GLCALLBACK
begin_callback(GLenum mode)
{
triangle.no = 0;
}
static void GLCALLBACK
edge_callback(GLenum flag)
{
if (flag == GL_TRUE) {
triangle.color[0] = 1.0;
triangle.color[1] = 1.0;
triangle.color[2] = 0.5;
}
else {
triangle.color[0] = 1.0;
triangle.color[1] = 0.0;
triangle.color[2] = 0.0;
for ( i = 0 ; i < len ; i++ ) {
glutBitmapCharacter( GLUT_BITMAP_9_BY_15, str[i] );
}
}
static void GLCALLBACK
end_callback()
static void GLCALLBACK begin_callback( GLenum mode )
{
glBegin(GL_LINES);
glColor3f(triangle.p_color[0][0], triangle.p_color[0][1],
triangle.p_color[0][2]);
glVertex2i(triangle.p[0][0], triangle.p[0][1]);
glVertex2i(triangle.p[1][0], triangle.p[1][1]);
glColor3f(triangle.p_color[1][0], triangle.p_color[1][1],
triangle.p_color[1][2]);
glVertex2i(triangle.p[1][0], triangle.p[1][1]);
glVertex2i(triangle.p[2][0], triangle.p[2][1]);
glColor3f(triangle.p_color[2][0], triangle.p_color[2][1],
triangle.p_color[2][2]);
glVertex2i(triangle.p[2][0], triangle.p[2][1]);
glVertex2i(triangle.p[0][0], triangle.p[0][1]);
/* Allow multiple triangles to be output inside the begin/end pair. */
triangle_cnt = 0;
triangles[triangle_cnt].no = 0;
}
static void GLCALLBACK edge_callback( GLenum flag )
{
/* Persist the edge flag across triangles. */
if ( flag == GL_TRUE ) {
edge_color[0] = 1.0;
edge_color[1] = 1.0;
edge_color[2] = 0.5;
} else {
edge_color[0] = 1.0;
edge_color[1] = 0.0;
edge_color[2] = 0.0;
}
}
static void GLCALLBACK end_callback()
{
GLuint i;
glBegin( GL_LINES );
/* Output the three edges of each triangle as lines colored
according to their edge flag. */
for ( i = 0 ; i < triangle_cnt ; i++ ) {
glColor3f( triangles[i].color[0][0],
triangles[i].color[0][1],
triangles[i].color[0][2] );
glVertex2f( triangles[i].p[0][0], triangles[i].p[0][1] );
glVertex2f( triangles[i].p[1][0], triangles[i].p[1][1] );
glColor3f( triangles[i].color[1][0],
triangles[i].color[1][1],
triangles[i].color[1][2] );
glVertex2f( triangles[i].p[1][0], triangles[i].p[1][1] );
glVertex2f( triangles[i].p[2][0], triangles[i].p[2][1] );
glColor3f( triangles[i].color[2][0],
triangles[i].color[2][1],
triangles[i].color[2][2] );
glVertex2f( triangles[i].p[2][0], triangles[i].p[2][1] );
glVertex2f( triangles[i].p[0][0], triangles[i].p[0][1] );
}
glEnd();
}
static void GLCALLBACK
vertex_callback(void *data)
static void GLCALLBACK vertex_callback( void *data )
{
GLsizei no;
GLint *p;
GLsizei no;
GLfloat *p;
p = (GLint *) data;
no = triangle.no;
triangle.p[no][0] = p[0];
triangle.p[no][1] = p[1];
triangle.p_color[no][0] = triangle.color[0];
triangle.p_color[no][1] = triangle.color[1];
triangle.p_color[no][2] = triangle.color[2];
++(triangle.no);
p = (GLfloat *) data;
no = triangles[triangle_cnt].no;
triangles[triangle_cnt].p[no][0] = p[0];
triangles[triangle_cnt].p[no][1] = p[1];
triangles[triangle_cnt].color[no][0] = edge_color[0];
triangles[triangle_cnt].color[no][1] = edge_color[1];
triangles[triangle_cnt].color[no][2] = edge_color[2];
/* After every three vertices, initialize the next triangle. */
if ( ++(triangles[triangle_cnt].no) == 3 ) {
triangle_cnt++;
triangles[triangle_cnt].no = 0;
}
}
static void GLCALLBACK combine_callback( GLdouble coords[3],
GLdouble *vertex_data[4],
GLfloat weight[4], void **data )
{
GLfloat *vertex;
vertex = (GLfloat *) malloc( 2 * sizeof(GLfloat) );
vertex[0] = (GLfloat) coords[0];
vertex[1] = (GLfloat) coords[1];
*data = vertex;
}
static void
set_screen_wh(GLsizei w, GLsizei h)
static void set_screen_wh( GLsizei w, GLsizei h )
{
width = w;
height = h;
}
typedef void (GLAPIENTRY *callback_t)();
static void
tesse(void)
static void tesse( void )
{
GLUtriangulatorObj *tobj;
GLdouble data[3];
GLuint i, j, point_cnt;
GLUtesselator *tobj;
GLdouble data[3];
GLuint i, j, point_cnt;
list_start = glGenLists( 2 );
tobj = gluNewTess();
if (tobj != NULL) {
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(0.7, 0.7, 0.0);
gluTessCallback(tobj, GLU_BEGIN, glBegin);
gluTessCallback(tobj, GLU_END, glEnd);
gluTessCallback(tobj, GLU_ERROR, my_error);
gluTessCallback(tobj, GLU_VERTEX, glVertex2iv);
gluBeginPolygon(tobj);
for (j = 0; j <= contour_cnt; j++) {
if ( tobj != NULL ) {
gluTessNormal( tobj, 0.0, 0.0, 1.0 );
gluTessCallback( tobj, GLU_TESS_BEGIN, (callback_t) glBegin );
gluTessCallback( tobj, GLU_TESS_VERTEX, (callback_t) glVertex2fv );
gluTessCallback( tobj, GLU_TESS_END, (callback_t) glEnd );
gluTessCallback( tobj, GLU_TESS_ERROR, (callback_t) error_callback );
gluTessCallback( tobj, GLU_TESS_COMBINE, (callback_t) combine_callback );
glNewList( list_start, GL_COMPILE );
gluBeginPolygon( tobj );
for ( j = 0 ; j <= contour_cnt ; j++ ) {
point_cnt = contours[j].point_cnt;
gluNextContour(tobj, GLU_UNKNOWN);
for (i = 0; i < point_cnt; i++) {
data[0] = (GLdouble) (contours[j].p[i][0]);
data[1] = (GLdouble) (contours[j].p[i][1]);
gluNextContour( tobj, GLU_UNKNOWN );
for ( i = 0 ; i < point_cnt ; i++ ) {
data[0] = (GLdouble)( contours[j].p[i][0] );
data[1] = (GLdouble)( contours[j].p[i][1] );
data[2] = 0.0;
gluTessVertex(tobj, data, contours[j].p[i]);
gluTessVertex( tobj, data, contours[j].p[i] );
}
}
gluEndPolygon(tobj);
glLineWidth(2.0);
gluTessCallback(tobj, GLU_BEGIN, begin_callback);
gluTessCallback(tobj, GLU_END, end_callback);
gluTessCallback(tobj, GLU_VERTEX, vertex_callback);
gluTessCallback(tobj, GLU_EDGE_FLAG, edge_callback);
gluBeginPolygon(tobj);
for (j = 0; j <= contour_cnt; j++) {
gluEndPolygon( tobj );
glEndList();
gluTessCallback( tobj, GLU_TESS_BEGIN, (callback_t) begin_callback );
gluTessCallback( tobj, GLU_TESS_VERTEX, (callback_t) vertex_callback );
gluTessCallback( tobj, GLU_TESS_END, (callback_t) end_callback );
gluTessCallback( tobj, GLU_TESS_EDGE_FLAG, (callback_t) edge_callback );
glNewList( list_start + 1, GL_COMPILE );
gluBeginPolygon( tobj );
for ( j = 0 ; j <= contour_cnt ; j++ ) {
point_cnt = contours[j].point_cnt;
gluNextContour(tobj, GLU_UNKNOWN);
for (i = 0; i < point_cnt; i++) {
data[0] = (GLdouble) (contours[j].p[i][0]);
data[1] = (GLdouble) (contours[j].p[i][1]);
gluNextContour( tobj, GLU_UNKNOWN );
for ( i = 0 ; i < point_cnt ; i++ ) {
data[0] = (GLdouble)( contours[j].p[i][0] );
data[1] = (GLdouble)( contours[j].p[i][1] );
data[2] = 0.0;
gluTessVertex(tobj, data, contours[j].p[i]);
gluTessVertex( tobj, data, contours[j].p[i] );
}
}
gluEndPolygon(tobj);
gluDeleteTess(tobj);
glutMouseFunc(NULL);
glColor3f(1.0, 1.0, 0.0);
glLineWidth(1.0);
gluEndPolygon( tobj );
glEndList();
gluDeleteTess( tobj );
glutMouseFunc( NULL );
mode = TESSELATED;
}
}
static void
left_down(int x1, int y1)
static void left_down( int x1, int y1 )
{
GLint P[2];
GLuint point_cnt;
GLfloat P[2];
GLuint point_cnt;
/* translate GLUT into GL coordinates */
P[0] = x1;
P[1] = height - y1;
point_cnt = contours[contour_cnt].point_cnt;
contours[contour_cnt].p[point_cnt][0] = P[0];
contours[contour_cnt].p[point_cnt][1] = P[1];
glBegin(GL_LINES);
if (point_cnt) {
glVertex2iv(contours[contour_cnt].p[point_cnt - 1]);
glVertex2iv(P);
}
else {
glVertex2iv(P);
glVertex2iv(P);
glBegin( GL_LINES );
if ( point_cnt ) {
glVertex2fv( contours[contour_cnt].p[point_cnt-1] );
glVertex2fv( P );
} else {
glVertex2fv( P );
glVertex2fv( P );
}
glEnd();
glFinish();
++(contours[contour_cnt].point_cnt);
contours[contour_cnt].point_cnt++;
}
static void
middle_down(int x1, int y1)
static void middle_down( int x1, int y1 )
{
GLuint point_cnt;
GLuint point_cnt;
(void) x1;
(void) y1;
point_cnt = contours[contour_cnt].point_cnt;
if (point_cnt > 2) {
glBegin(GL_LINES);
glVertex2iv(contours[contour_cnt].p[0]);
glVertex2iv(contours[contour_cnt].p[point_cnt - 1]);
if ( point_cnt > 2 ) {
glBegin( GL_LINES );
glVertex2fv( contours[contour_cnt].p[0] );
glVertex2fv( contours[contour_cnt].p[point_cnt-1] );
contours[contour_cnt].p[point_cnt][0] = -1;
glEnd();
glFinish();
contour_cnt++;
contours[contour_cnt].point_cnt = 0;
}
}
static void
mouse_clicked(int button, int state, int x, int y)
static void mouse_clicked( int button, int state, int x, int y )
{
x -= x % 10;
y -= y % 10;
switch (button) {
x -= x%10;
y -= y%10;
switch ( button ) {
case GLUT_LEFT_BUTTON:
if (state == GLUT_DOWN)
left_down(x, y);
if ( state == GLUT_DOWN ) {
left_down( x, y );
}
break;
case GLUT_MIDDLE_BUTTON:
if (state == GLUT_DOWN)
middle_down(x, y);
if ( state == GLUT_DOWN ) {
middle_down( x, y );
}
break;
}
}
static void
display(void)
static void display( void )
{
GLuint i, j;
GLuint i,j;
GLsizei ii, jj;
GLuint point_cnt;
glClear(GL_COLOR_BUFFER_BIT);
switch (mode) {
glClear( GL_COLOR_BUFFER_BIT );
switch ( mode ) {
case DEFINE:
/* draw grid */
glColor3f(0.6, 0.5, 0.5);
glBegin(GL_LINES);
for (i = 0; i < width; i += 10)
for (j = 0; j < height; j += 10) {
glVertex2i(0, j);
glVertex2i(width, j);
glVertex2i(i, height);
glVertex2i(i, 0);
glColor3f( 0.6, 0.5, 0.5 );
glBegin( GL_LINES );
for ( ii = 0 ; ii < width ; ii += 10 ) {
for ( jj = 0 ; jj < height ; jj += 10 ) {
glVertex2i( 0, jj );
glVertex2i( width, jj );
glVertex2i( ii, height );
glVertex2i( ii, 0 );
}
}
glEnd();
glColor3f(1.0, 1.0, 0.0);
for (i = 0; i <= contour_cnt; i++) {
glColor3f( 1.0, 1.0, 0.0 );
for ( i = 0 ; i <= contour_cnt ; i++ ) {
point_cnt = contours[i].point_cnt;
glBegin(GL_LINES);
switch (point_cnt) {
glBegin( GL_LINES );
switch ( point_cnt ) {
case 0:
break;
case 1:
glVertex2iv(contours[i].p[0]);
glVertex2iv(contours[i].p[0]);
glVertex2fv( contours[i].p[0] );
glVertex2fv( contours[i].p[0] );
break;
case 2:
glVertex2iv(contours[i].p[0]);
glVertex2iv(contours[i].p[1]);
glVertex2fv( contours[i].p[0] );
glVertex2fv( contours[i].p[1] );
break;
default:
--point_cnt;
for (j = 0; j < point_cnt; j++) {
glVertex2iv(contours[i].p[j]);
glVertex2iv(contours[i].p[j + 1]);
for ( j = 0 ; j < point_cnt ; j++ ) {
glVertex2fv( contours[i].p[j] );
glVertex2fv( contours[i].p[j+1] );
}
if (contours[i].p[j + 1][0] == -1) {
glVertex2iv(contours[i].p[0]);
glVertex2iv(contours[i].p[j]);
if ( contours[i].p[j+1][0] == -1 ) {
glVertex2fv( contours[i].p[0] );
glVertex2fv( contours[i].p[j] );
}
break;
}
glEnd();
}
glFinish();
break;
case TESSELATED:
/* draw lines */
tesse();
/* draw triangles */
glColor3f( 0.7, 0.7, 0.0 );
glCallList( list_start );
glLineWidth( 2.0 );
glCallList( list_start + 1 );
glLineWidth( 1.0 );
glFlush();
break;
}
glColor3f(1.0, 1.0, 0.0);
glColor3f( 1.0, 1.0, 0.0 );
}
static void
clear(void)
static void clear( void )
{
contour_cnt = 0;
contours[0].point_cnt = 0;
glutMouseFunc(mouse_clicked);
triangle_cnt = 0;
glutMouseFunc( mouse_clicked );
mode = DEFINE;
display();
glDeleteLists( list_start, 2 );
list_start = 0;
}
static void
quit(void)
static void quit( void )
{
exit(0);
exit( 0 );
}
static void
menu_selected(int entry)
static void menu_selected( int entry )
{
switch (entry) {
switch ( entry ) {
case CLEAR:
clear();
break;
@@ -336,87 +418,107 @@ menu_selected(int entry)
quit();
break;
}
glutPostRedisplay();
}
static void
key_pressed(unsigned char key, int x, int y)
static void key_pressed( unsigned char key, int x, int y )
{
switch (key) {
case 't':
case 'T':
tesse();
glFinish();
break;
case 'q':
case 'Q':
quit();
break;
(void) x;
(void) y;
switch ( key ) {
case 'c':
case 'C':
clear();
break;
case 't':
case 'T':
tesse();
break;
case 27:
case 'q':
case 'Q':
quit();
break;
}
glutPostRedisplay();
}
static void
myinit(void)
static void myinit( void )
{
/* clear background to gray */
glClearColor(0.4, 0.4, 0.4, 0.0);
glShadeModel(GL_FLAT);
/* clear background to gray */
glClearColor( 0.4, 0.4, 0.4, 0.0 );
glShadeModel( GL_FLAT );
glPolygonMode( GL_FRONT, GL_FILL );
menu = glutCreateMenu( menu_selected );
glutAddMenuEntry( "clear", CLEAR );
glutAddMenuEntry( "tesselate", TESSELATE );
glutAddMenuEntry( "quit", QUIT );
glutAttachMenu( GLUT_RIGHT_BUTTON );
glutMouseFunc( mouse_clicked );
glutKeyboardFunc( key_pressed );
menu = glutCreateMenu(menu_selected);
glutAddMenuEntry("clear", CLEAR);
glutAddMenuEntry("tesselate", TESSELATE);
glutAddMenuEntry("quit", QUIT);
glutAttachMenu(GLUT_RIGHT_BUTTON);
glutMouseFunc(mouse_clicked);
glutKeyboardFunc(key_pressed);
contour_cnt = 0;
glPolygonMode(GL_FRONT, GL_FILL);
mode = DEFINE;
}
static void
reshape(GLsizei w, GLsizei h)
static void reshape( GLsizei w, GLsizei h )
{
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);
glViewport( 0, 0, w, h );
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glOrtho(0.0, (GLdouble) w, 0.0, (GLdouble) h, -1.0, 1.0);
glMatrixMode(GL_MODELVIEW);
glOrtho( 0.0, (GLdouble)w, 0.0, (GLdouble)h, -1.0, 1.0 );
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
set_screen_wh(w, h);
set_screen_wh( w, h );
}
#endif
static void usage( void )
{
printf( "Use left mouse button to place vertices.\n" );
printf( "Press middle mouse button when done.\n" );
printf( "Select tesselate from the pop-up menu.\n" );
}
static void
usage(void)
int main( int argc, char **argv )
{
printf("Use left mouse button to place vertices.\n");
printf("Press middle mouse button when done.\n");
printf("Select tesselate from the pop-up menu.\n");
}
const char *version = (const char *) gluGetString( GLU_VERSION );
printf( "GLU version string: %s\n", version );
if ( strstr( version, "1.0" ) || strstr( version, "1.1" ) ) {
fprintf( stderr, "Sorry, this demo reqiures GLU 1.2 or later.\n" );
exit( 1 );
}
/* Main Loop
* Open window with initial window size, title bar,
* RGBA display mode, and handle input events.
*/
int
main(int argc, char **argv)
{
usage();
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize(400, 400);
glutCreateWindow(argv[0]);
glutInit( &argc, argv );
glutInitDisplayMode( GLUT_SINGLE | GLUT_RGB );
glutInitWindowSize( 400, 400 );
glutCreateWindow( argv[0] );
/* GH: Bit of a hack...
*/
#ifdef GLU_VERSION_1_2
myinit();
glutDisplayFunc(display);
glutReshapeFunc(reshape);
glutDisplayFunc( display );
glutReshapeFunc( reshape );
glutMainLoop();
#endif
return 0;
}

View File

@@ -1,4 +1,4 @@
/* $Id: texcyl.c,v 1.2 1999/10/21 16:39:06 brianp Exp $ */
/* $Id: texcyl.c,v 1.6 2002/04/22 16:03:37 brianp Exp $ */
/*
* Textured cylinder demo: lighting, texturing, reflection mapping.
@@ -10,35 +10,12 @@
* Brian Paul May 1997 This program is in the public domain.
*/
/*
* $Log: texcyl.c,v $
* Revision 1.2 1999/10/21 16:39:06 brianp
* added -info command line option
*
* Revision 1.1.1.1 1999/08/19 00:55:40 jtg
* Imported sources
*
* Revision 3.3 1999/03/28 18:24:37 brianp
* minor clean-up
*
* Revision 3.2 1998/11/05 04:34:04 brianp
* moved image files to ../images/ directory
*
* Revision 3.1 1998/06/23 03:16:51 brianp
* added Point/Linear sampling menu items
*
* Revision 3.0 1998/02/14 18:42:29 brianp
* initial rev
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <GL/glut.h>
#include "../util/readtex.c" /* I know, this is a hack. */
#include "readtex.c" /* I know, this is a hack. */
#define TEXTURE_FILE "../images/reflect.rgb"
@@ -56,6 +33,10 @@ static GLboolean Animate = GL_TRUE;
static GLfloat Xrot = 0.0, Yrot = 0.0, Zrot = 0.0;
static GLfloat DXrot = 1.0, DYrot = 2.5;
/* performance info */
static GLint T0 = 0;
static GLint Frames = 0;
static void Idle( void )
{
@@ -81,6 +62,18 @@ static void Display( void )
glPopMatrix();
glutSwapBuffers();
if (Animate) {
GLint t = glutGet(GLUT_ELAPSED_TIME);
Frames++;
if (t - T0 >= 5000) {
GLfloat seconds = (t - T0) / 1000.0;
GLfloat fps = Frames / seconds;
printf("%d frames in %g seconds = %g FPS\n", Frames, seconds, fps);
T0 = t;
Frames = 0;
}
}
}
@@ -248,6 +241,7 @@ int main( int argc, char *argv[] )
{
glutInit( &argc, argv );
glutInitWindowSize( 400, 400 );
glutInitWindowPosition( 0, 0 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );

View File

@@ -1,18 +1,18 @@
/* $Id: texdown.c,v 1.3 2000/03/29 18:02:52 brianp Exp $ */
/* $Id: texdown.c,v 1.4 2001/02/07 03:04:58 gareth Exp $ */
/*
* Copyright (C) 1999 Brian Paul All Rights Reserved.
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -148,6 +148,10 @@ MeasureDownloadRate(void)
glPixelTransferf(GL_BLUE_BIAS, 0.0);
}
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glEnable(GL_TEXTURE_2D);
count = 0;
t0 = glutGet(GLUT_ELAPSED_TIME) * 0.001;
do {
@@ -163,24 +167,20 @@ MeasureDownloadRate(void)
FormatTable[Format].Type, texImage);
}
if (count == 0) {
/* draw a tiny polygon to force texture into texram */
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glEnable(GL_TEXTURE_2D);
glBegin(GL_TRIANGLES);
glTexCoord2f(0, 0); glVertex2f(1, 1);
glTexCoord2f(1, 0); glVertex2f(3, 1);
glTexCoord2f(0.5, 1); glVertex2f(2, 3);
glEnd();
glDisable(GL_TEXTURE_2D);
}
/* draw a tiny polygon to force texture into texram */
glBegin(GL_TRIANGLES);
glTexCoord2f(0, 0); glVertex2f(1, 1);
glTexCoord2f(1, 0); glVertex2f(3, 1);
glTexCoord2f(0.5, 1); glVertex2f(2, 3);
glEnd();
t1 = glutGet(GLUT_ELAPSED_TIME) * 0.001;
time = t1 - t0;
count++;
} while (time < 3.0);
glDisable(GL_TEXTURE_2D);
printf("w*h=%d count=%d time=%f\n", w*h, count, time);
DownloadRate = w * h * count / time;

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