Compare commits

...

769 Commits

Author SHA1 Message Date
Brian Paul
ebef61f5c0 html fix 2005-05-04 20:05:21 +00:00
Brian Paul
fe6ee3f5e6 EGLScreenMESA updates 2005-05-04 20:00:15 +00:00
Brian Paul
f5581bb994 don't call XTranslateCoordinates() if rendering to pixmap 2005-05-04 14:50:45 +00:00
Keith Whitwell
47b29f511a Add a facility to route all rasterization through a fragment program
which is automatically generated to match the current texture environment
state.  Introduces a new value ctx->FragmentProgram._Active which is
true when either _Enabled is true or there is such a fragment program
ready to run.

To test out on a driver running the software rasterizer, set
MESA_TEX_PROG=t in the environment.  It goes without saying that performance
is lower for the software rasterizer in this mode.
2005-05-04 11:44:44 +00:00
Keith Whitwell
c3f764f7bb Sort instructions for clarity. 2005-05-04 11:21:46 +00:00
Keith Whitwell
3151b27b0a Include negate information in disassembly output. 2005-05-04 11:21:25 +00:00
Keith Whitwell
209b090241 Mark unused registers as undefined so dissassemblers can recognized
them easily.
2005-05-04 11:20:59 +00:00
Keith Whitwell
d8f9599403 Improve the quality of the disassembly output for fragment programs. 2005-05-04 11:20:20 +00:00
Jouk Jansen
c6e1569b7f Committing in .
OpenVMS compile update

 Modified Files:
 	Mesa/src/mesa/shader/slang/descrip.mms
 ----------------------------------------------------------------------
