Compare commits

...

222 Commits

Author SHA1 Message Date
Brian Paul
0321dac2cd update 6.5.1 release date 2006-09-16 04:13:20 +00:00
Brian Paul
a3a640171f added #ifdef tests for Windows for int64_t, uint64_t 2006-09-16 04:10:56 +00:00
Brian Paul
8636981646 replace GLAPI w/ static and init var to 0 (Michel Donais) 2006-09-15 19:00:37 +00:00
Keith Whitwell
54d3ab4878 npot version of redbook/mipmap.c 2006-09-15 10:41:54 +00:00
Ian Romanick
a3b99fcb56 Use correct opcodes for GLX_EXT_texture_from_pixmap.
Set the correct opcodes for GLX_EXT_texture_from_pixmap functions.  Changes
to the glproto package and the core X server are also required.
2006-09-14 21:07:17 +00:00
Brian Paul
eee85373c7 set 6.5.1 release date 2006-09-14 20:31:13 +00:00
Jerome Glisse
3dcf23171d Fallback if ColorLogicOp is enabled. Cleanup a bit the fallback
function.
2006-09-14 17:44:58 +00:00
Michel Dänzer
8c9366a807 Remove MESA_LITTLE_ENDIAN guard for code that seems to work fine on big endian. 2006-09-14 16:17:06 +00:00
Keith Whitwell
657f738ea2 VS nr of urb entries is constrained to be one of a fixed set of values,
specifically {8,16,32}.
2006-09-14 10:37:09 +00:00
Roland Scheidegger
6babf624b7 always use argb8888 instead of rgba8888, this is far more likely to hit a faster memcopy path in mesa (at least on little endian systems, possibly on big endian too) 2006-09-13 23:56:09 +00:00
Roland Scheidegger
2e2a981335 detect some more cases which can use straight memcpy for _mesa_texstore_rgba8888 2006-09-13 23:51:39 +00:00
Roland Scheidegger
99e0236046 Always mark tex state atom as dirty when the texture image is dirty, this ensures texture cache gets flushed in case the new texture has the same offset as the old one (fixes glean pixelFormat test at least on r200). 2006-09-13 23:20:10 +00:00
Brian Paul
43aa034084 updated comment 2006-09-13 22:49:48 +00:00
Roland Scheidegger
888b1a9166 don't use derived value _ColorLogicOpEnabled as it's not current by the time we call the blend/logic op functions. Fixes glean logicOp test on r200. 2006-09-13 22:41:46 +00:00
Brian Paul
fd2e402359 added GL_CURRENT_RASTER_SECONDARY_COLOR query (OpenGL 2.1) 2006-09-13 21:02:32 +00:00
Brian Paul
bd5331f9e8 just comments and const qualifiers 2006-09-13 20:26:43 +00:00
Brian Paul
ac1d7370a7 fix broken do_EXP() 2006-09-13 20:14:24 +00:00
Roland Scheidegger
cb08dcbbf2 fix GL_REFLECTION_MAP texgen by not using tex matrix negation when lighting is not enabled (?). This fixes demos/cubemap as well as glean texCube test. 2006-09-13 17:35:44 +00:00
Roland Scheidegger
87d6028f28 make sure we upload the new vertex program if the program string changes. 2006-09-13 17:30:11 +00:00
Brian Paul
25d59d2962 make triangle smoothing a sw fallback (Martign van Oosterhout) 2006-09-13 16:41:25 +00:00
Jerome Glisse
323414940f Fix compilation warning. 2006-09-12 18:52:13 +00:00
Jerome Glisse
6a65e6db3d Removing some of r200 dependency, cleaning up code a bit,
and fixing a couple of warning. More cleanup and shuffle
to come. I have tested this change they might broke things
especialy with r300_texstate.c change (format_x doesn't
seems to be use at all by r300).
2006-09-12 18:34:43 +00:00
Keith Whitwell
b1cb39d8bd quieten debug 2006-09-12 14:27:57 +00:00
Keith Whitwell
16a22a5f4a Potential fix for doom3 lockups. Seems that there is a conflict
between the vertex cache, the vertex shader and the clipping stages,
all of which are competitors for URB entries assigned to the VS unit.
This change reduces the maximum number of clip and VS threads by
enough to ensure that they cannot consume all the available URB
entries, and then reduces the number somewhat more up to an arbitary
amount I discovered by trial and error.  Unfortunately trial and error
solutions don't inspire total confidence...
2006-09-12 13:54:31 +00:00
Keith Whitwell
72e810db9d Disassemble active program when DEBUG_VS is set. 2006-09-12 13:51:09 +00:00
Keith Whitwell
7b8c73460f Add code to tweak aubfile state and primitives on replay. 2006-09-12 13:50:22 +00:00
Keith Whitwell
e1ae10db2c Encode a unique id in the aub header date fields. 2006-09-12 13:43:10 +00:00
Brian Paul
bd38df11f4 Win32 fixes (SF bug 1554931) 2006-09-11 16:39:04 +00:00
Brian Paul
31a66ada72 undo some accidental changes in _mesa_is_legal_format_and_type() 2006-09-11 15:25:49 +00:00
Brian Paul
02aa5fba03 init accum buffer fields in _mesa_update_framebuffer_visual() 2006-09-11 15:04:23 +00:00
Roland Scheidegger
25847f2b5b remove code to deal with non-normalized texture coordinates for tex rect targets (swtcl tex coord translation stage, tcl tex matrix adaption) and use the chip's native handling of such coords instead (!!!). Seems noone noticed those bits in the se_coord_fmt reg, even though it works fairly similar to r200 (except it's set per-unit and always active, so only enable it for texture rectangles). 2006-09-10 19:19:13 +00:00
Brian Paul
cb53555058 Redefine the BYTE_TO_FLOAT() and SHORT_TO_FLOAT() macros to avoid problems
converting 0 to exactly 0.0
This goes against the OpenGL spec (see table 2.6) but solves problems
when doing byte -> float -> ubyte conversion for particular texture formats.
2006-09-10 17:42:57 +00:00
Brian Paul
ef8244df1a don't use xmesa_DrawPixels_8R8G8B() if there's a software alpha channel 2006-09-10 17:10:36 +00:00
Roland Scheidegger
7998962444 cause a raster fallback if a yuv texture is used on texture unit > 0 as yuv conversion appears only to work on first unit. 2006-09-10 13:48:51 +00:00
Keith Whitwell
02df36f394 Basic facility for playing back captured aubfiles. Requires a small
hack to the drm to disable command verification on the cmd_buffer
ioctl.  Doesn't exactly replay as commands are normally delivered as
batchbuffers but are captured and replayed as commands on the ring.
2006-09-08 10:36:32 +00:00
Roland Scheidegger
a5e73e6887 cause a vtxfmt fallback directly when hitting NewList for radeon and r200 drivers, otherwise we'll mix up tcl and vtxfmt path for some reason. This fixes a warzone2100 asssertion failure. 2006-09-08 00:54:55 +00:00
Keith Whitwell
3e05902d30 Consistent return values from the bm* functions.
Get aubfile generation working again.
2006-09-07 19:58:16 +00:00
Keith Whitwell
493b2ddecb Cope with memory pool fragmentation by allowing a second attempt at
rendering operations to take place after evicting all resident
buffers.

Cope better with memory allocation failures throughout the driver and
improve tracking of failures.
2006-09-07 19:05:40 +00:00
Keith Whitwell
c26f36c830 Add some asserts, fix some not-quite-bugs. 2006-09-07 18:28:35 +00:00
Keith Whitwell
e48db4430f Fix glitch with pool alignments. 2006-09-07 16:29:37 +00:00
Keith Whitwell
1456a0fff6 Use lower alignments where possible. Also pad out allocated blocks to
a multiple of alignment to avoid accumulating unusable free blocks.
2006-09-07 16:23:22 +00:00
Keith Whitwell
133f141680 Make sure bmBufferOffset is called for all active buffers every time
we render.  Currenly requires that some state be re-examined after
every LOCK_HARDWARE().
2006-09-07 16:09:50 +00:00
Roland Scheidegger
c5cb8e2c6f make really sure R200_VAP_PROG_VTX_SHADER_ENABLE is never set when we're already in a tcl fallback, otherwise the chip will instantly lock up when vertex progs are enabled the next time not in a tcl fallback (fixes for instance guaranteed lockup running any program which uses vertex progs with tcl_mode=0 and then later with tcl_mode=1). 2006-09-07 13:34:29 +00:00
Roland Scheidegger
28e7219b96 only allow VERT_ATTRIB_MAX instead of _TNL_ATTRIB_MAX for inputs of vertex programs (fixes a segfault since the result of the shift is undefined otherwise, and it may happen that _TNL_ATTRIB_POINTSIZE will be tried to read, unlike all other attribs this however may be unitialized (might be a bug in itself)). 2006-09-07 13:26:44 +00:00
Eric Anholt
d016d4e70f Fix a leak of the screen's option cache on cleanup (copied from radeon). 2006-09-07 06:02:00 +00:00
Keith Whitwell
14ec34d647 Simplify the immediate and displaylist code. Treat VertexAttrib*ARB
as non-aliasing and cope with the >32 attributes that result, taking
materials into account.
2006-09-06 18:30:00 +00:00
Brian Paul
2216aac8ea comment out EXTRA_LIB_PATH, ?= causes problems on HP-UX 2006-09-06 13:56:26 +00:00
Brian Paul
bb2180dca3 Fixes from Christopher Bell:
Use -O instead of +O3 or +O2.
Remove +Oaggressive.
Replace -Aa with -Ae.
2006-09-06 13:49:17 +00:00
Brian Paul
7d767604c7 remove stray tab 2006-09-06 13:44:57 +00:00
Brian Paul
d9aebd8498 for VERTEX_ATTRIB_WEIGHT, use break, not return 2006-09-06 05:03:47 +00:00
Brian Paul
4a901667e5 document vertex.weight hack 2006-09-05 23:20:58 +00:00
Brian Paul
3a55750d48 Hack for Warcraft (bug 8060): allow 'vertex.weight' to be referenced in
vertex program, even though it's not really supported.  Results will be
undefined, but Warcraft doesn't actually use the attribute.
2006-09-05 23:15:29 +00:00
Brian Paul
43cc1dc18f fix typo in enable_parser_extensions(): s/point_parameters/vertex_blend/ 2006-09-05 23:11:09 +00:00
Brian Paul
a088f160b3 Consolidate common case of _mesa_set_program_error() followed by _mesa_error()
in new program_error() function.
Add const qualifiers in many places.
Reorder some debug code to prevent referencing free'd memory.
2006-09-05 23:08:51 +00:00
Brian Paul
1f03339f1c updated info about glxproto.h 2006-09-05 18:23:21 +00:00
Keith Whitwell
d5cbb49c22 Dynamically allocate instruction store for tnl programs according to
requirements.
2006-09-05 10:01:24 +00:00
Keith Whitwell
74b2166ff8 Fixes for calculating point attenuation 2006-09-04 23:34:36 +00:00
Keith Whitwell
f65ad97469 Don't export NV_vertex_program as it's not supported, it confuses
glean, and we no longer need to export it to keep Mesa happy as we did
at one time.
2006-09-04 18:27:40 +00:00
Rune Petersen
ac7ea94030 Managed to make a commit that can't build... Sorry again... 2006-09-04 16:20:16 +00:00
Brian Paul
c78e895f09 get rid of GL_BOOLEAN definition (bug 8113) 2006-09-04 14:07:04 +00:00
Jouk Jansen
e08557ad8a OpenVMS compile support update
(previous commit did send the wrong file to the CVS)

 Modified Files:
 	Mesa/include/GL/vms_x_fix.h
2006-09-04 06:26:08 +00:00
Jouk Jansen
8cf3c85fd7 OpenVMS compile support update
Modified Files:
 	Mesa/include/GL/vms_x_fix.h
2006-09-04 06:22:39 +00:00
Roland Scheidegger
014bfda235 fog state atom contains (only) fog params necessary for tcl. Must not be emitted if vertex progs are enabled as it overlaps vertex param #94. 2006-09-04 00:57:39 +00:00
Rune Petersen
5300e8242f add missing change to skip low impact RAST fallback...
Sorry.
2006-09-03 20:31:52 +00:00
Roland Scheidegger
5b4e7cdca4 fix the presumably broken check for the allow_large_textures and vblank_mode options (same as bug 8042). 2006-09-01 23:36:30 +00:00
Roland Scheidegger
91650469ae make sure vertex programs are only enabled on the hw when they are really enabled, not just when a program enables vertex progs (could still be not enabled due to some error). Otherwise the hw potentially would try to execute a not valid (not set up at all) vertex program, likely leading to lockups. Hopefully fixes #8060. 2006-09-01 20:21:12 +00:00
Keith Whitwell
6ec2d37ae8 Catch a few more cases of using a message reg as an instruction source
arg.
2006-09-01 14:57:19 +00:00
Keith Whitwell
db0e53af74 fix a couple of cases where a message reg is used as an instruction source. 2006-09-01 14:18:06 +00:00
Ian Romanick
75faa1e19a Add API description for GLX_SGI_swap_control. 2006-08-31 20:50:43 +00:00
Ian Romanick
d6c675f497 Fix problems with vertex program protocol
There were two sets of bugs in the vertex program (ARB and NV)
protocol.  First, several of the ARB functions were missing the
'doubles_in_order="true"' annotation.  Second, after the ARB decided
that glVertexAttrib*ARB functions must not alias fixed-function state
for GLSL, Nvidia re-assigned GLX protocol opcodes for
glVertexAttrib*NV (circa Septeber 2004).  For some reason gl_API.xml
was never updated to reflect this, and the updated version of the
GL_NV_vertex_program spec never made into the registry.
2006-08-31 20:41:16 +00:00
Rune Petersen
934a2dcf0f re-apply shader fix.
appears to have been reverted by mistake.
2006-08-31 18:19:50 +00:00
Brian Paul
d9cb0fc44d version bump 2006-08-31 17:54:31 +00:00
Keith Whitwell
b237d7fa14 When using the old technique to set up the front buffer mapping, there
is no need to add front.offset to sPriv->pFB, it seems.  Fixes several
glean issues and frontbuffer rendering generally.
2006-08-31 17:24:55 +00:00
Brian Paul
6c44c53e06 update link 2006-08-31 15:19:44 +00:00
Brian Paul
c09458c133 remove VERSIONS from tarballs 2006-08-31 15:18:04 +00:00
Brian Paul
761d87485e updated 6.5.1 relnotes link 2006-08-31 15:17:43 +00:00
Brian Paul
e2859ea6ef Convert VERSIONS and RELNOTES-6.5.1 to html, update links to them. 2006-08-31 15:16:10 +00:00
Rune Petersen
3cbfef3917 Give the user posibility to choose speed over correctness.
It does 2 things:
1) Allows you to disable S3TC, wine-games sometimes need S3TC enabled.
2) Disable fallbacks that usually have low impact.
2006-08-31 15:15:29 +00:00
Brian Paul
52e36cd8d9 check if ext->name is null before strcmp() 2006-08-31 13:58:08 +00:00
Roland Scheidegger
901f83f14e do not abort with not supported vertex prog output configuration, fallback instead 2006-08-31 01:10:07 +00:00
Brian Paul
7986cfbee0 remove extension defines/protos that are now in glext.h 2006-08-30 23:50:31 +00:00
Brian Paul
3cd07d2c39 latest version from OpenGL ARB 2006-08-30 23:46:41 +00:00
Karl Schultz
cdb12bd0ae Handle API and dispatch table changes that removed a bunch of extension entry points. 2006-08-30 23:45:32 +00:00
Brian Paul
c6f8176b3f make prog2 a legal program (texture reference fix) 2006-08-30 23:40:53 +00:00
Brian Paul
b7fc1c32f8 Check that we don't try to reference more than one target of a texture unit.
For example, referencing both "texture[0], 2D" and "texture[0], CUBE" in one
program is an error.
2006-08-30 23:38:03 +00:00
Brian Paul
f6de865e56 s/0/VERT_RESULT_HPOS/ 2006-08-30 23:36:52 +00:00
Ian Romanick
a70d56485a Add missing parenthesis so that glXSwapIntervalSGI protocol is
correctly generated.
2006-08-30 23:15:02 +00:00
Michal Krol
c7f571eb7e Add missing vec4 instructions to the interpreter.
Other cosmetic changes.
2006-08-30 22:36:29 +00:00
Brian Paul
8a4366717a fix Xlib driver mem leaks 2006-08-30 22:04:09 +00:00
Brian Paul
6c06ce281a Use XAddExtension() to register an XCloseDisplay() callback function.
When the callback is called, free all Mesa's private visual and buffer
data structures which are tied to the display.
Fixes problems reported by Kitware.
2006-08-30 21:17:51 +00:00
Brian Paul
12a5f812fc init a local var to silence warning 2006-08-30 19:02:45 +00:00
Roland Scheidegger
a974aaaa3e Minor r200 vertex program cleanups. Remove disabled leftovers from r300 vertex program code. Fix authors. Correct slightly wrong check to determine if ran out of temps. Simplify check to determine if ran out of max instructions. Correctly report used native temps. Always kick off program translation when ProgramStringNotify is called (otherwise the reported native resources used queried might be wrong). 2006-08-30 13:44:31 +00:00
Roland Scheidegger
e6de1edaf0 fix initialization of native resource usage of vertex/fragment programs 2006-08-30 11:55:18 +00:00
Roland Scheidegger
ef3f00f67e fix typo causing a segfault when a vertex program uses more than 96 parameters 2006-08-30 10:26:31 +00:00
Brian Paul
8334c8a216 Move call to _swrast_update_rasterflags() since it depends on the
results of _swrast_update_fog_state().
Fixes bug where first frame of progs/samples/fog.c does not show fog.
2006-08-29 22:32:31 +00:00
Brian Paul
f7c4dc007f _mesa_debug() should be a no-op when not compiled with DEBUG defined. 2006-08-29 22:30:58 +00:00
Brian Paul
398471429b set 6.5.1 release to Aug 31 2006-08-29 21:56:59 +00:00
Brian Paul
70c2d51230 remove assertion that referenced &glSetFenceNV for debug test 2006-08-29 21:54:01 +00:00
Brian Paul
0aab798a18 replace abort with _mesa_problem() 2006-08-29 19:09:57 +00:00
Ian Romanick
8d675aa637 Deprecate GL_EXT_vertex_weighting.
Nvidia no longer supports this extension, and they no longer export its
entry points from their libGL.  There's no reason for us to keep dragging it
around either.
2006-08-29 17:44:45 +00:00
Ian Romanick
dfdd0b4f30 More static dispatch function removal.
Make functions for the following extensions available only via
glXGetProcAddress.  In cases where there are other aliases to the same
functions (e.g., between GL_EXT_histogram and GL_ARB_imaging), the alias
functions may still be statically exported.

    - GL_ATI_blend_equation_separate
    - GL_EXT_blend_equation_separate
    - GL_EXT_convolution
    - GL_EXT_color_sub_table
    - GL_EXT_cull_vertex
    - GL_EXT_depth_bounds_test
    - GL_EXT_framebuffer_blit
    - GL_EXT_histogram
    - GL_EXT_multisample
    - GL_EXT_stencil_two_side
    - GL_EXT_timer_query
    - GL_IBM_multimode_draw_arrays
    - GL_INGR_blend_func_separate
    - GL_NV_fence
    - GL_SGI_color_table
    - GL_SGIS_multisample
    - GL_SGIS_pixel_texture
    - GL_SGIS_point_parameters
    - GL_SGIX_pixel_texture
2006-08-29 16:43:44 +00:00
Ian Romanick
fc5b57b713 Clean up GLX function exports.
Make functions for the following extensions only accessable via
glXGetProcAddress:

    - GLX_EXT_texture_from_pixmap
    - GLX_MESA_copy_sub_buffer
    - GLX_MESA_release_buffers
    - GLX_MESA_swap_control
    - GLX_MESA_swap_frame_usage
    - GLX_OML_sync_control
    - GLX_SGI_make_current_read
    - GLX_SGI_swap_control
    - GLX_SGI_video_sync
    - GLX_SGIX_swap_barrier
    - GLX_SGIX_swap_group

Removed all remnants of the following extensions:

    - GLX_MESA_set_3dfx_mode
    - GLX_SGI_cushion
    - GLX_SGIX_dmbuffer
    - GLX_SGIX_video_resize
    - GLX_SGIX_video_source
    - GLX_SUN_get_transparent_index
    -
2006-08-29 15:38:19 +00:00
Roland Scheidegger
af1dc7e487 move initialization code aroudn so glPointParameter isn't called before checking the extension is present 2006-08-28 21:19:34 +00:00
Brian Paul
b5a2fc1255 Check mesa_vp->Base.NumInstructions == 0 instead of mesa_vp->Base.String to
determine if we actually have a program.  See "[r300] TCL fallback with Quake3".
2006-08-28 19:42:41 +00:00
Ian Romanick
258751f4a0 Add two new gl_function methods. dispatch_name returns the name of
the true static dispatch name (either the glFooBar name or the
gl_dispatch_stub_XXX name).  static_name returns the name of the
static function for a specific alias of a GL function.

Adding (and using) these two functions corrects some problems in the
generated code related to functions with multiple aliases where some
of the aliases have true static dispatch functions and some don't.  I
have verified that everything under progs, except xdemos/xdemo,
correctly link.  I did this by doing 'make linux-dri-x86-64
PROGRAM_DIRS="demos redbook samples xdemos tests"'.
2006-08-28 17:40:45 +00:00
Ian Romanick
0bb27c084d Add dependencies for all API XML files. 2006-08-28 17:35:54 +00:00
Brian Paul
e5bc35dd97 remove unused var 2006-08-28 15:16:49 +00:00
Brian Paul
e365b82be1 fix the check for force_s3tc_enable (bug 8042) 2006-08-28 15:16:36 +00:00
Brian Paul
b9ac4afff7 omit installmesa script from tarballs 2006-08-28 15:12:07 +00:00
Brian Paul
a394f546a4 check for GL_ARB_point_parameters 2006-08-28 14:20:19 +00:00
Aapo Tahkola
9cb82f7917 close #6318 2006-08-27 13:24:36 +00:00
Sean D'Epagnier
a38aef93ab The colormap code is now simpler, 15bpp works where it did not before.
The input is fixed so that delete reports '\b' and backspace 127

The vt switching works both right and left.
2006-08-27 01:16:09 +00:00
Ian Romanick
7e9737b370 Explicitly store the names for each function that should have a static
entry point generated.  This allows us to do things like generate a
static entry point for glPointParameterfvARB but not for
glPointParameterfvSGIS.
2006-08-26 21:26:55 +00:00
Alan Hourihane
092d14be92 Fix bug 8010 - locking issues. 2006-08-26 21:21:34 +00:00
Aapo Tahkola
2fd72a7844 fix #8008 2006-08-26 16:24:04 +00:00
Brian Paul
0c46a12365 delete buffers, destroy window upon exit 2006-08-25 22:13:08 +00:00
Brian Paul
6827cf4d9a include texobj.h to silence warning 2006-08-25 22:08:43 +00:00
Brian Paul
96ee800cd4 6.5.1 bug fixes 2006-08-25 22:07:40 +00:00
Brian Paul
4277ea4c0b Error detection/reporting was broken in several places. 2006-08-25 22:06:02 +00:00
Ian Romanick
3fea5910b9 Add a couple of the missing GL 2.0 functions. Enable GLX protocol for
glBlendEquationSeparateEXT.  Add missing enum "get" information for
GL_EXT_texture_filter_anisotropic.
2006-08-25 19:57:37 +00:00
Brian Paul
58d080b025 Free vertex program TnlData, if any. Fixes a mem leak. 2006-08-25 19:46:31 +00:00
Brian Paul
473f1aca7f clamp result.depth to [0,1] if written to 2006-08-25 19:45:31 +00:00
Brian Paul
439d59926a Remove XFree86 CVS keyword. 2006-08-25 18:07:49 +00:00
Brian Paul
a360bc31da Rearrange glBindProgram() code to do all error checking before changing
the binding.  Prevent a potential dangling pointer error.  SF Bug 1544507.
2006-08-25 17:18:56 +00:00
Brian Paul
4bae9a48ec In _save_End(), set CurrentExecPrimitive = PRIM_OUTSIDE_BEGIN_END if
we're in GL_COMPILE_AND_EXECUTE mode.
This fixes bug 7984.
2006-08-25 15:44:09 +00:00
Brian Paul
f38ac5fbac improved comments 2006-08-25 15:42:37 +00:00
Brian Paul
3c54e8376d Rename _mesa_append_modelview_code() to _mesa_insert_mvp_code().
The four DP4 instructions are now inserted at the top of the program
instead of appended to tail.
2006-08-25 15:15:24 +00:00
Brian Paul
383c39e58e use _mesa_alloc_instructions() 2006-08-25 15:14:25 +00:00
Brian Paul
9983a27cbe added _mesa_alloc_instructions() utility function 2006-08-25 15:13:25 +00:00
Ian Romanick
a574c804a0 Add missing enums for GL_SGI_color_table. 2006-08-25 00:56:34 +00:00
Brian Paul
e53e0f47d0 recent bug fixes 2006-08-24 23:37:36 +00:00
Brian Paul
6211a14137 update MAX_INSTRUCTIONS limit 2006-08-24 23:37:13 +00:00
Brian Paul
ebf58ea3a3 According to GL_NV_fragment_program, max frag prog length is 1024 instructions.
Updated MAX_NV_FRAGMENT_PROGRAM_INSTRUCTIONS to 1024.
2006-08-24 23:28:01 +00:00
Brian Paul
77427a1e52 Cg tries to bind NV fragment programs to the GL_FRAGMENT_PROGRAM_ARB target
with glBindProgramARB().  I guess the GL_ARB_fragment_program specification
allows that, but Mesa didn't.
Relaxed the check with a new predicate function: compatible_program_targets().
2006-08-24 23:11:39 +00:00
Brian Paul
e6940f0a33 scalar sources such as 'time.x' weren't accepted by parser 2006-08-24 23:08:01 +00:00
Brian Paul
c6511ab950 Functions for vertex/fragment program transformations, optimizations, etc. 2006-08-24 22:11:40 +00:00
Brian Paul
beb32c4a59 fix bad casts, carry over r200 fix to check for null program string in r300_translate_vertex_shader() 2006-08-24 22:05:35 +00:00
Brian Paul
94ff996cae Check for NULL program string in r200_translate_vertex_program().
Fixes bug reported by Chris Rankin.
Added some new comments.
2006-08-24 22:03:38 +00:00
Brian Paul
a75439093c use _mesa_realloc_instructions() 2006-08-24 21:58:32 +00:00
Brian Paul
3b9b8de9b0 Added _mesa_realloc_instructions() utility function.
Fixed/updated comments for parameter list functions.
2006-08-24 21:57:36 +00:00
Ian Romanick
a5f2206077 GL_EXT_paletted_texture functions should alias GL_SGI_color_table functions.
The functions for GL_EXT_paletted_texture that do not share GLX
protocol with GL_ARB_imaging are supposed to alias the similar
functions from GL_SGI_color_table.  They didn't.  This patch corrects
this problem and enables GLX protocol for both extensions.

Since this removes 3 entries from the dispatch table, this change
creates a lot of changes in the generated files.
2006-08-24 21:42:38 +00:00
Ian Romanick
bf83e652f6 Add a new offset mode to the GL API XML. This mode, called "assign,"
tells the scripts to assign an available offset to the function.  The
important changes are in src/mesa/glapi/gl_XML.py and
src/mesa/glapi/*.xml.

Since the DRI drivers only depend on functions required by the ABI
(e.g., GL 1.2 + ARB_multitexture) having fixed offsets, all functions
not in the ABI use "assign" mode.  This has caused the offset of
basically every function outside the ABI to change.  I have verified
that a libGL with this patch works with a DRI driver without the patch.

Futher, several function were removed from the dispatch tables
altogether.  These are the functions for the following extensions:

	GL_SGIS_texture_filter4
	GL_SGIS_texture4D
	GL_SGIS_detail_texture
	GL_SGIS_sharpen_texture
	GL_SGIX_sprite
	GL_SGIX_instruments
	GL_SGIX_framezoom
	GL_SGIX_tag_sample_buffer
	GL_SGIX_reference_plane
	GL_SGIX_flush_raster
	GL_SGIX_list_priority
	GL_SGIX_fragment_lighting
	GL_PGI_misc_hints
	GL_EXT_index_material
	GL_EXT_index_func
	GL_3DFX_tbuffer

This removes 50 functions from the dispatch table.
2006-08-24 20:14:45 +00:00
Brian Paul
5947f8fd63 fix fragment.position initialization bug 2006-08-24 19:06:02 +00:00
Ian Romanick
ce9767f863 Make sure that _GNU_SOURCE is enabled in the linux configs that set
HAVE_POSIX_MEMALIGN.  This eliminates a compiler warning.  Also,
clean up some crufty linux-sparc* configs.
2006-08-24 18:06:37 +00:00
Keith Whitwell
39f222a421 add point-position.c 2006-08-24 17:49:37 +00:00
Keith Whitwell
28536e6c4f Test for fragment.position in points primitives. Currently renders
incorrectly on software mesa.
2006-08-24 17:48:53 +00:00
Brian Paul
83304326c8 added glut/mini/ sources to glut tarball 2006-08-24 17:01:35 +00:00
Brian Paul
116411d5f0 Check if mesa_vp->Base.Parameters is null before dereferencing (bug report
from Chris Rankin).
Also, fix some bad casts.
2006-08-24 15:57:12 +00:00
Ian Romanick
4169c220bd Fix some problems with the generation of the size tables. Enable
generation of protocol tables for Render.
2006-08-24 00:26:47 +00:00
Brian Paul
a95d5f0f58 silence warning 2006-08-23 23:18:39 +00:00
Brian Paul
4d12a05e6c Added _mesa_lookup_program() and _mesa_lookup_bufferobj() functions to avoid
a lot of casting elsewhere.
Use _mesa_lookup_texture() in tdfx driver, use _mesa_lookup_bufferobj() in r300
driver.
2006-08-23 23:10:14 +00:00
Ian Romanick
261a806f9e New script and API description file to enable generate of GLX protocol
decode tables in the server.
2006-08-23 20:32:48 +00:00
Brian Paul
d21ccb49c0 update glut fbdev sources list 2006-08-23 19:46:17 +00:00
Sean D'Epagnier
bd3e6ec066 VT switching now uses correct keys.
exiting when virtual screen size is larger than regular size doesn't corrupt screen.
colormap is reset when using stdin input on exit.
return is not reported as ctrl-m but '\r' as it should be
backspace keycode was incorrect and not working, fixed
2006-08-23 07:55:48 +00:00
Aapo Tahkola
43c9587ed4 remove duplicate pieces of code. 2006-08-22 22:27:32 +00:00
Aapo Tahkola
cafb0617ea extend some DrawRangeElements cases to support rendering more than 65535 verts in one blast. ut2k4 cases in other words ... 2006-08-22 21:54:50 +00:00
Aapo Tahkola
50eae3af7a fix broken write-only depth setting. use early z where possible. 2006-08-22 21:05:37 +00:00
Ian Romanick
723db7212c Correct the name of the GL_NV_texture_expand_normal extension. 2006-08-22 18:44:58 +00:00
Ian Romanick
d319edff1e The TLS dispatch functions for x86-64 are fixed-size, just like on
x86.  This means that the position of each dispatch function can be
calculated as (dispatch_offset * size_of_function) + glNewList.  This
allows us to not store the function pointers in glprocs_table_t.

This same optimization has been done for quite some time on x86.  We
could probably also do this for some cases of the SPARC dispatch as
well.
2006-08-22 18:22:20 +00:00
Ian Romanick
4e4b5f4008 Add new attribute called static_dispatch to the <function> element. This
boolean attribute, which defaults to true, determines whether or not a
static dispatch function is available in libGL for applications to link
against.

Ideally, any new functions that are not part of the ABI should not have
directly accessable dispatch functions.  This forces applications to use
glXGetProcAddress to access these functions.  By doing this we can
gracefully remove functions from libGL without breaking the linkage of
applications.

Note that the static dispatch functions are still generated.  However, they
are given names like gl_dispatch_stub_820 and are marked with the "hidden"
linker attribute.

All extension functions added since the previous Mesa release (6.5) have
been marked as 'static_dispatch="false"'.
2006-08-22 16:34:38 +00:00
Brian Paul
6423ec9145 move ALL_SOURCES to sources file 2006-08-21 16:05:30 +00:00
Brian Paul
b20814fd7d remove FBDEV_DRIVER_OBJECTS assignment (in sources file) 2006-08-21 15:50:41 +00:00
Brian Paul
d5299bf9a1 various updates 2006-08-21 14:26:06 +00:00
Michal Krol
1d67cad9af More GLSL preprocessor code:
Rename slang_version.syn to slang_pp_version.syn.
The #version directive understands version 120.
Cosmetic changes in version preprocessor.
Checks if requested version is supported by the compiler.
2006-08-21 09:25:11 +00:00
Michal Krol
798ef5ce33 GLSL 1.20 constructors and operators. 2006-08-21 08:47:28 +00:00
Roland Scheidegger
bd4c8ec0ec remove the now confusing option to manually enable software ARB_vp if drm is not new enough on r200 2006-08-19 08:54:03 +00:00
Sean D'Epagnier
c6fc823987 Removed ifeq from makefile, and corrected fbdev driver so it compiles 2006-08-19 00:28:36 +00:00
Brian Paul
cf4d2f7109 updates for 6.5.1 2006-08-18 20:24:54 +00:00
Brian Paul
92c43b110c Fix-ups for linux-fbdev config. No longer build Xlib driver sources. 2006-08-18 20:20:28 +00:00
Sean D'Epagnier
7e4152f0ed The driver now compiles correctly without any x headers or libraries installed
The bitmap and stroke code can't be shared with glx anymore because of this.

The model for the mini teapot is restored and I have tested it to work with
linux-fbdev and linux-solo

The driver recognizes 32bpp where there is no alpha (my radeon 7500)  It also
sets the correct number of cmap entrees (instead of 256 which can be an error)
2006-08-18 10:38:15 +00:00
Alan Hourihane
bd87c303e9 Fix writemasks on texture arb fp instructions.
Cleanup invarient state emission.
2006-08-18 09:04:48 +00:00
Brian Paul
c1c282f36a sort the FEATURE_ defines 2006-08-17 14:27:10 +00:00
Brian Paul
9dc90cd5f3 added FEATURE_EXT_timer_query and tests 2006-08-17 14:25:04 +00:00
Brian Paul
5928718475 change #ifdef to #if 2006-08-17 14:16:03 +00:00
Brian Paul
6206aec90a change tex memory allocation calls (debian bug 383209) 2006-08-16 20:53:39 +00:00
Ian Romanick
a7d0256745 When available, which is most of the time, use posix_memalign to implement
_mesa_align_malloc and friends.
2006-08-16 17:06:08 +00:00
Ian Romanick
ab6cf9dd62 Enable support for GL_EXT_gpu_program_parameters for R300. 2006-08-15 16:48:06 +00:00
Ian Romanick
8c41c757fe Add support for GL_EXT_gpu_program_parameters. Any driver that enables
either GL_ARB_vertex_program or GL_ARB_fragment_program should enable this
extension as well.
2006-08-15 16:47:34 +00:00
Ian Romanick
5208d93a41 Add test for GL_EXT_gpu_program_parameters. 2006-08-15 16:44:32 +00:00
Ian Romanick
daea717634 Remove extraneous trailing semicolon. 2006-08-15 16:26:34 +00:00
Brian Paul
37b5b01217 s/GLvoid/void/ to fix gcc 4.2 issue (bug 7875) 2006-08-15 14:28:03 +00:00
Michel Dänzer
061a3fe340 Bug #7169: Attempt to make libGL symbols visible to drivers.
Some applications end up dlopening libGL without RTLD_GLOBAL, so the libGL
symbols referenced by the driver can't be unresolved when libGL dlopens it.
This attempts to make the libGL symbols visible to the driver by dlopening
libGL (again) with RTLD_GLOBAL before dlopening the driver and dlclosing
the obtained handle afterwards.
2006-08-14 15:53:37 +00:00
Aapo Tahkola
24cd8e22f5 gcc-4.1.1 compile fix 2006-08-12 13:31:15 +00:00
Ian Romanick
357addfc45 Add comments explaining a couple "mystery" bits. 2006-08-12 00:11:05 +00:00
Ian Romanick
32a9e9be0c Fix white-space problem in the prototype for glBlitFramebufferEXT that
prevented gl_mangle.h from picking it up.
2006-08-12 00:05:54 +00:00
Ian Romanick
8fbe16d4dd Fix long standing bug that prevented newer drivers from working with
older libGL.  The data in extension_helper.h erroneous instructed
drivers to expect all functions with establised offsets, even those
not in the ABI, to have a specific offset allocated.  This is just
wrong.  A function is either in the ABI and has a set offset or a
function is not in the ABI and has a re-map offset.
2006-08-11 23:56:37 +00:00
Ian Romanick
56f349515c Convert comment header for __GLcontextModesRec to Doxygen style. 2006-08-11 22:26:49 +00:00
Aapo Tahkola
8ff5e37f58 support shorts as vertex data 2006-08-11 13:59:37 +00:00
Eric Anholt
2332812644 Add padding to match the current xf86-video-intel DDX->DRI interface. 2006-08-10 21:26:50 +00:00
Adam Jackson
3775b566fa mkdir -> mkdir -p, since /usr/include might not exist in the installroot yet 2006-08-10 20:24:50 +00:00
Adam Jackson
be85fde82b linux-indirect target fixes. 2006-08-10 20:19:57 +00:00
Brian Paul
b7a661cf8c 6.5.1 relnotes 2006-08-10 14:57:24 +00:00
Brian Paul
795e83f809 latest updates for 6.5.1 2006-08-10 14:54:19 +00:00
Alan Hourihane
a89b099c74 Fixup more PROGRAM_UNDEFINED problems. 2006-08-10 13:14:24 +00:00
Alan Hourihane
8d97265711 Fix some breakage after the PROGRAM_UNDEFINED change 2006-08-10 13:12:00 +00:00
Sean D'Epagnier
7196cddb3a Added initial multisampling support to glfbdev driver.
Fully implemented glutGameMode, and added vidresize stubs to make
Added support for glutReshapeDisplay to change video mode but not lose
current mesa context.
implementation glut 5 complient.
Fixed many minor bugs
Updated docs
2006-08-10 10:21:17 +00:00
Brian Paul
54e15d6585 finish up texstore for SL8 texture format 2006-08-10 04:14:05 +00:00
Michal Krol
7ba08ac45a GLSL 1.20 built-in library. 2006-08-09 21:22:59 +00:00
Michal Krol
edefc658e4 More GLSL code - more support for vec4 operations on x86 back-end. 2006-08-09 20:05:26 +00:00
Eric Anholt
9f344b3e7d Add Intel i965G/Q DRI driver.
This driver comes from Tungsten Graphics, with a few further modifications by
Intel.
2006-08-09 19:14:05 +00:00
Eric Anholt
7b52bed987 Add PROGRAM_FILE_MAX for i965 driver.
While here, make PROGRAM_UNDEFINED just the next value in the enum.
2006-08-09 19:10:23 +00:00
Brian Paul
46f20579a2 implement some of the sRGB texstore functions 2006-08-09 02:42:25 +00:00
Brian Paul
4b1e6a4b58 remove stray text from previous check-in 2006-08-07 14:09:13 +00:00
Sean D'Epagnier
6545ebbd8d Modified config to use glut/fbdev, added demo and sample directories. 2006-08-05 08:55:10 +00:00
Sean D'Epagnier
288d4b6ebe Modularized code into multiple files.
Added gamemode stubs, iconify support, joystick stubs.

Fixed color index mode, added 8 bit alpha blending, enabled cmaps even
with 15, 16, 24, and 32 depths as some fbdev drivers need this.

Fixed compiling with -ansi

Using SIGIO for keyboard input, so that vt switching is enabled even
if the program is locked.

Fixed numerous small bugs.
2006-08-05 08:24:29 +00:00
Brian Paul
0606ad45f6 fix typo, indentation 2006-08-04 22:09:43 +00:00
Karl Schultz
4818b0bea1 export new _mesa_* functions 2006-08-04 19:45:29 +00:00
Brian Paul
5c488dcab2 fix bug when pushing ReadBuffer state for GL_PIXEL_MODE_BIT 2006-08-04 13:41:25 +00:00
Claudio Ciccani
21dc092324 Handle GLUT_DEVICE_KEY_REPEAT,GLUT_OWN_JOYSTICK,GLUT_JOYSTICK_POLL_RATE in glutDeviceGet(). 2006-08-04 12:43:33 +00:00
Claudio Ciccani
3ab2dd9f91 Moved glutDeviceGet() to events.c.
Implemented glutIgnoreKeyRepeat() and glutSetKeyRepeat().
2006-08-04 10:49:43 +00:00
Brian Paul
0a4be70368 more work for GL_EXT_texture_sRGB. 2006-08-04 03:44:53 +00:00
Brian Paul
2eb00b4388 use WRITE_MASK_* instead of 0x1, 0x2, etc 2006-08-03 17:10:45 +00:00
Brian Paul
3163542841 Added a check to prevent rebuilding Mesa with a different configuration
without first doing 'make realclean'.
2006-08-03 16:58:06 +00:00
Brian Paul
9c3876d7d8 New wrapper functions: _mesa_dlopen(), _mesa_dlsym(), _mesa_dlclose().
Eventually move them into imports.c
2006-08-03 03:59:20 +00:00
Brian Paul
6c071592ab added GL_EXT_texture_sRGB 2006-08-03 03:23:05 +00:00
Brian Paul
8d214bc804 Initial work for GL_EXT_texture_sRGB. 2006-08-03 03:20:52 +00:00
Brian Paul
35fe7cfae4 fix link for Aqsis 2006-08-02 21:26:15 +00:00
Michal Krol
b60a3da43f Enable vec4 extension for x86 back-end. 2006-08-02 14:51:24 +00:00
Michal Krol
1616f5b621 Change fragment shader to utilize faster vec4 operations. 2006-08-02 14:46:50 +00:00
Michal Krol
7a70391575 Add test for vec4 extension. 2006-08-02 14:45:24 +00:00
Michal Krol
3b5e02cc7c Add vec4 extension. 2006-08-02 14:44:46 +00:00
Michal Krol
60ba2d88b3 Fix mmFindBlock function. 2006-08-02 14:22:06 +00:00
369 changed files with 82016 additions and 35019 deletions

View File

@@ -144,6 +144,10 @@ sunos5-v8-static \
sunos5-v9 \
sunos5-v9-static \
ultrix-gcc:
@ if [ -e configs/current ] ; then \
echo "Please run 'make realclean' before changing configs" ; \
exit 1 ; \
fi
(cd configs && rm -f current && ln -s $@ current)
$(MAKE) default
@@ -160,13 +164,11 @@ MAIN_FILES = \
$(DIRECTORY)/descrip.mms \
$(DIRECTORY)/mms-config. \
$(DIRECTORY)/bin/mklib \
$(DIRECTORY)/bin/installmesa \
$(DIRECTORY)/configs/[a-z]* \
$(DIRECTORY)/docs/*.html \
$(DIRECTORY)/docs/COPYING \
$(DIRECTORY)/docs/README.* \
$(DIRECTORY)/docs/RELNOTES* \
$(DIRECTORY)/docs/VERSIONS \
$(DIRECTORY)/docs/*.spec \
$(DIRECTORY)/include/GL/internal/glcore.h \
$(DIRECTORY)/include/GL/amesa.h \
@@ -377,8 +379,8 @@ GLUT_FILES = \
$(DIRECTORY)/src/glut/ggi/*.[ch] \
$(DIRECTORY)/src/glut/ggi/Makefile \
$(DIRECTORY)/src/glut/fbdev/Makefile \
$(DIRECTORY)/src/glut/fbdev/cursors.h \
$(DIRECTORY)/src/glut/fbdev/glut_fbdev.c \
$(DIRECTORY)/src/glut/fbdev/*[ch] \
$(DIRECTORY)/src/glut/mini/*[ch] \
$(DIRECTORY)/windows/VC6/progs/glut/glut.dsp \
$(DIRECTORY)/windows/VC7/progs/glut/glut.vcproj

View File

@@ -62,10 +62,10 @@ fi
set -v
mkdir ${INCLUDE_DIR}
mkdir ${INCLUDE_DIR}/GL
# NOT YET: mkdir ${INCLUDE_DIR}/GLES
mkdir ${LIB_DIR}
mkdir -p ${INCLUDE_DIR}
mkdir -p ${INCLUDE_DIR}/GL
# NOT YET: mkdir -p ${INCLUDE_DIR}/GLES
mkdir -p ${LIB_DIR}
cp -f ${TOP}/include/GL/*.h ${INCLUDE_DIR}/GL
cp -f ${TOP}/src/glw/*.h ${INCLUDE_DIR}/GL
# NOT YET: cp -f ${TOP}/include/GLES/*.h ${INCLUDE_DIR}/GLES

View File

@@ -68,7 +68,7 @@ PROGRAM_DIRS = demos redbook samples xdemos
# Library/program dependencies
EXTRA_LIB_PATH ?=
#EXTRA_LIB_PATH ?=
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm

View File

@@ -15,7 +15,8 @@ COPY_LIBS = cp -f
OPT_FLAGS = -O2
PIC_FLAGS = -fPIC
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -DUSE_XSHM -DHZ=100
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -DUSE_XSHM \
-DHZ=100 -DHAVE_POSIX_MEMALIGN
X11_INCLUDES = -I/usr/X11R6/include

View File

@@ -14,7 +14,7 @@ OPT_FLAGS = -O
EXPAT_INCLUDES = -I/usr/local/include
X11_INCLUDES = -I/usr/X11R6/include
DEFINES = -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
-DGLX_DIRECT_RENDERING -DHAVE_ALIAS
-DGLX_DIRECT_RENDERING -DHAVE_ALIAS -DHAVE_POSIX_MEMALIGN
CFLAGS = -Wmissing-prototypes -g -std=c99 -Wundef -fPIC -ffast-math \
$(ASM_FLAGS) $(X11_INCLUDES) $(DEFINES)
@@ -42,6 +42,6 @@ DRM_SOURCE_PATH=$(TOP)/../drm
# ffb and gamma are missing because they have not been converted to use the new
# interface.
DRI_DIRS = i810 i915 mach64 mga r128 r200 r300 radeon tdfx \
DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon tdfx \
unichrome savage sis

View File

@@ -8,7 +8,7 @@ CONFIG_NAME = hpux10
CC = cc
CXX = aCC
CFLAGS = +O3 +DAportable +z -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
CXXFLAGS = +O3 +DAportable +Z -Aa -D_HPUX_SOURCE
CFLAGS = -O +DAportable +z -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
CXXFLAGS = -O +DAportable +Z -Ae -D_HPUX_SOURCE
APP_LIB_DEPS = -$(TOP)/$(LIB_DIR) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm

View File

@@ -8,8 +8,8 @@ CONFIG_NAME = hpux10-static
CC = cc
CXX = aCC
CFLAGS = +O3 +DAportable +z -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
CXXFLAGS = +O3 +DAportable +Z -Aa -D_HPUX_SOURCE
CFLAGS = -O +DAportable +z -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
CXXFLAGS = -O +DAportable +Z -Ae -D_HPUX_SOURCE
MKLIB_OPTIONS = -static

View File

@@ -8,9 +8,9 @@ CONFIG_NAME = hpux11-32
CC = cc
CXX = aCC
CFLAGS = +z -Ae +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CFLAGS = +z -Ae -O +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CXXFLAGS = +z -Aa +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
CXXFLAGS = +z -Ae -O +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
MKLIB_OPTIONS =

View File

@@ -8,9 +8,9 @@ CONFIG_NAME = hpux11-32-static
CC = cc
CXX = aCC
CFLAGS = +O3 +DA2.0 -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CFLAGS = -O +DA2.0 -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CXXFLAGS = +O3 +DA2.0 -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
CXXFLAGS = -O +DA2.0 -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
MKLIB_OPTIONS = -static

View File

@@ -8,9 +8,9 @@ CONFIG_NAME = hpux11-32-static
CC = cc
CXX = aCC
CFLAGS = +O3 +DA2.0 -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
CFLAGS = -O +DA2.0 -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
CXXFLAGS = +O3 +DA2.0 -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include
CXXFLAGS = -O +DA2.0 -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include
MKLIB_OPTIONS = -static

View File

@@ -8,9 +8,9 @@ CONFIG_NAME = hpux11-64
CC = cc
CXX = aCC
CFLAGS = +z -Ae +DD64 +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CFLAGS = +z -Ae +DD64 -O +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CXXFLAGS = +z -Aa +DD64 +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
CXXFLAGS = +z -Ae +DD64 -O +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
MKLIB_OPTIONS =

View File

@@ -8,9 +8,9 @@ CONFIG_NAME = hpux11-64-static
CC = cc
CXX = aCC
CFLAGS = +O3 +DA2.0W -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CFLAGS = -O +DA2.0W -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CXXFLAGS = +O3 +DA2.0W -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
CXXFLAGS = -O +DA2.0W -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
MKLIB_OPTIONS = -static

View File

@@ -8,9 +8,9 @@ CONFIG_NAME = hpux11-ia64
CC = cc
CXX = aCC
CFLAGS = +z -Ae +DD64 +O3 +DSmckinley -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CFLAGS = +z -Ae +DD64 -O +DSmckinley -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CXXFLAGS = +z -Aa +DD64 +O3 +DSmckinley -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
CXXFLAGS = +z -Ae +DD64 -O +DSmckinley -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
MKLIB_OPTIONS =

View File

@@ -8,9 +8,9 @@ CONFIG_NAME = hpux11-ia64-static
CC = cc
CXX = aCC
CFLAGS = +O3 +DD64 -Aa -D_HPUX_SOURCE +DSmckinley -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CFLAGS = -O +DD64 -Ae -D_HPUX_SOURCE +DSmckinley -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CXXFLAGS = +O3 +DD64 -Aa -D_HPUX_SOURCE +DSmckinley -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
CXXFLAGS = -O +DD64 -Ae -D_HPUX_SOURCE +DSmckinley -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
MKLIB_OPTIONS = -static

View File

@@ -9,8 +9,8 @@ CC = cc
# XXX fix this
CXX = c++
CFLAGS = +z +O3 +Olibcalls +ESlit -Aa +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R5 -DUSE_XSHM
CXXFLAGS = +z +O3 +Olibcalls +ESlit -Aa +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R5
CFLAGS = +z -O +Olibcalls +ESlit -Ae +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R5 -DUSE_XSHM
CXXFLAGS = +z -O +Olibcalls +ESlit -Ae +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R5
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/lib/X11R5 -s -Wl,+s,-B,nonfatal,-B,immediate -lXext -lXmu -lXi -lX11 -lm

View File

@@ -8,7 +8,7 @@ CONFIG_NAME = hpux9-gcc
CC = cc
CXX = aCC
CFLAGS = +O3 +DAportable +z -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
CXXFLAGS = +O3 +DAportable +Z -Aa -D_HPUX_SOURCE
CFLAGS = -O +DAportable +z -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
CXXFLAGS = -O +DAportable +Z -Ae -D_HPUX_SOURCE
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm

View File

@@ -17,7 +17,8 @@ PIC_FLAGS = -fPIC
ARCH_FLAGS ?=
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
-D_BSD_SOURCE -DPTHREADS -DUSE_XSHM
-D_BSD_SOURCE -D_GNU_SOURCE \
-DPTHREADS -DUSE_XSHM -DHAVE_POSIX_MEMALIGN
X11_INCLUDES = -I/usr/X11R6/include

View File

@@ -22,7 +22,7 @@ ARCH_FLAGS ?=
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
-D_BSD_SOURCE -D_GNU_SOURCE \
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
-DGLX_DIRECT_RENDERING -DHAVE_ALIAS
-DGLX_DIRECT_RENDERING -DHAVE_ALIAS -DHAVE_POSIX_MEMALIGN
X11_INCLUDES = -I/usr/X11R6/include
@@ -37,6 +37,7 @@ ASM_SOURCES =
# Library/program dependencies
EXTRA_LIB_PATH=-L/usr/X11R6/lib
LIBDRM_CFLAGS = `pkg-config --cflags libdrm`
LIBDRM_LIB = `pkg-config --libs libdrm`
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl \
@@ -63,5 +64,5 @@ WINDOW_SYSTEM=dri
# gamma are missing because they have not been converted to use the new
# interface.
DRI_DIRS = i810 i915 mach64 mga r128 r200 r300 radeon s3v \
DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon s3v \
savage sis tdfx trident unichrome ffb

View File

@@ -22,7 +22,7 @@ ARCH_FLAGS ?=
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
-D_BSD_SOURCE -D_GNU_SOURCE \
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
-DGLX_DIRECT_RENDERING -DHAVE_ALIAS -DUSE_XCB
-DGLX_DIRECT_RENDERING -DHAVE_ALIAS -DUSE_XCB -DHAVE_POSIX_MEMALIGN
X11_INCLUDES = `pkg-config --cflags-only-I x11` `pkg-config --cflags-only-I xcb` `pkg-config --cflags-only-I xcb-glx`

View File

@@ -3,8 +3,18 @@
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
SRC_DIRS = mesa glu glut/fbdev
CFLAGS = -O3 -ffast-math -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DPTHREADS -DUSE_GLFBDEV_DRIVER
SRC_DIRS = mesa glu glut/fbdev
DRIVER_DIRS = fbdev
PROGRAM_DIRS = fbdev demos redbook samples
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lgpm -lm
PROGRAM_DIRS = fbdev

View File

@@ -23,7 +23,7 @@ ARCH_FLAGS ?=
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
-D_BSD_SOURCE -D_GNU_SOURCE \
-DPTHREADS -DHAVE_ALIAS
-DPTHREADS -DHAVE_ALIAS -DHAVE_POSIX_MEMALIGN
X11_INCLUDES = -I/usr/X11R6/include

View File

@@ -16,7 +16,7 @@ PIC_FLAGS = -fPIC
ARCH_FLAGS ?=
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
-D_BSD_SOURCE -D_GNU_SOURCE \
-D_BSD_SOURCE -D_GNU_SOURCE -DHAVE_POSIX_MEMALIGN \
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DDRM_USE_MALLOC -DIN_DRI_DRIVER
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \

View File

@@ -1,30 +1,9 @@
# Configuration for Linux on Sparc
include $(TOP)/configs/default
include $(TOP)/configs/linux
CONFIG_NAME = linux-sparc
# Compiler and flags
CC = gcc
CXX = g++
WARN_FLAGS = -Wall
OPT_FLAGS = -O2
PIC_FLAGS = -fPIC
DEFINES = -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM
X11_INCLUDES = -I/usr/X11R6/include
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
$(ASM_FLAGS) -std=c99 -ffast-math
CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
GLUT_CFLAGS = -fexceptions
EXTRA_LIB_PATH=-L/usr/X11R6/lib
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11
#ASM_FLAGS = -DUSE_SPARC_ASM
#ASM_SOURCES = $(SPARC_SOURCES)
#ASM_API = $(SPARC_API)

View File

@@ -1,17 +1,7 @@
# Configuration for Linux on Sparc5
include $(TOP)/configs/default
include $(TOP)/configs/linux-sparc
CONFIG_NAME = linux-sparc5
# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -mcpu=ultrasparc -O2 -ffast-math -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM
CXXFLAGS = -mcpu=ultrasparc -O2 -ffast-math -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE
GLUT_CFLAGS = -fexceptions
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
ARCH_FLAGS += -mcpu=ultrasparc

View File

@@ -1,17 +1,7 @@
# Configuration for Linux on UltraSparc
include $(TOP)/configs/default
include $(TOP)/configs/linux-sparc
CONFIG_NAME = linux-ultrasparc
# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -mv8 -O2 -mtune=ultrasparc -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM
CXXFLAGS = -mv8 -O2 -mtune=ultrasparc -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE
GLUT_CFLAGS = -fexceptions
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR)-l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
ARCH_FLAGS += -mv8 -mtune=ultrasparc

60
docs/RELNOTES-6.5.1 Normal file
View File

@@ -0,0 +1,60 @@
Mesa 6.5.1 Release Notes
Introduction
------------
Mesa uses an even/odd version number scheme like the Linux kernel.
Odd numbered versions (such as 6.5) designate new developmental releases.
Even numbered versions (such as 6.4) designate stable releases.
Mesa 6.5.1 is a 6.5 follow-on development release mostly consisting of
bug fixes (see the VERSIONS file).
New Features
------------
Intel i965 "broadwater" DRI driver
GL_APPLE_vertex_array_object - allows encapsulation of a set of vertex
arrays in an object.
GL_EXT_texture_sRGB - non-linearly mapped texture formats
GL_EXT_gpu_program_parameters - addes a few new functions for setting
multiple vertex/fragment program parameters with one call.
To Do (someday) items
---------------------
Switch to freeglut
Increase MAX_DRAWBUFFERS
Fix linux-glide target/driver.
Fix lambda calculation for frag progs.
Driver Status
---------------------- ----------------------
DRI drivers varies with the driver
XMesa/GLX (on Xlib) implements OpenGL 1.5
OSMesa (off-screen) implements OpenGL 1.5
Glide (3dfx Voodoo1/2) implements OpenGL 1.3
SVGA implements OpenGL 1.3
Wind River UGL implements OpenGL 1.3
Windows/Win32 implements OpenGL 1.5
DJGPP implements OpenGL 1.5
GGI implements OpenGL 1.3
BeOS implements OpenGL 1.5
Allegro needs updating
D3D needs updating
----------------------------------------------------------------------
$Id: RELNOTES-6.5.1,v 1.2 2006/08/18 20:24:54 brianp Exp $

View File

@@ -1471,14 +1471,21 @@ Mesa Version History
- paletted texturing was broken w/ floating point palettes (K. Schultz)
- lots of assorted framebuffer object bug fixes
6.5.1 month, day, 2006
6.5.1 August 31, 2006
New:
- Intel i965 DRI driver
- GL_APPLE_vertex_array_object extension (Ian Romanick)
- GL_EXT_texture_sRGB extension
- GL_EXT_gpu_program_parameters (Ian Romanick)
- "engine" demo
- updated fbdev driver and GLUT for fbdev (Sean D'Epagnier)
- many updates to the DRI drivers
Changes:
- The glVertexAttribARB functions no longer alias the conventional
vertex attributes.
- glxinfo program prints more info with -l option
- GL_FRAGMENT_PROGRAM_NV and GL_FRAGMENT_PROGRAM_ARB are now
compatible, in terms of glBindProgramARB()
Bug fixes:
- fixed broken texture border handling for depth textures (bug 6498)
- removed the test for duplicated framebuffer attachments, per
@@ -1498,3 +1505,10 @@ Mesa Version History
- 'normalized' parameter to glVertexAttribPointerARB didn't work
- disable bogus GLX_SGI_video_sync extension in xlib driver
- fixed R128 driver locking bug (Martijn van Oosterhout)
- using evaluators with vertex programs caused crashes (bug 7564)
- fragment.position wasn't set correctly for point/line primitives
- fixed parser bug for scalar sources for GL_NV_fragment_program
- max fragment program length was incorrectly 128, now 1024
- writes to result.depth in fragment programs weren't clamped to [0,1]
- fixed potential dangling pointer bug in glBindProgram()
- fixed some memory leaks (and potential crashes) in Xlib driver

View File

@@ -28,7 +28,7 @@ a:visited {
<li><a href="systems.html" target="MainFrame">Platforms and Drivers</a>
<li><a href="license.html" target="MainFrame">License & Copyright</a>
<li><a href="faq.html" target="MainFrame">FAQ</a>
<li><a href="VERSIONS" target="MainFrame">Version History</a>
<li><a href="versions.html" target="MainFrame">Version History</a>
<li><a href="relnotes.html" target="MainFrame">Release Notes</a>
<li><a href="thanks.html" target="MainFrame">Acknowledgements</a>
<li><a href="conform.html" target="MainFrame">Conformance Testing</a>

View File

@@ -9,7 +9,7 @@
<H1>Downloading</H1>
<p>
Last development release: <b>6.5</b>
Last development release: <b>6.5.1</b>
</p>
<p>

View File

@@ -9,7 +9,7 @@
<center>
<h1>Mesa Frequently Asked Questions</h1>
Last updated: 8 June 2006
Last updated: 21 August 2006
</center>
<br>
@@ -46,7 +46,7 @@ Mesa 6.x supports the OpenGL 1.5 specification.
<h2>1.2 Does Mesa support/use graphics hardware?</h2>
<p>
Yes. Specifically, Mesa serves as the OpenGL core for the open-source DRI
drivers for XFree86/X.org. See the <a href="http://dri.sf.net/">DRI
drivers for XFree86/X.org. See the <a href="http://dri.freedesktop.org/">DRI
website</a> for more information.
</p>
<p>
@@ -290,9 +290,8 @@ hardware it has detected.
<p>
Make sure the ratio of the far to near clipping planes isn't too great.
Look
<a href="http://www.sgi.com/software/opengl/advanced97/notes/node18.html"
target="_parent">
here</a> for details.
<a href="http://www.opengl.org/resources/faq/technical/depthbuffer.htm#0040"
target="_parent"> here</a> for details.
</p>
<p>
Mesa uses a 16-bit depth buffer by default which is smaller and faster
@@ -341,13 +340,14 @@ will fix the problem.
<a name="part4">
</a><h1><a name="part4">4. Developer Questions</a></h1>
<h2><a name="part4">4.1 How can I contribute?</a></h2>
<h2>4.1 How can I contribute?</a></h2>
<p>
<a name="part4">First, join the Mesa3d-dev mailing list. That's where Mesa development
is discussed.
First, join the <a href="http://www.mesa3d.org/lists.html>Mesa3d-dev
mailing list</a>.
That's where Mesa development is discussed.
</a></p>
<p>
<a name="part4">The </a><a href="http://www.opengl.org/developers/documentation/specs.html" target="_parent">
The </a><a href="http://www.opengl.org/documentation" target="_parent">
OpenGL Specification</a> is the bible for OpenGL implemention work.
You should read it.
</p>

View File

@@ -70,7 +70,7 @@ tty group as well
<h1>4. Using fbdevglut</h1>
Almost all of the programs in the progs directory use glut, and they compile with fbdevglut.
Currently glBlendFunc is not working with glFBDev.
<p>
To compile the redbook sample programs:
<pre>

View File

@@ -83,9 +83,14 @@ Recent /usr/include/GL/glxproto.h file.
<p>You'll need this if you get any errors about _GLXvop_BindTexImageEXT
being undefined.
</p>
<p>The latest version can be
obtained from <A href="http://webcvs.freedesktop.org/*checkout*/xorg/proto/GL/glxproto.h?rev=1.9&content-type=text%2Fplain">freedesktop.org CVS</a>
<p>
Download/install the
<a href="http://gitweb.freedesktop.org/?p=xorg/proto/glproto.git">glproto</a>
module from X.org git, or grab the
<A href="http://webcvs.freedesktop.org/*checkout*/xorg/proto/GL/glxproto.h?rev=1.9&content-type=text%2Fplain">glxproto.h file</a> and put it in the
Mesa/include/GL/ directory.
</p>
</li>
<li>DRI-enabled X server.

View File

@@ -9,7 +9,7 @@
<H1>Modelers, Renderers and Viewers</H1>
<ul>
<li><a href="http://www.aqsis.com/" target="_parent">Aqsis</a> - a RenderMan compatible renderer</li>
<li><a href="http://www.aqsis.org/" target="_parent">Aqsis</a> - a RenderMan compatible renderer</li>
<li><a href="http://www.ac3d.org/" target="_parent">AC3D</a> - 3-D modeler
</li><li><a href="http://mesa3d.sourceforge.net/notfound.html">ARCAD</a> - CAD program
</li><li><a href="http://www.mediascape.com/" target="_parent">Artstream</a> - provides

View File

@@ -11,48 +11,23 @@
<H1>News</H1>
<h2>September 15, 2006</h2>
<p>
Mesa 6.5.1 has been released. This is a new development release.
</p>
<a href="versions.html#6.5.1">Changes in version 6.5.1</a>
<p>
The MD5 checksums are:
</p>
<pre>
TBD
</pre>
<h2>March 31, 2006</h2>
<p>
Mesa 6.5 has been released. This is a new development release.
</p>
<pre>
New:
- OpenGL Shading Language support through GL_ARB_shader_objects,
GL_ARB_shading_language_100, GL_ARB_vertex_shader and
GL_ARB_fragment_shader (done by Michal Krol)
- GL_EXT_packed_depth_stencil extension
- GL_EXT_timer_query extension
- GL_EXT_framebuffer_blit extension
- GL_ARB_half_float_pixel
- GLX_MESA_copy_sub_buffer for DRI drivers (Dave Reveman)
- reflect demo improved to support multiple windows
- singlebuffer demo (shows no/little-flicker single-buffered rendering)
- r200: enable GL_ARB_texture_env_crossbar, separate the texture
sampling unit bits from the texture env combine enable bits
- r200: add support for GL_ATI_fragment_shader
- added fast XOR-mode line drawing optimization
- radeon: add support for all 3 tmus, GL_ARB_texture_cube_map
and GL_EXT_fog_coord
- MESA_GLX_ALPHA_BITS env var for xlib driver
- many DRI driver updates (including screen rotation support
for the Intel DRI driver)
Changes:
- removed GL_HP_occlusion_test (use GL_ARB_occlusion_query instead)
- removed GL_SGIX/SGIS_pixel_texture extensions
Bug fixes:
- fixed glxcontextmodes.c datatype problem (bug 5835)
- fixed aix-gcc build/install bugs (bug 5874)
- fixed some bugs in texture env program generation
- glXCopyContext() didn't handle texture object bindings properly
- glXCopyContext() didn't copy all lighting state
- fixed FreeBSD config (Pedro Giffuni)
- fixed some minor framebuffer object bugs
- replaced dprintf() with _glu_printf() in GLU (bug 6244)
- fixed a number of thread safety bugs/regressions
- fixed a number of GLU tesselator bugs (John Shell, bug 6339)
- paletted texturing was broken w/ floating point palettes (K. Schultz)
- lots of assorted framebuffer object bug fixes
</pre>
<a href="versions.html#6.5">Changes in version 6.5</a>
<p>
The MD5 checksums are:
</p>
@@ -73,15 +48,7 @@ ac1d585483617db0c91e5c15cb5ec3a3 MesaGLUT-6.5.tar.gz
<p>
Mesa 6.4.2 has been released. This is primarily a bug-fix release.
</p>
<pre>
New items:
- added OSMesaColorClamp() function/feature
- added wglGetExtensionStringARB() function
Bug fixes:
- fixed some problems when building on Windows
- GLw header files weren't installed by installmesa script (bug 5396)
- GL/glfbdev.h file was missing from tarballs
</pre>
<a href="versions.html#6.4.2">Changes in version 6.4.2</a>
<p>
The MD5 checksums are:
</p>
@@ -102,21 +69,7 @@ fe1523744fc05edc3811dfc6a1bf4181 MesaGLUT-6.4.2.zip
<p>
Mesa 6.4.1 has been released. This is a stable, bug-fix release.
</p>
<pre>
Bug fixes:
- redefining a vertex program string didn't take effect in TNL module
- fixed occasional segfault upon vertex/fragment parsing error
- vertex program LIT instruction didn't handle 0^0=1 correctly
- fragment program fog option didn't work with glDrawPixels, glBitmap
- USE_MGL_NAMESPACE didn't work for x86-64
- OSMesa demos were missing from previous release tarballs
- fixed problem with float->ushort conversion in glClear (bug 4992)
- popping of GL_EYE_PLANE texgen state was broken (bug 4996)
- popping of GL_SPOT_DIRECTION light state was broken (bug 5005)
- fixed occasional triangle color interpolation problem on VMS
- work around invalid free() call (bug 5131)
- fixed BSD X server compilation problem by including stdint.h
</pre>
<a href="versions.html#6.4.1">Changes in version 6.4.1</a>
<p>
The MD5 checksums are:
</p>
@@ -139,37 +92,7 @@ bd003bb4f981a4f91dee4c38644d4f3f MesaGLUT-6.4.1.tar.bz2
<p>
Mesa 6.4 has been released. This is a stable, bug-fix release.
</p>
<pre>
New:
- Added a fast XOR line drawing function in Xlib driver
- Added support for GL_ARB_texture_mirrored_repeat to savage
driver (supported only on Savage4 hardware).
Changes:
- Mesa now packaged in three parts: Library, Demos and GLUT
Bug fixes:
- GLX_X_RENDERABLE token wasn't accepted by glXChooseFBConfig
- Some files were present multiple times in the 6.3.2 tarballs
- r200_vtxtmp_x86.S file was missing from 6.3.2 tarball (bug 4207)
- glxgears_fbconfig demo didn't work (bug 4237)
- fixed bug when bilinear sampling 2d textures with borders
- glXCreatePbuffer() could segfault instead of returning 0 (bug 4235)
- fixed undefined frexp and rand in X.org libGLcore.a (bug 4242)
- fixed a few problems with proxy color tables (bug 4270)
- fixed precision problem in Z clearing (bug 4395)
- glBitmap, glDraw/CopyPixels mistakenly generated selection hits
- fixed potential segfault caused by reading pixels outside
of renderbuffer bounds
- glGetTexLevelParameter didn't accept GL_TEXTURE_DEPTH_SIZE_ARB
- fixed memory corruption bug involving software alpha buffers
- glReadPixels clipped by window bounds was sometimes broken
- glDraw/CopyPixels of stencil data ignored the stencil write mask
- glReadPixels from a texture bound to a framebuffer object didn't work
- glIsRender/FramebufferEXT weren't totally correct
- fixed a number of point size attenuation/fade bugs
- fixed glFogCoord bug 4729
- GLX encoding for transpose matrix functions was broken
- fixed broken fragment program KIL and SWZ instructions
</pre>
<a href="versions.html#6.4">Changes in version 6.4</a>
<p>
The MD5 checksums are:
</p>
@@ -191,23 +114,7 @@ d8734f2c69bcf7ef9f5ae454a85743ba MesaDemos-6.4.tar.gz
Mesa 6.3.2 has been released.
Note: there was no public release of version 6.3.1.
</p>
<pre>
New:
- The distribution now includes the DRI drivers and GLX code
Changes:
- Made the DRI "new" driver interface standard, remove old code
Bug fixes:
- GL_ARB_vertex/fragment_shader were mistakenly listed in the
extensions string
- negative relative addressing in vertex programs was broken
- update/fix SPARC assembly code for vertex transformation
- fixed memory leak when freeing GLX drawables/renderbuffers
- fixed display list memory leak
- the GL_PIXEL_MAP_I_TO_I table is now floating point, not integer
- wglGetProcAddress() didn't handle wgl-functions
- fixed glxext.h cross-compile issue (Colin Harrison)
- assorted DRI driver fixes
</pre>
<a href="versions.html#6.3.2">Changes in version 6.3.1</a>
<p>
The MD5 checksums are:
</p>
@@ -1226,6 +1133,6 @@ source code</a>.</p>
<hr>
$Id: news.html,v 3.28 2006/04/01 02:29:40 brianp Exp $
$Id: news.html,v 3.30 2006/09/16 04:13:20 brianp Exp $
</body>
</html>

89
docs/relnotes-6.5.1.html Normal file
View File

@@ -0,0 +1,89 @@
<HTML>
<TITLE>Mesa Release Notes</TITLE>
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<body bgcolor="#eeeeee">
<H1>Mesa 6.5.1 Release Notes</H1>
<H2>Introduction</H2>
<p>
Mesa uses an even/odd version number scheme like the Linux kernel.
Odd numbered versions (such as 6.5) designate new developmental releases.
Even numbered versions (such as 6.4) designate stable releases.
</p>
<p>
Mesa 6.5.1 is a 6.5 follow-on development release mostly consisting of
<a href="versions.html#6.5.1">bug fixes</a>.
</p>
<h2>New Features</h2>
<ul>
<li>Intel i965 "broadwater" DRI driver
<li>GL_APPLE_vertex_array_object - allows encapsulation of a set of vertex
arrays in an object.
<li>GL_EXT_texture_sRGB - non-linearly mapped texture formats
<li>GL_EXT_gpu_program_parameters - addes a few new functions for setting
multiple vertex/fragment program parameters with one call.
</ul>
<h2>Internal code changes</h2>
<p>
A number of Mesa program-related structs were renamed.
For example <i>struct vertex_program</i> is now <i>struct gl_vertex_program</i>.
All the effected drivers have been updated.
</p>
<p>Ian Romanick updated the GL API dispatch code in a number of ways.
First, many old/unused extensions were removed.
Second, the static entrypoints for some extensions were removed.
This means GL function pointers will have to be used more often
(e.g. use glXGetProcAddressARB()).
</p>
<h2>To Do (someday) items</h2>
<ul>
<li>Switch to freeglut
<li>Increase MAX_DRAWBUFFERS
<li>Fix linux-glide target/driver.
<li>Fix lambda calculation for frag progs.
</ul>
<h2>Driver Status</h2>
<pre>
Driver Status
---------------------- ----------------------
DRI drivers varies with the driver
XMesa/GLX (on Xlib) implements OpenGL 1.5
OSMesa (off-screen) implements OpenGL 1.5
Glide (3dfx Voodoo1/2) implements OpenGL 1.3
SVGA implements OpenGL 1.3
Wind River UGL implements OpenGL 1.3
Windows/Win32 implements OpenGL 1.5
DJGPP implements OpenGL 1.5
GGI implements OpenGL 1.3
BeOS implements OpenGL 1.5
Allegro needs updating
D3D needs updating
</pre>
</body>
</html>

View File

@@ -13,6 +13,7 @@ The release notes summarize what's new or changed in each Mesa release.
</p>
<UL>
<LI><A HREF="relnotes-6.5.1.html">6.5.1 release notes</A>
<LI><A HREF="RELNOTES-6.5">RELNOTES-6.5</A>
<LI><A HREF="RELNOTES-6.4.2">RELNOTES-6.4.2</A>
<LI><A HREF="RELNOTES-6.4.1">RELNOTES-6.4.1</A>

1813
docs/versions.html Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -2152,6 +2152,26 @@ typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLsh
#if GL_ARB_shader_objects
#ifndef GL_MESA_shader_debug
#define GL_MESA_shader_debug 1
#define GL_DEBUG_OBJECT_MESA 0x8759
#define GL_DEBUG_PRINT_MESA 0x875A
#define GL_DEBUG_ASSERT_MESA 0x875B
GLAPI GLhandleARB APIENTRY glCreateDebugObjectMESA (void);
GLAPI GLvoid APIENTRY glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
GLAPI GLvoid APIENTRY glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength,
GLsizei *length, GLcharARB *debugLog);
GLAPI GLsizei APIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
#endif /* GL_MESA_shader_debug */
#endif /* GL_ARB_shader_objects */
/*
* ???. GL_MESA_trace
* XXX obsolete
@@ -2232,67 +2252,6 @@ typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLen
#ifndef GL_EXT_timer_query
#define GL_EXT_timer_query 1
/* Define 64-bit types */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
typedef long long int GLint64EXT;
typedef unsigned long long int GLuint64EXT;
#elif defined(_WIN32)
typedef __int64 GLint64EXT;
typedef unsigned __int64 GLuint64EXT;
#else
/* this might actually be a 32-bit type */
typedef long int GLint64EXT;
typedef unsigned long int GLuint64EXT;
#endif
#define GL_TIME_ELAPSED_EXT 0x88BF
GLAPI void GLAPIENTRY glGetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64EXT *params);
GLAPI void GLAPIENTRY glGetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64EXT *params);
typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params);
typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params);
#endif /* GL_EXT_timer_query */
#ifndef GL_EXT_framebuffer_blit
#define GL_EXT_framebuffer_blit 1
#define GL_READ_FRAMEBUFFER_EXT 0x8CA8
#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CA6
#define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA
GLAPI void GLAPIENTRY
glBlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
GLbitfield mask, GLenum filter);
typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC)
(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
GLbitfield mask, GLenum filter);
#endif /* GL_EXT_framebuffer_blit */
#ifndef GL_EXT_packed_depth_stencil
#define GL_EXT_packed_depth_stencil 1
#define GL_DEPTH_STENCIL_EXT 0x84F9
#define GL_UNSIGNED_INT_24_8_EXT 0x84FA
#define GL_DEPTH24_STENCIL8_EXT 0x88F0
#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1
#endif /* GL_EXT_packed_depth_stencil */
/**
** NOTE!!!!! If you add new functions to this file, or update
** glext.h be sure to regenerate the gl_mangle.h file. See comments

View File

@@ -98,6 +98,7 @@
#define glBlendFuncSeparateEXT MANGLE(BlendFuncSeparateEXT)
#define glBlendFuncSeparateINGR MANGLE(BlendFuncSeparateINGR)
#define glBlendFuncSeparate MANGLE(BlendFuncSeparate)
#define glBlitFramebufferEXT MANGLE(BlitFramebufferEXT)
#define glBufferDataARB MANGLE(BufferDataARB)
#define glBufferData MANGLE(BufferData)
#define glBufferSubDataARB MANGLE(BufferSubDataARB)
@@ -864,10 +865,12 @@
#define glProgramEnvParameter4dvARB MANGLE(ProgramEnvParameter4dvARB)
#define glProgramEnvParameter4fARB MANGLE(ProgramEnvParameter4fARB)
#define glProgramEnvParameter4fvARB MANGLE(ProgramEnvParameter4fvARB)
#define glProgramEnvParameters4fvEXT MANGLE(ProgramEnvParameters4fvEXT)
#define glProgramLocalParameter4dARB MANGLE(ProgramLocalParameter4dARB)
#define glProgramLocalParameter4dvARB MANGLE(ProgramLocalParameter4dvARB)
#define glProgramLocalParameter4fARB MANGLE(ProgramLocalParameter4fARB)
#define glProgramLocalParameter4fvARB MANGLE(ProgramLocalParameter4fvARB)
#define glProgramLocalParameters4fvEXT MANGLE(ProgramLocalParameters4fvEXT)
#define glProgramNamedParameter4dNV MANGLE(ProgramNamedParameter4dNV)
#define glProgramNamedParameter4dvNV MANGLE(ProgramNamedParameter4dvNV)
#define glProgramNamedParameter4fNV MANGLE(ProgramNamedParameter4fNV)
@@ -1474,6 +1477,5 @@
#define glWindowPos4sMESA MANGLE(WindowPos4sMESA)
#define glWindowPos4svMESA MANGLE(WindowPos4svMESA)
#define glWriteMaskEXT MANGLE(WriteMaskEXT)
gl.h:GLAPI void GLAPIENTRY
#endif /* GL_MANGLE_H */

View File

@@ -52,9 +52,9 @@ extern "C" {
/*************************************************************/
/* Header file version number, required by OpenGL ABI for Linux */
/* glext.h last updated 2005/06/20 */
/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */
#define GL_GLEXT_VERSION 29
/* glext.h last updated 2006/08/30 */
/* Current version at http://www.opengl.org/registry/ */
#define GL_GLEXT_VERSION 34
#ifndef GL_VERSION_1_2
#define GL_UNSIGNED_BYTE_3_3_2 0x8032
@@ -459,6 +459,32 @@ extern "C" {
#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
#endif
#ifndef GL_VERSION_2_1
#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F
#define GL_PIXEL_PACK_BUFFER 0x88EB
#define GL_PIXEL_UNPACK_BUFFER 0x88EC
#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
#define GL_FLOAT_MAT2x3 0x8B65
#define GL_FLOAT_MAT2x4 0x8B66
#define GL_FLOAT_MAT3x2 0x8B67
#define GL_FLOAT_MAT3x4 0x8B68
#define GL_FLOAT_MAT4x2 0x8B69
#define GL_FLOAT_MAT4x3 0x8B6A
#define GL_SRGB 0x8C40
#define GL_SRGB8 0x8C41
#define GL_SRGB_ALPHA 0x8C42
#define GL_SRGB8_ALPHA8 0x8C43
#define GL_SLUMINANCE_ALPHA 0x8C44
#define GL_SLUMINANCE8_ALPHA8 0x8C45
#define GL_SLUMINANCE 0x8C46
#define GL_SLUMINANCE8 0x8C47
#define GL_COMPRESSED_SRGB 0x8C48
#define GL_COMPRESSED_SRGB_ALPHA 0x8C49
#define GL_COMPRESSED_SLUMINANCE 0x8C4A
#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B
#endif
#ifndef GL_ARB_multitexture
#define GL_TEXTURE0_ARB 0x84C0
#define GL_TEXTURE1_ARB 0x84C1
@@ -3038,6 +3064,64 @@ extern "C" {
#ifndef GL_GREMEDY_string_marker
#endif
#ifndef GL_EXT_packed_depth_stencil
#define GL_DEPTH_STENCIL_EXT 0x84F9
#define GL_UNSIGNED_INT_24_8_EXT 0x84FA
#define GL_DEPTH24_STENCIL8_EXT 0x88F0
#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1
#endif
#ifndef GL_EXT_stencil_clear_tag
#define GL_STENCIL_TAG_BITS_EXT 0x88F2
#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3
#endif
#ifndef GL_EXT_texture_sRGB
#define GL_SRGB_EXT 0x8C40
#define GL_SRGB8_EXT 0x8C41
#define GL_SRGB_ALPHA_EXT 0x8C42
#define GL_SRGB8_ALPHA8_EXT 0x8C43
#define GL_SLUMINANCE_ALPHA_EXT 0x8C44
#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45
#define GL_SLUMINANCE_EXT 0x8C46
#define GL_SLUMINANCE8_EXT 0x8C47
#define GL_COMPRESSED_SRGB_EXT 0x8C48
#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49
#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A
#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B
#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
#endif
#ifndef GL_EXT_framebuffer_blit
#define GL_READ_FRAMEBUFFER_EXT 0x8CA8
#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
#define GL_READ_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_EXT
#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CAA
#endif
#ifndef GL_EXT_framebuffer_multisample
#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
#endif
#ifndef GL_MESAX_texture_stack
#define GL_TEXTURE_1D_STACK_MESAX 0x8759
#define GL_TEXTURE_2D_STACK_MESAX 0x875A
#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B
#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C
#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D
#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E
#endif
#ifndef GL_EXT_timer_query
#define GL_TIME_ELAPSED_EXT 0x88BF
#endif
#ifndef GL_EXT_gpu_program_parameters
#endif
/*************************************************************/
@@ -3074,6 +3158,48 @@ typedef unsigned short GLhalfARB;
typedef unsigned short GLhalfNV;
#endif
#ifndef GLEXT_64_TYPES_DEFINED
/* This code block is duplicated in glext.h, so must be protected */
#define GLEXT_64_TYPES_DEFINED
/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
/* (as used in the GLX_OML_sync_control extension). */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#include <inttypes.h>
#elif defined(__sun__)
#include <inttypes.h>
#if defined(__STDC__)
#if defined(__arch64__)
typedef long int int64_t;
typedef unsigned long int uint64_t;
#else
typedef long long int int64_t;
typedef unsigned long long int uint64_t;
#endif /* __arch64__ */
#endif /* __STDC__ */
#elif defined( __VMS )
#include <inttypes.h>
#elif defined(__SCO__) || defined(__USLC__)
#include <stdint.h>
#elif defined(__UNIXOS2__) || defined(__SOL64__)
typedef long int int32_t;
typedef long long int int64_t;
typedef unsigned long long int uint64_t;
#elif defined(WIN32) && defined(_MSC_VER)
typedef long int int32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
#elif defined(WIN32) && defined(__GNUC__)
#include <stdint.h>
#else
#include <inttypes.h> /* Fallback option */
#endif
#endif
#ifndef GL_EXT_timer_query
typedef int64_t GLint64EXT;
typedef uint64_t GLuint64EXT;
#endif
#ifndef GL_VERSION_1_2
#define GL_VERSION_1_2 1
#ifdef GL_GLEXT_PROTOTYPES
@@ -3586,6 +3712,24 @@ typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort
typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
#endif
#ifndef GL_VERSION_2_1
#define GL_VERSION_2_1 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glUniformMatrix2x3fv (GLint, GLsizei, GLboolean, const GLfloat *);
GLAPI void APIENTRY glUniformMatrix3x2fv (GLint, GLsizei, GLboolean, const GLfloat *);
GLAPI void APIENTRY glUniformMatrix2x4fv (GLint, GLsizei, GLboolean, const GLfloat *);
GLAPI void APIENTRY glUniformMatrix4x2fv (GLint, GLsizei, GLboolean, const GLfloat *);
GLAPI void APIENTRY glUniformMatrix3x4fv (GLint, GLsizei, GLboolean, const GLfloat *);
GLAPI void APIENTRY glUniformMatrix4x3fv (GLint, GLsizei, GLboolean, const GLfloat *);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
#endif
#ifndef GL_ARB_multitexture
#define GL_ARB_multitexture 1
#ifdef GL_GLEXT_PROTOTYPES
@@ -4293,8 +4437,8 @@ typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum f
typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
#endif
#ifndef GL_EXT_color_matrix
#define GL_EXT_color_matrix 1
#ifndef GL_SGI_color_matrix
#define GL_SGI_color_matrix 1
#endif
#ifndef GL_SGI_color_table
@@ -6487,6 +6631,62 @@ GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei, const GLvoid *);
typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string);
#endif
#ifndef GL_EXT_packed_depth_stencil
#define GL_EXT_packed_depth_stencil 1
#endif
#ifndef GL_EXT_stencil_clear_tag
#define GL_EXT_stencil_clear_tag 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glStencilClearTagEXT (GLsizei, GLuint);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag);
#endif
#ifndef GL_EXT_texture_sRGB
#define GL_EXT_texture_sRGB 1
#endif
#ifndef GL_EXT_framebuffer_blit
#define GL_EXT_framebuffer_blit 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glBlitFramebufferEXT (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
#endif
#ifndef GL_EXT_framebuffer_multisample
#define GL_EXT_framebuffer_multisample 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
#endif
#ifndef GL_MESAX_texture_stack
#define GL_MESAX_texture_stack 1
#endif
#ifndef GL_EXT_timer_query
#define GL_EXT_timer_query 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint, GLenum, GLint64EXT *);
GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint, GLenum, GLuint64EXT *);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params);
typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params);
#endif
#ifndef GL_EXT_gpu_program_parameters
#define GL_EXT_gpu_program_parameters 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *);
GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
#endif
#ifdef __cplusplus
}

View File

@@ -49,6 +49,7 @@ typedef struct GLFBDevContextRec *GLFBDevContextPtr;
#define GLFBDEV_STENCIL_SIZE 103
#define GLFBDEV_ACCUM_SIZE 104
#define GLFBDEV_LEVEL 105
#define GLFBDEV_MULTISAMPLE 106
#define GLFBDEV_NONE 0
/* For glFBDevGetString */

View File

@@ -52,9 +52,9 @@ extern "C" {
/*************************************************************/
/* Header file version number, required by OpenGL ABI for Linux */
/* glxext.h last updated 2004/07/26 */
/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */
#define GLX_GLXEXT_VERSION 6
/* glxext.h last updated 2006/08/30 */
/* Current version at http://www.opengl.org/registry/ */
#define GLX_GLXEXT_VERSION 14
#ifndef GLX_VERSION_1_3
#define GLX_WINDOW_BIT 0x00000001
@@ -128,6 +128,11 @@ extern "C" {
#define GLX_SAMPLES_ARB 100001
#endif
#ifndef GLX_ARB_fbconfig_float
#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9
#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
#endif
#ifndef GLX_SGIS_multisample
#define GLX_SAMPLE_BUFFERS_SGIS 100000
#define GLX_SAMPLES_SGIS 100001
@@ -282,7 +287,11 @@ extern "C" {
#ifndef GLX_OML_sync_control
#endif
#ifndef GLX_SGIX_hyperpipe_group
#ifndef GLX_NV_float_buffer
#define GLX_FLOAT_COMPONENTS_NV 0x20B0
#endif
#ifndef GLX_SGIX_hyperpipe
#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
#define GLX_BAD_HYPERPIPE_SGIX 92
@@ -331,24 +340,37 @@ typedef struct {
} GLXBufferClobberEventSGIX;
#endif
#if defined(__sun__) || defined(__osf__)
#ifndef GLEXT_64_TYPES_DEFINED
/* This code block is duplicated in glxext.h, so must be protected */
#define GLEXT_64_TYPES_DEFINED
/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
/* (as used in the GLX_OML_sync_control extension). */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#include <inttypes.h>
#elif defined(__sun__)
#include <inttypes.h>
#if defined(__STDC__)
#if defined(__arch64__)
typedef long int int64_t;
typedef unsigned long int uint64_t;
#else
typedef long long int int64_t;
typedef long long int int64_t;
typedef unsigned long long int uint64_t;
#endif /* __arch64__ */
#endif /* __STDC__ */
#elif defined(__UNIXOS2__) || defined(__SOL64__)
typedef long int int32_t;
typedef long long int int64_t;
#elif defined( __VMS )
#include <inttypes.h>
#elif defined(__SCO__) || defined(__USLC__)
#include <stdint.h>
#elif defined(__UNIXOS2__) || defined(__SOL64__)
typedef long int int32_t;
typedef long long int int64_t;
typedef unsigned long long int uint64_t;
#elif defined(WIN32) && defined(__GNUC__)
#include <stdint.h>
#else
#include <inttypes.h> /* Fallback option */
#endif
#endif
#ifndef GLX_VERSION_1_3
@@ -413,6 +435,10 @@ typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procNam
#define GLX_ARB_multisample 1
#endif
#ifndef GLX_ARB_fbconfig_float
#define GLX_ARB_fbconfig_float 1
#endif
#ifndef GLX_SGIS_multisample
#define GLX_SGIS_multisample 1
#endif
@@ -631,8 +657,12 @@ typedef Bool ( * PFNGLXWAITFORMSCOMLPROC) (Display *dpy, GLXDrawable drawable, i
typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
#endif
#ifndef GLX_SGIX_hyperpipe_group
#define GLX_SGIX_hyperpipe_group 1
#ifndef GLX_NV_float_buffer
#define GLX_NV_float_buffer 1
#endif
#ifndef GLX_SGIX_hyperpipe
#define GLX_SGIX_hyperpipe 1
typedef struct {
char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
@@ -686,6 +716,7 @@ extern unsigned int glXGetAGPOffsetMESA (const void *);
typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
#endif
#ifdef __cplusplus
}
#endif

View File

@@ -64,12 +64,18 @@ typedef struct __GLinterfaceRec __GLinterface;
** and used by the "operating system".
*/
/*
** Mode and limit information for a context. This information is
** kept around in the context so that values can be used during
** command execution, and for returning information about the
** context to the application.
*/
/**
* Mode and limit information for a context. This information is
* kept around in the context so that values can be used during
* command execution, and for returning information about the
* context to the application.
*
* Instances of this structure are shared by the driver and the loader. To
* maintain binary compatability, new fields \b must be added only to the
* end of the structure.
*
* \sa _gl_context_modes_create
*/
typedef struct __GLcontextModesRec {
struct __GLcontextModesRec * next;

File diff suppressed because it is too large Load Diff

View File

@@ -16,6 +16,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <GL/gl.h>
#include <GL/glut.h>
#include <GL/glext.h>
@@ -56,7 +57,16 @@ static PFNGLATTACHOBJECTARBPROC glAttachObjectARB = NULL;
static PFNGLLINKPROGRAMARBPROC glLinkProgramARB = NULL;
static PFNGLUSEPROGRAMOBJECTARBPROC glUseProgramObjectARB = NULL;
static PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocationARB = NULL;
static PFNGLUNIFORM4FVARBPROC glUniform4fvARB = NULL;
static PFNGLUNIFORM3FVARBPROC glUniform3fvARB = NULL;
static PFNGLUNIFORM3FVARBPROC glUniform4fvARB = NULL;
static void normalize (GLfloat *dst, const GLfloat *src)
{
GLfloat len = sqrtf (src[0] * src[0] + src[1] * src[1] + src[2] * src[2]);
dst[0] = src[0] / len;
dst[1] = src[1] / len;
dst[2] = src[2] / len;
}
static void Redisplay (void)
{
@@ -64,8 +74,11 @@ static void Redisplay (void)
if (pixelLight)
{
GLfloat vec[3];
glUseProgramObjectARB (program);
glUniform4fvARB (uLightPos, 1, lightPos);
normalize (vec, lightPos);
glUniform3fvARB (uLightPos, 1, vec);
glDisable(GL_LIGHTING);
}
else
@@ -186,24 +199,25 @@ static void SpecialKey (int key, int x, int y)
static void Init (void)
{
static const char *fragShaderText =
"uniform vec4 lightPos;\n"
"uniform vec4 diffuse;\n"
"uniform vec4 specular;\n"
"void main () {\n"
" // Compute dot product of light direction and normal vector\n"
" float dotProd;\n"
" dotProd = clamp (dot (normalize (lightPos).xyz, normalize (gl_TexCoord[0]).xyz), 0.0, 1.0);\n"
" // Compute diffuse and specular contributions\n"
" gl_FragColor = diffuse * dotProd + specular * pow (dotProd, 20.0);\n"
"}\n"
;
static const char *vertShaderText =
"void main () {\n"
" gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n"
" gl_TexCoord[0] = vec4 (gl_NormalMatrix * gl_Normal, 1.0);\n"
"}\n"
;
static const char *fragShaderText =
"uniform vec3 lightPos;\n"
"uniform vec4 diffuse;\n"
"uniform vec4 specular;\n"
"varying vec3 normal;\n"
"void main () {\n"
" // Compute dot product of light direction and normal vector\n"
" float dotProd = max (dot (lightPos, normalize (normal)), 0.0);\n"
" // Compute diffuse and specular contributions\n"
" gl_FragColor = diffuse * dotProd + specular * pow (dotProd, 20.0);\n"
"}\n"
;
static const char *vertShaderText =
"varying vec3 normal;\n"
"void main () {\n"
" gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n"
" normal = gl_NormalMatrix * gl_Normal;\n"
"}\n"
;
if (!glutExtensionSupported ("GL_ARB_fragment_shader"))
{
@@ -234,7 +248,8 @@ static void Init (void)
glLinkProgramARB = (PFNGLLINKPROGRAMARBPROC) GETPROCADDRESS ("glLinkProgramARB");
glUseProgramObjectARB = (PFNGLUSEPROGRAMOBJECTARBPROC) GETPROCADDRESS ("glUseProgramObjectARB");
glGetUniformLocationARB = (PFNGLGETUNIFORMLOCATIONARBPROC) GETPROCADDRESS ("glGetUniformLocationARB");
glUniform4fvARB = (PFNGLUNIFORM4FVARBPROC) GETPROCADDRESS ("glUniform4fvARB");
glUniform3fvARB = (PFNGLUNIFORM3FVARBPROC) GETPROCADDRESS ("glUniform3fvARB");
glUniform4fvARB = (PFNGLUNIFORM3FVARBPROC) GETPROCADDRESS ("glUniform4fvARB");
fragShader = glCreateShaderObjectARB (GL_FRAGMENT_SHADER_ARB);
glShaderSourceARB (fragShader, 1, &fragShaderText, NULL);
@@ -254,8 +269,8 @@ static void Init (void)
uDiffuse = glGetUniformLocationARB (program, "diffuse");
uSpecular = glGetUniformLocationARB (program, "specular");
glUniform4fvARB (uDiffuse, 1, diffuse);
glUniform4fvARB (uSpecular, 1, specular);
glUniform4fvARB (uDiffuse, 1, diffuse);
glUniform4fvARB (uSpecular, 1, specular);
glClearColor (0.3f, 0.3f, 0.3f, 0.0f);
glEnable (GL_DEPTH_TEST);

View File

@@ -471,6 +471,11 @@ main(int argc, char **argv)
glutAddMenuEntry("Quit", 666);
glutAttachMenu(GLUT_RIGHT_BUTTON);
if (!glutExtensionSupported("GL_ARB_point_parameters")) {
fprintf(stderr, "Sorry, GL_ARB_point_parameters is not supported.\n");
return -1;
}
glShadeModel(GL_FLAT);
glEnable(GL_DEPTH_TEST);
glEnable(GL_POINT_SMOOTH);

View File

@@ -537,6 +537,9 @@ main(int argc, char **argv)
glutAddMenuEntry("Quit", 666);
glutAttachMenu(GLUT_RIGHT_BUTTON);
makePointList();
makeSprite();
glShadeModel(GL_FLAT);
glEnable(GL_DEPTH_TEST);
glEnable(GL_POINT_SMOOTH);
@@ -546,9 +549,6 @@ main(int argc, char **argv)
glPointParameterfvARB(GL_POINT_DISTANCE_ATTENUATION_ARB, theQuad);
#endif
makePointList();
makeSprite();
glutMainLoop();
return 0; /* ANSI C requires main to return int. */
}

View File

@@ -46,6 +46,7 @@ SOURCES = \
tri-tex.c \
tri-xpd.c \
tri-position.c \
point-position.c \
tri-depth.c \
tri-depth2.c \
tri-depthwrite.c \

119
progs/fp/point-position.c Normal file
View File

@@ -0,0 +1,119 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define GL_GLEXT_PROTOTYPES
#include <GL/glut.h>
#include "GL/gl.h"
static void Init( void )
{
static const char *modulate2D =
"!!ARBfp1.0\n"
"MUL result.color, fragment.position, {.005}.x; \n"
"END"
;
GLuint modulateProg;
if (!glutExtensionSupported("GL_ARB_fragment_program")) {
printf("Error: GL_ARB_fragment_program not supported!\n");
exit(1);
}
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
/* Setup the fragment program */
glGenProgramsARB(1, &modulateProg);
glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
strlen(modulate2D), (const GLubyte *)modulate2D);
printf("glGetError = 0x%x\n", (int) glGetError());
printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
(char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
glEnable(GL_FRAGMENT_PROGRAM_ARB);
glClearColor(.3, .3, .3, 0);
}
static void Reshape(int width, int height)
{
glViewport(0, 0, (GLint)width, (GLint)height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
glMatrixMode(GL_MODELVIEW);
}
static void Key(unsigned char key, int x, int y)
{
switch (key) {
case 27:
exit(1);
default:
return;
}
glutPostRedisplay();
}
static void Draw(void)
{
glClear(GL_COLOR_BUFFER_BIT);
#if 0
glBegin(GL_QUADS);
glTexCoord2f(1,0);
glVertex3f( 0.9, -0.9, -30.0);
glTexCoord2f(1,1);
glVertex3f( 0.9, 0.9, -30.0);
glTexCoord2f(0,1);
glVertex3f(-0.9, 0.9, -30.0);
glTexCoord2f(0,0);
glVertex3f(-0.9, -0.9, -30.0);
glEnd();
#else
glPointSize(100);
glBegin(GL_POINTS);
glColor3f(0,0,1);
glVertex3f( 0, 0, -30.0);
glEnd();
#endif
glFlush();
}
int main(int argc, char **argv)
{
GLenum type;
glutInit(&argc, argv);
glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
type = GLUT_RGB;
type |= GLUT_SINGLE;
glutInitDisplayMode(type);
if (glutCreateWindow("First Tri") == GL_FALSE) {
exit(1);
}
Init();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Draw);
glutMainLoop();
return 0;
}

View File

@@ -1400,3 +1400,176 @@ true
2.3
2.4
$ /*
$ --------------------------------------------------------------------------------------------------
$ Test vec4 extension operations.
$ */
$program VEC4 EXTENSION OPERATIONS
$attrib gl_Vertex
0.0 0.0 0.0 1.0
$attrib _One
1.1 0.0 0.0 0.0
$attrib _Two4
2.1 2.2 2.3 2.4
$attrib _Three4
3.1 3.2 3.3 3.4
$vertex
$code
attribute float _One;
attribute vec4 _Two4;
attribute vec4 _Three4;
void main () {
gl_Position = gl_ModelViewMatrix * gl_Vertex;
gl_FrontColor = vec4 (1.0);
printMESA (_One);
printMESA (_Two4);
printMESA (_Three4);
printMESA (vec4 (_One));
printMESA (_Two4 + _Three4);
printMESA (_Two4 - _Three4);
printMESA (_Two4 * _Three4);
printMESA (_Two4 / _Three4);
printMESA (_Two4 + _One);
printMESA (_Two4 - _One);
printMESA (_Two4 * _One);
printMESA (_Two4 / _One);
printMESA (_One + _Two4);
printMESA (_One - _Two4);
printMESA (_One * _Two4);
printMESA (_One / _Two4);
printMESA (-_Three4);
printMESA (dot (_Two4.xyz, _Three4.xyz));
printMESA (dot (_Two4, _Three4));
printMESA (length (_Two4.xyz));
printMESA (length (_Three4));
printMESA (normalize (_Two4.xyz));
printMESA (normalize (_Three4));
vec4 tmp = _Two4;
printMESA (tmp);
printMESA (_Two4 == _Three4);
printMESA (_Two4 != _Three4);
printMESA (_Two4 == _Two4);
printMESA (_Three4 != _Three4);
printMESA (_Two4 != vec4 (_Two4.xyz, 999.0));
printMESA (_Two4 != vec4 (999.0, _Two4.yzw));
}
$output
1.1
2.1
2.2
2.3
2.4
3.1
3.2
3.3
3.4
1.1
1.1
1.1
1.1
5.2
5.4
5.6
5.8
-1.0
-1.0
-1.0
-1.0
6.51
7.04
7.59
8.16
0.677419
0.6875
0.69697
0.705882
3.2
3.3
3.4
3.5
1.0
1.1
1.2
1.3
2.31
2.42
2.53
2.64
1.909091
2.0
2.090909
2.181818
3.2
3.3
3.4
3.5
-1.0
-1.1
-1.2
-1.3
2.31
2.42
2.53
2.64
0.52381
0.5
0.478261
0.458333
-3.1
-3.2
-3.3
-3.4
21.14
29.3
3.813135
6.503845
0.550728
0.576953
0.603178
0.476641
0.492017
0.507392
0.522768
2.1
2.2
2.3
2.4
false
true
true
false
true
true

View File

@@ -320,7 +320,7 @@ void RenderScene (void)
break;
}
if (fabs (value - attribs[i].data[j]) > EPSILON)
printf ("*** %s\n", "Values are different");
printf ("*** %s, is %f, should be %f\n", "Values are different", value, attribs[i].data[j]);
p = strchr (p, '\n');
if (p != NULL)
p++;

View File

@@ -18,6 +18,7 @@ SOURCES = \
arbfptexture.c \
arbfptrig.c \
arbnpot.c \
arbnpot-mipmap.c \
arbvptest1.c \
arbvptest3.c \
arbvptorus.c \
@@ -50,6 +51,7 @@ SOURCES = \
no_s3tc.c \
packedpixels.c \
pbo.c \
prog_parameter.c \
projtex.c \
readrate.c \
seccolor.c \

View File

@@ -120,7 +120,7 @@ static void Init( void )
static const char *prog2 =
"!!ARBfp1.0\n"
"TEMP R0, R1, R2, R3;\n"
"TEX R0, fragment.texcoord, texture[1], 2D; \n"
"TEX R0, fragment.texcoord, texture[0], 2D; \n"
"TEX R1, fragment.texcoord[1], texture[1], CUBE; \n"
"TEX R2, fragment.texcoord[2], texture[2], 3D; \n"
"TXP R3, fragment.texcoord[3], texture[3], RECT; \n"

View File

@@ -0,0 +1,184 @@
/* Copyright (c) Mark J. Kilgard, 1994. */
/*
* (c) Copyright 1993, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and this permission notice appear in supporting documentation, and that
* the name of Silicon Graphics, Inc. not be used in advertising
* or publicity pertaining to distribution of the software without specific,
* written prior permission.
*
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
* GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
* SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
* KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
* LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
* THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
* US Government Users Restricted Rights
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
* clause at DFARS 252.227-7013 and/or in similar or successor
* clauses in the FAR or the DOD or NASA FAR Supplement.
* Unpublished-- rights reserved under the copyright laws of the
* United States. Contractor/manufacturer is Silicon Graphics,
* Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311.
*
* OpenGL(TM) is a trademark of Silicon Graphics, Inc.
*/
/* mipmap.c
* This program demonstrates using mipmaps for texture maps.
* To overtly show the effect of mipmaps, each mipmap reduction
* level has a solidly colored, contrasting texture image.
* Thus, the quadrilateral which is drawn is drawn with several
* different colors.
*/
#include <stdlib.h>
#include <stdio.h>
#include <GL/glut.h>
GLubyte mipmapImage32[40][46][3];
GLubyte mipmapImage16[20][23][3];
GLubyte mipmapImage8[10][11][3];
GLubyte mipmapImage4[5][5][3];
GLubyte mipmapImage2[2][2][3];
GLubyte mipmapImage1[1][1][3];
static void makeImages(void)
{
int i, j;
for (i = 0; i < 40; i++) {
for (j = 0; j < 46; j++) {
mipmapImage32[i][j][0] = 255;
mipmapImage32[i][j][1] = 255;
mipmapImage32[i][j][2] = 0;
}
}
for (i = 0; i < 20; i++) {
for (j = 0; j < 23; j++) {
mipmapImage16[i][j][0] = 255;
mipmapImage16[i][j][1] = 0;
mipmapImage16[i][j][2] = 255;
}
}
for (i = 0; i < 10; i++) {
for (j = 0; j < 11; j++) {
mipmapImage8[i][j][0] = 255;
mipmapImage8[i][j][1] = 0;
mipmapImage8[i][j][2] = 0;
}
}
for (i = 0; i < 5; i++) {
for (j = 0; j < 5; j++) {
mipmapImage4[i][j][0] = 0;
mipmapImage4[i][j][1] = 255;
mipmapImage4[i][j][2] = 0;
}
}
for (i = 0; i < 2; i++) {
for (j = 0; j < 2; j++) {
mipmapImage2[i][j][0] = 0;
mipmapImage2[i][j][1] = 0;
mipmapImage2[i][j][2] = 255;
}
}
mipmapImage1[0][0][0] = 255;
mipmapImage1[0][0][1] = 255;
mipmapImage1[0][0][2] = 255;
}
static void myinit(void)
{
if (!glutExtensionSupported("GL_ARB_texture_non_power_of_two")) {
printf("Sorry, this program requires GL_ARB_texture_non_power_of_two\n");
exit(1);
}
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LESS);
glShadeModel(GL_FLAT);
glTranslatef(0.0, 0.0, -3.6);
makeImages();
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glTexImage2D(GL_TEXTURE_2D, 0, 3, 40, 46, 0,
GL_RGB, GL_UNSIGNED_BYTE, &mipmapImage32[0][0][0]);
glTexImage2D(GL_TEXTURE_2D, 1, 3, 20, 23, 0,
GL_RGB, GL_UNSIGNED_BYTE, &mipmapImage16[0][0][0]);
glTexImage2D(GL_TEXTURE_2D, 2, 3, 10, 11, 0,
GL_RGB, GL_UNSIGNED_BYTE, &mipmapImage8[0][0][0]);
glTexImage2D(GL_TEXTURE_2D, 3, 3, 5, 5, 0,
GL_RGB, GL_UNSIGNED_BYTE, &mipmapImage4[0][0][0]);
glTexImage2D(GL_TEXTURE_2D, 4, 3, 2, 2, 0,
GL_RGB, GL_UNSIGNED_BYTE, &mipmapImage2[0][0][0]);
glTexImage2D(GL_TEXTURE_2D, 5, 3, 1, 1, 0,
GL_RGB, GL_UNSIGNED_BYTE, &mipmapImage1[0][0][0]);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
GL_NEAREST_MIPMAP_NEAREST);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
glEnable(GL_TEXTURE_2D);
}
static void display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glBegin(GL_QUADS);
glTexCoord2f(0.0, 0.0); glVertex3f(-2.0, -1.0, 0.0);
glTexCoord2f(0.0, 8.0); glVertex3f(-2.0, 1.0, 0.0);
glTexCoord2f(8.0, 8.0); glVertex3f(2000.0, 1.0, -6000.0);
glTexCoord2f(8.0, 0.0); glVertex3f(2000.0, -1.0, -6000.0);
glEnd();
glFlush();
}
static void myReshape(int w, int h)
{
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(60.0, 1.0*(GLfloat)w/(GLfloat)h, 1.0, 30000.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}
static void
key(unsigned char k, int x, int y)
{
switch (k) {
case 27: /* Escape */
exit(0);
break;
default:
return;
}
glutPostRedisplay();
}
int main(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize (500, 500);
glutCreateWindow (argv[0]);
myinit();
glutReshapeFunc (myReshape);
glutDisplayFunc(display);
glutKeyboardFunc(key);
glutMainLoop();
return 0; /* ANSI C requires main to return int. */
}

View File

@@ -28,6 +28,8 @@ struct object
static struct object Objects[NUM_OBJECTS];
static GLuint NumObjects;
static GLuint Win;
static GLfloat Xrot = 0, Yrot = 0, Zrot = 0;
static GLboolean Anim = GL_TRUE;
@@ -118,6 +120,14 @@ static void Reshape( int width, int height )
}
static void FreeBuffers(void)
{
int i;
for (i = 0; i < NUM_OBJECTS; i++)
glDeleteBuffersARB(1, &Objects[i].BufferID);
}
static void Key( unsigned char key, int x, int y )
{
const GLfloat step = 3.0;
@@ -138,6 +148,8 @@ static void Key( unsigned char key, int x, int y )
Zrot += step;
break;
case 27:
FreeBuffers();
glutDestroyWindow(Win);
exit(0);
break;
}
@@ -346,7 +358,7 @@ int main( int argc, char *argv[] )
glutInitWindowPosition( 0, 0 );
glutInitWindowSize( 600, 300 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow(argv[0]);
Win = glutCreateWindow(argv[0]);
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );

View File

@@ -0,0 +1,285 @@
/*
* (C) Copyright IBM Corporation 2006
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* on the rights to use, copy, modify, merge, publish, distribute, sub
* license, and/or sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
* IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
/**
* \file prog_parameter.c
*
* Test various aspects of setting (and getting) low-level program parameters.
* This is primarilly intended as a test for GL_EXT_gpu_program_parameters,
* but it turns out that it hits some other functionality along the way.
*
* \author Ian Romanick <idr@us.ibm.com>
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <GL/glut.h>
#ifndef GL_EXT_gpu_program_parameters
typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC)(GLenum,
GLuint, GLsizei, const GLfloat *);
typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC)(GLenum,
GLuint, GLsizei, const GLfloat *);
#endif
static PFNGLPROGRAMLOCALPARAMETER4FVARBPROC program_local_parameter4fv = NULL;
static PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC get_program_local_parameterfv = NULL;
static PFNGLPROGRAMENVPARAMETER4FVARBPROC program_env_parameter4fv = NULL;
static PFNGLGETPROGRAMENVPARAMETERFVARBPROC get_program_env_parameterfv = NULL;
static PFNGLBINDPROGRAMARBPROC bind_program = NULL;
static PFNGLGETPROGRAMIVARBPROC get_program = NULL;
static PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC program_local_parameters4fv = NULL;
static PFNGLPROGRAMENVPARAMETERS4FVEXTPROC program_env_parameters4fv = NULL;
static int Width = 400;
static int Height = 200;
static const GLfloat Near = 5.0, Far = 25.0;
static void Display( void )
{
}
static void Idle( void )
{
}
static void Visible( int vis )
{
if ( vis == GLUT_VISIBLE ) {
glutIdleFunc( Idle );
}
else {
glutIdleFunc( NULL );
}
}
static void Reshape( int width, int height )
{
GLfloat ar = (float) width / (float) height;
Width = width;
Height = height;
glViewport( 0, 0, width, height );
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glFrustum( -ar, ar, -1.0, 1.0, Near, Far );
}
static void Key( unsigned char key, int x, int y )
{
(void) x;
(void) y;
switch (key) {
case 27:
exit(0);
break;
}
glutPostRedisplay();
}
static int set_parameter_batch( GLsizei count, GLfloat * param,
const char * name,
PFNGLPROGRAMLOCALPARAMETER4FVARBPROC set_parameter,
PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC set_parameters,
PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC get_parameter
)
{
unsigned i;
int pass = 1;
for ( i = 0 ; i < (4 * count) ; i++ ) {
param[i] = (GLfloat) random() / (GLfloat) random();
}
/* Try using the "classic" interface.
*/
printf("Testing glProgram%sParameter4fvARB (count = %u)...\n", name, count);
for ( i = 0 ; i < count ; i++ ) {
(*set_parameter)(GL_VERTEX_PROGRAM_ARB, i, & param[i * 4]);
}
for ( i = 0 ; i < count ; i++ ) {
GLfloat temp[4];
(*get_parameter)(GL_VERTEX_PROGRAM_ARB, i, temp);
if ( (temp[0] != param[(i * 4) + 0])
|| (temp[1] != param[(i * 4) + 1])
|| (temp[2] != param[(i * 4) + 2])
|| (temp[3] != param[(i * 4) + 3]) ) {
printf("Mismatch in glProgram%sParameter4fvARB index %u!\n", name, i);
printf("Got { %f, %f, %f, %f }, expected { %f, %f, %f, %f }!\n",
temp[0], temp[1],
temp[2], temp[3],
param[(i * 4) + 0], param[(i * 4) + 1],
param[(i * 4) + 2], param[(i * 4) + 3]);
pass = 0;
break;
}
}
if ( set_parameters == NULL ) {
return pass;
}
for ( i = 0 ; i < (4 * count) ; i++ ) {
param[i] = (GLfloat) random() / (GLfloat) random();
}
printf("Testing glProgram%sParameters4fvEXT (count = %u)...\n", name, count);
(*set_parameters)(GL_VERTEX_PROGRAM_ARB, 0, count, param);
for ( i = 0 ; i < count ; i++ ) {
GLfloat temp[4];
(*get_parameter)(GL_VERTEX_PROGRAM_ARB, i, temp);
if ( (temp[0] != param[(i * 4) + 0])
|| (temp[1] != param[(i * 4) + 1])
|| (temp[2] != param[(i * 4) + 2])
|| (temp[3] != param[(i * 4) + 3]) ) {
printf("Mismatch in glProgram%sParameters4fvEXT index %u!\n", name, i);
printf("Got { %f, %f, %f, %f }, expected { %f, %f, %f, %f }!\n",
temp[0], temp[1],
temp[2], temp[3],
param[(i * 4) + 0], param[(i * 4) + 1],
param[(i * 4) + 2], param[(i * 4) + 3]);
pass = 0;
break;
}
}
return pass;
}
static void Init( void )
{
const char * const ver_string = (const char * const)
glGetString( GL_VERSION );
int pass = 1;
GLfloat * params;
GLint max_program_env_parameters;
GLint max_program_local_parameters;
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
printf("GL_VERSION = %s\n\n", ver_string);
if ( !glutExtensionSupported("GL_ARB_vertex_program") ) {
printf("Sorry, this program requires GL_ARB_vertex_program\n");
exit(2);
}
program_local_parameter4fv = glutGetProcAddress( "glProgramLocalParameter4fvARB" );
program_env_parameter4fv = glutGetProcAddress( "glProgramEnvParameter4fvARB" );
get_program_local_parameterfv = glutGetProcAddress( "glGetProgramLocalParameterfvARB" );
get_program_env_parameterfv = glutGetProcAddress( "glGetProgramEnvParameterfvARB" );
bind_program = glutGetProcAddress( "glBindProgramARB" );
get_program = glutGetProcAddress( "glGetProgramivARB" );
if ( glutExtensionSupported("GL_EXT_gpu_program_parameters") ) {
printf("GL_EXT_gpu_program_parameters available, testing that path.\n");
program_local_parameters4fv = glutGetProcAddress( "glProgramLocalParameters4fvEXT" );
program_env_parameters4fv = glutGetProcAddress( "glProgramEnvParameters4fvEXT" );
}
else {
printf("GL_EXT_gpu_program_parameters not available.\n");
program_local_parameters4fv = NULL;
program_env_parameters4fv = NULL;
}
/* Since the test sets program local parameters, a program must be bound.
* Program source, however, is not needed.
*/
(*bind_program)(GL_VERTEX_PROGRAM_ARB, 1);
(*get_program)(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_ENV_PARAMETERS_ARB,
& max_program_env_parameters);
params = malloc(max_program_env_parameters * 4 * sizeof(GLfloat));
pass &= set_parameter_batch(max_program_env_parameters, params, "Env",
program_env_parameter4fv,
program_env_parameters4fv,
get_program_env_parameterfv);
(*get_program)(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB,
& max_program_local_parameters);
if (max_program_local_parameters > max_program_env_parameters) {
params = realloc(params,
max_program_local_parameters * 4 * sizeof(GLfloat));
}
pass &= set_parameter_batch(max_program_local_parameters, params, "Local",
program_local_parameter4fv,
program_local_parameters4fv,
get_program_local_parameterfv);
free(params);
if (! pass) {
printf("FAIL!\n");
exit(1);
}
printf("PASS!\n");
}
int main( int argc, char *argv[] )
{
glutInit( &argc, argv );
glutInitWindowPosition( 0, 0 );
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB );
glutCreateWindow( "Program Parameters Test" );
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
glutVisibilityFunc( Visible );
Init();
return 0;
}

View File

@@ -31,10 +31,10 @@
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
**
** $Date: 2005/10/28 13:09:23 $ $Revision: 1.3 $
** $Date: 2006/08/30 19:02:45 $ $Revision: 1.4 $
*/
/*
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.cc,v 1.3 2005/10/28 13:09:23 brianp Exp $
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.cc,v 1.4 2006/08/30 19:02:45 brianp Exp $
*/
#include <stdlib.h>
@@ -72,7 +72,7 @@ void sampleCompRight(Real* topVertex, Real* botVertex,
*/
Int midIndex1;
Int midIndex2;
Int gridMidIndex1, gridMidIndex2 = 0;
Int gridMidIndex1 = 0, gridMidIndex2 = 0;
//midIndex1: array[i] <= v, array[i+1] > v
//midIndex2: array[i] >= v, array[i+1] < v
midIndex1 = rightChain->findIndexBelowGen(rightGridChain->get_v_value(gridIndex1),

View File

@@ -6590,16 +6590,16 @@ static void halve1DimagePackedPixel(int components,
* Contributed by Gerk Huisma <gerk@five-d.demon.nl>.
*/
typedef GLAPI void (GLAPIENTRY *TexImage3Dproc)( GLenum target, GLint level,
typedef void (GLAPIENTRY *TexImage3Dproc)( GLenum target, GLint level,
GLenum internalFormat,
GLsizei width, GLsizei height,
GLsizei depth, GLint border,
GLenum format, GLenum type,
const GLvoid *pixels );
static TexImage3Dproc pTexImage3D;
static TexImage3Dproc pTexImage3D = 0;
#ifndef WIN32
#ifndef _WIN32
# include <dlfcn.h>
# include <sys/types.h>
#else
@@ -6614,7 +6614,7 @@ static void gluTexImage3D( GLenum target, GLint level,
const GLvoid *pixels )
{
if (!pTexImage3D) {
#ifdef WIN32
#ifdef _WIN32
pTexImage3D = (TexImage3Dproc) wglGetProcAddress("glTexImage3D");
if (!pTexImage3D)
pTexImage3D = (TexImage3Dproc) wglGetProcAddress("glTexImage3DEXT");

View File

@@ -24,6 +24,62 @@
#include "internal.h"
/*****************************************************************************/
static int g_ignore_key_repeat = 0;
/*****************************************************************************/
int GLUTAPIENTRY
glutDeviceGet( GLenum type )
{
switch (type) {
case GLUT_HAS_KEYBOARD:
return (keyboard != NULL);
case GLUT_HAS_MOUSE:
return (mouse != NULL);
case GLUT_NUM_MOUSE_BUTTONS:
if (mouse) {
DFBInputDeviceDescription dsc;
mouse->GetDescription( mouse, &dsc );
return dsc.max_button+1;
}
break;
case GLUT_DEVICE_IGNORE_KEY_REPEAT:
return g_ignore_key_repeat;
case GLUT_DEVICE_KEY_REPEAT:
return (g_ignore_key_repeat) ? GLUT_KEY_REPEAT_OFF
: GLUT_KEY_REPEAT_ON;
case GLUT_HAS_JOYSTICK:
case GLUT_OWNS_JOYSTICK:
return (g_game && joystick); /* only available in game mode */
case GLUT_JOYSTICK_BUTTONS:
if (joystick) {
DFBInputDeviceDescription dsc;
joystick->GetDescription( joystick, &dsc );
return dsc.max_button+1;
}
break;
case GLUT_JOYSTICK_AXES:
if (joystick) {
DFBInputDeviceDescription dsc;
joystick->GetDescription( joystick, &dsc );
return dsc.max_axis+1;
}
break;
case GLUT_JOYSTICK_POLL_RATE:
if (joystick)
return 1; /* hack */
break;
default:
break;
}
return 0;
}
int GLUTAPIENTRY
glutGetModifiers( void )
{
@@ -36,12 +92,14 @@ glutGetModifiers( void )
void GLUTAPIENTRY
glutIgnoreKeyRepeat( int ignore )
{
g_ignore_key_repeat = ignore;
}
void GLUTAPIENTRY
glutSetKeyRepeat( int mode )
{
g_ignore_key_repeat = (mode == GLUT_KEY_REPEAT_OFF);
}
@@ -137,7 +195,7 @@ __glutModifiers( DFBInputDeviceModifierMask mask )
static void
__glutWindowEvent( DFBWindowEvent *e )
__glutWindowEvent( DFBWindowEvent *e, DFBWindowEvent *p )
{
__GlutWindow *window;
@@ -148,6 +206,12 @@ __glutWindowEvent( DFBWindowEvent *e )
switch (e->type) {
case DWET_KEYDOWN:
window->modifiers = __glutModifiers( e->modifiers );
if (g_ignore_key_repeat && p) {
if (p->type == DWET_KEYDOWN &&
p->window_id == e->window_id &&
p->key_symbol == e->key_symbol)
break;
}
if (DFB_KEY_IS_ASCII( e->key_symbol )) {
if (keyboard_func) {
__glutSetWindow( window );
@@ -227,13 +291,18 @@ __glutWindowEvent( DFBWindowEvent *e )
static void
__glutInputEvent( DFBInputEvent *e )
__glutInputEvent( DFBInputEvent *e, DFBInputEvent *p )
{
__glutAssert( g_game != NULL );
switch (e->type) {
case DIET_KEYPRESS:
g_game->modifiers = __glutModifiers( e->modifiers );
g_game->modifiers = __glutModifiers( e->modifiers );
if (g_ignore_key_repeat && p) {
if (p->type == DIET_KEYPRESS &&
p->key_symbol == e->key_symbol)
break;
}
if (DFB_KEY_IS_ASCII( e->key_symbol )) {
if (keyboard_func) {
__glutSetWindow( g_game );
@@ -367,20 +436,37 @@ glutMainLoop( void )
__glutAssert( events != NULL );
while (GL_TRUE) {
DFBEvent evt;
DFBEvent evt, prev;
g_idle = GL_TRUE;
__glutHandleTimers();
__glutHandleWindows();
prev.clazz = DFEC_NONE;
while (events->GetEvent( events, &evt ) == DFB_OK) {
g_idle = GL_FALSE;
if (evt.clazz == DFEC_WINDOW)
__glutWindowEvent( &evt.window );
else
__glutInputEvent( &evt.input );
switch (evt.clazz) {
case DFEC_WINDOW:
if (prev.clazz == DFEC_WINDOW)
__glutWindowEvent( &evt.window, &prev.window );
else
__glutWindowEvent( &evt.window, NULL );
break;
case DFEC_INPUT:
if (prev.clazz == DFEC_INPUT)
__glutInputEvent( &evt.input, &prev.input );
else
__glutInputEvent( &evt.input, NULL );
break;
default:
__glutWarning( "unexpected event class %d!\n", evt.clazz );
break;
}
prev = evt;
__glutHandleTimers();
}

View File

@@ -207,45 +207,6 @@ glutLayerGet( GLenum type )
return 0;
}
int GLUTAPIENTRY
glutDeviceGet( GLenum type )
{
switch (type) {
case GLUT_HAS_KEYBOARD:
return (keyboard != NULL);
case GLUT_HAS_MOUSE:
return (mouse != NULL);
case GLUT_NUM_MOUSE_BUTTONS:
if (mouse) {
DFBInputDeviceDescription dsc;
mouse->GetDescription( mouse, &dsc );
return dsc.max_button+1;
}
break;
case GLUT_HAS_JOYSTICK:
return (g_game && joystick); /* only available in game mode */
case GLUT_JOYSTICK_BUTTONS:
if (joystick) {
DFBInputDeviceDescription dsc;
joystick->GetDescription( joystick, &dsc );
return dsc.max_button+1;
}
break;
case GLUT_JOYSTICK_AXES:
if (joystick) {
DFBInputDeviceDescription dsc;
joystick->GetDescription( joystick, &dsc );
return dsc.max_axis+1;
}
break;
default:
break;
}
return 0;
}
void GLUTAPIENTRY
glutReportErrors( void )
{

View File

@@ -4,7 +4,7 @@ TOP = ../../..
include $(TOP)/configs/current
GLX_SHARED = $(TOP)/src/glut/glx
SHAPES = $(TOP)/src/glut/mini
MINI_SHARED = $(TOP)/src/glut/mini
GLUT_MAJOR = 3
GLUT_MINOR = 7
@@ -13,13 +13,23 @@ GLUT_TINY = 1
INCLUDES = -I$(TOP)/include -I$(GLX_SHARED)
CORE_SOURCES = \
glut_fbdev.c
fbdev.c \
colormap.c \
cursor.c \
menu.c \
overlay.c \
ext.c \
state.c \
input.c \
callback.c \
gamemode.c \
vidresize.c \
bitmap.c \
stroke.c
GLX_SHARED_SOURCES = \
$(GLX_SHARED)/glut_8x13.c \
$(GLX_SHARED)/glut_9x15.c \
$(GLX_SHARED)/glut_bwidth.c \
$(GLX_SHARED)/glut_bitmap.c \
$(GLX_SHARED)/glut_hel10.c \
$(GLX_SHARED)/glut_hel12.c \
$(GLX_SHARED)/glut_hel18.c \
@@ -27,12 +37,12 @@ GLX_SHARED_SOURCES = \
$(GLX_SHARED)/glut_tr24.c \
$(GLX_SHARED)/glut_mroman.c \
$(GLX_SHARED)/glut_roman.c \
$(GLX_SHARED)/glut_swidth.c \
$(GLX_SHARED)/glut_stroke.c \
$(TOP)/src/glut/mini/models.c \
$(GLX_SHARED)/glut_teapot.c
SOURCES = $(CORE_SOURCES) $(GLX_SHARED_SOURCES)
MINI_SHARED_SOURCES = \
$(MINI_SHARED)/models.c \
$(MINI_SHARED)/teapot.c
SOURCES = $(CORE_SOURCES) $(GLX_SHARED_SOURCES) $(MINI_SHARED_SOURCES)
OBJECTS = $(SOURCES:.c=.o)
@@ -40,7 +50,7 @@ OBJECTS = $(SOURCES:.c=.o)
##### RULES #####
.c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
.S.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
@@ -58,6 +68,11 @@ $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
$(GLUT_LIB_DEPS) -install $(TOP)/$(LIB_DIR) \
$(MKLIB_OPTIONS) $(OBJECTS)
install:
$(INSTALL) -d $(INSTALL_DIR)/include/GL
$(INSTALL) -d $(INSTALL_DIR)/$(LIB_DIR)
$(INSTALL) -m 644 $(TOP)/include/GL/glut.h $(INSTALL_DIR)/include/GL
$(COPY_LIBS) $(TOP)/$(LIB_DIR)/libglut* $(INSTALL_DIR)/$(LIB_DIR)
# Run 'make -f Makefile.solo dep' to update the dependencies if you change
# what's included by any source file.

78
src/glut/fbdev/bitmap.c Normal file
View File

@@ -0,0 +1,78 @@
/*
* Mesa 3-D graphics library
* Version: 6.5
* Copyright (C) 1995-2006 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* Library for glut using mesa fbdev driver
*
* Written by Sean D'Epagnier (c) 2006
*
* To improve on this library, maybe support subwindows or overlays,
* I (sean at depagnier dot com) will do my best to help.
*/
#include "glutbitmap.h"
void glutBitmapCharacter(GLUTbitmapFont font, int c)
{
const BitmapCharRec *ch;
BitmapFontPtr fi = (BitmapFontPtr) font;
if (c < fi->first ||
c >= fi->first + fi->num_chars)
return;
ch = fi->ch[c - fi->first];
if (!ch)
return;
glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT);
glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE);
glPixelStorei(GL_UNPACK_LSB_FIRST, GL_FALSE);
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glBitmap(ch->width, ch->height, ch->xorig, ch->yorig,
ch->advance, 0, ch->bitmap);
glPopClientAttrib();
}
int glutBitmapWidth (GLUTbitmapFont font, int c)
{
const BitmapCharRec *ch;
BitmapFontPtr fi = (BitmapFontPtr) font;
if (c < fi->first || c >= fi->first + fi->num_chars)
return 0;
ch = fi->ch[c - fi->first];
if (ch)
return ch->advance;
return 0;
}
int glutBitmapLength(GLUTbitmapFont font, const unsigned char *string)
{
int length = 0;
for (; *string; string++)
length += glutBitmapWidth(font, *string);
return length;
}

172
src/glut/fbdev/callback.c Normal file
View File

@@ -0,0 +1,172 @@
/*
* Mesa 3-D graphics library
* Version: 6.5
* Copyright (C) 1995-2006 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* Library for glut using mesa fbdev driver
*
* Written by Sean D'Epagnier (c) 2006
*/
#include <GL/glut.h>
#include "internal.h"
void (*DisplayFunc)(void) = NULL;
void (*ReshapeFunc)(int width, int height) = NULL;
void (*KeyboardFunc)(unsigned char key, int x, int y) = NULL;
void (*KeyboardUpFunc)(unsigned char key, int x, int y) = NULL;
void (*MouseFunc)(int key, int state, int x, int y) = NULL;
void (*MotionFunc)(int x, int y) = NULL;
void (*PassiveMotionFunc)(int x, int y) = NULL;
void (*VisibilityFunc)(int state) = NULL;
void (*SpecialFunc)(int key, int x, int y) = NULL;
void (*SpecialUpFunc)(int key, int x, int y) = NULL;
void (*IdleFunc)(void) = NULL;
void (*MenuStatusFunc)(int state, int x, int y) = NULL;
void (*MenuStateFunc)(int state) = NULL;
void glutDisplayFunc(void (*func)(void))
{
DisplayFunc = func;
}
void glutOverlayDisplayFunc(void (*func)(void))
{
}
void glutWindowStatusFunc(void (*func)(int state))
{
}
void glutReshapeFunc(void (*func)(int width, int height))
{
ReshapeFunc = func;
}
void glutKeyboardFunc(void (*func)(unsigned char key, int x, int y))
{
KeyboardFunc = func;
}
void glutKeyboardUpFunc(void (*func)(unsigned char key, int x, int y))
{
KeyboardUpFunc = func;
}
void glutMouseFunc(void (*func)(int button, int state, int x, int y))
{
MouseEnabled = 1;
MouseFunc = func;
}
void glutMotionFunc(void (*func)(int x, int y))
{
MouseEnabled = 1;
MotionFunc = func;
}
void glutPassiveMotionFunc(void (*func)(int x, int y))
{
MouseEnabled = 1;
PassiveMotionFunc = func;
}
void glutJoystickFunc(void (*func)(unsigned int buttonMask,
int x, int y, int z), int pollInterval)
{
}
void glutVisibilityFunc(void (*func)(int state))
{
VisibilityFunc = func;
}
void glutEntryFunc(void (*func)(int state))
{
}
void glutSpecialFunc(void (*func)(int key, int x, int y))
{
SpecialFunc = func;
}
void glutSpecialUpFunc(void (*func)(int key, int x, int y))
{
SpecialUpFunc = func;
}
void glutSpaceballMotionFunc(void (*func)(int x, int y, int z))
{
}
void glutSpaceballRotateFunc(void (*func)(int x, int y, int z))
{
}
void glutSpaceballButtonFunc(void (*func)(int button, int state))
{
}
void glutButtonBoxFunc(void (*func)(int button, int state))
{
}
void glutDialsFunc(void (*func)(int dial, int value))
{
}
void glutTabletMotionFunc(void (*func)(int x, int y))
{
}
void glutTabletButtonFunc(void (*func)(int button, int state,
int x, int y))
{
}
void glutMenuStatusFunc(void (*func)(int status, int x, int y))
{
MenuStatusFunc = func;
}
void glutMenuStateFunc(void (*func)(int status))
{
MenuStateFunc = func;
}
void glutIdleFunc(void (*func)(void))
{
IdleFunc = func;
}
void glutTimerFunc(unsigned int msecs,
void (*func)(int value), int value)
{
struct GlutTimer **head = &GlutTimers, *timer = malloc(sizeof *timer);
timer->time = glutGet(GLUT_ELAPSED_TIME) + msecs;
timer->func = func;
timer->value = value;
while(*head && (*head)->time < timer->time)
head = &(*head)->next;
timer->next = *head;
*head = timer;
}

170
src/glut/fbdev/colormap.c Normal file
View File

@@ -0,0 +1,170 @@
/*
* Mesa 3-D graphics library
* Version: 6.5
* Copyright (C) 1995-2006 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* Library for glut using mesa fbdev driver
*
* Written by Sean D'Epagnier (c) 2006
*/
#include <stdlib.h>
#include <linux/fb.h>
#include <GL/gl.h>
#include <GL/glut.h>
#include "internal.h"
#define TOCMAP(x)(unsigned short)((x<0?0:x>1?1:x)*(GLfloat) ((1<<16) - 1))
#define TORMAP(x)(unsigned short)((x<0?0:x>1?1:x)*(GLfloat)(REVERSECMAPSIZE-1))
#define FROMCMAP(x) (GLfloat)x / (GLfloat)((1<<16) - 1)
static struct fb_cmap ColorMap;
unsigned short RedColorMap[256], GreenColorMap[256], BlueColorMap[256];
unsigned char ReverseColorMap[REVERSECMAPSIZE]
[REVERSECMAPSIZE]
[REVERSECMAPSIZE];
static void FindReverseMap(int r, int g, int b)
{
static int count;
int i, shift = 16 - REVERSECMAPSIZELOG;
unsigned int minv = -1, mini = 0;
for(i=0; i<256; i++) {
int val = 0;
val += abs(r-(RedColorMap[i]>>shift));
val += abs(g-(GreenColorMap[i]>>shift));
val += abs(b-(BlueColorMap[i]>>shift));
if(val < minv) {
minv = val;
mini = i;
}
}
ReverseColorMap[r][g][b] = mini;
}
static void FillItemReverseColorMap(int r, int g, int b)
{
FindReverseMap(r, g, b);
if(r > 0)
FindReverseMap(r-1, g, b);
if(r < REVERSECMAPSIZE - 1)
FindReverseMap(r+1, g, b);
if(g > 0)
FindReverseMap(r, g-1, b);
if(g < REVERSECMAPSIZE - 1)
FindReverseMap(r, g+1, b);
if(b > 0)
FindReverseMap(r, g, b-1);
if(b < REVERSECMAPSIZE - 1)
FindReverseMap(r, g, b+1);
}
static void FillReverseColorMap(void)
{
int r, g, b;
for(r = 0; r < REVERSECMAPSIZE; r++)
for(g = 0; g < REVERSECMAPSIZE; g++)
for(b = 0; b < REVERSECMAPSIZE; b++)
FindReverseMap(r, g, b);
}
void RestoreColorMap(void)
{
if (ioctl(FrameBufferFD, FBIOPUTCMAP, (void *) &ColorMap) < 0)
sprintf(exiterror, "ioctl(FBIOPUTCMAP) failed!\n");
}
void LoadColorMap(void)
{
ColorMap.start = 0;
ColorMap.red = RedColorMap;
ColorMap.green = GreenColorMap;
ColorMap.blue = BlueColorMap;
ColorMap.transp = NULL;
if(DisplayMode & GLUT_INDEX) {
ColorMap.len = 256;
if (ioctl(FrameBufferFD, FBIOGETCMAP, (void *) &ColorMap) < 0)
sprintf(exiterror, "ioctl(FBIOGETCMAP) failed!\n");
FillReverseColorMap();
} else {
int rcols = 1 << VarInfo.red.length;
int gcols = 1 << VarInfo.green.length;
int bcols = 1 << VarInfo.blue.length;
int i;
ColorMap.len = gcols;
for (i = 0; i < rcols ; i++)
RedColorMap[i] = (65536/(rcols-1)) * i;
for (i = 0; i < gcols ; i++)
GreenColorMap[i] = (65536/(gcols-1)) * i;
for (i = 0; i < bcols ; i++)
BlueColorMap[i] = (65536/(bcols-1)) * i;
RestoreColorMap();
}
}
void glutSetColor(int cell, GLfloat red, GLfloat green, GLfloat blue)
{
if(cell < 0 || cell >= 256)
return;
RedColorMap[cell] = TOCMAP(red);
GreenColorMap[cell] = TOCMAP(green);
BlueColorMap[cell] = TOCMAP(blue);
RestoreColorMap();
FillItemReverseColorMap(TORMAP(red), TORMAP(green), TORMAP(blue));
}
GLfloat glutGetColor(int cell, int component)
{
if(!(DisplayMode & GLUT_INDEX))
return -1.0;
if(cell < 0 || cell > 256)
return -1.0;
switch(component) {
case GLUT_RED:
return FROMCMAP(RedColorMap[cell]);
case GLUT_GREEN:
return FROMCMAP(GreenColorMap[cell]);
case GLUT_BLUE:
return FROMCMAP(BlueColorMap[cell]);
}
return -1.0;
}
void glutCopyColormap(int win)
{
}

264
src/glut/fbdev/cursor.c Normal file
View File

@@ -0,0 +1,264 @@
/*
* Mesa 3-D graphics library
* Version: 6.5
* Copyright (C) 1995-2006 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* Library for glut using mesa fbdev driver
*
* Written by Sean D'Epagnier (c) 2006
*/
/* these routines are written to access graphics memory directly, not using mesa
to render the cursor, this is faster, it would be good to use a hardware
cursor if it exists instead */
#include <stdlib.h>
#include <inttypes.h>
#include <linux/fb.h>
#include <GL/glut.h>
#include "internal.h"
#include "cursors.h"
int CurrentCursor = GLUT_CURSOR_LEFT_ARROW;
static int LastMouseX, LastMouseY;
static unsigned char *MouseBuffer;
void InitializeCursor(void)
{
if(!MouseBuffer && (MouseBuffer = malloc(CURSOR_WIDTH * CURSOR_HEIGHT
* VarInfo.bits_per_pixel / 8)) == NULL) {
sprintf(exiterror, "malloc failure\n");
exit(0);
}
MouseX = VarInfo.xres / 2;
MouseY = VarInfo.yres / 2;
}
void EraseCursor(void)
{
int off = LastMouseY * FixedInfo.line_length
+ LastMouseX * VarInfo.bits_per_pixel / 8;
int stride = CURSOR_WIDTH * VarInfo.bits_per_pixel / 8;
int i;
unsigned char *src = MouseBuffer;
for(i = 0; i<CURSOR_HEIGHT; i++) {
memcpy(BackBuffer + off, src, stride);
src += stride;
off += FixedInfo.line_length;
}
}
static void SaveCursor(int x, int y)
{
int bypp, off, stride, i;
unsigned char *src = MouseBuffer;
if(x < 0)
LastMouseX = 0;
else
if(x > (int)VarInfo.xres - CURSOR_WIDTH)
LastMouseX = VarInfo.xres - CURSOR_WIDTH;
else
LastMouseX = x;
if(y < 0)
LastMouseY = 0;
else
if(y > (int)VarInfo.yres - CURSOR_HEIGHT)
LastMouseY = VarInfo.yres - CURSOR_HEIGHT;
else
LastMouseY = y;
bypp = VarInfo.bits_per_pixel / 8;
off = LastMouseY * FixedInfo.line_length + LastMouseX * bypp;
stride = CURSOR_WIDTH * bypp;
for(i = 0; i<CURSOR_HEIGHT; i++) {
memcpy(src, BackBuffer + off, stride);
src += stride;
off += FixedInfo.line_length;
}
}
void DrawCursor(void)
{
int i, j, px, py, xoff, xlen, yoff, ylen, bypp, cstride, dstride;
unsigned char *c;
const unsigned char *d;
if(CurrentCursor < 0 || CurrentCursor >= NUM_CURSORS)
return;
px = MouseX - CursorsXOffset[CurrentCursor];
py = MouseY - CursorsYOffset[CurrentCursor];
SaveCursor(px, py);
xoff = 0;
if(px < 0)
xoff = -px;
xlen = CURSOR_WIDTH;
if(px + CURSOR_WIDTH > VarInfo.xres)
xlen = VarInfo.xres - px;
yoff = 0;
if(py < 0)
yoff = -py;
ylen = CURSOR_HEIGHT;
if(py + CURSOR_HEIGHT > VarInfo.yres)
ylen = VarInfo.yres - py;
bypp = VarInfo.bits_per_pixel / 8;
c = BackBuffer + FixedInfo.line_length * (py + yoff) + (px + xoff) * bypp;
cstride = FixedInfo.line_length - bypp * (xlen - xoff);
d = Cursors[CurrentCursor] + (CURSOR_WIDTH * yoff + xoff)*4;
dstride = (CURSOR_WIDTH - xlen + xoff) * 4;
switch(bypp) {
case 1:
{
const int shift = 8 - REVERSECMAPSIZELOG;
for(i = yoff; i < ylen; i++) {
for(j = xoff; j < xlen; j++) {
if(d[3] < 220)
*c = ReverseColorMap
[(d[0]+(((int)(RedColorMap[c[0]]>>8)*d[3])>>8))>>shift]
[(d[1]+(((int)(GreenColorMap[c[0]]>>8)*d[3])>>8))>>shift]
[(d[2]+(((int)(BlueColorMap[c[0]]>>8)*d[3])>>8))>>shift];
c++;
d+=4;
}
d += dstride;
c += cstride;
}
} break;
case 2:
{
uint16_t *e = (void*)c;
cstride /= 2;
for(i = yoff; i < ylen; i++) {
for(j = xoff; j < xlen; j++) {
if(d[3] < 220)
e[0] = ((((d[0] + (((int)(((e[0] >> 8) & 0xf8)
| ((c[0] >> 11) & 0x7)) * d[3]) >> 8)) & 0xf8) << 8)
| (((d[1] + (((int)(((e[0] >> 3) & 0xfc)
| ((e[0] >> 5) & 0x3)) * d[3]) >> 8)) & 0xfc) << 3)
| ((d[2] + (((int)(((e[0] << 3) & 0xf8)
| (e[0] & 0x7)) * d[3]) >> 8)) >> 3));
e++;
d+=4;
}
d += dstride;
e += cstride;
}
} break;
case 3:
case 4:
for(i = yoff; i < ylen; i++) {
for(j = xoff; j < xlen; j++) {
if(d[3] < 220) {
c[0] = d[0] + (((int)c[0] * d[3]) >> 8);
c[1] = d[1] + (((int)c[1] * d[3]) >> 8);
c[2] = d[2] + (((int)c[2] * d[3]) >> 8);
}
c+=bypp;
d+=4;
}
d += dstride;
c += cstride;
} break;
}
}
#define MIN(x, y) x < y ? x : y
void SwapCursor(void)
{
int px = MouseX - CursorsXOffset[CurrentCursor];
int py = MouseY - CursorsYOffset[CurrentCursor];
int minx = MIN(px, LastMouseX);
int sizex = abs(px - LastMouseX);
int miny = MIN(py, LastMouseY);
int sizey = abs(py - LastMouseY);
DrawCursor();
/* now update the portion of the screen that has changed */
if(DisplayMode & GLUT_DOUBLE && (sizex || sizey)) {
int off, stride, i;
if(minx < 0)
minx = 0;
if(miny < 0)
miny = 0;
if(minx + sizex > VarInfo.xres - CURSOR_WIDTH)
sizex = VarInfo.xres - CURSOR_WIDTH - minx;
if(miny + sizey > VarInfo.yres - CURSOR_HEIGHT)
sizey = VarInfo.yres - CURSOR_HEIGHT - miny;
off = FixedInfo.line_length * miny
+ minx * VarInfo.bits_per_pixel / 8;
stride = (sizex + CURSOR_WIDTH) * VarInfo.bits_per_pixel / 8;
for(i = 0; i< sizey + CURSOR_HEIGHT; i++) {
memcpy(FrameBuffer+off, BackBuffer+off, stride);
off += FixedInfo.line_length;
}
}
}
void glutWarpPointer(int x, int y)
{
if(x < 0)
x = 0;
if(x >= VarInfo.xres)
x = VarInfo.xres - 1;
MouseX = x;
if(y < 0)
y = 0;
if(y >= VarInfo.yres)
y = VarInfo.yres - 1;
MouseY = y;
EraseCursor();
SwapCursor();
}
void glutSetCursor(int cursor)
{
if(cursor == GLUT_CURSOR_FULL_CROSSHAIR)
cursor = GLUT_CURSOR_CROSSHAIR;
CurrentCursor = cursor;
MouseEnabled = 1;
EraseCursor();
SwapCursor();
}

File diff suppressed because it is too large Load Diff

152
src/glut/fbdev/ext.c Normal file
View File

@@ -0,0 +1,152 @@
/*
* Mesa 3-D graphics library
* Version: 6.5
* Copyright (C) 1995-2006 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* Library for glut using mesa fbdev driver
*
* Written by Sean D'Epagnier (c) 2006
*/
#include <GL/gl.h>
#include <GL/glut.h>
#include "internal.h"
void glutReportErrors(void)
{
GLenum error;
while ((error = glGetError()) != GL_NO_ERROR)
sprintf(exiterror, "GL error: %s", gluErrorString(error));
}
static struct {
const char *name;
const GLUTproc address;
} glut_functions[] = {
{ "glutInit", (const GLUTproc) glutInit },
{ "glutInitDisplayMode", (const GLUTproc) glutInitDisplayMode },
{ "glutInitWindowPosition", (const GLUTproc) glutInitWindowPosition },
{ "glutInitWindowSize", (const GLUTproc) glutInitWindowSize },
{ "glutMainLoop", (const GLUTproc) glutMainLoop },
{ "glutCreateWindow", (const GLUTproc) glutCreateWindow },
{ "glutCreateSubWindow", (const GLUTproc) glutCreateSubWindow },
{ "glutDestroyWindow", (const GLUTproc) glutDestroyWindow },
{ "glutPostRedisplay", (const GLUTproc) glutPostRedisplay },
{ "glutSwapBuffers", (const GLUTproc) glutSwapBuffers },
{ "glutGetWindow", (const GLUTproc) glutGetWindow },
{ "glutSetWindow", (const GLUTproc) glutSetWindow },
{ "glutSetWindowTitle", (const GLUTproc) glutSetWindowTitle },
{ "glutSetIconTitle", (const GLUTproc) glutSetIconTitle },
{ "glutPositionWindow", (const GLUTproc) glutPositionWindow },
{ "glutReshapeWindow", (const GLUTproc) glutReshapeWindow },
{ "glutPopWindow", (const GLUTproc) glutPopWindow },
{ "glutPushWindow", (const GLUTproc) glutPushWindow },
{ "glutIconifyWindow", (const GLUTproc) glutIconifyWindow },
{ "glutShowWindow", (const GLUTproc) glutShowWindow },
{ "glutHideWindow", (const GLUTproc) glutHideWindow },
{ "glutFullScreen", (const GLUTproc) glutFullScreen },
{ "glutSetCursor", (const GLUTproc) glutSetCursor },
{ "glutWarpPointer", (const GLUTproc) glutWarpPointer },
{ "glutEstablishOverlay", (const GLUTproc) glutEstablishOverlay },
{ "glutRemoveOverlay", (const GLUTproc) glutRemoveOverlay },
{ "glutUseLayer", (const GLUTproc) glutUseLayer },
{ "glutPostOverlayRedisplay", (const GLUTproc) glutPostOverlayRedisplay },
{ "glutShowOverlay", (const GLUTproc) glutShowOverlay },
{ "glutHideOverlay", (const GLUTproc) glutHideOverlay },
{ "glutCreateMenu", (const GLUTproc) glutCreateMenu },
{ "glutDestroyMenu", (const GLUTproc) glutDestroyMenu },
{ "glutGetMenu", (const GLUTproc) glutGetMenu },
{ "glutSetMenu", (const GLUTproc) glutSetMenu },
{ "glutAddMenuEntry", (const GLUTproc) glutAddMenuEntry },
{ "glutAddSubMenu", (const GLUTproc) glutAddSubMenu },
{ "glutChangeToMenuEntry", (const GLUTproc) glutChangeToMenuEntry },
{ "glutChangeToSubMenu", (const GLUTproc) glutChangeToSubMenu },
{ "glutRemoveMenuItem", (const GLUTproc) glutRemoveMenuItem },
{ "glutAttachMenu", (const GLUTproc) glutAttachMenu },
{ "glutDetachMenu", (const GLUTproc) glutDetachMenu },
{ "glutDisplayFunc", (const GLUTproc) glutDisplayFunc },
{ "glutReshapeFunc", (const GLUTproc) glutReshapeFunc },
{ "glutKeyboardFunc", (const GLUTproc) glutKeyboardFunc },
{ "glutMouseFunc", (const GLUTproc) glutMouseFunc },
{ "glutMotionFunc", (const GLUTproc) glutMotionFunc },
{ "glutPassiveMotionFunc", (const GLUTproc) glutPassiveMotionFunc },
{ "glutEntryFunc", (const GLUTproc) glutEntryFunc },
{ "glutVisibilityFunc", (const GLUTproc) glutVisibilityFunc },
{ "glutIdleFunc", (const GLUTproc) glutIdleFunc },
{ "glutTimerFunc", (const GLUTproc) glutTimerFunc },
{ "glutMenuStateFunc", (const GLUTproc) glutMenuStateFunc },
{ "glutSpecialFunc", (const GLUTproc) glutSpecialFunc },
{ "glutSpaceballRotateFunc", (const GLUTproc) glutSpaceballRotateFunc },
{ "glutButtonBoxFunc", (const GLUTproc) glutButtonBoxFunc },
{ "glutDialsFunc", (const GLUTproc) glutDialsFunc },
{ "glutTabletMotionFunc", (const GLUTproc) glutTabletMotionFunc },
{ "glutTabletButtonFunc", (const GLUTproc) glutTabletButtonFunc },
{ "glutMenuStatusFunc", (const GLUTproc) glutMenuStatusFunc },
{ "glutOverlayDisplayFunc", (const GLUTproc) glutOverlayDisplayFunc },
{ "glutSetColor", (const GLUTproc) glutSetColor },
{ "glutGetColor", (const GLUTproc) glutGetColor },
{ "glutCopyColormap", (const GLUTproc) glutCopyColormap },
{ "glutGet", (const GLUTproc) glutGet },
{ "glutDeviceGet", (const GLUTproc) glutDeviceGet },
{ "glutExtensionSupported", (const GLUTproc) glutExtensionSupported },
{ "glutGetModifiers", (const GLUTproc) glutGetModifiers },
{ "glutLayerGet", (const GLUTproc) glutLayerGet },
{ "glutGetProcAddress", (const GLUTproc) glutGetProcAddress },
{ "glutBitmapCharacter", (const GLUTproc) glutBitmapCharacter },
{ "glutBitmapWidth", (const GLUTproc) glutBitmapWidth },
{ "glutStrokeCharacter", (const GLUTproc) glutStrokeCharacter },
{ "glutStrokeWidth", (const GLUTproc) glutStrokeWidth },
{ "glutBitmapLength", (const GLUTproc) glutBitmapLength },
{ "glutStrokeLength", (const GLUTproc) glutStrokeLength },
{ "glutWireSphere", (const GLUTproc) glutWireSphere },
{ "glutSolidSphere", (const GLUTproc) glutSolidSphere },
{ "glutWireCone", (const GLUTproc) glutWireCone },
{ "glutSolidCone", (const GLUTproc) glutSolidCone },
{ "glutWireCube", (const GLUTproc) glutWireCube },
{ "glutSolidCube", (const GLUTproc) glutSolidCube },
{ "glutWireTorus", (const GLUTproc) glutWireTorus },
{ "glutSolidTorus", (const GLUTproc) glutSolidTorus },
{ "glutWireDodecahedron", (const GLUTproc) glutWireDodecahedron },
{ "glutSolidDodecahedron", (const GLUTproc) glutSolidDodecahedron },
{ "glutWireTeapot", (const GLUTproc) glutWireTeapot },
{ "glutSolidTeapot", (const GLUTproc) glutSolidTeapot },
{ "glutWireOctahedron", (const GLUTproc) glutWireOctahedron },
{ "glutSolidOctahedron", (const GLUTproc) glutSolidOctahedron },
{ "glutWireTetrahedron", (const GLUTproc) glutWireTetrahedron },
{ "glutSolidTetrahedron", (const GLUTproc) glutSolidTetrahedron },
{ "glutWireIcosahedron", (const GLUTproc) glutWireIcosahedron },
{ "glutSolidIcosahedron", (const GLUTproc) glutSolidIcosahedron },
{ "glutReportErrors", (const GLUTproc) glutReportErrors },
{ NULL, NULL }
};
GLUTproc glutGetProcAddress(const char *procName)
{
/* Try GLUT functions first */
int i;
for (i = 0; glut_functions[i].name; i++) {
if (strcmp(glut_functions[i].name, procName) == 0)
return glut_functions[i].address;
}
/* Try core GL functions */
return (GLUTproc) glFBDevGetProcAddress(procName);
}

863
src/glut/fbdev/fbdev.c Normal file
View File

@@ -0,0 +1,863 @@
/*
* Mesa 3-D graphics library
* Version: 6.5
* Copyright (C) 1995-2006 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* Library for glut using mesa fbdev driver
*
* Written by Sean D'Epagnier (c) 2006
*
* To improve on this library, maybe support subwindows or overlays,
* I (sean at depagnier dot com) will do my best to help.
*/
#include <errno.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <inttypes.h>
#include <sys/mman.h>
#include <sys/time.h>
#include <sys/kd.h>
#include <linux/fb.h>
#include <linux/vt.h>
#include <GL/gl.h>
#include <GL/glut.h>
#include "internal.h"
#define FBMODES "/etc/fb.modes"
struct fb_fix_screeninfo FixedInfo;
struct fb_var_screeninfo VarInfo;
static struct fb_var_screeninfo OrigVarInfo;
static int DesiredDepth = 0;
int FrameBufferFD = -1;
unsigned char *FrameBuffer;
unsigned char *BackBuffer = NULL;
int DisplayMode;
struct GlutTimer *GlutTimers = NULL;
struct timeval StartTime;
/* per window data */
GLFBDevContextPtr Context;
GLFBDevBufferPtr Buffer;
GLFBDevVisualPtr Visual;
int Redisplay;
int Visible;
int VisibleSwitch;
int Active;
/* we have to poll to see if we are visible
on a framebuffer that is not active */
int VisiblePoll;
int Swapping, VTSwitch;
static int FramebufferIndex;
static int Initialized;
char exiterror[256];
/* test if the active console is attached to the same framebuffer */
void TestVisible(void) {
struct fb_con2fbmap confb;
struct vt_stat st;
int ret;
ioctl(ConsoleFD, VT_GETSTATE, &st);
confb.console = st.v_active;
ret = ioctl(FrameBufferFD, FBIOGET_CON2FBMAP, &confb);
if(ret == -1 || confb.framebuffer == FramebufferIndex) {
VisibleSwitch = 1;
Visible = 0;
VisiblePoll = 0;
}
}
static void Cleanup(void)
{
if(GameMode)
glutLeaveGameMode();
if(ConsoleFD != -1)
RestoreVT();
/* close mouse */
CloseMouse();
if(Visual)
glutDestroyWindow(1);
/* restore original variable screen info */
if(FrameBufferFD != -1) {
OrigVarInfo.xoffset = 0;
OrigVarInfo.yoffset = 0;
if (ioctl(FrameBufferFD, FBIOPUT_VSCREENINFO, &OrigVarInfo))
fprintf(stderr, "ioctl(FBIOPUT_VSCREENINFO failed): %s\n",
strerror(errno));
munmap(FrameBuffer, FixedInfo.smem_len);
close(FrameBufferFD);
}
/* free allocated back buffer */
if(DisplayMode & GLUT_DOUBLE)
free(BackBuffer);
/* free menu items */
FreeMenus();
if(exiterror[0])
fprintf(stderr, "[glfbdev glut] %s", exiterror);
}
static void CrashHandler(int sig)
{
sprintf(exiterror, "Caught signal %d, cleaning up\n", sig);
exit(0);
}
static void removeArgs(int *argcp, char **argv, int num)
{
int i;
for (i = 0; argv[i+num]; i++)
argv[i] = argv[i+num];
argv[i] = NULL;
*argcp -= num;
}
#define REQPARAM(PARAM) \
if (i >= *argcp - 1) { \
fprintf(stderr, PARAM" requires a parameter\n"); \
exit(0); \
}
void glutInit (int *argcp, char **argv)
{
int i, nomouse = 0, nokeyboard = 0, usestdin = 0;
int RequiredWidth = 0, RequiredHeight;
char *fbdev;
/* parse out args */
for (i = 1; i < *argcp;) {
if (!strcmp(argv[i], "-geometry")) {
REQPARAM("geometry");
if(sscanf(argv[i+1], "%dx%d", &RequiredWidth,
&RequiredHeight) != 2) {
fprintf(stderr,"Please specify geometry as widthxheight\n");
exit(0);
}
removeArgs(argcp, &argv[i], 2);
} else
if (!strcmp(argv[i], "-bpp")) {
REQPARAM("bpp");
if(sscanf(argv[i+1], "%d", &DesiredDepth) != 1) {
fprintf(stderr, "Please specify a parameter for bpp\n");
exit(0);
}
removeArgs(argcp, &argv[i], 2);
} else
if (!strcmp(argv[i], "-vt")) {
REQPARAM("vt");
if(sscanf(argv[i+1], "%d", &CurrentVT) != 1) {
fprintf(stderr, "Please specify a parameter for vt\n");
exit(0);
}
removeArgs(argcp, &argv[i], 2);
} else
if (!strcmp(argv[i], "-mousespeed")) {
REQPARAM("mousespeed");
if(sscanf(argv[i+1], "%lf", &MouseSpeed) != 1) {
fprintf(stderr, "Please specify a mouse speed, eg: 2.5\n");
exit(0);
}
removeArgs(argcp, &argv[i], 2);
} else
if (!strcmp(argv[i], "-nomouse")) {
nomouse = 1;
removeArgs(argcp, &argv[i], 1);
} else
if (!strcmp(argv[i], "-nokeyboard")) {
nokeyboard = 1;
removeArgs(argcp, &argv[i], 1);
} else
if (!strcmp(argv[i], "-stdin")) {
usestdin = 1;
removeArgs(argcp, &argv[i], 1);
} else
if (!strcmp(argv[i], "-gpmmouse")) {
#ifdef HAVE_GPM
GpmMouse = 1;
#else
fprintf(stderr, "gpm support not compiled\n");
exit(0);
#endif
removeArgs(argcp, &argv[i], 1);
} else
if (!strcmp(argv[i], "--")) {
removeArgs(argcp, &argv[i], 1);
break;
} else
i++;
}
gettimeofday(&StartTime, 0);
atexit(Cleanup);
signal(SIGSEGV, CrashHandler);
signal(SIGINT, CrashHandler);
signal(SIGTERM, CrashHandler);
if(nomouse == 0)
InitializeMouse();
if(nokeyboard == 0)
InitializeVT(usestdin);
fbdev = getenv("FRAMEBUFFER");
if(fbdev) {
#ifdef MULTIHEAD
if(!sscanf(fbdev, "/dev/fb%d", &FramebufferIndex))
if(!sscanf(fbdev, "/dev/fb/%d", &FramebufferIndex))
sprintf(exiterror, "Could not determine Framebuffer index!\n");
#endif
} else {
static char fb[128];
struct fb_con2fbmap confb;
int fd = open("/dev/fb0", O_RDWR);
FramebufferIndex = 0;
confb.console = CurrentVT;
if(ioctl(fd, FBIOGET_CON2FBMAP, &confb) != -1)
FramebufferIndex = confb.framebuffer;
sprintf(fb, "/dev/fb%d", FramebufferIndex);
fbdev = fb;
close(fd);
}
/* open the framebuffer device */
FrameBufferFD = open(fbdev, O_RDWR);
if (FrameBufferFD < 0) {
sprintf(exiterror, "Error opening %s: %s\n", fbdev, strerror(errno));
exit(0);
}
/* Get the fixed screen info */
if (ioctl(FrameBufferFD, FBIOGET_FSCREENINFO, &FixedInfo)) {
sprintf(exiterror, "error: ioctl(FBIOGET_FSCREENINFO) failed: %s\n",
strerror(errno));
exit(0);
}
/* get the variable screen info */
if (ioctl(FrameBufferFD, FBIOGET_VSCREENINFO, &OrigVarInfo)) {
sprintf(exiterror, "error: ioctl(FBIOGET_VSCREENINFO) failed: %s\n",
strerror(errno));
exit(0);
}
/* operate on a copy */
VarInfo = OrigVarInfo;
/* set the depth, resolution, etc */
if(RequiredWidth)
if(!ParseFBModes(RequiredWidth, RequiredWidth, RequiredHeight,
RequiredHeight, 0, MAX_VSYNC)) {
sprintf(exiterror, "No mode (%dx%d) found in "FBMODES"\n",
RequiredWidth, RequiredHeight);
exit(0);
}
Initialized = 1;
}
void glutInitDisplayMode (unsigned int mode)
{
DisplayMode = mode;
}
static const char *GetStrVal(const char *p, int *set, int min, int max)
{
char *endptr;
int comp = *p, val;
if(p[1] == '=')
p++;
if(*p == '\0')
return p;
val = strtol(p+1, &endptr, 10);
if(endptr == p+1)
return p;
switch(comp) {
case '!':
if(val == min)
val = max;
else
val = min;
break;
case '<':
val = min;
break;
case '>':
val = max;
break;
}
if(val < min || val > max) {
sprintf(exiterror, "display string value out of range\n");
exit(0);
}
*set = val;
return endptr;
}
static void SetAttrib(int val, int attr)
{
if(val)
DisplayMode |= attr;
else
DisplayMode &= ~attr;
}
void glutInitDisplayString(const char *string)
{
const char *p = string;
int val;
while(*p) {
if(*p == ' ')
p++;
else
if(memcmp(p, "acca", 4) == 0) {
p = GetStrVal(p+4, &AccumSize, 1, 32);
SetAttrib(AccumSize, GLUT_ACCUM);
} else
if(memcmp(p, "acc", 3) == 0) {
p = GetStrVal(p+3, &AccumSize, 1, 32);
SetAttrib(AccumSize, GLUT_ACCUM);
} else
if(memcmp(p, "depth", 5) == 0) {
p = GetStrVal(p+5, &DepthSize, 12, 32);
SetAttrib(DepthSize, GLUT_DEPTH);
} else
if(memcmp(p, "double", 6) == 0) {
val = 1;
p = GetStrVal(p+6, &val, 0, 1);
SetAttrib(val, GLUT_DOUBLE);
} else
if(memcmp(p, "index", 5) == 0) {
val = 1;
p = GetStrVal(p+5, &val, 0, 1);
SetAttrib(val, GLUT_INDEX);
} else
if(memcmp(p, "stencil", 7) == 0) {
p = GetStrVal(p+7, &StencilSize, 0, 1);
SetAttrib(StencilSize, GLUT_STENCIL);
} else
if(memcmp(p, "samples", 7) == 0) {
NumSamples = 1;
p = GetStrVal(p+7, &NumSamples, 0, 16);
SetAttrib(NumSamples, GLUT_MULTISAMPLE);
} else
if(p = strchr(p, ' '))
p++;
else
break;
}
}
void glutInitWindowPosition (int x, int y)
{
}
void glutInitWindowSize (int width, int height)
{
}
static void ProcessTimers(void)
{
if(GlutTimers && GlutTimers->time < glutGet(GLUT_ELAPSED_TIME)) {
struct GlutTimer *timer = GlutTimers;
timer->func(timer->value);
GlutTimers = timer->next;
free(timer);
}
}
void glutMainLoop(void)
{
if(ReshapeFunc)
ReshapeFunc(VarInfo.xres, VarInfo.yres);
if(!DisplayFunc) {
sprintf(exiterror, "Fatal Error: No Display Function registered\n");
exit(0);
}
for(;;) {
ProcessTimers();
if(Active)
ReceiveInput();
else
if(VisiblePoll)
TestVisible();
else
usleep(1);
if(IdleFunc)
IdleFunc();
if(VisibleSwitch) {
VisibleSwitch = 0;
if(VisibilityFunc)
VisibilityFunc(Visible ? GLUT_VISIBLE : GLUT_NOT_VISIBLE);
}
if(Visible && Redisplay) {
Redisplay = 0;
if(MouseEnabled)
EraseCursor();
DisplayFunc();
if(!(DisplayMode & GLUT_DOUBLE)) {
if(ActiveMenu)
DrawMenus();
if(MouseEnabled)
DrawCursor();
}
}
}
}
int ParseFBModes(int minw, int maxw, int minh, int maxh, int minf, int maxf)
{
char buf[1024];
struct fb_var_screeninfo vi = VarInfo;
FILE *fbmodes = fopen(FBMODES, "r");
if(!fbmodes) {
sprintf(exiterror, "Warning: could not open "FBMODES"\n");
return 0;
}
while(fgets(buf, sizeof buf, fbmodes)) {
char *c;
int v, bpp, freq;
if(!(c = strstr(buf, "geometry")))
continue;
v = sscanf(c, "geometry %d %d %d %d %d", &vi.xres, &vi.yres,
&vi.xres_virtual, &vi.yres_virtual, &bpp);
if(v != 5)
continue;
if(maxw < minw) {
if(maxw < vi.xres && minw > vi.xres)
continue;
} else
if(maxw < vi.xres || minw > vi.xres)
continue;
if(maxh < minh) {
if(maxh < vi.yres && minh > vi.yres)
continue;
} else
if(maxh < vi.yres || minh > vi.yres)
continue;
fgets(buf, sizeof buf, fbmodes);
if(!(c = strstr(buf, "timings")))
continue;
v = sscanf(c, "timings %d %d %d %d %d %d %d", &vi.pixclock,
&vi.left_margin, &vi.right_margin, &vi.upper_margin,
&vi.lower_margin, &vi.hsync_len, &vi.vsync_len);
if(v != 7)
continue;
freq = 1E12/vi.pixclock
/(vi.left_margin + vi.xres + vi.right_margin + vi.hsync_len)
/(vi.upper_margin + vi.yres + vi.lower_margin + vi.vsync_len);
if(maxf < minf) {
if(maxf < freq && minf > freq)
continue;
} else
if(maxf < freq || minf > freq)
continue;
VarInfo = vi;
fclose(fbmodes);
return 1;
}
fclose(fbmodes);
return 0;
}
/* ---------- Window Management ----------*/
void SetVideoMode(void)
{
/* set new variable screen info */
if (ioctl(FrameBufferFD, FBIOPUT_VSCREENINFO, &VarInfo)) {
sprintf(exiterror, "ioctl(FBIOPUT_VSCREENINFO failed): %s\n",
strerror(errno));
exit(0);
}
/* reload the screen info to update offsets */
if (ioctl(FrameBufferFD, FBIOGET_VSCREENINFO, &VarInfo)) {
sprintf(exiterror, "error: ioctl(FBIOGET_VSCREENINFO) failed: %s\n",
strerror(errno));
exit(0);
}
/* reload the fixed info to update color mode */
if (ioctl(FrameBufferFD, FBIOGET_FSCREENINFO, &FixedInfo)) {
sprintf(exiterror, "error: ioctl(FBIOGET_FSCREENINFO) failed: %s\n",
strerror(errno));
exit(0);
}
if (DesiredDepth && DesiredDepth != VarInfo.bits_per_pixel) {
sprintf(exiterror, "error: Could not set set %d bpp\n", DesiredDepth);
exit(0);
}
if(DisplayMode & GLUT_INDEX && FixedInfo.visual == FB_VISUAL_DIRECTCOLOR) {
sprintf(exiterror, "error: Could not set 8 bit color mode\n");
exit(0);
}
/* initialize colormap */
LoadColorMap();
}
void CreateBuffer()
{
int size = VarInfo.xres_virtual * VarInfo.yres_virtual
* VarInfo.bits_per_pixel / 8;
/* mmap the framebuffer into our address space */
if(FrameBuffer)
munmap(FrameBuffer, FixedInfo.smem_len);
FrameBuffer = mmap(0, FixedInfo.smem_len, PROT_READ | PROT_WRITE,
MAP_SHARED, FrameBufferFD, 0);
if (FrameBuffer == MAP_FAILED) {
sprintf(exiterror, "error: unable to mmap framebuffer: %s\n",
strerror(errno));
exit(0);
}
if(DisplayMode & GLUT_DOUBLE) {
free(BackBuffer);
if(!(BackBuffer = malloc(size))) {
sprintf(exiterror, "Failed to allocate double buffer\n");
exit(0);
}
} else
BackBuffer = FrameBuffer;
if(Buffer)
glFBDevDestroyBuffer(Buffer);
if(!(Buffer = glFBDevCreateBuffer( &FixedInfo, &VarInfo, Visual,
FrameBuffer, BackBuffer, size))) {
sprintf(exiterror, "Failure to create Buffer\n");
exit(0);
}
}
void CreateVisual(void)
{
int i, mask = DisplayMode;
int attribs[20];
for(i=0; i<sizeof(attribs)/sizeof(*attribs) && mask; i++) {
if(mask & GLUT_DOUBLE) {
attribs[i] = GLFBDEV_DOUBLE_BUFFER;
mask &= ~GLUT_DOUBLE;
continue;
}
if(mask & GLUT_INDEX) {
attribs[i] = GLFBDEV_COLOR_INDEX;
mask &= ~GLUT_INDEX;
continue;
}
if(mask & GLUT_DEPTH) {
attribs[i] = GLFBDEV_DEPTH_SIZE;
attribs[++i] = DepthSize;
mask &= ~GLUT_DEPTH;
continue;
}
if(mask & GLUT_STENCIL) {
attribs[i] = GLFBDEV_STENCIL_SIZE;
attribs[++i] = StencilSize;
mask &= ~GLUT_STENCIL;
continue;
}
if(mask & GLUT_ACCUM) {
attribs[i] = GLFBDEV_ACCUM_SIZE;
attribs[++i] = AccumSize;
mask &= ~GLUT_ACCUM;
continue;
}
if(mask & GLUT_ALPHA)
if(!(DisplayMode & GLUT_INDEX)) {
mask &= ~GLUT_ALPHA;
i--;
continue;
}
if(mask & GLUT_MULTISAMPLE) {
attribs[i] = GLFBDEV_MULTISAMPLE;
attribs[++i] = NumSamples;
mask &= ~GLUT_MULTISAMPLE;
continue;
}
sprintf(exiterror, "Invalid mode from glutInitDisplayMode\n");
exit(0);
}
attribs[i] = GLFBDEV_NONE;
if(!(Visual = glFBDevCreateVisual( &FixedInfo, &VarInfo, attribs ))) {
sprintf(exiterror, "Failure to create Visual\n");
exit(0);
}
}
int glutCreateWindow (const char *title)
{
if(Initialized == 0) {
int argc = 0;
char *argv[] = {NULL};
glutInit(&argc, argv);
}
if(Context)
return 0;
if(DisplayMode & GLUT_INDEX)
VarInfo.bits_per_pixel = 8;
else
if(VarInfo.bits_per_pixel == 8)
VarInfo.bits_per_pixel = 32;
if (DesiredDepth)
VarInfo.bits_per_pixel = DesiredDepth;
VarInfo.xoffset = 0;
VarInfo.yoffset = 0;
VarInfo.nonstd = 0;
VarInfo.vmode &= ~FB_VMODE_YWRAP; /* turn off scrolling */
SetVideoMode();
CreateVisual();
CreateBuffer();
if(!(Context = glFBDevCreateContext(Visual, NULL))) {
sprintf(exiterror, "Failure to create Context\n");
exit(0);
}
if(!glFBDevMakeCurrent( Context, Buffer, Buffer )) {
sprintf(exiterror, "Failure to Make Current\n");
exit(0);
}
InitializeCursor();
InitializeMenus();
glutSetWindowTitle(title);
Visible = 1;
VisibleSwitch = 1;
Redisplay = 1;
return 1;
}
int glutCreateSubWindow(int win, int x, int y, int width, int height)
{
return 0;
}
void glutSetWindow(int win)
{
}
int glutGetWindow(void)
{
return 1;
}
void glutDestroyWindow(int win)
{
glFBDevMakeCurrent( NULL, NULL, NULL);
glFBDevDestroyContext(Context);
glFBDevDestroyBuffer(Buffer);
glFBDevDestroyVisual(Visual);
Visual = NULL;
}
void glutPostRedisplay(void)
{
Redisplay = 1;
}
void glutPostWindowRedisplay(int win)
{
Redisplay = 1;
}
void glutSwapBuffers(void)
{
glFlush();
if(ActiveMenu)
DrawMenus();
if(MouseEnabled)
DrawCursor();
if(DisplayMode & GLUT_DOUBLE && Visible) {
Swapping = 1;
glFBDevSwapBuffers(Buffer);
Swapping = 0;
}
/* if there was a vt switch while swapping, switch now */
if(VTSwitch) {
if(ioctl(ConsoleFD, VT_ACTIVATE, VTSwitch) < 0)
sprintf(exiterror, "Error switching console\n");
VTSwitch = 0;
}
}
void glutPositionWindow(int x, int y)
{
}
void glutReshapeWindow(int width, int height)
{
if(GameMode)
return;
if(!ParseFBModes(width, width, height, height, 0, MAX_VSYNC))
return;
SetVideoMode();
CreateBuffer();
if(!glFBDevMakeCurrent( Context, Buffer, Buffer )) {
sprintf(exiterror, "Failure to Make Current\n");
exit(0);
}
InitializeMenus();
if(ReshapeFunc)
ReshapeFunc(VarInfo.xres, VarInfo.yres);
Redisplay = 1;
}
void glutFullScreen(void)
{
}
void glutPopWindow(void)
{
}
void glutPushWindow(void)
{
}
void glutShowWindow(void)
{
Visible = 1;
}
void glutHideWindow(void)
{
Visible = 0;
}
static void UnIconifyWindow(int sig)
{
if(ConsoleFD == 0)
InitializeVT(1);
else
if(ConsoleFD > 0)
InitializeVT(0);
if (ioctl(FrameBufferFD, FBIOPUT_VSCREENINFO, &VarInfo)) {
sprintf(exiterror, "ioctl(FBIOPUT_VSCREENINFO failed): %s\n",
strerror(errno));
exit(0);
}
Redisplay = 1;
VisibleSwitch = 1;
Visible = 1;
}
void glutIconifyWindow(void)
{
RestoreVT();
signal(SIGCONT, UnIconifyWindow);
if (ioctl(FrameBufferFD, FBIOPUT_VSCREENINFO, &OrigVarInfo))
fprintf(stderr, "ioctl(FBIOPUT_VSCREENINFO failed): %s\n",
strerror(errno));
raise(SIGSTOP);
}
void glutSetWindowTitle(const char *name)
{
/* escape code to set title in screen */
if(getenv("TERM") && memcmp(getenv("TERM"), "screen", 6) == 0)
printf("\033k%s\033\\", name);
}
void glutSetIconTitle(const char *name)
{
}

306
src/glut/fbdev/gamemode.c Normal file
View File

@@ -0,0 +1,306 @@
/*
* Mesa 3-D graphics library
* Version: 6.5
* Copyright (C) 1995-2006 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* Library for glut using mesa fbdev driver
*
* Written by Sean D'Epagnier (c) 2006
*/
#include <stdlib.h>
#include <string.h>
#include <linux/fb.h>
#include <GL/glut.h>
#include "internal.h"
int GameMode;
static int ModePossible, DispChanged;
static struct fb_var_screeninfo NormVarInfo, GameVarInfo;
static GLFBDevContextPtr GameContext;
static GLFBDevVisualPtr NormVisual;
/* storage for non-gamemode callbacks */
void (*KeyFuncs[2])(unsigned char key, int x, int y);
static void (*NormFuncs[8])();
static const char*SetOpers(const char *p, unsigned int *min, unsigned int *max)
{
char *endptr;
int comp = *p, val, neq = 0;
if(p[1] == '=') {
neq = 0;
p++;
}
val = strtol(p+1, &endptr, 10);
if(endptr == p+1)
return p;
switch(comp) {
case '=':
*min = *max = val;
break;
case '!':
*min = val + 1;
*max = val - 1;
break;
case '<':
*max = val - neq;
break;
case '>':
*min = val + neq;
break;
}
return endptr;
}
void glutGameModeString(const char *string)
{
const char *p = string;
unsigned int minb = 15, maxb = 32;
unsigned int minw = 0, maxw = -1;
unsigned int minh, maxh = -1;
unsigned int minf = 0, maxf = MAX_VSYNC;
char *endptr;
int count = -1, val;
ModePossible = 0;
if(DisplayMode & GLUT_INDEX)
minb = maxb = 8;
again:
count++;
if((val = strtol(p, &endptr, 10)) && *endptr=='x') {
maxw = minw = val;
p = endptr + 1;
maxh = minh = strtol(p, &endptr, 10);
p = endptr;
goto again;
}
if(*p == ':') {
minb = strtol(p+1, &endptr, 10);
p = endptr;
if(DisplayMode & GLUT_INDEX) {
if(minb != 8)
return;
} else
if(minb != 15 && minb != 16 && minb != 24 && minb != 32)
return;
maxb = minb;
goto again;
}
if(*p == '@') {
minf = strtol(p+1, &endptr, 10) - 5;
maxf = minf + 10;
p = endptr;
goto again;
}
if(count == 0)
while(*p) {
if(*p == ' ')
p++;
else
if(memcmp(p, "bpp", 3) == 0)
p = SetOpers(p+3, &minb, &maxb);
else
if(memcmp(p, "height", 6) == 0)
p = SetOpers(p+6, &minh, &maxh);
else
if(memcmp(p, "hertz", 5) == 0)
p = SetOpers(p+5, &minf, &maxf);
else
if(memcmp(p, "width", 5) == 0)
p = SetOpers(p+5, &minw, &maxw);
else
if(p = strchr(p, ' '))
p++;
else
break;
}
NormVarInfo = VarInfo;
if(!ParseFBModes(minw, maxw, minh, maxh, minf, maxf))
return;
GameVarInfo = VarInfo;
VarInfo = NormVarInfo;
/* determine optimal bitdepth, make sure we have enough video memory */
if(VarInfo.bits_per_pixel && VarInfo.bits_per_pixel <= maxb)
GameVarInfo.bits_per_pixel = VarInfo.bits_per_pixel;
else
GameVarInfo.bits_per_pixel = maxb;
while(FixedInfo.smem_len < GameVarInfo.xres * GameVarInfo.yres
* GameVarInfo.bits_per_pixel / 8) {
if(GameVarInfo.bits_per_pixel < minb)
return;
GameVarInfo.bits_per_pixel = ((GameVarInfo.bits_per_pixel+1)/8)*8-8;
}
ModePossible = 1;
}
int glutEnterGameMode(void)
{
if(ActiveMenu)
return 0;
if(!ModePossible)
return 0;
if(GameMode) {
if(!memcmp(&GameVarInfo, &VarInfo, sizeof VarInfo)) {
DispChanged = 0;
return 1;
}
glutLeaveGameMode();
}
if (ioctl(FrameBufferFD, FBIOPUT_VSCREENINFO, &GameVarInfo))
return 0;
NormVarInfo = VarInfo;
VarInfo = GameVarInfo;
NormVisual = Visual;
SetVideoMode();
CreateVisual();
CreateBuffer();
if(!(GameContext = glFBDevCreateContext(Visual, NULL))) {
sprintf(exiterror, "Failure to create Context\n");
exit(0);
}
if(!glFBDevMakeCurrent( GameContext, Buffer, Buffer )) {
sprintf(exiterror, "Failure to Make Game Current\n");
exit(0);
}
InitializeCursor();
KeyFuncs[0] = KeyboardFunc;
KeyFuncs[1] = KeyboardUpFunc;
NormFuncs[0] = DisplayFunc;
NormFuncs[1] = ReshapeFunc;
NormFuncs[2] = MouseFunc;
NormFuncs[3] = MotionFunc;
NormFuncs[4] = PassiveMotionFunc;
NormFuncs[5] = VisibilityFunc;
NormFuncs[6] = SpecialFunc;
NormFuncs[7] = SpecialUpFunc;
DisplayFunc = NULL;
ReshapeFunc = NULL;
KeyboardFunc = NULL;
KeyboardUpFunc = NULL;
MouseFunc = NULL;
MotionFunc = NULL;
PassiveMotionFunc = NULL;
VisibilityFunc = NULL;
SpecialFunc = SpecialUpFunc = NULL;
DispChanged = 1;
GameMode = 1;
Visible = 1;
VisibleSwitch = 1;
Redisplay = 1;
return 1;
}
void glutLeaveGameMode(void)
{
if(!GameMode)
return;
glFBDevDestroyContext(GameContext);
glFBDevDestroyVisual(Visual);
VarInfo = NormVarInfo;
Visual = NormVisual;
if(Visual) {
SetVideoMode();
CreateBuffer();
if(!glFBDevMakeCurrent( Context, Buffer, Buffer )) {
sprintf(exiterror, "Failure to Make Current\n");
exit(0);
}
Redisplay = 1;
}
KeyboardFunc = KeyFuncs[0];
KeyboardUpFunc = KeyFuncs[1];
DisplayFunc = NormFuncs[0];
ReshapeFunc = NormFuncs[1];
MouseFunc = NormFuncs[2];
MotionFunc = NormFuncs[3];
PassiveMotionFunc = NormFuncs[4];
VisibilityFunc = NormFuncs[5];
SpecialFunc = NormFuncs[6];
SpecialUpFunc = NormFuncs[7];
GameMode = 0;
}
int glutGameModeGet(GLenum mode) {
switch(mode) {
case GLUT_GAME_MODE_ACTIVE:
return GameMode;
case GLUT_GAME_MODE_POSSIBLE:
return ModePossible;
case GLUT_GAME_MODE_DISPLAY_CHANGED:
return DispChanged;
}
if(!ModePossible)
return -1;
switch(mode) {
case GLUT_GAME_MODE_WIDTH:
return GameVarInfo.xres;
case GLUT_GAME_MODE_HEIGHT:
return GameVarInfo.yres;
case GLUT_GAME_MODE_PIXEL_DEPTH:
return GameVarInfo.bits_per_pixel;
case GLUT_GAME_MODE_REFRESH_RATE:
return 1E12/GameVarInfo.pixclock
/ (GameVarInfo.left_margin + GameVarInfo.xres
+ GameVarInfo.right_margin + GameVarInfo.hsync_len)
/ (GameVarInfo.upper_margin + GameVarInfo.yres
+ GameVarInfo.lower_margin + GameVarInfo.vsync_len);
}
}

759
src/glut/fbdev/input.c Normal file
View File

@@ -0,0 +1,759 @@
/*
* Mesa 3-D graphics library
* Version: 6.5
* Copyright (C) 1995-2006 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* Library for glut using mesa fbdev driver
*
* Written by Sean D'Epagnier (c) 2006
*/
#include <errno.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <termios.h>
#include <inttypes.h>
#include <sys/ioctl.h>
#include <sys/poll.h>
#include <sys/kd.h>
#include <linux/keyboard.h>
#include <linux/fb.h>
#include <linux/vt.h>
#include <GL/glut.h>
#include "internal.h"
#define MOUSEDEV "/dev/gpmdata"
#ifdef HAVE_GPM
#include <gpm.h>
int GpmMouse;
#endif
int CurrentVT;
int ConsoleFD = -1;
int KeyboardModifiers;
int MouseX, MouseY;
int NumMouseButtons;
double MouseSpeed = 0;
int KeyRepeatMode = GLUT_KEY_REPEAT_DEFAULT;
/* only display the mouse if there is a registered callback for it */
int MouseEnabled = 0;
static int OldKDMode = -1;
static int OldMode = KD_TEXT;
static struct vt_mode OldVTMode;
static struct termios OldTermios;
static int KeyboardLedState;
static int MouseFD;
static int kbdpipe[2];
#define MODIFIER(mod) \
KeyboardModifiers = release ? KeyboardModifiers & ~mod \
: KeyboardModifiers | mod;
/* signal handler attached to SIGIO on keyboard input, vt
switching and modifiers is handled in the signal handler
other keypresses read from a pipe that leaves the handler
if a program locks up the glut loop, you can still switch
vts and kill it without Alt-SysRq hack */
static void KeyboardHandler(int sig)
{
int release, labelval;
unsigned char code;
struct kbentry entry;
static int lalt; /* only left alt does vt switch */
if(read(ConsoleFD, &code, 1) != 1)
return;
release = code & 0x80;
entry.kb_index = code & 0x7F;
entry.kb_table = 0;
if (ioctl(ConsoleFD, KDGKBENT, &entry) < 0) {
sprintf(exiterror, "ioctl(KDGKBENT) failed.\n");
exit(0);
}
labelval = entry.kb_value;
switch(labelval) {
case K_SHIFT:
case K_SHIFTL:
MODIFIER(GLUT_ACTIVE_SHIFT);
return;
case K_CTRL:
MODIFIER(GLUT_ACTIVE_CTRL);
return;
case K_ALT:
lalt = !release;
case K_ALTGR:
MODIFIER(GLUT_ACTIVE_ALT);
return;
}
if(lalt && !release) {
/* VT switch, we must do it */
int vt = -1;
struct vt_stat st;
if(labelval >= K_F1 && labelval <= K_F12)
vt = labelval - K_F1 + 1;
if(labelval == K_LEFT)
if(ioctl(ConsoleFD, VT_GETSTATE, &st) >= 0)
vt = st.v_active - 1;
if(labelval == K_RIGHT)
if(ioctl(ConsoleFD, VT_GETSTATE, &st) >= 0)
vt = st.v_active + 1;
if(vt != -1) {
if(Swapping)
VTSwitch = vt;
else
if(ioctl(ConsoleFD, VT_ACTIVATE, vt) < 0)
sprintf(exiterror, "Error switching console\n");
return;
}
}
write(kbdpipe[1], &code, 1);
}
static void LedModifier(int led, int release)
{
static int releaseflag = K_CAPS | K_NUM | K_HOLD;
if(release)
releaseflag |= led;
else
if(releaseflag & led) {
KeyboardLedState ^= led;
releaseflag &= ~led;
}
ioctl(ConsoleFD, KDSKBLED, KeyboardLedState);
ioctl(ConsoleFD, KDSETLED, 0x80);
}
#define READKEY read(kbdpipe[0], &code, 1)
static int ReadKey(void)
{
int release, labelval, labelvalnoshift;
unsigned char code;
int specialkey = 0;
struct kbentry entry;
if(READKEY != 1)
return 0;
if(code == 0)
return 0;
/* stdin input escape code based */
if(ConsoleFD == 0) {
KeyboardModifiers = 0;
altset:
if(code == 27 && READKEY == 1) {
switch(code) {
case 79: /* function key */
READKEY;
if(code == 50) {
READKEY;
shiftfunc:
KeyboardModifiers |= GLUT_ACTIVE_SHIFT;
specialkey = GLUT_KEY_F1 + code - 53;
READKEY;
} else {
READKEY;
specialkey = GLUT_KEY_F1 + code - 80;
}
break;
case 91:
READKEY;
switch(code) {
case 68:
specialkey = GLUT_KEY_LEFT; break;
case 65:
specialkey = GLUT_KEY_UP; break;
case 67:
specialkey = GLUT_KEY_RIGHT; break;
case 66:
specialkey = GLUT_KEY_DOWN; break;
case 53:
specialkey = GLUT_KEY_PAGE_UP; READKEY; break;
case 54:
specialkey = GLUT_KEY_PAGE_DOWN; READKEY; break;
case 49:
specialkey = GLUT_KEY_HOME; READKEY; break;
case 52:
specialkey = GLUT_KEY_END; READKEY; break;
case 50:
READKEY;
if(code != 126)
goto shiftfunc;
specialkey = GLUT_KEY_INSERT;
break;
case 51:
code = '\b';
goto stdkey;
case 91:
READKEY;
specialkey = GLUT_KEY_F1 + code - 65;
break;
default:
return 0;
}
break;
default:
KeyboardModifiers |= GLUT_ACTIVE_ALT;
goto altset;
}
}
stdkey:
if(specialkey) {
if(SpecialFunc)
SpecialFunc(specialkey, MouseX, MouseY);
} else {
if(code >= 1 && code <= 26 && code != '\r') {
KeyboardModifiers |= GLUT_ACTIVE_CTRL;
code += 'a' - 1;
}
if((code >= 43 && code <= 34) || (code == 60)
|| (code >= 62 && code <= 90) || (code == 94)
|| (code == 95) || (code >= 123 && code <= 126))
KeyboardModifiers |= GLUT_ACTIVE_SHIFT;
if(KeyboardFunc)
KeyboardFunc(code, MouseX, MouseY);
}
return 1;
}
/* linux kbd reading */
release = code & 0x80;
code &= 0x7F;
if(KeyRepeatMode == GLUT_KEY_REPEAT_OFF) {
static char keystates[128];
if(release)
keystates[code] = 0;
else {
if(keystates[code])
return 1;
keystates[code] = 1;
}
}
entry.kb_index = code;
entry.kb_table = 0;
if (ioctl(ConsoleFD, KDGKBENT, &entry) < 0) {
sprintf(exiterror, "ioctl(KDGKBENT) failed.\n");
exit(0);
}
labelvalnoshift = entry.kb_value;
if(KeyboardModifiers & GLUT_ACTIVE_SHIFT)
entry.kb_table |= K_SHIFTTAB;
if (ioctl(ConsoleFD, KDGKBENT, &entry) < 0) {
sprintf(exiterror, "ioctl(KDGKBENT) failed.\n");
exit(0);
}
labelval = entry.kb_value;
switch(labelvalnoshift) {
case K_CAPS:
LedModifier(LED_CAP, release);
return 0;
case K_NUM:
LedModifier(LED_NUM, release);
return 0;
case K_HOLD: /* scroll lock suspends glut */
LedModifier(LED_SCR, release);
while(KeyboardLedState & LED_SCR) {
usleep(10000);
ReadKey();
}
return 0;
}
/* we could queue keypresses here */
if(KeyboardLedState & LED_SCR)
return 0;
if(labelvalnoshift >= K_F1 && labelvalnoshift <= K_F12)
specialkey = GLUT_KEY_F1 + labelvalnoshift - K_F1;
else
switch(labelvalnoshift) {
case K_LEFT:
specialkey = GLUT_KEY_LEFT; break;
case K_UP:
specialkey = GLUT_KEY_UP; break;
case K_RIGHT:
specialkey = GLUT_KEY_RIGHT; break;
case K_DOWN:
specialkey = GLUT_KEY_DOWN; break;
case K_PGUP:
specialkey = GLUT_KEY_PAGE_UP; break;
case K_PGDN:
specialkey = GLUT_KEY_PAGE_DOWN; break;
case K_FIND:
specialkey = GLUT_KEY_HOME; break;
case K_SELECT:
specialkey = GLUT_KEY_END; break;
case K_INSERT:
specialkey = GLUT_KEY_INSERT; break;
case K_REMOVE:
labelval = '\b';
break;
case K_ENTER:
case K_ENTER - 1: /* keypad enter */
labelval = '\n'; break;
}
/* dispatch callback */
if(specialkey) {
if(release) {
if(SpecialUpFunc)
SpecialUpFunc(specialkey, MouseX, MouseY);
} else
if(SpecialFunc)
SpecialFunc(specialkey, MouseX, MouseY);
} else {
char c = labelval;
if(KeyboardLedState & LED_CAP) {
if(c >= 'A' && c <= 'Z')
c += 'a' - 'A';
else
if(c >= 'a' && c <= 'z')
c += 'A' - 'a';
}
if(release) {
if(KeyboardUpFunc)
KeyboardUpFunc(c, MouseX, MouseY);
} else
if(KeyboardFunc)
KeyboardFunc(c, MouseX, MouseY);
}
return 1;
}
void glutIgnoreKeyRepeat(int ignore)
{
KeyRepeatMode = ignore ? GLUT_KEY_REPEAT_OFF : GLUT_KEY_REPEAT_ON;
}
void glutSetKeyRepeat(int repeatMode)
{
KeyRepeatMode = repeatMode;
}
void glutForceJoystickFunc(void)
{
}
static void HandleMousePress(int button, int pressed)
{
if(TryMenu(button, pressed))
return;
if(MouseFunc)
MouseFunc(button, pressed ? GLUT_DOWN : GLUT_UP, MouseX, MouseY);
}
static int ReadMouse(void)
{
int l, r, m;
static int ll, lm, lr;
signed char dx, dy;
#ifdef HAVE_GPM
if(GpmMouse) {
Gpm_Event event;
struct pollfd pfd;
pfd.fd = gpm_fd;
pfd.events = POLLIN;
if(poll(&pfd, 1, 1) != 1)
return 0;
if(Gpm_GetEvent(&event) != 1)
return 0;
l = event.buttons & GPM_B_LEFT;
m = event.buttons & GPM_B_MIDDLE;
r = event.buttons & GPM_B_RIGHT;
/* gpm is weird in that it gives a button number when the button
is released, with type set to GPM_UP, this is only a problem
if it is the last button released */
if(event.type & GPM_UP)
if(event.buttons == GPM_B_LEFT || event.buttons == GPM_B_MIDDLE ||
event.buttons == GPM_B_RIGHT || event.buttons == GPM_B_FOURTH)
l = m = r = 0;
dx = event.dx;
dy = event.dy;
} else
#endif
{
char data[4];
if(MouseFD == -1)
return 0;
if(fcntl(MouseFD, F_SETFL, O_NONBLOCK) == -1) {
close(MouseFD);
MouseFD = -1;
return 0;
}
if(read(MouseFD, data, 4) != 4)
return 0;
l = ((data[0] & 0x20) >> 3);
m = ((data[3] & 0x10) >> 3);
r = ((data[0] & 0x10) >> 4);
dx = (((data[0] & 0x03) << 6) | (data[1] & 0x3F));
dy = (((data[0] & 0x0C) << 4) | (data[2] & 0x3F));
}
MouseX += dx * MouseSpeed;
if(MouseX < 0)
MouseX = 0;
else
if(MouseX >= VarInfo.xres)
MouseX = VarInfo.xres - 1;
MouseY += dy * MouseSpeed;
if(MouseY < 0)
MouseY = 0;
else
if(MouseY >= VarInfo.yres)
MouseY = VarInfo.yres - 1;
if(l != ll)
HandleMousePress(GLUT_LEFT_BUTTON, l);
if(m != lm)
HandleMousePress(GLUT_MIDDLE_BUTTON, m);
if(r != lr)
HandleMousePress(GLUT_RIGHT_BUTTON, r);
ll = l, lm = m, lr = r;
if(dx || dy) {
if(l || m || r) {
if(MotionFunc)
MotionFunc(MouseX, MouseY);
} else
if(PassiveMotionFunc)
PassiveMotionFunc(MouseX, MouseY);
EraseCursor();
if(ActiveMenu)
Redisplay = 1;
else
SwapCursor();
}
return 1;
}
void ReceiveInput(void)
{
if(ConsoleFD != -1)
while(ReadKey());
if(MouseEnabled)
while(ReadMouse());
}
static void VTSwitchHandler(int sig)
{
struct vt_stat st;
switch(sig) {
case SIGUSR1:
ioctl(ConsoleFD, VT_RELDISP, 1);
Active = 0;
#ifdef MULTIHEAD
VisiblePoll = 1;
TestVisible();
#else
VisibleSwitch = 1;
Visible = 0;
#endif
break;
case SIGUSR2:
ioctl(ConsoleFD, VT_GETSTATE, &st);
if(st.v_active)
ioctl(ConsoleFD, VT_RELDISP, VT_ACKACQ);
/* this is a hack to turn the cursor off */
ioctl(FrameBufferFD, FBIOPUT_VSCREENINFO, &VarInfo);
RestoreColorMap();
Active = 1;
Visible = 1;
VisibleSwitch = 1;
Redisplay = 1;
break;
}
}
void InitializeVT(int usestdin)
{
struct termios tio;
struct vt_mode vt;
char console[128];
signal(SIGIO, SIG_IGN);
/* save old terminos settings */
if (tcgetattr(0, &OldTermios) < 0) {
sprintf(exiterror, "tcgetattr failed\n");
exit(0);
}
tio = OldTermios;
/* terminos settings for straight-through mode */
tio.c_lflag &= ~(ICANON | ECHO | ISIG);
tio.c_iflag &= ~(ISTRIP | IGNCR | ICRNL | INLCR | IXOFF | IXON);
tio.c_iflag |= IGNBRK;
tio.c_cc[VMIN] = 0;
tio.c_cc[VTIME] = 0;
if (tcsetattr(0, TCSANOW, &tio) < 0) {
sprintf(exiterror, "tcsetattr failed\n");
exit(0);
}
if(fcntl(0, F_SETFL, O_NONBLOCK | O_ASYNC) < 0) {
sprintf(exiterror, "Failed to set keyboard to non-blocking\n");
exit(0);
}
Active = 1;
if(usestdin) {
ConsoleFD = 0;
return;
}
/* detect the current vt if it was not specified */
if(CurrentVT == 0) {
int fd = open("/dev/tty", O_RDWR | O_NDELAY, 0);
struct vt_stat st;
if(fd == -1) {
sprintf(exiterror, "Failed to open /dev/tty\n");
exit(0);
}
if(ioctl(fd, VT_GETSTATE, &st) == -1) {
fprintf(stderr, "Could not detect current vt, specify with -vt\n");
fprintf(stderr, "Defaulting to stdin input\n");
ConsoleFD = 0;
close(fd);
return;
} else
CurrentVT = st.v_active;
close(fd);
}
/* open the console tty */
sprintf(console, "/dev/tty%d", CurrentVT);
ConsoleFD = open(console, O_RDWR | O_NDELAY, 0);
if (ConsoleFD < 0) {
sprintf(exiterror, "error couldn't open %s,"
" defaulting to stdin \n", console);
ConsoleFD = 0;
return;
}
signal(SIGUSR1, VTSwitchHandler);
signal(SIGUSR2, VTSwitchHandler);
if (ioctl(ConsoleFD, VT_GETMODE, &OldVTMode) < 0) {
sprintf(exiterror,"Failed to grab %s, defaulting to stdin\n", console);
close(ConsoleFD);
ConsoleFD = 0;
return;
}
vt = OldVTMode;
vt.mode = VT_PROCESS;
vt.waitv = 0;
vt.relsig = SIGUSR1;
vt.acqsig = SIGUSR2;
if (ioctl(ConsoleFD, VT_SETMODE, &vt) < 0) {
sprintf(exiterror, "error: ioctl(VT_SETMODE) failed: %s\n",
strerror(errno));
close(ConsoleFD);
ConsoleFD = 0;
exit(1);
}
if (ioctl(ConsoleFD, KDGKBMODE, &OldKDMode) < 0) {
sprintf(exiterror, "Warning: ioctl KDGKBMODE failed!\n");
OldKDMode = K_XLATE;
}
/* use SIGIO so VT switching can work if the program is locked */
signal(SIGIO, KeyboardHandler);
pipe(kbdpipe);
if(fcntl(kbdpipe[0], F_SETFL, O_NONBLOCK | O_ASYNC) < 0) {
sprintf(exiterror, "Failed to set keyboard to non-blocking\n");
exit(0);
}
fcntl(0, F_SETOWN, getpid());
if(ioctl(ConsoleFD, KDGETMODE, &OldMode) < 0)
sprintf(exiterror, "Warning: Failed to get terminal mode\n");
#ifdef HAVE_GPM
if(!GpmMouse)
#endif
if(ioctl(ConsoleFD, KDSETMODE, KD_GRAPHICS) < 0)
sprintf(exiterror,"Warning: Failed to set terminal to graphics\n");
if (ioctl(ConsoleFD, KDSKBMODE, K_MEDIUMRAW) < 0) {
sprintf(exiterror, "ioctl KDSKBMODE failed!\n");
tcsetattr(0, TCSANOW, &OldTermios);
exit(0);
}
if( ioctl(ConsoleFD, KDGKBLED, &KeyboardLedState) < 0) {
sprintf(exiterror, "ioctl KDGKBLED failed!\n");
exit(0);
}
}
void RestoreVT(void)
{
if(ConsoleFD < 0)
return;
if (tcsetattr(0, TCSANOW, &OldTermios) < 0)
fprintf(stderr, "tcsetattr failed\n");
/* setting the mode to text from graphics restores the colormap*/
if(
#ifdef HAVE_GPM
GpmMouse ||
#endif
ConsoleFD == 0)
if(ioctl(ConsoleFD, KDSETMODE, KD_GRAPHICS) < 0) {
sprintf(exiterror,"Warning: Failed to set terminal to graphics\n");
goto skipioctl; /* no need to fail twice */
}
if(ioctl(ConsoleFD, KDSETMODE, OldMode) < 0)
fprintf(stderr, "ioctl KDSETMODE failed!\n");
skipioctl:
if(ConsoleFD == 0)
return;
/* restore keyboard state */
if (ioctl(ConsoleFD, VT_SETMODE, &OldVTMode) < 0)
fprintf(stderr, "Failed to set vtmode\n");
if (ioctl(ConsoleFD, KDSKBMODE, OldKDMode) < 0)
fprintf(stderr, "ioctl KDSKBMODE failed!\n");
close(ConsoleFD);
}
void InitializeMouse(void)
{
#ifdef HAVE_GPM
if(!GpmMouse)
#endif
{
const char *mousedev = getenv("MOUSE");
if(!mousedev)
mousedev = MOUSEDEV;
if((MouseFD = open(mousedev, O_RDONLY)) >= 0) {
if(!MouseSpeed)
MouseSpeed = 1;
NumMouseButtons = 3;
return;
}
}
#ifdef HAVE_GPM
{
Gpm_Connect conn;
int c;
conn.eventMask = ~0; /* Want to know about all the events */
conn.defaultMask = 0; /* don't handle anything by default */
conn.minMod = 0; /* want everything */
conn.maxMod = ~0; /* all modifiers included */
if(Gpm_Open(&conn, 0) != -1) {
if(!MouseSpeed)
MouseSpeed = 8;
NumMouseButtons = 3;
return;
}
fprintf(stderr, "Cannot open gpmctl.\n");
}
#endif
fprintf(stderr,"Cannot open %s.\n"
"Continuing without Mouse\n", MOUSEDEV);
}
void CloseMouse(void)
{
#ifdef HAVE_GPM
if(GpmMouse) {
if(NumMouseButtons)
Gpm_Close();
} else
#endif
if(MouseFD >= 0)
close(MouseFD);
}

175
src/glut/fbdev/internal.h Normal file
View File

@@ -0,0 +1,175 @@
/*
* Mesa 3-D graphics library
* Version: 6.5
* Copyright (C) 1995-2006 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* Library for glut using mesa fbdev driver
*
* Written by Sean D'Epagnier (c) 2006
*/
#include <sys/time.h>
#include <linux/fb.h>
#include <GL/glfbdev.h>
#define MULTIHEAD /* enable multihead hacks,
it allows the program to continue drawing
without reading input when a second fbdev
has keyboard focus it can cause
screen corruption that requires C-l to fix */
#define HAVE_GPM
#define MAX_VSYNC 200
/* this causes these symbols to not be exported */
#pragma GCC visibility push(hidden)
/* --------- fbdev ------------ */
extern int Redisplay;
extern int Visible;
extern int VisibleSwitch;
extern int Active;
extern int VisiblePoll;
extern int Swapping, VTSwitch;
void TestVisible(void);
int ParseFBModes(int, int, int, int, int, int);
void CreateVisual(void);
extern int FrameBufferFD;
extern unsigned char *FrameBuffer;
extern unsigned char *BackBuffer;
extern int DisplayMode;
extern char exiterror[256];
extern struct fb_fix_screeninfo FixedInfo;
extern struct fb_var_screeninfo VarInfo;
extern GLFBDevContextPtr Context;
extern GLFBDevBufferPtr Buffer;
extern GLFBDevVisualPtr Visual;
/* --- colormap --- */
#define REVERSECMAPSIZELOG 3
#define REVERSECMAPSIZE (1<<REVERSECMAPSIZELOG)
extern unsigned short RedColorMap[256],
GreenColorMap[256],
BlueColorMap[256];
extern unsigned char ReverseColorMap[REVERSECMAPSIZE]
[REVERSECMAPSIZE]
[REVERSECMAPSIZE];
void LoadOldColorMap(void);
void LoadColorMap(void);
void UnloadColorMap(void);
void RestoreColorMap(void);
/* --- mouse --- */
extern int MouseX, MouseY;
extern int CurrentCursor;
extern int MouseEnabled;
extern int NumMouseButtons;
void InitializeCursor(void);
void EraseCursor(void);
void DrawCursor(void);
void SwapCursor(void);
/* --- menus --- */
struct GlutMenu {
int NumItems;
int x, y;
int width;
int selected;
struct {
int value;
int submenu;
char *name;
} *Items;
void (*func)(int);
};
extern struct GlutMenu *Menus;
extern int ActiveMenu;
extern int CurrentMenu;
void InitializeMenus(void);
void FreeMenus(void);
void DrawMenus(void);
int TryMenu(int, int);
void OpenMenu(void);
void CloseMenu(void);
/* --- state --- */
extern int AccumSize, DepthSize, StencilSize, NumSamples;
extern struct timeval StartTime;
extern int KeyboardModifiers;
/* --- input --- */
#ifdef HAVE_GPM
extern int GpmMouse;
#endif
extern int CurrentVT;
extern int ConsoleFD;
extern double MouseSpeed;
extern int KeyRepeatMode;
void InitializeVT(int);
void RestoreVT(void);
void CloseMouse(void);
void InitializeMouse(void);
void ReceiveInput(void);
/* --- callback --- */
extern void (*DisplayFunc)(void);
extern void (*ReshapeFunc)(int width, int height);
extern void (*KeyboardFunc)(unsigned char key, int x, int y);
extern void (*KeyboardUpFunc)(unsigned char key, int x, int y);
extern void (*MouseFunc)(int key, int state, int x, int y);
extern void (*MotionFunc)(int x, int y);
extern void (*PassiveMotionFunc)(int x, int y);
extern void (*VisibilityFunc)(int state);
extern void (*SpecialFunc)(int key, int x, int y);
extern void (*SpecialUpFunc)(int key, int x, int y);
extern void (*IdleFunc)(void);
extern void (*MenuStatusFunc)(int state, int x, int y);
extern void (*MenuStateFunc)(int state);
/* --- timers --- */
struct GlutTimer {
int time;
void (*func)(int);
int value;
struct GlutTimer *next;
};
extern struct GlutTimer *GlutTimers;
/* ------- Game Mode -------- */
extern int GameMode;
#pragma GCC visibility pop

307
src/glut/fbdev/menu.c Normal file
View File

@@ -0,0 +1,307 @@
/*
* Mesa 3-D graphics library
* Version: 6.5
* Copyright (C) 1995-2006 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* Library for glut using mesa fbdev driver
*
* Written by Sean D'Epagnier (c) 2006
*/
#include <stdlib.h>
#include <linux/fb.h>
#include <GL/glut.h>
#include "internal.h"
#define MENU_FONT_WIDTH 9
#define MENU_FONT_HEIGHT 15
#define MENU_FONT GLUT_BITMAP_9_BY_15
#define SUBMENU_OFFSET 20
struct GlutMenu *Menus;
int ActiveMenu;
int CurrentMenu;
static double MenuProjection[16];
static int AttachedMenus[3];
static int NumMenus = 1;
static int SelectedMenu;
void InitializeMenus(void)
{
glPushAttrib(GL_TRANSFORM_BIT);
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
gluOrtho2D(0.0, VarInfo.xres, VarInfo.yres, 0.0);
glGetDoublev(GL_PROJECTION_MATRIX, MenuProjection);
glPopMatrix();
glPopAttrib();
}
void FreeMenus(void)
{
int i, j;
for(i = 1; i<NumMenus; i++) {
for(j = 0; j<Menus[i].NumItems; j++)
free(Menus[i].Items[j].name);
free(Menus[i].Items);
}
free(Menus);
}
int TryMenu(int button, int pressed)
{
if(ActiveMenu && !pressed) {
ActiveMenu = 0;
CloseMenu();
Redisplay = 1;
return 1;
}
if(AttachedMenus[button] && pressed) {
ActiveMenu = AttachedMenus[button];
OpenMenu();
Redisplay = 1;
return 1;
}
return 0;
}
static int DrawMenu(int menu, int x, int *y)
{
int i;
int ret = 1;
for(i=0; i < Menus[menu].NumItems; i++) {
char *s = Menus[menu].Items[i].name;
int a = 0;
if(MouseY >= *y && MouseY < *y + MENU_FONT_HEIGHT &&
MouseX >= x && MouseX < x + Menus[menu].width) {
a = 1;
SelectedMenu = menu;
ret = 0;
Menus[menu].selected = i;
glColor3f(1,0,0);
} else
glColor3f(1,1,1);
*y += MENU_FONT_HEIGHT;
glRasterPos2i(x, *y);
for(; *s; s++)
glutBitmapCharacter(MENU_FONT, *s);
if(Menus[menu].selected == i)
if(Menus[menu].Items[i].submenu)
if(DrawMenu(Menus[menu].Items[i].submenu, x
+ SUBMENU_OFFSET, y)) {
if(!a)
Menus[menu].selected = -1;
} else
ret = 0;
}
return ret;
}
void DrawMenus(void)
{
int x, y;
if(GameMode)
return;
x = Menus[ActiveMenu].x;
y = Menus[ActiveMenu].y;
/* save old settings */
glPushAttrib(GL_COLOR_BUFFER_BIT | GL_CURRENT_BIT
| GL_ENABLE_BIT | GL_VIEWPORT_BIT);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadMatrixd(MenuProjection);
glViewport(0, 0, VarInfo.xres, VarInfo.yres);
glDisable(GL_DEPTH_TEST);
glDisable(GL_ALPHA_TEST);
glDisable(GL_LIGHTING);
glDisable(GL_FOG);
glDisable(GL_TEXTURE_2D);
glEnable(GL_COLOR_LOGIC_OP);
glLogicOp(GL_AND_REVERSE);
if(DrawMenu(ActiveMenu, x, &y))
Menus[ActiveMenu].selected = -1;
/* restore settings */
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
glPopAttrib();
}
void OpenMenu(void)
{
if(MenuStatusFunc)
MenuStatusFunc(GLUT_MENU_IN_USE, MouseX, MouseY);
if(MenuStateFunc)
MenuStateFunc(GLUT_MENU_IN_USE);
Menus[ActiveMenu].x = MouseX-Menus[ActiveMenu].width/2;
if(Menus[ActiveMenu].x < 0)
Menus[ActiveMenu].x = 0;
if(Menus[ActiveMenu].x + Menus[ActiveMenu].width >= VarInfo.xres)
Menus[ActiveMenu].x = VarInfo.xres - Menus[ActiveMenu].width - 1;
Menus[ActiveMenu].y = MouseY-Menus[ActiveMenu].NumItems*MENU_FONT_HEIGHT/2;
Menus[ActiveMenu].selected = -1;
}
void CloseMenu(void)
{
if(MenuStatusFunc)
MenuStatusFunc(GLUT_MENU_NOT_IN_USE, MouseX, MouseY);
if(MenuStateFunc)
MenuStateFunc(GLUT_MENU_NOT_IN_USE);
if(SelectedMenu > 0) {
int selected = Menus[SelectedMenu].selected;
if(selected >= 0)
if(Menus[SelectedMenu].Items[selected].submenu == 0)
Menus[SelectedMenu].func(Menus[SelectedMenu].Items
[selected].value);
}
}
/* glut menu functions */
int glutCreateMenu(void (*func)(int value))
{
MouseEnabled = 1;
CurrentMenu = NumMenus;
NumMenus++;
Menus = realloc(Menus, sizeof(*Menus) * NumMenus);
Menus[CurrentMenu].NumItems = 0;
Menus[CurrentMenu].Items = NULL;
Menus[CurrentMenu].func = func;
Menus[CurrentMenu].width = 0;
return CurrentMenu;
}
void glutSetMenu(int menu)
{
CurrentMenu = menu;
}
int glutGetMenu(void)
{
return CurrentMenu;
}
void glutDestroyMenu(int menu)
{
if(menu == CurrentMenu)
CurrentMenu = 0;
}
static void NameMenuEntry(int entry, const char *name)
{
int cm = CurrentMenu;
if(!(Menus[cm].Items[entry-1].name = realloc(Menus[cm].Items[entry-1].name,
strlen(name) + 1))) {
sprintf(exiterror, "realloc failed in NameMenuEntry\n");
exit(0);
}
strcpy(Menus[cm].Items[entry-1].name, name);
if(strlen(name) * MENU_FONT_WIDTH > Menus[cm].width)
Menus[cm].width = strlen(name) * MENU_FONT_WIDTH;
}
static int AddMenuItem(const char *name)
{
int cm = CurrentMenu;
int item = Menus[cm].NumItems++;
if(!(Menus[cm].Items = realloc(Menus[cm].Items,
Menus[cm].NumItems * sizeof(*Menus[0].Items)))) {
sprintf(exiterror, "realloc failed in AddMenuItem\n");
exit(0);
}
Menus[cm].Items[item].name = NULL;
NameMenuEntry(item+1, name);
return item;
}
void glutAddMenuEntry(const char *name, int value)
{
int item = AddMenuItem(name);
Menus[CurrentMenu].Items[item].value = value;
Menus[CurrentMenu].Items[item].submenu = 0;
}
void glutAddSubMenu(const char *name, int menu)
{
int item = AddMenuItem(name);
if(menu == CurrentMenu) {
sprintf(exiterror, "Recursive menus not supported\n");
exit(0);
}
Menus[CurrentMenu].Items[item].submenu = menu;
}
void glutChangeToMenuEntry(int entry, const char *name, int value)
{
NameMenuEntry(entry, name);
Menus[CurrentMenu].Items[entry-1].value = value;
Menus[CurrentMenu].Items[entry-1].submenu = 0;
}
void glutChangeToSubMenu(int entry, const char *name, int menu)
{
NameMenuEntry(entry, name);
Menus[CurrentMenu].Items[entry-1].submenu = menu;
}
void glutRemoveMenuItem(int entry)
{
memmove(Menus[CurrentMenu].Items + entry - 1,
Menus[CurrentMenu].Items + entry,
sizeof(*Menus[0].Items) * (Menus[CurrentMenu].NumItems - entry));
Menus[CurrentMenu].NumItems--;
}
void glutAttachMenu(int button)
{
AttachedMenus[button] = CurrentMenu;
}
void glutDetachMenu(int button)
{
AttachedMenus[button] = 0;
}

56
src/glut/fbdev/overlay.c Normal file
View File

@@ -0,0 +1,56 @@
/*
* Mesa 3-D graphics library
* Version: 6.5
* Copyright (C) 1995-2006 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* Library for glut using mesa fbdev driver
*
* Written by Sean D'Epagnier (c) 2006
*/
#include <GL/gl.h>
void glutEstablishOverlay(void)
{
exit(0);
}
void glutUseLayer(GLenum layer)
{
}
void glutRemoveOverlay(void)
{
}
void glutPostOverlayRedisplay(void)
{
}
void glutPostWindowOverlayRedisplay(int win)
{
}
void glutShowOverlay(void)
{
}
void glutHideOverlay(void)
{
}

196
src/glut/fbdev/state.c Normal file
View File

@@ -0,0 +1,196 @@
/*
* Mesa 3-D graphics library
* Version: 6.5
* Copyright (C) 1995-2006 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* Library for glut using mesa fbdev driver
*
* Written by Sean D'Epagnier (c) 2006
*/
#include <sys/time.h>
#include <linux/fb.h>
#include <GL/glut.h>
#include "../../mesa/main/config.h"
#include "internal.h"
int AccumSize = 16; /* per channel size of accumulation buffer */
int DepthSize = DEFAULT_SOFTWARE_DEPTH_BITS;
int StencilSize = STENCIL_BITS;
int NumSamples = 4;
int glutGet(GLenum state)
{
switch(state) {
case GLUT_WINDOW_X:
return 0;
case GLUT_WINDOW_Y:
return 0;
case GLUT_INIT_WINDOW_WIDTH:
case GLUT_WINDOW_WIDTH:
case GLUT_SCREEN_WIDTH:
return VarInfo.xres;
case GLUT_INIT_WINDOW_HEIGHT:
case GLUT_WINDOW_HEIGHT:
case GLUT_SCREEN_HEIGHT:
return VarInfo.yres;
case GLUT_WINDOW_BUFFER_SIZE:
return VarInfo.bits_per_pixel;
case GLUT_WINDOW_STENCIL_SIZE:
return StencilSize;
case GLUT_WINDOW_DEPTH_SIZE:
return DepthSize;
case GLUT_WINDOW_RED_SIZE:
return VarInfo.red.length;
case GLUT_WINDOW_GREEN_SIZE:
return VarInfo.green.length;
case GLUT_WINDOW_BLUE_SIZE:
return VarInfo.green.length;
case GLUT_WINDOW_ALPHA_SIZE:
return VarInfo.transp.length;
case GLUT_WINDOW_ACCUM_RED_SIZE:
case GLUT_WINDOW_ACCUM_GREEN_SIZE:
case GLUT_WINDOW_ACCUM_BLUE_SIZE:
case GLUT_WINDOW_ACCUM_ALPHA_SIZE:
return AccumSize;
case GLUT_WINDOW_DOUBLEBUFFER:
if(DisplayMode & GLUT_DOUBLE)
return 1;
return 0;
case GLUT_WINDOW_RGBA:
if(DisplayMode & GLUT_INDEX)
return 0;
return 1;
case GLUT_WINDOW_PARENT:
return 0;
case GLUT_WINDOW_NUM_CHILDREN:
return 0;
case GLUT_WINDOW_COLORMAP_SIZE:
if(DisplayMode & GLUT_INDEX)
return 256;
return 0;
case GLUT_WINDOW_NUM_SAMPLES:
return NumSamples;
case GLUT_WINDOW_STEREO:
return 0;
case GLUT_WINDOW_CURSOR:
return CurrentCursor;
case GLUT_SCREEN_WIDTH_MM:
return VarInfo.width;
case GLUT_SCREEN_HEIGHT_MM:
return VarInfo.height;
case GLUT_MENU_NUM_ITEMS:
if(CurrentMenu)
return Menus[CurrentMenu].NumItems;
return 0;
case GLUT_DISPLAY_MODE_POSSIBLE:
if((DisplayMode & GLUT_MULTISAMPLE)
|| (DisplayMode & GLUT_STEREO)
|| (DisplayMode & GLUT_LUMINANCE)
|| (DisplayMode & GLUT_ALPHA) && (DisplayMode & GLUT_INDEX))
return 0;
return 1;
case GLUT_INIT_DISPLAY_MODE:
return DisplayMode;
case GLUT_INIT_WINDOW_X:
case GLUT_INIT_WINDOW_Y:
return 0;
case GLUT_ELAPSED_TIME:
{
static struct timeval tv;
gettimeofday(&tv, 0);
return 1000 * (tv.tv_sec - StartTime.tv_sec)
+ (tv.tv_usec - StartTime.tv_usec) / 1000;
}
}
return -1;
}
int glutLayerGet(GLenum info)
{
switch(info) {
case GLUT_OVERLAY_POSSIBLE:
return 0;
case GLUT_LAYER_IN_USE:
return GLUT_NORMAL;
case GLUT_HAS_OVERLAY:
return 0;
case GLUT_TRANSPARENT_INDEX:
return -1;
case GLUT_NORMAL_DAMAGED:
return Redisplay;
case GLUT_OVERLAY_DAMAGED:
return -1;
}
return -1;
}
int glutDeviceGet(GLenum info)
{
switch(info) {
case GLUT_HAS_KEYBOARD:
return ConsoleFD != -1 ? 1 : 0;
case GLUT_HAS_MOUSE:
case GLUT_NUM_MOUSE_BUTTONS:
return NumMouseButtons;
case GLUT_HAS_SPACEBALL:
case GLUT_HAS_DIAL_AND_BUTTON_BOX:
case GLUT_HAS_TABLET:
return 0;
case GLUT_NUM_SPACEBALL_BUTTONS:
case GLUT_NUM_BUTTON_BOX_BUTTONS:
case GLUT_NUM_DIALS:
case GLUT_NUM_TABLET_BUTTONS:
return 0;
case GLUT_DEVICE_IGNORE_KEY_REPEAT:
return KeyRepeatMode == GLUT_KEY_REPEAT_OFF;
case GLUT_DEVICE_KEY_REPEAT:
return KeyRepeatMode;
case GLUT_JOYSTICK_POLL_RATE:
case GLUT_HAS_JOYSTICK:
case GLUT_JOYSTICK_BUTTONS:
case GLUT_JOYSTICK_AXES:
return 0;
}
return -1;
}
int glutGetModifiers(void){
return KeyboardModifiers;
}
int glutExtensionSupported(const char *extension)
{
const char *exts = (const char *) glGetString(GL_EXTENSIONS);
const char *start = exts;
int len = strlen(extension);
for(;;) {
const char *p = strstr(exts, extension);
if(!p)
break;
if((p == start || p[-1] == ' ') && (p[len] == ' ' || p[len] == 0))
return 1;
exts = p + len;
}
return 0;
}

81
src/glut/fbdev/stroke.c Normal file
View File

@@ -0,0 +1,81 @@
/*
* Mesa 3-D graphics library
* Version: 6.5
* Copyright (C) 1995-2006 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* Library for glut using mesa fbdev driver
*
* Written by Sean D'Epagnier (c) 2006
*
* To improve on this library, maybe support subwindows or overlays,
* I (sean at depagnier dot com) will do my best to help.
*/
#include <GL/glut.h>
#include "glutstroke.h"
void glutStrokeCharacter(GLUTstrokeFont font, int c)
{
const StrokeCharRec *ch;
const StrokeRec *stroke;
const CoordRec *coord;
StrokeFontPtr fontinfo = (StrokeFontPtr) font;
int i, j;
if (c < 0 || c >= fontinfo->num_chars)
return;
ch = &(fontinfo->ch[c]);
if (ch) {
for (i = ch->num_strokes, stroke = ch->stroke;
i > 0; i--, stroke++) {
glBegin(GL_LINE_STRIP);
for (j = stroke->num_coords, coord = stroke->coord;
j > 0; j--, coord++) {
glVertex2f(coord->x, coord->y);
}
glEnd();
}
glTranslatef(ch->right, 0.0, 0.0);
}
}
int glutStrokeWidth(GLUTstrokeFont font, int c)
{
StrokeFontPtr fontinfo;
const StrokeCharRec *ch;
fontinfo = (StrokeFontPtr) font;
if (c < 0 || c >= fontinfo->num_chars)
return 0;
ch = &(fontinfo->ch[c]);
if (ch)
return ch->right;
return 0;
}
int glutStrokeLength(GLUTstrokeFont font, const unsigned char *string)
{
int length = 0;
for (; *string; string++)
length += glutStrokeWidth(font, *string);
return length;
}

View File

@@ -0,0 +1,55 @@
/*
* Mesa 3-D graphics library
* Version: 6.5
* Copyright (C) 1995-2006 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* Library for glut using mesa fbdev driver
*
* Written by Sean D'Epagnier (c) 2006
*/
/* Notice, if you know how to implement these functions correctly
please proceed */
#include <stdlib.h>
#include <GL/glut.h>
#include "internal.h"
int glutVideoResizeGet(GLenum param)
{
return 0;
}
void glutSetupVideoResizing(void)
{
}
void glutStopVideoResizing(void)
{
}
void glutVideoResize(int x, int y, int width, int height)
{
}
void glutVideoPan(int x, int y, int width, int height)
{
}

View File

@@ -143,7 +143,6 @@ teapot(GLint grid, GLdouble scale, GLenum type)
float p[4][4][3], q[4][4][3], r[4][4][3], s[4][4][3];
long i, j, k, l;
#if 0
glPushAttrib(GL_ENABLE_BIT | GL_EVAL_BIT);
glEnable(GL_AUTO_NORMAL);
glEnable(GL_NORMALIZE);
@@ -195,7 +194,6 @@ teapot(GLint grid, GLdouble scale, GLenum type)
}
glPopMatrix();
glPopAttrib();
#endif
}
/* CENTRY */

View File

@@ -47,7 +47,7 @@ INCLUDES = -I. \
-I$(TOP)/src/mesa/main \
-I$(TOP)/src/mesa/glapi \
-I$(TOP)/src/mesa/drivers/dri/common \
`pkg-config --cflags libdrm` \
$(LIBDRM_CFLAGS) \
$(X11_INCLUDES)

View File

@@ -37,6 +37,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* THIS IS NOT AN X CONSORTIUM STANDARD */
#ifdef GLX_DIRECT_RENDERING
#define NEED_REPLIES
#include <X11/Xlibint.h>
#include <X11/extensions/Xext.h>
@@ -617,3 +619,5 @@ PUBLIC Bool XF86DRICloseFullScreen(dpy, screen, drawable)
(void) drawable;
return True;
}
#endif /* GLX_DIRECT_RENDERING */

View File

@@ -183,6 +183,7 @@ static const char createNewScreenName[] = "__driCreateNewScreen_20050727";
*/
static __DRIdriver *OpenDriver(const char *driverName)
{
void *glhandle = NULL;
char *libPaths = NULL;
char libDir[1000];
int i;
@@ -196,6 +197,9 @@ static __DRIdriver *OpenDriver(const char *driverName)
}
}
/* Attempt to make sure libGL symbols will be visible to the driver */
glhandle = dlopen("libGL.so.1", RTLD_NOW | RTLD_GLOBAL);
if (geteuid() == getuid()) {
/* don't allow setuid apps to use LIBGL_DRIVERS_PATH */
libPaths = getenv("LIBGL_DRIVERS_PATH");
@@ -229,12 +233,13 @@ static __DRIdriver *OpenDriver(const char *driverName)
/* allocate __DRIdriver struct */
driver = (__DRIdriver *) Xmalloc(sizeof(__DRIdriver));
if (!driver)
return NULL; /* out of memory! */
break; /* out of memory! */
/* init the struct */
driver->name = __glXstrdup(driverName);
if (!driver->name) {
Xfree(driver);
return NULL; /* out of memory! */
driver = NULL;
break; /* out of memory! */
}
driver->createNewScreenFunc = (PFNCREATENEWSCREENFUNC)
@@ -248,6 +253,7 @@ static __DRIdriver *OpenDriver(const char *driverName)
"Your driver may be too old for this libGL.\n",
createNewScreenName, driverName);
Xfree(driver);
driver = NULL;
dlclose(handle);
continue;
}
@@ -255,15 +261,20 @@ static __DRIdriver *OpenDriver(const char *driverName)
/* put at head of linked list */
driver->next = Drivers;
Drivers = driver;
return driver;
break;
}
else {
ErrorMessageF("dlopen %s failed (%s)\n", realDriverName, dlerror());
}
}
ErrorMessageF("unable to find driver: %s_dri.so\n", driverName);
return NULL;
if (!driver)
ErrorMessageF("unable to load driver: %s_dri.so\n", driverName);
if (glhandle)
dlclose(glhandle);
return driver;
}

View File

@@ -687,4 +687,7 @@ extern int __glXGetInternalVersion(void);
/* Get the unadjusted system time */
extern int __glXGetUST( int64_t * ust );
extern Bool __glXGetMscRateOML(Display * dpy, GLXDrawable drawable,
int32_t * numerator, int32_t * denominator);
#endif /* !__GLX_client_h__ */

View File

@@ -1650,18 +1650,10 @@ PUBLIC XVisualInfo *glXGetVisualFromFBConfig(Display *dpy, GLXFBConfig config)
}
/*
** GLX_SGI_make_current_read
*/
PUBLIC GLX_ALIAS(GLXDrawable, glXGetCurrentReadDrawableSGI, (void), (),
glXGetCurrentReadDrawable)
/*
** GLX_SGI_swap_control
*/
PUBLIC int glXSwapIntervalSGI(int interval)
static int __glXSwapIntervalSGI(int interval)
{
xGLXVendorPrivateReq *req;
GLXContext gc = __glXGetCurrentContext();
@@ -1708,7 +1700,7 @@ PUBLIC int glXSwapIntervalSGI(int interval)
req->vendorCode = X_GLXvop_SwapIntervalSGI;
req->contextTag = gc->currentContextTag;
interval_ptr = (CARD32 *) req + 1;
interval_ptr = (CARD32 *) (req + 1);
*interval_ptr = interval;
UnlockDisplay(dpy);
@@ -1722,7 +1714,7 @@ PUBLIC int glXSwapIntervalSGI(int interval)
/*
** GLX_MESA_swap_control
*/
PUBLIC int glXSwapIntervalMESA(unsigned int interval)
static int __glXSwapIntervalMESA(unsigned int interval)
{
#ifdef GLX_DIRECT_RENDERING
GLXContext gc = __glXGetCurrentContext();
@@ -1755,7 +1747,7 @@ PUBLIC int glXSwapIntervalMESA(unsigned int interval)
}
PUBLIC int glXGetSwapIntervalMESA(void)
static int __glXGetSwapIntervalMESA(void)
{
#ifdef GLX_DIRECT_RENDERING
GLXContext gc = __glXGetCurrentContext();
@@ -1785,7 +1777,7 @@ PUBLIC int glXGetSwapIntervalMESA(void)
** GLX_MESA_swap_frame_usage
*/
PUBLIC GLint glXBeginFrameTrackingMESA(Display *dpy, GLXDrawable drawable)
static GLint __glXBeginFrameTrackingMESA(Display *dpy, GLXDrawable drawable)
{
int status = GLX_BAD_CONTEXT;
#ifdef GLX_DIRECT_RENDERING
@@ -1805,7 +1797,7 @@ PUBLIC GLint glXBeginFrameTrackingMESA(Display *dpy, GLXDrawable drawable)
}
PUBLIC GLint glXEndFrameTrackingMESA(Display *dpy, GLXDrawable drawable)
static GLint __glXEndFrameTrackingMESA(Display *dpy, GLXDrawable drawable)
{
int status = GLX_BAD_CONTEXT;
#ifdef GLX_DIRECT_RENDERING
@@ -1825,8 +1817,8 @@ PUBLIC GLint glXEndFrameTrackingMESA(Display *dpy, GLXDrawable drawable)
}
PUBLIC GLint glXGetFrameUsageMESA(Display *dpy, GLXDrawable drawable,
GLfloat *usage)
static GLint __glXGetFrameUsageMESA(Display *dpy, GLXDrawable drawable,
GLfloat *usage)
{
int status = GLX_BAD_CONTEXT;
#ifdef GLX_DIRECT_RENDERING
@@ -1852,9 +1844,9 @@ PUBLIC GLint glXGetFrameUsageMESA(Display *dpy, GLXDrawable drawable,
}
PUBLIC GLint glXQueryFrameTrackingMESA(Display *dpy, GLXDrawable drawable,
int64_t *sbc, int64_t *missedFrames,
GLfloat *lastMissedUsage)
static GLint __glXQueryFrameTrackingMESA(Display *dpy, GLXDrawable drawable,
int64_t *sbc, int64_t *missedFrames,
GLfloat *lastMissedUsage)
{
int status = GLX_BAD_CONTEXT;
#ifdef GLX_DIRECT_RENDERING
@@ -1884,7 +1876,7 @@ PUBLIC GLint glXQueryFrameTrackingMESA(Display *dpy, GLXDrawable drawable,
/*
** GLX_SGI_video_sync
*/
PUBLIC int glXGetVideoSyncSGI(unsigned int *count)
static int __glXGetVideoSyncSGI(unsigned int *count)
{
/* FIXME: Looking at the GLX_SGI_video_sync spec in the extension registry,
* FIXME: there should be a GLX encoding for this call. I can find no
@@ -1913,7 +1905,7 @@ PUBLIC int glXGetVideoSyncSGI(unsigned int *count)
return GLX_BAD_CONTEXT;
}
PUBLIC int glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
static int __glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
{
#ifdef GLX_DIRECT_RENDERING
GLXContext gc = __glXGetCurrentContext();
@@ -1950,33 +1942,6 @@ PUBLIC int glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
}
/*
** GLX_SGIS_video_source
*/
#if defined(_VL_H)
PUBLIC GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX(Display *dpy,
int screen, VLServer server, VLPath path,
int nodeClass, VLNode drainNode)
{
(void) dpy;
(void) screen;
(void) server;
(void) path;
(void) nodeClass;
(void) drainNode;
return 0;
}
PUBLIC void glXDestroyGLXVideoSourceSGIX(Display *dpy, GLXVideoSourceSGIX src)
{
(void) dpy;
(void) src;
}
#endif
/*
** GLX_SGIX_fbconfig
** Many of these functions are aliased to GLX 1.3 entry points in the
@@ -2081,100 +2046,11 @@ PUBLIC GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX(Display *dpy,
}
/*
** GLX_SGI_cushion
*/
PUBLIC void glXCushionSGI(Display *dpy, Window win, float cushion)
{
(void) dpy;
(void) win;
(void) cushion;
}
/*
** GLX_SGIX_video_resize
*/
PUBLIC int glXBindChannelToWindowSGIX(Display *dpy, int screen,
int channel , Window window)
{
(void) dpy;
(void) screen;
(void) channel;
(void) window;
return 0;
}
PUBLIC int glXChannelRectSGIX(Display *dpy, int screen, int channel,
int x, int y, int w, int h)
{
(void) dpy;
(void) screen;
(void) channel;
(void) x;
(void) y;
(void) w;
(void) h;
return 0;
}
PUBLIC int glXQueryChannelRectSGIX(Display *dpy, int screen, int channel,
int *x, int *y, int *w, int *h)
{
(void) dpy;
(void) screen;
(void) channel;
(void) x;
(void) y;
(void) w;
(void) h;
return 0;
}
int glXQueryChannelDeltasSGIX(Display *dpy, int screen, int channel,
int *dx, int *dy, int *dw, int *dh)
{
(void) dpy;
(void) screen;
(void) channel;
(void) dx;
(void) dy;
(void) dw;
(void) dh;
return 0;
}
PUBLIC int glXChannelRectSyncSGIX(Display *dpy, int screen,
int channel, GLenum synctype)
{
(void) dpy;
(void) screen;
(void) channel;
(void) synctype;
return 0;
}
#if defined(_DM_BUFFER_H_)
PUBLIC Bool glXAssociateDMPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuffer,
DMparams *params, DMbuffer dmbuffer)
{
(void) dpy;
(void) pbuffer;
(void) params;
(void) dmbuffer;
return False;
}
#endif
/*
** GLX_SGIX_swap_group
*/
PUBLIC void glXJoinSwapGroupSGIX(Display *dpy, GLXDrawable drawable,
GLXDrawable member)
static void __glXJoinSwapGroupSGIX(Display *dpy, GLXDrawable drawable,
GLXDrawable member)
{
(void) dpy;
(void) drawable;
@@ -2185,15 +2061,15 @@ PUBLIC void glXJoinSwapGroupSGIX(Display *dpy, GLXDrawable drawable,
/*
** GLX_SGIX_swap_barrier
*/
PUBLIC void glXBindSwapBarrierSGIX(Display *dpy, GLXDrawable drawable,
int barrier)
static void __glXBindSwapBarrierSGIX(Display *dpy, GLXDrawable drawable,
int barrier)
{
(void) dpy;
(void) drawable;
(void) barrier;
}
PUBLIC Bool glXQueryMaxSwapBarriersSGIX(Display *dpy, int screen, int *max)
static Bool __glXQueryMaxSwapBarriersSGIX(Display *dpy, int screen, int *max)
{
(void) dpy;
(void) screen;
@@ -2202,25 +2078,11 @@ PUBLIC Bool glXQueryMaxSwapBarriersSGIX(Display *dpy, int screen, int *max)
}
/*
** GLX_SUN_get_transparent_index
*/
PUBLIC Status glXGetTransparentIndexSUN(Display *dpy, Window overlay,
Window underlay, long *pTransparent)
{
(void) dpy;
(void) overlay;
(void) underlay;
(void) pTransparent;
return 0;
}
/*
** GLX_OML_sync_control
*/
PUBLIC Bool glXGetSyncValuesOML(Display *dpy, GLXDrawable drawable,
int64_t *ust, int64_t *msc, int64_t *sbc)
static Bool __glXGetSyncValuesOML(Display *dpy, GLXDrawable drawable,
int64_t *ust, int64_t *msc, int64_t *sbc)
{
#ifdef GLX_DIRECT_RENDERING
__GLXdisplayPrivate * const priv = __glXInitialize(dpy);
@@ -2264,8 +2126,8 @@ PUBLIC Bool glXGetSyncValuesOML(Display *dpy, GLXDrawable drawable,
* when GLX_OML_sync_control appears in the client extension string.
*/
PUBLIC Bool glXGetMscRateOML(Display * dpy, GLXDrawable drawable,
int32_t * numerator, int32_t * denominator)
Bool __glXGetMscRateOML(Display * dpy, GLXDrawable drawable,
int32_t * numerator, int32_t * denominator)
{
#if defined( GLX_DIRECT_RENDERING ) && defined( XF86VIDMODE )
__GLXdisplayPrivate * const priv = __glXInitialize(dpy);
@@ -2338,9 +2200,9 @@ PUBLIC Bool glXGetMscRateOML(Display * dpy, GLXDrawable drawable,
}
PUBLIC int64_t glXSwapBuffersMscOML(Display *dpy, GLXDrawable drawable,
int64_t target_msc, int64_t divisor,
int64_t remainder)
static int64_t __glXSwapBuffersMscOML(Display *dpy, GLXDrawable drawable,
int64_t target_msc, int64_t divisor,
int64_t remainder)
{
#ifdef GLX_DIRECT_RENDERING
int screen;
@@ -2373,10 +2235,10 @@ PUBLIC int64_t glXSwapBuffersMscOML(Display *dpy, GLXDrawable drawable,
}
PUBLIC Bool glXWaitForMscOML(Display * dpy, GLXDrawable drawable,
int64_t target_msc, int64_t divisor,
int64_t remainder, int64_t *ust,
int64_t *msc, int64_t *sbc)
static Bool __glXWaitForMscOML(Display * dpy, GLXDrawable drawable,
int64_t target_msc, int64_t divisor,
int64_t remainder, int64_t *ust,
int64_t *msc, int64_t *sbc)
{
#ifdef GLX_DIRECT_RENDERING
int screen;
@@ -2416,9 +2278,9 @@ PUBLIC Bool glXWaitForMscOML(Display * dpy, GLXDrawable drawable,
}
PUBLIC Bool glXWaitForSbcOML(Display * dpy, GLXDrawable drawable,
int64_t target_sbc, int64_t *ust,
int64_t *msc, int64_t *sbc )
static Bool __glXWaitForSbcOML(Display * dpy, GLXDrawable drawable,
int64_t target_sbc, int64_t *ust,
int64_t *msc, int64_t *sbc )
{
#ifdef GLX_DIRECT_RENDERING
int screen;
@@ -2552,7 +2414,7 @@ PUBLIC GLuint glXGetMemoryOffsetMESA( Display *dpy, int scrn,
* glXDestroyPbuffer glXDestroyPixmap glXDestroyWindow
* glXDestroyGLXPbufferSGIX glXDestroyGLXVideoSourceSGIX
*/
PUBLIC Bool glXReleaseBuffersMESA( Display *dpy, GLXDrawable d )
static Bool __glXReleaseBuffersMESA( Display *dpy, GLXDrawable d )
{
(void) dpy;
(void) d;
@@ -2569,10 +2431,15 @@ PUBLIC GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual,
(void) cmap;
return 0;
}
/*@}*/
/**
* GLX_MESA_copy_sub_buffer
*/
#define X_GLXvop_CopySubBufferMESA 5154 /* temporary */
PUBLIC void glXCopySubBufferMESA(Display *dpy, GLXDrawable drawable,
int x, int y, int width, int height)
static void __glXCopySubBufferMESA(Display *dpy, GLXDrawable drawable,
int x, int y, int width, int height)
{
xGLXVendorPrivateReq *req;
GLXContext gc;
@@ -2634,17 +2501,15 @@ PUBLIC void glXCopySubBufferMESA(Display *dpy, GLXDrawable drawable,
SyncHandle();
}
PUBLIC Bool glXSet3DfxModeMESA( int mode )
{
(void) mode;
return GL_FALSE;
}
/*@}*/
PUBLIC void glXBindTexImageEXT(Display *dpy,
GLXDrawable drawable,
int buffer,
const int *attrib_list)
/**
* GLX_EXT_texture_from_pixmap
*/
/*@{*/
static void __glXBindTexImageEXT(Display *dpy,
GLXDrawable drawable,
int buffer,
const int *attrib_list)
{
xGLXVendorPrivateReq *req;
GLXContext gc = __glXGetCurrentContext();
@@ -2703,9 +2568,9 @@ PUBLIC void glXBindTexImageEXT(Display *dpy,
SyncHandle();
}
PUBLIC void glXReleaseTexImageEXT(Display *dpy,
GLXDrawable drawable,
int buffer)
static void __glXReleaseTexImageEXT(Display *dpy,
GLXDrawable drawable,
int buffer)
{
xGLXVendorPrivateReq *req;
GLXContext gc = __glXGetCurrentContext();
@@ -2741,6 +2606,7 @@ PUBLIC void glXReleaseTexImageEXT(Display *dpy,
UnlockDisplay(dpy);
SyncHandle();
}
/*@}*/
/**
* \c strdup is actually not a standard ANSI C or POSIX routine.
@@ -2819,22 +2685,16 @@ static const struct name_address_pair GLX_functions[] = {
GLX_FUNCTION( glXSelectEvent ),
/*** GLX_SGI_swap_control ***/
GLX_FUNCTION( glXSwapIntervalSGI ),
GLX_FUNCTION2( glXSwapIntervalSGI, __glXSwapIntervalSGI ),
/*** GLX_SGI_video_sync ***/
GLX_FUNCTION( glXGetVideoSyncSGI ),
GLX_FUNCTION( glXWaitVideoSyncSGI ),
GLX_FUNCTION2( glXGetVideoSyncSGI, __glXGetVideoSyncSGI ),
GLX_FUNCTION2( glXWaitVideoSyncSGI, __glXWaitVideoSyncSGI ),
/*** GLX_SGI_make_current_read ***/
GLX_FUNCTION2( glXMakeCurrentReadSGI, glXMakeContextCurrent ),
GLX_FUNCTION2( glXGetCurrentReadDrawableSGI, glXGetCurrentReadDrawable ),
/*** GLX_SGIX_video_source ***/
#if defined(_VL_H)
GLX_FUNCTION( glXCreateGLXVideoSourceSGIX ),
GLX_FUNCTION( glXDestroyGLXVideoSourceSGIX ),
#endif
/*** GLX_EXT_import_context ***/
GLX_FUNCTION( glXFreeContextEXT ),
GLX_FUNCTION( glXGetContextIDEXT ),
@@ -2857,30 +2717,12 @@ static const struct name_address_pair GLX_functions[] = {
GLX_FUNCTION( glXSelectEventSGIX ),
GLX_FUNCTION( glXGetSelectedEventSGIX ),
/*** GLX_SGI_cushion ***/
GLX_FUNCTION( glXCushionSGI ),
/*** GLX_SGIX_video_resize ***/
GLX_FUNCTION( glXBindChannelToWindowSGIX ),
GLX_FUNCTION( glXChannelRectSGIX ),
GLX_FUNCTION( glXQueryChannelRectSGIX ),
GLX_FUNCTION( glXQueryChannelDeltasSGIX ),
GLX_FUNCTION( glXChannelRectSyncSGIX ),
/*** GLX_SGIX_dmbuffer **/
#if defined(_DM_BUFFER_H_)
GLX_FUNCTION( glXAssociateDMPbufferSGIX ),
#endif
/*** GLX_SGIX_swap_group ***/
GLX_FUNCTION( glXJoinSwapGroupSGIX ),
GLX_FUNCTION2( glXJoinSwapGroupSGIX, __glXJoinSwapGroupSGIX ),
/*** GLX_SGIX_swap_barrier ***/
GLX_FUNCTION( glXBindSwapBarrierSGIX ),
GLX_FUNCTION( glXQueryMaxSwapBarriersSGIX ),
/*** GLX_SUN_get_transparent_index ***/
GLX_FUNCTION( glXGetTransparentIndexSUN ),
GLX_FUNCTION2( glXBindSwapBarrierSGIX, __glXBindSwapBarrierSGIX ),
GLX_FUNCTION2( glXQueryMaxSwapBarriersSGIX, __glXQueryMaxSwapBarriersSGIX ),
/*** GLX_MESA_allocate_memory ***/
GLX_FUNCTION( glXAllocateMemoryMESA ),
@@ -2888,26 +2730,23 @@ static const struct name_address_pair GLX_functions[] = {
GLX_FUNCTION( glXGetMemoryOffsetMESA ),
/*** GLX_MESA_copy_sub_buffer ***/
GLX_FUNCTION( glXCopySubBufferMESA ),
GLX_FUNCTION2( glXCopySubBufferMESA, __glXCopySubBufferMESA ),
/*** GLX_MESA_pixmap_colormap ***/
GLX_FUNCTION( glXCreateGLXPixmapMESA ),
/*** GLX_MESA_release_buffers ***/
GLX_FUNCTION( glXReleaseBuffersMESA ),
/*** GLX_MESA_set_3dfx_mode ***/
GLX_FUNCTION( glXSet3DfxModeMESA ),
GLX_FUNCTION2( glXReleaseBuffersMESA, __glXReleaseBuffersMESA ),
/*** GLX_MESA_swap_control ***/
GLX_FUNCTION( glXSwapIntervalMESA ),
GLX_FUNCTION( glXGetSwapIntervalMESA ),
GLX_FUNCTION2( glXSwapIntervalMESA, __glXSwapIntervalMESA ),
GLX_FUNCTION2( glXGetSwapIntervalMESA, __glXGetSwapIntervalMESA ),
/*** GLX_MESA_swap_frame_usage ***/
GLX_FUNCTION( glXBeginFrameTrackingMESA ),
GLX_FUNCTION( glXEndFrameTrackingMESA ),
GLX_FUNCTION( glXGetFrameUsageMESA ),
GLX_FUNCTION( glXQueryFrameTrackingMESA ),
GLX_FUNCTION2( glXBeginFrameTrackingMESA, __glXBeginFrameTrackingMESA ),
GLX_FUNCTION2( glXEndFrameTrackingMESA, __glXEndFrameTrackingMESA ),
GLX_FUNCTION2( glXGetFrameUsageMESA, __glXGetFrameUsageMESA ),
GLX_FUNCTION2( glXQueryFrameTrackingMESA, __glXQueryFrameTrackingMESA ),
/*** GLX_ARB_get_proc_address ***/
GLX_FUNCTION( glXGetProcAddressARB ),
@@ -2916,15 +2755,15 @@ static const struct name_address_pair GLX_functions[] = {
GLX_FUNCTION2( glXGetProcAddress, glXGetProcAddressARB ),
/*** GLX_OML_sync_control ***/
GLX_FUNCTION( glXWaitForSbcOML ),
GLX_FUNCTION( glXWaitForMscOML ),
GLX_FUNCTION( glXSwapBuffersMscOML ),
GLX_FUNCTION( glXGetMscRateOML ),
GLX_FUNCTION( glXGetSyncValuesOML ),
GLX_FUNCTION2( glXWaitForSbcOML, __glXWaitForSbcOML ),
GLX_FUNCTION2( glXWaitForMscOML, __glXWaitForMscOML ),
GLX_FUNCTION2( glXSwapBuffersMscOML, __glXSwapBuffersMscOML ),
GLX_FUNCTION2( glXGetMscRateOML, __glXGetMscRateOML ),
GLX_FUNCTION2( glXGetSyncValuesOML, __glXGetSyncValuesOML ),
/*** GLX_EXT_texture_from_pixmap ***/
GLX_FUNCTION( glXBindTexImageEXT ),
GLX_FUNCTION( glXReleaseTexImageEXT ),
GLX_FUNCTION2( glXBindTexImageEXT, __glXBindTexImageEXT ),
GLX_FUNCTION2( glXReleaseTexImageEXT, __glXReleaseTexImageEXT ),
#ifdef GLX_DIRECT_RENDERING
/*** DRI configuration ***/

View File

@@ -719,7 +719,7 @@ static const __DRIinterfaceMethods interface_methods = {
XF86DRIGetDrawableInfo,
__glXGetUST,
glXGetMscRateOML,
__glXGetMscRateOML,
};

View File

@@ -82,7 +82,6 @@ static const struct extension_info known_glx_extensions[] = {
{ GLX(MESA_copy_sub_buffer), VER(0,0), Y, N, N, N },
{ GLX(MESA_pixmap_colormap), VER(0,0), N, N, N, N }, /* Deprecated */
{ GLX(MESA_release_buffers), VER(0,0), N, N, N, N }, /* Deprecated */
{ GLX(MESA_set_3dfx_mode), VER(0,0), N, N, N, N }, /* Deprecated */
{ GLX(MESA_swap_control), VER(0,0), Y, N, N, Y },
{ GLX(MESA_swap_frame_usage), VER(0,0), Y, N, N, Y },
{ GLX(NV_float_buffer), VER(0,0), N, N, N, N },
@@ -91,22 +90,17 @@ static const struct extension_info known_glx_extensions[] = {
{ GLX(NV_vertex_array_range), VER(0,0), N, N, N, Y }, /* Deprecated */
{ GLX(OML_swap_method), VER(0,0), Y, Y, N, N },
{ GLX(OML_sync_control), VER(0,0), Y, N, N, Y },
{ GLX(SGI_cushion), VER(0,0), N, N, N, N },
{ GLX(SGI_make_current_read), VER(1,3), Y, N, N, N },
{ GLX(SGI_swap_control), VER(0,0), Y, N, N, N },
{ GLX(SGI_video_sync), VER(0,0), Y, N, N, Y },
{ GLX(SGIS_blended_overlay), VER(0,0), N, N, N, N },
{ GLX(SGIS_color_range), VER(0,0), N, N, N, N },
{ GLX(SGIS_multisample), VER(0,0), Y, Y, N, N },
{ GLX(SGIX_dm_buffer), VER(0,0), N, N, N, N },
{ GLX(SGIX_fbconfig), VER(1,3), Y, Y, N, N },
{ GLX(SGIX_pbuffer), VER(1,3), Y, N, N, N },
{ GLX(SGIX_swap_barrier), VER(0,0), N, N, N, N },
{ GLX(SGIX_swap_group), VER(0,0), N, N, N, N },
{ GLX(SGIX_video_resize), VER(0,0), N, N, N, N },
{ GLX(SGIX_video_source), VER(0,0), N, N, N, N },
{ GLX(SGIX_visual_select_group), VER(0,0), Y, Y, N, N },
{ GLX(SUN_get_transparent_index), VER(0,0), N, N, N, N },
{ GLX(EXT_texture_from_pixmap), VER(0,0), Y, N, N, N },
{ NULL }
};
@@ -141,7 +135,7 @@ static const struct extension_info known_gl_extensions[] = {
{ GL(EXT_abgr), VER(0,0), Y, N, N, N },
{ GL(EXT_bgra), VER(1,2), Y, N, N, N },
{ GL(EXT_blend_color), VER(1,4), Y, N, N, N },
{ GL(EXT_blend_equation_separate), VER(0,0), N, N, N, N },
{ GL(EXT_blend_equation_separate), VER(0,0), Y, N, N, N },
{ GL(EXT_blend_func_separate), VER(1,4), Y, N, N, N },
{ GL(EXT_blend_logic_op), VER(1,4), Y, N, N, N },
{ GL(EXT_blend_minmax), VER(1,4), Y, N, N, N },
@@ -226,6 +220,7 @@ static const struct extension_info known_gl_extensions[] = {
{ GL(OES_read_format), VER(0,0), Y, N, N, N },
{ GL(OES_compressed_paletted_texture),VER(0,0), Y, N, N, N },
{ GL(SGI_color_matrix), VER(0,0), Y, N, N, N },
{ GL(SGI_color_table), VER(0,0), Y, N, N, N },
{ GL(SGI_texture_color_table), VER(0,0), Y, N, N, N },
{ GL(SGIS_generate_mipmap), VER(1,4), Y, N, N, N },
{ GL(SGIS_multisample), VER(0,0), Y, N, N, N },

View File

@@ -45,7 +45,6 @@ enum {
MESA_depth_float_bit,
MESA_pixmap_colormap_bit,
MESA_release_buffers_bit,
MESA_set_3dfx_mode_bit,
MESA_swap_control_bit,
MESA_swap_frame_usage_bit,
NV_float_buffer_bit,
@@ -54,22 +53,17 @@ enum {
NV_vertex_array_range_bit,
OML_swap_method_bit,
OML_sync_control_bit,
SGI_cushion_bit,
SGI_make_current_read_bit,
SGI_swap_control_bit,
SGI_video_sync_bit,
SGIS_blended_overlay_bit,
SGIS_color_range_bit,
SGIS_multisample_bit,
SGIX_dm_buffer_bit,
SGIX_fbconfig_bit,
SGIX_pbuffer_bit,
SGIX_swap_barrier_bit,
SGIX_swap_group_bit,
SGIX_video_resize_bit,
SGIX_video_source_bit,
SGIX_visual_select_group_bit,
SUN_get_transparent_index_bit,
EXT_texture_from_pixmap_bit
};
@@ -180,6 +174,7 @@ enum {
GL_OES_compressed_paletted_texture_bit,
GL_OES_read_format_bit,
GL_SGI_color_matrix_bit,
GL_SGI_color_table_bit,
GL_SGI_texture_color_table_bit,
GL_SGIS_generate_mipmap_bit,
GL_SGIS_multisample_bit,

File diff suppressed because it is too large Load Diff

View File

@@ -477,96 +477,38 @@ extern HIDDEN void __indirect_glMultiTexCoord4iARB(GLenum target, GLint s, GLint
extern HIDDEN void __indirect_glMultiTexCoord4ivARB(GLenum target, const GLint * v);
extern HIDDEN void __indirect_glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
extern HIDDEN void __indirect_glMultiTexCoord4svARB(GLenum target, const GLshort * v);
extern HIDDEN void __indirect_glLoadTransposeMatrixfARB(const GLfloat * m);
extern HIDDEN void __indirect_glLoadTransposeMatrixdARB(const GLdouble * m);
extern HIDDEN void __indirect_glMultTransposeMatrixfARB(const GLfloat * m);
extern HIDDEN void __indirect_glLoadTransposeMatrixfARB(const GLfloat * m);
extern HIDDEN void __indirect_glMultTransposeMatrixdARB(const GLdouble * m);
extern HIDDEN void __indirect_glMultTransposeMatrixfARB(const GLfloat * m);
extern HIDDEN void __indirect_glSampleCoverageARB(GLclampf value, GLboolean invert);
extern HIDDEN void __indirect_glDrawBuffersARB(GLsizei n, const GLenum * bufs);
extern HIDDEN GLboolean __indirect_glAreTexturesResidentEXT(GLsizei n, const GLuint * textures, GLboolean * residences);
extern HIDDEN void __indirect_glGenTexturesEXT(GLsizei n, GLuint * textures);
extern HIDDEN GLboolean __indirect_glIsTextureEXT(GLuint texture);
extern HIDDEN void __indirect_glSampleMaskSGIS(GLclampf value, GLboolean invert);
extern HIDDEN void __indirect_glSamplePatternSGIS(GLenum pattern);
extern HIDDEN void __indirect_glColorPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer);
extern HIDDEN void __indirect_glEdgeFlagPointerEXT(GLsizei stride, GLsizei count, const GLboolean * pointer);
extern HIDDEN void __indirect_glIndexPointerEXT(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer);
extern HIDDEN void __indirect_glNormalPointerEXT(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer);
extern HIDDEN void __indirect_glTexCoordPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer);
extern HIDDEN void __indirect_glVertexPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer);
extern HIDDEN void __indirect_glPointParameterfEXT(GLenum pname, GLfloat param);
extern HIDDEN void __indirect_glPointParameterfvEXT(GLenum pname, const GLfloat * params);
extern HIDDEN void __indirect_glWindowPos2dMESA(GLdouble x, GLdouble y);
extern HIDDEN void __indirect_glWindowPos2dvMESA(const GLdouble * v);
extern HIDDEN void __indirect_glWindowPos2fMESA(GLfloat x, GLfloat y);
extern HIDDEN void __indirect_glWindowPos2fvMESA(const GLfloat * v);
extern HIDDEN void __indirect_glWindowPos2iMESA(GLint x, GLint y);
extern HIDDEN void __indirect_glWindowPos2ivMESA(const GLint * v);
extern HIDDEN void __indirect_glWindowPos2sMESA(GLshort x, GLshort y);
extern HIDDEN void __indirect_glWindowPos2svMESA(const GLshort * v);
extern HIDDEN void __indirect_glWindowPos3dMESA(GLdouble x, GLdouble y, GLdouble z);
extern HIDDEN void __indirect_glWindowPos3dvMESA(const GLdouble * v);
extern HIDDEN void __indirect_glWindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z);
extern HIDDEN void __indirect_glWindowPos3fvMESA(const GLfloat * v);
extern HIDDEN void __indirect_glWindowPos3iMESA(GLint x, GLint y, GLint z);
extern HIDDEN void __indirect_glWindowPos3ivMESA(const GLint * v);
extern HIDDEN void __indirect_glWindowPos3sMESA(GLshort x, GLshort y, GLshort z);
extern HIDDEN void __indirect_glWindowPos3svMESA(const GLshort * v);
extern HIDDEN void __indirect_glBlendFuncSeparateEXT(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
extern HIDDEN void __indirect_glFogCoordfEXT(GLfloat coord);
extern HIDDEN void __indirect_glFogCoordfvEXT(const GLfloat * coord);
extern HIDDEN void __indirect_glFogCoorddEXT(GLdouble coord);
extern HIDDEN void __indirect_glFogCoorddvEXT(const GLdouble * coord);
extern HIDDEN void __indirect_glFogCoordPointerEXT(GLenum type, GLsizei stride, const GLvoid * pointer);
extern HIDDEN void __indirect_glCompressedTexImage3DARB(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data);
extern HIDDEN void __indirect_glCompressedTexImage2DARB(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data);
extern HIDDEN void __indirect_glCompressedTexImage1DARB(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data);
extern HIDDEN void __indirect_glCompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data);
extern HIDDEN void __indirect_glCompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data);
extern HIDDEN void __indirect_glCompressedTexImage2DARB(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data);
extern HIDDEN void __indirect_glCompressedTexImage3DARB(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data);
extern HIDDEN void __indirect_glCompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data);
extern HIDDEN void __indirect_glCompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data);
extern HIDDEN void __indirect_glCompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data);
extern HIDDEN void __indirect_glGetCompressedTexImageARB(GLenum target, GLint level, GLvoid * img);
extern HIDDEN void __indirect_glSecondaryColor3bEXT(GLbyte red, GLbyte green, GLbyte blue);
extern HIDDEN void __indirect_glSecondaryColor3bvEXT(const GLbyte * v);
extern HIDDEN void __indirect_glSecondaryColor3dEXT(GLdouble red, GLdouble green, GLdouble blue);
extern HIDDEN void __indirect_glSecondaryColor3dvEXT(const GLdouble * v);
extern HIDDEN void __indirect_glSecondaryColor3fEXT(GLfloat red, GLfloat green, GLfloat blue);
extern HIDDEN void __indirect_glSecondaryColor3fvEXT(const GLfloat * v);
extern HIDDEN void __indirect_glSecondaryColor3iEXT(GLint red, GLint green, GLint blue);
extern HIDDEN void __indirect_glSecondaryColor3ivEXT(const GLint * v);
extern HIDDEN void __indirect_glSecondaryColor3sEXT(GLshort red, GLshort green, GLshort blue);
extern HIDDEN void __indirect_glSecondaryColor3svEXT(const GLshort * v);
extern HIDDEN void __indirect_glSecondaryColor3ubEXT(GLubyte red, GLubyte green, GLubyte blue);
extern HIDDEN void __indirect_glSecondaryColor3ubvEXT(const GLubyte * v);
extern HIDDEN void __indirect_glSecondaryColor3uiEXT(GLuint red, GLuint green, GLuint blue);
extern HIDDEN void __indirect_glSecondaryColor3uivEXT(const GLuint * v);
extern HIDDEN void __indirect_glSecondaryColor3usEXT(GLushort red, GLushort green, GLushort blue);
extern HIDDEN void __indirect_glSecondaryColor3usvEXT(const GLushort * v);
extern HIDDEN void __indirect_glSecondaryColorPointerEXT(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer);
extern HIDDEN GLboolean __indirect_glAreProgramsResidentNV(GLsizei n, const GLuint * ids, GLboolean * residences);
extern HIDDEN void __indirect_glBindProgramNV(GLenum target, GLuint program);
extern HIDDEN void __indirect_glDeleteProgramsNV(GLsizei n, const GLuint * programs);
extern HIDDEN void __indirect_glExecuteProgramNV(GLenum target, GLuint id, const GLfloat * params);
extern HIDDEN void __indirect_glGenProgramsNV(GLsizei n, GLuint * programs);
extern HIDDEN void __indirect_glGetProgramParameterdvNV(GLenum target, GLuint index, GLenum pname, GLdouble * params);
extern HIDDEN void __indirect_glGetProgramParameterfvNV(GLenum target, GLuint index, GLenum pname, GLfloat * params);
extern HIDDEN void __indirect_glGetProgramivNV(GLuint id, GLenum pname, GLint * params);
extern HIDDEN void __indirect_glGetProgramStringNV(GLuint id, GLenum pname, GLubyte * program);
extern HIDDEN void __indirect_glGetTrackMatrixivNV(GLenum target, GLuint address, GLenum pname, GLint * params);
extern HIDDEN void __indirect_glDisableVertexAttribArrayARB(GLuint index);
extern HIDDEN void __indirect_glEnableVertexAttribArrayARB(GLuint index);
extern HIDDEN void __indirect_glGetProgramEnvParameterdvARB(GLenum target, GLuint index, GLdouble * params);
extern HIDDEN void __indirect_glGetProgramEnvParameterfvARB(GLenum target, GLuint index, GLfloat * params);
extern HIDDEN void __indirect_glGetProgramLocalParameterdvARB(GLenum target, GLuint index, GLdouble * params);
extern HIDDEN void __indirect_glGetProgramLocalParameterfvARB(GLenum target, GLuint index, GLfloat * params);
extern HIDDEN void __indirect_glGetProgramStringARB(GLenum target, GLenum pname, GLvoid * string);
extern HIDDEN void __indirect_glGetProgramivARB(GLenum target, GLenum pname, GLint * params);
extern HIDDEN void __indirect_glGetVertexAttribdvARB(GLuint index, GLenum pname, GLdouble * params);
extern HIDDEN void __indirect_glGetVertexAttribfvARB(GLuint index, GLenum pname, GLfloat * params);
extern HIDDEN void __indirect_glGetVertexAttribivARB(GLuint index, GLenum pname, GLint * params);
extern HIDDEN void __indirect_glGetVertexAttribPointervNV(GLuint index, GLenum pname, GLvoid ** params);
extern HIDDEN GLboolean __indirect_glIsProgramNV(GLuint program);
extern HIDDEN void __indirect_glLoadProgramNV(GLenum target, GLuint id, GLsizei len, const GLubyte * program);
extern HIDDEN void __indirect_glProgramParameter4dNV(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
extern HIDDEN void __indirect_glProgramParameter4dvNV(GLenum target, GLuint index, const GLdouble * params);
extern HIDDEN void __indirect_glProgramParameter4fNV(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
extern HIDDEN void __indirect_glProgramParameter4fvNV(GLenum target, GLuint index, const GLfloat * params);
extern HIDDEN void __indirect_glProgramParameters4dvNV(GLenum target, GLuint index, GLuint num, const GLdouble * params);
extern HIDDEN void __indirect_glProgramParameters4fvNV(GLenum target, GLuint index, GLuint num, const GLfloat * params);
extern HIDDEN void __indirect_glRequestResidentProgramsNV(GLsizei n, const GLuint * ids);
extern HIDDEN void __indirect_glTrackMatrixNV(GLenum target, GLuint address, GLenum matrix, GLenum transform);
extern HIDDEN void __indirect_glVertexAttribPointerNV(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer);
extern HIDDEN void __indirect_glProgramEnvParameter4dARB(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
extern HIDDEN void __indirect_glProgramEnvParameter4dvARB(GLenum target, GLuint index, const GLdouble * params);
extern HIDDEN void __indirect_glProgramEnvParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
extern HIDDEN void __indirect_glProgramEnvParameter4fvARB(GLenum target, GLuint index, const GLfloat * params);
extern HIDDEN void __indirect_glProgramLocalParameter4dARB(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
extern HIDDEN void __indirect_glProgramLocalParameter4dvARB(GLenum target, GLuint index, const GLdouble * params);
extern HIDDEN void __indirect_glProgramLocalParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
extern HIDDEN void __indirect_glProgramLocalParameter4fvARB(GLenum target, GLuint index, const GLfloat * params);
extern HIDDEN void __indirect_glProgramStringARB(GLenum target, GLenum format, GLsizei len, const GLvoid * string);
extern HIDDEN void __indirect_glVertexAttrib1dARB(GLuint index, GLdouble x);
extern HIDDEN void __indirect_glVertexAttrib1dvARB(GLuint index, const GLdouble * v);
extern HIDDEN void __indirect_glVertexAttrib1fARB(GLuint index, GLfloat x);
@@ -585,77 +527,115 @@ extern HIDDEN void __indirect_glVertexAttrib3fARB(GLuint index, GLfloat x, GLflo
extern HIDDEN void __indirect_glVertexAttrib3fvARB(GLuint index, const GLfloat * v);
extern HIDDEN void __indirect_glVertexAttrib3sARB(GLuint index, GLshort x, GLshort y, GLshort z);
extern HIDDEN void __indirect_glVertexAttrib3svARB(GLuint index, const GLshort * v);
extern HIDDEN void __indirect_glVertexAttrib4NbvARB(GLuint index, const GLbyte * v);
extern HIDDEN void __indirect_glVertexAttrib4NivARB(GLuint index, const GLint * v);
extern HIDDEN void __indirect_glVertexAttrib4NsvARB(GLuint index, const GLshort * v);
extern HIDDEN void __indirect_glVertexAttrib4NubARB(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
extern HIDDEN void __indirect_glVertexAttrib4NubvARB(GLuint index, const GLubyte * v);
extern HIDDEN void __indirect_glVertexAttrib4NuivARB(GLuint index, const GLuint * v);
extern HIDDEN void __indirect_glVertexAttrib4NusvARB(GLuint index, const GLushort * v);
extern HIDDEN void __indirect_glVertexAttrib4bvARB(GLuint index, const GLbyte * v);
extern HIDDEN void __indirect_glVertexAttrib4dARB(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
extern HIDDEN void __indirect_glVertexAttrib4dvARB(GLuint index, const GLdouble * v);
extern HIDDEN void __indirect_glVertexAttrib4fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
extern HIDDEN void __indirect_glVertexAttrib4fvARB(GLuint index, const GLfloat * v);
extern HIDDEN void __indirect_glVertexAttrib4ivARB(GLuint index, const GLint * v);
extern HIDDEN void __indirect_glVertexAttrib4sARB(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
extern HIDDEN void __indirect_glVertexAttrib4svARB(GLuint index, const GLshort * v);
extern HIDDEN void __indirect_glVertexAttrib4NubARB(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
extern HIDDEN void __indirect_glVertexAttrib4NubvARB(GLuint index, const GLubyte * v);
extern HIDDEN void __indirect_glVertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble * v);
extern HIDDEN void __indirect_glVertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat * v);
extern HIDDEN void __indirect_glVertexAttribs1svNV(GLuint index, GLsizei n, const GLshort * v);
extern HIDDEN void __indirect_glVertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble * v);
extern HIDDEN void __indirect_glVertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat * v);
extern HIDDEN void __indirect_glVertexAttribs2svNV(GLuint index, GLsizei n, const GLshort * v);
extern HIDDEN void __indirect_glVertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble * v);
extern HIDDEN void __indirect_glVertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat * v);
extern HIDDEN void __indirect_glVertexAttribs3svNV(GLuint index, GLsizei n, const GLshort * v);
extern HIDDEN void __indirect_glVertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble * v);
extern HIDDEN void __indirect_glVertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat * v);
extern HIDDEN void __indirect_glVertexAttribs4svNV(GLuint index, GLsizei n, const GLshort * v);
extern HIDDEN void __indirect_glVertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte * v);
extern HIDDEN void __indirect_glPointParameteriNV(GLenum pname, GLint param);
extern HIDDEN void __indirect_glPointParameterivNV(GLenum pname, const GLint * params);
extern HIDDEN void __indirect_glMultiDrawArraysEXT(GLenum mode, GLint * first, GLsizei * count, GLsizei primcount);
extern HIDDEN void __indirect_glMultiDrawElementsEXT(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount);
extern HIDDEN void __indirect_glActiveStencilFaceEXT(GLenum face);
extern HIDDEN void __indirect_glVertexAttrib4bvARB(GLuint index, const GLbyte * v);
extern HIDDEN void __indirect_glVertexAttrib4ivARB(GLuint index, const GLint * v);
extern HIDDEN void __indirect_glVertexAttrib4ubvARB(GLuint index, const GLubyte * v);
extern HIDDEN void __indirect_glVertexAttrib4usvARB(GLuint index, const GLushort * v);
extern HIDDEN void __indirect_glVertexAttrib4uivARB(GLuint index, const GLuint * v);
extern HIDDEN void __indirect_glVertexAttrib4NbvARB(GLuint index, const GLbyte * v);
extern HIDDEN void __indirect_glVertexAttrib4NsvARB(GLuint index, const GLshort * v);
extern HIDDEN void __indirect_glVertexAttrib4NivARB(GLuint index, const GLint * v);
extern HIDDEN void __indirect_glVertexAttrib4NusvARB(GLuint index, const GLushort * v);
extern HIDDEN void __indirect_glVertexAttrib4NuivARB(GLuint index, const GLuint * v);
extern HIDDEN void __indirect_glVertexAttrib4usvARB(GLuint index, const GLushort * v);
extern HIDDEN void __indirect_glVertexAttribPointerARB(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer);
extern HIDDEN void __indirect_glEnableVertexAttribArrayARB(GLuint index);
extern HIDDEN void __indirect_glDisableVertexAttribArrayARB(GLuint index);
extern HIDDEN void __indirect_glProgramStringARB(GLenum target, GLenum format, GLsizei len, const GLvoid * string);
extern HIDDEN void __indirect_glProgramEnvParameter4dARB(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
extern HIDDEN void __indirect_glProgramEnvParameter4dvARB(GLenum target, GLuint index, const GLdouble * params);
extern HIDDEN void __indirect_glProgramEnvParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
extern HIDDEN void __indirect_glProgramEnvParameter4fvARB(GLenum target, GLuint index, const GLfloat * params);
extern HIDDEN void __indirect_glProgramLocalParameter4dARB(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
extern HIDDEN void __indirect_glProgramLocalParameter4dvARB(GLenum target, GLuint index, const GLdouble * params);
extern HIDDEN void __indirect_glProgramLocalParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
extern HIDDEN void __indirect_glProgramLocalParameter4fvARB(GLenum target, GLuint index, const GLfloat * params);
extern HIDDEN void __indirect_glGetProgramEnvParameterdvARB(GLenum target, GLuint index, GLdouble * params);
extern HIDDEN void __indirect_glGetProgramEnvParameterfvARB(GLenum target, GLuint index, GLfloat * params);
extern HIDDEN void __indirect_glGetProgramLocalParameterdvARB(GLenum target, GLuint index, GLdouble * params);
extern HIDDEN void __indirect_glGetProgramLocalParameterfvARB(GLenum target, GLuint index, GLfloat * params);
extern HIDDEN void __indirect_glGetProgramivARB(GLenum target, GLenum pname, GLint * params);
extern HIDDEN void __indirect_glGetProgramStringARB(GLenum target, GLenum pname, GLvoid * string);
extern HIDDEN void __indirect_glProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
extern HIDDEN void __indirect_glProgramNamedParameter4dNV(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
extern HIDDEN void __indirect_glProgramNamedParameter4fvNV(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v);
extern HIDDEN void __indirect_glProgramNamedParameter4dvNV(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v);
extern HIDDEN void __indirect_glGetProgramNamedParameterfvNV(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params);
extern HIDDEN void __indirect_glGetProgramNamedParameterdvNV(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params);
extern HIDDEN void __indirect_glGenQueriesARB(GLsizei n, GLuint * ids);
extern HIDDEN void __indirect_glDeleteQueriesARB(GLsizei n, const GLuint * ids);
extern HIDDEN GLboolean __indirect_glIsQueryARB(GLuint id);
extern HIDDEN void __indirect_glBeginQueryARB(GLenum target, GLuint id);
extern HIDDEN void __indirect_glDeleteQueriesARB(GLsizei n, const GLuint * ids);
extern HIDDEN void __indirect_glEndQueryARB(GLenum target);
extern HIDDEN void __indirect_glGetQueryivARB(GLenum target, GLenum pname, GLint * params);
extern HIDDEN void __indirect_glGenQueriesARB(GLsizei n, GLuint * ids);
extern HIDDEN void __indirect_glGetQueryObjectivARB(GLuint id, GLenum pname, GLint * params);
extern HIDDEN void __indirect_glGetQueryObjectuivARB(GLuint id, GLenum pname, GLuint * params);
extern HIDDEN void __indirect_glGetQueryivARB(GLenum target, GLenum pname, GLint * params);
extern HIDDEN GLboolean __indirect_glIsQueryARB(GLuint id);
extern HIDDEN void __indirect_glDrawBuffersARB(GLsizei n, const GLenum * bufs);
extern HIDDEN void __indirect_glGetColorTableParameterfvSGI(GLenum target, GLenum pname, GLfloat * params);
extern HIDDEN void __indirect_glGetColorTableParameterivSGI(GLenum target, GLenum pname, GLint * params);
extern HIDDEN void __indirect_glGetColorTableSGI(GLenum target, GLenum format, GLenum type, GLvoid * table);
extern HIDDEN GLboolean __indirect_glAreTexturesResidentEXT(GLsizei n, const GLuint * textures, GLboolean * residences);
extern HIDDEN void __indirect_glGenTexturesEXT(GLsizei n, GLuint * textures);
extern HIDDEN GLboolean __indirect_glIsTextureEXT(GLuint texture);
extern HIDDEN void __indirect_glSampleMaskSGIS(GLclampf value, GLboolean invert);
extern HIDDEN void __indirect_glSamplePatternSGIS(GLenum pattern);
extern HIDDEN void __indirect_glColorPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer);
extern HIDDEN void __indirect_glEdgeFlagPointerEXT(GLsizei stride, GLsizei count, const GLboolean * pointer);
extern HIDDEN void __indirect_glIndexPointerEXT(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer);
extern HIDDEN void __indirect_glNormalPointerEXT(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer);
extern HIDDEN void __indirect_glTexCoordPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer);
extern HIDDEN void __indirect_glVertexPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer);
extern HIDDEN void __indirect_glPointParameterfEXT(GLenum pname, GLfloat param);
extern HIDDEN void __indirect_glPointParameterfvEXT(GLenum pname, const GLfloat * params);
extern HIDDEN void __indirect_glSecondaryColor3bEXT(GLbyte red, GLbyte green, GLbyte blue);
extern HIDDEN void __indirect_glSecondaryColor3bvEXT(const GLbyte * v);
extern HIDDEN void __indirect_glSecondaryColor3dEXT(GLdouble red, GLdouble green, GLdouble blue);
extern HIDDEN void __indirect_glSecondaryColor3dvEXT(const GLdouble * v);
extern HIDDEN void __indirect_glSecondaryColor3fEXT(GLfloat red, GLfloat green, GLfloat blue);
extern HIDDEN void __indirect_glSecondaryColor3fvEXT(const GLfloat * v);
extern HIDDEN void __indirect_glSecondaryColor3iEXT(GLint red, GLint green, GLint blue);
extern HIDDEN void __indirect_glSecondaryColor3ivEXT(const GLint * v);
extern HIDDEN void __indirect_glSecondaryColor3sEXT(GLshort red, GLshort green, GLshort blue);
extern HIDDEN void __indirect_glSecondaryColor3svEXT(const GLshort * v);
extern HIDDEN void __indirect_glSecondaryColor3ubEXT(GLubyte red, GLubyte green, GLubyte blue);
extern HIDDEN void __indirect_glSecondaryColor3ubvEXT(const GLubyte * v);
extern HIDDEN void __indirect_glSecondaryColor3uiEXT(GLuint red, GLuint green, GLuint blue);
extern HIDDEN void __indirect_glSecondaryColor3uivEXT(const GLuint * v);
extern HIDDEN void __indirect_glSecondaryColor3usEXT(GLushort red, GLushort green, GLushort blue);
extern HIDDEN void __indirect_glSecondaryColor3usvEXT(const GLushort * v);
extern HIDDEN void __indirect_glSecondaryColorPointerEXT(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer);
extern HIDDEN void __indirect_glMultiDrawArraysEXT(GLenum mode, GLint * first, GLsizei * count, GLsizei primcount);
extern HIDDEN void __indirect_glMultiDrawElementsEXT(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount);
extern HIDDEN void __indirect_glFogCoordPointerEXT(GLenum type, GLsizei stride, const GLvoid * pointer);
extern HIDDEN void __indirect_glFogCoorddEXT(GLdouble coord);
extern HIDDEN void __indirect_glFogCoorddvEXT(const GLdouble * coord);
extern HIDDEN void __indirect_glFogCoordfEXT(GLfloat coord);
extern HIDDEN void __indirect_glFogCoordfvEXT(const GLfloat * coord);
extern HIDDEN void __indirect_glBlendFuncSeparateEXT(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
extern HIDDEN void __indirect_glWindowPos2dMESA(GLdouble x, GLdouble y);
extern HIDDEN void __indirect_glWindowPos2dvMESA(const GLdouble * v);
extern HIDDEN void __indirect_glWindowPos2fMESA(GLfloat x, GLfloat y);
extern HIDDEN void __indirect_glWindowPos2fvMESA(const GLfloat * v);
extern HIDDEN void __indirect_glWindowPos2iMESA(GLint x, GLint y);
extern HIDDEN void __indirect_glWindowPos2ivMESA(const GLint * v);
extern HIDDEN void __indirect_glWindowPos2sMESA(GLshort x, GLshort y);
extern HIDDEN void __indirect_glWindowPos2svMESA(const GLshort * v);
extern HIDDEN void __indirect_glWindowPos3dMESA(GLdouble x, GLdouble y, GLdouble z);
extern HIDDEN void __indirect_glWindowPos3dvMESA(const GLdouble * v);
extern HIDDEN void __indirect_glWindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z);
extern HIDDEN void __indirect_glWindowPos3fvMESA(const GLfloat * v);
extern HIDDEN void __indirect_glWindowPos3iMESA(GLint x, GLint y, GLint z);
extern HIDDEN void __indirect_glWindowPos3ivMESA(const GLint * v);
extern HIDDEN void __indirect_glWindowPos3sMESA(GLshort x, GLshort y, GLshort z);
extern HIDDEN void __indirect_glWindowPos3svMESA(const GLshort * v);
extern HIDDEN GLboolean __indirect_glAreProgramsResidentNV(GLsizei n, const GLuint * ids, GLboolean * residences);
extern HIDDEN void __indirect_glBindProgramNV(GLenum target, GLuint program);
extern HIDDEN void __indirect_glDeleteProgramsNV(GLsizei n, const GLuint * programs);
extern HIDDEN void __indirect_glExecuteProgramNV(GLenum target, GLuint id, const GLfloat * params);
extern HIDDEN void __indirect_glGenProgramsNV(GLsizei n, GLuint * programs);
extern HIDDEN void __indirect_glGetProgramParameterdvNV(GLenum target, GLuint index, GLenum pname, GLdouble * params);
extern HIDDEN void __indirect_glGetProgramParameterfvNV(GLenum target, GLuint index, GLenum pname, GLfloat * params);
extern HIDDEN void __indirect_glGetProgramStringNV(GLuint id, GLenum pname, GLubyte * program);
extern HIDDEN void __indirect_glGetProgramivNV(GLuint id, GLenum pname, GLint * params);
extern HIDDEN void __indirect_glGetTrackMatrixivNV(GLenum target, GLuint address, GLenum pname, GLint * params);
extern HIDDEN void __indirect_glGetVertexAttribPointervNV(GLuint index, GLenum pname, GLvoid ** params);
extern HIDDEN void __indirect_glGetVertexAttribdvNV(GLuint index, GLenum pname, GLdouble * params);
extern HIDDEN void __indirect_glGetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat * params);
extern HIDDEN void __indirect_glGetVertexAttribivNV(GLuint index, GLenum pname, GLint * params);
extern HIDDEN GLboolean __indirect_glIsProgramNV(GLuint program);
extern HIDDEN void __indirect_glLoadProgramNV(GLenum target, GLuint id, GLsizei len, const GLubyte * program);
extern HIDDEN void __indirect_glProgramParameter4dNV(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
extern HIDDEN void __indirect_glProgramParameter4dvNV(GLenum target, GLuint index, const GLdouble * params);
extern HIDDEN void __indirect_glProgramParameter4fNV(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
extern HIDDEN void __indirect_glProgramParameter4fvNV(GLenum target, GLuint index, const GLfloat * params);
extern HIDDEN void __indirect_glProgramParameters4dvNV(GLenum target, GLuint index, GLuint num, const GLdouble * params);
extern HIDDEN void __indirect_glProgramParameters4fvNV(GLenum target, GLuint index, GLuint num, const GLfloat * params);
extern HIDDEN void __indirect_glRequestResidentProgramsNV(GLsizei n, const GLuint * ids);
extern HIDDEN void __indirect_glTrackMatrixNV(GLenum target, GLuint address, GLenum matrix, GLenum transform);
extern HIDDEN void __indirect_glVertexAttrib1dNV(GLuint index, GLdouble x);
extern HIDDEN void __indirect_glVertexAttrib1dvNV(GLuint index, const GLdouble * v);
extern HIDDEN void __indirect_glVertexAttrib1fNV(GLuint index, GLfloat x);
@@ -682,23 +662,47 @@ extern HIDDEN void __indirect_glVertexAttrib4sNV(GLuint index, GLshort x, GLshor
extern HIDDEN void __indirect_glVertexAttrib4svNV(GLuint index, const GLshort * v);
extern HIDDEN void __indirect_glVertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
extern HIDDEN void __indirect_glVertexAttrib4ubvNV(GLuint index, const GLubyte * v);
extern HIDDEN GLboolean __indirect_glIsRenderbufferEXT(GLuint renderbuffer);
extern HIDDEN void __indirect_glBindRenderbufferEXT(GLenum target, GLuint renderbuffer);
extern HIDDEN void __indirect_glDeleteRenderbuffersEXT(GLsizei n, const GLuint * renderbuffers);
extern HIDDEN void __indirect_glGenRenderbuffersEXT(GLsizei n, GLuint * renderbuffers);
extern HIDDEN void __indirect_glRenderbufferStorageEXT(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
extern HIDDEN void __indirect_glGetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint * params);
extern HIDDEN GLboolean __indirect_glIsFramebufferEXT(GLuint framebuffer);
extern HIDDEN void __indirect_glVertexAttribPointerNV(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer);
extern HIDDEN void __indirect_glVertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble * v);
extern HIDDEN void __indirect_glVertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat * v);
extern HIDDEN void __indirect_glVertexAttribs1svNV(GLuint index, GLsizei n, const GLshort * v);
extern HIDDEN void __indirect_glVertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble * v);
extern HIDDEN void __indirect_glVertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat * v);
extern HIDDEN void __indirect_glVertexAttribs2svNV(GLuint index, GLsizei n, const GLshort * v);
extern HIDDEN void __indirect_glVertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble * v);
extern HIDDEN void __indirect_glVertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat * v);
extern HIDDEN void __indirect_glVertexAttribs3svNV(GLuint index, GLsizei n, const GLshort * v);
extern HIDDEN void __indirect_glVertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble * v);
extern HIDDEN void __indirect_glVertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat * v);
extern HIDDEN void __indirect_glVertexAttribs4svNV(GLuint index, GLsizei n, const GLshort * v);
extern HIDDEN void __indirect_glVertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte * v);
extern HIDDEN void __indirect_glPointParameteriNV(GLenum pname, GLint param);
extern HIDDEN void __indirect_glPointParameterivNV(GLenum pname, const GLint * params);
extern HIDDEN void __indirect_glActiveStencilFaceEXT(GLenum face);
extern HIDDEN void __indirect_glGetProgramNamedParameterdvNV(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params);
extern HIDDEN void __indirect_glGetProgramNamedParameterfvNV(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params);
extern HIDDEN void __indirect_glProgramNamedParameter4dNV(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
extern HIDDEN void __indirect_glProgramNamedParameter4dvNV(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v);
extern HIDDEN void __indirect_glProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
extern HIDDEN void __indirect_glProgramNamedParameter4fvNV(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v);
extern HIDDEN void __indirect_glBlendEquationSeparateEXT(GLenum modeRGB, GLenum modeA);
extern HIDDEN void __indirect_glBindFramebufferEXT(GLenum target, GLuint framebuffer);
extern HIDDEN void __indirect_glDeleteFramebuffersEXT(GLsizei n, const GLuint * framebuffers);
extern HIDDEN void __indirect_glGenFramebuffersEXT(GLsizei n, GLuint * framebuffers);
extern HIDDEN void __indirect_glBindRenderbufferEXT(GLenum target, GLuint renderbuffer);
extern HIDDEN GLenum __indirect_glCheckFramebufferStatusEXT(GLenum target);
extern HIDDEN void __indirect_glDeleteFramebuffersEXT(GLsizei n, const GLuint * framebuffers);
extern HIDDEN void __indirect_glDeleteRenderbuffersEXT(GLsizei n, const GLuint * renderbuffers);
extern HIDDEN void __indirect_glFramebufferRenderbufferEXT(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
extern HIDDEN void __indirect_glFramebufferTexture1DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
extern HIDDEN void __indirect_glFramebufferTexture2DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
extern HIDDEN void __indirect_glFramebufferTexture3DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
extern HIDDEN void __indirect_glFramebufferRenderbufferEXT(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
extern HIDDEN void __indirect_glGetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment, GLenum pname, GLint * params);
extern HIDDEN void __indirect_glGenFramebuffersEXT(GLsizei n, GLuint * framebuffers);
extern HIDDEN void __indirect_glGenRenderbuffersEXT(GLsizei n, GLuint * renderbuffers);
extern HIDDEN void __indirect_glGenerateMipmapEXT(GLenum target);
extern HIDDEN void __indirect_glGetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment, GLenum pname, GLint * params);
extern HIDDEN void __indirect_glGetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint * params);
extern HIDDEN GLboolean __indirect_glIsFramebufferEXT(GLuint framebuffer);
extern HIDDEN GLboolean __indirect_glIsRenderbufferEXT(GLuint renderbuffer);
extern HIDDEN void __indirect_glRenderbufferStorageEXT(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
# undef HIDDEN
# undef FASTCALL

View File

@@ -494,10 +494,10 @@ __GLapi * __glXNewIndirectAPI( void )
/* 3. GL_ARB_transpose_matrix */
glAPI->LoadTransposeMatrixfARB = __indirect_glLoadTransposeMatrixfARB;
glAPI->LoadTransposeMatrixdARB = __indirect_glLoadTransposeMatrixdARB;
glAPI->MultTransposeMatrixfARB = __indirect_glMultTransposeMatrixfARB;
glAPI->LoadTransposeMatrixfARB = __indirect_glLoadTransposeMatrixfARB;
glAPI->MultTransposeMatrixdARB = __indirect_glMultTransposeMatrixdARB;
glAPI->MultTransposeMatrixfARB = __indirect_glMultTransposeMatrixfARB;
/* 5. GL_ARB_multisample */
@@ -505,30 +505,27 @@ __GLapi * __glXNewIndirectAPI( void )
/* 12. GL_ARB_texture_compression */
glAPI->CompressedTexImage3DARB = __indirect_glCompressedTexImage3DARB;
glAPI->CompressedTexImage2DARB = __indirect_glCompressedTexImage2DARB;
glAPI->CompressedTexImage1DARB = __indirect_glCompressedTexImage1DARB;
glAPI->CompressedTexSubImage3DARB = __indirect_glCompressedTexSubImage3DARB;
glAPI->CompressedTexSubImage2DARB = __indirect_glCompressedTexSubImage2DARB;
glAPI->CompressedTexImage2DARB = __indirect_glCompressedTexImage2DARB;
glAPI->CompressedTexImage3DARB = __indirect_glCompressedTexImage3DARB;
glAPI->CompressedTexSubImage1DARB = __indirect_glCompressedTexSubImage1DARB;
glAPI->CompressedTexSubImage2DARB = __indirect_glCompressedTexSubImage2DARB;
glAPI->CompressedTexSubImage3DARB = __indirect_glCompressedTexSubImage3DARB;
glAPI->GetCompressedTexImageARB = __indirect_glGetCompressedTexImageARB;
/* 26. GL_ARB_vertex_program */
glAPI->VertexAttrib4bvARB = __indirect_glVertexAttrib4bvARB;
glAPI->VertexAttrib4ivARB = __indirect_glVertexAttrib4ivARB;
glAPI->VertexAttrib4ubvARB = __indirect_glVertexAttrib4ubvARB;
glAPI->VertexAttrib4usvARB = __indirect_glVertexAttrib4usvARB;
glAPI->VertexAttrib4uivARB = __indirect_glVertexAttrib4uivARB;
glAPI->VertexAttrib4NbvARB = __indirect_glVertexAttrib4NbvARB;
glAPI->VertexAttrib4NsvARB = __indirect_glVertexAttrib4NsvARB;
glAPI->VertexAttrib4NivARB = __indirect_glVertexAttrib4NivARB;
glAPI->VertexAttrib4NusvARB = __indirect_glVertexAttrib4NusvARB;
glAPI->VertexAttrib4NuivARB = __indirect_glVertexAttrib4NuivARB;
glAPI->VertexAttribPointerARB = __indirect_glVertexAttribPointerARB;
glAPI->EnableVertexAttribArrayARB = __indirect_glEnableVertexAttribArrayARB;
glAPI->DisableVertexAttribArrayARB = __indirect_glDisableVertexAttribArrayARB;
glAPI->ProgramStringARB = __indirect_glProgramStringARB;
glAPI->EnableVertexAttribArrayARB = __indirect_glEnableVertexAttribArrayARB;
glAPI->GetProgramEnvParameterdvARB = __indirect_glGetProgramEnvParameterdvARB;
glAPI->GetProgramEnvParameterfvARB = __indirect_glGetProgramEnvParameterfvARB;
glAPI->GetProgramLocalParameterdvARB = __indirect_glGetProgramLocalParameterdvARB;
glAPI->GetProgramLocalParameterfvARB = __indirect_glGetProgramLocalParameterfvARB;
glAPI->GetProgramStringARB = __indirect_glGetProgramStringARB;
glAPI->GetProgramivARB = __indirect_glGetProgramivARB;
glAPI->GetVertexAttribdvARB = __indirect_glGetVertexAttribdvARB;
glAPI->GetVertexAttribfvARB = __indirect_glGetVertexAttribfvARB;
glAPI->GetVertexAttribivARB = __indirect_glGetVertexAttribivARB;
glAPI->ProgramEnvParameter4dARB = __indirect_glProgramEnvParameter4dARB;
glAPI->ProgramEnvParameter4dvARB = __indirect_glProgramEnvParameter4dvARB;
glAPI->ProgramEnvParameter4fARB = __indirect_glProgramEnvParameter4fARB;
@@ -537,15 +534,7 @@ __GLapi * __glXNewIndirectAPI( void )
glAPI->ProgramLocalParameter4dvARB = __indirect_glProgramLocalParameter4dvARB;
glAPI->ProgramLocalParameter4fARB = __indirect_glProgramLocalParameter4fARB;
glAPI->ProgramLocalParameter4fvARB = __indirect_glProgramLocalParameter4fvARB;
glAPI->GetProgramEnvParameterdvARB = __indirect_glGetProgramEnvParameterdvARB;
glAPI->GetProgramEnvParameterfvARB = __indirect_glGetProgramEnvParameterfvARB;
glAPI->GetProgramLocalParameterdvARB = __indirect_glGetProgramLocalParameterdvARB;
glAPI->GetProgramLocalParameterfvARB = __indirect_glGetProgramLocalParameterfvARB;
glAPI->GetProgramivARB = __indirect_glGetProgramivARB;
glAPI->GetProgramStringARB = __indirect_glGetProgramStringARB;
glAPI->GetVertexAttribdvARB = __indirect_glGetVertexAttribdvARB;
glAPI->GetVertexAttribfvARB = __indirect_glGetVertexAttribfvARB;
glAPI->GetVertexAttribivARB = __indirect_glGetVertexAttribivARB;
glAPI->ProgramStringARB = __indirect_glProgramStringARB;
glAPI->VertexAttrib1dARB = __indirect_glVertexAttrib1dARB;
glAPI->VertexAttrib1dvARB = __indirect_glVertexAttrib1dvARB;
glAPI->VertexAttrib1fARB = __indirect_glVertexAttrib1fARB;
@@ -564,35 +553,52 @@ __GLapi * __glXNewIndirectAPI( void )
glAPI->VertexAttrib3fvARB = __indirect_glVertexAttrib3fvARB;
glAPI->VertexAttrib3sARB = __indirect_glVertexAttrib3sARB;
glAPI->VertexAttrib3svARB = __indirect_glVertexAttrib3svARB;
glAPI->VertexAttrib4NbvARB = __indirect_glVertexAttrib4NbvARB;
glAPI->VertexAttrib4NivARB = __indirect_glVertexAttrib4NivARB;
glAPI->VertexAttrib4NsvARB = __indirect_glVertexAttrib4NsvARB;
glAPI->VertexAttrib4NubARB = __indirect_glVertexAttrib4NubARB;
glAPI->VertexAttrib4NubvARB = __indirect_glVertexAttrib4NubvARB;
glAPI->VertexAttrib4NuivARB = __indirect_glVertexAttrib4NuivARB;
glAPI->VertexAttrib4NusvARB = __indirect_glVertexAttrib4NusvARB;
glAPI->VertexAttrib4bvARB = __indirect_glVertexAttrib4bvARB;
glAPI->VertexAttrib4dARB = __indirect_glVertexAttrib4dARB;
glAPI->VertexAttrib4dvARB = __indirect_glVertexAttrib4dvARB;
glAPI->VertexAttrib4fARB = __indirect_glVertexAttrib4fARB;
glAPI->VertexAttrib4fvARB = __indirect_glVertexAttrib4fvARB;
glAPI->VertexAttrib4ivARB = __indirect_glVertexAttrib4ivARB;
glAPI->VertexAttrib4sARB = __indirect_glVertexAttrib4sARB;
glAPI->VertexAttrib4svARB = __indirect_glVertexAttrib4svARB;
glAPI->VertexAttrib4NubARB = __indirect_glVertexAttrib4NubARB;
glAPI->VertexAttrib4NubvARB = __indirect_glVertexAttrib4NubvARB;
glAPI->VertexAttrib4ubvARB = __indirect_glVertexAttrib4ubvARB;
glAPI->VertexAttrib4uivARB = __indirect_glVertexAttrib4uivARB;
glAPI->VertexAttrib4usvARB = __indirect_glVertexAttrib4usvARB;
glAPI->VertexAttribPointerARB = __indirect_glVertexAttribPointerARB;
/* 29. GL_ARB_occlusion_query */
glAPI->BeginQueryARB = __indirect_glBeginQueryARB;
glAPI->DeleteQueriesARB = __indirect_glDeleteQueriesARB;
glAPI->EndQueryARB = __indirect_glEndQueryARB;
glAPI->GetQueryivARB = __indirect_glGetQueryivARB;
glAPI->GenQueriesARB = __indirect_glGenQueriesARB;
glAPI->GetQueryObjectivARB = __indirect_glGetQueryObjectivARB;
glAPI->GetQueryObjectuivARB = __indirect_glGetQueryObjectuivARB;
glAPI->GenQueriesARB = __indirect_glGenQueriesARB;
glAPI->DeleteQueriesARB = __indirect_glDeleteQueriesARB;
glAPI->GetQueryivARB = __indirect_glGetQueryivARB;
glAPI->IsQueryARB = __indirect_glIsQueryARB;
glAPI->BeginQueryARB = __indirect_glBeginQueryARB;
/* 37. GL_ARB_draw_buffers */
glAPI->DrawBuffersARB = __indirect_glDrawBuffersARB;
/* 14. GL_SGI_color_table */
glAPI->GetColorTableParameterfvSGI = __indirect_glGetColorTableParameterfvSGI;
glAPI->GetColorTableParameterivSGI = __indirect_glGetColorTableParameterivSGI;
glAPI->GetColorTableSGI = __indirect_glGetColorTableSGI;
/* 20. GL_EXT_texture_object */
glAPI->AreTexturesResidentEXT = __indirect_glAreTexturesResidentEXT;
glAPI->GenTexturesEXT = __indirect_glGenTexturesEXT;
glAPI->IsTextureEXT = __indirect_glIsTextureEXT;
glAPI->AreTexturesResidentEXT = __indirect_glAreTexturesResidentEXT;
/* 25. GL_SGIS_multisample */
@@ -615,8 +621,6 @@ __GLapi * __glXNewIndirectAPI( void )
/* 145. GL_EXT_secondary_color */
glAPI->SecondaryColor3usvEXT = __indirect_glSecondaryColor3usvEXT;
glAPI->SecondaryColorPointerEXT = __indirect_glSecondaryColorPointerEXT;
glAPI->SecondaryColor3bEXT = __indirect_glSecondaryColor3bEXT;
glAPI->SecondaryColor3bvEXT = __indirect_glSecondaryColor3bvEXT;
glAPI->SecondaryColor3dEXT = __indirect_glSecondaryColor3dEXT;
@@ -632,6 +636,8 @@ __GLapi * __glXNewIndirectAPI( void )
glAPI->SecondaryColor3uiEXT = __indirect_glSecondaryColor3uiEXT;
glAPI->SecondaryColor3uivEXT = __indirect_glSecondaryColor3uivEXT;
glAPI->SecondaryColor3usEXT = __indirect_glSecondaryColor3usEXT;
glAPI->SecondaryColor3usvEXT = __indirect_glSecondaryColor3usvEXT;
glAPI->SecondaryColorPointerEXT = __indirect_glSecondaryColorPointerEXT;
/* 148. GL_EXT_multi_draw_arrays */
@@ -640,11 +646,11 @@ __GLapi * __glXNewIndirectAPI( void )
/* 149. GL_EXT_fog_coord */
glAPI->FogCoorddvEXT = __indirect_glFogCoorddvEXT;
glAPI->FogCoordfEXT = __indirect_glFogCoordfEXT;
glAPI->FogCoordfvEXT = __indirect_glFogCoordfvEXT;
glAPI->FogCoorddEXT = __indirect_glFogCoorddEXT;
glAPI->FogCoorddvEXT = __indirect_glFogCoorddvEXT;
glAPI->FogCoordPointerEXT = __indirect_glFogCoordPointerEXT;
glAPI->FogCoorddEXT = __indirect_glFogCoorddEXT;
/* 173. GL_EXT_blend_func_separate */
@@ -671,27 +677,6 @@ __GLapi * __glXNewIndirectAPI( void )
/* 233. GL_NV_vertex_program */
glAPI->VertexAttribs4svNV = __indirect_glVertexAttribs4svNV;
glAPI->VertexAttribs4ubvNV = __indirect_glVertexAttribs4ubvNV;
glAPI->VertexAttrib3fNV = __indirect_glVertexAttrib3fNV;
glAPI->VertexAttrib3fvNV = __indirect_glVertexAttrib3fvNV;
glAPI->VertexAttrib3sNV = __indirect_glVertexAttrib3sNV;
glAPI->VertexAttrib3svNV = __indirect_glVertexAttrib3svNV;
glAPI->VertexAttrib4dNV = __indirect_glVertexAttrib4dNV;
glAPI->VertexAttrib3dvNV = __indirect_glVertexAttrib3dvNV;
glAPI->VertexAttrib4fNV = __indirect_glVertexAttrib4fNV;
glAPI->VertexAttrib4fvNV = __indirect_glVertexAttrib4fvNV;
glAPI->VertexAttrib4sNV = __indirect_glVertexAttrib4sNV;
glAPI->VertexAttrib4svNV = __indirect_glVertexAttrib4svNV;
glAPI->VertexAttrib4ubNV = __indirect_glVertexAttrib4ubNV;
glAPI->VertexAttrib4ubvNV = __indirect_glVertexAttrib4ubvNV;
glAPI->VertexAttrib1fvNV = __indirect_glVertexAttrib1fvNV;
glAPI->VertexAttrib3dNV = __indirect_glVertexAttrib3dNV;
glAPI->VertexAttrib4dvNV = __indirect_glVertexAttrib4dvNV;
glAPI->VertexAttrib1sNV = __indirect_glVertexAttrib1sNV;
glAPI->VertexAttrib1fNV = __indirect_glVertexAttrib1fNV;
glAPI->VertexAttrib1svNV = __indirect_glVertexAttrib1svNV;
glAPI->VertexAttrib1dvNV = __indirect_glVertexAttrib1dvNV;
glAPI->AreProgramsResidentNV = __indirect_glAreProgramsResidentNV;
glAPI->BindProgramNV = __indirect_glBindProgramNV;
glAPI->DeleteProgramsNV = __indirect_glDeleteProgramsNV;
@@ -699,10 +684,13 @@ __GLapi * __glXNewIndirectAPI( void )
glAPI->GenProgramsNV = __indirect_glGenProgramsNV;
glAPI->GetProgramParameterdvNV = __indirect_glGetProgramParameterdvNV;
glAPI->GetProgramParameterfvNV = __indirect_glGetProgramParameterfvNV;
glAPI->GetProgramivNV = __indirect_glGetProgramivNV;
glAPI->GetProgramStringNV = __indirect_glGetProgramStringNV;
glAPI->GetProgramivNV = __indirect_glGetProgramivNV;
glAPI->GetTrackMatrixivNV = __indirect_glGetTrackMatrixivNV;
glAPI->GetVertexAttribPointervNV = __indirect_glGetVertexAttribPointervNV;
glAPI->GetVertexAttribdvNV = __indirect_glGetVertexAttribdvNV;
glAPI->GetVertexAttribfvNV = __indirect_glGetVertexAttribfvNV;
glAPI->GetVertexAttribivNV = __indirect_glGetVertexAttribivNV;
glAPI->IsProgramNV = __indirect_glIsProgramNV;
glAPI->LoadProgramNV = __indirect_glLoadProgramNV;
glAPI->ProgramParameter4dNV = __indirect_glProgramParameter4dNV;
@@ -713,17 +701,33 @@ __GLapi * __glXNewIndirectAPI( void )
glAPI->ProgramParameters4fvNV = __indirect_glProgramParameters4fvNV;
glAPI->RequestResidentProgramsNV = __indirect_glRequestResidentProgramsNV;
glAPI->TrackMatrixNV = __indirect_glTrackMatrixNV;
glAPI->VertexAttribPointerNV = __indirect_glVertexAttribPointerNV;
glAPI->VertexAttrib1dNV = __indirect_glVertexAttrib1dNV;
glAPI->VertexAttrib1dvNV = __indirect_glVertexAttrib1dvNV;
glAPI->VertexAttrib1fNV = __indirect_glVertexAttrib1fNV;
glAPI->VertexAttrib1fvNV = __indirect_glVertexAttrib1fvNV;
glAPI->VertexAttrib1sNV = __indirect_glVertexAttrib1sNV;
glAPI->VertexAttrib1svNV = __indirect_glVertexAttrib1svNV;
glAPI->VertexAttrib2dNV = __indirect_glVertexAttrib2dNV;
glAPI->VertexAttrib2sNV = __indirect_glVertexAttrib2sNV;
glAPI->VertexAttrib2dvNV = __indirect_glVertexAttrib2dvNV;
glAPI->VertexAttrib2fNV = __indirect_glVertexAttrib2fNV;
glAPI->VertexAttrib2svNV = __indirect_glVertexAttrib2svNV;
glAPI->VertexAttrib2fvNV = __indirect_glVertexAttrib2fvNV;
glAPI->GetVertexAttribdvNV = __indirect_glGetVertexAttribdvNV;
glAPI->GetVertexAttribfvNV = __indirect_glGetVertexAttribfvNV;
glAPI->GetVertexAttribivNV = __indirect_glGetVertexAttribivNV;
glAPI->VertexAttrib1dNV = __indirect_glVertexAttrib1dNV;
glAPI->VertexAttrib2sNV = __indirect_glVertexAttrib2sNV;
glAPI->VertexAttrib2svNV = __indirect_glVertexAttrib2svNV;
glAPI->VertexAttrib3dNV = __indirect_glVertexAttrib3dNV;
glAPI->VertexAttrib3dvNV = __indirect_glVertexAttrib3dvNV;
glAPI->VertexAttrib3fNV = __indirect_glVertexAttrib3fNV;
glAPI->VertexAttrib3fvNV = __indirect_glVertexAttrib3fvNV;
glAPI->VertexAttrib3sNV = __indirect_glVertexAttrib3sNV;
glAPI->VertexAttrib3svNV = __indirect_glVertexAttrib3svNV;
glAPI->VertexAttrib4dNV = __indirect_glVertexAttrib4dNV;
glAPI->VertexAttrib4dvNV = __indirect_glVertexAttrib4dvNV;
glAPI->VertexAttrib4fNV = __indirect_glVertexAttrib4fNV;
glAPI->VertexAttrib4fvNV = __indirect_glVertexAttrib4fvNV;
glAPI->VertexAttrib4sNV = __indirect_glVertexAttrib4sNV;
glAPI->VertexAttrib4svNV = __indirect_glVertexAttrib4svNV;
glAPI->VertexAttrib4ubNV = __indirect_glVertexAttrib4ubNV;
glAPI->VertexAttrib4ubvNV = __indirect_glVertexAttrib4ubvNV;
glAPI->VertexAttribPointerNV = __indirect_glVertexAttribPointerNV;
glAPI->VertexAttribs1dvNV = __indirect_glVertexAttribs1dvNV;
glAPI->VertexAttribs1fvNV = __indirect_glVertexAttribs1fvNV;
glAPI->VertexAttribs1svNV = __indirect_glVertexAttribs1svNV;
@@ -735,6 +739,8 @@ __GLapi * __glXNewIndirectAPI( void )
glAPI->VertexAttribs3svNV = __indirect_glVertexAttribs3svNV;
glAPI->VertexAttribs4dvNV = __indirect_glVertexAttribs4dvNV;
glAPI->VertexAttribs4fvNV = __indirect_glVertexAttribs4fvNV;
glAPI->VertexAttribs4svNV = __indirect_glVertexAttribs4svNV;
glAPI->VertexAttribs4ubvNV = __indirect_glVertexAttribs4ubvNV;
/* 262. GL_NV_point_sprite */
@@ -747,32 +753,36 @@ __GLapi * __glXNewIndirectAPI( void )
/* 282. GL_NV_fragment_program */
glAPI->ProgramNamedParameter4fNV = __indirect_glProgramNamedParameter4fNV;
glAPI->ProgramNamedParameter4dNV = __indirect_glProgramNamedParameter4dNV;
glAPI->ProgramNamedParameter4fvNV = __indirect_glProgramNamedParameter4fvNV;
glAPI->ProgramNamedParameter4dvNV = __indirect_glProgramNamedParameter4dvNV;
glAPI->GetProgramNamedParameterfvNV = __indirect_glGetProgramNamedParameterfvNV;
glAPI->GetProgramNamedParameterdvNV = __indirect_glGetProgramNamedParameterdvNV;
glAPI->GetProgramNamedParameterfvNV = __indirect_glGetProgramNamedParameterfvNV;
glAPI->ProgramNamedParameter4dNV = __indirect_glProgramNamedParameter4dNV;
glAPI->ProgramNamedParameter4dvNV = __indirect_glProgramNamedParameter4dvNV;
glAPI->ProgramNamedParameter4fNV = __indirect_glProgramNamedParameter4fNV;
glAPI->ProgramNamedParameter4fvNV = __indirect_glProgramNamedParameter4fvNV;
/* 299. GL_EXT_blend_equation_separate */
glAPI->BlendEquationSeparateEXT = __indirect_glBlendEquationSeparateEXT;
/* 310. GL_EXT_framebuffer_object */
glAPI->RenderbufferStorageEXT = __indirect_glRenderbufferStorageEXT;
glAPI->GetRenderbufferParameterivEXT = __indirect_glGetRenderbufferParameterivEXT;
glAPI->IsFramebufferEXT = __indirect_glIsFramebufferEXT;
glAPI->BindFramebufferEXT = __indirect_glBindFramebufferEXT;
glAPI->DeleteFramebuffersEXT = __indirect_glDeleteFramebuffersEXT;
glAPI->GenFramebuffersEXT = __indirect_glGenFramebuffersEXT;
glAPI->BindRenderbufferEXT = __indirect_glBindRenderbufferEXT;
glAPI->CheckFramebufferStatusEXT = __indirect_glCheckFramebufferStatusEXT;
glAPI->DeleteFramebuffersEXT = __indirect_glDeleteFramebuffersEXT;
glAPI->DeleteRenderbuffersEXT = __indirect_glDeleteRenderbuffersEXT;
glAPI->FramebufferRenderbufferEXT = __indirect_glFramebufferRenderbufferEXT;
glAPI->FramebufferTexture1DEXT = __indirect_glFramebufferTexture1DEXT;
glAPI->FramebufferTexture2DEXT = __indirect_glFramebufferTexture2DEXT;
glAPI->FramebufferTexture3DEXT = __indirect_glFramebufferTexture3DEXT;
glAPI->FramebufferRenderbufferEXT = __indirect_glFramebufferRenderbufferEXT;
glAPI->GetFramebufferAttachmentParameterivEXT = __indirect_glGetFramebufferAttachmentParameterivEXT;
glAPI->GenerateMipmapEXT = __indirect_glGenerateMipmapEXT;
glAPI->IsRenderbufferEXT = __indirect_glIsRenderbufferEXT;
glAPI->BindRenderbufferEXT = __indirect_glBindRenderbufferEXT;
glAPI->DeleteRenderbuffersEXT = __indirect_glDeleteRenderbuffersEXT;
glAPI->GenFramebuffersEXT = __indirect_glGenFramebuffersEXT;
glAPI->GenRenderbuffersEXT = __indirect_glGenRenderbuffersEXT;
glAPI->GenerateMipmapEXT = __indirect_glGenerateMipmapEXT;
glAPI->GetFramebufferAttachmentParameterivEXT = __indirect_glGetFramebufferAttachmentParameterivEXT;
glAPI->GetRenderbufferParameterivEXT = __indirect_glGetRenderbufferParameterivEXT;
glAPI->IsFramebufferEXT = __indirect_glIsFramebufferEXT;
glAPI->IsRenderbufferEXT = __indirect_glIsRenderbufferEXT;
glAPI->RenderbufferStorageEXT = __indirect_glRenderbufferStorageEXT;
return glAPI;
}

View File

@@ -32,13 +32,14 @@ default:
elif [ "$(DRIVER_DIRS)" = "beos" ]; then \
$(MAKE) beos ; \
elif [ "$(DRIVER_DIRS)" = "directfb" ]; then \
$(MAKE) directfb; \
$(MAKE) directfb ; \
elif [ "$(DRIVER_DIRS)" = "fbdev" ]; then \
$(MAKE) fbdev ; \
else \
$(MAKE) stand-alone ; \
fi
######################################################################
# BeOS driver target
@@ -66,21 +67,31 @@ linux-solo: depend subdirs libmesa.a
libgl-core: $(CORE_OBJECTS)
@ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \
-major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) $(CORE_OBJECTS) $(GL_LIB_DEPS)
-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) $(CORE_OBJECTS) \
$(GL_LIB_DEPS)
directfb: depend subdirs libgl-core
cd drivers/directfb; $(MAKE)
cd drivers/directfb ; $(MAKE)
#####################################################################
# fbdev Mesa driver (libGL.so)
fbdev: $(CORE_OBJECTS) $(FBDEV_DRIVER_OBJECTS) $(COMMON_DRIVER_OBJECTS)
@ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \
-major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
$(CORE_OBJECTS) $(FBDEV_DRIVER_OBJECTS) \
$(COMMON_DRIVER_OBJECTS) $(GL_LIB_DEPS)
######################################################################
# Stand-alone Mesa libGL and libOSMesa
STAND_ALONE_DRIVER_SOURCES = \
$(COMMON_DRIVER_SOURCES) \
$(X11_DRIVER_SOURCES) \
$(GLIDE_DRIVER_SOURCES) \
$(SVGA_DRIVER_SOURCES) \
$(FBDEV_DRIVER_SOURCES)
$(SVGA_DRIVER_SOURCES)
STAND_ALONE_DRIVER_OBJECTS = $(STAND_ALONE_DRIVER_SOURCES:.c=.o)
@@ -127,15 +138,6 @@ $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME): $(OSMESA_DRIVER_OBJECTS) $(OSMESA16_OBJECT
######################################################################
# Generic stuff
ALL_SOURCES = \
$(GLAPI_SOURCES) \
$(SOLO_SOURCES) \
$(X86_SOURCES) \
$(COMMON_DRIVER_SOURCES)\
$(X11_DRIVER_SOURCES) \
$(OSMESA_DRIVER_SOURCES)
depend: $(ALL_SOURCES)
@ echo "running $(MKDEP)"
@ touch depend
@@ -157,7 +159,6 @@ install: default
cd drivers/dri ; $(MAKE) install ; \
fi
## NOT YET:
## $(INSTALL) -d $(INSTALL_DIR)/include/GLES
## $(INSTALL) -m 644 include/GLES/*.h $(INSTALL_DIR)/include/GLES
@@ -176,4 +177,5 @@ clean:
(cd x86 ; $(MAKE) clean)
(cd x86-64 ; $(MAKE) clean)
include depend

File diff suppressed because it is too large Load Diff

View File

@@ -309,15 +309,17 @@ void driInitSingleExtension( GLcontext * ctx,
/* Add each entry-point to the dispatch table.
*/
offset = _glapi_add_dispatch( functions, parameter_signature );
if ( ext->functions[i].remap_index != -1 ) {
driDispatchRemapTable[ ext->functions[i].remap_index ] = offset;
if (offset == -1) {
fprintf(stderr, "DISPATCH ERROR! _glapi_add_dispatch failed "
"to add %s!\n", functions[0]);
}
if ( (ext->functions[i].offset != -1)
&& (ext->functions[i].offset != offset) ) {
fprintf(stderr, "DISPATCH ERROR! %s -> %u != %u\n", functions[0],
driDispatchRemapTable[ ext->functions[i].remap_index ],
ext->functions[i].offset);
else if (ext->functions[i].remap_index != -1) {
driDispatchRemapTable[ ext->functions[i].remap_index ] =
offset;
}
else if (ext->functions[i].offset != offset) {
fprintf(stderr, "DISPATCH ERROR! %s -> %u != %u\n",
functions[0], offset, ext->functions[i].offset);
}
}
}

View File

@@ -93,7 +93,7 @@ GLboolean i830CreateContext( const __GLcontextModes *mesaVis,
* FIXME: packed, but they're not in Intel graphics hardware.
*/
intel->ctx.Const.MaxTextureUnits = I830_TEX_UNITS;
i = driQueryOptioni( &intel->intelScreen->optionCache, "allow_large_textures");
i = driQueryOptioni( &intel->optionCache, "allow_large_textures");
driCalculateMaxTextureLevels( intel->texture_heaps,
intel->nr_heaps,
&intel->ctx.Const,

View File

@@ -39,6 +39,7 @@
#define I830_UPLOAD_CTX 0x1
#define I830_UPLOAD_BUFFERS 0x2
#define I830_UPLOAD_STIPPLE 0x4
#define I830_UPLOAD_INVARIENT 0x8
#define I830_UPLOAD_TEX(i) (0x10<<(i))
#define I830_UPLOAD_TEXBLEND(i) (0x100<<(i))
#define I830_UPLOAD_TEX_ALL (0x0f0)

View File

@@ -40,7 +40,8 @@
/* A large amount of state doesn't need to be uploaded.
*/
#define ACTIVE (I830_UPLOAD_TEXBLEND(0) | \
#define ACTIVE (I830_UPLOAD_INVARIENT | \
I830_UPLOAD_TEXBLEND(0) | \
I830_UPLOAD_STIPPLE | \
I830_UPLOAD_CTX | \
I830_UPLOAD_BUFFERS | \

View File

@@ -264,7 +264,7 @@ static void i830_emit_invarient_state( intelContextPtr intel )
{
BATCH_LOCALS;
BEGIN_BATCH( 200 );
BEGIN_BATCH( 40 );
OUT_BATCH(_3DSTATE_MAP_CUBE | MAP_UNIT(0));
OUT_BATCH(_3DSTATE_MAP_CUBE | MAP_UNIT(1));
@@ -370,6 +370,9 @@ static GLuint get_state_size( struct i830_hw_state *state )
GLuint sz = 0;
GLuint i;
if (dirty & I830_UPLOAD_INVARIENT)
sz += 40 * sizeof(int);
if (dirty & I830_UPLOAD_CTX)
sz += sizeof(state->Ctx);
@@ -408,6 +411,11 @@ static void i830_emit_state( intelContextPtr intel )
counter = intel->batch.counter;
}
if (dirty & I830_UPLOAD_INVARIENT) {
if (VERBOSE) fprintf(stderr, "I830_UPLOAD_INVARIENT:\n");
i830_emit_invarient_state( intel );
}
if (dirty & I830_UPLOAD_CTX) {
if (VERBOSE) fprintf(stderr, "I830_UPLOAD_CTX:\n");
emit( i830, state->Ctx, sizeof(state->Ctx) );
@@ -514,7 +522,6 @@ void i830InitVtbl( i830ContextPtr i830 )
i830->intel.vtbl.clear_with_tris = i830ClearWithTris;
i830->intel.vtbl.rotate_window = i830RotateWindow;
i830->intel.vtbl.destroy = i830_destroy_context;
i830->intel.vtbl.emit_invarient_state = i830_emit_invarient_state;
i830->intel.vtbl.emit_state = i830_emit_state;
i830->intel.vtbl.lost_hardware = i830_lost_hardware;
i830->intel.vtbl.reduced_primitive_state = i830_reduced_primitive_state;

View File

@@ -137,7 +137,7 @@ GLboolean i915CreateContext( const __GLcontextModes *mesaVis,
* hardware.
*/
ctx->Const.MaxTextureUnits = I915_TEX_UNITS;
i = driQueryOptioni( &intel->intelScreen->optionCache, "allow_large_textures");
i = driQueryOptioni( &intel->optionCache, "allow_large_textures");
driCalculateMaxTextureLevels( intel->texture_heaps,
intel->nr_heaps,
&intel->ctx.Const,

View File

@@ -45,6 +45,7 @@
#define I915_UPLOAD_PROGRAM 0x8
#define I915_UPLOAD_CONSTANTS 0x10
#define I915_UPLOAD_FOG 0x20
#define I915_UPLOAD_INVARIENT 0x40
#define I915_UPLOAD_TEX(i) (0x00010000<<(i))
#define I915_UPLOAD_TEX_ALL (0x00ff0000)
#define I915_UPLOAD_TEX_0_SHIFT 16

View File

@@ -41,7 +41,8 @@
/* A large amount of state doesn't need to be uploaded.
*/
#define ACTIVE (I915_UPLOAD_PROGRAM | \
#define ACTIVE (I915_UPLOAD_INVARIENT | \
I915_UPLOAD_PROGRAM | \
I915_UPLOAD_STIPPLE | \
I915_UPLOAD_CTX | \
I915_UPLOAD_BUFFERS | \

View File

@@ -195,29 +195,47 @@ GLuint i915_emit_arith( struct i915_fragment_program *p,
}
GLuint i915_emit_texld( struct i915_fragment_program *p,
GLuint dest,
GLuint destmask,
GLuint sampler,
GLuint coord,
GLuint op )
GLuint dest,
GLuint destmask,
GLuint sampler,
GLuint coord,
GLuint op )
{
assert(GET_UREG_TYPE(dest) != REG_TYPE_CONST);
assert(dest = UREG(GET_UREG_TYPE(dest), GET_UREG_NR(dest)));
if (GET_UREG_TYPE(coord) != REG_TYPE_T) {
p->nr_tex_indirect++;
if (coord != UREG(GET_UREG_TYPE(coord), GET_UREG_NR(coord))) {
/* No real way to work around this in the general case - need to
* allocate and declare a new temporary register (a utemp won't
* do). Will fallback for now.
*/
i915_program_error(p, "Can't (yet) swizzle TEX arguments");
return 0;
}
*(p->csr++) = (op |
T0_DEST( dest ) |
destmask |
T0_SAMPLER( sampler ));
/* Don't worry about saturate as we only support
*/
if (destmask != A0_DEST_CHANNEL_ALL) {
GLuint tmp = i915_get_utemp(p);
i915_emit_texld( p, tmp, A0_DEST_CHANNEL_ALL, sampler, coord, op );
i915_emit_arith( p, A0_MOV, dest, destmask, 0, tmp, 0, 0 );
return dest;
}
else {
assert(GET_UREG_TYPE(dest) != REG_TYPE_CONST);
assert(dest = UREG(GET_UREG_TYPE(dest), GET_UREG_NR(dest)));
*(p->csr++) = T1_ADDRESS_REG( coord );
*(p->csr++) = T2_MBZ;
if (GET_UREG_TYPE(coord) != REG_TYPE_T) {
p->nr_tex_indirect++;
}
p->nr_tex_insn++;
return dest;
*(p->csr++) = (op |
T0_DEST( dest ) |
T0_SAMPLER( sampler ));
*(p->csr++) = T1_ADDRESS_REG( coord );
*(p->csr++) = T2_MBZ;
p->nr_tex_insn++;
return dest;
}
}

View File

@@ -919,9 +919,10 @@ static void i915_init_packets( i915ContextPtr i915 )
* we get hardware contexts working.
*/
i915->state.active = (I915_UPLOAD_PROGRAM |
I915_UPLOAD_STIPPLE |
I915_UPLOAD_CTX |
I915_UPLOAD_BUFFERS);
I915_UPLOAD_STIPPLE |
I915_UPLOAD_CTX |
I915_UPLOAD_BUFFERS |
I915_UPLOAD_INVARIENT);
}
void i915InitStateFunctions( struct dd_function_table *functions )

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