2005-05-04 06:33:58 +00:00
Jon Smirl
82761cb08b DRI fbdev driver getting better. Now I can see something on the screen
but it isn't the right something yet.
2005-05-04 06:12:22 +00:00
Brian Paul
c22990c29a sync with latest EGL_MESA_screen_surface spec (EGLScreenMESA handles) 2005-05-04 03:33:21 +00:00
Brian Paul
3aeae20685 updates for latest EGLScreenMESA changes 2005-05-04 03:32:39 +00:00
Keith Whitwell
884b5ade86 Import all texture coordinate arrays. Import them only once. 2005-05-03 15:11:23 +00:00
Aapo Tahkola
138b7ef4d9 Add support to external tnl switcher and disable hw tnl by default. 2005-05-01 23:36:43 +00:00
Felix Kuehling
3a934557bf Bumped the Savage driver date (a bit late) to mark S3TC support. 2005-05-01 14:37:23 +00:00
Felix Kuehling
5f0bf77255 Fixed and cleaned up programming of watermark registers. There may be
a marginal speedup, but I'm not sure this has the same effect on all
hardware. Tested on Savage IX and ProSavageDDR. For experimenting with
different values see the macros at the start of savagestate.c.
2005-05-01 14:29:16 +00:00
Jon Smirl
8af7ff1ded Improve the DRI fb driver, now it compiles.
Added code to support NEW_INTERFACE.
It still doesn't work. Made it build from make linux-solo.
2005-05-01 00:21:27 +00:00
Brian Paul
1c54579e86 apply previous GL_COMPRESSED_TEXTURE_FORMATS_ARB fix to generator file, and regenerate get.c 2005-04-30 18:30:16 +00:00
Aapo Tahkola
7d33053e47 r300 side support for fixed function pipeline. This isnt functional with current Mesa. 2005-04-30 11:06:14 +00:00
Felix Kuehling
47d18cbb64 Fixed bogus ENUM_TO_BOOLEAN in
_mesa_GetIntegerv(GL_COMPRESSED_TEXTURE_FORMATS_ARB). Must be ENUM_TO_INT.
mesa/progs/tests/texenv now lists supported compressed texture formats
correctly.
2005-04-30 02:09:23 +00:00
Felix Kuehling
f1d053b19a Added S3TC support to the Savage driver with some help from Mark Cass's
S3TC support for an older driver version. On Savage3D/IX/MX
GL_EXT_texture_compression_s3tc can't be enabled because DXT3 and DXT5
are not supported. However GL_S3_s3tc is enabled on all Savage chips.
Tested on a Savage IX and a ProSavageDDR
2005-04-30 02:03:18 +00:00
Jon Smirl
28d0a9c9dd Fix include path to make build work 2005-04-29 22:25:21 +00:00
Keith Whitwell
5f534aa1e2 Format for 80 columns. Add alternate matrix mul based on MAD rather than DP4. 2005-04-29 17:32:27 +00:00
Keith Whitwell
e9e20fc47d Add DISASSEM define, similar to other program generator files. 2005-04-29 17:31:54 +00:00
Keith Whitwell
a5cb1aa211 Add linux-fbdev config 2005-04-29 17:31:10 +00:00
Keith Whitwell
431417fec7 new config 2005-04-29 17:30:29 +00:00
Keith Whitwell
5c81a4b9cd Put back not-so-redundant #ifdef. 2005-04-29 15:41:24 +00:00
Keith Whitwell
a6ebcdfe7d Remove redundant #ifdef, fix compiler warning 2005-04-29 15:37:27 +00:00
Keith Whitwell
2c19069182 new file 2005-04-29 15:36:38 +00:00
Keith Whitwell
15e75e00c7 Maintain a fragment program for current texturing state. 2005-04-29 15:11:39 +00:00
Brian Paul
d59054e60b fix _tnl_copy_to_current() so that current edge flag and rasterpos aren't trashed by color index updates 2005-04-28 21:14:00 +00:00
Keith Whitwell
5cef1a1fed Stop gcc-4.0 complaining about "type qualifiers ignored on function
return type".
2005-04-28 13:16:23 +00:00
Keith Whitwell
545515cbea Stop gcc-4.0 complaining about "type qualifiers ignored on function
return type".
2005-04-28 12:05:58 +00:00
Brian Paul
97e1e60b1c move set_component_sizes() to fix bug 3135 2005-04-27 21:20:30 +00:00
Brian Paul
69441868f6 no need to enable fog or set fog mode with fragment program 2005-04-26 20:58:27 +00:00
Brian Paul
55d8dd4078 tweak previous fog/fragment program fix 2005-04-26 20:56:21 +00:00
Brian Paul
d09df24082 added interpolate_fog() 2005-04-26 17:35:45 +00:00
Brian Paul
c03b6f40ba enable fog render input if fragment program fog option set 2005-04-26 17:25:53 +00:00
Brian Paul
c039af165d comments and minor clean-up 2005-04-26 16:02:56 +00:00
Aapo Tahkola
c3259fa436 Fix as suggested by Ben Skeggs. 2005-04-25 09:50:45 +00:00
Keith Whitwell
b83aadb0e4 Ensure all VB->AttribPtr[] are populated. Reported by Aapo Tahkola 2005-04-25 09:36:27 +00:00
Jon Smirl
576caad33e Minor changes to make linux-solo build again 2005-04-25 03:03:10 +00:00
Felix Kuehling
cbc8d7596a Software fallback for glColorMask. Can be avoided on Savage4 when all
channels are masked (disable draw update). Bumped driver date to
reflect recent correctness fixes. The driver now passes all glean
tests except exactRGBA on both Savage4 and Savage3D-based cards.
2005-04-24 20:55:57 +00:00
Aapo Tahkola
6ffd0a4cf1 Modifying to build against current Mesa. Disabled r200*.c files since they didnt want to build anymore. 2005-04-24 09:08:31 +00:00
Felix Kuehling
5c906924ed Fixed a segfault introduced by Keith's pipeline changes. 2005-04-23 19:54:30 +00:00
Felix Kuehling
9b4536a654 Texturing fixes for Savage3D/MX/IX:
- force emitting texAddr when the texture image changed (flush caches)
- set transparent texture color key to something improbable
  (couldn't find a way to disable it completely)
- fixed texture environment modes GL_DECAL and GL_REPLACE
- made texture environment mode GL_BLEND a software fallback
- added two custom texture formats for promoting from GL_ALPHA to ARGB8888
  and 4444. Since the hardware can't be made to ignore the RGB color
  components, set them to 1 instead of 0. This gives the correct results
- disabled GL_EXT_texture_env_add on Savage3D/MX/IX
- map both GL_CLAMP and GL_CLAMP_TO_EDGE to hardware mode "wrap". It doesn't
  match either mode exactly by the spec, so we should either fall back on both
  or none. I chose the latter.
- fall back to software when s and t wrapping modes differ (hardware has only
  one bit for both)
2005-04-23 17:18:57 +00:00
Keith Whitwell
df943a4041 Fix the worst problems with dangling edgeflag references in
display lists.  These mainly arise from edgeflag being the only
attribute no longer stored internally as a float and requiring
various special case paths to accomodate it.
2005-04-23 11:55:18 +00:00
Keith Whitwell
0d4af83f25 Updates for pipeline_stage struct changes. 2005-04-22 22:47:09 +00:00
Keith Whitwell
bf87f86493 First pass at updating these drivers with pipeline_stage struct changes. 2005-04-22 22:42:09 +00:00
Felix Kuehling
963586b871 Added a French translation of option descriptions by Stephane Marchesin. 2005-04-22 21:36:37 +00:00
Brian Paul
fc06f9fb25 demo / test progs 2005-04-22 21:17:14 +00:00
Brian Paul
20d44dc9bc types for Mesa implementation of EGL 2005-04-22 21:16:28 +00:00
Brian Paul
11b0a76370 prototype EGL_MESA_screen_surface. 2005-04-22 21:16:12 +00:00
Brian Paul
adbff7e977 initial EGL code 2005-04-22 21:09:39 +00:00
Keith Whitwell
a661654a33 Move the call to _tnl_UpdateFixedFunctionProgram to make
it easier for hardware drivers to test this out.
2005-04-22 13:02:04 +00:00
Keith Whitwell
6f973f3367 Simplify the pipeline_stage structure
- remove input/output fields, input tracking removed.
	- remove state fields, the validate function now called
	  on every statechange.
	- add an explicit 'create' function.

Add in code to build vertex program to implement current t&l state.  Still
disabled, but turn on with a #define in t_vp_build.h.
2005-04-22 12:51:19 +00:00
Keith Whitwell
6a13c7da4c Up the value of MAX_NV_VERTEX_PROGRAM_PARAMS to a power of two. 2005-04-22 12:46:13 +00:00
Michal Krol
addcc6afbd Add more error checking. 2005-04-22 10:43:36 +00:00
Michal Krol
19fb77ee7b Cosmetic changes. 2005-04-22 10:28:53 +00:00
Michal Krol
b10d080b1e Move some utility functions to slang_utility.c. 2005-04-22 10:15:32 +00:00
Michal Krol
3ed1f07686 Provide precompiled binary versions of built-in library .gc sources
to dramatically improve shader compiling performance.
2005-04-22 09:51:46 +00:00
Brian Paul
2cbbd3dc50 undef DEPTH_TYPE at end 2005-04-22 02:56:21 +00:00
Felix Kuehling
a7fcac5e92 Fixed some suspicious pointer casts that caused lots of
compile-time-warnings on x86-64. Not tested on x86-64 yet, but a good
thing in general, so I'm giving up waiting for feedback. See also
https://bugs.freedesktop.org/show_bug.cgi?id=2924.
2005-04-21 21:50:54 +00:00
Felix Kuehling
07d91bbb59 Fixed TexEnv modes GL_BLEND and GL_ADD on Savage4-based cards. Disabled
the use of hardware texture format I8 as it produces garbage at least on
ProSavageDDR.
2005-04-21 21:43:21 +00:00
Aapo Tahkola
b3474de7b5 Adding some comments. 2005-04-21 19:09:54 +00:00
Keith Whitwell
7c26b61f93 Reduce the size of mesa's internal fragment and vertex program
representations by switching to packed structures for registers and
instructions.
2005-04-21 14:46:57 +00:00
Brian Paul
88b69d7998 use _mesa_pow() for LIT (bug 3087) 2005-04-21 14:19:50 +00:00
Keith Whitwell
f069e5e412 Facility to construct a vertex program which executes the current
fixed function t&l pipeline.

Currently runs most of the Mesa demos OK, but still needs debugging &
polishing.
2005-04-21 13:13:49 +00:00
Keith Whitwell
0ff98b03c6 New software implementation of ARB_vertex_program. Similar in speed
to existing version, but with the potential for good improvements.
2005-04-21 13:11:02 +00:00
Aapo Tahkola
70375aff48 Had some odd problems with add and temps so doing it with mad. Adding some MAD_2 cases. 2005-04-21 05:24:02 +00:00
Brian Paul
52bf005425 fix state.light[n].spot.direction.w value (bug 3083) 2005-04-20 23:47:03 +00:00
Brian Paul
8d51bbf2a3 clean up buffer creation code 2005-04-20 17:12:10 +00:00
Aapo Tahkola
fc8f202181 Reorganized shader stuff. 2005-04-19 18:49:44 +00:00
Aapo Tahkola
c4e1fd5a7f Fixes for bugs that were nailed down when compairing against software vertex shading. 2005-04-19 03:12:30 +00:00
Aapo Tahkola
f8ed0aa268 Fixing and enabling elt buffers by default. 2005-04-18 22:41:43 +00:00
Ian Romanick
d03ab104db If the file name passed to parse_GL_API is None or "-", read from standard
input.  This allows use of GL API scripts in pipelines.
2005-04-18 21:30:20 +00:00
Ian Romanick
93d2d54e7a Refactor a bunch of common code from the "leaf" scripts to a new functions,
parse_GL_API, in gl_XML.py.
2005-04-18 19:42:23 +00:00
Ian Romanick
8ea22650bd Fill-in function offsets and correct a couple typos. 2005-04-18 19:17:12 +00:00
Ian Romanick
2510ba618d Convert all Python scripts to use XML namespaces. 2005-04-18 19:16:07 +00:00
Peter Zubaj
b7142567bc Alpha test fix 2005-04-18 19:06:14 +00:00
Ian Romanick
61f08d8094 Move the DTD to its own file. 2005-04-18 18:36:57 +00:00
Brian Paul
f905145b60 comments and clean-up 2005-04-18 17:48:25 +00:00
Ian Romanick
02986cb2cc Add support for pthreads and TLS to libGL for __glXLock / __glXUnlock and
for tracking the current GLX context.

This fixes bug #3024.
2005-04-18 16:59:53 +00:00
Ian Romanick
2e823f29e4 Send GL_PACK_INVERT_MESA state to the server. This fixes bug #2538. 2005-04-18 16:40:36 +00:00
Brian Paul
b52673117b s/NORMAL/FOG/ (J.P. Delport) 2005-04-18 14:21:44 +00:00
Jouk Jansen
49b1d95c1c Updates for OpenVMS : New makefiles
added some type-casts

 Modified Files:
 	Mesa/src/mesa/shader/descrip.mms
 	Mesa/src/mesa/shader/program.c
 	Mesa/src/mesa/shader/slang/slang_compile.c
 	Mesa/src/mesa/shader/slang/slang_preprocess.c
 Added Files:
 	Mesa/src/mesa/shader/slang/descrip.mms
 ----------------------------------------------------------------------
2005-04-18 13:05:24 +00:00
Brian Paul
e9a3d8a772 added SLANG_SOURCES to SOLO_C_SOURCES 2005-04-15 22:20:46 +00:00
Brian Paul
afb3fb4b77 config for profiling with gprof 2005-04-15 22:16:18 +00:00
Brian Paul
635ee2df37 added _mesa_share_state() 2005-04-15 17:25:07 +00:00
Ben Crossman
509710cfd7 more gldirect compile fixes. Getting near the linking stage now. No build file yet. 2005-04-15 17:17:47 +00:00
Brian Paul
efb41b07ff remove carriage returns 2005-04-15 16:05:14 +00:00
Keith Whitwell
78803b2667 Fix alpha value of STATE_LIGHTMODEL_SCENECOLOR. From the spec:
The "w" component of the program parameter variable is filled with
 the alpha component of the front diffuse material color.

Make sure matrix inverses are uptodate also.
2005-04-15 12:57:23 +00:00
Michal Krol
a131d50fb7 add shader/slang/slang_preprocess.c 2005-04-15 10:30:43 +00:00
Michal Krol
e3a846b0e3 implement info log; parse #version directive 2005-04-15 10:23:10 +00:00
Michal Krol
65ce50897e slang preprocessor 2005-04-15 10:21:34 +00:00
Michal Krol
8855664489 slang #version directive syntax 2005-04-15 10:20:30 +00:00
Michal Krol
35725a92be change __asm statement semantics 2005-04-15 10:19:27 +00:00
Ben Crossman
d8aa5ffed5 Reverted the last change back to fix bug 3035 2005-04-15 09:13:21 +00:00
Ian Romanick
067e788acd Convert 'variable_param' from a CDATA attribute to a NMTOKENS attribute.
The main difference is that white-space is used to separate the names
instead of comas.
2005-04-14 23:03:44 +00:00
Ian Romanick
73b4c1b388 Refactor the handling of the '(true | false)' enumerated attributes. 2005-04-14 23:00:34 +00:00
Ian Romanick
a3deff2404 Modify the DTD to use NMTOKEN, enumerants, and explicit default values
wherever possible.  Correct a couple mis-uses of the 'counter' attribute
when 'count' was intended.  Fix some errors in the DTD and in the data with
'doubles_in_order'.
2005-04-14 22:59:46 +00:00
Ian Romanick
6cae4f3bc9 In GLX_USE_TLS builds, make GET_CURRENT_CONTEXT use the TLS verion of the
variable.  Without this, GET_CURRENT_CONTEXT would *always* result in a call
to _glapi_get_context (because _glapi_Context is a const pointer to NULL in
TLS builds).
2005-04-14 21:05:55 +00:00
Ian Romanick
f434e07a6a Add missing includes of indirect.h. 2005-04-14 20:35:33 +00:00
Ben Crossman
369404299c A few getenv() that werent using the mesa wrapper version 2005-04-14 19:54:15 +00:00
Ben Crossman
b2b01a60db Some initial compile fixes. Still some left and warnings that need fixing. No where near runnable yet. 2005-04-14 16:58:25 +00:00
Keith Whitwell
60e2810ae4 Disable CLOD (Lod constant) state emit. The values emitted were
possibly negative, hence clobbering the leading register-id byte.
Fixed the calculation of the values to prevent negative numbers being
emitted, but the code still doesn't implement texture LOD bias
correctly, so leave it disabled overall.
2005-04-14 15:53:30 +00:00
Michal Krol
99b329ca13 hook to _slang_compile() 2005-04-14 10:31:36 +00:00
Michal Krol
ed5f790919 cosmetic changes 2005-04-14 10:30:08 +00:00
Michal Krol
8c01903114 ARB_fragment_shader state 2005-04-14 10:28:14 +00:00
Michal Krol
6372ea0da0 ARB_fragment/vertex_shader state 2005-04-14 10:27:19 +00:00
Michal Krol
2a37053fd5 ARB_shading_language_100 bit;
Fragment shader derivative hint
2005-04-14 10:25:49 +00:00
Michal Krol
1e8fc5ffea add GL_ARB_shading_language_100;
reorder GL_ARB_shader_objects and GL_ARB_fragment/vertex_shader stuff
2005-04-14 10:23:51 +00:00
Michal Krol
5c968cbc5e add FEATURE_ARB_shading_language_100;
remove FEATURE_shading_language;
add ARB_fragment/vertex_shader max values
2005-04-14 10:21:30 +00:00
Michal Krol
98e35025ba do not use isdigit() - can cause link errors 2005-04-14 10:19:19 +00:00
Brian Paul
fd451b6d01 updated procedure for getting CVS-write access 2005-04-13 23:50:47 +00:00
Ian Romanick
25fe93f0a1 Add TLS support to libGL and, by virtue of using glthread.h and GL_CALL, all
DRI drivers.  A TLS enabled libGL can load a TLS or a non-TLS DRI driver,
but a TLS DRI driver requires a TLS enabled libGL.

This fixes bug #1822.
2005-04-13 20:59:15 +00:00
Ian Romanick
c604e457d1 Revert revision 1.13. This allows server-side libGLcore (in X.org) to build
with Mesa CVS.  This change was wrong in the first place, and the issue that
necessitated it has been resolved.  For more background on the problem see:

http://marc.theaimsgroup.com/?l=mesa3d-dev&m=111333880529935&w=2
2005-04-13 18:41:33 +00:00
Michal Krol
9a5ba4794c add SLANG_SOURCES 2005-04-13 14:05:28 +00:00
Michal Krol
fa2802d4d0 clean-up stuff 2005-04-13 14:05:06 +00:00
Michal Krol
0e7836b500 simple front-end compiler 2005-04-13 14:04:41 +00:00
Michal Krol
d3ea221d3e add __fixed_input and __fixed_output qualifier support;
fix for_init_statement output;
2005-04-13 13:18:35 +00:00
Michal Krol
2f951683be cosmetic changes;
add __fixed_input and __fixed_output qualifiers for built-in variables;
2005-04-13 13:06:57 +00:00
Michal Krol
5a38200122 cosmetic changes;
fix syntax errors;
2005-04-13 13:03:23 +00:00
Michal Krol
f18d70b804 cosmetic changes;
change first parameter's qualifier from inout to out for __operator =;
remove __asm instructions: int_add, int_multiply, int_divide, int_negate,
int_less, int_equal, bool_equal;
2005-04-13 12:59:58 +00:00
Michal Krol
cfcf86b37d converts a .gc file to a C header containing string form of the file 2005-04-13 12:48:40 +00:00
Felix Kuehling
0ad2ef20a7 Added a Spanish translation by David Rubio Miguélezand a Dutch
translation by Manfred Stienstra.
2005-04-12 21:01:30 +00:00
Felix Kuehling
ad0dbe6b04 Changed escaping of double quotes. 2005-04-12 20:58:34 +00:00
Brian Paul
41bddcfa7b PF_8A8R8G8B pixel format (Dave Reveman) 2005-04-12 01:41:04 +00:00
Felix Kuehling
55ba0dccc9 Manage option translations in separate .po files to make translations
easier for non-programmers familiar with GNU gettext. For now there is
only a German translation but more translations are encouraged.

Translatable strings are extracted from t_options.h containing option
definitions with English descriptions. A corresponding header options.h
with all available translations of option descriptions is generated by
gen_xmlpool.py and included by xmlpool.h.

Many option descriptions were rephrased to make them unambiguous for
translation without context. They are hopefully more helpful to users at
the same time.
2005-04-11 21:41:40 +00:00
Brian Paul
aaa5a66433 set table size to 1023 and use new HASH_FUNC() macro 2005-04-10 17:44:27 +00:00
Adam Jackson
5f92c38f0e Bug #2945: Fix math error that left half the hash buckets empty. 2005-04-09 18:35:57 +00:00
Ian Romanick
db382c5b1d Remove all the radeon_subset files. They were completely unused. Keith
Whitwell says, "[T]he radeon subset code can probably be archived now."
This "fixes" bug #1623.
2005-04-08 23:54:20 +00:00
Ian Romanick
a657c1aee8 Use the same dispatch.c source file for "normal" Mesa builds and DRI
libGL builds.
2005-04-07 23:58:51 +00:00
Brian Paul
d9c389dff6 Add shaderobjects_3dlabs.c back into build but use #ifdef FEATURE_shading_language to enable/disable relevant code. 2005-04-07 14:38:41 +00:00
Ian Romanick
c51ed8c236 Follow the GLX_SGIX_fbconfig spec and return the complete list of
available fbconfigs if attrList is NULL.  This fixes bug #2917.
2005-04-07 00:05:55 +00:00
Brian Paul
c61782958b added wrappers/helpers for creating/destroying rendering contexts 2005-04-06 22:41:46 +00:00
Brian Paul
c3984fc015 changed implementation of GetAllFBConfigs() 2005-04-06 22:40:39 +00:00
Brian Paul
481bdd383a Fix Fake_glXChooseFBConfig so passing NULL attribList causes a list of all
fbconfigs to be returned.
2005-04-06 22:33:15 +00:00
Ian Romanick
bfc8a8dc63 Make linux-dri-x86-64 more like linux-dri-x86. Add ARCH_FLAGS. This is
where things like "-m64" or "-m32" should be specified.  Using this, a
32-bit DRI build can be done on an x86-64 system by doing 'ARCH_CFLAGS=-m32
make linux-dri-x86'.  Minor tweaks to linux-dri to support these changes.
2005-04-06 21:34:34 +00:00
Ian Romanick
29c909f81c Make glxgears_fbconfig compile and respect the DISPLAY setting. Add it
to the Makefile as well.
2005-04-05 20:43:06 +00:00
Keith Whitwell
5234d17514 Don't call PrimitiveNotify with an invalid primitive. Fix ipers
wireframe mode.
2005-04-05 10:30:05 +00:00
Brian Paul
c39a4bc83c s/Togle/Toggle/ 2005-04-04 20:06:40 +00:00
Brian Paul
a92100a3c6 updated warning string to match patch in bug report 2868 2005-04-04 16:06:16 +00:00
Brian Paul
fe1230f1c8 Use FEATURE_shading_language to control whether the shading language
compiler is hooked in.  May be enabled on compiler command line by setting
-DFEATURE_shading_lanuage=1.
2005-04-01 01:41:54 +00:00
Adam Jackson
26772ac988 Disable _mesa_3dlabs_create_{program,shader}_object references. 2005-03-30 17:02:18 +00:00
Brian Paul
425569bbc5 Disable C++ shading language code yet again. Doesn't compile with older
g++ installations.
2005-03-29 02:46:59 +00:00
Brian Paul
93b52d9484 re-enable shading language sources 2005-03-29 02:31:43 +00:00
Brian Paul
1706ba4101 re-enable _mesa_init_shaderobjects_3dlabs() call 2005-03-29 02:31:11 +00:00
Brian Paul
9a54843a94 fix a variety of warnings/errors 2005-03-29 02:28:21 +00:00
Brian Paul
cb80e3905c disable 3dlabs shading language code until build is fixed 2005-03-26 19:45:40 +00:00
Brian Paul
32e845f05e disable _mesa_init_shaderobjects_3dlabs() call until build is fixed 2005-03-26 19:45:08 +00:00
Brian Paul
7d4abc9b3a remove INSTALL.GNU from tarball list 2005-03-26 19:22:06 +00:00
Brian Paul
a62fe7f5e3 obsolete 2005-03-26 19:21:07 +00:00
Michal Krol
00e599e783 implement gl2_3dlabs_shhandle interface; resolve few TODOs 2005-03-25 12:16:53 +00:00
Michal Krol
1d7f71924d cleanup query functions 2005-03-25 12:12:50 +00:00
Michal Krol
05ab19ef43 add _mesa_init_shaderobjects_3dlabs() declaration 2005-03-25 12:07:31 +00:00
Michal Krol
a095aa4f4b fix comments; fix TBuiltInResource typedef 2005-03-25 12:05:30 +00:00
Michal Krol
675f802542 fix comments; disable DLL linkage for WIN32 2005-03-25 12:03:58 +00:00
Felix Kuehling
116986bad5 Fixed segfault due to an off-by-one error in SAVAGE_TEX_MAXLEVELS. 2005-03-24 11:53:19 +00:00
Felix Kuehling
798e753e07 Initialize texture addresses to something valid. 2005-03-23 17:59:09 +00:00
Keith Whitwell
ce1d7ee5ee remove file after merge 2005-03-23 12:01:08 +00:00
Brian Paul
068039eec1 no change 2005-03-23 03:34:24 +00:00
Brian Paul
05bbafa01a use $(*_LIB) in the *_LIB_NAME definitions 2005-03-23 02:12:21 +00:00
Keith Whitwell
8fb17f5b3f rename mesaVis to try and improve clarity 2005-03-22 14:30:30 +00:00
Keith Whitwell
3e62d3a8d8 add FreeTexImageData hook to help single-copy texturing in drivers 2005-03-22 14:27:10 +00:00
Keith Whitwell
050b77a9ac merge unichrome changes from branch 2005-03-22 14:25:55 +00:00
Keith Whitwell
59b4b7e07e Remove test for defined(DRM_USE_MALLOC) around definition of
drmSIGIOHandler().
2005-03-22 13:34:27 +00:00
Keith Whitwell
46d50d9e8e Add more formats to test. 2005-03-22 13:32:35 +00:00
Keith Whitwell
de4fe1e3c5 Add DRM_USE_MALLOC flag 2005-03-22 13:31:35 +00:00
Keith Whitwell
7f8e10f96c Calculate haveAccumBuffer, haveDepthBuffer and haveStencilBuffer in
driFillInModes().
2005-03-22 13:16:20 +00:00
Michel Dänzer
e7c7a0f353 Add support for production version of ATI RN50/ES1000. (ATI Technologies
Inc.)
2005-03-18 23:05:07 +00:00
Aapo Tahkola
6bd390743d Misc fixes. 2005-03-18 14:44:27 +00:00
Michal Krol
2fb2e27e28 update against 03-Feb-2005 release 2005-03-18 14:28:02 +00:00
Michal Krol
5b641a516e enable all 3dlabs front-end compiler sources 2005-03-18 14:21:07 +00:00
Michal Krol
706bb1c714 a little program to change // comments to /* */ ones 2005-03-18 14:07:47 +00:00
Michal Krol
1d5c727bba glslang flex and bison sources:
flex glslang.l
bison -t -v -d glslang.y
mv glslang.tab.c Gen_glslang_tab.cpp (shouldn't be .c?)
mv glslang.tab.h glslang_tab.h
2005-03-18 12:18:00 +00:00
Aapo Tahkola
a890ceee63 Fix to get doom3 started. 2005-03-17 22:28:06 +00:00
Ian Romanick
8a7dcd97bd xmllint fixes. Revert 'note_unflushed' changes that were accidetnally
committed in the last version.
2005-03-17 22:01:39 +00:00
Aapo Tahkola
a78bbd0816 Simple TCL stage and ability to disable vps. 2005-03-17 21:50:01 +00:00
Ian Romanick
80a939cafb Enable the generation of server-side __glGetBooleanv_size and related
functions.  There are two parts to this.  First, a size element with a name
"Get" is shorthand for having four separate size elements with names
"GetIntegerv", "GetDoublev", "GetFloatv", and "GetBooleanv".  Additionally,
a count of "?" is treated specially.  This causes a call to a handcoded
function named "__gl<base name>_variable_size".  This is *only* needed to
support GL_COMPRESSED_TEXTURE_FORMATS.  That enum can return a variable
number of values depending how many compressed texture formats are supported
by the implementation.

Fix a problem with glGetProgram{Local,Env}Parameter[df]vARB,
glAreProgramsResidentNV, and glGetVertexAttribivNV.  These changes only
affect code generated for the server-side.

The changes to enum.c are caused by enums added for the server-side
__glGetBooleanv_size functions.
2005-03-17 21:48:37 +00:00
Ian Romanick
6af6a69312 Minor refactoring and code tweaking. The only notable chage is that
FilterGLAPISpecBase::xref is replaced by
FilterGLAPISpecBase::functions_by_name.  The notable difference between the
two is that ::functions_by_name includes all functions, whether they have an
assigned offset or not.  This feature will be useful (necessary) when more
server-side code is generated.
2005-03-17 20:56:13 +00:00
Ian Romanick
979f35fb78 Minor vertex array support tweaks. These are in preparation for the
(eventual) addition of support for ARB_vertex_buffer_object.  Elminitate the
need for array_state_vector::large_header.  Make some very minor tweaks to
the handling of the indices pointer in emit_DrawElements_old.
2005-03-17 20:36:20 +00:00
Ian Romanick
b81efaaa1a Minor vertex array support tweaks. Most of these are in preparation for the
(eventual) addition of support for ARB_vertex_buffer_object.

Move all the private vertex array data structures out of
indirect_vertex_array.c and into indirect_va_private.h.

Rename array_state_vector::enabled_array_count to
array_state_vector::enabled_client_array_count.

Make sure that both the GL extension string and the server GL version are
available when __glXInitVertexState is called.

Make sure that array_state::normalized is set correctly in the array's
gl*Pointer function.
2005-03-17 20:13:09 +00:00
Ian Romanick
00e760c971 Refactored some of the code for PrintGlxReqSize_[ch]. This ensures that the
same set of functions will be iterated for both the generated C-source file
and the generated header file.
2005-03-17 01:50:32 +00:00
Ian Romanick
3f35fbbf66 Fix the handling of zero-sized output parameters (i.e., those with type
'GLvoid *').  This fixes the GLX protocol for glGetProgramStringARB.  This
fixes bugzilla #2747.

Remove the 'ignore="true"' from glVertexAttrib4bvARB.  This fixes bugzilla
#2746.
2005-03-17 01:48:11 +00:00
Ian Romanick
9eae0b9f19 Hard-code the client-side maximum GL version. It turns out that there are
some flaws in the calculation code when the highest version listed in
known_gl_extensions is supported.  This code would also have some problems
with some of the new features (that don't have an associated extension) on
GL 2.0.
2005-03-17 01:36:24 +00:00
Aapo Tahkola
c1aa3d1e6f Proper VAP output configuration as R300_RS_ROUTE_0_COLOR became optional and broke arbvptorus(takes no input color but produces output color). Also removing some useless code. 2005-03-16 22:32:48 +00:00
Ben Skeggs
dd9da8cdb5 Fixed some strangeness when mixing textured/flat primitives. Skipping texture units should render correctly also. Aapo, I dont think I broke glxgears again on you... 2005-03-16 00:54:09 +00:00
Roland Scheidegger
fbe5296d14 add support for user-configurable brilinear filtering on r200 2005-03-15 22:23:29 +00:00
Aapo Tahkola
7541794373 Fix to get glxgears display anything. 2005-03-15 20:55:29 +00:00
Ben Skeggs
3c4c86aff2 For some reason the Makefile didn't commit.. 2005-03-15 17:09:35 +00:00
Ben Skeggs
34dd4843d7 Initial multitexturing support. Old behaviour can be re-enabled by changing ifdefs in r300_setup_rs_unit and r300SetupPixelShader in r300_state.c\nRequires DRM update. 2005-03-15 17:00:44 +00:00
Ian Romanick
7457a648d2 If setting GL_PACK_INVERT_MESA results in a GL error, log it. 2005-03-14 22:09:31 +00:00
Felix Kuehling
bd5bba8470 When timestamping textures, need to emit the event with SAVAGE_WAIT_3D
set. Otherwise the 3D engine may still be using a texture that is
being overwritten. In order to minimize the cost of waiting, timestamp
textures only when needed: when a texture image changes, when a
different texture is bound to a texture unit or when a texture unit is
disabled. (Used to be after flushing every command buffer.)
2005-03-14 21:52:46 +00:00
Peter Zubaj
e2e4a5c992 Stencil support
Reflex from mesa demos doesn't work
TODO - double side stencil
I hope that I didn't break anything
2005-03-14 20:35:00 +00:00
Michal Krol
02eb36fa8d re-enable slang sources 2005-03-14 12:43:59 +00:00
Michal Krol
0c7d2fff1e make it compile under linux 2005-03-14 12:24:32 +00:00
Michal Krol
5c9d21df3d make it compile under gcc 3.3.2 2005-03-14 12:23:14 +00:00
Michal Krol
8998de569c fix enum comma 2005-03-14 12:19:36 +00:00
Aapo Tahkola
278c6025f9 Replacing alpha test bits with values that give desired results as compaired to software rendering. Alpha test in textures is still completely broken as can be seen in progs/demos/fire and various games. 2005-03-13 12:23:08 +00:00
Felix Kuehling
4f05e61543 Updated savage_dri.h from Xorg CVS. This removes definitions that are
not part of the DDX->DRI interface and should never have been in this
file in the first place.
2005-03-13 00:20:03 +00:00
Felix Kuehling
45f26f9979 Removed savagedma.[ch]. They have been unused for a while and were only
kept around for reference. Now that command DMA is implemented in the
DRM module they are no longer needed.
2005-03-12 23:00:53 +00:00
Aapo Tahkola
203bd3e8ec Unlike radeon and r200 drivers r300AllocCmdBuf allocs dwords not bytes. 2005-03-12 10:14:09 +00:00
Ian Romanick
91c219d906 Add support for ARB_draw_buffers and ARB_occlusion_query. The GLX protocol
for these extensions (as well as ARB_vertex_program and ARB_matrix_palette)
was just approved by the ARB on 8-Mar-2005.  Now the only extension missing
for 1.5 support is ARB_vertex_buffer_object.

The opcodes for ARB_matrix_palette were also added to gl_API.xml.  Since
this extension isn't supported by Mesa, no code is generated for it.  Some
tabs were also converted to spaces in the comment for
GetCompressedTexImageARB.
2005-03-11 20:55:03 +00:00
Brian Paul
522ea42718 add MAT_DIRTY_FLAGS in _math_matrix_mul_floats(), (bug 2696) 2005-03-11 14:54:51 +00:00
Paul Mackerras
e24a9c10b5 Add suitable definitions for the _REV formats, plus a comment
explaining why they are the same as the non-REV formats now that
textures don't get byte-swapped on their way to the chip.
Fix the ARGB4444 and L8 formats.
Add entries for the A8 and RGB332 formats.
2005-03-11 11:38:23 +00:00
Felix Kuehling
96035d54f3 - Flush before updating the timestamp of a texture heap from a bound texture.
- Flush before using a new texture or before disabling a texture unit,
  because savageFlushCmdBuf can only update the timestamp of the last
  used texture. This fixes corruption in quake2 with single-textured
  lighting.
2005-03-10 22:45:00 +00:00
Felix Kuehling
746df56717 If the texture image changed force emitting the texture address, even
if it didn't change. This seems to flush texture cashes. Fixes
multi-textured lighting in quake2.
2005-03-09 15:28:47 +00:00
Vladimir Dergachev
5737fda093 Don't use R200 texture constants - R300 fields are all different. 2005-03-09 05:31:31 +00:00
Vladimir Dergachev
439f7feab1 Deal with texture formats in a more robust way. 2005-03-09 00:40:55 +00:00
Aapo Tahkola
f0d484fa5a Replacing some RADEON cmd types with r300 counterparts. 2005-03-08 22:29:45 +00:00
Aapo Tahkola
2579c32a5f Improving Vladimirs alpha test fix a bit as it turns out r300Enable didnt correctly disable alpha test. Vertex programs with high vertex count now run a lot faster as software fallback is no longer on. Also disabling 'temp to result'-instructions as they probably violate the spec and dont seem to be something thats needed. 2005-03-08 03:29:46 +00:00
Ian Romanick
0bd5373d94 Actually *use* the count_scale value associated with a parameter. 2005-03-06 08:55:39 +00:00
Felix Kuehling
9d05d3dd30 Don't synchronize after each frame. Allow the GPU to be one frame
ahead of the CPU for more parallelism of CPU and GPU. Unfortunately
there seems to be some broken hardware (like my ProSavageDDR) on which
status register updates are delayed sometimes. This leads to very
jerky animation if the hardware can buffer more than the current
frame. A new option "sync_frames" can be used as a remedy on such
broken hardware.
2005-03-06 03:52:01 +00:00
Felix Kuehling
e6aa21156a - Fixed two bugs related to DMA buffer handling that showed up with the
new DRM version 2.4 and command DMA.
- Flush less.
- Bumped the driver date.
2005-03-06 01:28:30 +00:00
Vladimir Dergachev
a30402b56a Add format 15. It turned out to be X,X,X,X,X8. 2005-03-05 22:20:57 +00:00
Dave Airlie
07561c6b32 Fixing memset on ia64 & other archs
From: Stephane Marchesin
2005-03-05 06:38:59 +00:00
Vladimir Dergachev
a4296239d4 Enable VB mode rendering by default. If anyone thinks this is wrong, *please* feel free to change it back.
My reasons:

    * immediate mode is broken
    * vb mode is faster
    * vb mode is the right way to do it.
2005-03-05 06:31:36 +00:00
Vladimir Dergachev
3f9467c946 Do properly initialize ALPHA_TEST register instead of carefully preserving bogus value. This fixes many, many rendering issues which I wrongly blamed on texture programming or performance.. 2005-03-05 06:10:09 +00:00
Dave Airlie
1bb14ad90c fix for solo to set the mode, and make solo gcc2 friendly...
From: Stephane Marchesin
2005-03-05 04:00:09 +00:00
Roland Scheidegger
87030f6618 remove one of the two _tnl_isolate_materials function calls 2005-03-05 00:04:20 +00:00
Adam Jackson
8ff72e9723 Add preliminary EGL headers. 2005-03-04 20:18:55 +00:00
Ian Romanick
b47731f24d Import fixes from X.org tree (Søren Sandmann <sandmann@redhat.com>). 2005-03-04 17:53:24 +00:00
Rune Petersen
bc6bf401f5 Set pipes for R420 cards. Gives a nice speedup. This needs to be tested on r420 cards with less than 16 pipes. 2005-03-04 15:48:40 +00:00
Vladimir Dergachev
984d527626 Add a couple of helper functions for completeness. 2005-03-03 23:18:19 +00:00
Ian Romanick
fdb5a87f91 Fix some errors in the parameter descriptions in serveral vertex / fragment
program related functions.
2005-03-03 21:22:46 +00:00
Ian Romanick
ce77d37264 Check for some common function parameter description errors in the
endElement handler for <function>.  This catches the errors as early as
possible and makes debugging other code easier.
2005-03-03 21:21:59 +00:00
Ian Romanick
6e776f25fd When building in the X-Server, attr.depth doesn't exist. Instead, use
(XMesaDrawable)w)->depth in the error message.
2005-03-03 19:56:11 +00:00
Brian Paul
c1f2f9090b change gl_buffer_object's Size field to GLsizeiptrARB type 2005-03-03 02:05:33 +00:00
Brian Paul
7644bfb536 Added linux-x86-32 config to force building 32-bit objects in a 64-bit environment. 2005-03-03 01:44:42 +00:00
Brian Paul
3e1961839e if building 32-bit objects in 64-bit environment, use -m32 flag 2005-03-03 01:38:13 +00:00
Alan Hourihane
fff3b2f318 use COPY_CLEAN_4V macro to replace using both ASSIGN_4V & COPY_SZ_4V 2005-03-02 18:57:01 +00:00
Brian Paul
b960c14cbb Added a bunch of new comments, minor code clean-ups. 2005-03-02 16:37:24 +00:00
Brian Paul
3db7ae3a38 Using glColor3 commands to update materials could result in an undefined
alpha value.  Fixed.
2005-03-02 16:31:58 +00:00
Brian Paul
7cd2ae9d97 added stub functions for GLX_MESA_allocate_memory 2005-03-01 02:51:07 +00:00
Ian Romanick
03dc437363 Clean-up some warnings caused by the addition of vertex / fragment program
protocol support (reported by Adam Jackson).  Added code to validate the
'type' parameter to the draw element functions.
2005-02-28 19:37:10 +00:00
Brian Paul
80875253ce additional parenthesis in TNL_CONTEXT macro (Nicolai Haehnle) 2005-02-28 17:45:11 +00:00
Aapo Tahkola
d1e40c9bdd fix for 'nasty bug' and some sanity checks to avoid buffer overruns. Bumping VSF_MAX_FRAGMENT_LENGTH as it seems a bit low otherwise. 2005-02-28 00:27:02 +00:00
Brian Paul
6c0c91714c silence warnings 2005-02-27 16:23:41 +00:00
hmarson
87a2f3df64 Added 0x4e51 - Saphire 9600 256MB
0x4e71 - Saphire 9600 256MB - Second Head...
2005-02-27 12:12:25 +00:00
Dave Airlie
ab7312ef63 precedence precedence precedence.. add some brackets 2005-02-27 07:43:18 +00:00
Brian Paul
67742383e8 Rename _mesa_update_buffers() to _mesa_update_draw_buffer_bounds() and do
additional checks.
Replace _mesa_init_buffers() with _mesa_init_scissor() and _mesa_init_multisample().
2005-02-26 17:16:12 +00:00
Dave Airlie
4932ba28ad Add a dri config option to enable the max texture level hack
make ycbcr depend on a CHIPSET define .. needs to be filled in though
2005-02-26 05:24:04 +00:00
Dave Airlie
8ca515097f use girl2.rgb by default 2005-02-26 04:56:25 +00:00
Dave Airlie
c68233cb35 Add glXAllocateMemoryMESA demo app using ycbcr...
add girl2.rgb which is a slightly resized girl.rgb so client texturing works
2005-02-26 04:51:47 +00:00
Dave Airlie
9bfd9582d4 bring over structs from Xorg glx.h to make Mesa glx.h the one true glx.h 2005-02-26 03:55:44 +00:00
Dave Airlie
24dcc6b6bf Add GLX_MESA_allocate_memory from Xorg glx.h 2005-02-26 03:51:17 +00:00
Ian Romanick
f3a6e4fa5b Fairly significant changes to enums.c and the way it is generated. enums.c
now contains 3 static tables.  The first table is a single, large string of
all the enum names.  The second table is an array, sorted by enum name, of
indexes to the string table and the matching enum value.  The extra string
table is used to eliminate relocs (and save space) in the compiled file.
The third table is an array, sorted by enum value, of indexes into the
second table.

The [name, enum] table contains all of the enums, but the table sorted by
enum-value does not.  This table contains one entry per enum value.  For
enum values that have multiple names (e.g., 0x84C0 has GL_TEXTURE0_ARB and
GL_TEXTURE0), only an index to the "best" name will appear in the table.
gl_enums.py gives precedence to "core" GL versions of names, followed by ARB
versions, followed by EXT versions, followed, finally, by vendor versions
(i.e., anything that doesn't fall into one of the previous categories).  By
filtering the unneeded elements from this table, not only can we guarantee
determinism in the generated tables, but we save 364 elements in the table.

The optimizations outlined above reduced the size of the stripped enums.o
(on x86) from ~80KB to ~53KB.

The internal organization of gl_enums.py was also heavily modified.
Previously enums were stored in an unsorted list as [value, name] tuples
(basically).  This list was then sorted, using a user-specified compare
function (i.e., VERY slow in most Python implementations) to generate a
table sorted by enum value.  It was then sorted again, using another
user-specified compare function, to generate a table sorted by name.

Enums are now stored in a dictionary, called enum_table, with the enum value
as the key.  Each dictionary element is a list of [name, priority] pairs.
The priority is determined as described above.  The table sorted by enum
value is generated by sorting the keys of enum_table (i.e., very fast).  The
tables sorted by name are generated by creating a list, called name_table,
of [name, enum value] pairs.  This table can then be sorted by doing
name_table.sort() (i.e., very fast).

The result is a fair amount more Python code, but execution time was reduced
from ~14 seconds to ~2 seconds.
2005-02-26 01:09:35 +00:00
Ian Romanick
4e262cfb07 Accidentally committed wrong version with the previous commit set. 2005-02-25 23:02:33 +00:00
Ian Romanick
40af76bbaa Add GLX protocol support for ARB_fragement_program,
ARB_fragment_program_shadow, ARB_vertex_program, NV_fragment_program,
NV_fragment_program_option, NV_fragment_program2, NV_vertex_program,
NV_vertex_program1_1, NV_vertex_program2, NV_vertex_program2_option,
NV_vertex_program3, and ATI_text_fragment_shader.
2005-02-25 22:46:30 +00:00
Ian Romanick
1fd3bbc42e Convert the static functions read_pixel_reply, read_reply,
setup_single_request, and setup_vendor_request to the global functions
__glXReadPixelReply, __glXReadReply, __glXSetupSingleRequest, and
__glXSetupVendorRequest.  This will make it easier to add handcoded Single /
VendorPrivate / VendorPrivteWithReply functions.
2005-02-25 01:48:25 +00:00
Aapo Tahkola
ac8020ea9c Another nasty struct size bug found. 2005-02-24 13:59:56 +00:00
Brian Paul
2c6f911e10 More GL_EXT_framebuffer_object: rename some things, added device driver hooks. 2005-02-24 05:47:06 +00:00
Felix Kuehling
7b7d00ca62 Don't forget to update a heap's timestamp when a texture image is
changed. Other drivers don't need to do this because they're swapping
modified textures out of texture memory, which implies a timestamp
update.
2005-02-23 20:51:27 +00:00
Ian Romanick
365a0a7c15 Missed the commit of glxext.c yesterday.
Fixed a flow control problem in glGet*v that could result in the display
not being unlocked.  This also resulted in refactoring a lot more code
out of the glGet*v routines into get_array_data, which was renamed to
get_client_data.
2005-02-23 20:06:52 +00:00
Ian Romanick
2b1ec683d3 Put quotes around $(CC) and $(CXX) so that 'CC=cache gcc' will work. 2005-02-23 19:24:30 +00:00
Brian Paul
ba0fe1832e minor changes to aid debugging, and a new comment 2005-02-23 16:54:18 +00:00
Felix Kuehling
540b260cbd With Savage DRM version 2.3.x or later use event counters for texture
heap aging, similar to the way it's done in the i810 and i855 drivers.
This avoids idling the engine on every texture upload.
2005-02-23 16:37:27 +00:00
Brian Paul
8f5f6b3d59 Sort the enums in the Python code, instead of at runtime. (Zack Rusin) 2005-02-23 16:36:17 +00:00
Ian Romanick
6614766f3e Corrected the value for X_GLrop_SecondaryColor3svEXT. 2005-02-23 00:47:11 +00:00
Ian Romanick
57b5e8538e Missed the Makefile with the previous commit. 2005-02-23 00:24:18 +00:00
Ian Romanick
fdb07636f2 Added __glExtensionBiIsEnabled and __GLXcontext::gl_extension_bits. This
enables libGL to query which extension are exported to applications.

Refactored array-query functionality (from glGet*v) in src/glx/x11/single2.c.

Massive re-write of indirect vertex array support.  The most noticable
effect is that glDrawElements now generates DrawArrays protocol.  The
side-effects (and the main reasons for the re-work) are that it is much
easier to add support for new arrays (e.g., GL_VERTEX_ATTRIB_ARRAY,
GL_WEIGHT_ARRAY_ARB, etc.) and it is much easier to add support for the new
DrawArrays protocol (required to support ARB_vertex_buffer_object).

These changes were primarilly tested with progs/demos/isosurf.
2005-02-22 22:36:31 +00:00
Brian Paul
cb83f62e30 now generated with Python script 2005-02-22 15:42:30 +00:00
Brian Paul
78123bb38b generate enums.c file (Zack Rusin) 2005-02-22 15:39:46 +00:00
Aapo Tahkola
3c69df8a70 New elt buffer code should be fairly stable. 2005-02-22 05:16:42 +00:00
Vladimir Dergachev
e00b729716 Add code to autogenerate vertex shaders.
This is needed for multitexturing to work properly.
2005-02-21 06:09:30 +00:00
Dave Airlie
a2990a9d73 Add DESTDIR install target 2005-02-21 00:20:19 +00:00
Dave Airlie
dee1c795c2 add more functionality to miniglx for glitz 2005-02-20 10:46:34 +00:00
Aapo Tahkola
eb6560bf2b Adding support for front buffer mode, removing some code we dont really need and some new debugging stuff. 2005-02-20 03:01:09 +00:00
Aapo Tahkola
35bc4ac680 Minor fix to border and blend color. 2005-02-19 16:30:56 +00:00
Aapo Tahkola
ff3ce3dd96 Disabling some fallbacks as they cause misc programs not to start and adding some comments. 2005-02-19 03:04:08 +00:00
Aapo Tahkola
42896b2a18 Fix for buffer overrun caused by ALLOC_STATE not having args surrounded by parenthesis. Can you see it? HINT: Anything texture related should now work slightly better. And yes it took me several hours to find it. 2005-02-19 02:25:53 +00:00
Nicolai Haehnle
10b892af96 Print an error if idling the engine before the buffer copy fails.
Be a bit more useful about the sync message after flushing command buffers.

Add an "allmsg" debug name that enables all log messages but does not
enable syncing.
2005-02-18 22:07:20 +00:00
Michel Dänzer
9605806d81 fd.o bug #2576: Add support for ATI RN50/ES1000. (ATI Technologies Inc.) 2005-02-18 20:03:33 +00:00
Nicolai Haehnle
3f22c0966d r300RefillCurrentDmaRegion: Retry buffer acquisition only once, after
waiting for the engine to idle. There's no way for another buffer to
become free anyway once the engine is idle.
2005-02-18 18:57:38 +00:00
Nicolai Haehnle
8281cca82f Always submit command buffers, even when there are no cliprects,
so that we no longer leak DMA buffers (plus, this just might fix some
state-setting related problems, if there were any - but that's unlikely).

Update the DRM to cope with cmdbuf->nbox == 0.
2005-02-18 18:28:52 +00:00
Aapo Tahkola
4d73f1af35 We dont need to call r300EmitAOS if we arent going to draw anything(r300_get_num_verts returns 0). 2005-02-18 16:58:19 +00:00
Nicolai Haehnle
26d812ae00 Reset nr_released_bufs to 0 after the command buffer has been submitted.
Added a more verbose comment about nr_released_bufs in r300_context.h
2005-02-18 16:34:14 +00:00
Brian Paul
f448e632b6 XMesaGetDepthBuffer() returned wrong bytesPerValue (Karl Schultz) 2005-02-18 14:49:27 +00:00
Brian Paul
49f7430b12 s/0/NULL/ (Jeff Muizelaar) 2005-02-18 14:44:00 +00:00
Nicolai Haehnle
d73b929ef2 Fix: RADEON_DEBUG is a bitfield, so use & to check for flags, not == 2005-02-18 11:27:24 +00:00
Nicolai Haehnle
6f37e76272 Fixing *lots* of warning messages, especially concerning unportable
whitespace before preprocessor commands.

Please, can you try to keep the warnings down? Try running make with
make -s sometime to see just how bad an offender the current code is.
2005-02-17 22:07:32 +00:00
Nicolai Haehnle
74477b24a8 RADEON_DEBUG is a bitfield, so use & instead of ==.
Also, put the hash in preprocessor directives at the beginning of the line
to fix error messages.
2005-02-17 21:45:20 +00:00
Aapo Tahkola
78152f85e7 Switching to start_index32_packet. 2005-02-17 18:16:46 +00:00
Aapo Tahkola
002a64cc48 magic_1 handling... 2005-02-17 18:02:28 +00:00
Ben Skeggs
ca4116bfce oops. 2005-02-17 14:34:51 +00:00
Brian Paul
0846e52d46 s/0/NULL/ (Jeff Muizelaar) 2005-02-17 14:12:50 +00:00
Brian Paul
6e2fd96627 remove extern (Jeff Muizelaar) 2005-02-17 14:11:56 +00:00
Ben Skeggs
a9eb712fc9 Make immediate code do a LOAD_VBPNTR again 2005-02-17 12:37:40 +00:00
Dave Airlie
934be3266f fix some 0->NULLs 2005-02-17 11:13:59 +00:00
Vladimir Dergachev
c8af2b5a52 Cleanup formatting a little bit. 2005-02-17 06:39:09 +00:00
Brian Paul
f321f16e83 fix non-Win32 definition of GLUTAPIENTRY, remove some cruft 2005-02-16 19:52:35 +00:00
Aapo Tahkola
41d180c899 Support for idx buffers. Leaving it on by default as it doesnt seem to cause any lock ups nor other issues. Tests with one object using elts should pass. Introducing more than one object will cause indices to mix up as far as i can see. DRM update is needed for this code to work\! 2005-02-16 19:04:32 +00:00
Rune Petersen
8eeef423e9 small cleanup, remove some warnings 2005-02-16 16:52:11 +00:00
Brian Paul
1ff8f50f2f fixed problems with parse_float() (fd.o bug 2520) 2005-02-16 15:08:29 +00:00
Brian Paul
2c28dd892c s/0/NULL/ (Jeff Muizelaar) 2005-02-16 15:02:25 +00:00
reist
5c2f3d5d3a get two textures to work 2005-02-16 10:38:57 +00:00
Ben Skeggs
d588311dbb Don't enable fog. It's broken 2005-02-16 06:24:07 +00:00
Ben Skeggs
f446027656 Share routing code between immd/vb. Fix breakage of vertex programs in vb mode. 2005-02-15 19:07:35 +00:00
Dave Airlie
233d93d47e Add missing texture formats for completeness 2005-02-15 11:20:11 +00:00
Dave Airlie
70f2be9cc6 add some missing texture formats and bits from r200 docs 2005-02-15 10:44:20 +00:00
Jerome Glisse
9e5a0b8895 Added texture format table for big endian (this is a tempory hack). 2005-02-15 10:40:34 +00:00
Dave Airlie
09298228c6 add EnableExtension so r200 enables all its extensions, add mesa memory
extension entry points
2005-02-15 08:40:24 +00:00
Roland Scheidegger
e82cb7852b remove accidentally commited printf for tiling support 2005-02-14 17:37:52 +00:00
Ian Romanick
4ea4589302 Simple test for GL_MESA_pack_invert. 2005-02-14 17:07:29 +00:00
Daniel Borca
a5f2dcb57b updated doc 2005-02-14 15:06:50 +00:00
Daniel Borca
72b2af6035 removed detritus 2005-02-14 15:05:24 +00:00
Daniel Borca
84396a72df separated DOS GLUT from GLX GLUT.
added a few FreeGLUT specific functions.
2005-02-14 15:04:52 +00:00
Aapo Tahkola
0340663eb7 Support for blend color(not tested), "proper line width/point size" clamps and fix for glxinfo problem. 2005-02-14 13:14:16 +00:00
Keith Whitwell
8352666a9d mesa-fix-one-bit-signed-bitfield.patch from Jeff Muizelaar 2005-02-14 09:36:00 +00:00
Dave Airlie
8d12a6d537 fix some signed vs unsigned warnings 2005-02-14 09:27:38 +00:00
Dave Airlie
fbdd7a5e74 fix signed vs unsigned comparison warnings in tnl_dd 2005-02-14 09:25:08 +00:00
Daniel Borca
aeee36a311 killed a few warnings 2005-02-14 08:19:54 +00:00
Daniel Borca
2f99f6558c added a bunch of const in the decoder 2005-02-14 08:08:35 +00:00
Daniel Borca
b6082fd236 static const' instead of const static' 2005-02-14 08:02:50 +00:00
Daniel Borca
0a13cebaa1 ProgramCallbackMesa must match the prototype 2005-02-14 08:01:59 +00:00
Eric Anholt
baa832d311 Change another usage of __AMD64__ to the standard __amd64__, and remove
__AMD64__ from the linux configs so it won't creep back in as easily.  Fixes
hang on FreeBSD on the first lock grab.
2005-02-14 06:57:27 +00:00
Eric Anholt
1718e34352 Don't forget to -L/usr/local/lib to grab expat. 2005-02-14 06:54:50 +00:00
Michel Dänzer
d5e008b84b Typo fix. 2005-02-13 18:37:36 +00:00
Rune Petersen
3271390362 initial r400 support: r400 cards are treated as RV350 for now. 2005-02-12 21:29:51 +00:00
Michel Dänzer
37cbb521d3 MMIO endianness fixes for Radeon drivers. 2005-02-12 20:37:07 +00:00
Brian Paul
2752177ade unlock mutex upon error return (Jeff Muizelaar) 2005-02-12 18:43:38 +00:00
Felix Kuehling
f640ee2f6e Fall back properly when GL_COLOR_LOGIC_OP is enabled and != GL_COPY.
Add missing per-primitive fallback for polygon stipple.
2005-02-12 16:02:30 +00:00
Felix Kuehling
25817dc26b Offset LOD bias by about 0.3 to match software rendering more closely.
Another small tweak to subtile upload (mostly cosmetic).
2005-02-12 14:37:17 +00:00
Felix Kuehling
ed9119b72a Make glean's masked clear test pass. 2005-02-12 14:35:17 +00:00
Felix Kuehling
0872b85b1e Savage3D-based chips seem so use a constant tile stride of 2048 for
vertically incomplete tiles, but only if the color depth is
32bpp. Nobody said this was supposed to be logical!
2005-02-12 14:03:05 +00:00
Ben Skeggs
6125515cec Enabled vertex buffer mode as default. 2005-02-12 11:15:55 +00:00
Keith Whitwell
cc70176446 Turn _via_fastrender_stage back on. 2005-02-11 18:25:55 +00:00
Keith Whitwell
a0c8524924 mesa-main-0-NULL.patch from Jeff Muizelaar 2005-02-11 09:34:05 +00:00
Ben Skeggs
2d10924a14 Port of r200 VB code. VB path should be as fast as the immediate path now, tuxracer should render correctly. Immediate path was left enabled. 2005-02-11 05:59:13 +00:00
Roland Scheidegger
4837ea3020 add texture micro and macro tiling to radeon/r200 driver. This can improve performance up to 15% in texture-intensive applications. Convert the driver to use the correct blit format and blit width instead of fixed blit format and blit width when uploading textures to make it work. 2005-02-10 22:36:06 +00:00
Roland Scheidegger
26d3159125 add the new RADEON_CUBIC_OFFSET/FACES state packets/registers to radeon (and r200) sanity code 2005-02-10 21:59:20 +00:00
Roland Scheidegger
b66251f76d (Andreas Stenglein) fix projected textures with swtcl, they need the w coordinate of the vertex (bugzilla #1648) 2005-02-10 18:28:44 +00:00
Brian Paul
d9468c9405 new comments, fix zoffset error test 2005-02-10 16:08:07 +00:00
Brian Paul
f901072afb lots of updates 2005-02-10 15:18:26 +00:00
Aapo Tahkola
1982a66838 Added kindly note about single buffer mode. 2005-02-10 12:40:41 +00:00
Aapo Tahkola
3f9bae90c3 Updating master copy of r300_reg.h and turning immediate mode back on 2005-02-10 11:02:55 +00:00
Keith Whitwell
b97e478fe9 mesa-tnl-0-to-NULL.patch from Jeff Muizelaar 2005-02-10 10:57:22 +00:00
Keith Whitwell
a9a4c5489e Catch no-op vertex buffers consisting only of vertices which will
also appear in a future buffer.
2005-02-10 10:55:30 +00:00
Aapo Tahkola
a85eb9c0a7 Removing some regs that are wrong and adding some comments to r300_reg.h . 2005-02-10 10:45:54 +00:00
Aapo Tahkola
dd951e6dde Support for PolygonMode. Not too far from working even though i almost gave up once already. 2005-02-10 08:56:35 +00:00
Vladimir Dergachev
d190734875 Fix copy'n'paste errors.
Print command buffer sizes during startup (TODO: remove 1 || when the driver is more mature).
2005-02-10 07:39:11 +00:00
Aapo Tahkola
4afa1d7abb Turns out unknown5 was border color. texwrap looks good now. 2005-02-10 05:11:31 +00:00
Aapo Tahkola
58010eb35c Adding support for selecting line width. Stipple patterns still cause lots of trouble. 2005-02-10 04:43:07 +00:00
Ian Romanick
816c0c932d Simple test for ARB_texture_env_crossbar functionality. It is difficult
to come up with good tests for this functionality that don't require
either ATI_texture_env_combine3 or NV_texture_env_combine4.
2005-02-09 22:16:38 +00:00
Brian Paul
4f1f5e336b glGet*(GL_FRAGMENT_PROGRAM_BINDING_NV) was returning the vertex program binding. 2005-02-09 18:46:16 +00:00
Brian Paul
a8d5b176b5 Added a test/clamp in the scale_internal_*() functions to prevent reading
a row of pixels beyond the input buffer's bounds.
FDO/Mesa bug #2510.
2005-02-09 16:18:39 +00:00
Aapo Tahkola
fe7aa08ad9 Enabled user-defined point size, enabled zbiases for rest of the primitives and fixed bad vertex number checks triggered by nurb. 2005-02-09 05:53:34 +00:00
Brian Paul
1f6735a6a5 initial support for GL_EXT_framebuffer_object 2005-02-09 03:51:11 +00:00
Brian Paul
f0bbbf66b8 implement the 'completeness' tests 2005-02-09 03:50:30 +00:00
Ian Romanick
d863424032 Generate GLX protocol for pixel single commands. 2005-02-09 03:11:23 +00:00
Felix Kuehling
799bc13da2 Fixed stride of incomplete tiles. 2005-02-09 00:45:16 +00:00
Keith Whitwell
4754fc653f SUBPIXEL fixes from Dieter 2005-02-08 20:52:02 +00:00
Vladimir Dergachev
85199453cc Remove #ifdef's around PolygonOffset function.
Print number of missing entry for texture format.
Add alpha-luminance format.
2005-02-08 20:27:09 +00:00
Ian Romanick
a91e0218a3 Correct a couple problems / omissions in the DTD. 2005-02-08 19:52:26 +00:00
Aapo Tahkola
5e4a7581df Typo.. 2005-02-08 19:29:05 +00:00
Aapo Tahkola
6a04cff065 Fix the bug and get zbias back into shape. There might still be some problems with initial zbias... 2005-02-08 19:26:59 +00:00
Michel Dänzer
3dec3c7a74 Call _mesa_ResizeBuffersMESA() in r200Viewport(), fixes incorrect rendering
in bzflag 2.0. (Alexander E. Patrakov)
2005-02-08 17:39:08 +00:00
Brian Paul
8e5f0e62dd clamp anisotropy against max value 2005-02-08 14:44:01 +00:00
Aapo Tahkola
46cde1715f BIG FAT NOTE: Theres a nasty bug somewhere thats causing vb color buffer clears and other things not to work. This bug can be triggered by extending struct r300_hw_state by two struct r300_state_atom's from its current size. Everything zbs and unk42B4 related is now covered with HAVE_ZBS and GA ifdefs. Who wants to fix it? Not i. :) 2005-02-08 07:05:25 +00:00
Adam Jackson
d084982240 Bug #2477: Make GLU/GLw/glut build properly even with -fvisibility=hidden. 2005-02-08 05:46:53 +00:00
Aapo Tahkola
4885a9eb20 Better fix to get tuxracer working. 2005-02-08 05:33:44 +00:00
Aapo Tahkola
1764b78ee9 fog + immediate mode = bad things 2005-02-08 04:46:39 +00:00
Aapo Tahkola
315afce941 Implemented checks that prevent r300 from locking up when bad number of verts are given. Also tweaked WARN_ONCE a bit to handle va-args. 2005-02-08 04:31:29 +00:00
Vladimir Dergachev
3f847b73f3 Let Polygon Offset be turned on and off. 2005-02-08 04:20:40 +00:00
Brian Paul
923b6fc4d9 just some comments 2005-02-08 04:08:56 +00:00
Brian Paul
1864c7d79a a bunch of assorted fixes 2005-02-08 03:46:37 +00:00
Brian Paul
386e997f45 plug in GL_EXT_framebuffer_object functions 2005-02-08 03:46:08 +00:00
Brian Paul
3d2e10564e removed GL_EXT_framebuffer_object tokens 2005-02-08 03:45:44 +00:00
Brian Paul
cf69e051ce added GL_EXT_framebuffer_object enums/funcs. Remove when glext.h is updated 2005-02-08 03:45:08 +00:00
Brian Paul
78e6e59477 Add new entrypoints for GL_EXT_framebuffer_object. 2005-02-08 03:44:24 +00:00
Ian Romanick
87440f531c Definitions for EXT_framebuffer_object. Just <include/> it in gl_API.xml
when ready.
2005-02-08 02:11:44 +00:00
Ian Romanick
6cfd4f7e55 Add the ability to include other XML files by using a
<include name="file"/> element as a sub-element of <OpenGLAPI>.
2005-02-08 02:11:14 +00:00
Brian Paul
463642c0be checkpoint latest work 2005-02-08 02:06:00 +00:00
Brian Paul
d1b1b37270 added missing prototype 2005-02-08 02:05:13 +00:00
Brian Paul
0d22b90540 indentation fix 2005-02-08 02:04:49 +00:00
Aapo Tahkola
27f75a863e To cut the long and boring story short, polygon offsets should now work. vb mode colorbuffer clears are still mysticly broken by offsets... Maybe we need to merge zbs and unk42B4 together? 2005-02-08 01:49:03 +00:00
Brian Paul
049290c584 improved warning message 2005-02-07 15:04:56 +00:00
Keith Whitwell
71699df7de argb8888 optimizations from via branch 2005-02-07 13:20:17 +00:00
Keith Whitwell
8d621b3bdd More texture enums (Andreas Stenglein) 2005-02-07 11:00:32 +00:00
Keith Whitwell
1f2b715988 GL_ARB_texture_rectangle enums (Andreas Stenglein) 2005-02-07 10:36:00 +00:00
Brian Paul
3deaa01c2b additional work on GL_EXT_framebuffer_object 2005-02-07 05:08:24 +00:00
Jerome Glisse
1e42244e82 Added PCI id (0x4152). 2005-02-06 12:37:23 +00:00
Felix Kuehling
66b48d6df6 Disable vertex DMA on SuperSavages. 2005-02-05 22:10:14 +00:00
Felix Kuehling
5bdf2bc6c7 - Fixed scissor rectangle not moving with the window (Xorg bug #1731).
- Flush buffered primitives before changing scissors.
- Require Savage DRM version 2.1.0, so that the broken single-cliprect
  code can finally rest in peace.
- Removed some more dead code.
2005-02-05 21:21:02 +00:00
Brian Paul
d9d972a944 added fbobject.c to sources 2005-02-05 20:00:15 +00:00
Brian Paul
ddc82eefca Some initial work on GL_EXT_framebuffer_object. 2005-02-05 19:56:45 +00:00
Jerome Glisse
2886579324 Added PCI id (0x4152). 2005-02-05 19:52:26 +00:00
Brian Paul
bb7d5f8837 Remove the Shared->TexObjectList pointer and Next field from gl_texture_object.
Was only used by two drivers to walk over all texture objects.  Can do that
via the hash table instead.
Cleaned up some comments for struct gl_texture_object.
2005-02-05 18:12:59 +00:00
Brian Paul
8c3ddf4270 add a few comments 2005-02-05 18:11:05 +00:00
Jerome Glisse
f955218bf1 Modified hw state for big endian computers. 2005-02-05 18:01:21 +00:00
Brian Paul
7aafcc86c7 remove dependency on Shared->TexObjectList 2005-02-05 17:43:33 +00:00
Brian Paul
ce657cf752 remove unneeded code 2005-02-05 17:38:13 +00:00
Brian Paul
cf899d400d removed need for Shared->TexObjectList, walk over texture hash table entries instead 2005-02-05 17:37:00 +00:00
Felix Kuehling
557dce9bc2 Fixed a typo in an assertion. (Don't understand how this ever compiled.)
Found by Andreas Stenglein.
2005-02-05 13:17:34 +00:00
Vladimir Dergachev
b64d4a27cb Warn of unknown texture formats. 2005-02-05 03:13:34 +00:00
Ian Romanick
a02b83115a Fix some mixed spaces / tabs issues in generated code. Commit generated
files that have been trivially changed by other recent commits.
2005-02-05 00:59:57 +00:00
Ian Romanick
0a755ade51 Enable client-side GLX support for texture compression extensions. 2005-02-04 19:29:30 +00:00
Felix Kuehling
19064f818a Added an option texture_heaps that allows selecting which texture heaps
will be used. Implemented this option in the Savage driver. On my
ProSavageDDR uploads to AGP memory are about 1.5 times as fast as
uploads to card memory. On non-IGP hardware the difference may be even
bigger. Now mplayer -gl is getting really usable.
2005-02-04 00:25:41 +00:00
Felix Kuehling
cbff5db516 Made subtile upload a template. This speeds up tiled texture uploads by
about a factor 1.3.
2005-02-04 00:17:21 +00:00
Felix Kuehling
64b85b4563 Use all texture heaps in a fair way when textures need to be kicked in
order to make room for new textures. In particular this fixes texture
trashing on the first heap when the second heap is occupied by
currently unused textures (observed with Torcs and the Savage driver).

Heaps are weighted by their sizes by default but drivers can override
these and apply their own weights based on relative texture upload
speeds to the respective heaps.
2005-02-03 21:40:21 +00:00
Aapo Tahkola
9ea600ff3f Removing some trash and disabling fog fallback as it seem its causing more harm than good. Tuxracer should now work at least with vbs. Fix for vb colorbuffer clear bug is underway... 2005-02-03 19:51:57 +00:00
Aapo Tahkola
fe58074dea Changing vb code to handle inputs correctly. 2005-02-03 19:43:27 +00:00
Vladimir Dergachev
c326f9ffae Start beginning of pixel shader generator.. 2005-02-03 17:48:32 +00:00
Vladimir Dergachev
54b03eefda Forgot to increase the length. 2005-02-03 16:05:21 +00:00
Vladimir Dergachev
d26e464b6a Looks like we need at least one instruction for pixel shader. 2005-02-03 16:01:46 +00:00
Vladimir Dergachev
4c56261075 Get vertex programs supplied by the user work properly with immediate mode - vertex buffer mode worked by accident.
Fix alu_offset in SINGLE_TEXTURE_PIPELINE.
2005-02-03 15:44:06 +00:00
Vladimir Dergachev
19b260119a Since high bits can be used for flags, mask them out.
This stops arbvpwarpmesh from segfaulting and it actually works - with immediate mode rendering.
2005-02-03 06:33:44 +00:00
Vladimir Dergachev
3f0926b612 Remove redundant instructions from fixed pipelines, looks like they do not do anything, at least on my hardware. 2005-02-03 04:16:59 +00:00
Vladimir Dergachev
cb085044c9 Mark ZBIAS definitions. 2005-02-03 03:48:22 +00:00
Vladimir Dergachev
f350617c24 This was too optimistic sorry - all that register does is something weird with polygon culling. 2005-02-03 03:47:12 +00:00
Vladimir Dergachev
f46de6f23b Get Polygon offset fill to work.
Make WARN_ONCE message more informative.
2005-02-03 03:43:01 +00:00
Ian Romanick
94a20cbadf Added a bunch of extensions that were previously supported but weren't
in the gl_API.xml database.  Add "official" support for SGI_color_matrix
and SGI_texture_color_table.  These were previously supported only by
way of ARB_imaging.
2005-02-03 00:38:40 +00:00
Felix Kuehling
eba5b610b9 Check for heap == NULL before driSetTextureSwapCounterLocation. 2005-02-02 15:57:25 +00:00
Felix Kuehling
2eb9e67a5a Don't try to kick textures from a NULL tex heap. 2005-02-02 15:52:29 +00:00
Felix Kuehling
8b21166c14 Fixed flushing of client-side vertex buffers. 2005-02-02 14:43:03 +00:00
Felix Kuehling
1a141b9161 Fixed some debug output that was unconditionally enabled. 2005-02-02 14:42:00 +00:00
Brian Paul
6286dda286 clamp viewport against ctx->Const.MaxViewportWidth/Height instead of MAX_WIDTH/HEIGHT 2005-02-02 14:12:59 +00:00
Aapo Tahkola
1a1c49f8a6 Changed parts of r300_setup_routing to use WARN_ONCE. 2005-02-02 13:29:11 +00:00
Ian Romanick
3fec8c24ec Small refactor. Add glXFunctionIterator, which derrives from
glFunctionIterator and is used by GlxProto.  The difference between the two
iterator classes is that glXFunctionIterator skips functions that the GLX
protocol code does not care about.

Replace all the remaining occurances of glParameter::p_count_parameters and
glFunction::count_parameters with the count_parameter_list.

Add GlxProto::size_call to generate the C code to calculate 'compsize'.

These trivially modify the generated code.
2005-02-02 00:54:45 +00:00
Aapo Tahkola
6b158a7d23 Add a missing break and a reminder. 2005-02-01 23:12:36 +00:00
Aapo Tahkola
b5c90ca7d9 Implement appropriate src checks for attribs/params. 2005-02-01 22:45:11 +00:00
Aapo Tahkola
b5128c6e82 Implemented bunch of ops. 2005-02-01 19:56:52 +00:00
Aapo Tahkola
7bccfa1026 Vertex programs work now with some restrictions. I expect arbvptorus to work
correctly when normals are delivered. Please note that some programs only
start in vb mode as there is something wrong in immediate mode vb code.
2005-02-01 16:56:52 +00:00
Vladimir Dergachev
5dd4030e76 Make WARN_ONCE messages more informative. 2005-02-01 15:51:54 +00:00
Vladimir Dergachev
6d419feec7 Reduce noiseness of the driver. 2005-02-01 15:46:23 +00:00
Vladimir Dergachev
88e155e353 Get alpha in textures to work properly. 2005-02-01 15:27:36 +00:00
Vladimir Dergachev
d4697b0997 Properly set ABLEND and CBLEND registers. The older code worked, but by accident. 2005-02-01 06:55:58 +00:00
Vladimir Dergachev
4a3c6095fc Looks like we can define FIRE_VERTICES correctly. 2005-02-01 05:59:00 +00:00
Vladimir Dergachev
0ab7fb56f5 It helps to print actual values instead of random ones. 2005-02-01 05:58:27 +00:00
Ian Romanick
c2803587b6 Small refactor. Move several utility functions from glX_XML.py to
FilterGLAPISpecBase (in gl_XML.py).  When these functions are used to emit
common #define lines, the will automatically be undefined in
FilterGLAPISpecBase::printFooter if header_tag is set (i.e., the file is a
header file).

These changes do not modify the generated code.
2005-02-01 00:28:47 +00:00
Ian Romanick
ba09c19ed6 Add GlxProto::createEnumFunction and add a 'context' parameter to the
glXEnumFunction constructor.  The allows sub-classes of GlxProto to
over-ride the concrete class used for glXEnumFunction.

In addition to tracking p_count_parameters in glParameter, break the comma
separated list of parameter names into a Python list called
count_parameter_list.  It is now possible to query if a name is the name of
one of the count parameters just by comparing
param.count_parameter_list.count(n) to zero.  Eventually the remaining uses
of p_count_parameters will be replaced with uses of count_parameter_list.

Make sure that 'void *' parameters are handled correctly in
glParameter::size_string.

Add PrintGlxReqSize_h and PrintGlxReqSize_c.  These classes emit prototypes
and functions used on the server-side to determine the expected size of an
incoming GL command.
2005-02-01 00:13:04 +00:00
Adam Jackson
886280763c Bug #2428: #ifdef GLX_DIRECT_RENDERING in DRI drivers is pointless. 2005-01-31 23:40:05 +00:00
Daniel Borca
fc4cabbfa8 makefile update (readtex, showbuffer) 2005-01-31 13:23:55 +00:00
Vladimir Dergachev
e61c8a5c63 Add magic sequence to prevent ClearBuffer from locking up.
Change Polygon.OffsetFill from fallback to warn once.
Quake demo now works, modulo texture rendering issues due to absent pixel shader pipeline.
2005-01-31 06:41:55 +00:00
Vladimir Dergachev
9c1773e505 Use SecondaryColorPtr, not ColorPtr[1] (the latter is NULL).
This fixes segfault in tuxracer-demo. It locks up after this though.
2005-01-31 02:52:59 +00:00
Vladimir Dergachev
15f108335a My bad, the old code works fine if updated to newer Mesa tree. 2005-01-30 22:16:28 +00:00
Vladimir Dergachev
0cd936c01f struct ati_fragment_shader was not defined anywhere, define it to get r300_vertexprog.c to compile. 2005-01-30 22:04:40 +00:00
Brian Paul
b55117042f fix max viewport query 2005-01-30 17:18:08 +00:00
Aapo Tahkola
29d021cd31 Fix for compiler warnings. 2005-01-30 11:12:59 +00:00
Dave Airlie
3aa69b39bf add number of passes count to ati_fragment_shader 2005-01-30 06:24:30 +00:00
Felix Kuehling
5ff53cb448 * Fixed uploading of textures of certain sizes.
* When glTexSubImageND is used, track the set of changed tiles in a
  bit vector and upload only dirty tiles later. This should improve
  the performance of dynamic light maps and gl movie player plugins.
* Renamed debug item "lru" to "tex". Indicate which levels are
  uploaded completely or partially.
2005-01-29 23:26:23 +00:00
hmarson
9ff3c49ef2 Added 0x4e54 (Thinkpad r50p) as PCI_CHIP_RV350_NP 2005-01-29 20:41:31 +00:00
Aapo Tahkola
941d6b008f Beginings of program generation. This code havent been tested nor hooked up. 2005-01-29 17:57:07 +00:00
Brian Paul
3bde211549 remove stray span.y++ 2005-01-29 17:28:45 +00:00
Brian Paul
98a9ad9241 added osmesa16 stuff 2005-01-29 13:48:43 +00:00
Brian Paul
371f576731 assorted fixes 2005-01-29 13:48:27 +00:00
Brian Paul
58f4d67703 fix initial viewport size bug 2005-01-29 13:36:15 +00:00
Brian Paul
c84cde7b0b added missing glFinish() 2005-01-29 12:57:36 +00:00
Aapo Tahkola
fbb478c946 Cleaning up. 2005-01-29 07:17:27 +00:00
Ian Romanick
16c3c74018 Refactor the code to emit multiple-inclusion protection to
FilterGLAPISpecBase.  Since the size_h mode of glX_proto_size.py will be
used to generate multiple header files, add an option to specify the define
that is used for multiple-inclusion protection.

The changes to the header files in this commit are just a side-effect of the
changes to the Python scripts.
2005-01-28 19:00:54 +00:00
Michal Krol
8d27148bbd move file 2005-01-28 18:39:26 +00:00
Ian Romanick
54584df8cc Properly annotate variable-length output parameters. Make sure that the
client-side code doesn't try to calculate the size of the output
parameters.  The server will tell the client how big it is.
2005-01-28 18:20:43 +00:00
Ian Romanick
20b8d9c1b9 Fix some get / set errors with COLOR_TABLE_*. SCALE and BIAS can be
parameters to GetColorTableParameter[if]v.  FORMAT, WIDTH, and the SIZE
enums cannot be parameters to ColorTableParameter[if]v.
2005-01-28 17:58:58 +00:00
Ian Romanick
fdb0527ddc Slightly modify the meaning of the 'handcode' attribute in a 'glx' element.
The attribute can now take one of 4 states.  "false" (the default value)
means that no handcoding is required for the function.  "client" means that
the function must be handcoded on the client-side only.  "server" means that
the function must be handcoded on the server-side only.  "true" menas that
the function must be handcoded on both the client-side and the server-side.

Version 1.14 of glX_proto_send.py accidentally contained a line of this
change.
2005-01-28 17:30:25 +00:00
Ian Romanick
1fca563232 Add an option to emit extra debug code in the generated protocol functions.
The debug version of indirect.c has proven very helpful during the
development of new client-side and server-side GLX protocol code.  This is
put here instead of in the DISPATCH and DISPATCH_RETURN macros in dispatch.c
for two reasons.

1. I only want the debug information when indirect-rendering is used.

2. Functions that require a reply from the server, some of which do not have
a return value (e.g., glFlush, glFinish, glGetLightfv, etc.), do not need
the extra glFinish call.
2005-01-28 16:51:01 +00:00
Aapo Tahkola
b365d28627 Fix wrong comment. 2005-01-28 11:59:37 +00:00
Aapo Tahkola
e451a95ecc Forgot one comment... 2005-01-28 10:08:00 +00:00
Aapo Tahkola
f856b3f10f Add basic sceleton for vertex programs + some other fixes 2005-01-28 09:57:06 +00:00
Ian Romanick
6398a97aff Mark a couple more function parameters as counters. 2005-01-27 19:50:59 +00:00
Ian Romanick
82e22f50f1 Add numerous 'get'-type functions to most of the enums supported by the
server-side GLX implementation.

Correct the protocol for EXT_convolution.  Several functions were
incorrectly listed as 'sop' that should have been 'vendorpriv'.

Remove TexParameter[if]v from the list of functions associated with
TEXTURE_RESIDENT.  The state associated with this enum is read-only.

Sort the enums by value for each particular size.  This ensures that the
signature is the same no matter what the ordering is of the enums in the XML
file.  The side effect is that there are some extra changes in
indirect_size.c.
2005-01-27 19:39:16 +00:00
Aapo Tahkola
d773598224 Add vector distance operator for vertex programs. 2005-01-27 04:42:52 +00:00
Ian Romanick
5aa6dc329b The 'mode' setting of a function within an 'enum' element is now used.
Parameters to glX_proto_size.py are now used to determine whether to emit
either get-type function, set-type functions, or both.  When only get-type
functions are emitted, they can optionally alias set-type functions.  This
would be useful if, for example, the two types were in different source
files.

The real work to implement this is in SizeStubFunctionIterator class.  All
of the logic for which functions to iterate and in which order is
implemented there.
2005-01-27 01:08:48 +00:00
Ian Romanick
5b0dd89370 remove a bunch of temporary #defines, now that glext.h was updated 2005-01-26 19:19:06 +00:00
Roland Scheidegger
a205137423 (Stephane Marchesin, me) Add support for color (framebuffer) tiling to the radeon and r200 driver 2005-01-26 18:05:03 +00:00
Roland Scheidegger
7104ce0a0e new version check to allow to test for a range of ddx major versions, instead of just one major version 2005-01-26 18:02:19 +00:00
Brian Paul
914746b400 remove a bunch of temporary #defines, now that glext.h was updated 2005-01-26 14:45:38 +00:00
Roland Scheidegger
0cbc25480f replace magic number with macro constant RADEON_ZBLOCK16 2005-01-26 14:20:14 +00:00
Brian Paul
8f029f175e just comments/clean-up 2005-01-26 14:02:50 +00:00
Brian Paul
7c58a00a50 added mutex to-do comment 2005-01-26 14:01:53 +00:00
Brian Paul
d01292bc54 just fix a comment and update date 2005-01-26 14:01:28 +00:00
Daniel Borca
b07390c8fd RGB/LUMINANCE texelfetchers (float version) returned 255.0F for alpha channel, instead of 1.0F 2005-01-26 09:47:32 +00:00
Ian Romanick
38e6e09cb8 Add a glFunctionIterator class to iterate over the functions stored in a
higher-level API object.  Use this type of object to implement the
printFunctions method.  Modify other functions that iterate over the list of
functions to use this type of object.
2005-01-25 23:53:13 +00:00
Aapo Tahkola
e4d41524a2 Fixes for clamp modes. 2005-01-25 19:09:23 +00:00
Brian Paul
f106493d8b Use the _mesa_HashNextEntry() function to walk over all textures in the
hash table.
Moving toward removing the gl_texture_object's Next pointer (only used by
glide and tdfx drivers).
2005-01-25 15:16:02 +00:00
Ian Romanick
01ec76dbd5 Stupid text editor...convert wayward tabs to spaces. 2005-01-25 01:36:32 +00:00
Ian Romanick
85f0fa3761 Add a "count" attribute to "enums" elements to set the default count
used for "size" sub-elements.  In the future the "count" attribute may
be removed completely from "size" sub-elements, so gl_API.xml was also
updated.

Support was added for a (currently unused) "mode" attribute for "size"
elements.  Basically, functions are marked as either "get" or "set".  This
will be used in generating size functions for the server-side (where the
"get" functions have to know how much data to return).  It could also be
used to help generate code for src/mesa/main/get.c.
2005-01-25 01:20:11 +00:00
Ian Romanick
cb59bd44db Correctly set the name of the generating script. 2005-01-24 22:07:00 +00:00
Ian Romanick
00772ac42f Move all the code for generating "size" related functions to its own
source file.
2005-01-24 21:56:05 +00:00
Ian Romanick
ad15f1bdea Correct some of the dependencies and clean things up a bit. 2005-01-24 21:43:29 +00:00
Ian Romanick
5ff2b94630 Remove glEnum::startElement, but refactor out some of the common code from
there and glXEnum::startElement to glEnum::process_attributes.
2005-01-24 21:29:13 +00:00
Ian Romanick
0246b2a5c0 Since only one of the places that used glXFunction::command_payload_length
actually used both values, it was refactored into command_fixed_length and
command_variable_length.  glXFunction::offset_of_first_parameter was also
added.
2005-01-24 20:59:32 +00:00
Ian Romanick
7f958e9e11 Make sure that functions added to gl_API.xml that do not have any GLX
section are marked as ignored.  Also ignore any functions that don't have
assigned dispatch offsets.

Fold Adam Jackson's changes to indirect_size.c into the generator scripts so
that they don't get lost.  "DO NOT EDIT" really means "DO NOT EDIT". ;)
2005-01-24 20:08:28 +00:00
Aapo Tahkola
f9f2db5132 border_color causes lockups with vertex buffers. Disabling for now. 2005-01-24 19:26:20 +00:00
Vladimir Dergachev
d7d54423a8 Remove lots of old code that dealed with "magic" texture formats. 2005-01-24 17:09:17 +00:00
Brian Paul
5c6b391900 reenable some assertions 2005-01-24 15:41:08 +00:00
Felix Kuehling
428a5e82fc Converted the Savage texture management to use Ian's common texmem code. 2005-01-24 01:15:12 +00:00
Brian Paul
c74ffb8266 Added _mesa_HashNextEntry() function to allow walking over all entries
in a hash table.
Added _mesa_test_hash_functions() for unit testing.
Updated comments, etc.
2005-01-24 00:20:23 +00:00
Dave Airlie
72e3664996 reapply Keiths workaround for zbs emit that got dropped during
state change patches....
2005-01-23 22:09:30 +00:00
Nicolai Haehnle
0b5a5a9efb Remove unused variables from r300_context 2005-01-23 17:35:05 +00:00
Nicolai Haehnle
4ced594aa8 Fix more warnings and compilation issues. 2005-01-23 17:28:04 +00:00
Nicolai Haehnle
cb77dcf0b9 Synchronize r300_reg.h.
Fix unportable whitespace before preprocessor commands.
2005-01-23 17:05:32 +00:00
Dave Airlie
150ed2e43d add sync debugging to the radeon driver 2005-01-23 06:27:08 +00:00
Adam Jackson
999534216d HAVE_ALIAS was never defined anywhere, add some logic to turn it on
automagically.
2005-01-23 03:54:38 +00:00
Adam Jackson
e82d5f2be9 silence makedepend warnings about non-portable whitespace 2005-01-23 02:12:23 +00:00
Felix Kuehling
8736c228cb Fixed initialization of draw destination to front buffer on single
buffered visuals. Also don't change span draw/read buffers in
savageDDDrawBuffer. Now glean's polygon offset test works (and PASSes
with fixed point depth buffer) with single buffered visuals without
winding up in an infinite loop.
2005-01-23 01:46:14 +00:00
Felix Kuehling
3b50f00433 My last attempt to fix polygon offsets with the reversed viewport depth
range used by the savage driver by negating ctx->MRD broke polygon
offsets with software fallbacks. This one adds a REVERSE_DEPTH parameter
to t_dd_tritmp.h (defaults to 0) that allows reversing polygon offsets
for hardware rendering but not for software fallbacks. For software
fallbacks depth values are reversed after polygon offsets have been
applied by the depth span functions.
2005-01-23 01:42:01 +00:00
Keith Whitwell
36a35c5614 Determine ahead of time whether a display list will include vertices
which have to be processed in the 'loopback' path.  If so, send
all vertices that way as the transition from playback->loopback has
several problems.
2005-01-22 14:38:00 +00:00
Vladimir Dergachev
8fca9bdc35 Properly configure routing - based on advice by Keith Whitwell. 2005-01-22 03:33:10 +00:00
Felix Kuehling
f4cafc8d13 Fixed polygon offset with reversed viewport depth range. 2005-01-22 00:52:31 +00:00
Vladimir Dergachev
4ac53aed6c Properly input stencil info contributed by Wladimir. 2005-01-21 21:30:55 +00:00
Brian Paul
1060211918 fix glGetString funniness 2005-01-21 16:35:56 +00:00
Michal Krol
308fbb7b64 add getstring.c; remove arb*.h nv*.h stuff 2005-01-21 15:55:13 +00:00
Michal Krol
8346c5ee1d add slang/traverse_wrap.h 2005-01-21 15:52:17 +00:00
Michal Krol
b39665950e Handy TIntermTraverser class wrapper 2005-01-21 15:51:28 +00:00
Alan Hourihane
e51b0b1d30 silence the 'using AGP/PCI' string unless VIA_DEBUG is used. 2005-01-21 09:50:48 +00:00
Felix Kuehling
fa15f6c840 Small cleanup:
* Remove some unused (mostly empty) functions
* Added context parameter to WAIT_IDLE_EMPTY[_LOCKED] for consistency
* Added debug messages to WAIT_IDLE_EMPTY[_LOCKED]
* Don't flush empty command buffers
2005-01-21 01:39:09 +00:00
Felix Kuehling
677d1d07c4 * Added options for disabling the fast path (render stage) and vertex DMA
* Fixed disabling of the render stage
* Added debug output for per-primitive fallbacks
* Bumped driver date
2005-01-20 15:18:10 +00:00
Brian Paul
14dee36fa7 glext.h version 26 2005-01-20 15:07:42 +00:00
Felix Kuehling
edb9a165c1 Added support for ELTS to the _savage_render_stage. Requires at least
Savage DRM version 2.2.0. Otherwise the render stage is disabled.
2005-01-20 13:59:49 +00:00
Alan Hourihane
ddfa61ee19 Enclose passed macro values in brackets to ensure correct read/write span
values.
2005-01-20 13:24:08 +00:00
Brian Paul
cb3bc2c49a document new glDeleteTextures/Buffers/Programs behaviour 2005-01-20 04:03:37 +00:00
Brian Paul
ea2943efd9 Update glDeletePrograms/Buffers() so that the ID is freed immediately, like
texture objects.
2005-01-20 04:02:02 +00:00
Brian Paul
36da0459e4 Use a simple CSS style sheet. 2005-01-20 03:55:10 +00:00
Brian Paul
10378919d7 Removed gl_texture_object's DeletePending. Changed a comment. 2005-01-19 21:41:24 +00:00
Brian Paul
31fb7648fc added texobjshare.c 2005-01-19 14:52:13 +00:00
Brian Paul
4f6d9aaa9a test program for texture sharing, deleting, etc 2005-01-19 14:51:41 +00:00
Brian Paul
42fee73aad Change behaviour of glDeleteTextures as discussed on ARB list.
glDeleteTexture makes the texture ID immediately free for re-use
while the actual texture object lingers until its reference count goes
to zero (when no longer bound by any rendering context).
2005-01-19 14:50:52 +00:00
Brian Paul
140f99f81c make sure the new instruction Data pointer is set to NULL 2005-01-19 14:45:23 +00:00
Brian Paul
7948bc02ed fix a typo 2005-01-19 14:44:55 +00:00
Brian Paul
4ef0e046ec minor formatting fix 2005-01-19 14:44:41 +00:00
Keith Whitwell
2aa34ea984 Bring the texcombine fixes to the trunk. 2005-01-19 12:09:33 +00:00
Keith Whitwell
bdb5725bab Always use ARGB8888 hardware texture format when mesa specifies
MESA_FORMAT_ARGB8888.  Previously attempted to use ARGB0888 under some
circumstances, but glean failed and demos/texenv.c was also incorrect.
2005-01-19 12:06:17 +00:00
Keith Whitwell
6931087958 Remove depend on make clean 2005-01-19 11:39:23 +00:00
Keith Whitwell
520e56f232 Depend tweaks 2005-01-19 11:10:27 +00:00
Daniel Borca
c98323bd89 make sure we avoid assertion failure wrt VB->ColorPtr[1]->stride 2005-01-19 07:57:52 +00:00
Daniel Borca
9ebce91a66 glVertex* is the provoking "cmd" (that is, by the time of glVertex*, we must have all other attributes already set).
i am committing this before i forget.  however, i'm still leaving my code disabled, because the old code seems legal.
2005-01-19 07:52:49 +00:00
Daniel Borca
59c2e16e75 There is no point trying to detect SSE at all, when MESA_NO_SSE is defined. I am committing this because the current WIN32 SSE detection code crashes UnrealTournament2003. 2005-01-19 07:43:13 +00:00
Brian Paul
c47d19a1a2 minor reorg of shader files, disable building for now 2005-01-18 22:58:13 +00:00
Alan Hourihane
41db4e1be5 remove some debug 2005-01-18 21:57:48 +00:00
Alan Hourihane
95be63771a Fix tristrips (which fixes coloredTexPerf2 & coloredLitPerf2 glean tests) 2005-01-18 15:06:01 +00:00
Michal Krol
4cfd97e3a8 remove #ifndef linux, it isnt defined on Linux, where should I define it? 2005-01-18 14:21:50 +00:00
Michal Krol
c57a312978 comment out _THROW calls, dont want to compile under Linux 2005-01-18 14:19:46 +00:00
Michal Krol
fa32c92ea5 add shader/slang/slang_mesa.cpp 2005-01-18 14:17:37 +00:00
Michal Krol
a885c7a6e0 change .cc suffix to .cpp 2005-01-18 14:16:51 +00:00
Michal Krol
619f006bba add slang preprocessor C sources; add slang include directories 2005-01-18 14:02:52 +00:00
Michal Krol
955190fbad fix // comments 2005-01-18 13:58:56 +00:00
Michal Krol
092af29ea1 fix MAX_VERTEX_ATTRIBS_ARB query 2005-01-18 12:04:53 +00:00
Keith Whitwell
af72b4dd8e Fix calculation of last_count in _tnl_wrap_buffers() 2005-01-18 08:41:55 +00:00
Brian Paul
7443c2caa6 added rule for compiling C++ sources 2005-01-17 22:33:50 +00:00
Michal Krol
db99b8b29d add slang/ directory tree 2005-01-17 16:25:08 +00:00
Brian Paul
ea28a5b5b3 use FABSF(fogCoord) to fix fog calculation problem (Soju Matsumoto) 2005-01-17 16:16:35 +00:00
Brian Paul
730fabd67a fix some weirdness accidentally checked in in the past 2005-01-17 16:14:46 +00:00
Michal Krol
7d079fd780 2005-oct-19 3dlabs slang compiler, tweaked a little bit 2005-01-17 16:01:49 +00:00
Michal Krol
cc9ab78158 slang to mesa compatibility, tested only under Windows 2005-01-17 15:52:20 +00:00
Michal Krol
434f622ede add 3dlabs_shhandle interface 2005-01-17 15:47:57 +00:00
Michal Krol
0a7ea2b0c3 add [.slang] to INCDIR, fix comma in OBJECTS 2005-01-17 15:35:46 +00:00
Michal Krol
389e292a1b add src/mesa/shader/slang to INCLUDE_DIRS 2005-01-17 15:32:25 +00:00
Daniel Borca
ff39c65dee cleaned up warnings 2005-01-17 08:05:47 +00:00
Daniel Borca
714c36c120 allow more internalFormat/format combinations (i hope i got it right) 2005-01-17 08:04:39 +00:00
Daniel Borca
d98c47300a fix compilation error for fx/Mesa 2005-01-17 08:02:42 +00:00
Daniel Borca
6a432a7c50 since we've already messed up this one, let we do it further and make it look like a fire... 2005-01-17 07:48:53 +00:00
Daniel Borca
a6ddd2494a remove trailing slash from TOP definition 2005-01-17 07:47:41 +00:00
Brian Paul
0a360cfab5 silence warning 2005-01-17 01:21:03 +00:00
Brian Paul
848ff85157 clean up gl2 structs 2005-01-17 01:07:00 +00:00
Brian Paul
fc3028d2c7 silence a bunch of warnings 2005-01-17 01:02:40 +00:00
Brian Paul
6c58ddae17 fix a few warnings 2005-01-17 00:40:29 +00:00
Brian Paul
b4199a1f71 added getstring.c 2005-01-16 19:42:46 +00:00
Brian Paul
5255044c00 added a few OpenGL 2.0 tokens (temporary) 2005-01-16 19:40:15 +00:00
Brian Paul
169a723d2b _mesa_GetInteger/Float/Boolean/Doublev() are now generated with the new
get_gen.py Python script.
Moved GetString(), GetPointer(), GetError() into new getstring.c file.
2005-01-16 19:39:10 +00:00
Brian Paul
c07ec046b7 make tnl_clipspace_attr->insert field const, to silence warning 2005-01-16 17:59:50 +00:00
Aapo Tahkola
14aea4a485 This fixes it but why mipmaps still work?
It doesnt look like filter constants in r300_reg.h would define number of
levels.
2005-01-16 17:07:24 +00:00
Aapo Tahkola
781d512a0b I was wrong... 2005-01-16 16:12:05 +00:00
Aapo Tahkola
82d1421736 Looks like masking masking t->filter isnt needed anymore.
texwrap still shows some problems with clamp mode with nearest filtering.
2005-01-16 13:28:49 +00:00
Felix Kuehling
ad360a81bd Added a fast path for emitting unclipped primitives directly to a
vertex buffer. ELTS are not supported yet (missing functionality in
the DRM). You need at least Savage DRM version 2.1.3, which fixes a
bug that screwed up triangle fans and strips.

Moved the texture normalization stage to savagerender.c.
2005-01-16 01:28:26 +00:00
Vladimir Dergachev
ca710a0a7f On the way to getting stencil working. 2005-01-15 20:44:23 +00:00
Vladimir Dergachev
76de160b64 On the way to getting stencil and texture formats working.
Looks like the matter of texture formats is a lot simpler, with the wrong
display in quake explained by the fact that we are not handling texture combine modes.
2005-01-15 19:33:19 +00:00
Felix Kuehling
b5f49e6f91 Converted to use spantmp2.h. 2005-01-15 14:37:33 +00:00
Felix Kuehling
c478a09a5b Use HW_READ_LOCK and HW_READ_UNLOCK in assembler-optimized span read
functions.
2005-01-15 14:35:35 +00:00
Vladimir Dergachev
dbb3ec35a7 Use symbolic constants to describe pixel shader ALU instructions. 2005-01-15 04:17:27 +00:00
Aapo Tahkola
ffe7496ac3 Added fixes for filter modes and support for anisotropy filters.
Wrap modes would work perfectly but i messed up something when cleaning up
the code :/ Border color code is incomplete because i forgot to check how to
set border size :)
2005-01-14 21:53:00 +00:00
Alan Hourihane
afa05e68b8 Enable line stippling. 2005-01-14 16:56:52 +00:00
Keith Whitwell
4ccee80190 Fix previously un-noticed issue with flat-shaded points. 2005-01-14 15:03:00 +00:00
Alan Hourihane
faf96a157d silence a warning 2005-01-14 13:11:34 +00:00
Alan Hourihane
42cfcce8d4 Get PolygonStipple working.. (or seemingly too). It seems to do the right
things now given the demos I've used and passes glean's paths test.
2005-01-14 13:10:50 +00:00
Alan Hourihane
38595eda39 16bpp doesn't support masked clears, so fallback when they're enabled. 2005-01-14 13:02:53 +00:00
Keith Whitwell
96d375c682 Populate WriteMonoDepthSpan in 24/8 modes. 2005-01-14 13:01:21 +00:00
Daniel Borca
404273ad09 changed coding style. made `glutTimerFunc' less accurate, but far more reliable. 2005-01-14 08:50:08 +00:00
Daniel Borca
0c68589673 changed coding style. added possibility to use default timer instead of PC/HW timer. 2005-01-14 08:44:29 +00:00
Daniel Borca
aa7a27b38e changed coding style. added a NULL pointer check. 2005-01-14 08:40:43 +00:00
Daniel Borca
7da875d55f changed coding style 2005-01-14 08:37:20 +00:00
Daniel Borca
f4bff83c32 doc update 2005-01-14 08:31:50 +00:00
Vladimir Dergachev
52f5ff525b Remove redundant register.
Hook up some functions in r300Enable().
2005-01-14 06:39:14 +00:00
Vladimir Dergachev
517ac1bf25 Reduce amount of stderr output.
Switch to using R300_EASY_TX_FORMAT() macro everywhere.
2005-01-14 05:26:17 +00:00
Vladimir Dergachev
2821b05a0f Incorporate latest data from Wladimir van der Laan. 2005-01-14 04:21:55 +00:00
Vladimir Dergachev
d2001bd88f Sync with master copy. 2005-01-13 23:13:52 +00:00
Dave Airlie
f11d6d4cb4 add -DUSE_EXTERNAL_DXTN_LIB=1 so compressed textures are enabled for solo 2005-01-13 22:38:21 +00:00
Alan Hourihane
288114b9db remove some dead texture code 2005-01-13 17:53:01 +00:00
Felix Kuehling
a7ab2b2e0b Make sure DMA buffers are released in savageDestroyContext. Usually
the DRM would reclaim DMA buffers, but if one process creates and
destroys many contexts it can still run out of DMA buffers.
2005-01-13 16:02:05 +00:00
Keith Whitwell
b1d322a1e7 Fix loop for quads-as-triangles. 2005-01-13 15:58:05 +00:00
Keith Whitwell
c06f8cb9e5 Rename via_fastrender_* to avoid confusion with similar functions in
via_render.c.
2005-01-13 15:49:39 +00:00
Keith Whitwell
a0371b0b3c Simplify viaChooseVertexState slightly. 2005-01-13 14:57:34 +00:00
Keith Whitwell
d9af44f358 Remove misleading comment. 2005-01-13 14:54:44 +00:00
Keith Whitwell
edd21a6f72 Typo 2005-01-13 14:52:24 +00:00
Keith Whitwell
db19ae89f2 Emit constant colors for texunit 1 blending.
Change comments and some code to match naming used in the docs.
2005-01-13 14:38:17 +00:00
Michal Krol
436f4bbd62 add s_atifragshader.c, s_atifragshader.h 2005-01-13 14:15:36 +00:00
Michal Krol
7f3e2dac7a 3dlabs glslang frontend 2005-01-13 14:14:55 +00:00
Michal Krol
302a414b34 3dlabs glslang frontend, not complete 2005-01-13 14:14:11 +00:00
Michal Krol
01d38cdf0c cosmetic changes 2005-01-13 14:13:19 +00:00
Michal Krol
6324f73b93 implement ARB_shader_objects, not complete 2005-01-13 14:12:50 +00:00
Michal Krol
8b7cc45f3d add atifragshader.c, shaderobjects.c, shaderobjects_3dlabs.c, atifragshader.h,
shaderobjects.h, shaderobjects_3dlabs.h
2005-01-13 14:12:01 +00:00
Michal Krol
b05e75bf69 add shaderobjects_3dlabs.c 2005-01-13 14:10:37 +00:00
Michal Krol
3d52858c78 add ARB_shader_objects interfaces, shared and context state 2005-01-13 14:09:58 +00:00
Michal Krol
0e85388ba8 enable ARB_fragment/vertex_shader 2005-01-13 14:09:18 +00:00
Michal Krol
9b3752c8ab init ARB_shader_objects subsystem 2005-01-13 14:08:47 +00:00
Michal Krol
8f8534f691 add shader/shaderobjects_3dlabs.c 2005-01-13 14:08:00 +00:00
Keith Whitwell
df14522540 cut out dead texture state code 2005-01-13 13:00:23 +00:00
Alan Hourihane
5bd6a5f2df revert some makecurrent code 2005-01-13 12:03:00 +00:00
Alan Hourihane
db93e6165e Fix glean scissor test 2005-01-13 10:20:16 +00:00
Vladimir Dergachev
d4330fc322 Prevent "disabling 3D acceleration" message from printing - we do not define raster functions anyway. 2005-01-13 09:08:58 +00:00
Vladimir Dergachev
d456ef48e5 Incorporate TX_FORMAT information contributed by Wladimir van der Laan.
Attempt to use it in r300_state.c
We are still missing something and the formats do not quite work.
Perhaps something in texture management code ?
2005-01-13 09:05:31 +00:00
Alan Hourihane
3ff4eca05c As we fallback for polygon stipple on the CLE266 for now, ensure we
don't turn on the polygon stipple hardware bit.
2005-01-13 00:15:28 +00:00
Alan Hourihane
cce4d5cb70 Use the faster span read/write template for 16bpp 2005-01-12 23:16:28 +00:00
Keith Whitwell
88440d2d75 Don't special-case 16bpp for colormask register - not needed. 2005-01-12 21:55:47 +00:00
Keith Whitwell
8e5281fbe1 Simplify usage of drmHash functions and fix bug in
__driGarbageCollectDrawables which would get confused while walking
the hash values.
2005-01-12 21:04:03 +00:00
Keith Whitwell
0aca086f7a free buffer in t_vertex_c.c on context delete 2005-01-12 19:38:41 +00:00
Keith Whitwell
8e46534b3b Remove bogus write to freed memory (valgrind). 2005-01-12 19:27:49 +00:00
Alan Hourihane
118b82145a Check for deletion of currently bound context
Other minor cleanups
2005-01-12 19:24:39 +00:00
Keith Whitwell
f9b89910d1 new test to exercise context and window create/delete 2005-01-12 19:11:47 +00:00
Alan Hourihane
7ea2084513 Fixes lockups initializing AGP DMA. 2005-01-12 18:32:51 +00:00
Keith Whitwell
4676a6ab7b Expand out the N(x) macro so that tags can find functions like
drmHashFirst(), etc.
2005-01-12 18:14:42 +00:00
Alan Hourihane
2937d403db build fixes and enable agp dma 2005-01-12 17:33:09 +00:00
Keith Whitwell
708e25142b Add flag to clear texture caches after texture upload. 2005-01-12 17:20:29 +00:00
Keith Whitwell
5ba7d85fea Don't emit HC_SubA_HSPXYOS on CLE266. 2005-01-12 17:20:08 +00:00
Keith Whitwell
09ac1d1125 Allow two GL primitives to be combined to one HW primitive
if possible.
2005-01-12 13:33:27 +00:00
Alan Hourihane
26dcb88fb9 Fix multitexturing.
The multiarb test works now when disabling texunit0/1.
2005-01-12 12:45:42 +00:00
Daniel Borca
a9531eb2c5 some "safer" type-punning (gcc optimizes float moves with integer moves, anyway). 2005-01-12 09:25:37 +00:00
Brian Paul
d7b837ad4a temporary prototypes for OpenGL 2.0 2005-01-12 04:06:55 +00:00
Brian Paul
2a34e66d6a OpenGL 2.0 StencilFunc/Op/MaskSeparate functions 2005-01-12 04:01:54 +00:00
Brian Paul
a9e34c68ac Some initial work for OpenGL 2.0: glStencilFunc/Op/MaskSeparate() functions. 2005-01-12 04:01:08 +00:00
Ian Romanick
591b72b6a9 Added a couple missing proxy types. 2005-01-11 23:50:01 +00:00
Aapo Tahkola
ff04e50e2e Mipmapping and other texture filters now work.
Beaware that R300_TX_MIN_FILTER_MASK might be incorrect because i havent
been able to confirm that all filters operate correctly. Because of this its
also pretty pointless trying to get other features that use filter field to
work.

Lod bias should also work but have been unable to test it because lodbias
test doesnt work.
2005-01-11 23:34:55 +00:00
Ian Romanick
d24e49f301 Put quotes around the CC and CXX variables passed to mklib. This make
them work with multi-work compiler names (e.g., "ccache gcc").
2005-01-11 22:43:45 +00:00
Alan Hourihane
5b28844dba fix a typo 2005-01-11 18:43:21 +00:00
Keith Whitwell
3bd6e3d532 Disable bogus pbuffer code (though this could be revived with a little
attention).
Correctly advertise FBConfigs with GL_BGRA rather than GL_BGR.
2005-01-11 17:12:48 +00:00
Alan Hourihane
5b5e6cc120 Fix the calculation of the alpha reference value which negates the
need for the big nasty fallback - so I've commented out that code.
2005-01-11 17:09:47 +00:00
Keith Whitwell
aac4d8857a Temporarily disable pageflipping assert. 2005-01-11 17:06:09 +00:00
Alan Hourihane
8e039bf40a uncomment 2005-01-11 16:44:18 +00:00
Alan Hourihane
f29aaf80a4 Fix ColorMask 2005-01-11 16:42:56 +00:00
Brian Paul
cdb6541634 prototype _mesa_init_ati_fragment_shader() 2005-01-11 15:56:47 +00:00
Michal Krol
43343913b9 aliasing was broken 2005-01-11 15:47:16 +00:00
Keith Whitwell
b13eaf2698 Add a big nasty fallback for AlphaTest -- seems to always be wrong
on CLE266 because Z values are written even for fragments which
fail the test.
2005-01-11 15:40:06 +00:00
Alan Hourihane
51365b2d0d fallback on polygon.stippleflag (thanks Keith) 2005-01-11 15:24:24 +00:00
Brian Paul
0275d921ac VMS updates from Jouk Jansen 2005-01-11 15:23:08 +00:00
Daniel Borca
94dd520210 applied Keith's patch for "safe" type-punning.
made IS_NEGATIVE produce a boolean (useful when xoring with other booleans).
2005-01-11 10:56:39 +00:00
Alan Hourihane
5358682aa7 Fix usage of texture units, when TEX1 is enabled, but not TEX0. 2005-01-11 09:52:10 +00:00
Vladimir Dergachev
0cb0a36d8c Get NeHe lesson08 to work. Note: it appears the filtering does not work properly. Need to find place where it is broken and put an fprintf() complaining about it. 2005-01-11 06:22:55 +00:00
Vladimir Dergachev
d5432ac584 Switch back to using immediate mode code - use of AGP space is interfering with texture management.
Ideally, r300_render is ready to be rewritten to use standard Mesa include files, but I don't think I'll get around to it.
2005-01-11 05:59:07 +00:00
Vladimir Dergachev
864137984a Move the few definitions from r300_lib.h still in use to r300_emit.h.
Rework *vb* function to not use AOS_ARRAY structure, but rather work directly with r300->state.aos.
Remove references to r300_lib.h and r300_lib.c
Remove r300_lib.[c,h].
2005-01-11 04:11:05 +00:00
Vladimir Dergachev
086ca3dffb Switch r300_state.c to use r300_fixed_pipelines.h instead of r300_lib.h.
This fixes potentially buggy memcpy()'s between potentially different structures.
2005-01-11 03:55:04 +00:00
Vladimir Dergachev
dd4837502c Copy sample pixel and vertex shaders to r300_fixed_pipelines.h 2005-01-11 03:50:04 +00:00
Brian Paul
14e98b7d7c remove a debug line 2005-01-10 23:16:49 +00:00
Brian Paul
ff53a4ee13 tweak output formattting, fixed uninitialized var error 2005-01-10 23:15:59 +00:00
Felix Kuehling
86f1439f82 Fixes to cope with the lack of AGP textures. This is all that's needed
to support PCI Savages on the Mesa side. Bumped driver date.
2005-01-10 22:49:00 +00:00
Alan Hourihane
9db66a3f9f Fallback on PolygonStipple for CLE266 hardware.
Only upload stencil configuration when a stencil buffer exists.
2005-01-10 19:44:59 +00:00
Brian Paul
eaf2b170ff Windows/ReactOS patch (Gregor Anich) 2005-01-10 16:23:21 +00:00
Keith Whitwell
574f3c7daf More changes to cope with color stride == 0 2005-01-10 14:36:25 +00:00
Keith Whitwell
a887a44b2d Fix segfault in pipes by dealing with stride == 0 case in generic_interp_extras 2005-01-10 12:30:08 +00:00
Vladimir Dergachev
8c231d2e28 Bring vertex buffer code up to date.. 2005-01-10 05:24:28 +00:00
Vladimir Dergachev
6867117b58 For some reason we need r300Flush when using textures. Perhaps the problem is
with BITBLT_MULTI call ?
2005-01-10 03:42:50 +00:00
Vladimir Dergachev
5f61c6f21f Clean up the code and make it unnecessary to issue extra calls to Setup*Shaders
in the r300_run_immediate_render function.
Bumps up glxgears fps count by about 100 points.
2005-01-10 03:22:54 +00:00
Vladimir Dergachev
8ad31013b2 Port EmitPixelShader from cmdbuf.c to SetupPixelShader in state.c. 2005-01-09 23:37:03 +00:00
Vladimir Dergachev
e9acd0ca5f Implement a more elaborate hashing scheme for texture formats. Still not perfect.
Transform EmitVertexShader in cmdbuf.c to SetupVertexShader in state.c.
The latter is only temporary and is to be rewritten to auto-generate shaders based on current GL context.
2005-01-09 22:38:53 +00:00
Brian Paul
527af7571e minor readtex fixes 2005-01-09 18:05:02 +00:00
Brian Paul
612bf1fa2e improved animation rate 2005-01-09 18:00:49 +00:00
Brian Paul
7a663b315e rotate at fixed rate, changed fire effect (Marcelo Magallon) 2005-01-09 17:52:48 +00:00
Brian Paul
a00c591511 rotate at fixed rate (Marcelo Magallon) 2005-01-09 17:50:27 +00:00
Brian Paul
a4a31c5d76 use #ifdef to test for extension 2005-01-09 17:39:36 +00:00
Brian Paul
2d84ed83c4 include readtex.h 2005-01-09 17:39:06 +00:00
Brian Paul
92eddb0fd4 better animate rate (Marcelo Magallon) 2005-01-09 17:37:50 +00:00
Brian Paul
516f9bc6e3 some new/improved rules 2005-01-09 17:26:08 +00:00
Brian Paul
575d24a5ff include readtex.h instead of readtex.c 2005-01-09 17:15:41 +00:00
Brian Paul
0fe7f406be include readtex.h instead of readtex.c (Marcello Magallon) 2005-01-09 17:06:22 +00:00
Brian Paul
b58091a336 Add #ifdefs for extension testing (Marcello Magallon) 2005-01-09 17:00:57 +00:00
Brian Paul
429efa9f00 animation rate patch (Marcello Magallon) 2005-01-09 16:52:53 +00:00
Brian Paul
1b058a06c2 rotate at a reasonable rate 2005-01-09 16:48:52 +00:00
Brian Paul
c1065ee977 compute reasonable animate rate (Marcelo Magallon) 2005-01-08 23:52:01 +00:00
Brian Paul
0261042beb fix-up rules for sphere demo, which uses readtex utility 2005-01-08 23:51:50 +00:00
Felix Kuehling
b45ce5c607 * Flush and wait in per-primitive fallback functions. Fixes flickering
stars in glplanet.
* Refactored vertex format choosing code. Improved the Savage4 version
  to choose a format suitable for DMA (size = 32bytes) whenever
  possible.
2005-01-08 23:39:19 +00:00
Felix Kuehling
e4499ed276 Added missing break; to fix infinite recursion between choose_emit_func
and emit_viewport4_bgra4_st2_st2.
2005-01-08 15:51:11 +00:00
Felix Kuehling
675b92515a Added state debugging option (SAVAGE_DEBUG=state).
Fixed: Use savageEmitChangedRegs instead of savageEmitContiguousRegs for
emitting Savage4.
2005-01-08 15:03:25 +00:00
Adam Jackson
1074eae704 Enable libGL to be built with DRI_NEW_INTERFACE_ONLY (but don't do it yet). 2005-01-08 03:54:38 +00:00
Adam Jackson
ccaa15a081 Parallel build fix. Multiword variables on the target side of a : get
expanded into individual rules for each word, so parallel builds will
start multiple instances to create the server/ symlinks and fail when they
already exist.
2005-01-08 03:16:04 +00:00
Keith Whitwell
f1481aa2d7 Add t_vb_cull.c (Bernard Blackham) 2005-01-07 18:35:28 +00:00
Keith Whitwell
f0e4f5e556 And fix the obvious bugs in higher-numbered templates. 2005-01-07 16:43:39 +00:00
Keith Whitwell
ae73b3d5ed Templatize the fastpaths. 2005-01-07 16:25:40 +00:00
Keith Whitwell
fa1362241b Add some more hardcoded fastpaths. 2005-01-07 15:54:48 +00:00
Keith Whitwell
5fff0c135d Cope with the possibility that incoming vectors may have
count < VB->Count.

Remove code to deal with the (should-be) impossible situation of null
input vectors.
2005-01-07 15:27:41 +00:00
Keith Whitwell
5911d87315 Use the 'to' vector to determine the loop count. 2005-01-07 15:26:02 +00:00
Keith Whitwell
e0be62e2c5 Remove -C flags for install which aren't universally supported. 2005-01-07 15:24:59 +00:00
Felix Kuehling
85243b8120 Fixed: ptex drawing functions were overridden with standard drawing
functions if ANY_RASTER_FLAGS|ANY_FALLBACK_FLAGS were set.
2005-01-07 10:55:13 +00:00
Keith Whitwell
b3d772bd9a Add a clean target to remove generated files. 2005-01-07 10:36:14 +00:00
Keith Whitwell
5cd24d4dc2 Add a noop install target 2005-01-07 10:35:51 +00:00
Keith Whitwell
8764441b58 Improve the semantics of the 'install' target to make sure the right
file is really being installed.  Useful if you have multiple versions
of a single driver directory hanging around and want to switch between
them for testing.
2005-01-07 10:35:23 +00:00
Keith Whitwell
000dd4afe2 Add an install target 2005-01-07 10:34:13 +00:00
Keith Whitwell
1837dda4d8 Make clean in the x86 directory.
Propogate 'install' target down to dri driver directory.
2005-01-07 10:34:00 +00:00
Ian Romanick
a11659adaf Use GNU AS label aliasing, if available. This must be enabled by adding
'-DHAVE_ALIAS' to DEFINES in the config file used for building.  On the
linux-dri-x86 build, this cuts 4KB from libGL.so.  HAVE_ALIAS is not
currently enabled in any of the configs.
2005-01-07 03:41:48 +00:00
Ian Romanick
0f34f3efb8 Script to generate rough GLX protocol documentation (as might be seen in
an extension spec).  It's not perfect, and it doesn't support certain
functions that other scripts here can (e.g., pixel functions).  However,
it is a good start and has already proven useful to me.
2005-01-07 03:23:59 +00:00
Ian Romanick
a285acbbef Track the GLX protocol names for GL types. 2005-01-07 03:22:56 +00:00
Ian Romanick
70d2f152f8 Refactor the code that converts a transpose-matrix enum to a
regular-matrix enum.
2005-01-07 02:53:04 +00:00
Ian Romanick
5f1f229f8d Pixel oriented render functions are now generated by the
glX_proto_send.py script.  This eliminates ~600 lines of non-generated
code.  With proper compiler optimization settings, it also decreases the
size of libGL.so by about 3KB.
2005-01-07 02:39:09 +00:00
Ian Romanick
3385d7cec3 The generic_*_byte functions did not rount the command size to a
multiple of 4 correctly in some cases.
2005-01-07 02:29:42 +00:00
Brian Paul
ba5ceda7e0 added GetAllFBConfigs() 2005-01-07 01:17:42 +00:00
Ian Romanick
7e3379b1a0 Revert some accidental cross-merge changes. Remove i915GetString. Migrate
a couple extensions that appeared in both device-specific card_extensions
strings to the shared one.
2005-01-07 00:48:24 +00:00
Brian Paul
71fc6a3fc9 New GetAllFBConfigs() function. Some FBConfigs weren't reported before. 2005-01-06 23:59:37 +00:00
Brian Paul
1f98ee9022 In choose_visual() we need to know if we're being called from
glXChooseVisual() or glXChooseFBConfig() so that we handle the
GLX_DOUBLEBUFFER and GLX_STEREO tokens correctly.
Added some new error checking in those functions too.
2005-01-06 21:56:16 +00:00
Aapo Tahkola
8bb717d2d5 Add radeon 9550 pci id. 2005-01-06 19:26:25 +00:00
Keith Whitwell
a61ee65910 Redraw on keypress, as apparently intended. 2005-01-06 17:12:56 +00:00
Alan Hourihane
a2db56b34b Add Intel i915GM support, and these extensions.
* GL_ARB_texture_cube_map
* GL_EXT_blend_equation_separate
* GL_ATI_blend_equation_separate
* GL_ARB_point_parameters
* GL_NV_blend_square
* GL_EXT_cull_vertex
* GL_ARB_depth_texture
* GL_SGIX_depth_texture
* GL_ARB_shadow
* GL_EXT_shadow_funcs
* GL_3DFX_texture_compression_FXT1
(Keith Whitwell, Tungsten Graphics)
2005-01-06 14:35:44 +00:00
Daniel Borca
9f149bf206 semantic in parameter names 2005-01-06 14:34:48 +00:00
Daniel Borca
d401faf877 semantic in parameter names. changed emitter function. 2005-01-06 14:09:18 +00:00
Thomas Hellström
4c1d373ce1 Small Unichrome fixes:
1. Unlock hardware before aborting and dumping DMA buffers. Otherwise display system may deadlock.
2. Fix DMA init IOCTL call that got mixed up in one of the previous commits.
3. Fix AGP command alignment
2005-01-06 13:51:37 +00:00
Daniel Borca
dd1ef7c0d7 semantic in parameter names 2005-01-06 07:46:37 +00:00
Daniel Borca
5135d37813 solved classic "char*" vs "char[]" conflict. we were mimicking a pointer variable at desired location and then we took its address. using array is more intuitive, as they give us the starting address instantly. 2005-01-06 07:45:17 +00:00
Daniel Borca
ed1fc20199 protected against elfish directives 2005-01-06 07:40:33 +00:00
Daniel Borca
9b7367154b semantic in parameter names 2005-01-06 07:38:28 +00:00
Daniel Borca
994d5cc5f4 removed detritus 2005-01-06 07:37:32 +00:00
Daniel Borca
7047cb08eb added "default" branch in `convertPalette' 2005-01-06 07:36:56 +00:00
Daniel Borca
50122c9d2d fix dstRGB factor 2005-01-06 07:35:46 +00:00
Vladimir Dergachev
e09c843c13 Turns out the kfountain.kss (as well as lesson19) had a bug - the size was set wrong. Fixed. 2005-01-06 04:39:51 +00:00
Vladimir Dergachev
91538b4432 Add texture format to get lesson19 working again. 2005-01-06 04:02:52 +00:00
Vladimir Dergachev
dbc125eede Switch to a more complicated scheme of choosing texture formats, as it looks
like the old one was prone to collisions (different value of format field was
required for same values of t->format going in).
Now use a hash for these purposes - this got kfiresaver.kss and lesson06 workingfrom the same code.
2005-01-06 03:56:18 +00:00
Ben Skeggs
7b51aa54be Added GL_POLYGON primitive. Single primitive between glBegin()/glEnd() now works. 2005-01-06 00:10:11 +00:00
Felix Kuehling
3e4d4aca77 * Fixed handling of scissors
* Only set scissor regs directly if drmMinor < 1
* Don't set texaddr to 0 when a texture unit is disabled. That would trigger
  the tightened texture state check in the DRM if the texaddr and texdesc
  registers were not emitted atomically.
2005-01-05 23:56:16 +00:00
Alan Hourihane
1e21673ea1 support 720x480 and 960x540 modes 2005-01-05 22:40:34 +00:00
Alan Hourihane
ee2761f2f3 Only try to free the front buffer when it's a pbuffer. 2005-01-05 21:49:52 +00:00
Keith Whitwell
699fc6baf9 Make the format of the fastpaths cleaner at the expense of a little
performance.

Add fastpaths for some more common vertex formats.
2005-01-05 20:56:05 +00:00
Alan Hourihane
609e54820c fix build problem 2005-01-05 20:13:04 +00:00
Keith Whitwell
99fc261c47 Improve some quad paths, gives gears a little boost. 2005-01-05 18:14:38 +00:00
Keith Whitwell
dd9666bc1d Give attributes with zero-stride a count of 1 to make it easier
to avoid transforming the same attribute multiple times.

Don't light a single normal multiple times in light_fast_rgba*
2005-01-05 18:06:05 +00:00
Keith Whitwell
30f6486276 make alloc-dma functions inline, rearrange some debug 2005-01-05 13:51:38 +00:00
Keith Whitwell
830e046972 Avoid a segfault in multiarb.c 2005-01-05 13:51:03 +00:00
Alan Hourihane
e3fe80a60f Bring VIA driver up-to-date with regard to drm_*_t changes and remove
the xf86drmVIA.[ch] files.

Bring in the IRQ handler and Ring buffer code, but ring buffer is disabled
as it is with the Xserver. It certainly locks up the CLE266.
2005-01-05 13:45:09 +00:00
Keith Whitwell
9a8a9fb01f Add a couple of hardwired fastpaths to t_vertex.c. 2005-01-05 12:58:14 +00:00
Keith Whitwell
d5b1605449 If there is only one normal, don't transform it multiple times. 2005-01-05 11:10:05 +00:00
Vladimir Dergachev
380ba2daec Reduce the amount of debug output, while still printing important messages.
Make guessing texture formats easier.
2005-01-05 04:56:23 +00:00
Vladimir Dergachev
e99f390ff6 Play a little bit with texture formats.
Get NeHe demos 06, 07 and 19 working.
2005-01-05 00:18:46 +00:00
Vladimir Dergachev
065f725672 Sync with master copy. 2005-01-04 22:52:53 +00:00
Vladimir Dergachev
6b185aaedf Port code from r200 that implements color blending. Seems to work.
This can be tested with lesson19 from NeHe.
This has also shown that the alpha code does not work - we pick up a red tint
for transparent pixels somewhere.
2005-01-04 20:25:11 +00:00
Vladimir Dergachev
55ee1daaf9 Unify rendering of textured and non-textured primitives. 2005-01-04 19:15:37 +00:00
Vladimir Dergachev
638faa92fc Major code restructuring:
* move proven code into the r300_state.c
  * update ClearBuffer to cope with more dynamic state
  * cleanup !
2005-01-04 18:59:47 +00:00
Brian Paul
85edffd5ff added GLX_NV_float_buffer 2005-01-04 14:48:14 +00:00
Brian Paul
932dee87e3 use HIDDEN macro to export fewer symbols (bug 2210) 2005-01-04 14:33:47 +00:00
Brian Paul
bdbdab837e directfb changes (Claudio Ciccani) 2005-01-04 14:19:25 +00:00
Keith Whitwell
6650264802 Add GL_EXT_fog_coord 2005-01-04 12:57:02 +00:00
Keith Whitwell
31c25f2edc Add GL_EXT_secondary_color 2005-01-04 12:56:17 +00:00
Keith Whitwell
e024cae14b Turn specular lighting state on/off appropriately. 2005-01-04 12:53:41 +00:00
Keith Whitwell
b6ab7a1bf1 Change to use the t_vertex.c mechanisms for building vertices,
including Felix's ptex code.

Re-enable some assembly for performance.
2005-01-04 12:18:05 +00:00
Brian Paul
f72e4424d9 Use the GLX 1.3 pbuffer/fbconfig functions in preference to the SGIX ones.
Added more functions to pbutil.[ch] to better isolate API differences.
2005-01-04 00:58:29 +00:00
Felix Kuehling
e3748eb19b Added support for floating point depth buffers on Savage4-based
hardware. By also reversing the depth range this can compensate the loss
of accuracy of far objects caused by the projective transformation.
Software fallbacks work but are slightly slower since floats in a custom
(non IEEE) format have to be encoded and decoded. I havn't done anything
about polygon offsets yet. There doesn't seem to be an easy way do get
it right except making the offset unit as big as the lowest resolution
of depth values. For now float depth is disabled by default but can be
enabled through driconf (though I have seen only positive effects so
far).
2005-01-03 22:24:44 +00:00
Felix Kuehling
87889aeab4 Added a boolean option for a floating-point depth buffer. 2005-01-03 22:15:41 +00:00
Ian Romanick
3276c192b7 The opcode and command length fields of RenderLarge commands were
mistakenly emitted in the wrong order.
2005-01-03 21:03:03 +00:00
Brian Paul
dd1a817c50 latest updates 2005-01-03 15:55:51 +00:00
Vladimir Dergachev
a5039af357 Add structs describing vertex and pixel shader state to r300_state.
Take apart program_pipeline() and move it into appropriate pieces within the driver.
Test the framework on run_flat_render()
2005-01-03 15:45:10 +00:00
Brian Paul
8e73b14228 bump version to 6.3, etc. 2005-01-03 15:36:27 +00:00
Brian Paul
81ca616e7e DirectFB driver (Claudio Ciccani) 2005-01-03 15:35:00 +00:00
Brian Paul
6563c16e38 updates from Jouk 2005-01-03 15:01:26 +00:00
Vladimir Dergachev
25faa2d56e Turns out I left flat primitives in vertex buffer mode. Switch them back to immediate which works correctly.. 2005-01-03 06:53:38 +00:00
Vladimir Dergachev
63473a8e76 Enable code to compute other constants that were used by R200 code.
Add fprintf to print these constants.
Correct t->size computation, so it works now.
2005-01-03 06:48:50 +00:00
Vladimir Dergachev
2fc9351ee7 Port texture allocation code from R200.
Hook it up, so lesson06 displays red colored textures.
2005-01-03 05:44:20 +00:00
Vladimir Dergachev
63fd67e561 Add texture units registers 2005-01-02 21:53:53 +00:00
Vladimir Dergachev
f50a1964d1 Cleanup !
I can not trigger any lockups now..
2005-01-02 06:16:44 +00:00
Vladimir Dergachev
d6be8dd651 I think I fixed the lockups issue. 2005-01-02 05:57:15 +00:00
Vladimir Dergachev
9a04b25c60 Get textures to work with NeHe lesson06.
The code is still disabled since we are displaying random image data instead of actual texture and because I had to put a sleep(1) in lesson06 drawing loop to prevent lockups.
2005-01-02 04:46:25 +00:00
Adam Jackson
3c80f5c56b linux-dri-x86 build fix from Andreas Stenglein. 2005-01-02 03:36:53 +00:00
Felix Kuehling
7a231da442 Improved the performance of software fallbacks by not waiting for idle
in every single span function. Instead flush and wait in the
SpanRenderStart hook and in wrappers around _swrast_Copy/Draw/ReadPixels.
Misc. cleanups in savagespan.c while I'm there.
2005-01-02 01:22:10 +00:00
Felix Kuehling
1067ce0cea Removed all direct hardware access (MMIO, BCI) from the Savage DRI
driver. It uses the new DRM version 2.0.x now, which has just been
committed to DRM CVS.
2005-01-01 20:40:14 +00:00
Felix Kuehling
467d64a177 Use DRM headers from $(DRM_SOURCE_PATH)/shared-core instead of .../shared. 2005-01-01 20:33:45 +00:00
Vladimir Dergachev
404d925b58 Add a convenience function to issue CP delays. 2005-01-01 18:41:43 +00:00
811 changed files with 116522 additions and 31035 deletions

View File

@@ -33,7 +33,11 @@ realclean:
install:
@echo "Installing"
$(TOP)/bin/installmesa
$(TOP)/bin/installmesa $(DESTDIR)
# DirectFBGL module installation
linux-directfb-install:
cd src/mesa/drivers/directfb && $(MAKE) install
# If there's no current configuration file
$(TOP)/configs/current:
@@ -78,10 +82,12 @@ linux \
linux-alpha \
linux-alpha-static \
linux-debug \
linux-directfb \
linux-dri \
linux-dri-x86 \
linux-dri-x86-64 \
linux-dri-ppc \
linux-fbdev \
linux-glide \
linux-icc \
linux-icc-static \
@@ -100,6 +106,7 @@ linux-ultrasparc \
linux-tcc \
linux-x86 \
linux-x86-debug \
linux-x86-32 \
linux-x86-64 \
linux-x86-64-static \
linux-x86-glide \
@@ -122,9 +129,9 @@ ultrix-gcc:
# Rules for making release tarballs
DIRECTORY = Mesa-6.2
LIB_NAME = MesaLib-6.2
DEMO_NAME = MesaDemos-6.2
DIRECTORY = Mesa-6.3
LIB_NAME = MesaLib-6.3
DEMO_NAME = MesaDemos-6.3
LIB_FILES = \
$(DIRECTORY)/Makefile* \
@@ -136,7 +143,6 @@ LIB_FILES = \
$(DIRECTORY)/configs/[a-z]* \
$(DIRECTORY)/docs/*.html \
$(DIRECTORY)/docs/COPYING \
$(DIRECTORY)/docs/INSTALL.GNU \
$(DIRECTORY)/docs/README.* \
$(DIRECTORY)/docs/RELNOTES* \
$(DIRECTORY)/docs/VERSIONS \
@@ -201,6 +207,8 @@ LIB_FILES = \
$(DIRECTORY)/src/mesa/drivers/beos/Makefile \
$(DIRECTORY)/src/mesa/drivers/common/*.[ch] \
$(DIRECTORY)/src/mesa/drivers/common/descrip.mms \
$(DIRECTORY)/src/mesa/drivers/directfb/*.[ch] \
$(DIRECTORY)/src/mesa/drivers/directfb/Makefile \
$(DIRECTORY)/src/mesa/drivers/dos/*.[chS] \
$(DIRECTORY)/src/mesa/drivers/dri/common/*.[ch] \
$(DIRECTORY)/src/mesa/drivers/fbdev/glfbdev.c \
@@ -270,7 +278,7 @@ LIB_FILES = \
$(DIRECTORY)/vms/xlib_share.opt
DEMO_FILES = \
GLUT_FILES = \
$(DIRECTORY)/include/GL/glut.h \
$(DIRECTORY)/include/GL/glutf90.h \
$(DIRECTORY)/src/glut/glx/Makefile* \
@@ -287,7 +295,10 @@ DEMO_FILES = \
$(DIRECTORY)/src/glut/dos/Makefile.DJ \
$(DIRECTORY)/src/glut/dos/PC_HW/*.[chS] \
$(DIRECTORY)/src/glut/ggi/*.[ch] \
$(DIRECTORY)/src/glut/ggi/Makefile \
$(DIRECTORY)/src/glut/ggi/Makefile
DEMO_FILES = \
$(DIRECTORY)/progs/beos/*.cpp \
$(DIRECTORY)/progs/beos/Makefile \
$(DIRECTORY)/progs/images/*.rgb \
@@ -344,7 +355,7 @@ lib_gz:
demo_gz:
cd .. ; \
tar -cvf $(DEMO_NAME).tar $(DEMO_FILES) ; \
tar -cvf $(DEMO_NAME).tar $(DEMO_FILES) $(GLUT_FILES) ; \
gzip $(DEMO_NAME).tar ; \
mv $(DEMO_NAME).tar.gz $(DIRECTORY)
@@ -357,7 +368,7 @@ lib_bz2:
demo_bz2:
cd .. ; \
tar -cvf $(DEMO_NAME).tar $(DEMO_FILES) ; \
tar -cvf $(DEMO_NAME).tar $(DEMO_FILES) $(GLUT_FILES) ; \
bzip2 $(DEMO_NAME).tar ; \
mv $(DEMO_NAME).tar.bz2 $(DIRECTORY)
@@ -371,7 +382,7 @@ lib_zip:
demo_zip:
-rm $(DEMO_NAME).zip ; \
cd .. ; \
zip -r $(DEMO_NAME).zip $(DEMO_FILES) ; \
zip -r $(DEMO_NAME).zip $(DEMO_FILES) $(GLUT_FILES) ; \
mv $(DEMO_NAME).zip $(DIRECTORY)
md5:

View File

@@ -12,7 +12,7 @@ TOP=.
INCLUDE_DIR="/usr/local/include"
LIB_DIR="/usr/local/lib"
if [ x$# == "x0" ] ; then
echo
echo "***** Mesa installation - You may need root privileges to do this *****"
echo
@@ -33,7 +33,6 @@ if [ x${INPUT} != "x" ] ; then
LIB_DIR=${INPUT}
fi
echo
echo "About to install Mesa header files (GL/*.h) in: " ${INCLUDE_DIR}/GL
echo "and Mesa library files (libGL.*, etc) in: " ${LIB_DIR}
@@ -41,6 +40,10 @@ echo "Press <Enter> to continue, or <ctrl>-C to abort."
read INPUT
else
INCLUDE_DIR=$1/include
LIB_DIR=$1/lib
fi
# flags:
# -f = force

View File

@@ -173,6 +173,15 @@ case $ARCH in
OPTS="${OPTS} -Xlinker --version-script=exptmp"
# exptmp is removed below
fi
# Check if objects are 32-bit and we're running in 64-bit
# environment. If so, pass -m32 flag to linker.
set ${OBJECTS}
ABI32=`file $1 | grep 32-bit`
if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then
OPTS="-m32 ${OPTS}"
fi
if [ x${PATCH} = "x" ] ; then
VERSION="${MAJOR}.${MINOR}"
else

View File

@@ -35,11 +35,11 @@ OSMESA_LIB = OSMesa
# Library names (actual file names)
GL_LIB_NAME = libGL.so
GLU_LIB_NAME = libGLU.so
GLUT_LIB_NAME = libglut.so
GLW_LIB_NAME = libGLw.so
OSMESA_LIB_NAME = libOSMesa.so
GL_LIB_NAME = lib$(GL_LIB).so
GLU_LIB_NAME = lib$(GLU_LIB).so
GLUT_LIB_NAME = lib$(GLUT_LIB).so
GLW_LIB_NAME = lib$(GLW_LIB).so
OSMESA_LIB_NAME = lib$(OSMesa).so
# Optional assembly language optimization files for libGL

View File

@@ -19,7 +19,7 @@ CXXFLAGS = $(DEFINES) -Wall -g -ansi -pedantic -fPIC
ASM_SOURCES =
# Library/program dependencies
DRI_LIB_DEPS = -lm -lpthread -lexpat
DRI_LIB_DEPS = -L/usr/local/lib -lm -lpthread -lexpat
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -pthread
GLUT_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -lGLU -lGL -lX11 -lXmu -lXt -lXi -lm

29
configs/linux-directfb Normal file
View File

@@ -0,0 +1,29 @@
# Configuration for DirectFB
include $(TOP)/configs/default
CONFIG_NAME = linux-directfb
# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -Wall -O3 -ffast-math -fPIC -std=c99 -D_GNU_SOURCE -D_POSIX_SOURCE -D_SVID_SOURCE \
-D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -DPTHREADS
CXXFLAGS = -Wall -O3 -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
HAVE_X86 = $(shell uname -m | grep 'i[3-6]86' >/dev/null && echo yes)
ifeq ($(HAVE_X86), yes)
CFLAGS += -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
CXXFLAGS += -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
ASM_SOURCES = $(X86_SOURCES) $(X86_API)
endif
# Directories
SRC_DIRS = mesa glu
DRIVER_DIRS = directfb
PROGRAM_DIRS = # disabled
# Library/program dependencies
GL_LIB_DEPS = -lm -lpthread

View File

@@ -14,9 +14,11 @@ MKDEP = /usr/X11R6/bin/makedepend
#MKDEP_OPTIONS = -MF depend
WARN_FLAGS = -Wall
OPT_FLAGS = -O -g
PIC_FLAGS = -fPIC
OPT_FLAGS = -O -g
PIC_FLAGS = -fPIC
# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support.
ARCH_FLAGS ?=
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
-D_BSD_SOURCE -D_GNU_SOURCE \
@@ -24,25 +26,25 @@ DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
X11_INCLUDES = -I/usr/X11R6/include -I/usr/X11R6/include/X11/extensions
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(ASM_FLAGS) -std=c99 $(PIC_FLAGS) -ffast-math \
$(DEFINES)
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
$(ASM_FLAGS) -std=c99 -ffast-math
CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) \
$(DEFINES)
CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
ASM_SOURCES =
# Library/program dependencies
DRI_LIB_DEPS = -lm -lpthread -lexpat -ldl
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lXxf86vm -lm -lpthread -ldl
EXTRA_LIB_PATH=-L/usr/X11R6/lib
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl
GLUT_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(LIB_DIR) -l$(GL_LIB) -lXt -lX11
# Directories
SRC_DIRS = mesa glu glut/glx glw glx/x11
SRC_DIRS = glx/x11 mesa glu glut/glx glw
DRIVER_DIRS = dri
PROGRAM_DIRS =
WINDOW_SYSTEM=dri

View File

@@ -1,40 +1,20 @@
# -*-makefile-*-
# Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others
include $(TOP)/configs/default
include $(TOP)/configs/linux-dri
CONFIG_NAME = linux-dri-x86-64
# Compiler and flags
CC = gcc
CXX = g++
DEFINES = -DDRI_NEW_INTERFACE_ONLY -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DPTHREADS -D_GNU_SOURCE -D__AMD64__
CFLAGS = -m64 -Wmissing-prototypes -g -std=c99 -Wundef -fPIC -ffast-math $(DEFINES)
CXXFLAGS = -m64 -Wall -g -ansi -pedantic -fPIC $(DEFINES)
X11_INCLUDES = -I/usr/X11R6/include -I/usr/X11R6/include/X11/extensions
#ASM_SOURCES = $(X86_SOURCES)
ARCH_FLAGS = -m64
LIB_DIR = $(TOP)/lib64
# Library/program dependencies
DRI_LIB_DEPS = -lm -lpthread -lexpat -ldl
GL_LIB_DEPS = -L/usr/X11R6/lib64 -lX11 -lXext -lXxf86vm -lm -lpthread -ldl
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib64 -lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib64 -lXt -lX11
EXTRA_LIB_PATH=-L/usr/X11R6/lib64
# Directories
SRC_DIRS = mesa glu glut/glx glw glx/x11
DRIVER_DIRS = dri
PROGRAM_DIRS =
WINDOW_SYSTEM=dri
# ffb, gamma, and sis are missing because they have
# not be converted to use the new interface. Do i810 & i830 really
# need to be included here?
# ffb, gamma, and sis are missing because they have not be converted to use
# the new interface. i810 and i830 are missing because there is no x86-64
# system where they could *ever* be used.
#
DRI_DIRS = dri_client i810 i830 i915 mach64 mga r128 r200 radeon tdfx unichrome savage
DRI_DIRS = dri_client i915 mach64 mga r128 r200 radeon tdfx unichrome savage

9
configs/linux-fbdev Normal file
View File

@@ -0,0 +1,9 @@
# Configuration for generic Linux
include $(TOP)/configs/linux
CONFIG_NAME = linux-fbdev
DRIVER_DIRS = fbdev
CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -DUSE_GLFBDEV_DRIVER

29
configs/linux-profile Normal file
View File

@@ -0,0 +1,29 @@
# Configuration for profiling on Linux with gprof
include $(TOP)/configs/default
CONFIG_NAME = linux-profile
# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -pg -O -ansi -pedantic -Wall -Wmissing-prototypes -Wundef -fPIC -ffast-math -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM -DPTHREADS -DDEBUG -DMESA_DEBUG
CXXFLAGS = -pg -O -ansi -pedantic -Wall -Wundef -fPIC -ffast-math -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -DDEBUG -DMESA_DEBUG
GLUT_CFLAGS = -fexceptions
# Need to have -L/usr/X11R6/lib in these:
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lXt -L/usr/X11R6/lib -lX11
# Need to make static libs for profiling:
MKLIB_OPTIONS = -static
GL_LIB_NAME = lib$(GL_LIB).a
GLU_LIB_NAME = lib$(GLU_LIB).a
GLUT_LIB_NAME = lib$(GLUT_LIB).a
GLW_LIB_NAME = lib$(GLW_LIB).a
OSMESA_LIB_NAME = lib$(OSMesa).a
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lpthread

View File

@@ -8,15 +8,12 @@ CONFIG_NAME = linux-solo
CC = gcc
CXX = g++
DEFINES = -DDRI_NEW_INTERFACE_ONLY -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=199309L -D_GNU_SOURCE
DEFINES = -DDRI_NEW_INTERFACE_ONLY -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=199309L -D_GNU_SOURCE -DUSE_EXTERNAL_DXTN_LIB=1 -DDRM_USE_MALLOC
CFLAGS = $(DEFINES) -Wmissing-prototypes -g -std=c99 -Wundef -fPIC -ffast-math
CXXFLAGS = $(DEFINES) -Wall -O3 -ansi -pedantic -fPIC
ASM_SOURCES = $(X86_SOURCES)
# Library/program dependencies
DRI_LIB_DEPS = -lm -lpthread -lexpat -ldl
GL_LIB_DEPS = -lm -lpthread -ldl
@@ -30,4 +27,4 @@ DRIVER_DIRS = dri
PROGRAM_DIRS = miniglx
#DRI_DIRS = fb ffb gamma sis savage
DRI_DIRS = i810 i830 i915 mach64 mga r128 r200 radeon tdfx unichrome
DRI_DIRS = i810 i830 i915 mach64 mga r128 r200 radeon tdfx unichrome fb

View File

@@ -8,7 +8,7 @@ CONFIG_NAME = linux-solo-ia64
CC = gcc
CXX = g++
DEFINES = -DDRI_NEW_INTERFACE_ONLY -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=199309L -D_GNU_SOURCE
DEFINES = -DDRI_NEW_INTERFACE_ONLY -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=199309L -D_GNU_SOURCE -DDRM_USE_MALLOC
CFLAGS = $(DEFINES) -Wmissing-prototypes -g -std=c99 -Wundef -fPIC -ffast-math

View File

@@ -8,7 +8,7 @@ CONFIG_NAME = linux-solo-x86
CC = gcc
CXX = g++
DEFINES = -DDRI_NEW_INTERFACE_ONLY -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=199309L -D_GNU_SOURCE -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS
DEFINES = -DDRI_NEW_INTERFACE_ONLY -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=199309L -D_GNU_SOURCE -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DDRM_USE_MALLOC
CFLAGS = $(DEFINES) -Wmissing-prototypes -O3 -g -std=c99 -Wundef -fPIC -ffast-math

13
configs/linux-x86-32 Normal file
View File

@@ -0,0 +1,13 @@
# To build Linux x86 32-bit in an x86-64 environment
include $(TOP)/configs/linux-x86
CONFIG_NAME = linux-x86-32
# Other than -m32, these are the same as in linux-x86, which we included above.
CFLAGS = -m32 -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include
CXXFLAGS = -m32 -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE

View File

@@ -8,9 +8,9 @@ CONFIG_NAME = linux-x86-64
CC = gcc
CXX = g++
CFLAGS = -m64 -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -D__AMD64__ -I/usr/X11R6/include
CFLAGS = -m64 -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include
CXXFLAGS = -m64 -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -D__AMD64__
CXXFLAGS = -m64 -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
GLUT_CFLAGS = -fexceptions

View File

@@ -8,9 +8,9 @@ CONFIG_NAME = linux-x86-64-static
CC = gcc
CXX = g++
CFLAGS = -m64 -Wall -O3 -ansi -pedantic -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -D__AMD64__ -I/usr/X11R6/include
CFLAGS = -m64 -Wall -O3 -ansi -pedantic -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include
CXXFLAGS = -m64 -Wall -O3 -ansi -pedantic -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -D__AMD64__
CXXFLAGS = -m64 -Wall -O3 -ansi -pedantic -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
GLUT_CFLAGS = -fexceptions

View File

@@ -13,7 +13,9 @@ all :
if f$search("lib.dir") .eqs. "" then create/directory [.lib]
set default [.src]
$(MMS)$(MMSQUALIFIERS)
set default [-.progs.demos]
set default [-.progs.util]
$(MMS)$(MMSQUALIFIERS)
set default [-.demos]
$(MMS)$(MMSQUALIFIERS)
set default [-.xdemos]
$(MMS)$(MMSQUALIFIERS)

View File

@@ -1,182 +0,0 @@
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
CPU-COMPANY-SYSTEM
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
==================
`configure' recognizes the following options to control how it
operates.
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.

View File

@@ -113,14 +113,10 @@ FAQ:
at peak performance ;-).
Q) I'm getting a "bad font!" fatal error.
A) By default, DOS GLUT compiles with GLUT_IMPORT_LIB, to cope with variable
access inside dynamic modules (same mechanism used for Win32 _DLL). Since
-DGLUT_IMPORT_LIB affects Mesa's `glut.h', your apps must be compiled the
same way GLUT was compiled (either with or without defining it). If you
want to use another `glut.h' when building your own demos, or just don't
feel happy about this, make sure you remove the line with GLUT_IMPORT_LIB
from `Mesa/src/glut/dos/Makefile.DJ' before (re)making GLUT. Beware, this
means you will never EVER be able to safely use `glut.dxe'!
A) Always use GLUT_STROKE_* and GLUT_BITMAP_* constants when dealing with
GLUT fonts. If you're using `glut.dxe', then make sure GLUT_STROKE_* and
GLUT_BITMAP_* are mapped to integer constants, not to the actual font
address (same mechanism used for Win32 _DLL).
Q) What is NUL driver good for, if I don't get any output at all?
A) For debugging. The NUL driver is very much like OSMesa. Everything is
@@ -265,7 +261,9 @@ v1.6 (aug-2004)
v1.7 (???-2005)
+ enabled OpenGL 2.0 support
+ added support for sw texture compression
* minor rework
+ added FreeGLUT specific functions
* no more GLX sources in DOS GLUT
* made GLUT timer callbacks less accurate but safer

28
docs/README.directfb Normal file
View File

@@ -0,0 +1,28 @@
Mesa DirectFB Information
Requirements
============
To build Mesa with DirectFB (DirectFBGL) support you need:
- DirectFB at least 0.9.21 (http://directfb.org)
- pkg-config at least 0.9 (http://pkgconfig.sf.net)
Installation
============
Run
make linux-directfb
to build Mesa and DirectFBGL module,
make install
to install OpenGL libraries and
make linux-directfb-install
to install DirectFBGL module in the proper location.

View File

@@ -25,6 +25,41 @@ GL_ARB_draw_buffers - allows a fragment program to write to a number of
GL_OES_read_format - allows one to query the fastest glReadPixels format
and datatype.
GL_ARB_pixel_buffer_object - buffer objects for pixel read/write functions.
DirectFB driver, contributed by Claudio Ciccani. See docs/README.directfb
for details.
Vertex/Fragment Program PRINT Instruction
-----------------------------------------
The GL_NV_vertex_program and GL_NV_fragment_program languages have been
extended with a PRINT instruction.
glDeleteTextures(), glDeletePrograms() and glDeleteBuffers() Changed
--------------------------------------------------------------------
To match the behaviour of other OpenGL implementations, glDeleteTextures,
glDeletePrograms and glDeleteBuffers have been modified so that:
* The named texture/program/buffer ID is immediately freed for re-use.
* The actual texture object, program or buffers isn't really deleted until
it is no longer bound in any rendering context (the reference count
is zero).
Previously, the texture/program/buffer ID wasn't freed until the object
was really deleted.
Note that textures, programs and buffers can be shared by several rendering
contexts so they can't be deleted until they're unbound in _all_ contexts.
To Do before release
@@ -36,6 +71,12 @@ To Do before release
Miscellaneous
-------------
The main/get.c file is now generated with a Python script.
Driver Status
---------------------- ---------------------
@@ -53,4 +94,4 @@ D3D needs updating
----------------------------------------------------------------------
$Id: RELNOTES-6.3,v 3.6 2004/12/09 23:21:36 brianp Exp $
$Id: RELNOTES-6.3,v 3.8 2005/01/20 04:03:37 brianp Exp $

View File

@@ -1317,11 +1317,15 @@ Mesa Version History
6.3 Month day, 2004
New:
- GL_ARB_draw_buffers extension
- GL_ARB_pixel_buffer_object extension
- GL_OES_read_format extension (Ian Romanick)
- full support for GL_EXT_pixel_buffer_object (convolution filters,
polygon stipple, colormaps, etc)
- DirectFB driver (Claudio Ciccani)
Changes:
- added -stereo option for glxgears demo (Jacek Rosik)
- updated the PBuffer demo code in xdemos/ directory
- glDeleteTextures/Programs/Buffers() now makes the object ID
available for immediate re-use
Bug fixes:
fixes from 6.2.1, plus:
-
- some functions didn't support PBO functionality
- glGetTexImage didn't convert color index images to RGBA as required

View File

@@ -2,7 +2,9 @@
<TITLE>Mesa Bug Reporting</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Bug Database</H1>

View File

@@ -2,7 +2,9 @@
<TITLE>Conformance</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Conformance</H1>

View File

@@ -2,7 +2,26 @@
<title>Contents</title>
<body text="#ffffff" bgcolor="#119955" link="#ffffff" vlink="#dddddd" alink="#ffffff">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<body bgcolor="#119955">
<!--Override a few values from the style sheet: -->
<style>
<!--
body {
background-color: #119955;
color: white;
}
a:link {
color: #fff;
}
a:visited {
color: #ccc;
}
-->
</style>
<b>Documentation</b>
<ul>
@@ -53,7 +72,6 @@
<li><a href="utilities.html" target="MainFrame">Utilities</a>
<li><a href="helpwanted.html" target="MainFrame">Help Wanted</a>
<li><a href="devinfo.html" target="MainFrame">Development Notes</a>
<li><a href="drivers.html" target="MainFrame">Writing Device Drivers</a>
<li><a href="sourcedocs.html" target="MainFrame">Source Documentation</a>
<li><a href="subset.html" target="MainFrame">Subset Information</a>
<li><a href="fbdev-dri.html" target="MainFrame">fbdev/DRI Environment</a>

View File

@@ -2,7 +2,9 @@
<TITLE>Custom Development</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Custom Development</H1>

View File

@@ -2,7 +2,9 @@
<TITLE>CVS Access</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<h1>CVS Access</h1>
@@ -65,9 +67,11 @@ Here are the basic instructions for Unix systems:
Mesa developers working with the Mesa CVS repository need to first
have an account on <a href="http://www.freedesktop.org" target="_parent">
freedesktop.org</a>.
You can request an account from either
<a href="mailto:dstone@trinity.unimelb.edu.au">Daniel Stone</a> or
<a href="mailto:eta@lclark.edu">Eric Anholt</a>.
To get an account, please ask Brian or the other Mesa developers for
permission.
Then, if there are no objections, follow this
<a href="http://www.freedesktop.org/wiki/AccountRequests" target="_parent">
procedure</a>.
</p>
<p>

View File

@@ -2,7 +2,9 @@
<TITLE>CVS Branches</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>CVS Branch Information</H1>

View File

@@ -2,7 +2,9 @@
<TITLE>Debugging Tips</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Debugging Tips</H1>

View File

@@ -2,7 +2,9 @@
<TITLE>Demos</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Demos</H1>

View File

@@ -2,7 +2,9 @@
<TITLE>Development Notes</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Development Notes</H1>

View File

@@ -2,7 +2,9 @@
<TITLE>Getting Mesa</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Downloading / Unpacking</H1>

View File

@@ -2,7 +2,9 @@
<TITLE>Environment Variables</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Environment Variables</H1>

View File

@@ -2,7 +2,9 @@
<TITLE>Mesa Extensions</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Mesa Extensions</H1>

View File

@@ -2,7 +2,9 @@
<head><title>Mesa FAQ</title></head>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<center>

View File

@@ -2,7 +2,9 @@
<TITLE>Mesa fbdev/DRI Environment</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<center><H1>Mesa fbdev/DRI Drivers</H1></center>

View File

@@ -2,7 +2,9 @@
<TITLE>Games</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Games</H1>

View File

@@ -2,7 +2,9 @@
<TITLE>Mesa glFBDev Driver</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<center><H1>Mesa glFBDev Driver</H1></center>

View File

@@ -2,7 +2,9 @@
<TITLE>SGI GLU</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>SGI SI GLU</H1>

View File

@@ -2,59 +2,71 @@
<TITLE>Help Wanted</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Help Wanted</H1>
<p>
We can always use more help with the Mesa project. Here are some
specific areas. If you think you can help out, post to the mesa3d-dev
mailing list.
We can always use more help with the Mesa project.
Here are some specific ideas and areas where help would be appreciated:
</p>
<ul>
<li>Windows 98/NT build/driver maintenance and testing (Karl Schultz has been
doing a great job of this lately)
<li>DOS/DJGPP build/driver maintenance and testing
<li>GGI driver/build maintenance and testing
<li>GNU autoconfig/libtool maintenance (esp. on non-Linux systems)
<li>x86, SSE, 3DNow! and SPARC assembly language programming
<li>Implement WGL font functions in the WGL interface code
<li>Implement off-screen bitmap rendering support in the WGL interface code
<li>Help with writing/testing the new NV_fragment_program extension code
<li>Implement the ARB_vertex/fragment extensions
<li>Download/compile/test Mesa and report any bugs found
</ul>
<ol>
<li><p>
Generate the src/mesa/main/enums.c file with a Python script which
uses the gl_API.xml file.
</p>
<li><p>
Try to auto-generate the display list "save" functions seen in dlist.c
using a Python script and the gl_API.xml file.
The gl_API.xml file will probably need a new tag to indicate whether or
not each function gets compiled into display lists.
</p>
<li><p>
Maintenance of assembly language files on Linux, Windows and SPARC systems.
</p>
<li><p>
Help to incorporate the 3Dlabs' shading language compiler for OpenGL 2.0.
</p>
<li><p>
Implement assembly language (SSE/MMX) code generation for
vertex/fragment programs.
</p>
<li><p>
Windows 98/NT driver building, maintenance and testing
(Karl Schultz has been doing a great job of this lately).
</p>
<li><p>
Maintenance and testing of various drivers, such as DOS/DJGPP, GGI, etc.
</p>
<li><p>
Write new tests for Glean.
</p>
</ol>
<p>
If you want to help with Mesa, first join the Mesa developer's
mailing list. Then post a message explaining what you might like
to help with. The Mesa web page has a list of a few work items
which you may consider.
mailing list.
Then post a message to propose what you want to do, just to make sure
there's no issues.
</p>
</p>
Anyone is welcome to contribute code to the Mesa project, provided you
agree to the copyright terms of the relevant code. See the COPYRIGHT
file.
Anyone is welcome to contribute code to the Mesa project.
By doing so, it's assumed that you agree to the code's licensing terms.
</p>
<p>
Unfortunately, all the easy work in Mesa was done years ago. Nowadays, the
work is rather complicated and not suited to beginners.
</p>
Finally:
<p>
<p>
If you're contribution code to the Mesa library itself:
<p>
<ol>
<li>Try to write clean code (uniform indentation, comments, meaningful
identifiers, etc). It must be readable and maintainable!
<li>Test your code. On several occations I've incorporated code from
users which later turned out to have bugs. Now, I'm pretty hesitant
to use code which doesn't look good.
<li>Try to write high-quality code that follows the existing style.
<li>Use uniform indentation, write comments, use meaningful identifiers, etc.
<li>Test your code thoroughly. Include test programs if appropriate.
</ol>

View File

@@ -13,10 +13,7 @@
<noframes>
<BODY>
<P>
<body>
</body>
</noframes>

View File

@@ -2,7 +2,9 @@
<TITLE>Compilation and Installation</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Compilation and Installation</H1>

View File

@@ -2,7 +2,9 @@
<TITLE>Mesa Introduction</TITLE>
<BODY text="#000000" bgcolor="#55bbff">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Introduction</H1>

View File

@@ -2,7 +2,9 @@
<TITLE>Libraries and Toolkits</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Libraries and Toolkits</H1>

View File

@@ -2,7 +2,9 @@
<TITLE>License / Cppyright Information</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>License / Copyright Information</H1>

View File

@@ -2,7 +2,9 @@
<TITLE>Mesa Mailing Lists</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Mailing Lists</H1>

View File

@@ -2,7 +2,9 @@
<TITLE>Function Name Mangling</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Function Name Mangling</H1>

35
docs/mesa.css Normal file
View File

@@ -0,0 +1,35 @@
/* Mesa CSS */
body {
background-color: #55bbff;
font: 14px 'Lucida Grande', Geneva, Arial, Verdana, sans-serif;
color: black;
link: #111188;
}
h1 {
background-color: #55bbff;
font: 24px 'Lucida Grande', Geneva, Arial, Verdana, sans-serif;
font-weight: bold;
color: black;
}
h2 {
background-color: #55bbff;
font: 18px 'Lucida Grande', Geneva, Arial, Verdana, sans-serif, bold;
font-weight: bold;
color: black;
}
code {
font-family: monospace;
font-size: 10pt;
color: black;
}
pre {
/*font-family: monospace;*/
font-size: 10pt;
/*color: black;*/
}

View File

@@ -2,7 +2,9 @@
<TITLE>Modelers, Renderers and Viewers</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Modelers, Renderers and Viewers</H1>

View File

@@ -2,7 +2,9 @@
<TITLE>Mesa News</TITLE>
<BODY text="#000000" bgcolor="#55bbff">
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>News</H1>
@@ -958,6 +960,6 @@ source code</a>.</p>
<hr>
$Id: news.html,v 3.16 2004/12/09 23:21:36 brianp Exp $
$Id: news.html,v 3.18 2005/05/04 20:05:21 brianp Exp $
</body>
</html>

View File

@@ -2,7 +2,9 @@
<TITLE>Off-screen Rendering</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Off-screen Rendering</H1>

View File

@@ -2,7 +2,9 @@
<TITLE>PBuffer Rendering</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>PBuffer Rendering</H1>

View File

@@ -2,7 +2,9 @@
<TITLE>Performance Tips</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Performance Tips</H1>

View File

@@ -2,7 +2,9 @@
<TITLE>Precompiled libraries</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Precompiled Libraries</H1>

View File

@@ -2,7 +2,9 @@
<TITLE>Mesa Release Notes</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Release Notes</H1>

View File

@@ -2,7 +2,9 @@
<TITLE>Science and Technical</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Science and Technical</H1>

View File

@@ -2,7 +2,9 @@
<TITLE>Source Code Documentation</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Source Code Documentation</H1>

View File

@@ -2,7 +2,9 @@
<TITLE>Mesa Subset</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Mesa Subset</H1>

View File

@@ -2,7 +2,9 @@
<TITLE>Supported Systems and Drivers</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Supported Systems and Drivers</H1>

View File

@@ -4,7 +4,9 @@
<TITLE>Acknowledgements</TITLE>
</HEAD>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Acknowledgments</H1>

View File

@@ -2,7 +2,9 @@
<TITLE>Development Utilities</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Development Utilities</H1>

View File

@@ -2,7 +2,9 @@
<TITLE>Utilities</TITLE>
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Utilities</H1>

View File

@@ -2,7 +2,9 @@
<TITLE>Mesa Introduction</TITLE>
<BODY text="#000000" bgcolor="#55bbff">
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Webmaster</font></H1>

89
include/GL/directfbgl.h Normal file
View File

@@ -0,0 +1,89 @@
/*
(c) Copyright 2001 convergence integrated media GmbH.
All rights reserved.
Written by Denis Oliver Kropp <dok@convergence.de> and
Andreas Hundt <andi@convergence.de>.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef __DIRECTFBGL_H__
#define __DIRECTFBGL_H__
#include <directfb.h>
#ifdef __cplusplus
extern "C"
{
#endif
typedef struct {
int buffer_size;
int depth_size;
int stencil_size;
int aux_buffers;
int red_size;
int green_size;
int blue_size;
int alpha_size;
int accum_red_size;
int accum_green_size;
int accum_blue_size;
int accum_alpha_size;
DFBBoolean double_buffer;
DFBBoolean stereo;
} DFBGLAttributes;
DEFINE_INTERFACE( IDirectFBGL,
/** Context handling **/
/*
* Acquire the hardware lock.
*/
DFBResult (*Lock) (
IDirectFBGL *thiz
);
/*
* Release the lock.
*/
DFBResult (*Unlock) (
IDirectFBGL *thiz
);
/*
* Query the OpenGL attributes.
*/
DFBResult (*GetAttributes) (
IDirectFBGL *thiz,
DFBGLAttributes *attributes
);
)
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -62,6 +62,9 @@
#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
# define GLAPI extern
# define GLAPIENTRY __stdcall
#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
# define GLAPI __attribute__((visibility("default")))
# define GLAPIENTRY
#endif /* WIN32 && !CYGWIN */
#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__)
@@ -2210,11 +2213,11 @@ GLAPI void GLAPIENTRY glTracePointerRangeMESA( const GLvoid* first, const GLvoid
typedef void (*GLprogramcallbackMESA)(GLenum target, GLvoid *data);
extern void
GLAPI void GLAPIENTRY
glProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback,
GLvoid *data);
extern void
GLAPI void GLAPIENTRY
glGetProgramRegisterfvMESA(GLenum target, GLsizei len, const GLubyte *name,
GLfloat *v);
@@ -2232,16 +2235,122 @@ typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLen
#endif /* GL_ATI_blend_equation_separate */
/* As soon as the official glext.h is updated to include this, it will be
* removed from here.
*/
#ifndef GL_OES_read_format
#define GL_OES_read_format 1
/* XXX this is temporary here! */
#ifndef GL_EXT_framebuffer_object
#define GL_EXT_framebuffer_object
GLAPI GLboolean GLAPIENTRY
glIsRenderbufferEXT(GLuint renderbuffer);
GLAPI void GLAPIENTRY
glBindRenderbufferEXT(GLenum target, GLuint renderbuffer);
GLAPI void GLAPIENTRY
glDeleteRenderbuffersEXT(GLsizei n, const GLuint *renderbuffers);
GLAPI void GLAPIENTRY
glGenRenderbuffersEXT(GLsizei n, GLuint *renderbuffers);
GLAPI void GLAPIENTRY
glRenderbufferStorageEXT(GLenum target, GLenum internalformat,
GLsizei width, GLsizei height);
GLAPI void GLAPIENTRY
glGetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint *params);
GLAPI GLboolean GLAPIENTRY
glIsFramebufferEXT(GLuint framebuffer);
GLAPI void GLAPIENTRY
glBindFramebufferEXT(GLenum target, GLuint framebuffer);
GLAPI void GLAPIENTRY
glDeleteFramebuffersEXT(GLsizei n, const GLuint *framebuffers);
GLAPI void GLAPIENTRY
glGenFramebuffersEXT(GLsizei n, GLuint *framebuffers);
GLAPI GLenum GLAPIENTRY
glCheckFramebufferStatusEXT(GLenum target);
GLAPI void GLAPIENTRY
glFramebufferTexture1DEXT(GLenum target, GLenum attachment,
GLenum textarget, GLuint texture, GLint level);
GLAPI void GLAPIENTRY
glFramebufferTexture2DEXT(GLenum target, GLenum attachment,
GLenum textarget, GLuint texture, GLint level);
GLAPI void GLAPIENTRY
glFramebufferTexture3DEXT(GLenum target, GLenum attachment,
GLenum textarget, GLuint texture,
GLint level, GLint zoffset);
GLAPI void GLAPIENTRY
glFramebufferRenderbufferEXT(GLenum target, GLenum attachment,
GLenum renderbuffertarget,
GLuint renderbuffer);
GLAPI void GLAPIENTRY
glGetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
GLenum pname, GLint *params);
GLAPI void GLAPIENTRY
glGenerateMipmapEXT(GLenum target);
#define GL_FRAMEBUFFER_EXT 0x8D40
#define GL_RENDERBUFFER_EXT 0x8D41
#define GL_STENCIL_INDEX_EXT 0x8D45
#define GL_STENCIL_INDEX1_EXT 0x8D46
#define GL_STENCIL_INDEX4_EXT 0x8D47
#define GL_STENCIL_INDEX8_EXT 0x8D48
#define GL_STENCIL_INDEX16_EXT 0x8D49
#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42
#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43
#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4
#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
#define GL_COLOR_ATTACHMENT13_EXT 0x8CED
#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
#define GL_DEPTH_ATTACHMENT_EXT 0x8D00
#define GL_STENCIL_ATTACHMENT_EXT 0x8D20
#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
#define GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT 0x8CD8
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD
#define GL_FRAMEBUFFER_STATUS_ERROR_EXT 0x8CDE
#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6
#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7
#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8
#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
#endif /* GL_EXT_framebuffer_object */
#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
#endif /* GL_OES_read_format */
/**
** NOTE!!!!! If you add new functions to this file, or update
@@ -2250,6 +2359,7 @@ typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLen
**/
/**********************************************************************
* Begin system-specific stuff
*/

View File

@@ -50,6 +50,7 @@
#define glArrayObjectATI MANGLE(ArrayObjectATI)
#define glAsyncMarkerSGIX MANGLE(AsyncMarkerSGIX)
#define glAttachObjectARB MANGLE(AttachObjectARB)
#define glAttachShader MANGLE(AttachShader)
#define glBeginFragmentShaderATI MANGLE(BeginFragmentShaderATI)
#define glBegin MANGLE(Begin)
#define glBeginOcclusionQueryNV MANGLE(BeginOcclusionQueryNV)
@@ -57,6 +58,7 @@
#define glBeginQuery MANGLE(BeginQuery)
#define glBeginVertexShaderEXT MANGLE(BeginVertexShaderEXT)
#define glBindAttribLocationARB MANGLE(BindAttribLocationARB)
#define glBindAttribLocation MANGLE(BindAttribLocation)
#define glBindBufferARB MANGLE(BindBufferARB)
#define glBindBuffer MANGLE(BindBuffer)
#define glBindFragmentShaderATI MANGLE(BindFragmentShaderATI)
@@ -89,6 +91,7 @@
#define glBlendEquation MANGLE(BlendEquation)
#define glBlendEquationSeparateATI MANGLE(BlendEquationSeparateATI)
#define glBlendEquationSeparateEXT MANGLE(BlendEquationSeparateEXT)
#define glBlendEquationSeparate MANGLE(BlendEquationSeparate)
#define glBlendFunc MANGLE(BlendFunc)
#define glBlendFuncSeparateEXT MANGLE(BlendFuncSeparateEXT)
#define glBlendFuncSeparateINGR MANGLE(BlendFuncSeparateINGR)
@@ -99,6 +102,7 @@
#define glBufferSubData MANGLE(BufferSubData)
#define glCallList MANGLE(CallList)
#define glCallLists MANGLE(CallLists)
#define glClampColorARB MANGLE(ClampColorARB)
#define glClearAccum MANGLE(ClearAccum)
#define glClearColor MANGLE(ClearColor)
#define glClearDepth MANGLE(ClearDepth)
@@ -179,6 +183,7 @@
#define glCombinerParameterivNV MANGLE(CombinerParameterivNV)
#define glCombinerStageParameterfvNV MANGLE(CombinerStageParameterfvNV)
#define glCompileShaderARB MANGLE(CompileShaderARB)
#define glCompileShader MANGLE(CompileShader)
#define glCompressedTexImage1DARB MANGLE(CompressedTexImage1DARB)
#define glCompressedTexImage1D MANGLE(CompressedTexImage1D)
#define glCompressedTexImage2DARB MANGLE(CompressedTexImage2DARB)
@@ -222,7 +227,9 @@
#define glCopyTexSubImage2D MANGLE(CopyTexSubImage2D)
#define glCopyTexSubImage3DEXT MANGLE(CopyTexSubImage3DEXT)
#define glCopyTexSubImage3D MANGLE(CopyTexSubImage3D)
#define glCreateProgram MANGLE(CreateProgram)
#define glCreateProgramObjectARB MANGLE(CreateProgramObjectARB)
#define glCreateShader MANGLE(CreateShader)
#define glCreateShaderObjectARB MANGLE(CreateShaderObjectARB)
#define glCullFace MANGLE(CullFace)
#define glCullParameterdvEXT MANGLE(CullParameterdvEXT)
@@ -240,10 +247,12 @@
#define glDeleteLists MANGLE(DeleteLists)
#define glDeleteObjectARB MANGLE(DeleteObjectARB)
#define glDeleteOcclusionQueriesNV MANGLE(DeleteOcclusionQueriesNV)
#define glDeleteProgram MANGLE(DeleteProgram)
#define glDeleteProgramsARB MANGLE(DeleteProgramsARB)
#define glDeleteProgramsNV MANGLE(DeleteProgramsNV)
#define glDeleteQueriesARB MANGLE(DeleteQueriesARB)
#define glDeleteQueries MANGLE(DeleteQueries)
#define glDeleteShader MANGLE(DeleteShader)
#define glDeleteTexturesEXT MANGLE(DeleteTexturesEXT)
#define glDeleteTextures MANGLE(DeleteTextures)
#define glDeleteVertexArraysAPPLE MANGLE(DeleteVertexArraysAPPLE)
@@ -253,16 +262,20 @@
#define glDepthMask MANGLE(DepthMask)
#define glDepthRange MANGLE(DepthRange)
#define glDetachObjectARB MANGLE(DetachObjectARB)
#define glDetachShader MANGLE(DetachShader)
#define glDetailTexFuncSGIS MANGLE(DetailTexFuncSGIS)
#define glDisableClientState MANGLE(DisableClientState)
#define glDisable MANGLE(Disable)
#define glDisableTraceMESA MANGLE(DisableTraceMESA)
#define glDisableVariantClientStateEXT MANGLE(DisableVariantClientStateEXT)
#define glDisableVertexAttribArrayARB MANGLE(DisableVertexAttribArrayARB)
#define glDisableVertexAttribArray MANGLE(DisableVertexAttribArray)
#define glDrawArraysEXT MANGLE(DrawArraysEXT)
#define glDrawArrays MANGLE(DrawArrays)
#define glDrawBuffer MANGLE(DrawBuffer)
#define glDrawBuffersARB MANGLE(DrawBuffersARB)
#define glDrawBuffersATI MANGLE(DrawBuffersATI)
#define glDrawBuffers MANGLE(DrawBuffers)
#define glDrawElementArrayAPPLE MANGLE(DrawElementArrayAPPLE)
#define glDrawElementArrayATI MANGLE(DrawElementArrayATI)
#define glDrawElements MANGLE(DrawElements)
@@ -284,6 +297,7 @@
#define glEnableTraceMESA MANGLE(EnableTraceMESA)
#define glEnableVariantClientStateEXT MANGLE(EnableVariantClientStateEXT)
#define glEnableVertexAttribArrayARB MANGLE(EnableVertexAttribArrayARB)
#define glEnableVertexAttribArray MANGLE(EnableVertexAttribArray)
#define glEndFragmentShaderATI MANGLE(EndFragmentShaderATI)
#define glEndList MANGLE(EndList)
#define glEnd MANGLE(End)
@@ -373,11 +387,15 @@
#define glGenVertexArraysAPPLE MANGLE(GenVertexArraysAPPLE)
#define glGenVertexShadersEXT MANGLE(GenVertexShadersEXT)
#define glGetActiveAttribARB MANGLE(GetActiveAttribARB)
#define glGetActiveAttrib MANGLE(GetActiveAttrib)
#define glGetActiveUniformARB MANGLE(GetActiveUniformARB)
#define glGetActiveUniform MANGLE(GetActiveUniform)
#define glGetArrayObjectfvATI MANGLE(GetArrayObjectfvATI)
#define glGetArrayObjectivATI MANGLE(GetArrayObjectivATI)
#define glGetAttachedObjectsARB MANGLE(GetAttachedObjectsARB)
#define glGetAttachedShaders MANGLE(GetAttachedShaders)
#define glGetAttribLocationARB MANGLE(GetAttribLocationARB)
#define glGetAttribLocation MANGLE(GetAttribLocation)
#define glGetBooleanv MANGLE(GetBooleanv)
#define glGetBufferParameterivARB MANGLE(GetBufferParameterivARB)
#define glGetBufferParameteriv MANGLE(GetBufferParameteriv)
@@ -474,7 +492,9 @@
#define glGetPolygonStipple MANGLE(GetPolygonStipple)
#define glGetProgramEnvParameterdvARB MANGLE(GetProgramEnvParameterdvARB)
#define glGetProgramEnvParameterfvARB MANGLE(GetProgramEnvParameterfvARB)
#define glGetProgramInfoLog MANGLE(GetProgramInfoLog)
#define glGetProgramivARB MANGLE(GetProgramivARB)
#define glGetProgramiv MANGLE(GetProgramiv)
#define glGetProgramivNV MANGLE(GetProgramivNV)
#define glGetProgramLocalParameterdvARB MANGLE(GetProgramLocalParameterdvARB)
#define glGetProgramLocalParameterfvARB MANGLE(GetProgramLocalParameterfvARB)
@@ -492,7 +512,10 @@
#define glGetQueryObjectuiv MANGLE(GetQueryObjectuiv)
#define glGetSeparableFilterEXT MANGLE(GetSeparableFilterEXT)
#define glGetSeparableFilter MANGLE(GetSeparableFilter)
#define glGetShaderInfoLog MANGLE(GetShaderInfoLog)
#define glGetShaderiv MANGLE(GetShaderiv)
#define glGetShaderSourceARB MANGLE(GetShaderSourceARB)
#define glGetShaderSource MANGLE(GetShaderSource)
#define glGetSharpenTexFuncSGIS MANGLE(GetSharpenTexFuncSGIS)
#define glGetString MANGLE(GetString)
#define glGetTexBumpParameterfvATI MANGLE(GetTexBumpParameterfvATI)
@@ -510,8 +533,11 @@
#define glGetTexParameteriv MANGLE(GetTexParameteriv)
#define glGetTrackMatrixivNV MANGLE(GetTrackMatrixivNV)
#define glGetUniformfvARB MANGLE(GetUniformfvARB)
#define glGetUniformfv MANGLE(GetUniformfv)
#define glGetUniformivARB MANGLE(GetUniformivARB)
#define glGetUniformiv MANGLE(GetUniformiv)
#define glGetUniformLocationARB MANGLE(GetUniformLocationARB)
#define glGetUniformLocation MANGLE(GetUniformLocation)
#define glGetVariantArrayObjectfvATI MANGLE(GetVariantArrayObjectfvATI)
#define glGetVariantArrayObjectivATI MANGLE(GetVariantArrayObjectivATI)
#define glGetVariantBooleanvEXT MANGLE(GetVariantBooleanvEXT)
@@ -521,12 +547,16 @@
#define glGetVertexAttribArrayObjectfvATI MANGLE(GetVertexAttribArrayObjectfvATI)
#define glGetVertexAttribArrayObjectivATI MANGLE(GetVertexAttribArrayObjectivATI)
#define glGetVertexAttribdvARB MANGLE(GetVertexAttribdvARB)
#define glGetVertexAttribdv MANGLE(GetVertexAttribdv)
#define glGetVertexAttribdvNV MANGLE(GetVertexAttribdvNV)
#define glGetVertexAttribfvARB MANGLE(GetVertexAttribfvARB)
#define glGetVertexAttribfv MANGLE(GetVertexAttribfv)
#define glGetVertexAttribfvNV MANGLE(GetVertexAttribfvNV)
#define glGetVertexAttribivARB MANGLE(GetVertexAttribivARB)
#define glGetVertexAttribiv MANGLE(GetVertexAttribiv)
#define glGetVertexAttribivNV MANGLE(GetVertexAttribivNV)
#define glGetVertexAttribPointervARB MANGLE(GetVertexAttribPointervARB)
#define glGetVertexAttribPointerv MANGLE(GetVertexAttribPointerv)
#define glGetVertexAttribPointervNV MANGLE(GetVertexAttribPointervNV)
#define glGlobalAlphaFactorbSUN MANGLE(GlobalAlphaFactorbSUN)
#define glGlobalAlphaFactordSUN MANGLE(GlobalAlphaFactordSUN)
@@ -575,9 +605,11 @@
#define glIsObjectBufferATI MANGLE(IsObjectBufferATI)
#define glIsOcclusionQueryNV MANGLE(IsOcclusionQueryNV)
#define glIsProgramARB MANGLE(IsProgramARB)
#define glIsProgram MANGLE(IsProgram)
#define glIsProgramNV MANGLE(IsProgramNV)
#define glIsQueryARB MANGLE(IsQueryARB)
#define glIsQuery MANGLE(IsQuery)
#define glIsShader MANGLE(IsShader)
#define glIsTextureEXT MANGLE(IsTextureEXT)
#define glIsTexture MANGLE(IsTexture)
#define glIsVariantEnabledEXT MANGLE(IsVariantEnabledEXT)
@@ -594,6 +626,7 @@
#define glLineStipple MANGLE(LineStipple)
#define glLineWidth MANGLE(LineWidth)
#define glLinkProgramARB MANGLE(LinkProgramARB)
#define glLinkProgram MANGLE(LinkProgram)
#define glListBase MANGLE(ListBase)
#define glListParameterfSGIX MANGLE(ListParameterfSGIX)
#define glListParameterfvSGIX MANGLE(ListParameterfvSGIX)
@@ -954,6 +987,7 @@
#define glShaderOp2EXT MANGLE(ShaderOp2EXT)
#define glShaderOp3EXT MANGLE(ShaderOp3EXT)
#define glShaderSourceARB MANGLE(ShaderSourceARB)
#define glShaderSource MANGLE(ShaderSource)
#define glSharpenTexFuncSGIS MANGLE(SharpenTexFuncSGIS)
#define glSpriteParameterfSGIX MANGLE(SpriteParameterfSGIX)
#define glSpriteParameterfvSGIX MANGLE(SpriteParameterfvSGIX)
@@ -962,9 +996,12 @@
#define glStartInstrumentsSGIX MANGLE(StartInstrumentsSGIX)
#define glStencilFunc MANGLE(StencilFunc)
#define glStencilFuncSeparateATI MANGLE(StencilFuncSeparateATI)
#define glStencilFuncSeparate MANGLE(StencilFuncSeparate)
#define glStencilMask MANGLE(StencilMask)
#define glStencilMaskSeparate MANGLE(StencilMaskSeparate)
#define glStencilOp MANGLE(StencilOp)
#define glStencilOpSeparateATI MANGLE(StencilOpSeparateATI)
#define glStencilOpSeparate MANGLE(StencilOpSeparate)
#define glStopInstrumentsSGIX MANGLE(StopInstrumentsSGIX)
#define glSwizzleEXT MANGLE(SwizzleEXT)
#define glTagSampleBufferSGIX MANGLE(TagSampleBufferSGIX)
@@ -1084,31 +1121,52 @@
#define glTranslated MANGLE(Translated)
#define glTranslatef MANGLE(Translatef)
#define glUniform1fARB MANGLE(Uniform1fARB)
#define glUniform1f MANGLE(Uniform1f)
#define glUniform1fvARB MANGLE(Uniform1fvARB)
#define glUniform1fv MANGLE(Uniform1fv)
#define glUniform1iARB MANGLE(Uniform1iARB)
#define glUniform1i MANGLE(Uniform1i)
#define glUniform1ivARB MANGLE(Uniform1ivARB)
#define glUniform1iv MANGLE(Uniform1iv)
#define glUniform2fARB MANGLE(Uniform2fARB)
#define glUniform2f MANGLE(Uniform2f)
#define glUniform2fvARB MANGLE(Uniform2fvARB)
#define glUniform2fv MANGLE(Uniform2fv)
#define glUniform2iARB MANGLE(Uniform2iARB)
#define glUniform2i MANGLE(Uniform2i)
#define glUniform2ivARB MANGLE(Uniform2ivARB)
#define glUniform2iv MANGLE(Uniform2iv)
#define glUniform3fARB MANGLE(Uniform3fARB)
#define glUniform3f MANGLE(Uniform3f)
#define glUniform3fvARB MANGLE(Uniform3fvARB)
#define glUniform3fv MANGLE(Uniform3fv)
#define glUniform3iARB MANGLE(Uniform3iARB)
#define glUniform3i MANGLE(Uniform3i)
#define glUniform3ivARB MANGLE(Uniform3ivARB)
#define glUniform3iv MANGLE(Uniform3iv)
#define glUniform4fARB MANGLE(Uniform4fARB)
#define glUniform4f MANGLE(Uniform4f)
#define glUniform4fvARB MANGLE(Uniform4fvARB)
#define glUniform4fv MANGLE(Uniform4fv)
#define glUniform4iARB MANGLE(Uniform4iARB)
#define glUniform4i MANGLE(Uniform4i)
#define glUniform4ivARB MANGLE(Uniform4ivARB)
#define glUniform4iv MANGLE(Uniform4iv)
#define glUniformMatrix2fvARB MANGLE(UniformMatrix2fvARB)
#define glUniformMatrix2fv MANGLE(UniformMatrix2fv)
#define glUniformMatrix3fvARB MANGLE(UniformMatrix3fvARB)
#define glUniformMatrix3fv MANGLE(UniformMatrix3fv)
#define glUniformMatrix4fvARB MANGLE(UniformMatrix4fvARB)
#define glUniformMatrix4fv MANGLE(UniformMatrix4fv)
#define glUnlockArraysEXT MANGLE(UnlockArraysEXT)
#define glUnmapBufferARB MANGLE(UnmapBufferARB)
#define glUnmapBuffer MANGLE(UnmapBuffer)
#define glUnmapObjectBufferATI MANGLE(UnmapObjectBufferATI)
#define glUpdateObjectBufferATI MANGLE(UpdateObjectBufferATI)
#define glUseProgram MANGLE(UseProgram)
#define glUseProgramObjectARB MANGLE(UseProgramObjectARB)
#define glValidateProgramARB MANGLE(ValidateProgramARB)
#define glValidateProgram MANGLE(ValidateProgram)
#define glVariantArrayObjectATI MANGLE(VariantArrayObjectATI)
#define glVariantbvEXT MANGLE(VariantbvEXT)
#define glVariantdvEXT MANGLE(VariantdvEXT)
@@ -1153,77 +1211,114 @@
#define glVertexArrayRangeAPPLE MANGLE(VertexArrayRangeAPPLE)
#define glVertexArrayRangeNV MANGLE(VertexArrayRangeNV)
#define glVertexAttrib1dARB MANGLE(VertexAttrib1dARB)
#define glVertexAttrib1d MANGLE(VertexAttrib1d)
#define glVertexAttrib1dNV MANGLE(VertexAttrib1dNV)
#define glVertexAttrib1dvARB MANGLE(VertexAttrib1dvARB)
#define glVertexAttrib1dv MANGLE(VertexAttrib1dv)
#define glVertexAttrib1dvNV MANGLE(VertexAttrib1dvNV)
#define glVertexAttrib1fARB MANGLE(VertexAttrib1fARB)
#define glVertexAttrib1f MANGLE(VertexAttrib1f)
#define glVertexAttrib1fNV MANGLE(VertexAttrib1fNV)
#define glVertexAttrib1fvARB MANGLE(VertexAttrib1fvARB)
#define glVertexAttrib1fv MANGLE(VertexAttrib1fv)
#define glVertexAttrib1fvNV MANGLE(VertexAttrib1fvNV)
#define glVertexAttrib1hNV MANGLE(VertexAttrib1hNV)
#define glVertexAttrib1hvNV MANGLE(VertexAttrib1hvNV)
#define glVertexAttrib1sARB MANGLE(VertexAttrib1sARB)
#define glVertexAttrib1s MANGLE(VertexAttrib1s)
#define glVertexAttrib1sNV MANGLE(VertexAttrib1sNV)
#define glVertexAttrib1svARB MANGLE(VertexAttrib1svARB)
#define glVertexAttrib1sv MANGLE(VertexAttrib1sv)
#define glVertexAttrib1svNV MANGLE(VertexAttrib1svNV)
#define glVertexAttrib2dARB MANGLE(VertexAttrib2dARB)
#define glVertexAttrib2d MANGLE(VertexAttrib2d)
#define glVertexAttrib2dNV MANGLE(VertexAttrib2dNV)
#define glVertexAttrib2dvARB MANGLE(VertexAttrib2dvARB)
#define glVertexAttrib2dv MANGLE(VertexAttrib2dv)
#define glVertexAttrib2dvNV MANGLE(VertexAttrib2dvNV)
#define glVertexAttrib2fARB MANGLE(VertexAttrib2fARB)
#define glVertexAttrib2f MANGLE(VertexAttrib2f)
#define glVertexAttrib2fNV MANGLE(VertexAttrib2fNV)
#define glVertexAttrib2fvARB MANGLE(VertexAttrib2fvARB)
#define glVertexAttrib2fv MANGLE(VertexAttrib2fv)
#define glVertexAttrib2fvNV MANGLE(VertexAttrib2fvNV)
#define glVertexAttrib2hNV MANGLE(VertexAttrib2hNV)
#define glVertexAttrib2hvNV MANGLE(VertexAttrib2hvNV)
#define glVertexAttrib2sARB MANGLE(VertexAttrib2sARB)
#define glVertexAttrib2s MANGLE(VertexAttrib2s)
#define glVertexAttrib2sNV MANGLE(VertexAttrib2sNV)
#define glVertexAttrib2svARB MANGLE(VertexAttrib2svARB)
#define glVertexAttrib2sv MANGLE(VertexAttrib2sv)
#define glVertexAttrib2svNV MANGLE(VertexAttrib2svNV)
#define glVertexAttrib3dARB MANGLE(VertexAttrib3dARB)
#define glVertexAttrib3d MANGLE(VertexAttrib3d)
#define glVertexAttrib3dNV MANGLE(VertexAttrib3dNV)
#define glVertexAttrib3dvARB MANGLE(VertexAttrib3dvARB)
#define glVertexAttrib3dv MANGLE(VertexAttrib3dv)
#define glVertexAttrib3dvNV MANGLE(VertexAttrib3dvNV)
#define glVertexAttrib3fARB MANGLE(VertexAttrib3fARB)
#define glVertexAttrib3f MANGLE(VertexAttrib3f)
#define glVertexAttrib3fNV MANGLE(VertexAttrib3fNV)
#define glVertexAttrib3fvARB MANGLE(VertexAttrib3fvARB)
#define glVertexAttrib3fv MANGLE(VertexAttrib3fv)
#define glVertexAttrib3fvNV MANGLE(VertexAttrib3fvNV)
#define glVertexAttrib3hNV MANGLE(VertexAttrib3hNV)
#define glVertexAttrib3hvNV MANGLE(VertexAttrib3hvNV)
#define glVertexAttrib3sARB MANGLE(VertexAttrib3sARB)
#define glVertexAttrib3s MANGLE(VertexAttrib3s)
#define glVertexAttrib3sNV MANGLE(VertexAttrib3sNV)
#define glVertexAttrib3svARB MANGLE(VertexAttrib3svARB)
#define glVertexAttrib3sv MANGLE(VertexAttrib3sv)
#define glVertexAttrib3svNV MANGLE(VertexAttrib3svNV)
#define glVertexAttrib4bvARB MANGLE(VertexAttrib4bvARB)
#define glVertexAttrib4bv MANGLE(VertexAttrib4bv)
#define glVertexAttrib4dARB MANGLE(VertexAttrib4dARB)
#define glVertexAttrib4d MANGLE(VertexAttrib4d)
#define glVertexAttrib4dNV MANGLE(VertexAttrib4dNV)
#define glVertexAttrib4dvARB MANGLE(VertexAttrib4dvARB)
#define glVertexAttrib4dv MANGLE(VertexAttrib4dv)
#define glVertexAttrib4dvNV MANGLE(VertexAttrib4dvNV)
#define glVertexAttrib4fARB MANGLE(VertexAttrib4fARB)
#define glVertexAttrib4f MANGLE(VertexAttrib4f)
#define glVertexAttrib4fNV MANGLE(VertexAttrib4fNV)
#define glVertexAttrib4fvARB MANGLE(VertexAttrib4fvARB)
#define glVertexAttrib4fv MANGLE(VertexAttrib4fv)
#define glVertexAttrib4fvNV MANGLE(VertexAttrib4fvNV)
#define glVertexAttrib4hNV MANGLE(VertexAttrib4hNV)
#define glVertexAttrib4hvNV MANGLE(VertexAttrib4hvNV)
#define glVertexAttrib4ivARB MANGLE(VertexAttrib4ivARB)
#define glVertexAttrib4iv MANGLE(VertexAttrib4iv)
#define glVertexAttrib4NbvARB MANGLE(VertexAttrib4NbvARB)
#define glVertexAttrib4Nbv MANGLE(VertexAttrib4Nbv)
#define glVertexAttrib4NivARB MANGLE(VertexAttrib4NivARB)
#define glVertexAttrib4Niv MANGLE(VertexAttrib4Niv)
#define glVertexAttrib4NsvARB MANGLE(VertexAttrib4NsvARB)
#define glVertexAttrib4Nsv MANGLE(VertexAttrib4Nsv)
#define glVertexAttrib4NubARB MANGLE(VertexAttrib4NubARB)
#define glVertexAttrib4Nub MANGLE(VertexAttrib4Nub)
#define glVertexAttrib4NubvARB MANGLE(VertexAttrib4NubvARB)
#define glVertexAttrib4Nubv MANGLE(VertexAttrib4Nubv)
#define glVertexAttrib4NuivARB MANGLE(VertexAttrib4NuivARB)
#define glVertexAttrib4Nuiv MANGLE(VertexAttrib4Nuiv)
#define glVertexAttrib4NusvARB MANGLE(VertexAttrib4NusvARB)
#define glVertexAttrib4Nusv MANGLE(VertexAttrib4Nusv)
#define glVertexAttrib4sARB MANGLE(VertexAttrib4sARB)
#define glVertexAttrib4s MANGLE(VertexAttrib4s)
#define glVertexAttrib4sNV MANGLE(VertexAttrib4sNV)
#define glVertexAttrib4svARB MANGLE(VertexAttrib4svARB)
#define glVertexAttrib4sv MANGLE(VertexAttrib4sv)
#define glVertexAttrib4svNV MANGLE(VertexAttrib4svNV)
#define glVertexAttrib4ubNV MANGLE(VertexAttrib4ubNV)
#define glVertexAttrib4ubvARB MANGLE(VertexAttrib4ubvARB)
#define glVertexAttrib4ubv MANGLE(VertexAttrib4ubv)
#define glVertexAttrib4ubvNV MANGLE(VertexAttrib4ubvNV)
#define glVertexAttrib4uivARB MANGLE(VertexAttrib4uivARB)
#define glVertexAttrib4uiv MANGLE(VertexAttrib4uiv)
#define glVertexAttrib4usvARB MANGLE(VertexAttrib4usvARB)
#define glVertexAttrib4usv MANGLE(VertexAttrib4usv)
#define glVertexAttribArrayObjectATI MANGLE(VertexAttribArrayObjectATI)
#define glVertexAttribPointerARB MANGLE(VertexAttribPointerARB)
#define glVertexAttribPointer MANGLE(VertexAttribPointer)
#define glVertexAttribPointerNV MANGLE(VertexAttribPointerNV)
#define glVertexAttribs1dvNV MANGLE(VertexAttribs1dvNV)
#define glVertexAttribs1fvNV MANGLE(VertexAttribs1fvNV)

View File

@@ -52,9 +52,9 @@ extern "C" {
/*************************************************************/
/* Header file version number, required by OpenGL ABI for Linux */
/* glext.h last updated 2004/7/26 */
/* glext.h last updated 2005/01/20 */
/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */
#define GL_GLEXT_VERSION 24
#define GL_GLEXT_VERSION 26
#ifndef GL_VERSION_1_2
#define GL_UNSIGNED_BYTE_3_3_2 0x8032
@@ -372,6 +372,93 @@ extern "C" {
#define GL_SRC2_ALPHA GL_SOURCE2_ALPHA
#endif
#ifndef GL_VERSION_2_0
#define GL_BLEND_EQUATION_RGB GL_BLEND_EQUATION
#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
#define GL_CURRENT_VERTEX_ATTRIB 0x8626
#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643
#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
#define GL_STENCIL_BACK_FUNC 0x8800
#define GL_STENCIL_BACK_FAIL 0x8801
#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
#define GL_MAX_DRAW_BUFFERS 0x8824
#define GL_DRAW_BUFFER0 0x8825
#define GL_DRAW_BUFFER1 0x8826
#define GL_DRAW_BUFFER2 0x8827
#define GL_DRAW_BUFFER3 0x8828
#define GL_DRAW_BUFFER4 0x8829
#define GL_DRAW_BUFFER5 0x882A
#define GL_DRAW_BUFFER6 0x882B
#define GL_DRAW_BUFFER7 0x882C
#define GL_DRAW_BUFFER8 0x882D
#define GL_DRAW_BUFFER9 0x882E
#define GL_DRAW_BUFFER10 0x882F
#define GL_DRAW_BUFFER11 0x8830
#define GL_DRAW_BUFFER12 0x8831
#define GL_DRAW_BUFFER13 0x8832
#define GL_DRAW_BUFFER14 0x8833
#define GL_DRAW_BUFFER15 0x8834
#define GL_BLEND_EQUATION_ALPHA 0x883D
#define GL_POINT_SPRITE 0x8861
#define GL_COORD_REPLACE 0x8862
#define GL_MAX_VERTEX_ATTRIBS 0x8869
#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
#define GL_MAX_TEXTURE_COORDS 0x8871
#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
#define GL_FRAGMENT_SHADER 0x8B30
#define GL_VERTEX_SHADER 0x8B31
#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
#define GL_MAX_VARYING_FLOATS 0x8B4B
#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
#define GL_SHADER_TYPE 0x8B4F
#define GL_FLOAT_VEC2 0x8B50
#define GL_FLOAT_VEC3 0x8B51
#define GL_FLOAT_VEC4 0x8B52
#define GL_INT_VEC2 0x8B53
#define GL_INT_VEC3 0x8B54
#define GL_INT_VEC4 0x8B55
#define GL_BOOL 0x8B56
#define GL_BOOL_VEC2 0x8B57
#define GL_BOOL_VEC3 0x8B58
#define GL_BOOL_VEC4 0x8B59
#define GL_FLOAT_MAT2 0x8B5A
#define GL_FLOAT_MAT3 0x8B5B
#define GL_FLOAT_MAT4 0x8B5C
#define GL_SAMPLER_1D 0x8B5D
#define GL_SAMPLER_2D 0x8B5E
#define GL_SAMPLER_3D 0x8B5F
#define GL_SAMPLER_CUBE 0x8B60
#define GL_SAMPLER_1D_SHADOW 0x8B61
#define GL_SAMPLER_2D_SHADOW 0x8B62
#define GL_DELETE_STATUS 0x8B80
#define GL_COMPILE_STATUS 0x8B81
#define GL_LINK_STATUS 0x8B82
#define GL_VALIDATE_STATUS 0x8B83
#define GL_INFO_LOG_LENGTH 0x8B84
#define GL_ATTACHED_SHADERS 0x8B85
#define GL_ACTIVE_UNIFORMS 0x8B86
#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
#define GL_SHADER_SOURCE_LENGTH 0x8B88
#define GL_ACTIVE_ATTRIBUTES 0x8B89
#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
#define GL_CURRENT_PROGRAM 0x8B8D
#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0
#define GL_LOWER_LEFT 0x8CA1
#define GL_UPPER_LEFT 0x8CA2
#define GL_STENCIL_BACK_REF 0x8CA3
#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
#endif
#ifndef GL_ARB_multitexture
#define GL_TEXTURE0_ARB 0x84C0
#define GL_TEXTURE1_ARB 0x84C1
@@ -825,6 +912,48 @@ extern "C" {
#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
#endif
#ifndef GL_ARB_color_buffer_float
#define GL_RGBA_FLOAT_MODE_ARB 0x8820
#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A
#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B
#define GL_CLAMP_READ_COLOR_ARB 0x891C
#define GL_FIXED_ONLY_ARB 0x891D
#endif
#ifndef GL_ARB_half_float_pixel
#define GL_HALF_FLOAT_ARB 0x140B
#endif
#ifndef GL_ARB_texture_float
#define GL_TEXTURE_RED_TYPE_ARB 0x8C10
#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11
#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12
#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13
#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14
#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15
#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16
#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17
#define GL_RGBA32F_ARB 0x8814
#define GL_RGB32F_ARB 0x8815
#define GL_ALPHA32F_ARB 0x8816
#define GL_INTENSITY32F_ARB 0x8817
#define GL_LUMINANCE32F_ARB 0x8818
#define GL_LUMINANCE_ALPHA32F_ARB 0x8819
#define GL_RGBA16F_ARB 0x881A
#define GL_RGB16F_ARB 0x881B
#define GL_ALPHA16F_ARB 0x881C
#define GL_INTENSITY16F_ARB 0x881D
#define GL_LUMINANCE16F_ARB 0x881E
#define GL_LUMINANCE_ALPHA16F_ARB 0x881F
#endif
#ifndef GL_ARB_pixel_buffer_object
#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB
#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC
#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED
#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
#endif
#ifndef GL_EXT_abgr
#define GL_ABGR_EXT 0x8000
#endif
@@ -2793,6 +2922,11 @@ extern "C" {
#ifndef GL_ATI_vertex_attrib_array_object
#endif
#ifndef GL_OES_read_format
#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
#endif
#ifndef GL_EXT_depth_bounds_test
#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890
#define GL_DEPTH_BOUNDS_EXT 0x8891
@@ -2850,6 +2984,11 @@ extern "C" {
/*************************************************************/
#include <stddef.h>
#ifndef GL_VERSION_2_0
/* GL type for program/shader text */
typedef char GLchar; /* native character */
#endif
#ifndef GL_VERSION_1_5
/* GL types for handling large vertex buffer objects */
typedef ptrdiff_t GLintptr;
@@ -2863,13 +3002,17 @@ typedef ptrdiff_t GLsizeiptrARB;
#endif
#ifndef GL_ARB_shader_objects
/* GL types for handling shader object handles and characters */
/* GL types for handling shader object handles and program/shader text */
typedef char GLcharARB; /* native character */
typedef unsigned int GLhandleARB; /* shader object handle */
#endif
/* GL types for "half" precision (s10e5) float data in host memory */
#ifndef GL_ARB_half_float_pixel
typedef unsigned short GLhalfARB;
#endif
#ifndef GL_NV_half_float
/* GL type for representing NVIDIA "half" floating point type in host memory */
typedef unsigned short GLhalfNV;
#endif
@@ -3193,6 +3336,198 @@ typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pn
typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params);
#endif
#ifndef GL_VERSION_2_0
#define GL_VERSION_2_0 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glBlendEquationSeparate (GLenum, GLenum);
GLAPI void APIENTRY glDrawBuffers (GLsizei, const GLenum *);
GLAPI void APIENTRY glStencilOpSeparate (GLenum, GLenum, GLenum, GLenum);
GLAPI void APIENTRY glStencilFuncSeparate (GLenum, GLenum, GLint, GLuint);
GLAPI void APIENTRY glStencilMaskSeparate (GLenum, GLuint);
GLAPI void APIENTRY glAttachShader (GLuint, GLuint);
GLAPI void APIENTRY glBindAttribLocation (GLuint, GLuint, const GLchar *);
GLAPI void APIENTRY glCompileShader (GLuint);
GLAPI GLuint APIENTRY glCreateProgram (void);
GLAPI GLuint APIENTRY glCreateShader (GLenum);
GLAPI void APIENTRY glDeleteProgram (GLuint);
GLAPI void APIENTRY glDeleteShader (GLuint);
GLAPI void APIENTRY glDetachShader (GLuint, GLuint);
GLAPI void APIENTRY glDisableVertexAttribArray (GLuint);
GLAPI void APIENTRY glEnableVertexAttribArray (GLuint);
GLAPI void APIENTRY glGetActiveAttrib (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
GLAPI void APIENTRY glGetActiveUniform (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
GLAPI void APIENTRY glGetAttachedShaders (GLuint, GLsizei, GLsizei *, GLuint *);
GLAPI GLint APIENTRY glGetAttribLocation (GLuint, const GLchar *);
GLAPI void APIENTRY glGetProgramiv (GLuint, GLenum, GLint *);
GLAPI void APIENTRY glGetProgramInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
GLAPI void APIENTRY glGetShaderiv (GLuint, GLenum, GLint *);
GLAPI void APIENTRY glGetShaderInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
GLAPI void APIENTRY glGetShaderSource (GLuint, GLsizei, GLsizei *, GLchar *);
GLAPI GLint APIENTRY glGetUniformLocation (GLuint, const GLchar *);
GLAPI void APIENTRY glGetUniformfv (GLuint, GLint, GLfloat *);
GLAPI void APIENTRY glGetUniformiv (GLuint, GLint, GLint *);
GLAPI void APIENTRY glGetVertexAttribdv (GLuint, GLenum, GLdouble *);
GLAPI void APIENTRY glGetVertexAttribfv (GLuint, GLenum, GLfloat *);
GLAPI void APIENTRY glGetVertexAttribiv (GLuint, GLenum, GLint *);
GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint, GLenum, GLvoid* *);
GLAPI GLboolean APIENTRY glIsProgram (GLuint);
GLAPI GLboolean APIENTRY glIsShader (GLuint);
GLAPI void APIENTRY glLinkProgram (GLuint);
GLAPI void APIENTRY glShaderSource (GLuint, GLsizei, const GLchar* *, const GLint *);
GLAPI void APIENTRY glUseProgram (GLuint);
GLAPI void APIENTRY glUniform1f (GLint, GLfloat);
GLAPI void APIENTRY glUniform2f (GLint, GLfloat, GLfloat);
GLAPI void APIENTRY glUniform3f (GLint, GLfloat, GLfloat, GLfloat);
GLAPI void APIENTRY glUniform4f (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
GLAPI void APIENTRY glUniform1i (GLint, GLint);
GLAPI void APIENTRY glUniform2i (GLint, GLint, GLint);
GLAPI void APIENTRY glUniform3i (GLint, GLint, GLint, GLint);
GLAPI void APIENTRY glUniform4i (GLint, GLint, GLint, GLint, GLint);
GLAPI void APIENTRY glUniform1fv (GLint, GLsizei, const GLfloat *);
GLAPI void APIENTRY glUniform2fv (GLint, GLsizei, const GLfloat *);
GLAPI void APIENTRY glUniform3fv (GLint, GLsizei, const GLfloat *);
GLAPI void APIENTRY glUniform4fv (GLint, GLsizei, const GLfloat *);
GLAPI void APIENTRY glUniform1iv (GLint, GLsizei, const GLint *);
GLAPI void APIENTRY glUniform2iv (GLint, GLsizei, const GLint *);
GLAPI void APIENTRY glUniform3iv (GLint, GLsizei, const GLint *);
GLAPI void APIENTRY glUniform4iv (GLint, GLsizei, const GLint *);
GLAPI void APIENTRY glUniformMatrix2fv (GLint, GLsizei, GLboolean, const GLfloat *);
GLAPI void APIENTRY glUniformMatrix3fv (GLint, GLsizei, GLboolean, const GLfloat *);
GLAPI void APIENTRY glUniformMatrix4fv (GLint, GLsizei, GLboolean, const GLfloat *);
GLAPI void APIENTRY glValidateProgram (GLuint);
GLAPI void APIENTRY glVertexAttrib1d (GLuint, GLdouble);
GLAPI void APIENTRY glVertexAttrib1dv (GLuint, const GLdouble *);
GLAPI void APIENTRY glVertexAttrib1f (GLuint, GLfloat);
GLAPI void APIENTRY glVertexAttrib1fv (GLuint, const GLfloat *);
GLAPI void APIENTRY glVertexAttrib1s (GLuint, GLshort);
GLAPI void APIENTRY glVertexAttrib1sv (GLuint, const GLshort *);
GLAPI void APIENTRY glVertexAttrib2d (GLuint, GLdouble, GLdouble);
GLAPI void APIENTRY glVertexAttrib2dv (GLuint, const GLdouble *);
GLAPI void APIENTRY glVertexAttrib2f (GLuint, GLfloat, GLfloat);
GLAPI void APIENTRY glVertexAttrib2fv (GLuint, const GLfloat *);
GLAPI void APIENTRY glVertexAttrib2s (GLuint, GLshort, GLshort);
GLAPI void APIENTRY glVertexAttrib2sv (GLuint, const GLshort *);
GLAPI void APIENTRY glVertexAttrib3d (GLuint, GLdouble, GLdouble, GLdouble);
GLAPI void APIENTRY glVertexAttrib3dv (GLuint, const GLdouble *);
GLAPI void APIENTRY glVertexAttrib3f (GLuint, GLfloat, GLfloat, GLfloat);
GLAPI void APIENTRY glVertexAttrib3fv (GLuint, const GLfloat *);
GLAPI void APIENTRY glVertexAttrib3s (GLuint, GLshort, GLshort, GLshort);
GLAPI void APIENTRY glVertexAttrib3sv (GLuint, const GLshort *);
GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint, const GLbyte *);
GLAPI void APIENTRY glVertexAttrib4Niv (GLuint, const GLint *);
GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint, const GLshort *);
GLAPI void APIENTRY glVertexAttrib4Nub (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint, const GLubyte *);
GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint, const GLuint *);
GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint, const GLushort *);
GLAPI void APIENTRY glVertexAttrib4bv (GLuint, const GLbyte *);
GLAPI void APIENTRY glVertexAttrib4d (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
GLAPI void APIENTRY glVertexAttrib4dv (GLuint, const GLdouble *);
GLAPI void APIENTRY glVertexAttrib4f (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
GLAPI void APIENTRY glVertexAttrib4fv (GLuint, const GLfloat *);
GLAPI void APIENTRY glVertexAttrib4iv (GLuint, const GLint *);
GLAPI void APIENTRY glVertexAttrib4s (GLuint, GLshort, GLshort, GLshort, GLshort);
GLAPI void APIENTRY glVertexAttrib4sv (GLuint, const GLshort *);
GLAPI void APIENTRY glVertexAttrib4ubv (GLuint, const GLubyte *);
GLAPI void APIENTRY glVertexAttrib4uiv (GLuint, const GLuint *);
GLAPI void APIENTRY glVertexAttrib4usv (GLuint, const GLushort *);
GLAPI void APIENTRY glVertexAttribPointer (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs);
typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj);
typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params);
typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader);
typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length);
typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);
typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x);
typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x);
typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y);
typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y);
typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
#endif
#ifndef GL_ARB_multitexture
#define GL_ARB_multitexture 1
#ifdef GL_GLEXT_PROTOTYPES
@@ -3752,6 +4087,26 @@ typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs)
#define GL_ARB_texture_rectangle 1
#endif
#ifndef GL_ARB_color_buffer_float
#define GL_ARB_color_buffer_float 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glClampColorARB (GLenum, GLenum);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);
#endif
#ifndef GL_ARB_half_float_pixel
#define GL_ARB_half_float_pixel 1
#endif
#ifndef GL_ARB_texture_float
#define GL_ARB_texture_float 1
#endif
#ifndef GL_ARB_pixel_buffer_object
#define GL_ARB_pixel_buffer_object 1
#endif
#ifndef GL_EXT_abgr
#define GL_EXT_abgr 1
#endif
@@ -5974,6 +6329,10 @@ typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index,
typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params);
#endif
#ifndef GL_OES_read_format
#define GL_OES_read_format 1
#endif
#ifndef GL_EXT_depth_bounds_test
#define GL_EXT_depth_bounds_test 1
#ifdef GL_GLEXT_PROTOTYPES

View File

@@ -193,13 +193,11 @@ WGLAPI int GLAPIENTRY SetPixelFormat(HDC,int,const PIXELFORMATDESCRIPTOR *);
#else /* _WIN32 not defined */
/* Define GLUTAPIENTRY and GLUTCALLBACK to nothing if we aren't on Win32. */
# define GLUTAPIENTRY
# define GLUTAPIENTRY GLAPIENTRY
# define GLUTAPIENTRYV
# define GLUT_APIENTRY_DEFINED
# define GLUTCALLBACK
# define GLUTAPI extern
/* Prototype exit for the non-Win32 case (see above). */
/*extern void exit(int); this screws up gcc -ansi -pedantic! */
#endif
@@ -747,26 +745,4 @@ GLUTAPI int GLUTAPIENTRY glutGameModeGet(GLenum mode);
}
#endif
#if 0
#ifdef GLUT_APIENTRY_DEFINED
# undef GLUT_APIENTRY_DEFINED
# undef APIENTRY
#endif
#ifdef GLUT_WINGDIAPI_DEFINED
# undef GLUT_WINGDIAPI_DEFINED
# undef WINGDIAPI
#endif
#ifdef GLUT_DEFINED___CDECL
# undef GLUT_DEFINED___CDECL
# undef __cdecl
#endif
#ifdef GLUT_DEFINED__CRTIMP
# undef GLUT_DEFINED__CRTIMP
# undef _CRTIMP
#endif
#endif
#endif /* __glut_h__ */

View File

@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
* Version: 6.2
* Version: 6.3
*
* Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -482,6 +482,21 @@ typedef GLuint (* PFNGLXGETAGPOFFSETMESAPROC) (const GLvoid *pointer);
#endif /* GLX_MESA_agp_offset */
/*
* ???. GLX_MESA_allocate_memory
*/
#ifndef GLX_MESA_allocate_memory
#define GLX_MESA_allocate_memory 1
extern void *glXAllocateMemoryMESA(Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
extern void glXFreeMemoryMESA(Display *dpy, int scrn, void *pointer);
extern GLuint glXGetMemoryOffsetMESA(Display *dpy, int scrn, const void *pointer);
typedef void * ( * PFNGLXALLOCATEMEMORYMESAPROC) (Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
typedef void ( * PFNGLXFREEMEMORYMESAPROC) (Display *dpy, int scrn, void *pointer);
typedef GLuint (* PFNGLXGETMEMORYOFFSETMESAPROC) (Display *dpy, int scrn, const void *pointer);
#endif /* GLX_MESA_allocate_memory */
/*
* ARB ?. GLX_ARB_render_texture
*/
@@ -495,6 +510,39 @@ extern Bool glXDrawableAttribARB(Display *dpy, GLXDrawable draw, const int *attr
#endif /* GLX_ARB_render_texture */
/*
* Remove this when glxext.h is updated.
*/
#ifndef GLX_NV_float_buffer
#define GLX_NV_float_buffer 1
#define GLX_FLOAT_COMPONENTS_NV 0x20B0
#endif /* GLX_NV_float_buffer */
/*** Should these go here, or in another header? */
/*
** GLX Events
*/
typedef struct {
int event_type; /* GLX_DAMAGED or GLX_SAVED */
int draw_type; /* GLX_WINDOW or GLX_PBUFFER */
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; /* XID of Drawable */
unsigned int buffer_mask; /* mask indicating which buffers are affected */
unsigned int aux_buffer; /* which aux buffer was affected */
int x, y;
int width, height;
int count; /* if nonzero, at least this many more */
} GLXPbufferClobberEvent;
typedef union __GLXEvent {
GLXPbufferClobberEvent glxpbufferclobber;
long pad[24];
} GLXEvent;
#ifdef __cplusplus
}

View File

@@ -52,14 +52,20 @@ extern "C" {
*
* It can have the values #True or #False.
*/
#ifndef MINIGLX_NO_XTYPES
typedef int Bool;
#endif
typedef int MINI_Bool;
/**
* \brief Color map.
*
* Alias for private ::MiniGLXColormapRec structure.
*/
typedef struct MiniGLXColormapRec *MINI_Colormap;
#ifndef MINIGLX_NO_XTYPES
typedef struct MiniGLXColormapRec *Colormap;
#endif
/**
* \brief Window attributes.
@@ -67,7 +73,7 @@ typedef struct MiniGLXColormapRec *Colormap;
typedef struct MiniGLXSetWindowAttributesRec {
int background_pixel; /**< \brief background pixel */
int border_pixel; /**< \brief border pixel value */
Colormap colormap; /**< \brief color map to be associated with window */
MINI_Colormap colormap; /**< \brief color map to be associated with window */
int event_mask; /**< \brief set of events that should be saved */
} XSetWindowAttributes;
@@ -85,10 +91,13 @@ typedef struct MiniGLXVisualRec Visual;
*
* \sa \ref datatypes.
*/
typedef unsigned int VisualID;
#ifndef MINIGLX_NO_XTYPES
typedef unsigned long VisualID;
#endif
typedef unsigned long MINI_VisualID;
typedef struct MiniGLXXVisualInfoRec {
Visual *visual; /**< \brief pointer to the GLX Visual */
VisualID visualid; /**< \brief visual ID */
MINI_VisualID visualid; /**< \brief visual ID */
int screen; /**< \brief screen number */
int depth; /**< \brief bit depth */
#if defined(__cplusplus) || defined(c_plusplus)
@@ -115,7 +124,10 @@ typedef struct MiniGLXFBConfigRec {
*
* \sa \ref datatypes.
*/
#ifndef MINIGLX_NO_XTYPES
typedef struct MiniGLXDisplayRec Display;
#endif
typedef struct MiniGLXDisplayRec MINI_Display;
/**
* \brief Window handle.
@@ -124,7 +136,10 @@ typedef struct MiniGLXDisplayRec Display;
*
* \sa \ref datatypes.
*/
#ifndef MINIGLX_NO_XTYPES
typedef struct MiniGLXWindowRec *Window;
#endif
typedef struct MiniGLXWindowRec *MINI_Window;
/**
* \brief Drawable.
@@ -136,7 +151,10 @@ typedef struct MiniGLXWindowRec *Window;
*
* \sa \ref datatypes.
*/
#ifndef MINIGLX_NO_XTYPES
typedef struct MiniGLXWindowRec *Drawable;
#endif
typedef struct MiniGLXWindowRec *MINI_Drawable;
/**
* \brief GLX drawable.
@@ -174,9 +192,9 @@ typedef struct MiniGLXContextRec *GLXContext;
typedef struct {
int type;
unsigned long serial; /* # of last request processed by server */
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
Window window;
MINI_Bool send_event; /* true if this came from a SendEvent request */
MINI_Display *display; /* Display the event was read from */
MINI_Window window;
int x, y;
int width, height;
int count; /* if non-zero, at least this many more */
@@ -185,53 +203,53 @@ typedef struct {
typedef struct {
int type;
unsigned long serial; /* # of last request processed by server */
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
Window parent; /* parent of the window */
Window window; /* window id of window created */
MINI_Bool send_event; /* true if this came from a SendEvent request */
MINI_Display *display; /* Display the event was read from */
MINI_Window parent; /* parent of the window */
MINI_Window window; /* window id of window created */
int x, y; /* window location */
int width, height; /* size of window */
int border_width; /* border width */
Bool override_redirect; /* creation should be overridden */
MINI_Bool override_redirect; /* creation should be overridden */
} XCreateWindowEvent;
typedef struct {
int type;
unsigned long serial; /* # of last request processed by server */
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
Window event;
Window window;
MINI_Bool send_event; /* true if this came from a SendEvent request */
MINI_Display *display; /* Display the event was read from */
MINI_Window event;
MINI_Window window;
} XDestroyWindowEvent;
typedef struct {
int type;
unsigned long serial; /* # of last request processed by server */
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
Window event;
Window window;
Bool from_configure;
MINI_Bool send_event; /* true if this came from a SendEvent request */
MINI_Display *display; /* Display the event was read from */
MINI_Window event;
MINI_Window window;
MINI_Bool from_configure;
} XUnmapEvent;
typedef struct {
int type;
unsigned long serial; /* # of last request processed by server */
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
Window event;
Window window;
Bool override_redirect; /* boolean, is override set... */
MINI_Bool send_event; /* true if this came from a SendEvent request */
MINI_Display *display; /* Display the event was read from */
MINI_Window event;
MINI_Window window;
MINI_Bool override_redirect; /* boolean, is override set... */
} XMapEvent;
typedef struct {
int type;
unsigned long serial; /* # of last request processed by server */
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
Window parent;
Window window;
MINI_Bool send_event; /* true if this came from a SendEvent request */
MINI_Display *display; /* Display the event was read from */
MINI_Window parent;
MINI_Window window;
} XMapRequestEvent;
typedef union _XEvent {
@@ -263,6 +281,7 @@ typedef union _XEvent {
#define CWColormap (1L<<13)
#define PseudoColor 3
#define TrueColor 4
#define VisualIDMask 0x1
#define VisualScreenMask 0x2
#define Expose 12
#define CreateNotify 16
@@ -318,11 +337,11 @@ typedef union _XEvent {
/**
* \name Server-specific functions
*/
extern Display *
extern MINI_Display *
__miniglx_StartServer( const char *display_name );
extern int
__miniglx_Select( Display *dpy, int maxfd,
__miniglx_Select( MINI_Display *dpy, int maxfd,
fd_set *rfds, fd_set *wfds, fd_set *xfds,
struct timeval *tv );
@@ -331,25 +350,25 @@ __miniglx_Select( Display *dpy, int maxfd,
* \name Simulated Xlib functions
*/
/*@{*/
extern Display *
extern MINI_Display *
XOpenDisplay( const char *dpy_name );
extern void
XCloseDisplay( Display *display );
XCloseDisplay( MINI_Display *display );
extern Window
XCreateWindow( Display *display, Window parent, int x, int y,
extern MINI_Window
XCreateWindow( MINI_Display *display, MINI_Window parent, int x, int y,
unsigned int width, unsigned int height,
unsigned int border_width, int depth, unsigned int winclass,
Visual *visual, unsigned long valuemask,
XSetWindowAttributes *attributes );
extern int
XNextEvent(Display *display, XEvent *event_return);
XNextEvent(MINI_Display *display, XEvent *event_return);
extern Bool
XCheckMaskEvent( Display *dpy, long event_mask, XEvent *event_return );
extern MINI_Bool
XCheckMaskEvent( MINI_Display *dpy, long event_mask, XEvent *event_return );
/**
* \brief Return the root window.
@@ -365,27 +384,27 @@ XCheckMaskEvent( Display *dpy, long event_mask, XEvent *event_return );
#define DefaultScreen(dpy) 0
extern void
XDestroyWindow( Display *display, Window w );
XDestroyWindow( MINI_Display *display, MINI_Window w );
extern void
XMapWindow( Display *display, Window w );
XMapWindow( MINI_Display *display, MINI_Window w );
/* Should clients have access to this?
*/
extern void
XUnmapWindow( Display *display, Window w );
XUnmapWindow( MINI_Display *display, MINI_Window w );
extern Colormap
XCreateColormap( Display *display, Window w, Visual *visual, int alloc );
extern MINI_Colormap
XCreateColormap( MINI_Display *display, MINI_Window w, Visual *visual, int alloc );
extern void
XFreeColormap( Display *display, Colormap cmap );
XFreeColormap( MINI_Display *display, MINI_Colormap cmap );
extern void
XFree( void *data );
extern XVisualInfo *
XGetVisualInfo( Display *display, long vinfo_mask,
XGetVisualInfo( MINI_Display *display, long vinfo_mask,
XVisualInfo *vinfo_template, int *nitems_return );
/*@}*/
@@ -396,23 +415,23 @@ XGetVisualInfo( Display *display, long vinfo_mask,
*/
/*@{*/
extern XVisualInfo*
glXChooseVisual( Display *dpy, int screen, int *attribList );
glXChooseVisual( MINI_Display *dpy, int screen, int *attribList );
extern int
glXGetConfig( Display *dpy, XVisualInfo *vis, int attrib, int *value );
glXGetConfig( MINI_Display *dpy, XVisualInfo *vis, int attrib, int *value );
extern GLXContext
glXCreateContext( Display *dpy, XVisualInfo *vis,
GLXContext shareList, Bool direct );
glXCreateContext( MINI_Display *dpy, XVisualInfo *vis,
GLXContext shareList, MINI_Bool direct );
extern void
glXDestroyContext( Display *dpy, GLXContext ctx );
glXDestroyContext( MINI_Display *dpy, GLXContext ctx );
extern Bool
glXMakeCurrent( Display *dpy, GLXDrawable drawable, GLXContext ctx);
extern MINI_Bool
glXMakeCurrent( MINI_Display *dpy, GLXDrawable drawable, GLXContext ctx);
extern void
glXSwapBuffers( Display *dpy, GLXDrawable drawable );
glXSwapBuffers( MINI_Display *dpy, GLXDrawable drawable );
extern GLXContext
glXGetCurrentContext( void );
@@ -423,22 +442,35 @@ glXGetCurrentDrawable( void );
extern void
(*glXGetProcAddress(const GLubyte *procname))( void );
extern Bool
glXQueryVersion( Display *dpy, int *major, int *minor );
extern MINI_Bool
glXQueryVersion( MINI_Display *dpy, int *major, int *minor );
/* Added in MiniGLX 1.1 */
extern GLXPbuffer
glXCreatePbuffer( Display *dpy, GLXFBConfig config, const int *attribList );
glXCreatePbuffer( MINI_Display *dpy, GLXFBConfig config, const int *attribList );
extern void
glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf );
glXDestroyPbuffer( MINI_Display *dpy, GLXPbuffer pbuf );
extern GLXFBConfig *
glXChooseFBConfig( Display *dpy, int screen, const int *attribList,
glXChooseFBConfig( MINI_Display *dpy, int screen, const int *attribList,
int *nitems );
extern XVisualInfo *
glXGetVisualFromFBConfig( Display *dpy, GLXFBConfig config );
glXGetVisualFromFBConfig( MINI_Display *dpy, GLXFBConfig config );
extern void *glXAllocateMemoryMESA(Display *dpy, int scrn,
size_t size, float readFreq,
float writeFreq, float priority);
extern void glXFreeMemoryMESA(Display *dpy, int scrn, void *pointer);
extern GLuint glXGetMemoryOffsetMESA( Display *dpy, int scrn,
const void *pointer );
/*@}*/
extern void
__glXScrEnableExtension( void *, const char * name );
/*@}*/

271
include/GLES/egl.h Normal file
View File

@@ -0,0 +1,271 @@
#ifndef _EGL_H
#define _EGL_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.0 (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-2004 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.
*/
#if 0/*XXX TEMPORARY HACK*/
#include <GLES/gl.h>
#else
#include <GL/gl.h>
#endif
#include <GLES/egltypes.h>
/* XXX should go in eglext.h */
#define GL_OES_VERSION_1_0 1
#define GL_OES_read_format 1
#define GL_OES_compressed_paletted_texture 1
#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
#define GL_PALETTE4_RGB8_OES 0x8B90
#define GL_PALETTE4_RGBA8_OES 0x8B91
#define GL_PALETTE4_R5_G6_B5_OES 0x8B92
#define GL_PALETTE4_RGBA4_OES 0x8B93
#define GL_PALETTE4_RGB5_A1_OES 0x8B94
#define GL_PALETTE8_RGB8_OES 0x8B95
#define GL_PALETTE8_RGBA8_OES 0x8B96
#define GL_PALETTE8_R5_G6_B5_OES 0x8B97
#define GL_PALETTE8_RGBA4_OES 0x8B98
#define GL_PALETTE8_RGB5_A1_OES 0x8B99
/* XXX */
/*
** Versioning and extensions
*/
#define EGL_VERSION_1_0 1
#if 0
#define EGL_VERSION_1_1 1
#endif
/*
** Boolean
*/
#define EGL_FALSE 0
#define EGL_TRUE 1
/*
** Errors
*/
#define EGL_SUCCESS 0x3000
#define EGL_NOT_INITIALIZED 0x3001
#define EGL_BAD_ACCESS 0x3002
#define EGL_BAD_ALLOC 0x3003
#define EGL_BAD_ATTRIBUTE 0x3004
#define EGL_BAD_CONFIG 0x3005
#define EGL_BAD_CONTEXT 0x3006
#define EGL_BAD_CURRENT_SURFACE 0x3007
#define EGL_BAD_DISPLAY 0x3008
#define EGL_BAD_MATCH 0x3009
#define EGL_BAD_NATIVE_PIXMAP 0x300A
#define EGL_BAD_NATIVE_WINDOW 0x300B
#define EGL_BAD_PARAMETER 0x300C
#define EGL_BAD_SURFACE 0x300D
#define EGL_CONTEXT_LOST 0x300E
/* 0x300F - 0x301F reserved for additional errors. */
/*
** Config attributes
*/
#define EGL_BUFFER_SIZE 0x3020
#define EGL_ALPHA_SIZE 0x3021
#define EGL_BLUE_SIZE 0x3022
#define EGL_GREEN_SIZE 0x3023
#define EGL_RED_SIZE 0x3024
#define EGL_DEPTH_SIZE 0x3025
#define EGL_STENCIL_SIZE 0x3026
#define EGL_CONFIG_CAVEAT 0x3027
#define EGL_CONFIG_ID 0x3028
#define EGL_LEVEL 0x3029
#define EGL_MAX_PBUFFER_HEIGHT 0x302A
#define EGL_MAX_PBUFFER_PIXELS 0x302B
#define EGL_MAX_PBUFFER_WIDTH 0x302C
#define EGL_NATIVE_RENDERABLE 0x302D
#define EGL_NATIVE_VISUAL_ID 0x302E
#define EGL_NATIVE_VISUAL_TYPE 0x302F
/*#define EGL_PRESERVED_RESOURCES 0x3030*/
#define EGL_SAMPLES 0x3031
#define EGL_SAMPLE_BUFFERS 0x3032
#define EGL_SURFACE_TYPE 0x3033
#define EGL_TRANSPARENT_TYPE 0x3034
#define EGL_TRANSPARENT_BLUE_VALUE 0x3035
#define EGL_TRANSPARENT_GREEN_VALUE 0x3036
#define EGL_TRANSPARENT_RED_VALUE 0x3037
#define EGL_NONE 0x3038 /* Also a config value */
#define EGL_BIND_TO_TEXTURE_RGB 0x3039
#define EGL_BIND_TO_TEXTURE_RGBA 0x303A
#define EGL_MIN_SWAP_INTERVAL 0x303B
#define EGL_MAX_SWAP_INTERVAL 0x303C
/*
** Config values
*/
#define EGL_DONT_CARE ((EGLint) -1)
#define EGL_SLOW_CONFIG 0x3050 /* EGL_CONFIG_CAVEAT value */
#define EGL_NON_CONFORMANT_CONFIG 0x3051 /* " */
#define EGL_TRANSPARENT_RGB 0x3052 /* EGL_TRANSPARENT_TYPE value */
#define EGL_NO_TEXTURE 0x305C /* EGL_TEXTURE_FORMAT/TARGET value */
#define EGL_TEXTURE_RGB 0x305D /* EGL_TEXTURE_FORMAT value */
#define EGL_TEXTURE_RGBA 0x305E /* " */
#define EGL_TEXTURE_2D 0x305F /* EGL_TEXTURE_TARGET value */
/*
** Config attribute mask bits
*/
#define EGL_PBUFFER_BIT 0x01 /* EGL_SURFACE_TYPE mask bit */
#define EGL_PIXMAP_BIT 0x02 /* " */
#define EGL_WINDOW_BIT 0x04 /* " */
/*
** String names
*/
#define EGL_VENDOR 0x3053 /* eglQueryString target */
#define EGL_VERSION 0x3054 /* " */
#define EGL_EXTENSIONS 0x3055 /* " */
/*
** Surface attributes
*/
#define EGL_HEIGHT 0x3056
#define EGL_WIDTH 0x3057
#define EGL_LARGEST_PBUFFER 0x3058
#define EGL_TEXTURE_FORMAT 0x3080 /* For pbuffers bound as textures */
#define EGL_TEXTURE_TARGET 0x3081 /* " */
#define EGL_MIPMAP_TEXTURE 0x3082 /* " */
#define EGL_MIPMAP_LEVEL 0x3083 /* " */
/*
** BindTexImage / ReleaseTexImage buffer target
*/
#define EGL_BACK_BUFFER 0x3084
/*
** Current surfaces
*/
#define EGL_DRAW 0x3059
#define EGL_READ 0x305A
/*
** Engines
*/
#define EGL_CORE_NATIVE_ENGINE 0x305B
/* 0x305C-0x3FFFF reserved for future use */
/*
** Functions
*/
#ifdef __cplusplus
extern "C" {
#endif
GLAPI EGLint APIENTRY eglGetError (void);
GLAPI EGLDisplay APIENTRY eglGetDisplay (NativeDisplayType display);
GLAPI EGLBoolean APIENTRY eglInitialize (EGLDisplay dpy, EGLint *major, EGLint *minor);
GLAPI EGLBoolean APIENTRY eglTerminate (EGLDisplay dpy);
GLAPI const char * APIENTRY eglQueryString (EGLDisplay dpy, EGLint name);
GLAPI void (* APIENTRY eglGetProcAddress (const char *procname))();
GLAPI EGLBoolean APIENTRY eglGetConfigs (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config);
GLAPI EGLBoolean APIENTRY eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);
GLAPI EGLBoolean APIENTRY eglGetConfigAttrib (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value);
GLAPI EGLSurface APIENTRY eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, NativeWindowType window, const EGLint *attrib_list);
GLAPI EGLSurface APIENTRY eglCreatePixmapSurface (EGLDisplay dpy, EGLConfig config, NativePixmapType pixmap, const EGLint *attrib_list);
GLAPI EGLSurface APIENTRY eglCreatePbufferSurface (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);
GLAPI EGLBoolean APIENTRY eglDestroySurface (EGLDisplay dpy, EGLSurface surface);
GLAPI EGLBoolean APIENTRY eglQuerySurface (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value);
/* EGL 1.1 render-to-texture APIs */
GLAPI EGLBoolean APIENTRY eglSurfaceAttrib (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value);
GLAPI EGLBoolean APIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
GLAPI EGLBoolean APIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
/* EGL 1.1 swap control API */
GLAPI EGLBoolean APIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval);
GLAPI EGLContext APIENTRY eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_list, const EGLint *attrib_list);
GLAPI EGLBoolean APIENTRY eglDestroyContext (EGLDisplay dpy, EGLContext ctx);
GLAPI EGLBoolean APIENTRY eglMakeCurrent (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx);
GLAPI EGLContext APIENTRY eglGetCurrentContext (void);
GLAPI EGLSurface APIENTRY eglGetCurrentSurface (EGLint readdraw);
GLAPI EGLDisplay APIENTRY eglGetCurrentDisplay (void);
GLAPI EGLBoolean APIENTRY eglQueryContext (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value);
GLAPI EGLBoolean APIENTRY eglWaitGL (void);
GLAPI EGLBoolean APIENTRY eglWaitNative (EGLint engine);
GLAPI EGLBoolean APIENTRY eglSwapBuffers (EGLDisplay dpy, EGLSurface draw);
GLAPI EGLBoolean APIENTRY eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, NativePixmapType target);
/* EGL_MESA_screen extension >>> PRELIMINARY <<< */
#ifndef EGL_MESA_screen_surface
#define EGL_MESA_screen_surface 1
#define EGL_BAD_SCREEN_MESA 0x4000
#define EGL_BAD_MODE_MESA 0x4001
#define EGL_SCREEN_COUNT_MESA 0x4002
#define EGL_SCREEN_POSITION_MESA 0x4003
#define EGL_MODE_ID_MESA 0x4004
#define EGL_REFRESH_RATE_MESA 0x4005
#define EGL_OPTIMAL_MODE_MESA 0x4006
#define EGL_SCREEN_BIT_MESA 0x08
GLAPI EGLBoolean APIENTRY eglChooseModeMESA(EGLDisplay dpy, EGLScreenMESA screen, const EGLint *attrib_list, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes);
GLAPI EGLBoolean APIENTRY eglGetModesMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes);
GLAPI EGLBoolean APIENTRY eglGetModeAttribMESA(EGLDisplay dpy, EGLModeMESA mode, EGLint attribute, EGLint *value);
GLAPI EGLBoolean APIENTRY eglGetScreensMESA(EGLDisplay dpy, EGLScreenMESA *screens, EGLint max_screens, EGLint *num_screens);
GLAPI EGLSurface APIENTRY eglCreateScreenSurfaceMESA(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);
GLAPI EGLBoolean APIENTRY eglShowSurfaceMESA(EGLDisplay dpy, EGLint screen, EGLSurface surface);
GLAPI EGLBoolean APIENTRY eglScreenPositionMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLint x, EGLint y);
GLAPI EGLBoolean APIENTRY eglQueryScreenMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLint attribute, EGLint *value);
GLAPI EGLBoolean APIENTRY eglQueryScreenSurfaceMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLSurface *surface);
GLAPI EGLBoolean APIENTRY eglQueryScreenModeMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *mode);
#endif /* EGL_MESA_screen_surface */
#ifdef __cplusplus
}
#endif
#endif /* _EGL_H */

45
include/GLES/egltypes.h Normal file
View File

@@ -0,0 +1,45 @@
/*
** egltypes.h for Mesa
**
** ONLY egl.h SHOULD INCLUDE THIS FILE!
**
** See comments about egltypes.h in the standard egl.h file.
*/
#include <sys/types.h>
/*
** These opaque EGL types are implemented as unsigned 32-bit integers:
*/
typedef u_int32_t EGLDisplay;
typedef u_int32_t EGLConfig;
typedef u_int32_t EGLSurface;
typedef u_int32_t EGLContext;
/* EGL_MESA_screen_surface */
typedef u_int32_t EGLModeMESA;
typedef u_int32_t EGLScreenMESA;
/*
** Other basic EGL types:
*/
typedef u_int8_t EGLBoolean;
typedef int32_t EGLint;
typedef void * NativeDisplayType;
typedef int NativePixmapType;
typedef int NativeWindowType;
/*
** EGL and native handle null values:
*/
#define EGL_DEFAULT_DISPLAY ((NativeDisplayType) 0)
#define EGL_NO_CONTEXT ((EGLContext) 0)
#define EGL_NO_DISPLAY ((EGLDisplay) 0)
#define EGL_NO_SURFACE ((EGLSurface) 0)
/* EGL_MESA_screen_surface */
#define EGL_NO_MODE_MESA ((EGLModeMESA) 0)

View File

@@ -7,6 +7,8 @@ INCDIR = $(TOP)/include
OSMESA_LIBS = -L$(LIB_DIR) -lglut -lOSMesa -lGLU -lGL $(APP_LIB_DEPS)
OSMESA16_LIBS = -L$(LIB_DIR) -lglut -lOSMesa16 -lGLU -lGL $(APP_LIB_DEPS)
OSMESA32_LIBS = -L$(LIB_DIR) -lglut -lOSMesa32 -lGLU -lGL $(APP_LIB_DEPS)
LIB_DEP = $(LIB_DIR)/$(GL_LIB_NAME) $(LIB_DIR)/$(GLU_LIB_NAME) $(LIB_DIR)/$(GLUT_LIB_NAME)
@@ -66,32 +68,63 @@ PROGS = \
# make executable from .c file:
.c: $(LIB_DEP)
$(CC) -I$(INCDIR) $(CFLAGS) $< $(APP_LIB_DEPS) -o $@
.c: $(LIB_DEP) readtex.o
$(CC) -I$(INCDIR) $(CFLAGS) $< readtex.o $(APP_LIB_DEPS) -o $@
##### TARGETS #####
default: readtex.c readtex.h $(PROGS)
default: readtex.o $(PROGS)
readtex.c: $(TOP)/progs/util/readtex.c
cp $< .
readtex.h: $(TOP)/progs/util/readtex.h
cp $< .
readtex.o: readtex.c readtex.h
$(CC) -c -I$(INCDIR) $(CFLAGS) readtex.c
showbuffer.c: $(TOP)/progs/util/showbuffer.c
cp $< .
showbuffer.h: $(TOP)/progs/util/showbuffer.h
cp $< .
showbuffer.o: showbuffer.c showbuffer.h
$(CC) -c -I$(INCDIR) $(CFLAGS) showbuffer.c
reflect: reflect.o showbuffer.o readtex.o
$(CC) -I$(INCDIR) $(CFLAGS) reflect.o showbuffer.o readtex.o $(APP_LIB_DEPS) -o $@
reflect.o: reflect.c showbuffer.h
$(CC) -c -I$(INCDIR) $(CFLAGS) reflect.c
shadowtex: shadowtex.o showbuffer.o
$(CC) -I$(INCDIR) $(CFLAGS) shadowtex.o showbuffer.o $(APP_LIB_DEPS) -o $@
shadowtex.o: shadowtex.c showbuffer.h
$(CC) -c -I$(INCDIR) $(CFLAGS) shadowtex.c
# special case: need the -lOSMesa library:
osdemo: osdemo.c
$(CC) -I$(INCDIR) $(CFLAGS) osdemo.c $(OSMESA_LIBS) -o $@
# another special case: need the -lOSMesa16 library:
osdemo16: osdemo16.c
$(CC) -I$(INCDIR) $(CFLAGS) osdemo16.c $(OSMESA16_LIBS) -o $@
# another special case: need the -lOSMesa32 library:
osdemo32: osdemo32.c
$(CC) -I$(INCDIR) $(CFLAGS) osdemo32.c $(OSMESA32_LIBS) -o $@
clean:
-rm -f $(PROGS)
-rm -f *.o *~
-rm -f readtex.[ch]
readtex.c:
cp $(TOP)/progs/util/readtex.c .
readtex.h:
cp $(TOP)/progs/util/readtex.h .
# special case: need the -lOSMesa library:
osdemo: osdemo.c
$(CC) -I$(INCDIR) $(CFLAGS) osdemo.c $(OSMESA_LIBS) -o $@
# another special case: need the -lOSMesa32 library:
osdemo32: osdemo32.c
$(CC) -I$(INCDIR) $(CFLAGS) osdemo32.c $(OSMESA32_LIBS) -o $@

View File

@@ -365,11 +365,9 @@ static void Init( void )
{
/* Green-ish fog color */
static const GLfloat fogColor[4] = {0.5, 1.0, 0.5, 0};
glFogi(GL_FOG_MODE, GL_LINEAR);
glFogfv(GL_FOG_COLOR, fogColor);
glFogf(GL_FOG_START, 5.0);
glFogf(GL_FOG_END, 25.0);
glEnable(GL_FOG);
}
#endif

View File

@@ -115,6 +115,7 @@ static void Display( void )
glScalef(0.3, 0.3, 1.0);
glRotatef(-90.0 * Xpos, 0, 0, 1);
#if defined(GL_ARB_occlusion_query)
#if TEST_DISPLAY_LISTS
glNewList(10, GL_COMPILE);
glBeginQueryARB(GL_SAMPLES_PASSED_ARB, OccQuery);
@@ -152,6 +153,7 @@ static void Display( void )
/* turn off occlusion testing */
glColorMask(1, 1, 1, 1);
glDepthMask(GL_TRUE);
#endif /* GL_ARB_occlusion_query */
/* draw the orange rect, so we can see what's going on */
glColor3f(0.8, 0.5, 0);
@@ -173,6 +175,7 @@ static void Display( void )
glLoadIdentity();
glColor3f(1, 1, 1);
#if defined(GL_ARB_occlusion_query)
sprintf(s, " %4d Fragments Visible", passed);
glRasterPos3f(-0.50, -0.7, 0);
PrintString(s);
@@ -180,6 +183,10 @@ static void Display( void )
glRasterPos3f(-0.25, -0.8, 0);
PrintString("Fully Occluded");
}
#else
glRasterPos3f(-0.25, -0.8, 0);
PrintString("GL_ARB_occlusion_query not available at compile time");
#endif /* GL_ARB_occlusion_query */
glutSwapBuffers();
}
@@ -238,17 +245,21 @@ static void Init( void )
exit(-1);
}
#if defined(GL_ARB_occlusion_query)
glGetQueryivARB(GL_SAMPLES_PASSED_ARB, GL_QUERY_COUNTER_BITS_ARB, &bits);
if (!bits) {
printf("Hmmm, GL_QUERY_COUNTER_BITS_ARB is zero!\n");
exit(-1);
}
#endif /* GL_ARB_occlusion_query */
glGetIntegerv(GL_DEPTH_BITS, &bits);
printf("Depthbits: %d\n", bits);
#if defined(GL_ARB_occlusion_query)
glGenQueriesARB(1, &OccQuery);
assert(OccQuery > 0);
#endif /* GL_ARB_occlusion_query */
glEnable(GL_DEPTH_TEST);
}

View File

@@ -14,6 +14,8 @@
#include <stdlib.h>
#include <string.h>
#include <GL/glut.h>
#include <sys/time.h>
#include <time.h>
#define COS(X) cos( (X) * 3.14159/180.0 )
#define SIN(X) sin( (X) * 3.14159/180.0 )
@@ -25,12 +27,12 @@
GLboolean IndexMode = GL_FALSE;
GLuint Ball;
GLenum Mode;
GLfloat Zrot = 0.0, Zstep = 6.0;
GLfloat Zrot = 0.0, Zstep = 180.0;
GLfloat Xpos = 0.0, Ypos = 1.0;
GLfloat Xvel = 0.2, Yvel = 0.0;
GLfloat Xvel = 2.0, Yvel = 0.0;
GLfloat Xmin = -4.0, Xmax = 4.0;
GLfloat Ymin = -3.8, Ymax = 4.0;
GLfloat G = -0.1;
GLfloat G = -9.8;
static GLuint
make_ball(void)
@@ -149,10 +151,17 @@ static void
idle(void)
{
static float vel0 = -100.0;
static double t0 = -1.;
double t, dt;
t = glutGet(GLUT_ELAPSED_TIME) / 1000.;
if (t0 < 0.)
t0 = t;
dt = t - t0;
t0 = t;
Zrot += Zstep;
Zrot += Zstep*dt;
Xpos += Xvel;
Xpos += Xvel*dt;
if (Xpos >= Xmax) {
Xpos = Xmax;
Xvel = -Xvel;
@@ -163,8 +172,8 @@ idle(void)
Xvel = -Xvel;
Zstep = -Zstep;
}
Ypos += Yvel;
Yvel += G;
Ypos += Yvel*dt;
Yvel += G*dt;
if (Ypos < Ymin) {
Ypos = Ymin;
if (vel0 == -100.0)

View File

@@ -40,7 +40,7 @@
#include <stdlib.h>
#include <string.h>
#include "GL/glut.h"
#include "../util/readtex.c" /* a hack */
#include "readtex.h"
static GLfloat Xrot = 0, Yrot = 0;

View File

@@ -44,24 +44,30 @@ realclean :
bounce.exe; : bounce.obj $(LIB_DEP)
clearspd.exe; : clearspd.obj $(LIB_DEP)
drawpix.exe; : drawpix.obj $(LIB_DEP)
drawpix.exe; : drawpix.obj $(LIB_DEP) [-.util]readtex.obj
cxxlink $(MMS$TARGET_NAME),[-.util]readtex.obj,$(GL_LIBS)
gamma.exe; : gamma.obj $(LIB_DEP)
gears.exe; : gears.obj $(LIB_DEP)
glinfo.exe; : glinfo.obj $(LIB_DEP)
glutfx.exe; : glutfx.obj $(LIB_DEP)
isosurf.exe; : isosurf.obj $(LIB_DEP)
isosurf.exe; : isosurf.obj $(LIB_DEP) [-.util]readtex.obj
cxxlink $(MMS$TARGET_NAME),[-.util]readtex.obj,$(GL_LIBS)
morph3d.exe; : morph3d.obj $(LIB_DEP)
osdemo.exe; : osdemo.obj $(LIB_DEP)
paltex.exe; : paltex.obj $(LIB_DEP)
pointblast.exe; : pointblast.obj $(LIB_DEP)
reflect.exe; : reflect.obj $(LIB_DEP)
reflect.exe; : reflect.obj [-.util]readtex.obj [-.util]showbuffer.obj\
$(LIB_DEP)
cxxlink $(MMS$TARGET_NAME),[-.util]readtex,showbuffer,$(GL_LIBS)
spectex.exe; : spectex.obj $(LIB_DEP)
stex3d.exe; : stex3d.obj $(LIB_DEP)
tessdemo.exe; : tessdemo.obj $(LIB_DEP)
texcyl.exe; : texcyl.obj $(LIB_DEP)
texcyl.exe; : texcyl.obj [-.util]readtex.obj $(LIB_DEP)
cxxlink $(MMS$TARGET_NAME),[-.util]readtex.obj,$(GL_LIBS)
texobj.exe; : texobj.obj $(LIB_DEP)
trispd.exe; : trispd.obj $(LIB_DEP)
winpos.exe; : winpos.obj $(LIB_DEP)
winpos.exe; : winpos.obj [-.util]readtex.obj $(LIB_DEP)
cxxlink $(MMS$TARGET_NAME),[-.util]readtex.obj,$(GL_LIBS)
bounce.obj : bounce.c

View File

@@ -8,9 +8,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <GL/glut.h>
#include "readtex.c"
#include "readtex.h"
#define IMAGE_FILE "../images/girl.rgb"

View File

@@ -10,6 +10,7 @@
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <string.h>
#ifdef WIN32
#include <windows.h>
@@ -17,7 +18,7 @@
#endif
#include <GL/glut.h>
#include "readtex.c"
#include "readtex.h"
#ifdef XMESA
#include "GL/xmesa.h"
@@ -98,8 +99,8 @@ part;
static float treepos[NUMTREE][3];
static float black[3] = { 0.0, 0.0, 0.0 };
static float blu[3] = { 0.0, 0.2, 1.0 };
static float blu2[3] = { 0.0, 1.0, 1.0 };
static float blu[3] = { 1.0, 0.2, 0.0 };
static float blu2[3] = { 1.0, 1.0, 0.0 };
static float fogcolor[4] = { 1.0, 1.0, 1.0, 1.0 };
@@ -136,7 +137,7 @@ static GLuint treeid;
static float obs[3] = { 2.0, 1.0, 0.0 };
static float dir[3];
static float v = 0.0;
static float alpha = -90.0;
static float alpha = -84.0;
static float beta = 90.0;
static float
@@ -303,7 +304,7 @@ printhelp(void)
printstring(GLUT_BITMAP_TIMES_ROMAN_24, "Help");
glRasterPos2i(60, 390);
printstring(GLUT_BITMAP_TIMES_ROMAN_24, "h - Togle Help");
printstring(GLUT_BITMAP_TIMES_ROMAN_24, "h - Toggle Help");
glRasterPos2i(60, 360);
printstring(GLUT_BITMAP_TIMES_ROMAN_24, "t - Increase particle size");
@@ -316,9 +317,9 @@ printhelp(void)
printstring(GLUT_BITMAP_TIMES_ROMAN_24, "R - Decrease emission radius");
glRasterPos2i(60, 240);
printstring(GLUT_BITMAP_TIMES_ROMAN_24, "f - Togle Fog");
printstring(GLUT_BITMAP_TIMES_ROMAN_24, "f - Toggle Fog");
glRasterPos2i(60, 210);
printstring(GLUT_BITMAP_TIMES_ROMAN_24, "s - Togle shadows");
printstring(GLUT_BITMAP_TIMES_ROMAN_24, "s - Toggle shadows");
glRasterPos2i(60, 180);
printstring(GLUT_BITMAP_TIMES_ROMAN_24, "Arrow Keys - Rotate");
glRasterPos2i(60, 150);
@@ -329,7 +330,7 @@ printhelp(void)
glRasterPos2i(60, 90);
if (joyavailable)
printstring(GLUT_BITMAP_TIMES_ROMAN_24,
"j - Togle jostick control (Joystick control available)");
"j - Toggle jostick control (Joystick control available)");
else
printstring(GLUT_BITMAP_TIMES_ROMAN_24,
"(No Joystick control available)");
@@ -384,6 +385,12 @@ drawfire(void)
{
static char frbuf[80] = "";
int j;
static double t0 = -1.;
double t = glutGet(GLUT_ELAPSED_TIME) / 1000.0;
if (t0 < 0.0)
t0 = t;
dt = (t - t0) * 1.0;
t0 = t;
dojoy();
@@ -563,10 +570,10 @@ key(unsigned char key, int x, int y)
break;
case 'a':
v += 0.01;
v += 0.0005;
break;
case 'z':
v -= 0.01;
v -= 0.0005;
break;
case 'j':
@@ -709,12 +716,12 @@ main(int ac, char **av)
/* Default settings */
np = 800;
eject_r = 0.1;
eject_r = -0.65;
dt = 0.015;
eject_vy = 4;
eject_vl = 1;
shadows = 1;
ridtri = 0.1;
ridtri = 0.25;
maxage = 1.0 / dt;

View File

@@ -13,7 +13,7 @@
#include <math.h>
#include <GL/glut.h>
#include "readtex.c" /* the compulsory hack */
#include "readtex.h"
#define TEXTURE_FILE "../images/bw.rgb"
@@ -23,6 +23,10 @@
#define DEPTH 15.0f
#if !defined(GLAPIENTRYP)
# define GLAPIENTRYP *
#endif
typedef void (GLAPIENTRYP GLFOGCOORDFEXTPROC) (GLfloat f);
typedef void (GLAPIENTRYP GLFOGCOORDPOINTEREXTPROC) (GLenum, GLsizei, const GLvoid *);

View File

@@ -37,15 +37,19 @@ static void Display( void )
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
if (PixelLight) {
#if defined(GL_NV_fragment_program)
NAMED_PARAMETER4FV(FragProg, "LightPos", LightPos);
glEnable(GL_FRAGMENT_PROGRAM_NV);
glEnable(GL_VERTEX_PROGRAM_NV);
#endif
glDisable(GL_LIGHTING);
}
else {
glLightfv(GL_LIGHT0, GL_POSITION, LightPos);
#if defined(GL_NV_fragment_program)
glDisable(GL_FRAGMENT_PROGRAM_NV);
glDisable(GL_VERTEX_PROGRAM_NV);
#endif
glEnable(GL_LIGHTING);
}
@@ -216,6 +220,7 @@ static void Init( void )
exit(1);
}
#if defined(GL_NV_fragment_program)
glGenProgramsNV(1, &FragProg);
assert(FragProg > 0);
glGenProgramsNV(1, &VertProg);
@@ -243,6 +248,7 @@ static void Init( void )
glBindProgramNV(GL_VERTEX_PROGRAM_NV, VertProg);
glTrackMatrixNV(GL_VERTEX_PROGRAM_NV, 0, GL_MODELVIEW_PROJECTION_NV, GL_IDENTITY_NV);
glTrackMatrixNV(GL_VERTEX_PROGRAM_NV, 4, GL_MODELVIEW, GL_INVERSE_TRANSPOSE_NV);
#endif
/*
* Misc init

View File

@@ -1,4 +1,3 @@
/*
* 3-D gear wheels. This program is in the public domain.
*
@@ -28,6 +27,7 @@ static GLint T0 = 0;
static GLint Frames = 0;
static GLint autoexit = 0;
/**
Draw a gear wheel. You'll probably want to call this function when
@@ -215,7 +215,14 @@ draw(void)
static void
idle(void)
{
angle += 2.0;
static double t0 = -1.;
double dt, t = glutGet(GLUT_ELAPSED_TIME) / 1000.0;
if (t0 < 0.0)
t0 = t;
dt = t - t0;
t0 = t;
angle += 70.0 * dt; /* 90 degrees per second */
glutPostRedisplay();
}

View File

@@ -912,14 +912,18 @@ draw (void)
}
static void
idle (void)
{
int i;
static double t0 = -1.;
double dt, t = glutGet(GLUT_ELAPSED_TIME) / 1000.0;
if (t0 < 0.0)
t0 = t;
dt = t - t0;
t0 = t;
for (i = 0; i < number_of_gears; i++)
g[i].angle += g[i].angular_velocity;
g[i].angle += g[i].angular_velocity * dt;
glutPostRedisplay();
}

View File

@@ -7,7 +7,7 @@ APOSITION = -7.000 0.000 0.000
ACOLOR = 0.800 0.500 0.200
ALENGTH = 6.000
AMOTORED = 1
AANGULARVELOCITY = 2.000
AANGULARVELOCITY = 90.000
ADIRECTION = 1
ANAME = AXLE2

View File

@@ -21,9 +21,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <GL/glut.h>
#include "readtex.c" /* I know, this is a hack. */
#include "readtex.h"
#define SPECULAR_TEXTURE_FILE "../images/reflect.rgb"
#define BASE_TEXTURE_FILE "../images/tile.rgb"
@@ -43,7 +44,7 @@ static GLuint Object = 0;
static GLboolean Animate = GL_TRUE;
static GLfloat Xrot = 0.0, Yrot = 0.0, Zrot = 0.0;
static GLfloat DXrot = 1.0, DYrot = 2.5;
static GLfloat DXrot = 20.0, DYrot = 50.;
static GLfloat Black[4] = { 0, 0, 0, 0 };
static GLfloat White[4] = { 1, 1, 1, 1 };
@@ -58,13 +59,18 @@ static GLint T0 = 0;
static GLint Frames = 0;
static void Idle( void )
{
static double t0 = -1.;
double dt, t = glutGet(GLUT_ELAPSED_TIME) / 1000.0;
if (t0 < 0.0)
t0 = t;
dt = t - t0;
t0 = t;
if (Animate) {
Xrot += DXrot;
Yrot += DYrot;
Xrot += DXrot*dt;
Yrot += DYrot*dt;
glutPostRedisplay();
}
}

View File

@@ -9,7 +9,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <string.h>
#if defined (WIN32)|| defined(_WIN32)
#include <windows.h>
@@ -18,7 +18,7 @@
#include <GL/glut.h>
#include "readtex.c"
#include "readtex.h"
#ifdef XMESA
#include "GL/xmesa.h"
@@ -543,6 +543,12 @@ draw(void)
static GLfloat alpha = 0.0f;
static GLfloat beta = 0.0f;
static float fr = 0.0;
static double t0 = -1.;
double dt, t = glutGet(GLUT_ELAPSED_TIME) / 1000.0;
if (t0 < 0.0)
t0 = t;
dt = t - t0;
t0 = t;
dojoy();
@@ -586,8 +592,8 @@ draw(void)
drawipers(0, FROM_NONE);
glPopMatrix();
alpha += 0.5f;
beta += 0.3f;
alpha += 4.f * dt;
beta += 2.4f * dt;
glDisable(GL_LIGHTING);
glDisable(GL_LIGHT0);

View File

@@ -36,7 +36,7 @@
#define GL_GLEXT_PROTOTYPES
#include "GL/glut.h"
#include "readtex.c" /* I know, this is a hack. KW: me too. */
#include "readtex.h"
#define TEXTURE_FILE "../images/reflect.rgb"
#define LIT 0x00000001

View File

@@ -34,7 +34,7 @@
#include <GL/glut.h>
#include <GL/glext.h>
#include "readtex.c" /* I know, this is a hack. */
#include "readtex.h"
#define TEXTURE_FILE "../images/girl.rgb"

View File

@@ -660,6 +660,13 @@ static void draw_ico( void )
}
static void draw ( void ) {
static double t0 = -1.;
double dt, t = glutGet(GLUT_ELAPSED_TIME) / 1000.0;
if (t0 < 0.0)
t0 = t;
dt = t - t0;
t0 = t;
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
glPushMatrix();
@@ -681,7 +688,7 @@ static void draw ( void ) {
glutSwapBuffers();
step+=0.05;
step += dt;
}
static void idle_( void )

View File

@@ -17,7 +17,7 @@
#include <string.h>
#include <GL/glut.h>
#include "readtex.c" /* I know, this is a hack. */
#include "readtex.h"
#define TEXTURE_1_FILE "../images/girl.rgb"
#define TEXTURE_2_FILE "../images/reflect.rgb"
@@ -36,7 +36,6 @@ static GLfloat drift_increment = 0.005;
static GLfloat Xrot = 20.0, Yrot = 30.0, Zrot = 0.0;
static void Idle( void )
{
if (Animate) {

View File

@@ -4,7 +4,7 @@
*
* Compile with something like this:
*
* gcc osdemo16.c -I../include -L../lib -lOSMesa16 -lm -o osdemo16
* gcc osdemo16.c -I../../include -L../../lib -lglut -lGLU -lOSMesa16 -lm -o osdemo16
*/
@@ -128,6 +128,11 @@ static void render_image( void )
glPopMatrix();
/* This is very important!!!
* Make sure buffered commands are finished!!!
*/
glFinish();
gluDeleteQuadric(qobj);
{
@@ -173,6 +178,7 @@ write_targa(const char *filename, const GLushort *buffer, int width, int height)
for (y=height-1; y>=0; y--) {
for (x=0; x<width; x++) {
i = (y*width + x) * 4;
/* just write 8 high bits */
fputc(ptr[i+2] >> 8, f); /* write blue */
fputc(ptr[i+1] >> 8, f); /* write green */
fputc(ptr[i] >> 8, f); /* write red */
@@ -183,13 +189,13 @@ write_targa(const char *filename, const GLushort *buffer, int width, int height)
static void
write_ppm(const char *filename, const GLubyte *buffer, int width, int height)
write_ppm(const char *filename, const GLushort *buffer, int width, int height)
{
const int binary = 0;
FILE *f = fopen( filename, "w" );
if (f) {
int i, x, y;
const GLubyte *ptr = buffer;
const GLushort *ptr = buffer;
if (binary) {
fprintf(f,"P6\n");
fprintf(f,"# ppm-file created by osdemo.c\n");
@@ -200,9 +206,10 @@ write_ppm(const char *filename, const GLubyte *buffer, int width, int height)
for (y=height-1; y>=0; y--) {
for (x=0; x<width; x++) {
i = (y*width + x) * 4;
fputc(ptr[i], f); /* write red */
fputc(ptr[i+1], f); /* write green */
fputc(ptr[i+2], f); /* write blue */
/* just write 8 high bits */
fputc(ptr[i] >> 8, f); /* write red */
fputc(ptr[i+1] >> 8, f); /* write green */
fputc(ptr[i+2] >> 8, f); /* write blue */
}
}
}
@@ -216,7 +223,8 @@ write_ppm(const char *filename, const GLubyte *buffer, int width, int height)
for (y=height-1; y>=0; y--) {
for (x=0; x<width; x++) {
i = (y*width + x) * 4;
fprintf(f, " %3d %3d %3d", ptr[i], ptr[i+1], ptr[i+2]);
/* just write 8 high bits */
fprintf(f, " %3d %3d %3d", ptr[i] >> 8, ptr[i+1] >> 8, ptr[i+2] >> 8);
counter++;
if (counter % 5 == 0)
fprintf(f, "\n");
@@ -231,7 +239,7 @@ write_ppm(const char *filename, const GLubyte *buffer, int width, int height)
int main( int argc, char *argv[] )
{
void *buffer;
GLushort *buffer;
/* Create an RGBA-mode context */
#if OSMESA_MAJOR_VERSION * 100 + OSMESA_MINOR_VERSION >= 305
@@ -246,7 +254,7 @@ int main( int argc, char *argv[] )
}
/* Allocate the image buffer */
buffer = malloc( WIDTH * HEIGHT * 4 * sizeof(GLushort));
buffer = (GLushort *) malloc( WIDTH * HEIGHT * 4 * sizeof(GLushort));
if (!buffer) {
printf("Alloc image buffer failed!\n");
return 0;

View File

@@ -4,7 +4,7 @@
*
* Compile with something like this:
*
* gcc osdemo32.c -I../include -L../lib -lOSMesa32 -lm -o osdemo32
* gcc osdemo32.c -I../../include -L../../lib -lglut -lGLU -lOSMesa32 -lm -o osdemo32
*/
@@ -127,6 +127,11 @@ static void render_image( void )
glPopMatrix();
/* This is very important!!!
* Make sure buffered commands are finished!!!
*/
glFinish();
gluDeleteQuadric(qobj);
{
@@ -189,13 +194,13 @@ write_targa(const char *filename, const GLfloat *buffer, int width, int height)
static void
write_ppm(const char *filename, const GLubyte *buffer, int width, int height)
write_ppm(const char *filename, const GLfloat *buffer, int width, int height)
{
const int binary = 0;
FILE *f = fopen( filename, "w" );
if (f) {
int i, x, y;
const GLubyte *ptr = buffer;
const GLfloat *ptr = buffer;
if (binary) {
fprintf(f,"P6\n");
fprintf(f,"# ppm-file created by osdemo.c\n");
@@ -205,10 +210,17 @@ write_ppm(const char *filename, const GLubyte *buffer, int width, int height)
f = fopen( filename, "ab" ); /* reopen in binary append mode */
for (y=height-1; y>=0; y--) {
for (x=0; x<width; x++) {
int r, g, b;
i = (y*width + x) * 4;
fputc(ptr[i], f); /* write red */
fputc(ptr[i+1], f); /* write green */
fputc(ptr[i+2], f); /* write blue */
r = (int) (ptr[i+0] * 255.0);
g = (int) (ptr[i+1] * 255.0);
b = (int) (ptr[i+2] * 255.0);
if (r > 255) r = 255;
if (g > 255) g = 255;
if (b > 255) b = 255;
fputc(r, f); /* write red */
fputc(g, f); /* write green */
fputc(b, f); /* write blue */
}
}
}
@@ -221,8 +233,15 @@ write_ppm(const char *filename, const GLubyte *buffer, int width, int height)
fprintf(f,"255\n");
for (y=height-1; y>=0; y--) {
for (x=0; x<width; x++) {
int r, g, b;
i = (y*width + x) * 4;
fprintf(f, " %3d %3d %3d", ptr[i], ptr[i+1], ptr[i+2]);
r = (int) (ptr[i+0] * 255.0);
g = (int) (ptr[i+1] * 255.0);
b = (int) (ptr[i+2] * 255.0);
if (r > 255) r = 255;
if (g > 255) g = 255;
if (b > 255) b = 255;
fprintf(f, " %3d %3d %3d", r, g, b);
counter++;
if (counter % 5 == 0)
fprintf(f, "\n");
@@ -237,7 +256,7 @@ write_ppm(const char *filename, const GLubyte *buffer, int width, int height)
int main( int argc, char *argv[] )
{
void *buffer;
GLfloat *buffer;
/* Create an RGBA-mode context */
#if OSMESA_MAJOR_VERSION * 100 + OSMESA_MINOR_VERSION >= 305
@@ -252,7 +271,7 @@ int main( int argc, char *argv[] )
}
/* Allocate the image buffer */
buffer = malloc( WIDTH * HEIGHT * 4 * sizeof(GLfloat));
buffer = (GLfloat *) malloc( WIDTH * HEIGHT * 4 * sizeof(GLfloat));
if (!buffer) {
printf("Alloc image buffer failed!\n");
return 0;

View File

@@ -56,7 +56,7 @@
#include <string.h>
#include <GL/glut.h>
#include <GL/glext.h>
#include "readtex.c" /* I know, this is a hack. */
#include "readtex.h"
#define TEXTURE_FILE "../images/girl.rgb"

View File

@@ -79,7 +79,6 @@ static float float_rand(void) { return rand() / (float) RAND_MAX; }
#define MEAN_VELOCITY 3.0
#define GRAVITY 2.0
#define TIME_DELTA 0.025 /* The speed of time. */
/* Modeling units of ground extent in each X and Z direction. */
#define EDGE 12
@@ -114,6 +113,13 @@ updatePointList(void)
float distance;
int i;
static double t0 = -1.;
double dt, t = glutGet(GLUT_ELAPSED_TIME) / 1000.0;
if (t0 < 0.0)
t0 = t;
dt = t - t0;
t0 = t;
motion = 0;
for (i=0; i<numPoints; i++) {
distance = pointVelocity[i][0] * theTime;
@@ -139,9 +145,9 @@ updatePointList(void)
pointTime[i] = 0.0; /* Reset the particles sense of up time. */
}
motion = 1;
pointTime[i] += TIME_DELTA;
pointTime[i] += dt;
}
theTime += TIME_DELTA;
theTime += dt;
if (!motion && !spin) {
if (repeat) {
makePointList();
@@ -264,7 +270,7 @@ menu(int option)
case 0:
makePointList();
break;
#if GL_ARB_point_parameters
#ifdef GL_ARB_point_parameters
case 1:
glPointParameterfvARB(GL_POINT_DISTANCE_ATTENUATION_ARB, constant);
break;
@@ -281,7 +287,7 @@ menu(int option)
case 5:
blend = 0;
break;
#if GL_ARB_point_parameters
#ifdef GL_ARB_point_parameters
case 6:
glPointParameterfARB(GL_POINT_FADE_THRESHOLD_SIZE_ARB, 1.0);
break;

View File

@@ -146,10 +146,10 @@ static void printhelp(void)
printstring(GLUT_BITMAP_TIMES_ROMAN_24,"Help");
glRasterPos2i(60,390);
printstring(GLUT_BITMAP_TIMES_ROMAN_24,"h - Togle Help");
printstring(GLUT_BITMAP_TIMES_ROMAN_24,"h - Toggle Help");
glRasterPos2i(60,360);
printstring(GLUT_BITMAP_TIMES_ROMAN_24,"f - Togle Fog");
printstring(GLUT_BITMAP_TIMES_ROMAN_24,"f - Toggle Fog");
glRasterPos2i(60,330);
printstring(GLUT_BITMAP_TIMES_ROMAN_24,"Arrow Keys - Rotate");
glRasterPos2i(60,300);

View File

@@ -269,13 +269,13 @@ printhelp(void)
printstring(GLUT_BITMAP_HELVETICA_18, "Help");
glRasterPos2i(60, 390);
printstring(GLUT_BITMAP_HELVETICA_12, "h - Togle Help");
printstring(GLUT_BITMAP_HELVETICA_12, "h - Toggle Help");
glRasterPos2i(60, 370);
printstring(GLUT_BITMAP_HELVETICA_12, "f - Togle Fog");
printstring(GLUT_BITMAP_HELVETICA_12, "f - Toggle Fog");
glRasterPos2i(60, 350);
printstring(GLUT_BITMAP_HELVETICA_12, "b - Togle Back face culling");
printstring(GLUT_BITMAP_HELVETICA_12, "b - Toggle Back face culling");
glRasterPos2i(60, 330);
printstring(GLUT_BITMAP_HELVETICA_12, "p - Togle Wire frame");
printstring(GLUT_BITMAP_HELVETICA_12, "p - Toggle Wire frame");
glRasterPos2i(60, 310);
printstring(GLUT_BITMAP_HELVETICA_12, "Arrow Keys - Rotate");
glRasterPos2i(60, 290);
@@ -286,7 +286,7 @@ printhelp(void)
glRasterPos2i(60, 250);
if (joyavailable)
printstring(GLUT_BITMAP_HELVETICA_12,
"j - Togle jostick control (Joystick control available)");
"j - Toggle jostick control (Joystick control available)");
else
printstring(GLUT_BITMAP_HELVETICA_12,
"(No Joystick control available)");
@@ -300,11 +300,11 @@ printhelp(void)
glRasterPos2i(60, 190);
printstring(GLUT_BITMAP_HELVETICA_12,
"1 - Togle the plane texture map window");
"1 - Toggle the plane texture map window");
glRasterPos2i(60, 170);
printstring(GLUT_BITMAP_HELVETICA_12,
"2 - Togle the sphere texture map window");
"2 - Toggle the sphere texture map window");
}
static GLboolean

View File

@@ -9,9 +9,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <GL/glut.h>
#include "../util/readtex.c" /* a hack, I know */
#include "readtex.h"
#define IMAGE_FILE "../images/girl.rgb"

View File

@@ -31,8 +31,8 @@
#include <stdio.h>
#include <stdlib.h>
#include "GL/glut.h"
#include "../util/showbuffer.c"
#include "../util/readtex.c"
#include "showbuffer.h"
#include "readtex.h"
#define DEG2RAD (3.14159/180.0)
@@ -318,8 +318,14 @@ static void draw_scene( void )
static void idle( void )
{
spin += 2.0;
yrot += 3.0;
static double t0 = -1.;
double dt, t = glutGet(GLUT_ELAPSED_TIME) / 1000.0;
if (t0 < 0.0)
t0 = t;
dt = t - t0;
t0 = t;
spin += 60.0 * dt;
yrot += 90.0 * dt;
glutPostRedisplay();
}

View File

@@ -13,9 +13,15 @@
static GLfloat Phi = 0.0;
static void Idle(void)
static void Idle( void )
{
Phi += 0.1;
static double t0 = -1.;
double dt, t = glutGet(GLUT_ELAPSED_TIME) / 1000.0;
if (t0 < 0.0)
t0 = t;
dt = t - t0;
t0 = t;
Phi += 3.0 * dt;
glutPostRedisplay();
}

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