Compare commits
54 Commits
mesa_3_4
...
mesa_3_4_1
Author | SHA1 | Date | |
---|---|---|---|
|
e430f93ea0 | ||
|
bb70b0eaf8 | ||
|
b0f1460f13 | ||
|
08a9355932 | ||
|
e9bd590781 | ||
|
456480981a | ||
|
a241b22aaa | ||
|
e32b1543e8 | ||
|
5a7d5d0808 | ||
|
e3aef4ed72 | ||
|
47759b1d82 | ||
|
0c769dba55 | ||
|
9a1ca37e5b | ||
|
0eedea5083 | ||
|
c3ccae5f49 | ||
|
18074cf055 | ||
|
1929fbde14 | ||
|
7a47ecdf23 | ||
|
0f7e5e8a47 | ||
|
44779d21a3 | ||
|
ae5cc3e94c | ||
|
b15870fe69 | ||
|
5c08f57d87 | ||
|
d6540dbaf2 | ||
|
9e33f91f4b | ||
|
aa2bbcbcd3 | ||
|
ea083a8b59 | ||
|
3b20dc1dd7 | ||
|
5b3b871d79 | ||
|
6b593c0b7a | ||
|
7535dc796a | ||
|
8a341f4d38 | ||
|
8ea17294b8 | ||
|
757e7feb81 | ||
|
76ef5a3993 | ||
|
bae4b31566 | ||
|
e23ea371e6 | ||
|
77743a4e08 | ||
|
7510d9a56e | ||
|
75b470c146 | ||
|
142d00e32f | ||
|
50cccb667e | ||
|
202ddf7a54 | ||
|
3efc845d1b | ||
|
dc203452eb | ||
|
f195052952 | ||
|
adde46e8ee | ||
|
d9ec7b48d9 | ||
|
6fa6c586db | ||
|
ce764717bc | ||
|
c6d4a00ca9 | ||
|
4cdc441b9a | ||
|
17a68017c0 | ||
|
6e9605a00d |
@@ -1,8 +1,8 @@
|
||||
# $Id: Make-config,v 1.25.4.5 2000/11/03 01:58:06 brianp Exp $
|
||||
# $Id: Make-config,v 1.25.4.6 2001/01/24 04:49:27 brianp Exp $
|
||||
|
||||
MESA_MAJOR=3
|
||||
MESA_MINOR=4
|
||||
MESA_TINY=0
|
||||
MESA_TINY=1
|
||||
VERSION=$(MESA_MAJOR).$(MESA_MINOR)
|
||||
|
||||
# Mesa 3-D graphics library
|
||||
|
13
Makefile.X11
13
Makefile.X11
@@ -1,7 +1,7 @@
|
||||
# $Id: Makefile.X11,v 1.32.2.5 2000/10/26 19:35:53 brianp Exp $
|
||||
# $Id: Makefile.X11,v 1.32.2.7 2001/02/07 23:49:26 brianp Exp $
|
||||
|
||||
# Mesa 3-D graphics library
|
||||
# Version: 3.4
|
||||
# Version: 3.4.1
|
||||
#
|
||||
# Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
#
|
||||
@@ -320,10 +320,10 @@ realclean: clean
|
||||
|
||||
|
||||
|
||||
DIRECTORY = Mesa-3.4
|
||||
LIB_NAME = MesaLib-3.4
|
||||
DEMO_NAME = MesaDemos-3.4
|
||||
GLU_NAME = MesaGLU-3.4
|
||||
DIRECTORY = Mesa-3.4.1
|
||||
LIB_NAME = MesaLib-3.4.1
|
||||
DEMO_NAME = MesaDemos-3.4.1
|
||||
GLU_NAME = MesaGLU-3.4.1
|
||||
GLUT_NAME = GLUT-3.7
|
||||
|
||||
|
||||
@@ -472,6 +472,7 @@ LIB_FILES = \
|
||||
$(DIRECTORY)/widgets-mesa/README \
|
||||
$(DIRECTORY)/widgets-mesa/TODO \
|
||||
$(DIRECTORY)/widgets-mesa/configure \
|
||||
$(DIRECTORY)/widgets-mesa/configure.in \
|
||||
$(DIRECTORY)/widgets-mesa/demos/ChangeLog \
|
||||
$(DIRECTORY)/widgets-mesa/demos/Cube \
|
||||
$(DIRECTORY)/widgets-mesa/demos/Ed \
|
||||
|
@@ -1,8 +1,11 @@
|
||||
|
||||
3Dfx Glide device driver for Mesa 3.4
|
||||
3Dfx Glide device driver for Mesa 3.4.1
|
||||
(see below for FAQ)
|
||||
|
||||
|
||||
NOTE: This information is probably somewhat out of date. A rewrite is
|
||||
overdue.
|
||||
|
||||
|
||||
What do you need ?
|
||||
------------------
|
||||
@@ -13,7 +16,7 @@ What do you need ?
|
||||
under Linux (more information in the "Useful Glide Environment
|
||||
Variables");
|
||||
|
||||
- Mesa 3.1;
|
||||
- Mesa 3.4.1;
|
||||
|
||||
- The 3Dfx Glide library 2.3 or later for your OS (the 2.4 works fine).
|
||||
The Voodoo2 requires the Glide library 2.51. The Glide 3.1 is not
|
||||
@@ -23,8 +26,6 @@ What do you need ?
|
||||
- A compiler supported by the Glide library (Micro$oft VC++ (tested),
|
||||
Watcom (tested), GCC for Linux (tested), etc.);
|
||||
|
||||
- A lot of patience, this is an alpha release.
|
||||
|
||||
- It's nice to have two monitors - one for your normal graphics
|
||||
card and one for your 3Dfx card. If something goes wrong with
|
||||
an application using the 3Dfx hardware you can still see your
|
||||
@@ -77,31 +78,28 @@ Linux:
|
||||
If your Glide libraries and headers are in a different directory
|
||||
you'll have to modify the Mesa-config and mklib.glide files.
|
||||
|
||||
- Unpack the MesaLib-3.1.tar.gz and MesaDemos-3.1.tar.gz archives;
|
||||
- Unpack the MesaLib-3.4.1.tar.gz and MesaDemos-3.4.1.tar.gz archives;
|
||||
|
||||
- If you're going to use a newer Mesa/Glide driver than v0.27 then
|
||||
unpack the new driver archive over the Mesa directory.
|
||||
|
||||
- In the Mesa-3.1 directory type "make linux-glide"
|
||||
- In the Mesa-3.4.1 directory type "make linux-glide"
|
||||
|
||||
- Compilation _should_ finish without errors;
|
||||
|
||||
- Set your LD_LIBRARY_PATH environment variable so that the
|
||||
libglide2x.so and Mesa library files can be found. For example:
|
||||
setenv LD_LIBRARY_PATH "/usr/local/glide/lib:/SOMEDIR/Mesa-3.1/lib"
|
||||
setenv LD_LIBRARY_PATH "/usr/local/glide/lib:/SOMEDIR/Mesa-3.4.1/lib"
|
||||
|
||||
- You'll have to run Glide-based programs as root or set the suid
|
||||
bit on executables;
|
||||
|
||||
- Try a demo:
|
||||
cd gdemos
|
||||
cd demos
|
||||
su
|
||||
setenv MESA_GLX_FX f
|
||||
./gears (hit ESC to exit)
|
||||
|
||||
- You can find the demos especially designed for the Voodoo driver in
|
||||
in the Mesa-3.1/3Dfx/demos directory (type "make" in order to compile
|
||||
everything).
|
||||
|
||||
MacOS:
|
||||
------
|
||||
@@ -117,13 +115,10 @@ MS Windows:
|
||||
|
||||
- You must have the vcvars32.bat script in your PATH;
|
||||
|
||||
- Go to the directory Mesa-3.1 and run the mesafx.bat;
|
||||
- Go to the directory Mesa-3.4.1 and run the mesafx.bat;
|
||||
|
||||
- The script will compile everything (Mesa-3.1/lib/OpenGL32.{lib,dll},
|
||||
Mesa-3.1/lib/GLU32.{lib,dll}, Mesa-3.1/lib/GLUT32.{lib,dll} and
|
||||
Voodoo demos);
|
||||
|
||||
- At the end, you will be in the Mesa-3.1/3Dfx/demos directory;
|
||||
- The script will compile everything (Mesa-3.4.1/lib/OpenGL32.{lib,dll},
|
||||
Mesa-3.4.1/lib/GLU32.{lib,dll}, Mesa-3.4.1/lib/GLUT32.{lib,dll};
|
||||
|
||||
- Try some demo (fire.exe, teapot.exe, etc.) in order to check if
|
||||
everything is OK (you can use Alt-Tab or Ctrl-F9 to switch between
|
||||
@@ -135,10 +130,6 @@ MS Windows:
|
||||
- I think that you can easy change the Makefile.fx files in order
|
||||
to work with other kind of compilers;
|
||||
|
||||
- To discover how open the 3Dfx screen, read the sources under
|
||||
the Mesa-3.1/3Dfx/demos directory. You can use the GLUT library or
|
||||
the Diego Picciani's wgl emulator.
|
||||
|
||||
NOTE: the MSVC++ 5.0 optimizer is really buggy. Also if you install the
|
||||
SP3, you could have some problem (you can disable optimization in order
|
||||
solve these kind of problems).
|
||||
@@ -236,7 +227,7 @@ Doing more with Mesa & Linux Glide:
|
||||
#endif
|
||||
...
|
||||
|
||||
See the 3Dfx/demos/tunnel.c program
|
||||
See the demos/tunnel.c program
|
||||
for an example. You have to set the -DXMESA flag in the Makefile's COPTS
|
||||
to enable it.
|
||||
|
||||
@@ -395,7 +386,7 @@ Hints and Special Features:
|
||||
- The Voodoo driver support multiple Voodoo Graphics boards in the
|
||||
some PC. Using this feature, you can write applications that use
|
||||
multiple monitors, videoprojectors or HMDs for the output. See
|
||||
Mesa-3.1/3Dfx/demos/tunnel2.c for an example of how setup one
|
||||
Mesa-3.4.1/demos/tunnel2.c for an example of how setup one
|
||||
context for each board.
|
||||
|
||||
- The v0.19 introduces a new powerful texture memory manager: the
|
||||
@@ -413,13 +404,8 @@ Hints and Special Features:
|
||||
- The Voodoo driver supports the GL_EXT_paletted_texture. it works
|
||||
only with GL_COLOR_INDEX8_EXT, GL_RGBA palettes and the alpha value
|
||||
is ignored because this is a limitation of the the current Glide
|
||||
version and of the Voodoo hardware. See Mesa-3.1/3Dfx/demos/paltex.c for
|
||||
a demo of this extension.
|
||||
|
||||
- The Voodoo driver directly supports 3Dfx Global Palette extension.
|
||||
It was written for GLQuake and I think that it isn't a good idea
|
||||
to use this extension for any other purpose (it is a trick). See
|
||||
Mesa-3.1/3Dfx/demos/glbpaltex.c for a demo of this extension.
|
||||
version and of the Voodoo hardware. See Mesa-3.4.1/demos/paltex.c
|
||||
for a demo of this extension.
|
||||
|
||||
- The Voodoo driver chooses the screen resolution according to the
|
||||
requested window size. If you open a 640x480 window, you will get
|
||||
@@ -490,12 +476,12 @@ version of GLQuake with works with the Mesa/3Dfx/Glide combo.
|
||||
Here's what you need to run GLQuake on Linux:
|
||||
PC with 100MHz Pentium or better
|
||||
a 3Dfx-based card
|
||||
Mesa 3.1 libraries: libMesaGL.so libMesaGLU.so
|
||||
Mesa 3.4.1 libraries: libGL.so libGLU.so
|
||||
Glide 2.4 libraries: libglide2x.so libtexus.so
|
||||
GLQuake for Linux.
|
||||
|
||||
Also, the windows version of GLQuake works fine with the Mesa OpenGL32.dll,
|
||||
you have only to copy the Mesa-3.1/lib/OpenGL32.dll in the GLQuake directory
|
||||
you have only to copy the Mesa-3.4.1/lib/OpenGL32.dll in the GLQuake directory
|
||||
in order to test 'MesaQuake'.
|
||||
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
|
||||
Mesa 3.4 Unix/X11 Information
|
||||
Mesa 3.4.1 Unix/X11 Information
|
||||
|
||||
|
||||
|
||||
@@ -323,4 +323,4 @@ Summary of X-related environment variables:
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
$Id: README.X11,v 3.5.4.1 2000/11/02 18:05:34 brianp Exp $
|
||||
$Id: README.X11,v 3.5.4.2 2001/01/24 04:53:26 brianp Exp $
|
||||
|
22
docs/RELNOTES-3.4.1
Normal file
22
docs/RELNOTES-3.4.1
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
Mesa 3.4.1 release notes
|
||||
|
||||
February 9, 2001
|
||||
|
||||
PLEASE READ!!!!
|
||||
|
||||
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
Mesa uses an even/odd version number scheme like the Linux kernel.
|
||||
Odd numbered versions (such as 3.3) designate new developmental releases.
|
||||
Even numbered versions (such as 3.4) designate stable releases.
|
||||
|
||||
Mesa 3.4.1 is a maintenance release that simply fixes bugs found since
|
||||
the Mesa 3.4 release. For details, see the VERSIONS file.
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
$Id: RELNOTES-3.4.1,v 1.1.2.2 2001/02/07 22:54:04 brianp Exp $
|
@@ -1,4 +1,4 @@
|
||||
$Id: VERSIONS,v 1.38.2.18 2000/11/03 02:39:00 brianp Exp $
|
||||
$Id: VERSIONS,v 1.38.2.29 2001/02/14 15:25:06 brianp Exp $
|
||||
|
||||
|
||||
Mesa Version History
|
||||
@@ -775,3 +775,29 @@ Mesa Version History
|
||||
Changes:
|
||||
- finished internal support for compressed textures for DRI
|
||||
|
||||
|
||||
3.4.1 February 14, 2001
|
||||
New:
|
||||
- fixed some Linux build problems
|
||||
- fixed some Windows build problems
|
||||
- GL_EXT_texture_env_dot3 extension (Gareth Hughes)
|
||||
Bug fixes:
|
||||
- added RENDER_START/RENDER_FINISH macros for glCopyTexImage in DRI
|
||||
- various state-update code changes needed for DRI bugs
|
||||
- disabled pixel transfer ops in glColorTable commands, not needed
|
||||
- fixed bugs in glCopyConvolutionFilter1D/2D, glGetConvolutionFilter
|
||||
- updated sources and fixed compile problems in widgets-mesa/
|
||||
- GLX_PBUFFER enum value was wrong in glx.h
|
||||
- fixed a glColorMaterial lighting bug
|
||||
- fixed bad args to Read/WriteStencilSpan in h/w stencil clear function
|
||||
- glXCopySubBufferMESA() Y position was off by one
|
||||
- Error checking of glTexSubImage3D() was broken (bug 128775)
|
||||
- glPopAttrib() didn't restore all derived Mesa state correctly
|
||||
- Better glReadPixels accuracy for 16bpp color - fixes lots of OpenGL
|
||||
conformance problems at 16bpp.
|
||||
- clearing depth buffer with scissoring was broken, would segfault
|
||||
- OSMesaGetDepthBuffer() returned bad bytesPerValue value
|
||||
- fixed a line clipping bug (reported by Craig McDaniel)
|
||||
- fixed RGB color over/underflow bug for very tiny triangles
|
||||
Known problems:
|
||||
- NURBS or evaluator surfaces inside display lists don't always work
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: gl.h,v 1.44.4.1 2000/09/06 17:47:47 brianp Exp $ */
|
||||
/* $Id: gl.h,v 1.44.4.2 2001/01/06 22:43:00 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -2228,6 +2228,19 @@ GLAPI void GLAPIENTRY glResizeBuffersMESA( void );
|
||||
#endif /* GL_MESA_resize_bufffers */
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* 220. GL_EXT_texture_env_dot3
|
||||
*/
|
||||
#ifndef GL_EXT_texture_env_dot3
|
||||
#define GL_EXT_texture_env_dot3 1
|
||||
|
||||
#define GL_DOT3_RGB_EXT 0x8740
|
||||
#define GL_DOT3_RGBA_EXT 0x8741
|
||||
|
||||
#endif /* GL_EXT_texture_env_dot3 */
|
||||
|
||||
|
||||
#else /* GL_GLEXT_LEGACY */
|
||||
|
||||
#include <GL/glext.h>
|
||||
|
@@ -13,21 +13,21 @@ extern "C" {
|
||||
** this file except in compliance with the License. You may obtain a copy
|
||||
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
|
||||
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
|
||||
**
|
||||
**
|
||||
** http://oss.sgi.com/projects/FreeB
|
||||
**
|
||||
**
|
||||
** Note that, as provided in the License, the Software is distributed on an
|
||||
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
|
||||
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
|
||||
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
|
||||
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
||||
**
|
||||
**
|
||||
** Original Code. The Original Code is: OpenGL Sample Implementation,
|
||||
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
|
||||
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
|
||||
** Copyright in any portions created by third parties is as indicated
|
||||
** elsewhere herein. All Rights Reserved.
|
||||
**
|
||||
**
|
||||
** Additional Notice Provisions: This software was created using the
|
||||
** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
|
||||
** not been independently verified as being compliant with the OpenGL(R)
|
||||
@@ -46,7 +46,7 @@ extern "C" {
|
||||
/*************************************************************/
|
||||
|
||||
/* Header file version number, required by OpenGL ABI for Linux */
|
||||
#define GL_GLEXT_VERSION 6
|
||||
#define GL_GLEXT_VERSION 7
|
||||
|
||||
#ifndef GL_VERSION_1_2
|
||||
#define GL_CONSTANT_COLOR 0x8001
|
||||
@@ -220,12 +220,57 @@ extern "C" {
|
||||
#define GL_COMPRESSED_RGB_ARB 0x84ED
|
||||
#define GL_COMPRESSED_RGBA_ARB 0x84EE
|
||||
#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF
|
||||
#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0
|
||||
#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0
|
||||
#define GL_TEXTURE_COMPRESSED_ARB 0x86A1
|
||||
#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
|
||||
#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_vertex_blend
|
||||
#define GL_MAX_VERTEX_UNITS_ARB 0x86A4
|
||||
#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5
|
||||
#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6
|
||||
#define GL_VERTEX_BLEND_ARB 0x86A7
|
||||
#define GL_CURRENT_WEIGHT_ARB 0x86A8
|
||||
#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9
|
||||
#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA
|
||||
#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB
|
||||
#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC
|
||||
#define GL_WEIGHT_ARRAY_ARB 0x86AD
|
||||
#define GL_MODELVIEW0_ARB 0x1700
|
||||
#define GL_MODELVIEW1_ARB 0x850A
|
||||
#define GL_MODELVIEW2_ARB 0x8722
|
||||
#define GL_MODELVIEW3_ARB 0x8723
|
||||
#define GL_MODELVIEW4_ARB 0x8724
|
||||
#define GL_MODELVIEW5_ARB 0x8725
|
||||
#define GL_MODELVIEW6_ARB 0x8726
|
||||
#define GL_MODELVIEW7_ARB 0x8727
|
||||
#define GL_MODELVIEW8_ARB 0x8728
|
||||
#define GL_MODELVIEW9_ARB 0x8729
|
||||
#define GL_MODELVIEW10_ARB 0x872A
|
||||
#define GL_MODELVIEW11_ARB 0x872B
|
||||
#define GL_MODELVIEW12_ARB 0x872C
|
||||
#define GL_MODELVIEW13_ARB 0x872D
|
||||
#define GL_MODELVIEW14_ARB 0x872E
|
||||
#define GL_MODELVIEW15_ARB 0x872F
|
||||
#define GL_MODELVIEW16_ARB 0x8730
|
||||
#define GL_MODELVIEW17_ARB 0x8731
|
||||
#define GL_MODELVIEW18_ARB 0x8732
|
||||
#define GL_MODELVIEW19_ARB 0x8733
|
||||
#define GL_MODELVIEW20_ARB 0x8734
|
||||
#define GL_MODELVIEW21_ARB 0x8735
|
||||
#define GL_MODELVIEW22_ARB 0x8736
|
||||
#define GL_MODELVIEW23_ARB 0x8737
|
||||
#define GL_MODELVIEW24_ARB 0x8738
|
||||
#define GL_MODELVIEW25_ARB 0x8739
|
||||
#define GL_MODELVIEW26_ARB 0x873A
|
||||
#define GL_MODELVIEW27_ARB 0x873B
|
||||
#define GL_MODELVIEW28_ARB 0x873C
|
||||
#define GL_MODELVIEW29_ARB 0x873D
|
||||
#define GL_MODELVIEW30_ARB 0x873E
|
||||
#define GL_MODELVIEW31_ARB 0x873F
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_abgr
|
||||
#define GL_ABGR_EXT 0x8000
|
||||
#endif
|
||||
@@ -670,6 +715,18 @@ extern "C" {
|
||||
#ifndef GL_SGIX_tag_sample_buffer
|
||||
#endif
|
||||
|
||||
#ifndef GL_FfdMaskSGIX
|
||||
#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001
|
||||
#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002
|
||||
#endif
|
||||
|
||||
#ifndef GL_SGIX_polynomial_ffd
|
||||
#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194
|
||||
#define GL_TEXTURE_DEFORMATION_SGIX 0x8195
|
||||
#define GL_DEFORMATIONS_MASK_SGIX 0x8196
|
||||
#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197
|
||||
#endif
|
||||
|
||||
#ifndef GL_SGIX_reference_plane
|
||||
#define GL_REFERENCE_PLANE_SGIX 0x817D
|
||||
#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E
|
||||
@@ -785,6 +842,14 @@ extern "C" {
|
||||
#define GL_COLOR_INDEX8_EXT 0x80E5
|
||||
#define GL_COLOR_INDEX12_EXT 0x80E6
|
||||
#define GL_COLOR_INDEX16_EXT 0x80E7
|
||||
#define GL_COLOR_TABLE_FORMAT_EXT 0x80D8
|
||||
#define GL_COLOR_TABLE_WIDTH_EXT 0x80D9
|
||||
#define GL_COLOR_TABLE_RED_SIZE_EXT 0x80DA
|
||||
#define GL_COLOR_TABLE_GREEN_SIZE_EXT 0x80DB
|
||||
#define GL_COLOR_TABLE_BLUE_SIZE_EXT 0x80DC
|
||||
#define GL_COLOR_TABLE_ALPHA_SIZE_EXT 0x80DD
|
||||
#define GL_COLOR_TABLE_LUMINANCE_SIZE_EXT 0x80DE
|
||||
#define GL_COLOR_TABLE_INTENSITY_SIZE_EXT 0x80DF
|
||||
#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED
|
||||
#endif
|
||||
|
||||
@@ -926,6 +991,24 @@ extern "C" {
|
||||
#define GL_BGRA_EXT 0x80E1
|
||||
#endif
|
||||
|
||||
#ifndef GL_SGIX_async
|
||||
#define GL_ASYNC_MARKER_SGIX 0x8329
|
||||
#endif
|
||||
|
||||
#ifndef GL_SGIX_async_pixel
|
||||
#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C
|
||||
#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D
|
||||
#define GL_ASYNC_READ_PIXELS_SGIX 0x835E
|
||||
#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F
|
||||
#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360
|
||||
#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361
|
||||
#endif
|
||||
|
||||
#ifndef GL_SGIX_async_histogram
|
||||
#define GL_ASYNC_HISTOGRAM_SGIX 0x832C
|
||||
#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D
|
||||
#endif
|
||||
|
||||
#ifndef GL_INTEL_texture_scissor
|
||||
#endif
|
||||
|
||||
@@ -1419,6 +1502,11 @@ extern "C" {
|
||||
#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_texture_env_dot3
|
||||
#define GL_DOT3_RGB_EXT 0x8740
|
||||
#define GL_DOT3_RGBA_EXT 0x8741
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
@@ -1658,15 +1746,9 @@ typedef void (APIENTRY * PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bia
|
||||
#define GL_EXT_texture3D 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
extern void APIENTRY glTexImage3DEXT (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRY * PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_subtexture
|
||||
/*#define GL_EXT_subtexture 1*/
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
extern void APIENTRY glTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRY * PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
|
||||
typedef void (APIENTRY * PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
|
||||
#endif
|
||||
|
||||
@@ -2038,6 +2120,20 @@ extern void APIENTRY glTagSampleBufferSGIX (void);
|
||||
typedef void (APIENTRY * PFNGLTAGSAMPLEBUFFERSGIXPROC) (void);
|
||||
#endif
|
||||
|
||||
#ifndef GL_SGIX_polynomial_ffd
|
||||
#define GL_SGIX_polynomial_ffd 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
extern void APIENTRY glDeformationMap3dSGIX (GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *);
|
||||
extern void APIENTRY glDeformationMap3fSGIX (GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *);
|
||||
extern void APIENTRY glDeformSGIX (GLbitfield);
|
||||
extern void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRY * PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points);
|
||||
typedef void (APIENTRY * PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points);
|
||||
typedef void (APIENTRY * PFNGLDEFORMSGIXPROC) (GLbitfield mask);
|
||||
typedef void (APIENTRY * PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask);
|
||||
#endif
|
||||
|
||||
#ifndef GL_SGIX_reference_plane
|
||||
#define GL_SGIX_reference_plane 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
@@ -2306,6 +2402,32 @@ typedef void (APIENTRY * PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode)
|
||||
#define GL_EXT_bgra 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_SGIX_async
|
||||
#define GL_SGIX_async 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
extern void APIENTRY glAsyncMarkerSGIX (GLuint);
|
||||
extern GLint APIENTRY glFinishAsyncSGIX (GLuint *);
|
||||
extern GLint APIENTRY glPollAsyncSGIX (GLuint *);
|
||||
extern GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei);
|
||||
extern void APIENTRY glDeleteAsyncMarkersSGIX (GLuint, GLsizei);
|
||||
extern GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRY * PFNGLASYNCMARKERSGIXPROC) (GLuint marker);
|
||||
typedef GLint (APIENTRY * PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp);
|
||||
typedef GLint (APIENTRY * PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp);
|
||||
typedef GLuint (APIENTRY * PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range);
|
||||
typedef void (APIENTRY * PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range);
|
||||
typedef GLboolean (APIENTRY * PFNGLISASYNCMARKERSGIXPROC) (GLuint marker);
|
||||
#endif
|
||||
|
||||
#ifndef GL_SGIX_async_pixel
|
||||
#define GL_SGIX_async_pixel 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_SGIX_async_histogram
|
||||
#define GL_SGIX_async_histogram 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_INTEL_parallel_arrays
|
||||
#define GL_INTEL_parallel_arrays 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
@@ -2712,12 +2834,6 @@ extern void APIENTRY glCombinerOutputNV (GLenum, GLenum, GLenum, GLenum, GLenum,
|
||||
extern void APIENTRY glFinalCombinerInputNV (GLenum, GLenum, GLenum, GLenum);
|
||||
extern void APIENTRY glGetCombinerInputParameterfvNV (GLenum, GLenum, GLenum, GLenum, GLfloat *);
|
||||
extern void APIENTRY glGetCombinerInputParameterivNV (GLenum, GLenum, GLenum, GLenum, GLint *);
|
||||
#ifdef VMS
|
||||
#define glGetCombinerOutputParameterfvNV glGetCombinerOutputParameterfvN
|
||||
#define glGetCombinerOutputParameterivNV glGetCombinerOutputParameterivN
|
||||
#define glGetFinalCombinerInputParameterfvNV glGetFinalCombinerInputParafvNV
|
||||
#define glGetFinalCombinerInputParameterivNV glGetFinalCombinerInputParaivNV
|
||||
#endif
|
||||
extern void APIENTRY glGetCombinerOutputParameterfvNV (GLenum, GLenum, GLenum, GLfloat *);
|
||||
extern void APIENTRY glGetCombinerOutputParameterivNV (GLenum, GLenum, GLenum, GLint *);
|
||||
extern void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum, GLenum, GLfloat *);
|
||||
@@ -2918,6 +3034,18 @@ extern void APIENTRY glTextureColorMaskSGIS (GLboolean, GLboolean, GLboolean, GL
|
||||
typedef void (APIENTRY * PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
|
||||
#endif
|
||||
|
||||
#ifndef GL_SGIX_igloo_interface
|
||||
#define GL_SGIX_igloo_interface 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
extern void APIENTRY glIglooInterfaceSGIX (GLenum, const GLvoid *);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRY * PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params);
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_texture_env_dot3
|
||||
#define GL_EXT_texture_env_dot3 1
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/* $Id: glx.h,v 1.22 2000/06/23 17:39:18 brianp Exp $ */
|
||||
/* $Id: glx.h,v 1.22.4.1 2000/11/25 18:52:02 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
* Version: 3.4
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
*
|
||||
@@ -158,7 +158,7 @@ extern "C" {
|
||||
#define GLX_DAMAGED 0x8020
|
||||
#define GLX_SAVED 0x8021
|
||||
#define GLX_WINDOW 0x8022
|
||||
#define GLX_PBUFFER 0x8033
|
||||
#define GLX_PBUFFER 0x8023
|
||||
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: mesa_wgl.h,v 1.5 2000/05/22 16:21:27 brianp Exp $ */
|
||||
/* $Id: mesa_wgl.h,v 1.5.4.1 2000/11/20 17:31:51 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -32,6 +32,7 @@
|
||||
#define _mesa_wgl_h_
|
||||
|
||||
|
||||
#include <windows.h>
|
||||
#include <gl/gl.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
880
include/GL/vms_x_fix.h
Normal file
880
include/GL/vms_x_fix.h
Normal file
@@ -0,0 +1,880 @@
|
||||
/***************************************************************************
|
||||
* *
|
||||
* Repair definitions of Xlib when compileing with /name=(as_is) on VMS *
|
||||
* *
|
||||
* Author : Jouk Jansen (joukj@hrem.stm.tudelft.nl) *
|
||||
* *
|
||||
* Last revision : 22 August 2000 *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef VMS_X_FIX
|
||||
#define VMS_X_FIX
|
||||
|
||||
#define _XRegisterFilterByType _XREGISTERFILTERBYTYPE
|
||||
#define XAllocClassHint XALLOCCLASSHINT
|
||||
#define XAllocColor XALLOCCOLOR
|
||||
#define XAllocColorCells XALLOCCOLORCELLS
|
||||
#define XAllocSizeHints XALLOCSIZEHINTS
|
||||
#define XAllocWMHints XALLOCWMHINTS
|
||||
#define XAutoRepeatOff XAUTOREPEATOFF
|
||||
#define XAutoRepeatOn XAUTOREPEATON
|
||||
#define XBaseFontNameListOfFontSet XBASEFONTNAMELISTOFFONTSET
|
||||
#define XBell XBELL
|
||||
#define XBitmapPad XBITMAPPAD
|
||||
#define XChangeActivePointerGrab XCHANGEACTIVEPOINTERGRAB
|
||||
#define XChangeGC XCHANGEGC
|
||||
#define XChangeProperty XCHANGEPROPERTY
|
||||
#define XChangeWindowAttributes XCHANGEWINDOWATTRIBUTES
|
||||
#define XCheckIfEvent XCHECKIFEVENT
|
||||
#define XCheckMaskEvent XCHECKMASKEVENT
|
||||
#define XCheckTypedWindowEvent XCHECKTYPEDWINDOWEVENT
|
||||
#define XCheckWindowEvent XCHECKWINDOWEVENT
|
||||
#define XClearArea XCLEARAREA
|
||||
#define XClearWindow XCLEARWINDOW
|
||||
#define XClipBox XCLIPBOX
|
||||
#define XCloseDisplay XCLOSEDISPLAY
|
||||
#define XCloseIM XCLOSEIM
|
||||
#define XConfigureWindow XCONFIGUREWINDOW
|
||||
#define XConvertSelection XCONVERTSELECTION
|
||||
#define XCopyArea XCOPYAREA
|
||||
#define XCopyGC XCOPYGC
|
||||
#define XCopyPlane XCOPYPLANE
|
||||
#define XCreateBitmapFromData XCREATEBITMAPFROMDATA
|
||||
#define XCreateColormap XCREATECOLORMAP
|
||||
#define XCreateFontCursor XCREATEFONTCURSOR
|
||||
#define XCreateFontSet XCREATEFONTSET
|
||||
#define XCreateGC XCREATEGC
|
||||
#define XCreateIC XCREATEIC
|
||||
#define XCreateImage XCREATEIMAGE
|
||||
#define XCreatePixmap XCREATEPIXMAP
|
||||
#define XCreatePixmapCursor XCREATEPIXMAPCURSOR
|
||||
#define XCreatePixmapFromBitmapData XCREATEPIXMAPFROMBITMAPDATA
|
||||
#define XCreateRegion XCREATEREGION
|
||||
#define XCreateSimpleWindow XCREATESIMPLEWINDOW
|
||||
#define XCreateWindow XCREATEWINDOW
|
||||
#define XDefaultScreenOfDisplay XDEFAULTSCREENOFDISPLAY
|
||||
#define XDefineCursor XDEFINECURSOR
|
||||
#define XDeleteProperty XDELETEPROPERTY
|
||||
#define XDestroyIC XDESTROYIC
|
||||
#define XDestroyRegion XDESTROYREGION
|
||||
#define XDestroyWindow XDESTROYWINDOW
|
||||
#define XDisplayName XDISPLAYNAME
|
||||
#define XDisplayOfScreen XDISPLAYOFSCREEN
|
||||
#define XDrawArc XDRAWARC
|
||||
#define XDrawImageString XDRAWIMAGESTRING
|
||||
#define XDrawImageString16 XDRAWIMAGESTRING16
|
||||
#define XDrawLine XDRAWLINE
|
||||
#define XDrawLines XDRAWLINES
|
||||
#define XDrawPoint XDRAWPOINT
|
||||
#define XDrawPoints XDRAWPOINTS
|
||||
#define XDrawRectangle XDRAWRECTANGLE
|
||||
#define XDrawSegments XDRAWSEGMENTS
|
||||
#define XDrawString XDRAWSTRING
|
||||
#define XDrawString16 XDRAWSTRING16
|
||||
#define XEmptyRegion XEMPTYREGION
|
||||
#define XEqualRegion XEQUALREGION
|
||||
#define XEventsQueued XEVENTSQUEUED
|
||||
#define XExtentsOfFontSet XEXTENTSOFFONTSET
|
||||
#define XFillArc XFILLARC
|
||||
#define XFillPolygon XFILLPOLYGON
|
||||
#define XFillRectangle XFILLRECTANGLE
|
||||
#define XFillRectangles XFILLRECTANGLES
|
||||
#define XFilterEvent XFILTEREVENT
|
||||
#define XFlush XFLUSH
|
||||
#define XFontsOfFontSet XFONTSOFFONTSET
|
||||
#define XFree XFREE
|
||||
#define XFreeColormap XFREECOLORMAP
|
||||
#define XFreeColors XFREECOLORS
|
||||
#define XFreeCursor XFREECURSOR
|
||||
#define XFreeFont XFREEFONT
|
||||
#define XFreeFontInfo XFREEFONTINFO
|
||||
#define XFreeFontNames XFREEFONTNAMES
|
||||
#define XFreeFontSet XFREEFONTSET
|
||||
#define XFreeGC XFREEGC
|
||||
#define XFreeModifiermap XFREEMODIFIERMAP
|
||||
#define XFreePixmap XFREEPIXMAP
|
||||
#define XFreeStringList XFREESTRINGLIST
|
||||
#define XGetAtomName XGETATOMNAME
|
||||
#define XGetDefault XGETDEFAULT
|
||||
#define XGetErrorDatabaseText XGETERRORDATABASETEXT
|
||||
#define XGetErrorText XGETERRORTEXT
|
||||
#define XGetFontProperty XGETFONTPROPERTY
|
||||
#define XGetGCValues XGETGCVALUES
|
||||
#define XGetGeometry XGETGEOMETRY
|
||||
#define XGetICValues XGETICVALUES
|
||||
#define XGetIMValues XGETIMVALUES
|
||||
#define XGetImage XGETIMAGE
|
||||
#define XGetKeyboardControl XGETKEYBOARDCONTROL
|
||||
#define XGetModifierMapping XGETMODIFIERMAPPING
|
||||
#define XGetMotionEvents XGETMOTIONEVENTS
|
||||
#define XGetNormalHints XGETNORMALHINTS
|
||||
#define XGetSelectionOwner XGETSELECTIONOWNER
|
||||
#define XGetSubImage XGETSUBIMAGE
|
||||
#define XGetVisualInfo XGETVISUALINFO
|
||||
#define XGetWMColormapWindows XGETWMCOLORMAPWINDOWS
|
||||
#define XGetWMHints XGETWMHINTS
|
||||
#define XGetWMName XGETWMNAME
|
||||
#define XGetWMNormalHints XGETWMNORMALHINTS
|
||||
#define XGetWindowAttributes XGETWINDOWATTRIBUTES
|
||||
#define XGetWindowProperty XGETWINDOWPROPERTY
|
||||
#define XGrabKeyboard XGRABKEYBOARD
|
||||
#define XGrabPointer XGRABPOINTER
|
||||
#define XGrabServer XGRABSERVER
|
||||
#define XHeightOfScreen XHEIGHTOFSCREEN
|
||||
#define XIfEvent XIFEVENT
|
||||
#define XInternAtom XINTERNATOM
|
||||
#define XIntersectRegion XINTERSECTREGION
|
||||
#define XKeycodeToKeysym XKEYCODETOKEYSYM
|
||||
#define XKeysymToKeycode XKEYSYMTOKEYCODE
|
||||
#define XKeysymToString XKEYSYMTOSTRING
|
||||
#define XListFonts XLISTFONTS
|
||||
#define XListFontsWithInfo XLISTFONTSWITHINFO
|
||||
#define XListPixmapFormats XLISTPIXMAPFORMATS
|
||||
#define XListProperties XLISTPROPERTIES
|
||||
#define XLoadQueryFont XLOADQUERYFONT
|
||||
#define XLookupString XLOOKUPSTRING
|
||||
#define XLowerWindow XLOWERWINDOW
|
||||
#define XMapRaised XMAPRAISED
|
||||
#define XMapWindow XMAPWINDOW
|
||||
#define XMatchVisualInfo XMATCHVISUALINFO
|
||||
#define XMoveResizeWindow XMOVERESIZEWINDOW
|
||||
#define XMoveWindow XMOVEWINDOW
|
||||
#define XNextEvent XNEXTEVENT
|
||||
#define XOffsetRegion XOFFSETREGION
|
||||
#define XOpenDisplay XOPENDISPLAY
|
||||
#define XOpenIM XOPENIM
|
||||
#define XParseColor XPARSECOLOR
|
||||
#define XParseGeometry XPARSEGEOMETRY
|
||||
#define XPeekEvent XPEEKEVENT
|
||||
#define XPending XPENDING
|
||||
#define XPointInRegion XPOINTINREGION
|
||||
#define XPolygonRegion XPOLYGONREGION
|
||||
#define XPutBackEvent XPUTBACKEVENT
|
||||
#define XPutImage XPUTIMAGE
|
||||
#define XQueryColor XQUERYCOLOR
|
||||
#define XQueryColors XQUERYCOLORS
|
||||
#define XQueryExtension XQUERYEXTENSION
|
||||
#define XQueryPointer XQUERYPOINTER
|
||||
#define XQueryTree XQUERYTREE
|
||||
#define XRaiseWindow XRAISEWINDOW
|
||||
#define XReconfigureWMWindow XRECONFIGUREWMWINDOW
|
||||
#define XRectInRegion XRECTINREGION
|
||||
#define XRefreshKeyboardMapping XREFRESHKEYBOARDMAPPING
|
||||
#define XReparentWindow XREPARENTWINDOW
|
||||
#define XResizeWindow XRESIZEWINDOW
|
||||
#define XRestackWindows XRESTACKWINDOWS
|
||||
#define XRootWindowOfScreen XROOTWINDOWOFSCREEN
|
||||
#define XScreenNumberOfScreen XSCREENNUMBEROFSCREEN
|
||||
#define XSelectAsyncEvent XSELECTASYNCEVENT
|
||||
#define XSelectAsyncInput XSELECTASYNCINPUT
|
||||
#define XSelectInput XSELECTINPUT
|
||||
#define XSendEvent XSENDEVENT
|
||||
#define XServerVendor XSERVERVENDOR
|
||||
#define XSetBackground XSETBACKGROUND
|
||||
#define XSetClassHint XSETCLASSHINT
|
||||
#define XSetClipMask XSETCLIPMASK
|
||||
#define XSetClipOrigin XSETCLIPORIGIN
|
||||
#define XSetClipRectangles XSETCLIPRECTANGLES
|
||||
#define XSetCloseDownMode XSETCLOSEDOWNMODE
|
||||
#define XSetCommand XSETCOMMAND
|
||||
#define XSetDashes XSETDASHES
|
||||
#define XSetErrorHandler XSETERRORHANDLER
|
||||
#define XSetFillStyle XSETFILLSTYLE
|
||||
#define XSetFont XSETFONT
|
||||
#define XSetForeground XSETFOREGROUND
|
||||
#define XSetFunction XSETFUNCTION
|
||||
#define XSetGraphicsExposures XSETGRAPHICSEXPOSURES
|
||||
#define XSetICFocus XSETICFOCUS
|
||||
#define XSetICValues XSETICVALUES
|
||||
#define XSetIOErrorHandler XSETIOERRORHANDLER
|
||||
#define XSetInputFocus XSETINPUTFOCUS
|
||||
#define XSetLineAttributes XSETLINEATTRIBUTES
|
||||
#define XSetLocaleModifiers XSETLOCALEMODIFIERS
|
||||
#define XSetNormalHints XSETNORMALHINTS
|
||||
#define XSetRegion XSETREGION
|
||||
#define XSetSelectionOwner XSETSELECTIONOWNER
|
||||
#define XSetStipple XSETSTIPPLE
|
||||
#define XSetSubwindowMode XSETSUBWINDOWMODE
|
||||
#define XSetTSOrigin XSETTSORIGIN
|
||||
#define XSetTile XSETTILE
|
||||
#define XSetTransientForHint XSETTRANSIENTFORHINT
|
||||
#define XSetWMColormapWindows XSETWMCOLORMAPWINDOWS
|
||||
#define XSetWMHints XSETWMHINTS
|
||||
#define XSetWMIconName XSETWMICONNAME
|
||||
#define XSetWMName XSETWMNAME
|
||||
#define XSetWMNormalHints XSETWMNORMALHINTS
|
||||
#define XSetWMProperties XSETWMPROPERTIES
|
||||
#define XSetWMProtocols XSETWMPROTOCOLS
|
||||
#define XSetWindowBackground XSETWINDOWBACKGROUND
|
||||
#define XSetWindowBackgroundPixmap XSETWINDOWBACKGROUNDPIXMAP
|
||||
#define XSetWindowColormap XSETWINDOWCOLORMAP
|
||||
#define XShapeCombineMask XSHAPECOMBINEMASK
|
||||
#define XShapeCombineRectangles XSHAPECOMBINERECTANGLES
|
||||
#define XShapeGetRectangles XSHAPEGETRECTANGLES
|
||||
#define XShrinkRegion XSHRINKREGION
|
||||
#define XStoreColor XSTORECOLOR
|
||||
#define XStoreColors XSTORECOLORS
|
||||
#define XStoreName XSTORENAME
|
||||
#define XStringToKeysym XSTRINGTOKEYSYM
|
||||
#define XSubtractRegion XSUBTRACTREGION
|
||||
#define XSupportsLocale XSUPPORTSLOCALE
|
||||
#define XSync XSYNC
|
||||
#define XSynchronize XSYNCHRONIZE
|
||||
#define XTextExtents XTEXTEXTENTS
|
||||
#define XTextExtents16 XTEXTEXTENTS16
|
||||
#define XTextWidth XTEXTWIDTH
|
||||
#define XTextWidth16 XTEXTWIDTH16
|
||||
#define XTranslateCoordinates XTRANSLATECOORDINATES
|
||||
#define XUndefineCursor XUNDEFINECURSOR
|
||||
#define XUngrabKeyboard XUNGRABKEYBOARD
|
||||
#define XUngrabPointer XUNGRABPOINTER
|
||||
#define XUngrabServer XUNGRABSERVER
|
||||
#define XUnionRectWithRegion XUNIONRECTWITHREGION
|
||||
#define XUnionRegion XUNIONREGION
|
||||
#define XUnmapWindow XUNMAPWINDOW
|
||||
#define _XUnregisterFilter _XUNREGISTERFILTER
|
||||
#define XUnsetICFocus XUNSETICFOCUS
|
||||
#define XVaCreateNestedList XVACREATENESTEDLIST
|
||||
#define XVisualIDFromVisual XVISUALIDFROMVISUAL
|
||||
#define XWidthOfScreen XWIDTHOFSCREEN
|
||||
#define XWindowEvent XWINDOWEVENT
|
||||
#define XWithdrawWindow XWITHDRAWWINDOW
|
||||
#define XXorRegion XXORREGION
|
||||
#define XmAddProtocolCallback XMADDPROTOCOLCALLBACK
|
||||
#define XmAddProtocols XMADDPROTOCOLS
|
||||
#define XmChangeColor XMCHANGECOLOR
|
||||
#define XmClipboardCopy XMCLIPBOARDCOPY
|
||||
#define XmClipboardEndCopy XMCLIPBOARDENDCOPY
|
||||
#define XmClipboardInquireLength XMCLIPBOARDINQUIRELENGTH
|
||||
#define XmClipboardLock XMCLIPBOARDLOCK
|
||||
#define XmClipboardRetrieve XMCLIPBOARDRETRIEVE
|
||||
#define XmClipboardStartCopy XMCLIPBOARDSTARTCOPY
|
||||
#define XmClipboardUnlock XMCLIPBOARDUNLOCK
|
||||
#define XmCreateArrowButton XMCREATEARROWBUTTON
|
||||
#define XmCreateArrowButtonGadget XMCREATEARROWBUTTONGADGET
|
||||
#define XmCreateCascadeButton XMCREATECASCADEBUTTON
|
||||
#define XmCreateDialogShell XMCREATEDIALOGSHELL
|
||||
#define XmCreateDragIcon XMCREATEDRAGICON
|
||||
#define XmCreateDrawingArea XMCREATEDRAWINGAREA
|
||||
#define XmCreateDrawnButton XMCREATEDRAWNBUTTON
|
||||
#define XmCreateFileSelectionBox XMCREATEFILESELECTIONBOX
|
||||
#define XmCreateFileSelectionDialog XMCREATEFILESELECTIONDIALOG
|
||||
#define XmCreateForm XMCREATEFORM
|
||||
#define XmCreateFormDialog XMCREATEFORMDIALOG
|
||||
#define XmCreateFrame XMCREATEFRAME
|
||||
#define XmCreateInformationDialog XMCREATEINFORMATIONDIALOG
|
||||
#define XmCreateLabelGadget XMCREATELABELGADGET
|
||||
#define XmCreateMainWindow XMCREATEMAINWINDOW
|
||||
#define XmCreateMenuBar XMCREATEMENUBAR
|
||||
#define XmCreateMessageBox XMCREATEMESSAGEBOX
|
||||
#define XmCreateMessageDialog XMCREATEMESSAGEDIALOG
|
||||
#define XmCreateOptionMenu XMCREATEOPTIONMENU
|
||||
#define XmCreatePanedWindow XMCREATEPANEDWINDOW
|
||||
#define XmCreatePopupMenu XMCREATEPOPUPMENU
|
||||
#define XmCreatePromptDialog XMCREATEPROMPTDIALOG
|
||||
#define XmCreatePulldownMenu XMCREATEPULLDOWNMENU
|
||||
#define XmCreatePushButton XMCREATEPUSHBUTTON
|
||||
#define XmCreatePushButtonGadget XMCREATEPUSHBUTTONGADGET
|
||||
#define XmCreateQuestionDialog XMCREATEQUESTIONDIALOG
|
||||
#define XmCreateRadioBox XMCREATERADIOBOX
|
||||
#define XmCreateRowColumn XMCREATEROWCOLUMN
|
||||
#define XmCreateScale XMCREATESCALE
|
||||
#define XmCreateScrollBar XMCREATESCROLLBAR
|
||||
#define XmCreateScrolledList XMCREATESCROLLEDLIST
|
||||
#define XmCreateScrolledText XMCREATESCROLLEDTEXT
|
||||
#define XmCreateScrolledWindow XMCREATESCROLLEDWINDOW
|
||||
#define XmCreateSelectionDialog XMCREATESELECTIONDIALOG
|
||||
#define XmCreateSeparator XMCREATESEPARATOR
|
||||
#define XmCreateSeparatorGadget XMCREATESEPARATORGADGET
|
||||
#define XmCreateTemplateDialog XMCREATETEMPLATEDIALOG
|
||||
#define XmCreateText XMCREATETEXT
|
||||
#define XmCreateTextField XMCREATETEXTFIELD
|
||||
#define XmCreateToggleButton XMCREATETOGGLEBUTTON
|
||||
#define XmCreateToggleButtonGadget XMCREATETOGGLEBUTTONGADGET
|
||||
#define XmDragStart XMDRAGSTART
|
||||
#define XmDropSiteRegister XMDROPSITEREGISTER
|
||||
#define XmDropSiteUnregister XMDROPSITEUNREGISTER
|
||||
#define XmDropSiteUpdate XMDROPSITEUPDATE
|
||||
#define XmDropTransferStart XMDROPTRANSFERSTART
|
||||
#define XmFileSelectionBoxGetChild XMFILESELECTIONBOXGETCHILD
|
||||
#define XmFileSelectionDoSearch XMFILESELECTIONDOSEARCH
|
||||
#define XmFontListAppendEntry XMFONTLISTAPPENDENTRY
|
||||
#define XmFontListCopy XMFONTLISTCOPY
|
||||
#define XmFontListCreate XMFONTLISTCREATE
|
||||
#define XmFontListEntryCreate XMFONTLISTENTRYCREATE
|
||||
#define XmFontListEntryFree XMFONTLISTENTRYFREE
|
||||
#define XmFontListEntryGetFont XMFONTLISTENTRYGETFONT
|
||||
#define XmFontListEntryGetTag XMFONTLISTENTRYGETTAG
|
||||
#define XmFontListEntryLoad XMFONTLISTENTRYLOAD
|
||||
#define XmFontListFree XMFONTLISTFREE
|
||||
#define XmFontListFreeFontContext XMFONTLISTFREEFONTCONTEXT
|
||||
#define XmFontListGetNextFont XMFONTLISTGETNEXTFONT
|
||||
#define XmFontListInitFontContext XMFONTLISTINITFONTCONTEXT
|
||||
#define XmFontListNextEntry XMFONTLISTNEXTENTRY
|
||||
#define XmGetColors XMGETCOLORS
|
||||
#define XmGetFocusWidget XMGETFOCUSWIDGET
|
||||
#define XmGetMenuCursor XMGETMENUCURSOR
|
||||
#define XmGetPixmapByDepth XMGETPIXMAPBYDEPTH
|
||||
#define XmGetTearOffControl XMGETTEAROFFCONTROL
|
||||
#define XmGetXmDisplay XMGETXMDISPLAY
|
||||
#define XmImMbLookupString XMIMMBLOOKUPSTRING
|
||||
#define XmImRegister XMIMREGISTER
|
||||
#define XmImSetFocusValues XMIMSETFOCUSVALUES
|
||||
#define XmImSetValues XMIMSETVALUES
|
||||
#define XmImUnregister XMIMUNREGISTER
|
||||
#define XmImUnsetFocus XMIMUNSETFOCUS
|
||||
#define XmInternAtom XMINTERNATOM
|
||||
#define XmIsMotifWMRunning XMISMOTIFWMRUNNING
|
||||
#define XmListAddItem XMLISTADDITEM
|
||||
#define XmListAddItemUnselected XMLISTADDITEMUNSELECTED
|
||||
#define XmListAddItemsUnselected XMLISTADDITEMSUNSELECTED
|
||||
#define XmListDeleteAllItems XMLISTDELETEALLITEMS
|
||||
#define XmListDeleteItemsPos XMLISTDELETEITEMSPOS
|
||||
#define XmListDeletePos XMLISTDELETEPOS
|
||||
#define XmListDeselectAllItems XMLISTDESELECTALLITEMS
|
||||
#define XmListDeselectPos XMLISTDESELECTPOS
|
||||
#define XmListGetKbdItemPos XMLISTGETKBDITEMPOS
|
||||
#define XmListGetMatchPos XMLISTGETMATCHPOS
|
||||
#define XmListGetSelectedPos XMLISTGETSELECTEDPOS
|
||||
#define XmListPosSelected XMLISTPOSSELECTED
|
||||
#define XmListSelectItem XMLISTSELECTITEM
|
||||
#define XmListSelectPos XMLISTSELECTPOS
|
||||
#define XmListSetBottomPos XMLISTSETBOTTOMPOS
|
||||
#define XmListSetItem XMLISTSETITEM
|
||||
#define XmListSetKbdItemPos XMLISTSETKBDITEMPOS
|
||||
#define XmListSetPos XMLISTSETPOS
|
||||
#define XmMainWindowSetAreas XMMAINWINDOWSETAREAS
|
||||
#define XmMenuPosition XMMENUPOSITION
|
||||
#define XmMessageBoxGetChild XMMESSAGEBOXGETCHILD
|
||||
#define XmOptionButtonGadget XMOPTIONBUTTONGADGET
|
||||
#define XmOptionLabelGadget XMOPTIONLABELGADGET
|
||||
#define XmProcessTraversal XMPROCESSTRAVERSAL
|
||||
#define XmQmotif XMQMOTIF
|
||||
#define XmRemoveProtocolCallback XMREMOVEPROTOCOLCALLBACK
|
||||
#define XmRepTypeGetId XMREPTYPEGETID
|
||||
#define XmRepTypeGetRecord XMREPTYPEGETRECORD
|
||||
#define XmRepTypeRegister XMREPTYPEREGISTER
|
||||
#define XmRepTypeValidValue XMREPTYPEVALIDVALUE
|
||||
#define XmScrollBarSetValues XMSCROLLBARSETVALUES
|
||||
#define XmScrolledWindowSetAreas XMSCROLLEDWINDOWSETAREAS
|
||||
#define XmSelectionBoxGetChild XMSELECTIONBOXGETCHILD
|
||||
#define XmStringByteCompare XMSTRINGBYTECOMPARE
|
||||
#define XmStringCompare XMSTRINGCOMPARE
|
||||
#define XmStringConcat XMSTRINGCONCAT
|
||||
#define XmStringCopy XMSTRINGCOPY
|
||||
#define XmStringCreate XMSTRINGCREATE
|
||||
#define XmStringCreateLocalized XMSTRINGCREATELOCALIZED
|
||||
#define XmStringCreateLtoR XMSTRINGCREATELTOR
|
||||
#define XmStringCreateSimple XMSTRINGCREATESIMPLE
|
||||
#define XmStringDraw XMSTRINGDRAW
|
||||
#define XmStringDrawUnderline XMSTRINGDRAWUNDERLINE
|
||||
#define XmStringExtent XMSTRINGEXTENT
|
||||
#define XmStringFree XMSTRINGFREE
|
||||
#define XmStringFreeContext XMSTRINGFREECONTEXT
|
||||
#define XmStringGetLtoR XMSTRINGGETLTOR
|
||||
#define XmStringGetNextComponent XMSTRINGGETNEXTCOMPONENT
|
||||
#define XmStringGetNextSegment XMSTRINGGETNEXTSEGMENT
|
||||
#define XmStringInitContext XMSTRINGINITCONTEXT
|
||||
#define XmStringLength XMSTRINGLENGTH
|
||||
#define XmStringLtoRCreate XMSTRINGLTORCREATE
|
||||
#define XmStringNConcat XMSTRINGNCONCAT
|
||||
#define XmStringSegmentCreate XMSTRINGSEGMENTCREATE
|
||||
#define XmStringWidth XMSTRINGWIDTH
|
||||
#define XmTextClearSelection XMTEXTCLEARSELECTION
|
||||
#define XmTextFieldGetEditable XMTEXTFIELDGETEDITABLE
|
||||
#define XmTextFieldGetInsertionPosition XMTEXTFIELDGETINSERTIONPOSITION
|
||||
#define XmTextFieldGetLastPosition XMTEXTFIELDGETLASTPOSITION
|
||||
#define XmTextFieldGetSelection XMTEXTFIELDGETSELECTION
|
||||
#define XmTextFieldGetString XMTEXTFIELDGETSTRING
|
||||
#define XmTextFieldInsert XMTEXTFIELDINSERT
|
||||
#define XmTextFieldRemove XMTEXTFIELDREMOVE
|
||||
#define XmTextFieldSetSelection XMTEXTFIELDSETSELECTION
|
||||
#define XmTextFieldSetString XMTEXTFIELDSETSTRING
|
||||
#define XmTextGetCursorPosition XMTEXTGETCURSORPOSITION
|
||||
#define XmTextGetInsertionPosition XMTEXTGETINSERTIONPOSITION
|
||||
#define XmTextGetLastPosition XMTEXTGETLASTPOSITION
|
||||
#define XmTextGetMaxLength XMTEXTGETMAXLENGTH
|
||||
#define XmTextGetSelection XMTEXTGETSELECTION
|
||||
#define XmTextGetSelectionPosition XMTEXTGETSELECTIONPOSITION
|
||||
#define XmTextGetString XMTEXTGETSTRING
|
||||
#define XmTextInsert XMTEXTINSERT
|
||||
#define XmTextRemove XMTEXTREMOVE
|
||||
#define XmTextReplace XMTEXTREPLACE
|
||||
#define XmTextSetCursorPosition XMTEXTSETCURSORPOSITION
|
||||
#define XmTextSetHighlight XMTEXTSETHIGHLIGHT
|
||||
#define XmTextSetInsertionPosition XMTEXTSETINSERTIONPOSITION
|
||||
#define XmTextSetSelection XMTEXTSETSELECTION
|
||||
#define XmTextSetString XMTEXTSETSTRING
|
||||
#define XmToggleButtonGadgetGetState XMTOGGLEBUTTONGADGETGETSTATE
|
||||
#define XmToggleButtonGadgetSetState XMTOGGLEBUTTONGADGETSETSTATE
|
||||
#define XmToggleButtonGetState XMTOGGLEBUTTONGETSTATE
|
||||
#define XmToggleButtonSetState XMTOGGLEBUTTONSETSTATE
|
||||
#define XmUpdateDisplay XMUPDATEDISPLAY
|
||||
#define XmVaCreateSimpleRadioBox XMVACREATESIMPLERADIOBOX
|
||||
#define XmbDrawString XMBDRAWSTRING
|
||||
#define XmbLookupString XMBLOOKUPSTRING
|
||||
#define XmbResetIC XMBRESETIC
|
||||
#define XmbSetWMProperties XMBSETWMPROPERTIES
|
||||
#define XmbTextEscapement XMBTEXTESCAPEMENT
|
||||
#define XmbTextExtents XMBTEXTEXTENTS
|
||||
#define XmbTextListToTextProperty XMBTEXTLISTTOTEXTPROPERTY
|
||||
#define XmbTextPropertyToTextList XMBTEXTPROPERTYTOTEXTLIST
|
||||
#define XmuClientWindow XMUCLIENTWINDOW
|
||||
#define XmuPrintDefaultErrorMessage XMUPRINTDEFAULTERRORMESSAGE
|
||||
#define XrmGetDatabase XRMGETDATABASE
|
||||
#define XrmGetResource XRMGETRESOURCE
|
||||
#define XrmPutStringResource XRMPUTSTRINGRESOURCE
|
||||
#define XrmQuarkToString XRMQUARKTOSTRING
|
||||
#define XrmStringToQuark XRMSTRINGTOQUARK
|
||||
#define XtAddCallback XTADDCALLBACK
|
||||
#define XtAddCallbacks XTADDCALLBACKS
|
||||
#define XtAddEventHandler XTADDEVENTHANDLER
|
||||
#define XtAddGrab XTADDGRAB
|
||||
#define XtAllocateGC XTALLOCATEGC
|
||||
#define XtAppAddActions XTAPPADDACTIONS
|
||||
#define XtAppAddInput XTAPPADDINPUT
|
||||
#define XtAppAddTimeOut XTAPPADDTIMEOUT
|
||||
#define XtAppCreateShell XTAPPCREATESHELL
|
||||
#define XtAppInitialize XTAPPINITIALIZE
|
||||
#define XtAppNextEvent XTAPPNEXTEVENT
|
||||
#define XtAppPeekEvent XTAPPPEEKEVENT
|
||||
#define XtAppPending XTAPPPENDING
|
||||
#define XtAppProcessEvent XTAPPPROCESSEVENT
|
||||
#define XtAppSetErrorHandler XTAPPSETERRORHANDLER
|
||||
#define XtAppSetFallbackResources XTAPPSETFALLBACKRESOURCES
|
||||
#define XtAppSetWarningHandler XTAPPSETWARNINGHANDLER
|
||||
#define XtAppSetWarningMsgHandler XTAPPSETWARNINGMSGHANDLER
|
||||
#define XtAppWarning XTAPPWARNING
|
||||
#define XtCallActionProc XTCALLACTIONPROC
|
||||
#define XtCallCallbackList XTCALLCALLBACKLIST
|
||||
#define XtCallCallbacks XTCALLCALLBACKS
|
||||
#define XtConfigureWidget XTCONFIGUREWIDGET
|
||||
#define XtConvertAndStore XTCONVERTANDSTORE
|
||||
#define XtCreateApplicationContext XTCREATEAPPLICATIONCONTEXT
|
||||
#define XtCreateManagedWidget XTCREATEMANAGEDWIDGET
|
||||
#define XtCreatePopupShell XTCREATEPOPUPSHELL
|
||||
#define XtCreateWidget XTCREATEWIDGET
|
||||
#define XtDatabase XTDATABASE
|
||||
#define XtDestroyWidget XTDESTROYWIDGET
|
||||
#define XtDisownSelection XTDISOWNSELECTION
|
||||
#define XtDispatchEvent XTDISPATCHEVENT
|
||||
#define XtDisplayOfObject XTDISPLAYOFOBJECT
|
||||
#define XtDisplayStringConvWarning XTDISPLAYSTRINGCONVWARNING
|
||||
#define XtDisplayToApplicationContext XTDISPLAYTOAPPLICATIONCONTEXT
|
||||
#define XtAppAddWorkProc XTAPPADDWORKPROC
|
||||
#define XtRemoveWorkProc XTREMOVEWORKPROC
|
||||
#define XtFree XTFREE
|
||||
#define XtGetActionKeysym XTGETACTIONKEYSYM
|
||||
#define XtGetActionList XTGETACTIONLIST
|
||||
#define XtGetApplicationNameAndClass XTGETAPPLICATIONNAMEANDCLASS
|
||||
#define XtGetApplicationResources XTGETAPPLICATIONRESOURCES
|
||||
#define XtGetGC XTGETGC
|
||||
#define XtGetMultiClickTime XTGETMULTICLICKTIME
|
||||
#define XtGetSelectionValue XTGETSELECTIONVALUE
|
||||
#define XtGetSelectionValues XTGETSELECTIONVALUES
|
||||
#define XtGetSubresources XTGETSUBRESOURCES
|
||||
#define XtGetValues XTGETVALUES
|
||||
#define XtGrabKeyboard XTGRABKEYBOARD
|
||||
#define XtGrabPointer XTGRABPOINTER
|
||||
#define XtHasCallbacks XTHASCALLBACKS
|
||||
#define XtInitializeWidgetClass XTINITIALIZEWIDGETCLASS
|
||||
#define XtInsertEventHandler XTINSERTEVENTHANDLER
|
||||
#define XtIsManaged XTISMANAGED
|
||||
#define XtIsObject XTISOBJECT
|
||||
#define XtIsSensitive XTISSENSITIVE
|
||||
#define XtIsSubclass XTISSUBCLASS
|
||||
#define XtLastTimestampProcessed XTLASTTIMESTAMPPROCESSED
|
||||
#define XtMakeGeometryRequest XTMAKEGEOMETRYREQUEST
|
||||
#define XtMakeResizeRequest XTMAKERESIZEREQUEST
|
||||
#define XtMalloc XTMALLOC
|
||||
#define XtManageChild XTMANAGECHILD
|
||||
#define XtManageChildren XTMANAGECHILDREN
|
||||
#define XtMergeArgLists XTMERGEARGLISTS
|
||||
#define XtMoveWidget XTMOVEWIDGET
|
||||
#define XtName XTNAME
|
||||
#define XtNameToWidget XTNAMETOWIDGET
|
||||
#define XtOpenDisplay XTOPENDISPLAY
|
||||
#define XtOverrideTranslations XTOVERRIDETRANSLATIONS
|
||||
#define XtOwnSelection XTOWNSELECTION
|
||||
#define XtParseTranslationTable XTPARSETRANSLATIONTABLE
|
||||
#define XtPopdown XTPOPDOWN
|
||||
#define XtPopup XTPOPUP
|
||||
#define XtQueryGeometry XTQUERYGEOMETRY
|
||||
#define XtRealizeWidget XTREALIZEWIDGET
|
||||
#define XtRealloc XTREALLOC
|
||||
#define XtReleaseGC XTRELEASEGC
|
||||
#define XtRemoveAllCallbacks XTREMOVEALLCALLBACKS
|
||||
#define XtRemoveCallback XTREMOVECALLBACK
|
||||
#define XtRemoveEventHandler XTREMOVEEVENTHANDLER
|
||||
#define XtRemoveGrab XTREMOVEGRAB
|
||||
#define XtRemoveInput XTREMOVEINPUT
|
||||
#define XtRemoveTimeOut XTREMOVETIMEOUT
|
||||
#define XtResizeWidget XTRESIZEWIDGET
|
||||
#define XtResolvePathname XTRESOLVEPATHNAME
|
||||
#define XtSetKeyboardFocus XTSETKEYBOARDFOCUS
|
||||
#define XtSetMappedWhenManaged XTSETMAPPEDWHENMANAGED
|
||||
#define XtSetSensitive XTSETSENSITIVE
|
||||
#define XtSetTypeConverter XTSETTYPECONVERTER
|
||||
#define XtSetValues XTSETVALUES
|
||||
#define XtShellStrings XTSHELLSTRINGS
|
||||
#define XtStrings XTSTRINGS
|
||||
#define XtToolkitInitialize XTTOOLKITINITIALIZE
|
||||
#define XtTranslateCoords XTTRANSLATECOORDS
|
||||
#define XtTranslateKeycode XTTRANSLATEKEYCODE
|
||||
#define XtUngrabKeyboard XTUNGRABKEYBOARD
|
||||
#define XtUngrabPointer XTUNGRABPOINTER
|
||||
#define XtUnmanageChild XTUNMANAGECHILD
|
||||
#define XtUnmanageChildren XTUNMANAGECHILDREN
|
||||
#define XtUnrealizeWidget XTUNREALIZEWIDGET
|
||||
#define XtVaCreateManagedWidget XTVACREATEMANAGEDWIDGET
|
||||
#define XtVaCreateWidget XTVACREATEWIDGET
|
||||
#define XtVaGetValues XTVAGETVALUES
|
||||
#define XtVaSetValues XTVASETVALUES
|
||||
#define XtWarning XTWARNING
|
||||
#define XtWidgetToApplicationContext XTWIDGETTOAPPLICATIONCONTEXT
|
||||
#define XtWindowOfObject XTWINDOWOFOBJECT
|
||||
#define XtWindowToWidget XTWINDOWTOWIDGET
|
||||
#define XwcDrawString XWCDRAWSTRING
|
||||
#define XwcFreeStringList XWCFREESTRINGLIST
|
||||
#define XwcTextEscapement XWCTEXTESCAPEMENT
|
||||
#define XwcTextExtents XWCTEXTEXTENTS
|
||||
#define XwcTextListToTextProperty XWCTEXTLISTTOTEXTPROPERTY
|
||||
#define XwcTextPropertyToTextList XWCTEXTPROPERTYTOTEXTLIST
|
||||
#define _XmBottomShadowColorDefault _XMBOTTOMSHADOWCOLORDEFAULT
|
||||
#define _XmClearBorder _XMCLEARBORDER
|
||||
#define _XmConfigureObject _XMCONFIGUREOBJECT
|
||||
#define _XmDestroyParentCallback _XMDESTROYPARENTCALLBACK
|
||||
#define _XmDrawArrow _XMDRAWARROW
|
||||
#define _XmDrawShadows _XMDRAWSHADOWS
|
||||
#define _XmFontListGetDefaultFont _XMFONTLISTGETDEFAULTFONT
|
||||
#define _XmFromHorizontalPixels _XMFROMHORIZONTALPIXELS
|
||||
#define _XmFromVerticalPixels _XMFROMVERTICALPIXELS
|
||||
#define _XmGetClassExtensionPtr _XMGETCLASSEXTENSIONPTR
|
||||
#define _XmGetDefaultFontList _XMGETDEFAULTFONTLIST
|
||||
#define _XmGetTextualDragIcon _XMGETTEXTUALDRAGICON
|
||||
#define _XmGetWidgetExtData _XMGETWIDGETEXTDATA
|
||||
#define _XmGrabKeyboard _XMGRABKEYBOARD
|
||||
#define _XmGrabPointer _XMGRABPOINTER
|
||||
#define _XmInheritClass _XMINHERITCLASS
|
||||
#define _XmInputInGadget _XMINPUTINGADGET
|
||||
#define _XmMakeGeometryRequest _XMMAKEGEOMETRYREQUEST
|
||||
#define _XmMenuPopDown _XMMENUPOPDOWN
|
||||
#define _XmMoveObject _XMMOVEOBJECT
|
||||
#define _XmNavigChangeManaged _XMNAVIGCHANGEMANAGED
|
||||
#define _XmOSBuildFileList _XMOSBUILDFILELIST
|
||||
#define _XmOSFileCompare _XMOSFILECOMPARE
|
||||
#define _XmOSFindPatternPart _XMOSFINDPATTERNPART
|
||||
#define _XmOSQualifyFileSpec _XMOSQUALIFYFILESPEC
|
||||
#define _XmPostPopupMenu _XMPOSTPOPUPMENU
|
||||
#define _XmPrimitiveEnter _XMPRIMITIVEENTER
|
||||
#define _XmPrimitiveLeave _XMPRIMITIVELEAVE
|
||||
#define _XmRedisplayGadgets _XMREDISPLAYGADGETS
|
||||
#define _XmShellIsExclusive _XMSHELLISEXCLUSIVE
|
||||
#define _XmStringDraw _XMSTRINGDRAW
|
||||
#define _XmStringGetTextConcat _XMSTRINGGETTEXTCONCAT
|
||||
#define _XmStrings _XMSTRINGS
|
||||
#define _XmToHorizontalPixels _XMTOHORIZONTALPIXELS
|
||||
#define _XmToVerticalPixels _XMTOVERTICALPIXELS
|
||||
#define _XmTopShadowColorDefault _XMTOPSHADOWCOLORDEFAULT
|
||||
#define _Xm_fastPtr _XM_FASTPTR
|
||||
#define _XtCheckSubclassFlag _XTCHECKSUBCLASSFLAG
|
||||
#define _XtInherit _XTINHERIT
|
||||
#define _XtInheritTranslations _XTINHERITTRANSLATIONS
|
||||
#define applicationShellWidgetClass APPLICATIONSHELLWIDGETCLASS
|
||||
#define compositeWidgetClass COMPOSITEWIDGETCLASS
|
||||
#define overrideShellWidgetClass OVERRIDESHELLWIDGETCLASS
|
||||
#define shellWidgetClass SHELLWIDGETCLASS
|
||||
#define topLevelShellClassRec TOPLEVELSHELLCLASSREC
|
||||
#define topLevelShellWidgetClass TOPLEVELSHELLWIDGETCLASS
|
||||
#define transientShellWidgetClass TRANSIENTSHELLWIDGETCLASS
|
||||
#define vendorShellClassRec VENDORSHELLCLASSREC
|
||||
#define vendorShellWidgetClass VENDORSHELLWIDGETCLASS
|
||||
#define wmShellWidgetClass WMSHELLWIDGETCLASS
|
||||
#define xmArrowButtonWidgetClass XMARROWBUTTONWIDGETCLASS
|
||||
#define xmCascadeButtonClassRec XMCASCADEBUTTONCLASSREC
|
||||
#define xmCascadeButtonGadgetClass XMCASCADEBUTTONGADGETCLASS
|
||||
#define xmCascadeButtonWidgetClass XMCASCADEBUTTONWIDGETCLASS
|
||||
#define xmDialogShellWidgetClass XMDIALOGSHELLWIDGETCLASS
|
||||
#define xmDrawingAreaWidgetClass XMDRAWINGAREAWIDGETCLASS
|
||||
#define xmDrawnButtonWidgetClass XMDRAWNBUTTONWIDGETCLASS
|
||||
#define xmFileSelectionBoxWidgetClass XMFILESELECTIONBOXWIDGETCLASS
|
||||
#define xmFormWidgetClass XMFORMWIDGETCLASS
|
||||
#define xmFrameWidgetClass XMFRAMEWIDGETCLASS
|
||||
#define xmGadgetClass XMGADGETCLASS
|
||||
#define xmLabelGadgetClass XMLABELGADGETCLASS
|
||||
#define xmLabelWidgetClass XMLABELWIDGETCLASS
|
||||
#define xmListWidgetClass XMLISTWIDGETCLASS
|
||||
#define xmMainWindowWidgetClass XMMAINWINDOWWIDGETCLASS
|
||||
#define xmManagerClassRec XMMANAGERCLASSREC
|
||||
#define xmManagerWidgetClass XMMANAGERWIDGETCLASS
|
||||
#define xmMenuShellWidgetClass XMMENUSHELLWIDGETCLASS
|
||||
#define xmMessageBoxWidgetClass XMMESSAGEBOXWIDGETCLASS
|
||||
#define xmPrimitiveClassRec XMPRIMITIVECLASSREC
|
||||
#define xmPrimitiveWidgetClass XMPRIMITIVEWIDGETCLASS
|
||||
#define xmPushButtonClassRec XMPUSHBUTTONCLASSREC
|
||||
#define xmPushButtonGadgetClass XMPUSHBUTTONGADGETCLASS
|
||||
#define xmPushButtonWidgetClass XMPUSHBUTTONWIDGETCLASS
|
||||
#define xmRowColumnWidgetClass XMROWCOLUMNWIDGETCLASS
|
||||
#define xmSashWidgetClass XMSASHWIDGETCLASS
|
||||
#define xmScrollBarWidgetClass XMSCROLLBARWIDGETCLASS
|
||||
#define xmScrolledWindowClassRec XMSCROLLEDWINDOWCLASSREC
|
||||
#define xmScrolledWindowWidgetClass XMSCROLLEDWINDOWWIDGETCLASS
|
||||
#define xmSeparatorGadgetClass XMSEPARATORGADGETCLASS
|
||||
#define xmSeparatorWidgetClass XMSEPARATORWIDGETCLASS
|
||||
#define xmTextFieldWidgetClass XMTEXTFIELDWIDGETCLASS
|
||||
#define xmTextWidgetClass XMTEXTWIDGETCLASS
|
||||
#define xmToggleButtonGadgetClass XMTOGGLEBUTTONGADGETCLASS
|
||||
#define xmToggleButtonWidgetClass XMTOGGLEBUTTONWIDGETCLASS
|
||||
#define XtRegisterDrawable _XTREGISTERWINDOW
|
||||
#define XtUnregisterDrawable _XTUNREGISTERWINDOW
|
||||
#define XQueryFont XQUERYFONT
|
||||
#define XSetPlaneMask XSETPLANEMASK
|
||||
#define XChangeKeyboardControl XCHANGEKEYBOARDCONTROL
|
||||
#define XDestroySubwindows XDESTROYSUBWINDOWS
|
||||
#define XFreeDeviceList XFREEDEVICELIST
|
||||
#define XFreeDeviceState XFREEDEVICESTATE
|
||||
#define XGetExtensionVersion XGETEXTENSIONVERSION
|
||||
#define XGetRGBColormaps XGETRGBCOLORMAPS
|
||||
#define XIconifyWindow XICONIFYWINDOW
|
||||
#define XInstallColormap XINSTALLCOLORMAP
|
||||
#define XListInputDevices XLISTINPUTDEVICES
|
||||
#define XLookupKeysym XLOOKUPKEYSYM
|
||||
#define XOpenDevice XOPENDEVICE
|
||||
#define XQueryDeviceState XQUERYDEVICESTATE
|
||||
#define XSelectExtensionEvent XSELECTEXTENSIONEVENT
|
||||
#define XWarpPointer XWARPPOINTER
|
||||
#define XmuLookupStandardColormap XMULOOKUPSTANDARDCOLORMAP
|
||||
#define XAllocNamedColor XALLOCNAMEDCOLOR
|
||||
#define XBlackPixelOfScreen XBLACKPIXELOFSCREEN
|
||||
#define XDefaultColormap XDEFAULTCOLORMAP
|
||||
#define XDefaultColormapOfScreen XDEFAULTCOLORMAPOFSCREEN
|
||||
#define XDefaultDepth XDEFAULTDEPTH
|
||||
#define XDefaultScreen XDEFAULTSCREEN
|
||||
#define XDefaultVisual XDEFAULTVISUAL
|
||||
#define XSetIconName XSETICONNAME
|
||||
#define XtInitialize XTINITIALIZE
|
||||
#define XtMainLoop XTMAINLOOP
|
||||
#define DtSaverGetWindows DTSAVERGETWINDOWS
|
||||
#define XAddHosts XADDHOSTS
|
||||
#define XDisableAccessControl XDISABLEACCESSCONTROL
|
||||
#define XEnableAccessControl XENABLEACCESSCONTROL
|
||||
#define XFillArcs XFILLARCS
|
||||
#define XForceScreenSaver XFORCESCREENSAVER
|
||||
#define XGetScreenSaver XGETSCREENSAVER
|
||||
#define XListHosts XLISTHOSTS
|
||||
#define XReadBitmapFile XREADBITMAPFILE
|
||||
#define XRemoveHosts XREMOVEHOSTS
|
||||
#define XResetScreenSaver XRESETSCREENSAVER
|
||||
#define XResourceManagerString XRESOURCEMANAGERSTRING
|
||||
#define XSetScreenSaver XSETSCREENSAVER
|
||||
#define XStringListToTextProperty XSTRINGLISTTOTEXTPROPERTY
|
||||
#define XrmDestroyDatabase XRMDESTROYDATABASE
|
||||
#define XrmGetFileDatabase XRMGETFILEDATABASE
|
||||
#define XrmGetStringDatabase XRMGETSTRINGDATABASE
|
||||
#define XrmInitialize XRMINITIALIZE
|
||||
#define XrmMergeDatabases XRMMERGEDATABASES
|
||||
#define XrmParseCommand XRMPARSECOMMAND
|
||||
#define XrmPutLineResource XRMPUTLINERESOURCE
|
||||
#define XrmQPutStringResource XRMQPUTSTRINGRESOURCE
|
||||
#define XrmStringToBindingQuarkList XRMSTRINGTOBINDINGQUARKLIST
|
||||
#define XrmStringToQuark XRMSTRINGTOQUARK
|
||||
#define XmCreateLabel XMCREATELABEL
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern void XtFree(char*);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define pthread_attr_create PTHREAD_ATTR_CREATE
|
||||
#define pthread_attr_delete PTHREAD_ATTR_DELETE
|
||||
#define pthread_attr_destroy PTHREAD_ATTR_DESTROY
|
||||
#define pthread_attr_getdetach_np PTHREAD_ATTR_GETDETACH_NP
|
||||
#define pthread_attr_getguardsize_np PTHREAD_ATTR_GETGUARDSIZE_NP
|
||||
#define pthread_attr_getinheritsched PTHREAD_ATTR_GETINHERITSCHED
|
||||
#define pthread_attr_getprio PTHREAD_ATTR_GETPRIO
|
||||
#define pthread_attr_getsched PTHREAD_ATTR_GETSCHED
|
||||
#define pthread_attr_getschedparam PTHREAD_ATTR_GETSCHEDPARAM
|
||||
#define pthread_attr_getstacksize PTHREAD_ATTR_GETSTACKSIZE
|
||||
#define pthread_attr_init PTHREAD_ATTR_INIT
|
||||
#define pthread_attr_setdetach_np PTHREAD_ATTR_SETDETACH_NP
|
||||
#define pthread_attr_setdetachstate PTHREAD_ATTR_SETDETACHSTATE
|
||||
#define pthread_attr_setguardsize_np PTHREAD_ATTR_SETGUARDSIZE_NP
|
||||
#define pthread_attr_setinheritsched PTHREAD_ATTR_SETINHERITSCHED
|
||||
#define pthread_attr_setprio PTHREAD_ATTR_SETPRIO
|
||||
#define pthread_attr_setsched PTHREAD_ATTR_SETSCHED
|
||||
#define pthread_attr_setschedparam PTHREAD_ATTR_SETSCHEDPARAM
|
||||
#define pthread_attr_setschedpolicy PTHREAD_ATTR_SETSCHEDPOLICY
|
||||
#define pthread_attr_setstacksize PTHREAD_ATTR_SETSTACKSIZE
|
||||
#define pthread_cancel PTHREAD_CANCEL
|
||||
#define pthread_cancel_e PTHREAD_CANCEL_E
|
||||
#define pthread_cond_broadcast PTHREAD_COND_BROADCAST
|
||||
#define pthread_cond_destroy PTHREAD_COND_DESTROY
|
||||
#define pthread_cond_init PTHREAD_COND_INIT
|
||||
#define pthread_cond_sig_preempt_int_np PTHREAD_COND_SIG_PREEMPT_INT_NP
|
||||
#define pthread_cond_signal PTHREAD_COND_SIGNAL
|
||||
#define pthread_cond_signal_int_np PTHREAD_COND_SIGNAL_INT_NP
|
||||
#define pthread_cond_timedwait PTHREAD_COND_TIMEDWAIT
|
||||
#define pthread_cond_wait PTHREAD_COND_WAIT
|
||||
#define pthread_condattr_create PTHREAD_CONDATTR_CREATE
|
||||
#define pthread_condattr_delete PTHREAD_CONDATTR_DELETE
|
||||
#define pthread_condattr_init PTHREAD_CONDATTR_INIT
|
||||
#define pthread_create PTHREAD_CREATE
|
||||
#define pthread_delay_np PTHREAD_DELAY_NP
|
||||
#define pthread_detach PTHREAD_DETACH
|
||||
#define pthread_equal PTHREAD_EQUAL
|
||||
#define pthread_exc_fetch_fp_np PTHREAD_EXC_FETCH_FP_NP
|
||||
#define pthread_exc_handler_np PTHREAD_EXC_HANDLER_NP
|
||||
#define pthread_exc_pop_ctx_np PTHREAD_EXC_POP_CTX_NP
|
||||
#define pthread_exc_push_ctx_np PTHREAD_EXC_PUSH_CTX_NP
|
||||
#define pthread_exc_savecontext_np PTHREAD_EXC_SAVECONTEXT_NP
|
||||
#define pthread_exit PTHREAD_EXIT
|
||||
#define pthread_get_expiration_np PTHREAD_GET_EXPIRATION_NP
|
||||
#define pthread_getprio PTHREAD_GETPRIO
|
||||
#define pthread_getschedparam PTHREAD_GETSCHEDPARAM
|
||||
#define pthread_getscheduler PTHREAD_GETSCHEDULER
|
||||
#define pthread_getspecific PTHREAD_GETSPECIFIC
|
||||
#define pthread_getunique_np PTHREAD_GETUNIQUE_NP
|
||||
#define pthread_join PTHREAD_JOIN
|
||||
#define pthread_join32 PTHREAD_JOIN32
|
||||
#define pthread_keycreate PTHREAD_KEYCREATE
|
||||
#define pthread_key_create PTHREAD_KEY_CREATE
|
||||
#define pthread_kill PTHREAD_KILL
|
||||
#define pthread_lock_global_np PTHREAD_LOCK_GLOBAL_NP
|
||||
#define pthread_mutex_destroy PTHREAD_MUTEX_DESTROY
|
||||
#define pthread_mutex_init PTHREAD_MUTEX_INIT
|
||||
#define pthread_mutex_lock PTHREAD_MUTEX_LOCK
|
||||
#define pthread_mutex_trylock PTHREAD_MUTEX_TRYLOCK
|
||||
#define pthread_mutex_unlock PTHREAD_MUTEX_UNLOCK
|
||||
#define pthread_mutexattr_create PTHREAD_MUTEXATTR_CREATE
|
||||
#define pthread_mutexattr_delete PTHREAD_MUTEXATTR_DELETE
|
||||
#define pthread_mutexattr_destroy PTHREAD_MUTEXATTR_DESTROY
|
||||
#define pthread_mutexattr_getkind_np PTHREAD_MUTEXATTR_GETKIND_NP
|
||||
#define pthread_mutexattr_init PTHREAD_MUTEXATTR_INIT
|
||||
#define pthread_mutexattr_setkind_np PTHREAD_MUTEXATTR_SETKIND_NP
|
||||
#define pthread_mutexattr_settype_np PTHREAD_MUTEXATTR_SETTYPE_NP
|
||||
#define pthread_once PTHREAD_ONCE
|
||||
#define pthread_resume_np PTHREAD_RESUME_NP
|
||||
#define pthread_self PTHREAD_SELF
|
||||
#define pthread_setasynccancel PTHREAD_SETASYNCCANCEL
|
||||
#define pthread_setcancel PTHREAD_SETCANCEL
|
||||
#define pthread_setcancelstate PTHREAD_SETCANCELSTATE
|
||||
#define pthread_setprio PTHREAD_SETPRIO
|
||||
#define pthread_setschedparam PTHREAD_SETSCHEDPARAM
|
||||
#define pthread_setscheduler PTHREAD_SETSCHEDULER
|
||||
#define pthread_setspecific PTHREAD_SETSPECIFIC
|
||||
#define pthread_suspend_np PTHREAD_SUSPEND_NP
|
||||
#define pthread_testcancel PTHREAD_TESTCANCEL
|
||||
#define pthread_unlock_global_np PTHREAD_UNLOCK_GLOBAL_NP
|
||||
#define pthread_yield PTHREAD_YIELD
|
||||
#define pthread_yield_np PTHREAD_YIELD_NP
|
||||
#define XDefaultRootWindow XDEFAULTROOTWINDOW
|
||||
#define XDisplayCells XDISPLAYCELLS
|
||||
#define XMaxRequestSize XMAXREQUESTSIZE
|
||||
#define XScreenOfDisplay XSCREENOFDISPLAY
|
||||
#define XSetFillRule XSETFILLRULE
|
||||
#define XmActivateProtocol XMACTIVATEPROTOCOL
|
||||
#define XmCreateBulletinBoardDialog XMCREATEBULLETINBOARDDIALOG
|
||||
#define XmCreateErrorDialog XMCREATEERRORDIALOG
|
||||
#define XmCreateWarningDialog XMCREATEWARNINGDIALOG
|
||||
#define XmCvtCTToXmString XMCVTCTTOXMSTRING
|
||||
#define XmDestroyPixmap XMDESTROYPIXMAP
|
||||
#define XmGetPixmap XMGETPIXMAP
|
||||
#define XmInstallImage XMINSTALLIMAGE
|
||||
#define XmListAddItems XMLISTADDITEMS
|
||||
#define XmListDeleteItem XMLISTDELETEITEM
|
||||
#define XmListItemExists XMLISTITEMEXISTS
|
||||
#define XmListItemPos XMLISTITEMPOS
|
||||
#define XmListReplaceItems XMLISTREPLACEITEMS
|
||||
#define XmListReplaceItemsPos XMLISTREPLACEITEMSPOS
|
||||
#define XmRemoveProtocols XMREMOVEPROTOCOLS
|
||||
#define XmRemoveTabGroup XMREMOVETABGROUP
|
||||
#define XmSetColorCalculation XMSETCOLORCALCULATION
|
||||
#define XmTextCopy XMTEXTCOPY
|
||||
#define XmTextCut XMTEXTCUT
|
||||
#define XmTextFieldClearSelection XMTEXTFIELDCLEARSELECTION
|
||||
#define XmTextFieldCopy XMTEXTFIELDCOPY
|
||||
#define XmTextFieldCut XMTEXTFIELDCUT
|
||||
#define XmTextFieldGetMaxLength XMTEXTFIELDGETMAXLENGTH
|
||||
#define XmTextFieldGetSelectionPosition XMTEXTFIELDGETSELECTIONPOSITION
|
||||
#define XmTextFieldPaste XMTEXTFIELDPASTE
|
||||
#define XmTextFieldReplace XMTEXTFIELDREPLACE
|
||||
#define XmTextFieldSetAddMode XMTEXTFIELDSETADDMODE
|
||||
#define XmTextFieldSetHighlight XMTEXTFIELDSETHIGHLIGHT
|
||||
#define XmTextFieldSetInsertionPosition XMTEXTFIELDSETINSERTIONPOSITION
|
||||
#define XmTextFieldSetMaxLength XMTEXTFIELDSETMAXLENGTH
|
||||
#define XmTextFieldShowPosition XMTEXTFIELDSHOWPOSITION
|
||||
#define XmTextGetEditable XMTEXTGETEDITABLE
|
||||
#define XmTextPaste XMTEXTPASTE
|
||||
#define XmTextPosToXY XMTEXTPOSTOXY
|
||||
#define XmTextSetEditable XMTEXTSETEDITABLE
|
||||
#define XmTextShowPosition XMTEXTSHOWPOSITION
|
||||
#define XmUninstallImage XMUNINSTALLIMAGE
|
||||
#define XmuCvtStringToBitmap XMUCVTSTRINGTOBITMAP
|
||||
#define XrmPutFileDatabase XRMPUTFILEDATABASE
|
||||
#define XtAddConverter XTADDCONVERTER
|
||||
#define XtError XTERROR
|
||||
#define XtVaCreatePopupShell XTVACREATEPOPUPSHELL
|
||||
#define pthread_attr_getschedpolicy PTHREAD_ATTR_GETSCHEDPOLICY
|
||||
#define pthread_key_delete PTHREAD_KEY_DELETE
|
||||
#define xmBulletinBoardWidgetClass XMBULLETINBOARDWIDGETCLASS
|
||||
#define xmScaleWidgetClass XMSCALEWIDGETCLASS
|
||||
#define XtDisplay XTDISPLAY
|
||||
#define XtScreen XTSCREEN
|
||||
#define XAllocIconSize XALLOCICONSIZE
|
||||
#define XAllocStandardColormap XALLOCSTANDARDCOLORMAP
|
||||
#define XAllowEvents XALLOWEVENTS
|
||||
#define XBlackPixel XBLACKPIXEL
|
||||
#define XCopyColormapAndFree XCOPYCOLORMAPANDFREE
|
||||
#define XDefaultGC XDEFAULTGC
|
||||
#define XDisplayHeight XDISPLAYHEIGHT
|
||||
#define XDisplayWidth XDISPLAYWIDTH
|
||||
#define XGetCommand XGETCOMMAND
|
||||
#define XGetIconSizes XGETICONSIZES
|
||||
#define XKillClient XKILLCLIENT
|
||||
#define XListInstalledColormaps XLISTINSTALLEDCOLORMAPS
|
||||
#define XRootWindow XROOTWINDOW
|
||||
#define XWMGeometry XWMGEOMETRY
|
||||
#define XWhitePixel XWHITEPIXEL
|
||||
#define XrmCombineDatabase XRMCOMBINEDATABASE
|
||||
#define XrmCombineFileDatabase XRMCOMBINEFILEDATABASE
|
||||
#define XSetStandardProperties XSETSTANDARDPROPERTIES
|
||||
#define XSetState XSETSTATE
|
||||
#define XDrawRectangles XDRAWRECTANGLES
|
||||
#define XGrabButton XGRABBUTTON
|
||||
#define XLookupColor XLOOKUPCOLOR
|
||||
#define XMapSubwindows XMAPSUBWINDOWS
|
||||
#define XRecolorCursor XRECOLORCURSOR
|
||||
#define XStoreBytes XSTOREBYTES
|
||||
#define XUngrabButton XUNGRABBUTTON
|
||||
#define XUninstallColormap XUNINSTALLCOLORMAP
|
||||
#define lib$wait LIB$WAIT
|
||||
#define lib$find_file LIB$FIND_FILE
|
||||
#define lib$find_file_end LIB$FIND_FILE_END
|
||||
#define lib$set_symbol LIB$SET_SYMBOL
|
||||
#define lib$sfree1_dd LIB$SFREE1_DD
|
||||
#define lib$spawn LIB$SPAWN
|
||||
#define sys$assign SYS$ASSIGN
|
||||
#define sys$crembx SYS$CREMBX
|
||||
#define sys$dassgn SYS$DASSGN
|
||||
#define sys$dclexh SYS$DCLEXH
|
||||
#define sys$getdviw SYS$GETDVIW
|
||||
#define sys$getsyiw SYS$GETSYIW
|
||||
#define sys$qio SYS$QIO
|
||||
#define sys$qiow SYS$QIOW
|
||||
#define sys$setef SYS$SETEF
|
||||
#define sys$synch SYS$SYNCH
|
||||
#define XDrawText XDRAWTEXT
|
||||
#define XtCloseDisplay XTCLOSEDISPLAY
|
||||
#define XtDestroyApplicationContext XTDESTROYAPPLICATIONCONTEXT
|
||||
#define lib$ediv LIB$EDIV
|
||||
#define lib$subx LIB$SUBX
|
||||
#define sys$bintim SYS$BINTIM
|
||||
#define sys$gettim SYS$GETTIM
|
||||
#define XFetchName XFETCHNAME
|
||||
#define XPeekIfEvent XPEEKIFEVENT
|
||||
#define XQueryKeymap XQUERYKEYMAP
|
||||
#endif
|
@@ -1,6 +1,6 @@
|
||||
# Makefile for GLUT-based demo programs for VMS
|
||||
# Makefile for core library for VMS
|
||||
# contributed by Jouk Jansen joukj@crys.chem.uva.nl
|
||||
|
||||
# Last revision : 3 May 1999
|
||||
|
||||
.first
|
||||
define gl [-.include.gl]
|
||||
@@ -9,55 +9,172 @@
|
||||
|
||||
##### MACROS #####
|
||||
|
||||
VPATH = RCS
|
||||
|
||||
INCDIR = [-.include]
|
||||
CFLAGS = /include=$(INCDIR)/prefix=all
|
||||
LIBDIR = [-.lib]
|
||||
CFLAGS = /include=($(INCDIR),[])/define=(FBIND=1)/name=(as_is,short)
|
||||
|
||||
.ifdef SHARE
|
||||
GL_LIBS = $(XLIBS)
|
||||
.else
|
||||
GL_LIBS = [-.lib]libGLUT/l,libMesaGLU/l,libMesaGL/l,$(XLIBS)
|
||||
.endif
|
||||
CORE_SOURCES = aatriangle.c accum.c alpha.c alphabuf.c attrib.c \
|
||||
bitmap.c blend.c buffers.c clip.c colortab.c context.c copypix.c depth.c \
|
||||
dispatch.c \
|
||||
dlist.c drawpix.c enable.c eval.c feedback.c fog.c \
|
||||
get.c hash.c hint.c image.c imaging.c light.c lines.c logic.c masking.c matrix.c \
|
||||
mem.c glapi.c glapinoop.c \
|
||||
mmath.c pb.c pixel.c points.c polygon.c \
|
||||
quads.c rastpos.c readpix.c rect.c scissor.c shade.c span.c \
|
||||
stencil.c teximage.c texobj.c texstate.c texture.c translate.c triangle.c \
|
||||
varray.c winpos.c vb.c vbcull.c vbfill.c vbrender.c vbxform.c xform.c \
|
||||
zoom.c bbox.c cva.c vector.c vbindirect.c config.c enums.c extensions.c \
|
||||
pipeline.c stages.c state.c vertices.c [.x86]x86.c
|
||||
|
||||
LIB_DEP = [-.lib]$(GL_LIB) [-.lib]$(GLU_LIB) [-.lib]$(GLUT_LIB)
|
||||
DRIVER_SOURCES = [.x]glxapi.c [.x]fakeglx.c [.x]xfonts.c \
|
||||
[.x]xmesa1.c [.x]xmesa2.c [.x]xmesa3.c [.x]xmesa4.c \
|
||||
[.osmesa]osmesa.c \
|
||||
[.svga]svgamesa.c \
|
||||
[.fx]fxapi.c [.fx]fxdd.c [.fx]fxddtex.c [.fx]fxvsetup.c [.fx]fxsetup.c \
|
||||
[.fx]fxtrifuncs.c [.fx]fxclip.c [.fx]fxfastpath.c [.fx]fxpipeline.c\
|
||||
[.fx]fxrender.c [.fx]fxtexman.c [.fx]fxddspan.c [.fx]fxcva.c [.fx]fxsanity.c\
|
||||
[.fx]fxglidew.c
|
||||
|
||||
PROGS = bounce.exe;,clearspd.exe;,drawpix.exe;,gamma.exe;,gears.exe;,\
|
||||
glinfo.exe;,glutfx.exe;,isosurf.exe;,morph3d.exe;,osdemo.exe;,\
|
||||
paltex.exe;,pointblast.exe;,reflect.exe;,spectex.exe;,stex3d.exe;,\
|
||||
tessdemo.exe;,texcyl.exe;,texobj.exe;,trispd.exe;,winpos.exe;
|
||||
ASM_SOURCES =
|
||||
|
||||
OBJECTS =aatriangle.obj,\
|
||||
accum.obj,alpha.obj,alphabuf.obj,attrib.obj,\
|
||||
bitmap.obj,blend.obj,buffers.obj,clip.obj,colortab.obj,context.obj,copypix.obj,depth.obj,\
|
||||
dlist.obj,drawpix.obj,enable.obj,eval.obj,feedback.obj,fog.obj
|
||||
|
||||
|
||||
OBJECTS3=get.obj,hash.obj,hint.obj,image.obj,light.obj,lines.obj,logic.obj,masking.obj,\
|
||||
matrix.obj,glapi.obj,glapinoop.obj,dispatch.obj,imaging.obj,mem.obj,\
|
||||
mmath.obj,pb.obj,pixel.obj,points.obj
|
||||
|
||||
OBJECTS7=polygon.obj,\
|
||||
quads.obj,rastpos.obj,readpix.obj,rect.obj,scissor.obj,shade.obj,span.obj,\
|
||||
pixeltex.obj
|
||||
|
||||
OBJECTS4=stencil.obj,teximage.obj,texobj.obj,texstate.obj,texture.obj,translate.obj,\
|
||||
triangle.obj,varray.obj,winpos.obj,vb.obj,vbcull.obj,vbfill.obj,vbrender.obj
|
||||
|
||||
OBJECTS6=vbxform.obj,xform.obj,zoom.obj,bbox.obj,cva.obj,vector.obj,vbindirect.obj,\
|
||||
config.obj,enums.obj,extensions.obj,pipeline.obj,stages.obj,state.obj,\
|
||||
vertices.obj,[.x86]x86.obj
|
||||
|
||||
OBJECTS2=[.x]glxapi.obj,[.x]fakeglx.obj,[.x]xfonts.obj,\
|
||||
[.x]xmesa1.obj,[.x]xmesa2.obj,[.x]xmesa3.obj,[.x]xmesa4.obj,\
|
||||
[.osmesa]osmesa.obj,\
|
||||
[.svga]svgamesa.obj
|
||||
|
||||
OBJECTS5=[.fx]fxapi.obj,[.fx]fxdd.obj,[.fx]fxddtex.obj,[.fx]fxvsetup.obj,\
|
||||
[.fx]fxsetup.obj,[.fx]fxclip.obj,[.fx]fxfastpath.obj,[.fx]fxpipeline.obj
|
||||
|
||||
OBJECTS8=[.fx]fxtrifuncs.obj,[.fx]fxsanity.obj,[.fx]fxglidew.obj,\
|
||||
[.fx]fxrender.obj,[.fx]fxtexman.obj,[.fx]fxddspan.obj,[.fx]fxcva.obj
|
||||
|
||||
##### RULES #####
|
||||
.obj.exe :
|
||||
link $(MMS$TARGET_NAME),$(GL_LIBS)
|
||||
|
||||
VERSION=Mesa V3.1
|
||||
|
||||
##### TARGETS #####
|
||||
default :
|
||||
$(MMS)$(MMSQUALIFIERS) $(PROGS)
|
||||
# Make the library
|
||||
$(LIBDIR)$(GL_LIB) : $(OBJECTS),$(OBJECTS2) $(OBJECTS3) $(OBJECTS4)\
|
||||
$(OBJECTS5) $(OBJECTS8) $(OBJECTS7) $(OBJECTS6)
|
||||
.ifdef SHARE
|
||||
@ WRITE_ SYS$OUTPUT " generating mesagl1.opt"
|
||||
@ OPEN_/WRITE FILE mesagl1.opt
|
||||
@ WRITE_ FILE "!"
|
||||
@ WRITE_ FILE "! mesagl1.opt generated by DESCRIP.$(MMS_EXT)"
|
||||
@ WRITE_ FILE "!"
|
||||
@ WRITE_ FILE "IDENTIFICATION=""$(VERSION)"""
|
||||
@ WRITE_ FILE "GSMATCH=LEQUAL,3,1
|
||||
@ WRITE_ FILE "$(OBJECTS)"
|
||||
@ WRITE_ FILE "$(OBJECTS3)"
|
||||
@ WRITE_ FILE "$(OBJECTS4)"
|
||||
@ WRITE_ FILE "$(OBJECTS7)"
|
||||
@ WRITE_ FILE "$(OBJECTS6)"
|
||||
@ WRITE_ FILE "$(OBJECTS2)"
|
||||
@ WRITE_ FILE "$(OBJECTS5)"
|
||||
@ WRITE_ FILE "$(OBJECTS8)"
|
||||
@ WRITE_ FILE "SYS$SHARE:DECW$XEXTLIBSHR/SHARE"
|
||||
@ WRITE_ FILE "SYS$SHARE:DECW$XLIBSHR/SHARE"
|
||||
@ CLOSE_ FILE
|
||||
@ WRITE_ SYS$OUTPUT " generating mesagl.map ..."
|
||||
@ LINK_/NODEB/NOSHARE/NOEXE/MAP=mesagl.map/FULL mesagl1.opt/OPT
|
||||
@ WRITE_ SYS$OUTPUT " analyzing mesagl.map ..."
|
||||
@ @[-.vms]ANALYZE_MAP.COM mesagl.map mesagl.opt
|
||||
@ WRITE_ SYS$OUTPUT " linking $(GL_LIB) ..."
|
||||
@ LINK_/NODEB/SHARE=$(GL_LIB)/MAP=mesagl.map/FULL mesagl1.opt/opt,mesagl.opt/opt
|
||||
.else
|
||||
@ $(MAKELIB) $(GL_LIB) $(OBJECTS)
|
||||
@ library $(GL_LIB) $(OBJECTS2)
|
||||
@ library $(GL_LIB) $(OBJECTS3)
|
||||
@ library $(GL_LIB) $(OBJECTS4)
|
||||
@ library $(GL_LIB) $(OBJECTS5)
|
||||
@ library $(GL_LIB) $(OBJECTS8)
|
||||
@ library $(GL_LIB) $(OBJECTS7)
|
||||
@ library $(GL_LIB) $(OBJECTS6)
|
||||
.endif
|
||||
@ rename $(GL_LIB)* $(LIBDIR)
|
||||
|
||||
clean :
|
||||
purge
|
||||
delete *.obj;*
|
||||
|
||||
realclean :
|
||||
delete $(PROGS)
|
||||
delete *.obj;*
|
||||
aatriangle.obj : aatriangle.c
|
||||
|
||||
bounce.exe; : bounce.obj $(LIB_DEP)
|
||||
clearspd.exe; : clearspd.obj $(LIB_DEP)
|
||||
drawpix.exe; : drawpix.obj $(LIB_DEP)
|
||||
gamma.exe; : gamma.obj $(LIB_DEP)
|
||||
gears.exe; : gears.obj $(LIB_DEP)
|
||||
glinfo.exe; : glinfo.obj $(LIB_DEP)
|
||||
glutfx.exe; : glutfx.obj $(LIB_DEP)
|
||||
isosurf.exe; : isosurf.obj $(LIB_DEP)
|
||||
morph3d.exe; : morph3d.obj $(LIB_DEP)
|
||||
osdemo.exe; : osdemo.obj $(LIB_DEP)
|
||||
paltex.exe; : paltex.obj $(LIB_DEP)
|
||||
pointblast.exe; : pointblast.obj $(LIB_DEP)
|
||||
reflect.exe; : reflect.obj $(LIB_DEP)
|
||||
spectex.exe; : spectex.obj $(LIB_DEP)
|
||||
stex3d.exe; : stex3d.obj $(LIB_DEP)
|
||||
tessdemo.exe; : tessdemo.obj $(LIB_DEP)
|
||||
texcyl.exe; : texcyl.obj $(LIB_DEP)
|
||||
texobj.exe; : texobj.obj $(LIB_DEP)
|
||||
trispd.exe; : trispd.obj $(LIB_DEP)
|
||||
winpos.exe; : winpos.obj $(LIB_DEP)
|
||||
triangle.obj : triangle.c
|
||||
|
||||
pixeltex.obj : pixeltex.c
|
||||
|
||||
[.x86]x86.obj : [.x86]x86.c
|
||||
$(CC) $(CFLAGS) /obj=[.x86]x86.obj [.x86]x86.c
|
||||
[.x]glxapi.obj : [.x]glxapi.c
|
||||
$(CC) $(CFLAGS) /obj=[.x]glxapi.obj [.x]glxapi.c
|
||||
[.x]fakeglx.obj : [.x]fakeglx.c
|
||||
$(CC) $(CFLAGS) /obj=[.x]fakeglx.obj [.x]fakeglx.c
|
||||
[.x]xfonts.obj : [.x]xfonts.c
|
||||
$(CC) $(CFLAGS) /obj=[.x]xfonts.obj [.x]xfonts.c
|
||||
[.x]xmesa1.obj : [.x]xmesa1.c
|
||||
$(CC) $(CFLAGS) /obj=[.x]xmesa1.obj [.x]xmesa1.c
|
||||
[.x]xmesa2.obj : [.x]xmesa2.c
|
||||
$(CC) $(CFLAGS) /obj=[.x]xmesa2.obj [.x]xmesa2.c
|
||||
[.x]xmesa3.obj : [.x]xmesa3.c
|
||||
$(CC) $(CFLAGS) /obj=[.x]xmesa3.obj [.x]xmesa3.c
|
||||
[.x]xmesa4.obj : [.x]xmesa4.c
|
||||
$(CC) $(CFLAGS) /obj=[.x]xmesa4.obj [.x]xmesa4.c
|
||||
[.osmesa]osmesa.obj : [.osmesa]osmesa.c
|
||||
$(CC) $(CFLAGS) /obj=[.osmesa]osmesa.obj [.osmesa]osmesa.c
|
||||
[.svga]svgamesa.obj : [.svga]svgamesa.c
|
||||
$(CC) $(CFLAGS) /obj=[.svga]svgamesa.obj [.svga]svgamesa.c
|
||||
[.fx]fxapi.obj : [.fx]fxapi.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxapi.obj [.fx]fxapi.c
|
||||
[.fx]fxclip.obj : [.fx]fxclip.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxclip.obj [.fx]fxclip.c
|
||||
[.fx]fxcva.obj : [.fx]fxcva.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxcva.obj [.fx]fxcva.c
|
||||
[.fx]fxdd.obj : [.fx]fxdd.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxdd.obj [.fx]fxdd.c
|
||||
[.fx]fxddtex.obj : [.fx]fxddtex.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxddtex.obj [.fx]fxddtex.c
|
||||
[.fx]fxfastpath.obj : [.fx]fxfastpath.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxfastpath.obj [.fx]fxfastpath.c
|
||||
[.fx]fxpipeline.obj : [.fx]fxpipeline.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxpipeline.obj [.fx]fxpipeline.c
|
||||
[.fx]fxsanity.obj : [.fx]fxsanity.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxsanity.obj [.fx]fxsanity.c
|
||||
[.fx]fxvsetup.obj : [.fx]fxvsetup.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxvsetup.obj [.fx]fxvsetup.c
|
||||
[.fx]fxsetup.obj : [.fx]fxsetup.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxsetup.obj [.fx]fxsetup.c
|
||||
[.fx]fxtrifuncs.obj : [.fx]fxtrifuncs.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxtrifuncs.obj [.fx]fxtrifuncs.c
|
||||
[.fx]fxrender.obj : [.fx]fxrender.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxrender.obj [.fx]fxrender.c
|
||||
[.fx]fxtexman.obj : [.fx]fxtexman.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxtexman.obj [.fx]fxtexman.c
|
||||
[.fx]fxddspan.obj : [.fx]fxddspan.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxddspan.obj [.fx]fxddspan.c
|
||||
[.fx]fxglidew.obj : [.fx]fxglidew.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxglidew.obj [.fx]fxglidew.c
|
||||
|
||||
.include mms_depend.
|
||||
|
@@ -88,7 +88,7 @@ void drawSquares(GLenum mode)
|
||||
void processHits (GLint hits, GLuint buffer[])
|
||||
{
|
||||
unsigned int i, j;
|
||||
GLuint ii, jj, names, *ptr;
|
||||
GLuint ii = 0, jj = 0, names, *ptr;
|
||||
|
||||
printf ("hits = %d\n", hits);
|
||||
ptr = (GLuint *) buffer;
|
||||
|
@@ -65,7 +65,7 @@ void makeCheckImage(void)
|
||||
|
||||
for (i = 0; i < checkImageHeight; i++) {
|
||||
for (j = 0; j < checkImageWidth; j++) {
|
||||
c = ((((i&0x8)==0)^((j&0x8))==0))*255;
|
||||
c = (((i&0x8)==0)^((j&0x8)==0))*255;
|
||||
checkImage[i][j][0] = (GLubyte) c;
|
||||
checkImage[i][j][1] = (GLubyte) c;
|
||||
checkImage[i][j][2] = (GLubyte) c;
|
||||
|
@@ -186,8 +186,8 @@ static void SetColorMap(void)
|
||||
{
|
||||
static float green[3] = {0.2, 1.0, 0.2};
|
||||
static float red[3] = {1.0, 0.2, 0.2};
|
||||
float *color, percent;
|
||||
GLint *indexes, entries, i, j;
|
||||
float *color = 0, percent;
|
||||
GLint *indexes = 0, entries, i, j;
|
||||
|
||||
entries = glutGet(GLUT_WINDOW_COLORMAP_SIZE);
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: glxheads.c,v 1.1 2000/06/13 19:41:30 brianp Exp $ */
|
||||
/* $Id: glxheads.c,v 1.1.4.1 2000/11/10 17:17:23 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Exercise multiple GLX connections on multiple X displays.
|
||||
@@ -139,7 +139,7 @@ AddHead(const char *displayName)
|
||||
if (!glXMakeCurrent(dpy, win, ctx)) {
|
||||
Error(displayName, "glXMakeCurrent failed");
|
||||
printf("glXMakeCurrent failed in Redraw()\n");
|
||||
return;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* save the info for this head */
|
||||
|
@@ -1,5 +1,6 @@
|
||||
# Makefile for GLU for VMS
|
||||
# Makefile for core library for VMS
|
||||
# contributed by Jouk Jansen joukj@crys.chem.uva.nl
|
||||
# Last revision : 3 May 1999
|
||||
|
||||
.first
|
||||
define gl [-.include.gl]
|
||||
@@ -10,28 +11,74 @@
|
||||
|
||||
VPATH = RCS
|
||||
|
||||
INCDIR = $disk2:[-.include]
|
||||
INCDIR = [-.include]
|
||||
LIBDIR = [-.lib]
|
||||
CFLAGS = /include=$(INCDIR)/define=(FBIND=1)
|
||||
CFLAGS = /include=($(INCDIR),[])/define=(FBIND=1)/name=(as_is,short)
|
||||
|
||||
SOURCES = glu.c mipmap.c nurbs.c nurbscrv.c nurbssrf.c nurbsutl.c \
|
||||
project.c quadric.c tess.c tess_fist.c tess_hash.c tess_heap.c \
|
||||
tess_winding.c tess_clip.c
|
||||
CORE_SOURCES = aatriangle.c accum.c alpha.c alphabuf.c attrib.c \
|
||||
bitmap.c blend.c buffers.c clip.c colortab.c context.c copypix.c depth.c \
|
||||
dispatch.c \
|
||||
dlist.c drawpix.c enable.c eval.c feedback.c fog.c \
|
||||
get.c hash.c hint.c image.c imaging.c light.c lines.c logic.c masking.c matrix.c \
|
||||
mem.c glapi.c glapinoop.c \
|
||||
mmath.c pb.c pixel.c points.c polygon.c \
|
||||
quads.c rastpos.c readpix.c rect.c scissor.c shade.c span.c \
|
||||
stencil.c teximage.c texobj.c texstate.c texture.c translate.c triangle.c \
|
||||
varray.c winpos.c vb.c vbcull.c vbfill.c vbrender.c vbxform.c xform.c \
|
||||
zoom.c bbox.c cva.c vector.c vbindirect.c config.c enums.c extensions.c \
|
||||
pipeline.c stages.c state.c vertices.c [.x86]x86.c
|
||||
|
||||
OBJECTS =glu.obj,mipmap.obj,nurbs.obj,nurbscrv.obj,nurbssrf.obj,nurbsutl.obj,\
|
||||
project.obj,quadric.obj,tess.obj,tess_fist.obj,tess_hash.obj,\
|
||||
tess_heap.obj,tess_winding.obj,tess_clip.obj
|
||||
DRIVER_SOURCES = [.x]glxapi.c [.x]fakeglx.c [.x]xfonts.c \
|
||||
[.x]xmesa1.c [.x]xmesa2.c [.x]xmesa3.c [.x]xmesa4.c \
|
||||
[.osmesa]osmesa.c \
|
||||
[.svga]svgamesa.c \
|
||||
[.fx]fxapi.c [.fx]fxdd.c [.fx]fxddtex.c [.fx]fxvsetup.c [.fx]fxsetup.c \
|
||||
[.fx]fxtrifuncs.c [.fx]fxclip.c [.fx]fxfastpath.c [.fx]fxpipeline.c\
|
||||
[.fx]fxrender.c [.fx]fxtexman.c [.fx]fxddspan.c [.fx]fxcva.c [.fx]fxsanity.c\
|
||||
[.fx]fxglidew.c
|
||||
|
||||
ASM_SOURCES =
|
||||
|
||||
OBJECTS =aatriangle.obj,\
|
||||
accum.obj,alpha.obj,alphabuf.obj,attrib.obj,\
|
||||
bitmap.obj,blend.obj,buffers.obj,clip.obj,colortab.obj,context.obj,copypix.obj,depth.obj,\
|
||||
dlist.obj,drawpix.obj,enable.obj,eval.obj,feedback.obj,fog.obj
|
||||
|
||||
|
||||
OBJECTS3=get.obj,hash.obj,hint.obj,image.obj,light.obj,lines.obj,logic.obj,masking.obj,\
|
||||
matrix.obj,glapi.obj,glapinoop.obj,dispatch.obj,imaging.obj,mem.obj,\
|
||||
mmath.obj,pb.obj,pixel.obj,points.obj
|
||||
|
||||
OBJECTS7=polygon.obj,\
|
||||
quads.obj,rastpos.obj,readpix.obj,rect.obj,scissor.obj,shade.obj,span.obj,\
|
||||
pixeltex.obj
|
||||
|
||||
OBJECTS4=stencil.obj,teximage.obj,texobj.obj,texstate.obj,texture.obj,translate.obj,\
|
||||
triangle.obj,varray.obj,winpos.obj,vb.obj,vbcull.obj,vbfill.obj,vbrender.obj
|
||||
|
||||
OBJECTS6=vbxform.obj,xform.obj,zoom.obj,bbox.obj,cva.obj,vector.obj,vbindirect.obj,\
|
||||
config.obj,enums.obj,extensions.obj,pipeline.obj,stages.obj,state.obj,\
|
||||
vertices.obj,[.x86]x86.obj
|
||||
|
||||
OBJECTS2=[.x]glxapi.obj,[.x]fakeglx.obj,[.x]xfonts.obj,\
|
||||
[.x]xmesa1.obj,[.x]xmesa2.obj,[.x]xmesa3.obj,[.x]xmesa4.obj,\
|
||||
[.osmesa]osmesa.obj,\
|
||||
[.svga]svgamesa.obj
|
||||
|
||||
OBJECTS5=[.fx]fxapi.obj,[.fx]fxdd.obj,[.fx]fxddtex.obj,[.fx]fxvsetup.obj,\
|
||||
[.fx]fxsetup.obj,[.fx]fxclip.obj,[.fx]fxfastpath.obj,[.fx]fxpipeline.obj
|
||||
|
||||
OBJECTS8=[.fx]fxtrifuncs.obj,[.fx]fxsanity.obj,[.fx]fxglidew.obj,\
|
||||
[.fx]fxrender.obj,[.fx]fxtexman.obj,[.fx]fxddspan.obj,[.fx]fxcva.obj
|
||||
|
||||
##### RULES #####
|
||||
|
||||
VERSION=MesaGlu V3.1
|
||||
VERSION=Mesa V3.1
|
||||
|
||||
##### TARGETS #####
|
||||
|
||||
# Make the library:
|
||||
$(LIBDIR)$(GLU_LIB) : $(OBJECTS)
|
||||
# Make the library
|
||||
$(LIBDIR)$(GL_LIB) : $(OBJECTS),$(OBJECTS2) $(OBJECTS3) $(OBJECTS4)\
|
||||
$(OBJECTS5) $(OBJECTS8) $(OBJECTS7) $(OBJECTS6)
|
||||
.ifdef SHARE
|
||||
@ WRITE_ SYS$OUTPUT " generating mesagl1.opt"
|
||||
@ OPEN_/WRITE FILE mesagl1.opt
|
||||
@@ -41,7 +88,13 @@ $(LIBDIR)$(GLU_LIB) : $(OBJECTS)
|
||||
@ WRITE_ FILE "IDENTIFICATION=""$(VERSION)"""
|
||||
@ WRITE_ FILE "GSMATCH=LEQUAL,3,1
|
||||
@ WRITE_ FILE "$(OBJECTS)"
|
||||
@ WRITE_ FILE "[-.lib]libmesagl.exe/SHARE"
|
||||
@ WRITE_ FILE "$(OBJECTS3)"
|
||||
@ WRITE_ FILE "$(OBJECTS4)"
|
||||
@ WRITE_ FILE "$(OBJECTS7)"
|
||||
@ WRITE_ FILE "$(OBJECTS6)"
|
||||
@ WRITE_ FILE "$(OBJECTS2)"
|
||||
@ WRITE_ FILE "$(OBJECTS5)"
|
||||
@ WRITE_ FILE "$(OBJECTS8)"
|
||||
@ WRITE_ FILE "SYS$SHARE:DECW$XEXTLIBSHR/SHARE"
|
||||
@ WRITE_ FILE "SYS$SHARE:DECW$XLIBSHR/SHARE"
|
||||
@ CLOSE_ FILE
|
||||
@@ -49,16 +102,79 @@ $(LIBDIR)$(GLU_LIB) : $(OBJECTS)
|
||||
@ LINK_/NODEB/NOSHARE/NOEXE/MAP=mesagl.map/FULL mesagl1.opt/OPT
|
||||
@ WRITE_ SYS$OUTPUT " analyzing mesagl.map ..."
|
||||
@ @[-.vms]ANALYZE_MAP.COM mesagl.map mesagl.opt
|
||||
@ WRITE_ SYS$OUTPUT " linking $(GLU_LIB) ..."
|
||||
@ LINK_/noinform/NODEB/SHARE=$(GLU_LIB)/MAP=mesagl.map/FULL mesagl1.opt/opt,mesagl.opt/opt
|
||||
@ WRITE_ SYS$OUTPUT " linking $(GL_LIB) ..."
|
||||
@ LINK_/NODEB/SHARE=$(GL_LIB)/MAP=mesagl.map/FULL mesagl1.opt/opt,mesagl.opt/opt
|
||||
.else
|
||||
@ $(MAKELIB) $(GLU_LIB) $(OBJECTS)
|
||||
@ $(MAKELIB) $(GL_LIB) $(OBJECTS)
|
||||
@ library $(GL_LIB) $(OBJECTS2)
|
||||
@ library $(GL_LIB) $(OBJECTS3)
|
||||
@ library $(GL_LIB) $(OBJECTS4)
|
||||
@ library $(GL_LIB) $(OBJECTS5)
|
||||
@ library $(GL_LIB) $(OBJECTS8)
|
||||
@ library $(GL_LIB) $(OBJECTS7)
|
||||
@ library $(GL_LIB) $(OBJECTS6)
|
||||
.endif
|
||||
@ rename $(GLU_LIB)* $(LIBDIR)
|
||||
@ rename $(GL_LIB)* $(LIBDIR)
|
||||
|
||||
clean :
|
||||
delete *.obj;*
|
||||
purge
|
||||
delete *.obj;*
|
||||
|
||||
include mms_depend.
|
||||
aatriangle.obj : aatriangle.c
|
||||
|
||||
triangle.obj : triangle.c
|
||||
|
||||
pixeltex.obj : pixeltex.c
|
||||
|
||||
[.x86]x86.obj : [.x86]x86.c
|
||||
$(CC) $(CFLAGS) /obj=[.x86]x86.obj [.x86]x86.c
|
||||
[.x]glxapi.obj : [.x]glxapi.c
|
||||
$(CC) $(CFLAGS) /obj=[.x]glxapi.obj [.x]glxapi.c
|
||||
[.x]fakeglx.obj : [.x]fakeglx.c
|
||||
$(CC) $(CFLAGS) /obj=[.x]fakeglx.obj [.x]fakeglx.c
|
||||
[.x]xfonts.obj : [.x]xfonts.c
|
||||
$(CC) $(CFLAGS) /obj=[.x]xfonts.obj [.x]xfonts.c
|
||||
[.x]xmesa1.obj : [.x]xmesa1.c
|
||||
$(CC) $(CFLAGS) /obj=[.x]xmesa1.obj [.x]xmesa1.c
|
||||
[.x]xmesa2.obj : [.x]xmesa2.c
|
||||
$(CC) $(CFLAGS) /obj=[.x]xmesa2.obj [.x]xmesa2.c
|
||||
[.x]xmesa3.obj : [.x]xmesa3.c
|
||||
$(CC) $(CFLAGS) /obj=[.x]xmesa3.obj [.x]xmesa3.c
|
||||
[.x]xmesa4.obj : [.x]xmesa4.c
|
||||
$(CC) $(CFLAGS) /obj=[.x]xmesa4.obj [.x]xmesa4.c
|
||||
[.osmesa]osmesa.obj : [.osmesa]osmesa.c
|
||||
$(CC) $(CFLAGS) /obj=[.osmesa]osmesa.obj [.osmesa]osmesa.c
|
||||
[.svga]svgamesa.obj : [.svga]svgamesa.c
|
||||
$(CC) $(CFLAGS) /obj=[.svga]svgamesa.obj [.svga]svgamesa.c
|
||||
[.fx]fxapi.obj : [.fx]fxapi.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxapi.obj [.fx]fxapi.c
|
||||
[.fx]fxclip.obj : [.fx]fxclip.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxclip.obj [.fx]fxclip.c
|
||||
[.fx]fxcva.obj : [.fx]fxcva.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxcva.obj [.fx]fxcva.c
|
||||
[.fx]fxdd.obj : [.fx]fxdd.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxdd.obj [.fx]fxdd.c
|
||||
[.fx]fxddtex.obj : [.fx]fxddtex.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxddtex.obj [.fx]fxddtex.c
|
||||
[.fx]fxfastpath.obj : [.fx]fxfastpath.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxfastpath.obj [.fx]fxfastpath.c
|
||||
[.fx]fxpipeline.obj : [.fx]fxpipeline.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxpipeline.obj [.fx]fxpipeline.c
|
||||
[.fx]fxsanity.obj : [.fx]fxsanity.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxsanity.obj [.fx]fxsanity.c
|
||||
[.fx]fxvsetup.obj : [.fx]fxvsetup.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxvsetup.obj [.fx]fxvsetup.c
|
||||
[.fx]fxsetup.obj : [.fx]fxsetup.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxsetup.obj [.fx]fxsetup.c
|
||||
[.fx]fxtrifuncs.obj : [.fx]fxtrifuncs.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxtrifuncs.obj [.fx]fxtrifuncs.c
|
||||
[.fx]fxrender.obj : [.fx]fxrender.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxrender.obj [.fx]fxrender.c
|
||||
[.fx]fxtexman.obj : [.fx]fxtexman.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxtexman.obj [.fx]fxtexman.c
|
||||
[.fx]fxddspan.obj : [.fx]fxddspan.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxddspan.obj [.fx]fxddspan.c
|
||||
[.fx]fxglidew.obj : [.fx]fxglidew.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxglidew.obj [.fx]fxglidew.c
|
||||
|
||||
.include mms_depend.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: glu.c,v 1.21.2.1 2000/11/02 17:59:43 brianp Exp $ */
|
||||
/* $Id: glu.c,v 1.21.2.2 2001/01/24 04:49:27 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -302,7 +302,7 @@ const GLubyte *GLAPIENTRY
|
||||
gluGetString(GLenum name)
|
||||
{
|
||||
static char *extensions = "GL_EXT_abgr";
|
||||
static char *version = "1.1 Mesa 3.4";
|
||||
static char *version = "1.1 Mesa 3.4.1";
|
||||
|
||||
switch (name) {
|
||||
case GLU_EXTENSIONS:
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: nurbscrv.c,v 1.2 2000/07/11 14:11:04 brianp Exp $ */
|
||||
/* $Id: nurbscrv.c,v 1.2.4.1 2000/11/10 17:17:22 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -359,7 +359,7 @@ do_nurbs_curve(GLUnurbsObj * nobj)
|
||||
GLint n_ctrl;
|
||||
GLfloat *new_geom_ctrl, *new_color_ctrl, *new_normal_ctrl,
|
||||
*new_texture_ctrl;
|
||||
GLfloat *geom_ctrl, *color_ctrl, *normal_ctrl, *texture_ctrl;
|
||||
GLfloat *geom_ctrl = 0, *color_ctrl = 0, *normal_ctrl = 0, *texture_ctrl = 0;
|
||||
GLint *factors;
|
||||
GLint i, j;
|
||||
GLint geom_dim, color_dim = 0, normal_dim = 0, texture_dim = 0;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: nurbsutl.c,v 1.3 2000/07/11 20:39:00 brianp Exp $ */
|
||||
/* $Id: nurbsutl.c,v 1.3.4.1 2000/11/10 17:17:22 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -130,7 +130,7 @@ set_new_t_min_t_max(knot_str_type * geom_knot, knot_str_type * color_knot,
|
||||
knot_str_type * normal_knot, knot_str_type * texture_knot,
|
||||
GLfloat maximal_min_knot, GLfloat minimal_max_knot)
|
||||
{
|
||||
GLuint t_min, t_max, cnt;
|
||||
GLuint t_min = 0, t_max = 0, cnt = 0;
|
||||
|
||||
if (minimal_max_knot - maximal_min_knot < EPSILON) {
|
||||
/* knot common range empty */
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: polytest.c,v 1.3 2000/07/11 14:11:04 brianp Exp $ */
|
||||
/* $Id: polytest.c,v 1.3.4.1 2000/11/10 17:17:22 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -786,7 +786,7 @@ cut_out_hole(GLUtriangulatorObj * tobj,
|
||||
tess_vertex *v1, *v2, *tmp_vertex;
|
||||
GLuint vertex1_cnt, vertex2_cnt, tmp_vertex_cnt;
|
||||
GLuint i, j, k;
|
||||
GLenum test;
|
||||
GLenum test = 0;
|
||||
|
||||
/* find an edge connecting contour and hole not intersecting any other */
|
||||
/* edge belonging to either the contour or any of the other holes */
|
||||
|
@@ -1,5 +1,6 @@
|
||||
# Makefile for GLUT for VMS
|
||||
# Makefile for core library for VMS
|
||||
# contributed by Jouk Jansen joukj@crys.chem.uva.nl
|
||||
# Last revision : 3 May 1999
|
||||
|
||||
.first
|
||||
define gl [-.include.gl]
|
||||
@@ -7,122 +8,77 @@
|
||||
.include [-]mms-config.
|
||||
|
||||
##### MACROS #####
|
||||
GLUT_MAJOR = 3
|
||||
GLUT_MINOR = 7
|
||||
|
||||
VPATH = RCS
|
||||
|
||||
INCDIR = [-.include]
|
||||
LIBDIR = [-.lib]
|
||||
CFLAGS = /nowarn/include=$(INCDIR)/prefix=all
|
||||
CFLAGS = /include=($(INCDIR),[])/define=(FBIND=1)/name=(as_is,short)
|
||||
|
||||
SOURCES = \
|
||||
glut_8x13.c \
|
||||
glut_9x15.c \
|
||||
glut_bitmap.c \
|
||||
glut_bwidth.c \
|
||||
glut_cindex.c \
|
||||
glut_cmap.c \
|
||||
glut_cursor.c \
|
||||
glut_dials.c \
|
||||
glut_dstr.c \
|
||||
glut_event.c \
|
||||
glut_ext.c \
|
||||
glut_fullscrn.c \
|
||||
glut_gamemode.c \
|
||||
glut_get.c \
|
||||
glut_glxext.c \
|
||||
glut_hel10.c \
|
||||
glut_hel12.c \
|
||||
glut_hel18.c \
|
||||
glut_init.c \
|
||||
glut_input.c \
|
||||
glut_joy.c \
|
||||
glut_key.c \
|
||||
glut_keyctrl.c \
|
||||
glut_keyup.c \
|
||||
glut_menu.c \
|
||||
glut_menu2.c \
|
||||
glut_mesa.c \
|
||||
glut_modifier.c \
|
||||
glut_mroman.c \
|
||||
glut_overlay.c \
|
||||
glut_roman.c \
|
||||
glut_shapes.c \
|
||||
glut_space.c \
|
||||
glut_stroke.c \
|
||||
glut_swap.c \
|
||||
glut_swidth.c \
|
||||
glut_tablet.c \
|
||||
glut_teapot.c \
|
||||
glut_tr10.c \
|
||||
glut_tr24.c \
|
||||
glut_util.c \
|
||||
glut_vidresize.c \
|
||||
glut_warp.c \
|
||||
glut_win.c \
|
||||
glut_winmisc.c \
|
||||
layerutil.c
|
||||
CORE_SOURCES = aatriangle.c accum.c alpha.c alphabuf.c attrib.c \
|
||||
bitmap.c blend.c buffers.c clip.c colortab.c context.c copypix.c depth.c \
|
||||
dispatch.c \
|
||||
dlist.c drawpix.c enable.c eval.c feedback.c fog.c \
|
||||
get.c hash.c hint.c image.c imaging.c light.c lines.c logic.c masking.c matrix.c \
|
||||
mem.c glapi.c glapinoop.c \
|
||||
mmath.c pb.c pixel.c points.c polygon.c \
|
||||
quads.c rastpos.c readpix.c rect.c scissor.c shade.c span.c \
|
||||
stencil.c teximage.c texobj.c texstate.c texture.c translate.c triangle.c \
|
||||
varray.c winpos.c vb.c vbcull.c vbfill.c vbrender.c vbxform.c xform.c \
|
||||
zoom.c bbox.c cva.c vector.c vbindirect.c config.c enums.c extensions.c \
|
||||
pipeline.c stages.c state.c vertices.c [.x86]x86.c
|
||||
|
||||
OBJECTS = \
|
||||
glut_8x13.obj,\
|
||||
glut_9x15.obj,\
|
||||
glut_bitmap.obj,\
|
||||
glut_bwidth.obj,\
|
||||
glut_cindex.obj,\
|
||||
glut_cmap.obj,\
|
||||
glut_cursor.obj,\
|
||||
glut_dials.obj,\
|
||||
glut_dstr.obj,\
|
||||
glut_event.obj,\
|
||||
glut_ext.obj,\
|
||||
glut_fullscrn.obj,\
|
||||
glut_gamemode.obj
|
||||
DRIVER_SOURCES = [.x]glxapi.c [.x]fakeglx.c [.x]xfonts.c \
|
||||
[.x]xmesa1.c [.x]xmesa2.c [.x]xmesa3.c [.x]xmesa4.c \
|
||||
[.osmesa]osmesa.c \
|
||||
[.svga]svgamesa.c \
|
||||
[.fx]fxapi.c [.fx]fxdd.c [.fx]fxddtex.c [.fx]fxvsetup.c [.fx]fxsetup.c \
|
||||
[.fx]fxtrifuncs.c [.fx]fxclip.c [.fx]fxfastpath.c [.fx]fxpipeline.c\
|
||||
[.fx]fxrender.c [.fx]fxtexman.c [.fx]fxddspan.c [.fx]fxcva.c [.fx]fxsanity.c\
|
||||
[.fx]fxglidew.c
|
||||
|
||||
OBJECTS1=glut_get.obj,\
|
||||
glut_glxext.obj,\
|
||||
glut_hel10.obj,\
|
||||
glut_hel12.obj,\
|
||||
glut_hel18.obj,\
|
||||
glut_init.obj,\
|
||||
glut_input.obj,\
|
||||
glut_joy.obj,\
|
||||
glut_key.obj,\
|
||||
glut_keyctrl.obj,\
|
||||
glut_keyup.obj,\
|
||||
glut_menu.obj,\
|
||||
glut_menu2.obj,\
|
||||
glut_mesa.obj,\
|
||||
glut_modifier.obj
|
||||
ASM_SOURCES =
|
||||
|
||||
OBJECTS2=glut_mroman.obj,\
|
||||
glut_overlay.obj,\
|
||||
glut_roman.obj,\
|
||||
glut_shapes.obj,\
|
||||
glut_space.obj,\
|
||||
glut_stroke.obj,\
|
||||
glut_swap.obj,\
|
||||
glut_swidth.obj,\
|
||||
glut_tablet.obj,\
|
||||
glut_teapot.obj,\
|
||||
glut_tr10.obj,\
|
||||
glut_tr24.obj,\
|
||||
glut_util.obj,\
|
||||
glut_vidresize.obj
|
||||
OBJECTS =aatriangle.obj,\
|
||||
accum.obj,alpha.obj,alphabuf.obj,attrib.obj,\
|
||||
bitmap.obj,blend.obj,buffers.obj,clip.obj,colortab.obj,context.obj,copypix.obj,depth.obj,\
|
||||
dlist.obj,drawpix.obj,enable.obj,eval.obj,feedback.obj,fog.obj
|
||||
|
||||
OBJECTS3=glut_warp.obj,\
|
||||
glut_win.obj,\
|
||||
glut_winmisc.obj,\
|
||||
layerutil.obj
|
||||
|
||||
OBJECTS3=get.obj,hash.obj,hint.obj,image.obj,light.obj,lines.obj,logic.obj,masking.obj,\
|
||||
matrix.obj,glapi.obj,glapinoop.obj,dispatch.obj,imaging.obj,mem.obj,\
|
||||
mmath.obj,pb.obj,pixel.obj,points.obj
|
||||
|
||||
OBJECTS7=polygon.obj,\
|
||||
quads.obj,rastpos.obj,readpix.obj,rect.obj,scissor.obj,shade.obj,span.obj,\
|
||||
pixeltex.obj
|
||||
|
||||
OBJECTS4=stencil.obj,teximage.obj,texobj.obj,texstate.obj,texture.obj,translate.obj,\
|
||||
triangle.obj,varray.obj,winpos.obj,vb.obj,vbcull.obj,vbfill.obj,vbrender.obj
|
||||
|
||||
OBJECTS6=vbxform.obj,xform.obj,zoom.obj,bbox.obj,cva.obj,vector.obj,vbindirect.obj,\
|
||||
config.obj,enums.obj,extensions.obj,pipeline.obj,stages.obj,state.obj,\
|
||||
vertices.obj,[.x86]x86.obj
|
||||
|
||||
OBJECTS2=[.x]glxapi.obj,[.x]fakeglx.obj,[.x]xfonts.obj,\
|
||||
[.x]xmesa1.obj,[.x]xmesa2.obj,[.x]xmesa3.obj,[.x]xmesa4.obj,\
|
||||
[.osmesa]osmesa.obj,\
|
||||
[.svga]svgamesa.obj
|
||||
|
||||
OBJECTS5=[.fx]fxapi.obj,[.fx]fxdd.obj,[.fx]fxddtex.obj,[.fx]fxvsetup.obj,\
|
||||
[.fx]fxsetup.obj,[.fx]fxclip.obj,[.fx]fxfastpath.obj,[.fx]fxpipeline.obj
|
||||
|
||||
OBJECTS8=[.fx]fxtrifuncs.obj,[.fx]fxsanity.obj,[.fx]fxglidew.obj,\
|
||||
[.fx]fxrender.obj,[.fx]fxtexman.obj,[.fx]fxddspan.obj,[.fx]fxcva.obj
|
||||
|
||||
##### RULES #####
|
||||
|
||||
VERSION=Glut V3.7
|
||||
VERSION=Mesa V3.1
|
||||
|
||||
##### TARGETS #####
|
||||
|
||||
# Make the library:
|
||||
$(LIBDIR)$(GLUT_LIB) : $(OBJECTS) $(OBJECTS1) $(OBJECTS2) $(OBJECTS3)
|
||||
# Make the library
|
||||
$(LIBDIR)$(GL_LIB) : $(OBJECTS),$(OBJECTS2) $(OBJECTS3) $(OBJECTS4)\
|
||||
$(OBJECTS5) $(OBJECTS8) $(OBJECTS7) $(OBJECTS6)
|
||||
.ifdef SHARE
|
||||
@ WRITE_ SYS$OUTPUT " generating mesagl1.opt"
|
||||
@ OPEN_/WRITE FILE mesagl1.opt
|
||||
@@ -130,14 +86,15 @@ $(LIBDIR)$(GLUT_LIB) : $(OBJECTS) $(OBJECTS1) $(OBJECTS2) $(OBJECTS3)
|
||||
@ WRITE_ FILE "! mesagl1.opt generated by DESCRIP.$(MMS_EXT)"
|
||||
@ WRITE_ FILE "!"
|
||||
@ WRITE_ FILE "IDENTIFICATION=""$(VERSION)"""
|
||||
@ WRITE_ FILE "GSMATCH=LEQUAL,3,7
|
||||
@ WRITE_ FILE "GSMATCH=LEQUAL,3,1
|
||||
@ WRITE_ FILE "$(OBJECTS)"
|
||||
@ WRITE_ FILE "$(OBJECTS1)"
|
||||
@ WRITE_ FILE "$(OBJECTS2)"
|
||||
@ WRITE_ FILE "$(OBJECTS3)"
|
||||
@ WRITE_ FILE "[-.lib]libmesaglu.exe/SHARE"
|
||||
@ WRITE_ FILE "[-.lib]libmesagl.exe/SHARE"
|
||||
@ write file "sys$library:decw$xmulibshr.exe/share"
|
||||
@ WRITE_ FILE "$(OBJECTS4)"
|
||||
@ WRITE_ FILE "$(OBJECTS7)"
|
||||
@ WRITE_ FILE "$(OBJECTS6)"
|
||||
@ WRITE_ FILE "$(OBJECTS2)"
|
||||
@ WRITE_ FILE "$(OBJECTS5)"
|
||||
@ WRITE_ FILE "$(OBJECTS8)"
|
||||
@ WRITE_ FILE "SYS$SHARE:DECW$XEXTLIBSHR/SHARE"
|
||||
@ WRITE_ FILE "SYS$SHARE:DECW$XLIBSHR/SHARE"
|
||||
@ CLOSE_ FILE
|
||||
@@ -145,18 +102,79 @@ $(LIBDIR)$(GLUT_LIB) : $(OBJECTS) $(OBJECTS1) $(OBJECTS2) $(OBJECTS3)
|
||||
@ LINK_/NODEB/NOSHARE/NOEXE/MAP=mesagl.map/FULL mesagl1.opt/OPT
|
||||
@ WRITE_ SYS$OUTPUT " analyzing mesagl.map ..."
|
||||
@ @[-.vms]ANALYZE_MAP.COM mesagl.map mesagl.opt
|
||||
@ WRITE_ SYS$OUTPUT " linking $(GLUT_LIB) ..."
|
||||
@ LINK_/NODEB/SHARE=$(GLUT_LIB)/MAP=mesagl.map/FULL mesagl1.opt/opt,mesagl.opt/opt
|
||||
@ WRITE_ SYS$OUTPUT " linking $(GL_LIB) ..."
|
||||
@ LINK_/NODEB/SHARE=$(GL_LIB)/MAP=mesagl.map/FULL mesagl1.opt/opt,mesagl.opt/opt
|
||||
.else
|
||||
@ $(MAKELIB) $(GLUT_LIB) $(OBJECTS)
|
||||
@ library $(GLUT_LIB) $(OBJECTS1)
|
||||
@ library $(GLUT_LIB) $(OBJECTS2)
|
||||
@ library $(GLUT_LIB) $(OBJECTS3)
|
||||
@ $(MAKELIB) $(GL_LIB) $(OBJECTS)
|
||||
@ library $(GL_LIB) $(OBJECTS2)
|
||||
@ library $(GL_LIB) $(OBJECTS3)
|
||||
@ library $(GL_LIB) $(OBJECTS4)
|
||||
@ library $(GL_LIB) $(OBJECTS5)
|
||||
@ library $(GL_LIB) $(OBJECTS8)
|
||||
@ library $(GL_LIB) $(OBJECTS7)
|
||||
@ library $(GL_LIB) $(OBJECTS6)
|
||||
.endif
|
||||
@ rename $(GLUT_LIB)* $(LIBDIR)
|
||||
@ rename $(GL_LIB)* $(LIBDIR)
|
||||
|
||||
clean :
|
||||
delete *.obj;*
|
||||
purge
|
||||
delete *.obj;*
|
||||
|
||||
include mms_depend.
|
||||
aatriangle.obj : aatriangle.c
|
||||
|
||||
triangle.obj : triangle.c
|
||||
|
||||
pixeltex.obj : pixeltex.c
|
||||
|
||||
[.x86]x86.obj : [.x86]x86.c
|
||||
$(CC) $(CFLAGS) /obj=[.x86]x86.obj [.x86]x86.c
|
||||
[.x]glxapi.obj : [.x]glxapi.c
|
||||
$(CC) $(CFLAGS) /obj=[.x]glxapi.obj [.x]glxapi.c
|
||||
[.x]fakeglx.obj : [.x]fakeglx.c
|
||||
$(CC) $(CFLAGS) /obj=[.x]fakeglx.obj [.x]fakeglx.c
|
||||
[.x]xfonts.obj : [.x]xfonts.c
|
||||
$(CC) $(CFLAGS) /obj=[.x]xfonts.obj [.x]xfonts.c
|
||||
[.x]xmesa1.obj : [.x]xmesa1.c
|
||||
$(CC) $(CFLAGS) /obj=[.x]xmesa1.obj [.x]xmesa1.c
|
||||
[.x]xmesa2.obj : [.x]xmesa2.c
|
||||
$(CC) $(CFLAGS) /obj=[.x]xmesa2.obj [.x]xmesa2.c
|
||||
[.x]xmesa3.obj : [.x]xmesa3.c
|
||||
$(CC) $(CFLAGS) /obj=[.x]xmesa3.obj [.x]xmesa3.c
|
||||
[.x]xmesa4.obj : [.x]xmesa4.c
|
||||
$(CC) $(CFLAGS) /obj=[.x]xmesa4.obj [.x]xmesa4.c
|
||||
[.osmesa]osmesa.obj : [.osmesa]osmesa.c
|
||||
$(CC) $(CFLAGS) /obj=[.osmesa]osmesa.obj [.osmesa]osmesa.c
|
||||
[.svga]svgamesa.obj : [.svga]svgamesa.c
|
||||
$(CC) $(CFLAGS) /obj=[.svga]svgamesa.obj [.svga]svgamesa.c
|
||||
[.fx]fxapi.obj : [.fx]fxapi.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxapi.obj [.fx]fxapi.c
|
||||
[.fx]fxclip.obj : [.fx]fxclip.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxclip.obj [.fx]fxclip.c
|
||||
[.fx]fxcva.obj : [.fx]fxcva.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxcva.obj [.fx]fxcva.c
|
||||
[.fx]fxdd.obj : [.fx]fxdd.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxdd.obj [.fx]fxdd.c
|
||||
[.fx]fxddtex.obj : [.fx]fxddtex.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxddtex.obj [.fx]fxddtex.c
|
||||
[.fx]fxfastpath.obj : [.fx]fxfastpath.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxfastpath.obj [.fx]fxfastpath.c
|
||||
[.fx]fxpipeline.obj : [.fx]fxpipeline.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxpipeline.obj [.fx]fxpipeline.c
|
||||
[.fx]fxsanity.obj : [.fx]fxsanity.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxsanity.obj [.fx]fxsanity.c
|
||||
[.fx]fxvsetup.obj : [.fx]fxvsetup.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxvsetup.obj [.fx]fxvsetup.c
|
||||
[.fx]fxsetup.obj : [.fx]fxsetup.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxsetup.obj [.fx]fxsetup.c
|
||||
[.fx]fxtrifuncs.obj : [.fx]fxtrifuncs.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxtrifuncs.obj [.fx]fxtrifuncs.c
|
||||
[.fx]fxrender.obj : [.fx]fxrender.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxrender.obj [.fx]fxrender.c
|
||||
[.fx]fxtexman.obj : [.fx]fxtexman.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxtexman.obj [.fx]fxtexman.c
|
||||
[.fx]fxddspan.obj : [.fx]fxddspan.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxddspan.obj [.fx]fxddspan.c
|
||||
[.fx]fxglidew.obj : [.fx]fxglidew.c
|
||||
$(CC) $(CFLAGS) /obj=[.fx]fxglidew.obj [.fx]fxglidew.c
|
||||
|
||||
.include mms_depend.
|
||||
|
@@ -118,7 +118,7 @@ void
|
||||
__glutSetCursor(GLUTwindow *window)
|
||||
{
|
||||
int cursor = window->cursor;
|
||||
Cursor xcursor;
|
||||
Cursor xcursor = 0;
|
||||
|
||||
if (cursor >= 0 &&
|
||||
cursor < sizeof(cursorTable) / sizeof(cursorTable[0])) {
|
||||
|
@@ -630,7 +630,7 @@ findMatch(FrameBufferMode * fbmodes, int nfbmodes,
|
||||
{
|
||||
FrameBufferMode *found;
|
||||
int *bestScore, *thisScore;
|
||||
int i, j, numok, result, worse, better;
|
||||
int i, j, numok, result = 0, worse, better;
|
||||
|
||||
found = NULL;
|
||||
numok = 1; /* "num" capability is indexed from 1,
|
||||
@@ -760,7 +760,7 @@ parseCriteria(char *word, Criterion * criterion, int *mask,
|
||||
Bool * allowDoubleAsSingle)
|
||||
{
|
||||
char *cstr, *vstr, *response;
|
||||
int comparator, value;
|
||||
int comparator, value = 0;
|
||||
int rgb, rgba, acc, acca, count, i;
|
||||
|
||||
cstr = strpbrk(word, "=><!~");
|
||||
|
@@ -158,7 +158,7 @@ findMatch(DisplayMode * dmodes, int ndmodes,
|
||||
{
|
||||
DisplayMode *found;
|
||||
int *bestScore, *thisScore;
|
||||
int i, j, numok, result, worse, better;
|
||||
int i, j, numok, result = 0, worse, better;
|
||||
|
||||
found = NULL;
|
||||
numok = 1; /* "num" capability is indexed from 1,
|
||||
@@ -382,7 +382,7 @@ static int
|
||||
parseCriteria(char *word, Criterion * criterion)
|
||||
{
|
||||
char *cstr, *vstr, *response;
|
||||
int comparator, value;
|
||||
int comparator, value = 0;
|
||||
|
||||
cstr = strpbrk(word, "=><!~");
|
||||
if (cstr) {
|
||||
|
@@ -311,7 +311,7 @@ probeDevices(void)
|
||||
XButtonInfoPtr b;
|
||||
XValuatorInfoPtr v;
|
||||
XAxisInfoPtr a;
|
||||
int num_dev, btns, dials;
|
||||
int num_dev = 0, btns = 0, dials = 0;
|
||||
int i, j, k;
|
||||
#endif /* !_WIN32 */
|
||||
|
||||
|
@@ -99,8 +99,8 @@ ifSunCreator(void)
|
||||
{
|
||||
char *xvendor, *glvendor, *renderer;
|
||||
int isSunCreator = 0; /* Until proven that it is. */
|
||||
int savedDisplayMode;
|
||||
char *savedDisplayString;
|
||||
int savedDisplayMode = 0;
|
||||
char *savedDisplayString = 0;
|
||||
GLUTwindow *window;
|
||||
|
||||
#define VENDOR_SUN "Sun Microsystems"
|
||||
@@ -154,7 +154,7 @@ menuVisualSetup(void)
|
||||
Bool presumablyMesa;
|
||||
int layer, nVisuals, i, dummy;
|
||||
unsigned long *placeHolders = NULL;
|
||||
int numPlaceHolders;
|
||||
int numPlaceHolders = 0;
|
||||
Bool allocateHigh;
|
||||
|
||||
allocateHigh = ifSunCreator();
|
||||
|
@@ -389,7 +389,7 @@ triangle_func ggiGetTriangleFunc(GLcontext *ctx)
|
||||
if (ctx->Stencil.Enabled) return NULL;
|
||||
if (ctx->Polygon.SmoothFlag) return NULL;
|
||||
if (ctx->Polygon.StippleFlag) return NULL;
|
||||
if (ctx->Texture.Enabled) return NULL;
|
||||
if (ctx->Texture.ReallyEnabled) return NULL;
|
||||
if (ctx->Light.ShadeModel==GL_SMOOTH) return NULL;
|
||||
if (ctx->Depth.Test && ctx->Depth.Func != GL_LESS) return NULL;
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: fbdev_mode.c,v 1.4 2000/01/07 08:34:44 jtaylor Exp $
|
||||
/* $Id: fbdev_mode.c,v 1.4.4.1 2000/11/15 10:27:44 jtaylor Exp $
|
||||
******************************************************************************
|
||||
|
||||
display-fbdev-mesa
|
||||
@@ -80,7 +80,7 @@ static int do_setmode(ggi_visual *vis)
|
||||
priv->have_accel = 0;
|
||||
for (id = 1; GGIMesa_fbdev_getapi(vis, id, libname, libargs) == 0; id++)
|
||||
{
|
||||
if (_ggiOpenDL(vis, libname, libargs, NULL) == NULL)
|
||||
if (_ggiOpenDL(vis, libname, libargs, NULL) == 0)
|
||||
{
|
||||
fprintf(stderr, "display-fbdev-mesa: Error opening the "
|
||||
"%s (%s) library.\n", libname, libargs);
|
||||
@@ -91,7 +91,7 @@ static int do_setmode(ggi_visual *vis)
|
||||
}
|
||||
|
||||
if (priv->oldpriv->accel &&
|
||||
_ggiOpenDL(vis, priv->accel, NULL, NULL) != NULL) {
|
||||
_ggiOpenDL(vis, priv->accel, NULL, NULL) != 0) {
|
||||
priv->have_accel = 1;
|
||||
}
|
||||
else
|
||||
|
@@ -14,7 +14,7 @@ struct fbdev_priv_mesa
|
||||
char *accel;
|
||||
int have_accel;
|
||||
void *accelpriv;
|
||||
fbdev_hook *oldpriv; /* Hooks back to the LibGGI fbdev target's private data */
|
||||
ggi_fbdev_priv *oldpriv; /* Hooks back to the LibGGI fbdev target's private data */
|
||||
};
|
||||
|
||||
#endif /* _GGIMESA_DISPLAY_FBDEV_H */
|
||||
|
@@ -274,7 +274,7 @@ typedef struct {
|
||||
} tfxMipMapLevel;
|
||||
|
||||
typedef struct tfxTexInfo_t {
|
||||
struct tfxTexInfo *next;
|
||||
struct tfxTexInfo_t *next;
|
||||
struct gl_texture_object *tObj;
|
||||
|
||||
GLuint lastTimeUsed;
|
||||
|
@@ -1,21 +1,21 @@
|
||||
/* $Id: osmesa.c,v 1.19.4.1 2000/09/28 22:39:42 brianp Exp $ */
|
||||
/* $Id: osmesa.c,v 1.19.4.4 2001/02/08 23:51:27 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
*
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
@@ -103,7 +103,7 @@ OSMesaCreateContext( GLenum format, OSMesaContext sharelist )
|
||||
OSMesaContext osmesa;
|
||||
GLint rshift, gshift, bshift, ashift;
|
||||
GLint rind, gind, bind;
|
||||
GLint indexBits, alphaBits;
|
||||
GLint indexBits, alphaBits = 0;
|
||||
GLboolean rgbmode;
|
||||
GLboolean swalpha;
|
||||
GLuint i4 = 1;
|
||||
@@ -227,6 +227,7 @@ OSMesaCreateContext( GLenum format, OSMesaContext sharelist )
|
||||
gl_extensions_enable(&(osmesa->gl_ctx),"GL_HP_occlusion_test");
|
||||
gl_extensions_enable(&(osmesa->gl_ctx), "GL_ARB_texture_cube_map");
|
||||
gl_extensions_enable(&(osmesa->gl_ctx), "GL_EXT_texture_env_combine");
|
||||
gl_extensions_enable(&(osmesa->gl_ctx), "GL_EXT_texture_env_dot3");
|
||||
|
||||
osmesa->gl_buffer = gl_create_framebuffer( osmesa->gl_visual,
|
||||
osmesa->gl_visual->DepthBits > 0,
|
||||
@@ -489,7 +490,10 @@ OSMesaGetDepthBuffer( OSMesaContext c, GLint *width, GLint *height,
|
||||
else {
|
||||
*width = c->gl_buffer->Width;
|
||||
*height = c->gl_buffer->Height;
|
||||
*bytesPerValue = sizeof(GLdepth);
|
||||
if (c->gl_visual->DepthBits <= 16)
|
||||
*bytesPerValue = sizeof(GLushort);
|
||||
else
|
||||
*bytesPerValue = sizeof(GLuint);
|
||||
*buffer = c->gl_buffer->DepthBuffer;
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: fakeglx.c,v 1.34.4.4 2000/11/03 02:35:54 brianp Exp $ */
|
||||
/* $Id: fakeglx.c,v 1.34.4.7 2001/01/24 04:49:27 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -65,7 +65,7 @@
|
||||
#define SERVER_MINOR_VERSION 3
|
||||
|
||||
/* This is appended onto the glXGetClient/ServerString version strings. */
|
||||
#define MESA_GLX_VERSION "Mesa 3.4"
|
||||
#define MESA_GLX_VERSION "Mesa 3.4.1"
|
||||
|
||||
/* Who implemented this GLX? */
|
||||
#define VENDOR "Brian Paul"
|
||||
@@ -561,7 +561,7 @@ static XVisualInfo *choose_x_visual( Display *dpy, int screen,
|
||||
int preferred_class )
|
||||
{
|
||||
XVisualInfo *vis;
|
||||
int xclass, visclass;
|
||||
int xclass, visclass = 0;
|
||||
int depth;
|
||||
|
||||
if (rgba) {
|
||||
@@ -1863,7 +1863,7 @@ struct _glxapi_table *_mesa_GetGLXDispatchTable(void)
|
||||
{
|
||||
int size = sizeof(struct _glxapi_table) / sizeof(void *);
|
||||
(void) size;
|
||||
assert(_glxapi_get_dispatch_table_size() >= size);
|
||||
assert((GLint) _glxapi_get_dispatch_table_size() >= size);
|
||||
}
|
||||
|
||||
/* initialize the whole table to no-ops */
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: glxheader.h,v 1.1 1999/11/11 01:29:28 brianp Exp $ */
|
||||
/* $Id: glxheader.h,v 1.1.4.1 2001/02/09 08:25:18 joukj Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -28,6 +28,10 @@
|
||||
#ifndef GLX_HEADER_H
|
||||
#define GLX_HEADER_H
|
||||
|
||||
#ifdef VMS
|
||||
#include <vms_x_fix.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "conf.h"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: xfonts.c,v 1.6.4.2 2000/08/13 03:54:04 brianp Exp $ */
|
||||
/* $Id: xfonts.c,v 1.6.4.4 2001/02/09 08:25:18 joukj Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -34,6 +34,11 @@
|
||||
#include "conf.h"
|
||||
#endif
|
||||
|
||||
#ifdef VMS
|
||||
#include <GL/vms_x_fix.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -180,7 +185,7 @@ fill_bitmap (Display *dpy, Window win, GC gc,
|
||||
static XCharStruct *isvalid(XFontStruct *fs, int which)
|
||||
{
|
||||
unsigned int rows,pages;
|
||||
int byte1,byte2;
|
||||
int byte1 = 0,byte2 = 0;
|
||||
int i,valid = 1;
|
||||
|
||||
rows = fs->max_byte1 - fs->min_byte1 + 1;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: xfonts.h,v 1.1 2000/04/19 01:44:02 brianp Exp $ */
|
||||
/* $Id: xfonts.h,v 1.1.4.1 2001/02/09 08:25:18 joukj Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -28,6 +28,10 @@
|
||||
#ifndef XFONTS_H
|
||||
#define XFONTS_H
|
||||
|
||||
#ifdef VMS
|
||||
#include <vms_x_fix.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: glapi.c,v 1.42.4.1 2000/10/19 20:14:57 brianp Exp $ */
|
||||
/* $Id: glapi.c,v 1.42.4.2 2000/11/05 21:24:00 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -1565,7 +1565,7 @@ _glapi_add_entrypoint(const char *funcName, GLuint offset)
|
||||
{
|
||||
GLint index = get_static_proc_offset(funcName);
|
||||
if (index >= 0) {
|
||||
return (GLboolean) (index == offset); /* bad offset! */
|
||||
return (GLboolean) (index == (GLint) offset); /* bad offset! */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1673,7 +1673,7 @@ GLint
|
||||
_glapi_get_proc_offset(const char *funcName)
|
||||
{
|
||||
/* search extension functions first */
|
||||
GLint i;
|
||||
GLuint i;
|
||||
for (i = 0; i < NumExtEntryPoints; i++) {
|
||||
if (strcmp(ExtEntryTable[i].Name, funcName) == 0) {
|
||||
return ExtEntryTable[i].Offset;
|
||||
@@ -1693,7 +1693,7 @@ const GLvoid *
|
||||
_glapi_get_proc_address(const char *funcName)
|
||||
{
|
||||
/* search extension functions first */
|
||||
GLint i;
|
||||
GLuint i;
|
||||
for (i = 0; i < NumExtEntryPoints; i++) {
|
||||
if (strcmp(ExtEntryTable[i].Name, funcName) == 0) {
|
||||
return ExtEntryTable[i].Address;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: accum.c,v 1.23.2.1 2000/10/17 00:24:11 brianp Exp $ */
|
||||
/* $Id: accum.c,v 1.23.2.2 2000/11/05 21:24:00 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -360,10 +360,11 @@ _mesa_Accum( GLenum op, GLfloat value )
|
||||
static GLchan multTable[32768];
|
||||
static GLfloat prevMult = 0.0;
|
||||
GLuint j;
|
||||
const GLint max = MIN2((GLint) (256 / mult), 32767);
|
||||
GLint k;
|
||||
const GLint max = MIN2((GLuint) (256 / mult), 32767);
|
||||
if (mult != prevMult) {
|
||||
for (j = 0; j < max; j++)
|
||||
multTable[j] = (GLint) ((GLfloat) j * mult + 0.5F);
|
||||
for (k = 0; k < max; k++)
|
||||
multTable[k] = (GLint) ((GLfloat) k * mult + 0.5F);
|
||||
prevMult = mult;
|
||||
}
|
||||
|
||||
@@ -386,7 +387,7 @@ _mesa_Accum( GLenum op, GLfloat value )
|
||||
_mesa_mask_rgba_span( ctx, width, xpos, ypos, rgba );
|
||||
}
|
||||
(*ctx->Driver.WriteRGBASpan)( ctx, width, xpos, ypos,
|
||||
(const GLubyte (*)[4])rgba, NULL );
|
||||
(CONST GLubyte (*)[4]) rgba, NULL );
|
||||
ypos++;
|
||||
}
|
||||
}
|
||||
@@ -413,7 +414,7 @@ _mesa_Accum( GLenum op, GLfloat value )
|
||||
_mesa_mask_rgba_span( ctx, width, xpos, ypos, rgba );
|
||||
}
|
||||
(*ctx->Driver.WriteRGBASpan)( ctx, width, xpos, ypos,
|
||||
(const GLubyte (*)[4])rgba, NULL );
|
||||
(CONST GLubyte (*)[4]) rgba, NULL );
|
||||
ypos++;
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/* $Id: attrib.c,v 1.25.2.1 2000/09/28 22:39:41 brianp Exp $ */
|
||||
/* $Id: attrib.c,v 1.25.2.3 2001/01/29 22:15:36 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.4
|
||||
* Version: 3.4.1
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
*
|
||||
@@ -29,13 +29,29 @@
|
||||
#include "all.h"
|
||||
#else
|
||||
#include "glheader.h"
|
||||
#include "accum.h"
|
||||
#include "alpha.h"
|
||||
#include "attrib.h"
|
||||
#include "blend.h"
|
||||
#include "buffers.h"
|
||||
#include "clip.h"
|
||||
#include "context.h"
|
||||
#include "depth.h"
|
||||
#include "enable.h"
|
||||
#include "enums.h"
|
||||
#include "fog.h"
|
||||
#include "hint.h"
|
||||
#include "light.h"
|
||||
#include "lines.h"
|
||||
#include "logic.h"
|
||||
#include "masking.h"
|
||||
#include "matrix.h"
|
||||
#include "mem.h"
|
||||
#include "points.h"
|
||||
#include "polygon.h"
|
||||
#include "scissor.h"
|
||||
#include "simple_list.h"
|
||||
#include "stencil.h"
|
||||
#include "texstate.h"
|
||||
#include "types.h"
|
||||
#endif
|
||||
@@ -563,52 +579,49 @@ _mesa_PopAttrib(void)
|
||||
|
||||
switch (attr->kind) {
|
||||
case GL_ACCUM_BUFFER_BIT:
|
||||
MEMCPY( &ctx->Accum, attr->data, sizeof(struct gl_accum_attrib) );
|
||||
{
|
||||
const struct gl_accum_attrib *accum;
|
||||
accum = (const struct gl_accum_attrib *) attr->data;
|
||||
_mesa_ClearAccum(accum->ClearColor[0],
|
||||
accum->ClearColor[1],
|
||||
accum->ClearColor[2],
|
||||
accum->ClearColor[3]);
|
||||
}
|
||||
break;
|
||||
case GL_COLOR_BUFFER_BIT:
|
||||
{
|
||||
GLenum oldDrawBuffer = ctx->Color.DrawBuffer;
|
||||
GLenum oldAlphaFunc = ctx->Color.AlphaFunc;
|
||||
GLubyte oldAlphaRef = ctx->Color.AlphaRef;
|
||||
GLenum oldBlendSrc = ctx->Color.BlendSrcRGB;
|
||||
GLenum oldBlendDst = ctx->Color.BlendDstRGB;
|
||||
GLenum oldLogicOp = ctx->Color.LogicOp;
|
||||
MEMCPY( &ctx->Color, attr->data,
|
||||
sizeof(struct gl_colorbuffer_attrib) );
|
||||
if (ctx->Color.DrawBuffer != oldDrawBuffer) {
|
||||
_mesa_DrawBuffer( ctx->Color.DrawBuffer);
|
||||
}
|
||||
if ((ctx->Color.BlendSrcRGB != oldBlendSrc ||
|
||||
ctx->Color.BlendDstRGB != oldBlendDst) &&
|
||||
ctx->Driver.BlendFunc)
|
||||
(*ctx->Driver.BlendFunc)( ctx, ctx->Color.BlendSrcRGB,
|
||||
ctx->Color.BlendDstRGB);
|
||||
if (ctx->Color.LogicOp != oldLogicOp &&
|
||||
ctx->Driver.LogicOpcode) {
|
||||
ctx->Driver.LogicOpcode( ctx, ctx->Color.LogicOp );
|
||||
}
|
||||
if (ctx->Visual->RGBAflag) {
|
||||
GLubyte r = (GLint) (ctx->Color.ClearColor[0] * 255.0F);
|
||||
GLubyte g = (GLint) (ctx->Color.ClearColor[1] * 255.0F);
|
||||
GLubyte b = (GLint) (ctx->Color.ClearColor[2] * 255.0F);
|
||||
GLubyte a = (GLint) (ctx->Color.ClearColor[3] * 255.0F);
|
||||
(*ctx->Driver.ClearColor)( ctx, r, g, b, a );
|
||||
if ((ctx->Color.AlphaFunc != oldAlphaFunc ||
|
||||
ctx->Color.AlphaRef != oldAlphaRef) &&
|
||||
ctx->Driver.AlphaFunc)
|
||||
(*ctx->Driver.AlphaFunc)( ctx, ctx->Color.AlphaFunc,
|
||||
ctx->Color.AlphaRef / 255.0F);
|
||||
if (ctx->Driver.ColorMask) {
|
||||
(*ctx->Driver.ColorMask)(ctx,
|
||||
ctx->Color.ColorMask[0],
|
||||
ctx->Color.ColorMask[1],
|
||||
ctx->Color.ColorMask[2],
|
||||
ctx->Color.ColorMask[3]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
(*ctx->Driver.ClearIndex)( ctx, ctx->Color.ClearIndex);
|
||||
}
|
||||
const struct gl_colorbuffer_attrib *color;
|
||||
color = (const struct gl_colorbuffer_attrib *) attr->data;
|
||||
_mesa_ClearIndex(color->ClearIndex);
|
||||
_mesa_ClearColor(color->ClearColor[0],
|
||||
color->ClearColor[1],
|
||||
color->ClearColor[2],
|
||||
color->ClearColor[3]);
|
||||
_mesa_IndexMask(color->IndexMask);
|
||||
_mesa_ColorMask((GLboolean) (color->ColorMask[0] != 0),
|
||||
(GLboolean) (color->ColorMask[1] != 0),
|
||||
(GLboolean) (color->ColorMask[2] != 0),
|
||||
(GLboolean) (color->ColorMask[3] != 0));
|
||||
_mesa_DrawBuffer(color->DrawBuffer);
|
||||
_mesa_set_enable(ctx, GL_ALPHA_TEST, color->AlphaEnabled);
|
||||
_mesa_AlphaFunc(color->AlphaFunc,
|
||||
UBYTE_TO_FLOAT(color->AlphaRef));
|
||||
_mesa_set_enable(ctx, GL_BLEND, color->BlendEnabled);
|
||||
_mesa_BlendFuncSeparateEXT(color->BlendSrcRGB,
|
||||
color->BlendDstRGB,
|
||||
color->BlendSrcA,
|
||||
color->BlendDstA);
|
||||
_mesa_BlendEquation(color->BlendEquation);
|
||||
_mesa_BlendColor(color->BlendColor[0],
|
||||
color->BlendColor[1],
|
||||
color->BlendColor[2],
|
||||
color->BlendColor[3]);
|
||||
_mesa_LogicOp(color->LogicOp);
|
||||
_mesa_set_enable(ctx, GL_COLOR_LOGIC_OP,
|
||||
color->ColorLogicOpEnabled);
|
||||
_mesa_set_enable(ctx, GL_INDEX_LOGIC_OP,
|
||||
color->IndexLogicOpEnabled);
|
||||
_mesa_set_enable(ctx, GL_DITHER, color->DitherFlag);
|
||||
}
|
||||
break;
|
||||
case GL_CURRENT_BIT:
|
||||
@@ -617,20 +630,15 @@ _mesa_PopAttrib(void)
|
||||
break;
|
||||
case GL_DEPTH_BUFFER_BIT:
|
||||
{
|
||||
GLboolean oldDepthTest = ctx->Depth.Test;
|
||||
GLenum oldDepthFunc = ctx->Depth.Func;
|
||||
GLboolean oldDepthMask = ctx->Depth.Mask;
|
||||
GLfloat oldDepthClear = ctx->Depth.Clear;
|
||||
MEMCPY( &ctx->Depth, attr->data,
|
||||
sizeof(struct gl_depthbuffer_attrib) );
|
||||
if (ctx->Depth.Test != oldDepthTest && ctx->Driver.Enable)
|
||||
(*ctx->Driver.Enable)( ctx, GL_DEPTH_TEST, ctx->Depth.Test);
|
||||
if (ctx->Depth.Func != oldDepthFunc && ctx->Driver.DepthFunc)
|
||||
(*ctx->Driver.DepthFunc)( ctx, ctx->Depth.Func );
|
||||
if (ctx->Depth.Mask != oldDepthMask && ctx->Driver.DepthMask)
|
||||
(*ctx->Driver.DepthMask)( ctx, ctx->Depth.Mask );
|
||||
if (ctx->Depth.Clear != oldDepthClear && ctx->Driver.ClearDepth)
|
||||
(*ctx->Driver.ClearDepth)( ctx, ctx->Depth.Clear );
|
||||
const struct gl_depthbuffer_attrib *depth;
|
||||
depth = (const struct gl_depthbuffer_attrib *) attr->data;
|
||||
_mesa_DepthFunc(depth->Func);
|
||||
_mesa_ClearDepth(depth->Clear);
|
||||
_mesa_set_enable(ctx, GL_DEPTH_TEST, depth->Test);
|
||||
_mesa_DepthMask(depth->Mask);
|
||||
if (ctx->Extensions.HaveHpOcclusionTest)
|
||||
_mesa_set_enable(ctx, GL_OCCLUSION_TEST_HP,
|
||||
depth->OcclusionTest);
|
||||
}
|
||||
break;
|
||||
case GL_ENABLE_BIT:
|
||||
@@ -638,6 +646,7 @@ _mesa_PopAttrib(void)
|
||||
const struct gl_enable_attrib *enable;
|
||||
enable = (const struct gl_enable_attrib *) attr->data;
|
||||
pop_enable_group(ctx, enable);
|
||||
_mesa_set_enable(ctx, GL_POINT_SMOOTH, enable->PointSmooth);
|
||||
}
|
||||
break;
|
||||
case GL_EVAL_BIT:
|
||||
@@ -645,70 +654,81 @@ _mesa_PopAttrib(void)
|
||||
break;
|
||||
case GL_FOG_BIT:
|
||||
{
|
||||
GLboolean anyChange = (GLboolean) (memcmp( &ctx->Fog, attr->data, sizeof(struct gl_fog_attrib) ) != 0);
|
||||
MEMCPY( &ctx->Fog, attr->data, sizeof(struct gl_fog_attrib) );
|
||||
if (anyChange && ctx->Driver.Fogfv) {
|
||||
const GLfloat mode = (GLfloat) ctx->Fog.Mode;
|
||||
const GLfloat density = ctx->Fog.Density;
|
||||
const GLfloat start = ctx->Fog.Start;
|
||||
const GLfloat end = ctx->Fog.End;
|
||||
const GLfloat index = ctx->Fog.Index;
|
||||
(*ctx->Driver.Fogfv)( ctx, GL_FOG_MODE, &mode);
|
||||
(*ctx->Driver.Fogfv)( ctx, GL_FOG_DENSITY, &density );
|
||||
(*ctx->Driver.Fogfv)( ctx, GL_FOG_START, &start );
|
||||
(*ctx->Driver.Fogfv)( ctx, GL_FOG_END, &end );
|
||||
(*ctx->Driver.Fogfv)( ctx, GL_FOG_INDEX, &index );
|
||||
(*ctx->Driver.Fogfv)( ctx, GL_FOG_COLOR, ctx->Fog.Color );
|
||||
}
|
||||
ctx->Enabled &= ~ENABLE_FOG;
|
||||
if (ctx->Fog.Enabled) ctx->Enabled |= ENABLE_FOG;
|
||||
const struct gl_fog_attrib *fog;
|
||||
fog = (const struct gl_fog_attrib *) attr->data;
|
||||
_mesa_set_enable(ctx, GL_FOG, fog->Enabled);
|
||||
_mesa_Fogfv(GL_FOG_COLOR, fog->Color);
|
||||
_mesa_Fogf(GL_FOG_DENSITY, fog->Density);
|
||||
_mesa_Fogf(GL_FOG_START, fog->Start);
|
||||
_mesa_Fogf(GL_FOG_END, fog->End);
|
||||
_mesa_Fogf(GL_FOG_INDEX, fog->Index);
|
||||
_mesa_Fogi(GL_FOG_MODE, fog->Mode);
|
||||
}
|
||||
break;
|
||||
case GL_HINT_BIT:
|
||||
MEMCPY( &ctx->Hint, attr->data, sizeof(struct gl_hint_attrib) );
|
||||
if (ctx->Driver.Hint) {
|
||||
(*ctx->Driver.Hint)( ctx, GL_PERSPECTIVE_CORRECTION_HINT,
|
||||
ctx->Hint.PerspectiveCorrection );
|
||||
(*ctx->Driver.Hint)( ctx, GL_POINT_SMOOTH_HINT,
|
||||
ctx->Hint.PointSmooth);
|
||||
(*ctx->Driver.Hint)( ctx, GL_LINE_SMOOTH_HINT,
|
||||
ctx->Hint.LineSmooth );
|
||||
(*ctx->Driver.Hint)( ctx, GL_POLYGON_SMOOTH_HINT,
|
||||
ctx->Hint.PolygonSmooth );
|
||||
(*ctx->Driver.Hint)( ctx, GL_FOG_HINT, ctx->Hint.Fog );
|
||||
{
|
||||
const struct gl_hint_attrib *hint;
|
||||
hint = (const struct gl_hint_attrib *) attr->data;
|
||||
/* XXX this memcpy is temporary: */
|
||||
MEMCPY(&ctx->Hint, hint, sizeof(struct gl_hint_attrib));
|
||||
_mesa_Hint(GL_PERSPECTIVE_CORRECTION_HINT,
|
||||
hint->PerspectiveCorrection );
|
||||
_mesa_Hint(GL_POINT_SMOOTH_HINT, hint->PointSmooth);
|
||||
_mesa_Hint(GL_LINE_SMOOTH_HINT, hint->LineSmooth);
|
||||
_mesa_Hint(GL_POLYGON_SMOOTH_HINT, hint->PolygonSmooth);
|
||||
_mesa_Hint(GL_FOG_HINT, hint->Fog);
|
||||
_mesa_Hint(GL_CLIP_VOLUME_CLIPPING_HINT_EXT,
|
||||
hint->ClipVolumeClipping);
|
||||
if (ctx->Extensions.HaveTextureCompression)
|
||||
_mesa_Hint(GL_TEXTURE_COMPRESSION_HINT_ARB,
|
||||
hint->TextureCompression);
|
||||
/* XXX keep PGI_misc_hints? */
|
||||
}
|
||||
break;
|
||||
case GL_LIGHTING_BIT:
|
||||
MEMCPY( &ctx->Light, attr->data, sizeof(struct gl_light_attrib) );
|
||||
if (ctx->Driver.Enable) {
|
||||
{
|
||||
GLuint i;
|
||||
const struct gl_light_attrib *light;
|
||||
light = (const struct gl_light_attrib *) attr->data;
|
||||
/* lighting enable */
|
||||
_mesa_set_enable(ctx, GL_LIGHTING, light->Enabled);
|
||||
/* per-light state */
|
||||
for (i = 0; i < MAX_LIGHTS; i++) {
|
||||
GLenum light = (GLenum) (GL_LIGHT0 + i);
|
||||
(*ctx->Driver.Enable)( ctx, light, ctx->Light.Light[i].Enabled );
|
||||
GLenum lgt = (GLenum) (GL_LIGHT0 + i);
|
||||
_mesa_set_enable(ctx, lgt, light->Light[i].Enabled);
|
||||
MEMCPY(&ctx->Light.Light[i], &light->Light[i],
|
||||
sizeof(struct gl_light));
|
||||
}
|
||||
(*ctx->Driver.Enable)( ctx, GL_LIGHTING, ctx->Light.Enabled );
|
||||
/* light model */
|
||||
_mesa_LightModelfv(GL_LIGHT_MODEL_AMBIENT,
|
||||
light->Model.Ambient);
|
||||
_mesa_LightModelf(GL_LIGHT_MODEL_LOCAL_VIEWER,
|
||||
(GLfloat) light->Model.LocalViewer);
|
||||
_mesa_LightModelf(GL_LIGHT_MODEL_TWO_SIDE,
|
||||
(GLfloat) light->Model.TwoSide);
|
||||
_mesa_LightModelf(GL_LIGHT_MODEL_COLOR_CONTROL,
|
||||
(GLfloat) light->Model.ColorControl);
|
||||
/* materials */
|
||||
MEMCPY(ctx->Light.Material, light->Material,
|
||||
2 * sizeof(struct gl_material));
|
||||
/* shade model */
|
||||
_mesa_ShadeModel(light->ShadeModel);
|
||||
/* color material */
|
||||
_mesa_ColorMaterial(light->ColorMaterialFace,
|
||||
light->ColorMaterialMode);
|
||||
_mesa_set_enable(ctx, GL_COLOR_MATERIAL,
|
||||
light->ColorMaterialEnabled);
|
||||
}
|
||||
if (ctx->Light.ShadeModel == GL_FLAT)
|
||||
ctx->TriangleCaps |= DD_FLATSHADE;
|
||||
else
|
||||
ctx->TriangleCaps &= ~DD_FLATSHADE;
|
||||
if (ctx->Driver.ShadeModel)
|
||||
(*ctx->Driver.ShadeModel)(ctx, ctx->Light.ShadeModel);
|
||||
ctx->Enabled &= ~ENABLE_LIGHT;
|
||||
if (ctx->Light.Enabled && !is_empty_list(&ctx->Light.EnabledList))
|
||||
ctx->Enabled |= ENABLE_LIGHT;
|
||||
break;
|
||||
case GL_LINE_BIT:
|
||||
MEMCPY( &ctx->Line, attr->data, sizeof(struct gl_line_attrib) );
|
||||
if (ctx->Driver.Enable) {
|
||||
(*ctx->Driver.Enable)( ctx, GL_LINE_SMOOTH, ctx->Line.SmoothFlag );
|
||||
(*ctx->Driver.Enable)( ctx, GL_LINE_STIPPLE, ctx->Line.StippleFlag );
|
||||
{
|
||||
const struct gl_line_attrib *line;
|
||||
line = (const struct gl_line_attrib *) attr->data;
|
||||
_mesa_set_enable(ctx, GL_LINE_SMOOTH, line->SmoothFlag);
|
||||
_mesa_set_enable(ctx, GL_LINE_STIPPLE, line->StippleFlag);
|
||||
_mesa_LineStipple(line->StippleFactor, line->StipplePattern);
|
||||
_mesa_LineWidth(line->Width);
|
||||
}
|
||||
if (ctx->Driver.LineStipple)
|
||||
(*ctx->Driver.LineStipple)(ctx, ctx->Line.StippleFactor,
|
||||
ctx->Line.StipplePattern);
|
||||
if (ctx->Driver.LineWidth)
|
||||
(*ctx->Driver.LineWidth)(ctx, ctx->Line.Width);
|
||||
break;
|
||||
case GL_LIST_BIT:
|
||||
MEMCPY( &ctx->List, attr->data, sizeof(struct gl_list_attrib) );
|
||||
@@ -717,30 +737,38 @@ _mesa_PopAttrib(void)
|
||||
MEMCPY( &ctx->Pixel, attr->data, sizeof(struct gl_pixel_attrib) );
|
||||
break;
|
||||
case GL_POINT_BIT:
|
||||
MEMCPY( &ctx->Point, attr->data, sizeof(struct gl_point_attrib) );
|
||||
if (ctx->Driver.Enable)
|
||||
(*ctx->Driver.Enable)( ctx, GL_POINT_SMOOTH, ctx->Point.SmoothFlag );
|
||||
{
|
||||
const struct gl_point_attrib *point;
|
||||
point = (const struct gl_point_attrib *) attr->data;
|
||||
_mesa_PointSize(point->Size);
|
||||
_mesa_set_enable(ctx, GL_POINT_SMOOTH, point->SmoothFlag);
|
||||
_mesa_PointParameterfvEXT(GL_DISTANCE_ATTENUATION_EXT,
|
||||
point->Params);
|
||||
_mesa_PointParameterfEXT(GL_POINT_SIZE_MIN_EXT, point->MinSize);
|
||||
_mesa_PointParameterfEXT(GL_POINT_SIZE_MAX_EXT, point->MaxSize);
|
||||
_mesa_PointParameterfEXT(GL_POINT_FADE_THRESHOLD_SIZE_EXT,
|
||||
point->Threshold);
|
||||
}
|
||||
break;
|
||||
case GL_POLYGON_BIT:
|
||||
{
|
||||
GLenum oldFrontMode = ctx->Polygon.FrontMode;
|
||||
GLenum oldBackMode = ctx->Polygon.BackMode;
|
||||
MEMCPY( &ctx->Polygon, attr->data,
|
||||
sizeof(struct gl_polygon_attrib) );
|
||||
if ((ctx->Polygon.FrontMode != oldFrontMode ||
|
||||
ctx->Polygon.BackMode != oldBackMode) &&
|
||||
ctx->Driver.PolygonMode) {
|
||||
(*ctx->Driver.PolygonMode)( ctx, GL_FRONT, ctx->Polygon.FrontMode);
|
||||
(*ctx->Driver.PolygonMode)( ctx, GL_BACK, ctx->Polygon.BackMode);
|
||||
}
|
||||
if (ctx->Driver.CullFace)
|
||||
ctx->Driver.CullFace( ctx, ctx->Polygon.CullFaceMode );
|
||||
|
||||
if (ctx->Driver.FrontFace)
|
||||
ctx->Driver.FrontFace( ctx, ctx->Polygon.FrontFace );
|
||||
|
||||
if (ctx->Driver.Enable)
|
||||
(*ctx->Driver.Enable)( ctx, GL_POLYGON_SMOOTH, ctx->Polygon.SmoothFlag );
|
||||
const struct gl_polygon_attrib *polygon;
|
||||
polygon = (const struct gl_polygon_attrib *) attr->data;
|
||||
_mesa_CullFace(polygon->CullFaceMode);
|
||||
_mesa_FrontFace(polygon->FrontFace);
|
||||
_mesa_PolygonMode(GL_FRONT, polygon->FrontMode);
|
||||
_mesa_PolygonMode(GL_BACK, polygon->BackMode);
|
||||
_mesa_PolygonOffset(polygon->OffsetFactor,
|
||||
polygon->OffsetUnits);
|
||||
_mesa_set_enable(ctx, GL_POLYGON_SMOOTH, polygon->SmoothFlag);
|
||||
_mesa_set_enable(ctx, GL_POLYGON_STIPPLE, polygon->StippleFlag);
|
||||
_mesa_set_enable(ctx, GL_CULL_FACE, polygon->CullFlag);
|
||||
_mesa_set_enable(ctx, GL_POLYGON_OFFSET_POINT,
|
||||
polygon->OffsetPoint);
|
||||
_mesa_set_enable(ctx, GL_POLYGON_OFFSET_LINE,
|
||||
polygon->OffsetLine);
|
||||
_mesa_set_enable(ctx, GL_POLYGON_OFFSET_FILL,
|
||||
polygon->OffsetFill);
|
||||
}
|
||||
break;
|
||||
case GL_POLYGON_STIPPLE_BIT:
|
||||
@@ -749,48 +777,53 @@ _mesa_PopAttrib(void)
|
||||
ctx->Driver.PolygonStipple( ctx, (const GLubyte *) attr->data );
|
||||
break;
|
||||
case GL_SCISSOR_BIT:
|
||||
MEMCPY( &ctx->Scissor, attr->data,
|
||||
sizeof(struct gl_scissor_attrib) );
|
||||
if (ctx->Driver.Enable)
|
||||
(*ctx->Driver.Enable)( ctx, GL_SCISSOR_TEST, ctx->Scissor.Enabled );
|
||||
if (ctx->Driver.Scissor)
|
||||
ctx->Driver.Scissor( ctx, ctx->Scissor.X, ctx->Scissor.Y,
|
||||
ctx->Scissor.Width, ctx->Scissor.Height );
|
||||
{
|
||||
const struct gl_scissor_attrib *scissor;
|
||||
scissor = (const struct gl_scissor_attrib *) attr->data;
|
||||
_mesa_Scissor(scissor->X, scissor->Y,
|
||||
scissor->Width, scissor->Height);
|
||||
_mesa_set_enable(ctx, GL_SCISSOR_TEST, scissor->Enabled);
|
||||
}
|
||||
break;
|
||||
case GL_STENCIL_BUFFER_BIT:
|
||||
MEMCPY( &ctx->Stencil, attr->data,
|
||||
sizeof(struct gl_stencil_attrib) );
|
||||
if (ctx->Driver.StencilFunc)
|
||||
(*ctx->Driver.StencilFunc)( ctx, ctx->Stencil.Function,
|
||||
ctx->Stencil.Ref, ctx->Stencil.ValueMask);
|
||||
if (ctx->Driver.StencilMask)
|
||||
(*ctx->Driver.StencilMask)( ctx, ctx->Stencil.WriteMask );
|
||||
if (ctx->Driver.StencilOp)
|
||||
(*ctx->Driver.StencilOp)( ctx, ctx->Stencil.FailFunc,
|
||||
ctx->Stencil.ZFailFunc, ctx->Stencil.ZPassFunc);
|
||||
if (ctx->Driver.ClearStencil)
|
||||
(*ctx->Driver.ClearStencil)( ctx, ctx->Stencil.Clear );
|
||||
if (ctx->Driver.Enable)
|
||||
(*ctx->Driver.Enable)( ctx, GL_STENCIL_TEST, ctx->Stencil.Enabled );
|
||||
ctx->TriangleCaps &= ~DD_STENCIL;
|
||||
if (ctx->Stencil.Enabled)
|
||||
ctx->TriangleCaps |= DD_STENCIL;
|
||||
|
||||
{
|
||||
const struct gl_stencil_attrib *stencil;
|
||||
stencil = (const struct gl_stencil_attrib *) attr->data;
|
||||
_mesa_set_enable(ctx, GL_STENCIL_TEST, stencil->Enabled);
|
||||
_mesa_ClearStencil(stencil->Clear);
|
||||
_mesa_StencilFunc(stencil->Function, stencil->Ref,
|
||||
stencil->ValueMask);
|
||||
_mesa_StencilMask(stencil->WriteMask);
|
||||
_mesa_StencilOp(stencil->FailFunc, stencil->ZFailFunc,
|
||||
stencil->ZPassFunc);
|
||||
}
|
||||
break;
|
||||
case GL_TRANSFORM_BIT:
|
||||
MEMCPY( &ctx->Transform, attr->data,
|
||||
sizeof(struct gl_transform_attrib) );
|
||||
if (ctx->Driver.Enable) {
|
||||
(*ctx->Driver.Enable)( ctx, GL_NORMALIZE, ctx->Transform.Normalize );
|
||||
(*ctx->Driver.Enable)( ctx, GL_RESCALE_NORMAL_EXT, ctx->Transform.RescaleNormals );
|
||||
{
|
||||
GLuint i;
|
||||
const struct gl_transform_attrib *xform;
|
||||
xform = (const struct gl_transform_attrib *) attr->data;
|
||||
_mesa_MatrixMode(xform->MatrixMode);
|
||||
/* clip planes */
|
||||
MEMCPY(ctx->Transform.EyeUserPlane, xform->EyeUserPlane,
|
||||
sizeof(xform->EyeUserPlane));
|
||||
MEMCPY(ctx->Transform.ClipUserPlane, xform->ClipUserPlane,
|
||||
sizeof(xform->EyeUserPlane));
|
||||
/* clip plane enable flags */
|
||||
for (i = 0; i < MAX_CLIP_PLANES; i++) {
|
||||
_mesa_set_enable(ctx, GL_CLIP_PLANE0 + i,
|
||||
xform->ClipEnabled[i]);
|
||||
}
|
||||
/* normalize/rescale */
|
||||
_mesa_set_enable(ctx, GL_NORMALIZE, ctx->Transform.Normalize);
|
||||
_mesa_set_enable(ctx, GL_RESCALE_NORMAL_EXT,
|
||||
ctx->Transform.RescaleNormals);
|
||||
}
|
||||
ctx->Enabled &= ~(ENABLE_NORMALIZE|ENABLE_RESCALE);
|
||||
if (ctx->Transform.Normalize) ctx->Enabled |= ENABLE_NORMALIZE;
|
||||
if (ctx->Transform.RescaleNormals) ctx->Enabled |= ENABLE_RESCALE;
|
||||
break;
|
||||
case GL_TEXTURE_BIT:
|
||||
/* Take care of texture object reference counters */
|
||||
{
|
||||
/* XXX call _mesa_Tex*() functions directly? */
|
||||
GLuint u;
|
||||
for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
|
||||
ctx->Texture.Unit[u].CurrentD[1]->RefCount--;
|
||||
@@ -819,14 +852,13 @@ _mesa_PopAttrib(void)
|
||||
}
|
||||
break;
|
||||
case GL_VIEWPORT_BIT:
|
||||
{
|
||||
struct gl_viewport_attrib *v =
|
||||
(struct gl_viewport_attrib *)attr->data;
|
||||
|
||||
_mesa_Viewport( v->X, v->Y, v->Width, v->Height );
|
||||
_mesa_DepthRange( v->Near, v->Far );
|
||||
break;
|
||||
}
|
||||
{
|
||||
const struct gl_viewport_attrib *vp;
|
||||
vp = (const struct gl_viewport_attrib *)attr->data;
|
||||
_mesa_Viewport(vp->X, vp->Y, vp->Width, vp->Height);
|
||||
_mesa_DepthRange(vp->Near, vp->Far);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
gl_problem( ctx, "Bad attrib flag in PopAttrib");
|
||||
break;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: blend.c,v 1.16.4.2 2000/10/22 23:10:49 gareth Exp $ */
|
||||
/* $Id: blend.c,v 1.16.4.3 2000/11/05 21:24:00 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -890,7 +890,7 @@ _mesa_blend_span( GLcontext *ctx, GLuint n, GLint x, GLint y,
|
||||
if (!ctx->Color.BlendFunc)
|
||||
set_blend_function(ctx);
|
||||
|
||||
(*ctx->Color.BlendFunc)( ctx, n, mask, rgba, (const GLubyte (*)[4])dest );
|
||||
(*ctx->Color.BlendFunc)( ctx, n, mask, rgba, (CONST GLubyte (*)[4])dest );
|
||||
}
|
||||
|
||||
|
||||
@@ -925,5 +925,5 @@ _mesa_blend_pixels( GLcontext *ctx,
|
||||
if (!ctx->Color.BlendFunc)
|
||||
set_blend_function(ctx);
|
||||
|
||||
(*ctx->Color.BlendFunc)( ctx, n, mask, rgba, (const GLubyte (*)[4])dest );
|
||||
(*ctx->Color.BlendFunc)( ctx, n, mask, rgba, (CONST GLubyte (*)[4])dest );
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: buffers.c,v 1.9.4.2 2000/10/19 18:14:58 brianp Exp $ */
|
||||
/* $Id: buffers.c,v 1.9.4.3 2000/11/05 21:24:00 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -168,7 +168,7 @@ clear_color_buffer(GLcontext *ctx)
|
||||
}
|
||||
else {
|
||||
/* Color index mode */
|
||||
ASSERT(ctx->Color.IndexMask == ~0);
|
||||
ASSERT(ctx->Color.IndexMask == (GLuint) ~0);
|
||||
if (ctx->Visual->IndexBits == 8) {
|
||||
/* 8-bit clear */
|
||||
GLubyte span[MAX_WIDTH];
|
||||
|
@@ -1,10 +1,10 @@
|
||||
/* $Id: clip.c,v 1.8 2000/04/17 18:18:00 keithw Exp $ */
|
||||
/* $Id: clip.c,v 1.8.4.1 2001/02/09 16:46:56 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
* Version: 3.4.1
|
||||
*
|
||||
* Copyright (C) 1999 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -301,14 +301,8 @@ GLuint gl_userclip_point( GLcontext* ctx, const GLfloat v[] )
|
||||
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
#define NEGATIVE(x) ((*(int *)&x)<0)
|
||||
#define DIFFERENT_SIGNS(a,b) ((a*b) < 0)
|
||||
#else
|
||||
#define NEGATIVE(x) (x < 0)
|
||||
#define DIFFERENT_SIGNS(a,b) ((a*b) < 0)
|
||||
#endif
|
||||
#define NEGATIVE(x) ((x) < 0.0)
|
||||
#define DIFFERENT_SIGNS(a, b) (((a) * (b)) <= 0.0 && ((a) != (b)))
|
||||
|
||||
|
||||
static clip_poly_func gl_poly_clip_tab[2][5];
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: colortab.c,v 1.20 2000/06/29 18:54:29 brianp Exp $ */
|
||||
/* $Id: colortab.c,v 1.20.4.3 2000/11/21 23:00:22 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -325,17 +325,14 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
|
||||
return;
|
||||
}
|
||||
|
||||
if (width > ctx->Const.MaxColorTableSize) {
|
||||
if (width > (GLsizei) ctx->Const.MaxColorTableSize) {
|
||||
if (proxy) {
|
||||
table->Size = 0;
|
||||
table->IntFormat = (GLenum) 0;
|
||||
table->Format = (GLenum) 0;
|
||||
}
|
||||
else {
|
||||
if (width > ctx->Const.MaxColorTableSize)
|
||||
gl_error(ctx, GL_TABLE_TOO_LARGE, "glColorTable(width)");
|
||||
else
|
||||
gl_error(ctx, GL_INVALID_VALUE, "glColorTable(width)");
|
||||
gl_error(ctx, GL_TABLE_TOO_LARGE, "glColorTable(width)");
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -356,12 +353,12 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
|
||||
if (floatTable) {
|
||||
GLfloat tempTab[MAX_COLOR_TABLE_SIZE * 4];
|
||||
GLfloat *tableF;
|
||||
GLuint i;
|
||||
GLint i;
|
||||
|
||||
_mesa_unpack_float_color_span(ctx, width, table->Format,
|
||||
tempTab, /* dest */
|
||||
format, type, data,
|
||||
&ctx->Unpack, GL_TRUE, GL_FALSE);
|
||||
&ctx->Unpack, GL_FALSE, GL_FALSE);
|
||||
|
||||
table->TableType = GL_FLOAT;
|
||||
table->Table = MALLOC(comps * width * sizeof(GLfloat));
|
||||
@@ -423,9 +420,9 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
|
||||
return;
|
||||
}
|
||||
_mesa_unpack_ubyte_color_span(ctx, width, table->Format,
|
||||
table->Table, /* dest */
|
||||
(GLubyte *) table->Table, /* dest */
|
||||
format, type, data,
|
||||
&ctx->Unpack, GL_TRUE);
|
||||
&ctx->Unpack, GL_FALSE);
|
||||
} /* floatTable */
|
||||
} /* proxy */
|
||||
|
||||
@@ -524,7 +521,7 @@ _mesa_ColorSubTable( GLenum target, GLsizei start,
|
||||
comps = _mesa_components_in_format(table->Format);
|
||||
assert(comps > 0); /* error should have been caught sooner */
|
||||
|
||||
if (start + count > table->Size) {
|
||||
if (start + count > (GLint) table->Size) {
|
||||
gl_error(ctx, GL_INVALID_VALUE, "glColorSubTable(count)");
|
||||
return;
|
||||
}
|
||||
@@ -537,19 +534,19 @@ _mesa_ColorSubTable( GLenum target, GLsizei start,
|
||||
if (table->TableType == GL_UNSIGNED_BYTE) {
|
||||
GLubyte *dest = (GLubyte *) table->Table + start * comps * sizeof(GLubyte);
|
||||
_mesa_unpack_ubyte_color_span(ctx, count, table->Format, dest,
|
||||
format, type, data, &ctx->Unpack, GL_TRUE);
|
||||
format, type, data, &ctx->Unpack, GL_FALSE);
|
||||
}
|
||||
else {
|
||||
GLfloat tempTab[MAX_COLOR_TABLE_SIZE * 4];
|
||||
GLfloat *tableF;
|
||||
GLuint i;
|
||||
GLint i;
|
||||
|
||||
ASSERT(table->TableType == GL_FLOAT);
|
||||
|
||||
_mesa_unpack_float_color_span(ctx, count, table->Format,
|
||||
tempTab, /* dest */
|
||||
format, type, data,
|
||||
&ctx->Unpack, GL_TRUE, GL_FALSE);
|
||||
&ctx->Unpack, GL_FALSE, GL_FALSE);
|
||||
|
||||
tableF = (GLfloat *) table->Table;
|
||||
|
||||
@@ -629,7 +626,9 @@ _mesa_CopyColorTable(GLenum target, GLenum internalformat,
|
||||
width = MAX_WIDTH;
|
||||
|
||||
/* read the data from framebuffer */
|
||||
RENDER_START(ctx);
|
||||
gl_read_rgba_span( ctx, ctx->ReadBuffer, width, x, y, data );
|
||||
RENDER_FINISH(ctx);
|
||||
|
||||
/* Restore reading from draw buffer (the default) */
|
||||
(*ctx->Driver.SetReadBuffer)( ctx, ctx->DrawBuffer,
|
||||
@@ -658,7 +657,9 @@ _mesa_CopyColorSubTable(GLenum target, GLsizei start,
|
||||
width = MAX_WIDTH;
|
||||
|
||||
/* read the data from framebuffer */
|
||||
RENDER_START(ctx);
|
||||
gl_read_rgba_span( ctx, ctx->ReadBuffer, width, x, y, data );
|
||||
RENDER_FINISH(ctx);
|
||||
|
||||
/* Restore reading from draw buffer (the default) */
|
||||
(*ctx->Driver.SetReadBuffer)( ctx, ctx->DrawBuffer,
|
||||
@@ -677,7 +678,7 @@ _mesa_GetColorTable( GLenum target, GLenum format,
|
||||
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
|
||||
struct gl_color_table *table = NULL;
|
||||
GLubyte rgba[MAX_COLOR_TABLE_SIZE][4];
|
||||
GLint i;
|
||||
GLuint i;
|
||||
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx, "glGetColorTable");
|
||||
|
||||
@@ -836,7 +837,7 @@ _mesa_GetColorTable( GLenum target, GLenum format,
|
||||
return;
|
||||
}
|
||||
|
||||
_mesa_pack_rgba_span(ctx, table->Size, (const GLubyte (*)[]) rgba,
|
||||
_mesa_pack_rgba_span(ctx, table->Size, (CONST GLubyte (*)[4]) rgba,
|
||||
format, type, data, &ctx->Pack, GL_FALSE);
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,3 @@
|
||||
/* $Id: context.c,v 1.79.2.5 2000/10/17 00:24:11 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -413,10 +412,10 @@ one_time_init( void )
|
||||
_mesa_init_fog();
|
||||
_mesa_init_math();
|
||||
gl_init_lists();
|
||||
gl_init_shade();
|
||||
gl_init_texture();
|
||||
gl_init_transformation();
|
||||
gl_init_translate();
|
||||
gl_init_shade();
|
||||
gl_init_vbrender();
|
||||
gl_init_vbxform();
|
||||
gl_init_vertices();
|
||||
@@ -457,6 +456,9 @@ alloc_shared_state( void )
|
||||
|
||||
ss->DisplayList = _mesa_NewHashTable();
|
||||
ss->TexObjects = _mesa_NewHashTable();
|
||||
#ifdef VAO
|
||||
ss->ArrayObjects = _mesa_NewHashTable();
|
||||
#endif
|
||||
|
||||
/* Default Texture objects */
|
||||
outOfMemory = GL_FALSE;
|
||||
@@ -1189,6 +1191,13 @@ init_attrib_groups( GLcontext *ctx )
|
||||
ctx->Viewport.WindowMap.type = MATRIX_3D_NO_ROT;
|
||||
|
||||
/* Vertex arrays */
|
||||
#ifdef VAO
|
||||
{
|
||||
struct gl_array_object *arrayObj;
|
||||
arrayObj = _mesa_alloc_vertex_array_object(ctx, 0);
|
||||
ctx->Array.Current = arrayObj;
|
||||
}
|
||||
#else
|
||||
ctx->Array.Vertex.Size = 4;
|
||||
ctx->Array.Vertex.Type = GL_FLOAT;
|
||||
ctx->Array.Vertex.Stride = 0;
|
||||
@@ -1224,6 +1233,7 @@ init_attrib_groups( GLcontext *ctx )
|
||||
ctx->Array.EdgeFlag.StrideB = 0;
|
||||
ctx->Array.EdgeFlag.Ptr = NULL;
|
||||
ctx->Array.EdgeFlag.Enabled = GL_FALSE;
|
||||
#endif
|
||||
ctx->Array.ActiveTexture = 0; /* GL_ARB_multitexture */
|
||||
|
||||
/* Pixel transfer */
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: depth.c,v 1.17 2000/04/11 20:42:22 brianp Exp $ */
|
||||
/* $Id: depth.c,v 1.17.4.2 2001/02/08 15:54:33 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -1458,14 +1458,14 @@ _mesa_read_depth_span( GLcontext *ctx,
|
||||
/* read from software depth buffer */
|
||||
if (ctx->Visual->DepthBits <= 16) {
|
||||
const GLushort *zptr = Z_ADDRESS16( ctx, x, y );
|
||||
GLuint i;
|
||||
GLint i;
|
||||
for (i = 0; i < n; i++) {
|
||||
depth[i] = zptr[i];
|
||||
}
|
||||
}
|
||||
else {
|
||||
const GLuint *zptr = Z_ADDRESS32( ctx, x, y );
|
||||
GLuint i;
|
||||
GLint i;
|
||||
for (i = 0; i < n; i++) {
|
||||
depth[i] = zptr[i];
|
||||
}
|
||||
@@ -1530,14 +1530,14 @@ _mesa_read_depth_span_float( GLcontext *ctx,
|
||||
/* read from software depth buffer */
|
||||
if (ctx->Visual->DepthBits <= 16) {
|
||||
const GLushort *zptr = Z_ADDRESS16( ctx, x, y );
|
||||
GLuint i;
|
||||
GLint i;
|
||||
for (i = 0; i < n; i++) {
|
||||
depth[i] = (GLfloat) zptr[i] * scale;
|
||||
}
|
||||
}
|
||||
else {
|
||||
const GLuint *zptr = Z_ADDRESS32( ctx, x, y );
|
||||
GLuint i;
|
||||
GLint i;
|
||||
for (i = 0; i < n; i++) {
|
||||
depth[i] = (GLfloat) zptr[i] * scale;
|
||||
}
|
||||
@@ -1546,7 +1546,7 @@ _mesa_read_depth_span_float( GLcontext *ctx,
|
||||
else if (ctx->Driver.ReadDepthSpan) {
|
||||
/* read from hardware depth buffer */
|
||||
GLdepth d[MAX_WIDTH];
|
||||
GLuint i;
|
||||
GLint i;
|
||||
assert(n <= MAX_WIDTH);
|
||||
(*ctx->Driver.ReadDepthSpan)( ctx, n, x, y, d );
|
||||
for (i = 0; i < n; i++) {
|
||||
@@ -1630,29 +1630,31 @@ _mesa_clear_depth_buffer( GLcontext *ctx )
|
||||
if (ctx->Visual->DepthBits <= 16) {
|
||||
const GLushort clearValue = (GLushort) (ctx->Depth.Clear * ctx->Visual->DepthMax);
|
||||
const GLint rows = ctx->DrawBuffer->Ymax - ctx->DrawBuffer->Ymin + 1;
|
||||
const GLint width = ctx->DrawBuffer->Width;
|
||||
const GLint cols = ctx->DrawBuffer->Xmax - ctx->DrawBuffer->Xmin + 1;
|
||||
const GLint rowStride = ctx->DrawBuffer->Width;
|
||||
GLushort *dRow = (GLushort *) ctx->DrawBuffer->DepthBuffer
|
||||
+ ctx->DrawBuffer->Ymin * width + ctx->DrawBuffer->Xmin;
|
||||
+ ctx->DrawBuffer->Ymin * rowStride + ctx->DrawBuffer->Xmin;
|
||||
GLint i, j;
|
||||
for (i = 0; i < rows; i++) {
|
||||
for (j = 0; j < width; j++) {
|
||||
for (j = 0; j < cols; j++) {
|
||||
dRow[j] = clearValue;
|
||||
}
|
||||
dRow += width;
|
||||
dRow += rowStride;
|
||||
}
|
||||
}
|
||||
else {
|
||||
const GLuint clearValue = (GLuint) (ctx->Depth.Clear * ctx->Visual->DepthMax);
|
||||
const GLint rows = ctx->DrawBuffer->Ymax - ctx->DrawBuffer->Ymin + 1;
|
||||
const GLint width = ctx->DrawBuffer->Width;
|
||||
const GLint cols = ctx->DrawBuffer->Xmax - ctx->DrawBuffer->Xmin + 1;
|
||||
const GLint rowStride = ctx->DrawBuffer->Width;
|
||||
GLuint *dRow = (GLuint *) ctx->DrawBuffer->DepthBuffer
|
||||
+ ctx->DrawBuffer->Ymin * width + ctx->DrawBuffer->Xmin;
|
||||
+ ctx->DrawBuffer->Ymin * rowStride + ctx->DrawBuffer->Xmin;
|
||||
GLint i, j;
|
||||
for (i = 0; i < rows; i++) {
|
||||
for (j = 0; j < width; j++) {
|
||||
for (j = 0; j < cols; j++) {
|
||||
dRow[j] = clearValue;
|
||||
}
|
||||
dRow += width;
|
||||
dRow += rowStride;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -13,7 +13,7 @@ VPATH = RCS
|
||||
|
||||
INCDIR = [-.include]
|
||||
LIBDIR = [-.lib]
|
||||
CFLAGS = /include=($(INCDIR),[])/define=(FBIND=1)
|
||||
CFLAGS = /include=($(INCDIR),[])/define=(FBIND=1)/name=(as_is,short)
|
||||
|
||||
CORE_SOURCES = aatriangle.c accum.c alpha.c alphabuf.c attrib.c \
|
||||
bitmap.c blend.c buffers.c clip.c colortab.c context.c copypix.c depth.c \
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: drawpix.c,v 1.26.4.6 2000/10/17 00:24:11 brianp Exp $ */
|
||||
/* $Id: drawpix.c,v 1.26.4.7 2000/11/05 21:24:00 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -228,7 +228,7 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
|
||||
GLint row;
|
||||
for (row=0; row<drawHeight; row++) {
|
||||
(*ctx->Driver.WriteRGBASpan)(ctx, drawWidth, destX, destY,
|
||||
(void *) src, NULL);
|
||||
(CONST GLubyte (*)[4]) src, NULL);
|
||||
src += rowLength * 4;
|
||||
destY++;
|
||||
}
|
||||
@@ -239,7 +239,7 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
|
||||
for (row=0; row<drawHeight; row++) {
|
||||
destY--;
|
||||
(*ctx->Driver.WriteRGBASpan)(ctx, drawWidth, destX, destY,
|
||||
(void *) src, NULL);
|
||||
(CONST GLubyte (*)[4]) src, NULL);
|
||||
src += rowLength * 4;
|
||||
}
|
||||
}
|
||||
@@ -248,7 +248,7 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
|
||||
GLint row;
|
||||
for (row=0; row<drawHeight; row++) {
|
||||
gl_write_zoomed_rgba_span(ctx, drawWidth, destX, destY,
|
||||
zSpan, (void *) src, zoomY0);
|
||||
zSpan, (CONST GLubyte (*)[4]) src, zoomY0);
|
||||
src += rowLength * 4;
|
||||
destY++;
|
||||
}
|
||||
@@ -265,7 +265,7 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
|
||||
GLint row;
|
||||
for (row=0; row<drawHeight; row++) {
|
||||
(*ctx->Driver.WriteRGBSpan)(ctx, drawWidth, destX, destY,
|
||||
(void *) src, NULL);
|
||||
(CONST GLubyte (*)[3]) src, NULL);
|
||||
src += rowLength * 3;
|
||||
destY++;
|
||||
}
|
||||
@@ -276,7 +276,7 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
|
||||
for (row=0; row<drawHeight; row++) {
|
||||
destY--;
|
||||
(*ctx->Driver.WriteRGBSpan)(ctx, drawWidth, destX, destY,
|
||||
(void *) src, NULL);
|
||||
(CONST GLubyte (*)[3]) src, NULL);
|
||||
src += rowLength * 3;
|
||||
}
|
||||
}
|
||||
@@ -285,7 +285,7 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
|
||||
GLint row;
|
||||
for (row=0; row<drawHeight; row++) {
|
||||
gl_write_zoomed_rgb_span(ctx, drawWidth, destX, destY,
|
||||
zSpan, (void *) src, zoomY0);
|
||||
zSpan, (CONST GLubyte (*)[3]) src, zoomY0);
|
||||
src += rowLength * 3;
|
||||
destY++;
|
||||
}
|
||||
@@ -310,7 +310,7 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
|
||||
rgb[i][2] = src[i];
|
||||
}
|
||||
(*ctx->Driver.WriteRGBSpan)(ctx, drawWidth, destX, destY,
|
||||
(void *) rgb, NULL);
|
||||
(CONST GLubyte (*)[3]) rgb, NULL);
|
||||
src += rowLength;
|
||||
destY++;
|
||||
}
|
||||
@@ -328,7 +328,7 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
|
||||
}
|
||||
destY--;
|
||||
(*ctx->Driver.WriteRGBSpan)(ctx, drawWidth, destX, destY,
|
||||
(void *) rgb, NULL);
|
||||
(CONST GLubyte (*)[3]) rgb, NULL);
|
||||
src += rowLength;
|
||||
}
|
||||
}
|
||||
@@ -344,7 +344,7 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
|
||||
rgb[i][2] = src[i];
|
||||
}
|
||||
gl_write_zoomed_rgb_span(ctx, drawWidth, destX, destY,
|
||||
zSpan, (void *) rgb, zoomY0);
|
||||
zSpan, (CONST GLubyte (*)[3]) rgb, zoomY0);
|
||||
src += rowLength;
|
||||
destY++;
|
||||
}
|
||||
@@ -371,7 +371,7 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
|
||||
rgba[i][3] = *ptr++;
|
||||
}
|
||||
(*ctx->Driver.WriteRGBASpan)(ctx, drawWidth, destX, destY,
|
||||
(void *) rgba, NULL);
|
||||
(CONST GLubyte (*)[4]) rgba, NULL);
|
||||
src += rowLength*2;
|
||||
destY++;
|
||||
}
|
||||
@@ -391,7 +391,7 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
|
||||
}
|
||||
destY--;
|
||||
(*ctx->Driver.WriteRGBASpan)(ctx, drawWidth, destX, destY,
|
||||
(void *) rgba, NULL);
|
||||
(CONST GLubyte (*)[4]) rgba, NULL);
|
||||
src += rowLength*2;
|
||||
}
|
||||
}
|
||||
@@ -409,7 +409,7 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
|
||||
rgba[i][3] = *ptr++;
|
||||
}
|
||||
gl_write_zoomed_rgba_span(ctx, drawWidth, destX, destY,
|
||||
zSpan, (void *) rgba, zoomY0);
|
||||
zSpan, (CONST GLubyte (*)[4]) rgba, zoomY0);
|
||||
src += rowLength*2;
|
||||
destY++;
|
||||
}
|
||||
@@ -428,7 +428,7 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
|
||||
ASSERT(drawWidth < MAX_WIDTH);
|
||||
_mesa_map_ci8_to_rgba(ctx, drawWidth, src, rgba);
|
||||
(*ctx->Driver.WriteRGBASpan)(ctx, drawWidth, destX, destY,
|
||||
(const GLubyte (*)[4])rgba,
|
||||
(CONST GLubyte (*)[4])rgba,
|
||||
NULL);
|
||||
src += rowLength;
|
||||
destY++;
|
||||
@@ -443,7 +443,7 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
|
||||
_mesa_map_ci8_to_rgba(ctx, drawWidth, src, rgba);
|
||||
destY--;
|
||||
(*ctx->Driver.WriteRGBASpan)(ctx, drawWidth, destX, destY,
|
||||
(const GLubyte (*)[4])rgba,
|
||||
(CONST GLubyte (*)[4])rgba,
|
||||
NULL);
|
||||
src += rowLength;
|
||||
}
|
||||
@@ -456,7 +456,7 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
|
||||
ASSERT(drawWidth < MAX_WIDTH);
|
||||
_mesa_map_ci8_to_rgba(ctx, drawWidth, src, rgba);
|
||||
gl_write_zoomed_rgba_span(ctx, drawWidth, destX, destY,
|
||||
zSpan, (void *) rgba, zoomY0);
|
||||
zSpan, (CONST GLubyte (*)[4]) rgba, zoomY0);
|
||||
src += rowLength;
|
||||
destY++;
|
||||
}
|
||||
@@ -646,8 +646,9 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y,
|
||||
GLint row;
|
||||
for (row = 0; row < height; row++, y++) {
|
||||
GLdepth zspan[MAX_WIDTH];
|
||||
const GLushort *zptr = _mesa_image_address(&ctx->Unpack,
|
||||
pixels, width, height, GL_DEPTH_COMPONENT, type, 0, row, 0);
|
||||
const GLushort *zptr = (const GLushort *)
|
||||
_mesa_image_address(&ctx->Unpack, pixels, width, height,
|
||||
GL_DEPTH_COMPONENT, type, 0, row, 0);
|
||||
GLint i;
|
||||
for (i = 0; i < width; i++)
|
||||
zspan[i] = zptr[i];
|
||||
@@ -659,8 +660,9 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y,
|
||||
/* Special case: directly write 32-bit depth values */
|
||||
GLint row;
|
||||
for (row = 0; row < height; row++, y++) {
|
||||
const GLuint *zptr = _mesa_image_address(&ctx->Unpack,
|
||||
pixels, width, height, GL_DEPTH_COMPONENT, type, 0, row, 0);
|
||||
const GLuint *zptr = (const GLuint *)
|
||||
_mesa_image_address(&ctx->Unpack, pixels, width, height,
|
||||
GL_DEPTH_COMPONENT, type, 0, row, 0);
|
||||
gl_write_rgba_span( ctx, width, x, y, zptr, rgba, GL_BITMAP );
|
||||
}
|
||||
}
|
||||
@@ -676,7 +678,7 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y,
|
||||
if (ctx->Visual->RGBAflag) {
|
||||
if (zoom) {
|
||||
gl_write_zoomed_rgba_span(ctx, width, x, y, zspan,
|
||||
(const GLubyte (*)[4])rgba, desty);
|
||||
(CONST GLubyte (*)[4])rgba, desty);
|
||||
}
|
||||
else {
|
||||
gl_write_rgba_span(ctx, width, x, y, zspan, rgba, GL_BITMAP);
|
||||
@@ -752,8 +754,8 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y,
|
||||
for (row = 0; row < height; row++, y++) {
|
||||
const GLvoid *source = _mesa_image_address(unpack,
|
||||
pixels, width, height, format, type, 0, row, 0);
|
||||
_mesa_unpack_ubyte_color_span(ctx, width, GL_RGBA, (void*) rgba,
|
||||
format, type, source, unpack, GL_TRUE);
|
||||
_mesa_unpack_ubyte_color_span(ctx, width, GL_RGBA,
|
||||
(GLubyte *) rgba, format, type, source, unpack, GL_TRUE);
|
||||
if ((ctx->Pixel.MinMaxEnabled && ctx->MinMax.Sink) ||
|
||||
(ctx->Pixel.HistogramEnabled && ctx->Histogram.Sink))
|
||||
continue;
|
||||
@@ -767,7 +769,7 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y,
|
||||
MEMCPY(primary_rgba, rgba, 4 * width * sizeof(GLubyte));
|
||||
|
||||
for (unit = 0; unit < MAX_TEXTURE_UNITS; unit++) {
|
||||
_mesa_pixeltexgen(ctx, width, (const GLubyte (*)[4]) rgba,
|
||||
_mesa_pixeltexgen(ctx, width, (CONST GLubyte (*)[4]) rgba,
|
||||
s, t, r, q);
|
||||
gl_texture_pixels(ctx, unit, width, s, t, r, NULL,
|
||||
primary_rgba, rgba);
|
||||
@@ -776,11 +778,11 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y,
|
||||
|
||||
if (quickDraw) {
|
||||
(*ctx->Driver.WriteRGBASpan)( ctx, width, x, y,
|
||||
(CONST GLubyte (*)[]) rgba, NULL);
|
||||
(CONST GLubyte (*)[4]) rgba, NULL);
|
||||
}
|
||||
else if (zoom) {
|
||||
gl_write_zoomed_rgba_span( ctx, width, x, y, zspan,
|
||||
(CONST GLubyte (*)[]) rgba, desty );
|
||||
(CONST GLubyte (*)[4]) rgba, desty );
|
||||
}
|
||||
else {
|
||||
gl_write_rgba_span( ctx, (GLuint) width, x, y, zspan, rgba, GL_BITMAP);
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: enable.c,v 1.21.4.2 2000/10/21 01:22:13 brianp Exp $ */
|
||||
/* $Id: enable.c,v 1.21.4.4 2001/02/12 17:21:24 brianp Exp $*/
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -49,7 +49,7 @@
|
||||
*/
|
||||
void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
|
||||
{
|
||||
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH( ctx, "gl_enable/disable" );
|
||||
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH( ctx, state ? "glEnable" : "glDisable" );
|
||||
|
||||
if (MESA_VERBOSE & VERBOSE_API)
|
||||
fprintf(stderr, "%s %s (newstate is %x)\n",
|
||||
@@ -433,22 +433,46 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
|
||||
* CLIENT STATE!!!
|
||||
*/
|
||||
case GL_VERTEX_ARRAY:
|
||||
#ifdef VAO
|
||||
ctx->Array.Current->Vertex.Enabled = state;
|
||||
#else
|
||||
ctx->Array.Vertex.Enabled = state;
|
||||
#endif
|
||||
break;
|
||||
case GL_NORMAL_ARRAY:
|
||||
#ifdef VAO
|
||||
ctx->Array.Current->Normal.Enabled = state;
|
||||
#else
|
||||
ctx->Array.Normal.Enabled = state;
|
||||
#endif
|
||||
break;
|
||||
case GL_COLOR_ARRAY:
|
||||
#ifdef VAO
|
||||
ctx->Array.Current->Color.Enabled = state;
|
||||
#else
|
||||
ctx->Array.Color.Enabled = state;
|
||||
#endif
|
||||
break;
|
||||
case GL_INDEX_ARRAY:
|
||||
#ifdef VAO
|
||||
ctx->Array.Current->Index.Enabled = state;
|
||||
#else
|
||||
ctx->Array.Index.Enabled = state;
|
||||
#endif
|
||||
break;
|
||||
case GL_TEXTURE_COORD_ARRAY:
|
||||
#ifdef VAO
|
||||
ctx->Array.Current->TexCoord[ctx->Array.ActiveTexture].Enabled = state;
|
||||
#else
|
||||
ctx->Array.TexCoord[ctx->Array.ActiveTexture].Enabled = state;
|
||||
#endif
|
||||
break;
|
||||
case GL_EDGE_FLAG_ARRAY:
|
||||
#ifdef VAO
|
||||
ctx->Array.Current->EdgeFlag.Enabled = state;
|
||||
#else
|
||||
ctx->Array.EdgeFlag.Enabled = state;
|
||||
#endif
|
||||
break;
|
||||
|
||||
/* GL_HP_occlusion_test */
|
||||
@@ -701,17 +725,41 @@ _mesa_IsEnabled( GLenum cap )
|
||||
* CLIENT STATE!!!
|
||||
*/
|
||||
case GL_VERTEX_ARRAY:
|
||||
#ifdef VAO
|
||||
return ctx->Array.Current->Vertex.Enabled;
|
||||
#else
|
||||
return ctx->Array.Vertex.Enabled;
|
||||
#endif
|
||||
case GL_NORMAL_ARRAY:
|
||||
#ifdef VAO
|
||||
return ctx->Array.Current->Normal.Enabled;
|
||||
#else
|
||||
return ctx->Array.Normal.Enabled;
|
||||
#endif
|
||||
case GL_COLOR_ARRAY:
|
||||
#ifdef VAO
|
||||
return ctx->Array.Current->Color.Enabled;
|
||||
#else
|
||||
return ctx->Array.Color.Enabled;
|
||||
#endif
|
||||
case GL_INDEX_ARRAY:
|
||||
#ifdef VAO
|
||||
return ctx->Array.Current->Index.Enabled;
|
||||
#else
|
||||
return ctx->Array.Index.Enabled;
|
||||
#endif
|
||||
case GL_TEXTURE_COORD_ARRAY:
|
||||
#ifdef VAO
|
||||
return ctx->Array.Current->TexCoord[ctx->Array.ActiveTexture].Enabled;
|
||||
#else
|
||||
return ctx->Array.TexCoord[ctx->Array.ActiveTexture].Enabled;
|
||||
#endif
|
||||
case GL_EDGE_FLAG_ARRAY:
|
||||
#ifdef VAO
|
||||
return ctx->Array.Current->EdgeFlag.Enabled;
|
||||
#else
|
||||
return ctx->Array.EdgeFlag.Enabled;
|
||||
#endif
|
||||
|
||||
/* GL_HP_occlusion_test */
|
||||
case GL_OCCLUSION_TEST_HP:
|
||||
@@ -777,22 +825,46 @@ client_state( GLcontext *ctx, GLenum cap, GLboolean state )
|
||||
|
||||
switch (cap) {
|
||||
case GL_VERTEX_ARRAY:
|
||||
#ifdef VAO
|
||||
ctx->Array.Current->Vertex.Enabled = state;
|
||||
#else
|
||||
ctx->Array.Vertex.Enabled = state;
|
||||
#endif
|
||||
break;
|
||||
case GL_NORMAL_ARRAY:
|
||||
#ifdef VAO
|
||||
ctx->Array.Current->Normal.Enabled = state;
|
||||
#else
|
||||
ctx->Array.Normal.Enabled = state;
|
||||
#endif
|
||||
break;
|
||||
case GL_COLOR_ARRAY:
|
||||
#ifdef VAO
|
||||
ctx->Array.Current->Color.Enabled = state;
|
||||
#else
|
||||
ctx->Array.Color.Enabled = state;
|
||||
#endif
|
||||
break;
|
||||
case GL_INDEX_ARRAY:
|
||||
#ifdef VAO
|
||||
ctx->Array.Current->Index.Enabled = state;
|
||||
#else
|
||||
ctx->Array.Index.Enabled = state;
|
||||
#endif
|
||||
break;
|
||||
case GL_TEXTURE_COORD_ARRAY:
|
||||
#ifdef VAO
|
||||
ctx->Array.Current->TexCoord[ctx->Array.ActiveTexture].Enabled = state;
|
||||
#else
|
||||
ctx->Array.TexCoord[ctx->Array.ActiveTexture].Enabled = state;
|
||||
#endif
|
||||
break;
|
||||
case GL_EDGE_FLAG_ARRAY:
|
||||
#ifdef VAO
|
||||
ctx->Array.Current->EdgeFlag.Enabled = state;
|
||||
#else
|
||||
ctx->Array.EdgeFlag.Enabled = state;
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
gl_error( ctx, GL_INVALID_ENUM, "glEnable/DisableClientState" );
|
||||
|
@@ -1,21 +1,21 @@
|
||||
/* $Id: enums.c,v 1.9 2000/06/27 21:42:13 brianp Exp $ */
|
||||
/* $Id: enums.c,v 1.9.4.2 2001/01/06 22:43:00 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
*
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
@@ -34,12 +34,12 @@
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct {
|
||||
const char *c;
|
||||
int n;
|
||||
typedef struct {
|
||||
const char *c;
|
||||
int n;
|
||||
} enum_elt;
|
||||
|
||||
enum_elt all_enums[] =
|
||||
enum_elt all_enums[] =
|
||||
{
|
||||
/* Boolean values */
|
||||
{ "GL_FALSE", 0 },
|
||||
@@ -828,7 +828,11 @@ enum_elt all_enums[] =
|
||||
{ "GL_INTERPOLATE_EXT", 0x8575 },
|
||||
{ "GL_CONSTANT_EXT", 0x8576 },
|
||||
{ "GL_PRIMARY_COLOR_EXT", 0x8577 },
|
||||
{ "GL_PREVIOUS_EXT", 0x8578 }
|
||||
{ "GL_PREVIOUS_EXT", 0x8578 },
|
||||
|
||||
/* GL_EXT_texture_env_dot3 */
|
||||
{ "GL_DOT3_RGB_EXT", 0x8740 },
|
||||
{ "GL_DOT3_RGBA_EXT", 0x8741 },
|
||||
|
||||
};
|
||||
|
||||
@@ -839,7 +843,7 @@ typedef int (GLWINAPIV *cfunc)(const void *, const void *);
|
||||
static enum_elt **index1 = 0;
|
||||
static int sorted = 0;
|
||||
|
||||
static int compar_name( const enum_elt *a, const enum_elt *b )
|
||||
static int compar_name( const enum_elt *a, const enum_elt *b )
|
||||
{
|
||||
return strcmp(a->c, b->c);
|
||||
}
|
||||
@@ -847,7 +851,7 @@ static int compar_name( const enum_elt *a, const enum_elt *b )
|
||||
|
||||
/* note the extra level of indirection
|
||||
*/
|
||||
static int compar_nr( const enum_elt **a, const enum_elt **b )
|
||||
static int compar_nr( const enum_elt **a, const enum_elt **b )
|
||||
{
|
||||
return (*a)->n - (*b)->n;
|
||||
}
|
||||
@@ -855,14 +859,14 @@ static int compar_nr( const enum_elt **a, const enum_elt **b )
|
||||
|
||||
static void sort_enums( void )
|
||||
{
|
||||
int i;
|
||||
GLuint i;
|
||||
index1 = (enum_elt **)MALLOC( Elements(all_enums) * sizeof(enum_elt *) );
|
||||
sorted = 1;
|
||||
|
||||
qsort( all_enums, Elements(all_enums), sizeof(*all_enums),
|
||||
qsort( all_enums, Elements(all_enums), sizeof(*all_enums),
|
||||
(cfunc) compar_name );
|
||||
|
||||
for (i = 0 ; i < Elements(all_enums) ; i++)
|
||||
for (i = 0 ; i < Elements(all_enums) ; i++)
|
||||
index1[i] = &all_enums[i];
|
||||
|
||||
qsort( index1, Elements(all_enums), sizeof(*index1), (cfunc) compar_nr );
|
||||
@@ -875,14 +879,14 @@ int gl_lookup_enum_by_name( const char *symbol )
|
||||
enum_elt tmp;
|
||||
enum_elt *e;
|
||||
|
||||
if (!sorted)
|
||||
if (!sorted)
|
||||
sort_enums();
|
||||
|
||||
if (!symbol)
|
||||
if (!symbol)
|
||||
return 0;
|
||||
|
||||
tmp.c = symbol;
|
||||
e = (enum_elt *)bsearch( &tmp, all_enums, Elements(all_enums),
|
||||
e = (enum_elt *)bsearch( &tmp, all_enums, Elements(all_enums),
|
||||
sizeof(*all_enums), (cfunc) compar_name );
|
||||
|
||||
return e ? e->n : -1;
|
||||
@@ -893,13 +897,13 @@ const char *gl_lookup_enum_by_nr( int nr )
|
||||
{
|
||||
enum_elt tmp, *e, **f;
|
||||
|
||||
if (!sorted)
|
||||
if (!sorted)
|
||||
sort_enums();
|
||||
|
||||
tmp.n = nr;
|
||||
e = &tmp;
|
||||
|
||||
f = (enum_elt **)bsearch( &e, index1, Elements(all_enums),
|
||||
f = (enum_elt **)bsearch( &e, index1, Elements(all_enums),
|
||||
sizeof(*index1), (cfunc) compar_nr );
|
||||
|
||||
return f ? (*f)->c : "(unknown)";
|
||||
@@ -920,6 +924,6 @@ int main()
|
||||
for (i = 0 ; i < Elements(test) ; i++) {
|
||||
int d = gl_lookup_enum_by_name( test[i] );
|
||||
printf("%s --> %d --> %s\n", test[i], d, gl_lookup_enum_by_nr( d ));
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: eval.c,v 1.10 2000/07/20 15:53:17 keithw Exp $ */
|
||||
/* $Id: eval.c,v 1.10.2.1 2000/11/05 21:24:00 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -110,8 +110,8 @@ static void
|
||||
horner_bezier_curve(const GLfloat *cp, GLfloat *out, GLfloat t,
|
||||
GLuint dim, GLuint order)
|
||||
{
|
||||
GLfloat s, powert;
|
||||
GLuint i, k, bincoeff;
|
||||
GLfloat s, powert, bincoeff;
|
||||
GLuint i, k;
|
||||
|
||||
if(order >= 2)
|
||||
{
|
||||
@@ -162,8 +162,8 @@ horner_bezier_surf(GLfloat *cn, GLfloat *out, GLfloat u, GLfloat v,
|
||||
{
|
||||
if(uorder >= 2)
|
||||
{
|
||||
GLfloat s, poweru;
|
||||
GLuint j, k, bincoeff;
|
||||
GLfloat s, poweru, bincoeff;
|
||||
GLuint j, k;
|
||||
|
||||
/* Compute the control polygon for the surface-curve in u-direction */
|
||||
for(j=0; j<vorder; j++)
|
||||
|
@@ -1,21 +1,21 @@
|
||||
/* $Id: extensions.c,v 1.32.4.1 2000/08/29 22:58:57 brianp Exp $ */
|
||||
/* $Id: extensions.c,v 1.32.4.2 2001/01/06 22:43:00 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.4
|
||||
*
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
@@ -43,7 +43,7 @@ struct extension {
|
||||
struct extension *next, *prev;
|
||||
GLint enabled;
|
||||
char name[MAX_EXT_NAMELEN+1];
|
||||
void (*notify)( GLcontext *, GLboolean );
|
||||
void (*notify)( GLcontext *, GLboolean );
|
||||
};
|
||||
|
||||
|
||||
@@ -76,6 +76,7 @@ static struct { int enabled; const char *name; } default_extensions[] = {
|
||||
{ DEFAULT_OFF, "GL_EXT_texture_env" },
|
||||
{ DEFAULT_ON, "GL_EXT_texture_env_add" },
|
||||
{ DEFAULT_OFF, "GL_EXT_texture_env_combine" },
|
||||
{ DEFAULT_OFF, "GL_EXT_texture_env_dot3" },
|
||||
{ ALWAYS_ENABLED, "GL_EXT_texture_object" },
|
||||
{ DEFAULT_ON, "GL_EXT_texture_lod_bias" },
|
||||
{ ALWAYS_ENABLED, "GL_EXT_vertex_array" },
|
||||
@@ -105,6 +106,7 @@ update_extension_flags( GLcontext *ctx )
|
||||
/* Update flags */
|
||||
ctx->Extensions.HaveTextureEnvAdd = gl_extension_is_enabled(ctx, "GL_EXT_texture_env_add");
|
||||
ctx->Extensions.HaveTextureEnvCombine = gl_extension_is_enabled(ctx, "GL_EXT_texture_env_combine");
|
||||
ctx->Extensions.HaveTextureEnvDot3 = gl_extension_is_enabled(ctx, "GL_EXT_texture_env_dot3");
|
||||
ctx->Extensions.HaveTextureLodBias = gl_extension_is_enabled(ctx, "GL_EXT_texture_lod_bias");
|
||||
ctx->Extensions.HaveHpOcclusionTest = gl_extension_is_enabled(ctx, "GL_HP_occlusion_test");
|
||||
ctx->Extensions.HaveTextureCubeMap = gl_extension_is_enabled(ctx, "GL_ARB_texture_cube_map");
|
||||
@@ -116,14 +118,14 @@ update_extension_flags( GLcontext *ctx )
|
||||
|
||||
|
||||
|
||||
int gl_extensions_add( GLcontext *ctx,
|
||||
int state,
|
||||
const char *name,
|
||||
int gl_extensions_add( GLcontext *ctx,
|
||||
int state,
|
||||
const char *name,
|
||||
void (*notify)(void) )
|
||||
{
|
||||
(void) notify;
|
||||
|
||||
if (ctx->Extensions.ext_string == 0)
|
||||
if (ctx->Extensions.ext_string == 0)
|
||||
{
|
||||
struct extension *t = MALLOC_STRUCT(extension);
|
||||
t->enabled = state;
|
||||
@@ -143,27 +145,27 @@ int gl_extensions_add( GLcontext *ctx,
|
||||
static int set_extension( GLcontext *ctx, const char *name, GLint state )
|
||||
{
|
||||
struct extension *i;
|
||||
foreach( i, ctx->Extensions.ext_list )
|
||||
if (strncmp(i->name, name, MAX_EXT_NAMELEN) == 0)
|
||||
foreach( i, ctx->Extensions.ext_list )
|
||||
if (strncmp(i->name, name, MAX_EXT_NAMELEN) == 0)
|
||||
break;
|
||||
|
||||
if (i == ctx->Extensions.ext_list)
|
||||
return 1;
|
||||
|
||||
if (!(i->enabled & ALWAYS_ENABLED)) {
|
||||
if (i->notify) i->notify( ctx, state );
|
||||
if (i->notify) i->notify( ctx, state );
|
||||
i->enabled = state;
|
||||
}
|
||||
|
||||
update_extension_flags(ctx);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int gl_extensions_enable( GLcontext *ctx, const char *name )
|
||||
{
|
||||
if (ctx->Extensions.ext_string == 0)
|
||||
if (ctx->Extensions.ext_string == 0)
|
||||
return set_extension( ctx, name, 1 );
|
||||
return 1;
|
||||
}
|
||||
@@ -171,11 +173,11 @@ int gl_extensions_enable( GLcontext *ctx, const char *name )
|
||||
|
||||
int gl_extensions_disable( GLcontext *ctx, const char *name )
|
||||
{
|
||||
if (ctx->Extensions.ext_string == 0)
|
||||
if (ctx->Extensions.ext_string == 0)
|
||||
return set_extension( ctx, name, 0 );
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Test if the named extension is enabled in this context.
|
||||
@@ -209,10 +211,10 @@ void gl_extensions_dtr( GLcontext *ctx )
|
||||
remove_from_list( i );
|
||||
FREE( i );
|
||||
}
|
||||
|
||||
|
||||
FREE(ctx->Extensions.ext_list);
|
||||
ctx->Extensions.ext_list = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -225,7 +227,7 @@ void gl_extensions_ctr( GLcontext *ctx )
|
||||
make_empty_list( ctx->Extensions.ext_list );
|
||||
|
||||
for (i = 0 ; i < Elements(default_extensions) ; i++) {
|
||||
gl_extensions_add( ctx,
|
||||
gl_extensions_add( ctx,
|
||||
default_extensions[i].enabled,
|
||||
default_extensions[i].name,
|
||||
0 );
|
||||
@@ -236,22 +238,22 @@ void gl_extensions_ctr( GLcontext *ctx )
|
||||
|
||||
const char *gl_extensions_get_string( GLcontext *ctx )
|
||||
{
|
||||
if (ctx->Extensions.ext_string == 0)
|
||||
if (ctx->Extensions.ext_string == 0)
|
||||
{
|
||||
struct extension *i;
|
||||
char *str;
|
||||
GLuint len = 0;
|
||||
foreach (i, ctx->Extensions.ext_list)
|
||||
foreach (i, ctx->Extensions.ext_list)
|
||||
if (i->enabled)
|
||||
len += strlen(i->name) + 1;
|
||||
|
||||
if (len == 0)
|
||||
|
||||
if (len == 0)
|
||||
return "";
|
||||
|
||||
str = (char *)MALLOC(len * sizeof(char));
|
||||
ctx->Extensions.ext_string = str;
|
||||
|
||||
foreach (i, ctx->Extensions.ext_list)
|
||||
foreach (i, ctx->Extensions.ext_list)
|
||||
if (i->enabled) {
|
||||
strcpy(str, i->name);
|
||||
str += strlen(str);
|
||||
@@ -260,6 +262,6 @@ const char *gl_extensions_get_string( GLcontext *ctx )
|
||||
|
||||
*(str-1) = 0;
|
||||
}
|
||||
|
||||
|
||||
return ctx->Extensions.ext_string;
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: feedback.c,v 1.10 2000/05/09 23:54:09 brianp Exp $ */
|
||||
/* $Id: feedback.c,v 1.10.4.1 2000/11/08 16:41:17 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -239,7 +239,7 @@ void gl_feedback_points( GLcontext *ctx, GLuint first, GLuint last )
|
||||
const struct vertex_buffer *VB = ctx->VB;
|
||||
GLuint i;
|
||||
|
||||
for (i=first;i<=last;i++) {
|
||||
for (i=first;i<last;i++) {
|
||||
if (VB->ClipMask[i]==0) {
|
||||
FEEDBACK_TOKEN( ctx, (GLfloat) (GLint) GL_POINT_TOKEN );
|
||||
feedback_vertex( ctx, i, i );
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: get.c,v 1.30.2.1 2000/08/08 16:02:10 brianp Exp $ */
|
||||
/* $Id: get.c,v 1.30.2.4 2001/01/24 04:49:27 brianp Exp $*/
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -731,6 +731,9 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
|
||||
case GL_RENDER_MODE:
|
||||
*params = ENUM_TO_BOOL(ctx->RenderMode);
|
||||
break;
|
||||
case GL_RESCALE_NORMAL:
|
||||
*params = ctx->Transform.RescaleNormals;
|
||||
break;
|
||||
case GL_RGBA_MODE:
|
||||
*params = ctx->Visual->RGBAflag;
|
||||
break;
|
||||
@@ -875,79 +878,159 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
|
||||
*params = FLOAT_TO_BOOL(ctx->Pixel.ZoomY);
|
||||
break;
|
||||
case GL_VERTEX_ARRAY:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->Vertex.Enabled;
|
||||
#else
|
||||
*params = ctx->Array.Vertex.Enabled;
|
||||
#endif
|
||||
break;
|
||||
case GL_VERTEX_ARRAY_SIZE:
|
||||
#ifdef VAO
|
||||
*params = INT_TO_BOOL(ctx->Array.Current->Vertex.Size);
|
||||
#else
|
||||
*params = INT_TO_BOOL(ctx->Array.Vertex.Size);
|
||||
#endif
|
||||
break;
|
||||
case GL_VERTEX_ARRAY_TYPE:
|
||||
#ifdef VAO
|
||||
*params = ENUM_TO_BOOL(ctx->Array.Current->Vertex.Type);
|
||||
#else
|
||||
*params = ENUM_TO_BOOL(ctx->Array.Vertex.Type);
|
||||
#endif
|
||||
break;
|
||||
case GL_VERTEX_ARRAY_STRIDE:
|
||||
#ifdef VAO
|
||||
*params = INT_TO_BOOL(ctx->Array.Current->Vertex.Stride);
|
||||
#else
|
||||
*params = INT_TO_BOOL(ctx->Array.Vertex.Stride);
|
||||
#endif
|
||||
break;
|
||||
case GL_VERTEX_ARRAY_COUNT_EXT:
|
||||
*params = INT_TO_BOOL(0);
|
||||
break;
|
||||
case GL_NORMAL_ARRAY:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->Normal.Enabled;
|
||||
#else
|
||||
*params = ctx->Array.Normal.Enabled;
|
||||
#endif
|
||||
break;
|
||||
case GL_NORMAL_ARRAY_TYPE:
|
||||
#ifdef VAO
|
||||
*params = ENUM_TO_BOOL(ctx->Array.Current->Normal.Type);
|
||||
#else
|
||||
*params = ENUM_TO_BOOL(ctx->Array.Normal.Type);
|
||||
#endif
|
||||
break;
|
||||
case GL_NORMAL_ARRAY_STRIDE:
|
||||
#ifdef VAO
|
||||
*params = INT_TO_BOOL(ctx->Array.Current->Normal.Stride);
|
||||
#else
|
||||
*params = INT_TO_BOOL(ctx->Array.Normal.Stride);
|
||||
#endif
|
||||
break;
|
||||
case GL_NORMAL_ARRAY_COUNT_EXT:
|
||||
*params = INT_TO_BOOL(0);
|
||||
break;
|
||||
case GL_COLOR_ARRAY:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->Color.Enabled;
|
||||
#else
|
||||
*params = ctx->Array.Color.Enabled;
|
||||
#endif
|
||||
break;
|
||||
case GL_COLOR_ARRAY_SIZE:
|
||||
#ifdef VAO
|
||||
*params = INT_TO_BOOL(ctx->Array.Current->Color.Size);
|
||||
#else
|
||||
*params = INT_TO_BOOL(ctx->Array.Color.Size);
|
||||
#endif
|
||||
break;
|
||||
case GL_COLOR_ARRAY_TYPE:
|
||||
#ifdef VAO
|
||||
*params = ENUM_TO_BOOL(ctx->Array.Current->Color.Type);
|
||||
#else
|
||||
*params = ENUM_TO_BOOL(ctx->Array.Color.Type);
|
||||
#endif
|
||||
break;
|
||||
case GL_COLOR_ARRAY_STRIDE:
|
||||
#ifdef VAO
|
||||
*params = INT_TO_BOOL(ctx->Array.Current->Color.Stride);
|
||||
#else
|
||||
*params = INT_TO_BOOL(ctx->Array.Color.Stride);
|
||||
#endif
|
||||
break;
|
||||
case GL_COLOR_ARRAY_COUNT_EXT:
|
||||
*params = INT_TO_BOOL(0);
|
||||
break;
|
||||
case GL_INDEX_ARRAY:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->Index.Enabled;
|
||||
#else
|
||||
*params = ctx->Array.Index.Enabled;
|
||||
#endif
|
||||
break;
|
||||
case GL_INDEX_ARRAY_TYPE:
|
||||
#ifdef VAO
|
||||
*params = ENUM_TO_BOOL(ctx->Array.Current->Index.Type);
|
||||
#else
|
||||
*params = ENUM_TO_BOOL(ctx->Array.Index.Type);
|
||||
#endif
|
||||
break;
|
||||
case GL_INDEX_ARRAY_STRIDE:
|
||||
#ifdef VAO
|
||||
*params = INT_TO_BOOL(ctx->Array.Current->Index.Stride);
|
||||
#else
|
||||
*params = INT_TO_BOOL(ctx->Array.Index.Stride);
|
||||
#endif
|
||||
break;
|
||||
case GL_INDEX_ARRAY_COUNT_EXT:
|
||||
*params = INT_TO_BOOL(0);
|
||||
break;
|
||||
case GL_TEXTURE_COORD_ARRAY:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->TexCoord[texUnit].Enabled;
|
||||
#else
|
||||
*params = ctx->Array.TexCoord[texUnit].Enabled;
|
||||
#endif
|
||||
break;
|
||||
case GL_TEXTURE_COORD_ARRAY_SIZE:
|
||||
#ifdef VAO
|
||||
*params = INT_TO_BOOL(ctx->Array.Current->TexCoord[texUnit].Size);
|
||||
#else
|
||||
*params = INT_TO_BOOL(ctx->Array.TexCoord[texUnit].Size);
|
||||
#endif
|
||||
break;
|
||||
case GL_TEXTURE_COORD_ARRAY_TYPE:
|
||||
#ifdef VAO
|
||||
*params = ENUM_TO_BOOL(ctx->Array.Current->TexCoord[texUnit].Type);
|
||||
#else
|
||||
*params = ENUM_TO_BOOL(ctx->Array.TexCoord[texUnit].Type);
|
||||
#endif
|
||||
break;
|
||||
case GL_TEXTURE_COORD_ARRAY_STRIDE:
|
||||
#ifdef VAO
|
||||
*params = INT_TO_BOOL(ctx->Array.Current->TexCoord[texUnit].Stride);
|
||||
#else
|
||||
*params = INT_TO_BOOL(ctx->Array.TexCoord[texUnit].Stride);
|
||||
#endif
|
||||
break;
|
||||
case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
|
||||
*params = INT_TO_BOOL(0);
|
||||
break;
|
||||
case GL_EDGE_FLAG_ARRAY:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->EdgeFlag.Enabled;
|
||||
#else
|
||||
*params = ctx->Array.EdgeFlag.Enabled;
|
||||
#endif
|
||||
break;
|
||||
case GL_EDGE_FLAG_ARRAY_STRIDE:
|
||||
#ifdef VAO
|
||||
*params = INT_TO_BOOL(ctx->Array.Current->EdgeFlag.Stride);
|
||||
#else
|
||||
*params = INT_TO_BOOL(ctx->Array.EdgeFlag.Stride);
|
||||
#endif
|
||||
break;
|
||||
|
||||
/* GL_ARB_multitexture */
|
||||
@@ -1058,10 +1141,18 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
|
||||
|
||||
/* GL_EXT_compiled_vertex_array */
|
||||
case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->LockFirst ? GL_TRUE : GL_FALSE;
|
||||
#else
|
||||
*params = ctx->Array.LockFirst ? GL_TRUE : GL_FALSE;
|
||||
#endif
|
||||
break;
|
||||
case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->LockCount ? GL_TRUE : GL_FALSE;
|
||||
#else
|
||||
*params = ctx->Array.LockCount ? GL_TRUE : GL_FALSE;
|
||||
#endif
|
||||
break;
|
||||
|
||||
/* GL_ARB_transpose_matrix */
|
||||
@@ -1880,6 +1971,9 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
|
||||
case GL_RENDER_MODE:
|
||||
*params = ENUM_TO_DOUBLE(ctx->RenderMode);
|
||||
break;
|
||||
case GL_RESCALE_NORMAL:
|
||||
*params = (GLdouble) ctx->Transform.RescaleNormals;
|
||||
break;
|
||||
case GL_RGBA_MODE:
|
||||
*params = (GLdouble) ctx->Visual->RGBAflag;
|
||||
break;
|
||||
@@ -2021,79 +2115,159 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
|
||||
*params = (GLdouble) ctx->Pixel.ZoomY;
|
||||
break;
|
||||
case GL_VERTEX_ARRAY:
|
||||
#ifdef VAO
|
||||
*params = (GLdouble) ctx->Array.Current->Vertex.Enabled;
|
||||
#else
|
||||
*params = (GLdouble) ctx->Array.Vertex.Enabled;
|
||||
#endif
|
||||
break;
|
||||
case GL_VERTEX_ARRAY_SIZE:
|
||||
#ifdef VAO
|
||||
*params = (GLdouble) ctx->Array.Current->Vertex.Size;
|
||||
#else
|
||||
*params = (GLdouble) ctx->Array.Vertex.Size;
|
||||
#endif
|
||||
break;
|
||||
case GL_VERTEX_ARRAY_TYPE:
|
||||
#ifdef VAO
|
||||
*params = ENUM_TO_DOUBLE(ctx->Array.Current->Vertex.Type);
|
||||
#else
|
||||
*params = ENUM_TO_DOUBLE(ctx->Array.Vertex.Type);
|
||||
#endif
|
||||
break;
|
||||
case GL_VERTEX_ARRAY_STRIDE:
|
||||
#ifdef VAO
|
||||
*params = (GLdouble) ctx->Array.Current->Vertex.Stride;
|
||||
#else
|
||||
*params = (GLdouble) ctx->Array.Vertex.Stride;
|
||||
#endif
|
||||
break;
|
||||
case GL_VERTEX_ARRAY_COUNT_EXT:
|
||||
*params = 0.0;
|
||||
break;
|
||||
case GL_NORMAL_ARRAY:
|
||||
#ifdef VAO
|
||||
*params = (GLdouble) ctx->Array.Current->Normal.Enabled;
|
||||
#else
|
||||
*params = (GLdouble) ctx->Array.Normal.Enabled;
|
||||
#endif
|
||||
break;
|
||||
case GL_NORMAL_ARRAY_TYPE:
|
||||
#ifdef VAO
|
||||
*params = ENUM_TO_DOUBLE(ctx->Array.Current->Normal.Type);
|
||||
#else
|
||||
*params = ENUM_TO_DOUBLE(ctx->Array.Normal.Type);
|
||||
#endif
|
||||
break;
|
||||
case GL_NORMAL_ARRAY_STRIDE:
|
||||
#ifdef VAO
|
||||
*params = (GLdouble) ctx->Array.Current->Normal.Stride;
|
||||
#else
|
||||
*params = (GLdouble) ctx->Array.Normal.Stride;
|
||||
#endif
|
||||
break;
|
||||
case GL_NORMAL_ARRAY_COUNT_EXT:
|
||||
*params = 0.0;
|
||||
break;
|
||||
case GL_COLOR_ARRAY:
|
||||
#ifdef VAO
|
||||
*params = (GLdouble) ctx->Array.Current->Color.Enabled;
|
||||
#else
|
||||
*params = (GLdouble) ctx->Array.Color.Enabled;
|
||||
#endif
|
||||
break;
|
||||
case GL_COLOR_ARRAY_SIZE:
|
||||
#ifdef VAO
|
||||
*params = (GLdouble) ctx->Array.Current->Color.Size;
|
||||
#else
|
||||
*params = (GLdouble) ctx->Array.Color.Size;
|
||||
#endif
|
||||
break;
|
||||
case GL_COLOR_ARRAY_TYPE:
|
||||
#ifdef VAO
|
||||
*params = ENUM_TO_DOUBLE(ctx->Array.Current->Color.Type);
|
||||
#else
|
||||
*params = ENUM_TO_DOUBLE(ctx->Array.Color.Type);
|
||||
#endif
|
||||
break;
|
||||
case GL_COLOR_ARRAY_STRIDE:
|
||||
#ifdef VAO
|
||||
*params = (GLdouble) ctx->Array.Current->Color.Stride;
|
||||
#else
|
||||
*params = (GLdouble) ctx->Array.Color.Stride;
|
||||
#endif
|
||||
break;
|
||||
case GL_COLOR_ARRAY_COUNT_EXT:
|
||||
*params = 0.0;
|
||||
break;
|
||||
case GL_INDEX_ARRAY:
|
||||
#ifdef VAO
|
||||
*params = (GLdouble) ctx->Array.Current->Index.Enabled;
|
||||
#else
|
||||
*params = (GLdouble) ctx->Array.Index.Enabled;
|
||||
#endif
|
||||
break;
|
||||
case GL_INDEX_ARRAY_TYPE:
|
||||
#ifdef VAO
|
||||
*params = ENUM_TO_DOUBLE(ctx->Array.Current->Index.Type);
|
||||
#else
|
||||
*params = ENUM_TO_DOUBLE(ctx->Array.Index.Type);
|
||||
#endif
|
||||
break;
|
||||
case GL_INDEX_ARRAY_STRIDE:
|
||||
#ifdef VAO
|
||||
*params = (GLdouble) ctx->Array.Current->Index.Stride;
|
||||
#else
|
||||
*params = (GLdouble) ctx->Array.Index.Stride;
|
||||
#endif
|
||||
break;
|
||||
case GL_INDEX_ARRAY_COUNT_EXT:
|
||||
*params = 0.0;
|
||||
break;
|
||||
case GL_TEXTURE_COORD_ARRAY:
|
||||
#ifdef VAO
|
||||
*params = (GLdouble) ctx->Array.Current->TexCoord[texUnit].Enabled;
|
||||
#else
|
||||
*params = (GLdouble) ctx->Array.TexCoord[texUnit].Enabled;
|
||||
#endif
|
||||
break;
|
||||
case GL_TEXTURE_COORD_ARRAY_SIZE:
|
||||
#ifdef VAO
|
||||
*params = (GLdouble) ctx->Array.Current->TexCoord[texUnit].Size;
|
||||
#else
|
||||
*params = (GLdouble) ctx->Array.TexCoord[texUnit].Size;
|
||||
#endif
|
||||
break;
|
||||
case GL_TEXTURE_COORD_ARRAY_TYPE:
|
||||
#ifdef VAO
|
||||
*params = ENUM_TO_DOUBLE(ctx->Array.Current->TexCoord[texUnit].Type);
|
||||
#else
|
||||
*params = ENUM_TO_DOUBLE(ctx->Array.TexCoord[texUnit].Type);
|
||||
#endif
|
||||
break;
|
||||
case GL_TEXTURE_COORD_ARRAY_STRIDE:
|
||||
#ifdef VAO
|
||||
*params = (GLdouble) ctx->Array.Current->TexCoord[texUnit].Stride;
|
||||
#else
|
||||
*params = (GLdouble) ctx->Array.TexCoord[texUnit].Stride;
|
||||
#endif
|
||||
break;
|
||||
case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
|
||||
*params = 0.0;
|
||||
break;
|
||||
case GL_EDGE_FLAG_ARRAY:
|
||||
#ifdef VAO
|
||||
*params = (GLdouble) ctx->Array.Current->EdgeFlag.Enabled;
|
||||
#else
|
||||
*params = (GLdouble) ctx->Array.EdgeFlag.Enabled;
|
||||
#endif
|
||||
break;
|
||||
case GL_EDGE_FLAG_ARRAY_STRIDE:
|
||||
#ifdef VAO
|
||||
*params = (GLdouble) ctx->Array.Current->EdgeFlag.Stride;
|
||||
#else
|
||||
*params = (GLdouble) ctx->Array.EdgeFlag.Stride;
|
||||
#endif
|
||||
break;
|
||||
case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
|
||||
*params = 0.0;
|
||||
@@ -2207,10 +2381,18 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
|
||||
|
||||
/* GL_EXT_compiled_vertex_array */
|
||||
case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
|
||||
#ifdef VAO
|
||||
*params = (GLdouble) ctx->Array.Current->LockFirst;
|
||||
#else
|
||||
*params = (GLdouble) ctx->Array.LockFirst;
|
||||
#endif
|
||||
break;
|
||||
case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
|
||||
#ifdef VAO
|
||||
*params = (GLdouble) ctx->Array.Current->LockCount;
|
||||
#else
|
||||
*params = (GLdouble) ctx->Array.LockCount;
|
||||
#endif
|
||||
break;
|
||||
|
||||
/* GL_ARB_transpose_matrix */
|
||||
@@ -3028,6 +3210,9 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
|
||||
case GL_RENDER_MODE:
|
||||
*params = ENUM_TO_FLOAT(ctx->RenderMode);
|
||||
break;
|
||||
case GL_RESCALE_NORMAL:
|
||||
*params = (GLfloat) ctx->Transform.RescaleNormals;
|
||||
break;
|
||||
case GL_RGBA_MODE:
|
||||
*params = (GLfloat) ctx->Visual->RGBAflag;
|
||||
break;
|
||||
@@ -3169,79 +3354,159 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
|
||||
*params = (GLfloat) ctx->Pixel.ZoomY;
|
||||
break;
|
||||
case GL_VERTEX_ARRAY:
|
||||
#ifdef VAO
|
||||
*params = (GLfloat) ctx->Array.Current->Vertex.Enabled;
|
||||
#else
|
||||
*params = (GLfloat) ctx->Array.Vertex.Enabled;
|
||||
#endif
|
||||
break;
|
||||
case GL_VERTEX_ARRAY_SIZE:
|
||||
#ifdef VAO
|
||||
*params = (GLfloat) ctx->Array.Current->Vertex.Size;
|
||||
#else
|
||||
*params = (GLfloat) ctx->Array.Vertex.Size;
|
||||
#endif
|
||||
break;
|
||||
case GL_VERTEX_ARRAY_TYPE:
|
||||
#ifdef VAO
|
||||
*params = ENUM_TO_FLOAT(ctx->Array.Current->Vertex.Type);
|
||||
#else
|
||||
*params = ENUM_TO_FLOAT(ctx->Array.Vertex.Type);
|
||||
#endif
|
||||
break;
|
||||
case GL_VERTEX_ARRAY_STRIDE:
|
||||
#ifdef VAO
|
||||
*params = (GLfloat) ctx->Array.Current->Vertex.Stride;
|
||||
#else
|
||||
*params = (GLfloat) ctx->Array.Vertex.Stride;
|
||||
#endif
|
||||
break;
|
||||
case GL_VERTEX_ARRAY_COUNT_EXT:
|
||||
*params = 0.0;
|
||||
break;
|
||||
case GL_NORMAL_ARRAY:
|
||||
#ifdef VAO
|
||||
*params = (GLfloat) ctx->Array.Current->Normal.Enabled;
|
||||
#else
|
||||
*params = (GLfloat) ctx->Array.Normal.Enabled;
|
||||
#endif
|
||||
break;
|
||||
case GL_NORMAL_ARRAY_TYPE:
|
||||
#ifdef VAO
|
||||
*params = ENUM_TO_FLOAT(ctx->Array.Current->Normal.Type);
|
||||
#else
|
||||
*params = ENUM_TO_FLOAT(ctx->Array.Normal.Type);
|
||||
#endif
|
||||
break;
|
||||
case GL_NORMAL_ARRAY_STRIDE:
|
||||
#ifdef VAO
|
||||
*params = (GLfloat) ctx->Array.Current->Normal.Stride;
|
||||
#else
|
||||
*params = (GLfloat) ctx->Array.Normal.Stride;
|
||||
#endif
|
||||
break;
|
||||
case GL_NORMAL_ARRAY_COUNT_EXT:
|
||||
*params = 0.0;
|
||||
break;
|
||||
case GL_COLOR_ARRAY:
|
||||
#ifdef VAO
|
||||
*params = (GLfloat) ctx->Array.Current->Color.Enabled;
|
||||
#else
|
||||
*params = (GLfloat) ctx->Array.Color.Enabled;
|
||||
#endif
|
||||
break;
|
||||
case GL_COLOR_ARRAY_SIZE:
|
||||
#ifdef VAO
|
||||
*params = (GLfloat) ctx->Array.Current->Color.Size;
|
||||
#else
|
||||
*params = (GLfloat) ctx->Array.Color.Size;
|
||||
#endif
|
||||
break;
|
||||
case GL_COLOR_ARRAY_TYPE:
|
||||
#ifdef VAO
|
||||
*params = ENUM_TO_FLOAT(ctx->Array.Current->Color.Type);
|
||||
#else
|
||||
*params = ENUM_TO_FLOAT(ctx->Array.Color.Type);
|
||||
#endif
|
||||
break;
|
||||
case GL_COLOR_ARRAY_STRIDE:
|
||||
#ifdef VAO
|
||||
*params = (GLfloat) ctx->Array.Current->Color.Stride;
|
||||
#else
|
||||
*params = (GLfloat) ctx->Array.Color.Stride;
|
||||
#endif
|
||||
break;
|
||||
case GL_COLOR_ARRAY_COUNT_EXT:
|
||||
*params = 0.0;
|
||||
break;
|
||||
case GL_INDEX_ARRAY:
|
||||
#ifdef VAO
|
||||
*params = (GLfloat) ctx->Array.Current->Index.Enabled;
|
||||
#else
|
||||
*params = (GLfloat) ctx->Array.Index.Enabled;
|
||||
#endif
|
||||
break;
|
||||
case GL_INDEX_ARRAY_TYPE:
|
||||
#ifdef VAO
|
||||
*params = ENUM_TO_FLOAT(ctx->Array.Current->Index.Type);
|
||||
#else
|
||||
*params = ENUM_TO_FLOAT(ctx->Array.Index.Type);
|
||||
#endif
|
||||
break;
|
||||
case GL_INDEX_ARRAY_STRIDE:
|
||||
#ifdef VAO
|
||||
*params = (GLfloat) ctx->Array.Current->Index.Stride;
|
||||
#else
|
||||
*params = (GLfloat) ctx->Array.Index.Stride;
|
||||
#endif
|
||||
break;
|
||||
case GL_INDEX_ARRAY_COUNT_EXT:
|
||||
*params = 0.0;
|
||||
break;
|
||||
case GL_TEXTURE_COORD_ARRAY:
|
||||
#ifdef VAO
|
||||
*params = (GLfloat) ctx->Array.Current->TexCoord[texUnit].Enabled;
|
||||
#else
|
||||
*params = (GLfloat) ctx->Array.TexCoord[texUnit].Enabled;
|
||||
#endif
|
||||
break;
|
||||
case GL_TEXTURE_COORD_ARRAY_SIZE:
|
||||
#ifdef VAO
|
||||
*params = (GLfloat) ctx->Array.Current->TexCoord[texUnit].Size;
|
||||
#else
|
||||
*params = (GLfloat) ctx->Array.TexCoord[texUnit].Size;
|
||||
#endif
|
||||
break;
|
||||
case GL_TEXTURE_COORD_ARRAY_TYPE:
|
||||
#ifdef VAO
|
||||
*params = ENUM_TO_FLOAT(ctx->Array.Current->TexCoord[texUnit].Type);
|
||||
#else
|
||||
*params = ENUM_TO_FLOAT(ctx->Array.TexCoord[texUnit].Type);
|
||||
#endif
|
||||
break;
|
||||
case GL_TEXTURE_COORD_ARRAY_STRIDE:
|
||||
#ifdef VAO
|
||||
*params = (GLfloat) ctx->Array.Current->TexCoord[texUnit].Stride;
|
||||
#else
|
||||
*params = (GLfloat) ctx->Array.TexCoord[texUnit].Stride;
|
||||
#endif
|
||||
break;
|
||||
case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
|
||||
*params = 0.0;
|
||||
break;
|
||||
case GL_EDGE_FLAG_ARRAY:
|
||||
#ifdef VAO
|
||||
*params = (GLfloat) ctx->Array.Current->EdgeFlag.Enabled;
|
||||
#else
|
||||
*params = (GLfloat) ctx->Array.EdgeFlag.Enabled;
|
||||
#endif
|
||||
break;
|
||||
case GL_EDGE_FLAG_ARRAY_STRIDE:
|
||||
#ifdef VAO
|
||||
*params = (GLfloat) ctx->Array.Current->EdgeFlag.Stride;
|
||||
#else
|
||||
*params = (GLfloat) ctx->Array.EdgeFlag.Stride;
|
||||
#endif
|
||||
break;
|
||||
case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
|
||||
*params = 0.0;
|
||||
@@ -3355,10 +3620,18 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
|
||||
|
||||
/* GL_EXT_compiled_vertex_array */
|
||||
case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
|
||||
#ifdef VAO
|
||||
*params = (GLfloat) ctx->Array.Current->LockFirst;
|
||||
#else
|
||||
*params = (GLfloat) ctx->Array.LockFirst;
|
||||
#endif
|
||||
break;
|
||||
case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
|
||||
#ifdef VAO
|
||||
*params = (GLfloat) ctx->Array.Current->LockCount;
|
||||
#else
|
||||
*params = (GLfloat) ctx->Array.LockCount;
|
||||
#endif
|
||||
break;
|
||||
|
||||
/* GL_ARB_transpose_matrix */
|
||||
@@ -4151,6 +4424,9 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
|
||||
case GL_RENDER_MODE:
|
||||
*params = (GLint) ctx->RenderMode;
|
||||
break;
|
||||
case GL_RESCALE_NORMAL:
|
||||
*params = (GLint) ctx->Transform.RescaleNormals;
|
||||
break;
|
||||
case GL_RGBA_MODE:
|
||||
*params = (GLint) ctx->Visual->RGBAflag;
|
||||
break;
|
||||
@@ -4292,79 +4568,159 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
|
||||
*params = (GLint) ctx->Pixel.ZoomY;
|
||||
break;
|
||||
case GL_VERTEX_ARRAY:
|
||||
#ifdef VAO
|
||||
*params = (GLint) ctx->Array.Current->Vertex.Enabled;
|
||||
#else
|
||||
*params = (GLint) ctx->Array.Vertex.Enabled;
|
||||
#endif
|
||||
break;
|
||||
case GL_VERTEX_ARRAY_SIZE:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->Vertex.Size;
|
||||
#else
|
||||
*params = ctx->Array.Vertex.Size;
|
||||
#endif
|
||||
break;
|
||||
case GL_VERTEX_ARRAY_TYPE:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->Vertex.Type;
|
||||
#else
|
||||
*params = ctx->Array.Vertex.Type;
|
||||
#endif
|
||||
break;
|
||||
case GL_VERTEX_ARRAY_STRIDE:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->Vertex.Stride;
|
||||
#else
|
||||
*params = ctx->Array.Vertex.Stride;
|
||||
#endif
|
||||
break;
|
||||
case GL_VERTEX_ARRAY_COUNT_EXT:
|
||||
*params = 0;
|
||||
break;
|
||||
case GL_NORMAL_ARRAY:
|
||||
#ifdef VAO
|
||||
*params = (GLint) ctx->Array.Current->Normal.Enabled;
|
||||
#else
|
||||
*params = (GLint) ctx->Array.Normal.Enabled;
|
||||
#endif
|
||||
break;
|
||||
case GL_NORMAL_ARRAY_TYPE:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->Normal.Type;
|
||||
#else
|
||||
*params = ctx->Array.Normal.Type;
|
||||
#endif
|
||||
break;
|
||||
case GL_NORMAL_ARRAY_STRIDE:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->Normal.Stride;
|
||||
#else
|
||||
*params = ctx->Array.Normal.Stride;
|
||||
#endif
|
||||
break;
|
||||
case GL_NORMAL_ARRAY_COUNT_EXT:
|
||||
*params = 0;
|
||||
break;
|
||||
case GL_COLOR_ARRAY:
|
||||
#ifdef VAO
|
||||
*params = (GLint) ctx->Array.Current->Color.Enabled;
|
||||
#else
|
||||
*params = (GLint) ctx->Array.Color.Enabled;
|
||||
#endif
|
||||
break;
|
||||
case GL_COLOR_ARRAY_SIZE:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->Color.Size;
|
||||
#else
|
||||
*params = ctx->Array.Color.Size;
|
||||
#endif
|
||||
break;
|
||||
case GL_COLOR_ARRAY_TYPE:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->Color.Type;
|
||||
#else
|
||||
*params = ctx->Array.Color.Type;
|
||||
#endif
|
||||
break;
|
||||
case GL_COLOR_ARRAY_STRIDE:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->Color.Stride;
|
||||
#else
|
||||
*params = ctx->Array.Color.Stride;
|
||||
#endif
|
||||
break;
|
||||
case GL_COLOR_ARRAY_COUNT_EXT:
|
||||
*params = 0;
|
||||
break;
|
||||
case GL_INDEX_ARRAY:
|
||||
#ifdef VAO
|
||||
*params = (GLint) ctx->Array.Current->Index.Enabled;
|
||||
#else
|
||||
*params = (GLint) ctx->Array.Index.Enabled;
|
||||
#endif
|
||||
break;
|
||||
case GL_INDEX_ARRAY_TYPE:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->Index.Type;
|
||||
#else
|
||||
*params = ctx->Array.Index.Type;
|
||||
#endif
|
||||
break;
|
||||
case GL_INDEX_ARRAY_STRIDE:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->Index.Stride;
|
||||
#else
|
||||
*params = ctx->Array.Index.Stride;
|
||||
#endif
|
||||
break;
|
||||
case GL_INDEX_ARRAY_COUNT_EXT:
|
||||
*params = 0;
|
||||
break;
|
||||
case GL_TEXTURE_COORD_ARRAY:
|
||||
#ifdef VAO
|
||||
*params = (GLint) ctx->Array.Current->TexCoord[texUnit].Enabled;
|
||||
#else
|
||||
*params = (GLint) ctx->Array.TexCoord[texUnit].Enabled;
|
||||
#endif
|
||||
break;
|
||||
case GL_TEXTURE_COORD_ARRAY_SIZE:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->TexCoord[texUnit].Size;
|
||||
#else
|
||||
*params = ctx->Array.TexCoord[texUnit].Size;
|
||||
#endif
|
||||
break;
|
||||
case GL_TEXTURE_COORD_ARRAY_TYPE:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->TexCoord[texUnit].Type;
|
||||
#else
|
||||
*params = ctx->Array.TexCoord[texUnit].Type;
|
||||
#endif
|
||||
break;
|
||||
case GL_TEXTURE_COORD_ARRAY_STRIDE:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->TexCoord[texUnit].Stride;
|
||||
#else
|
||||
*params = ctx->Array.TexCoord[texUnit].Stride;
|
||||
#endif
|
||||
break;
|
||||
case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
|
||||
*params = 0;
|
||||
break;
|
||||
case GL_EDGE_FLAG_ARRAY:
|
||||
#ifdef VAO
|
||||
*params = (GLint) ctx->Array.Current->EdgeFlag.Enabled;
|
||||
#else
|
||||
*params = (GLint) ctx->Array.EdgeFlag.Enabled;
|
||||
#endif
|
||||
break;
|
||||
case GL_EDGE_FLAG_ARRAY_STRIDE:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->EdgeFlag.Stride;
|
||||
#else
|
||||
*params = ctx->Array.EdgeFlag.Stride;
|
||||
#endif
|
||||
break;
|
||||
case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
|
||||
*params = 0;
|
||||
@@ -4478,10 +4834,18 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
|
||||
|
||||
/* GL_EXT_compiled_vertex_array */
|
||||
case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->LockFirst;
|
||||
#else
|
||||
*params = ctx->Array.LockFirst;
|
||||
#endif
|
||||
break;
|
||||
case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->LockCount;
|
||||
#else
|
||||
*params = ctx->Array.LockCount;
|
||||
#endif
|
||||
break;
|
||||
|
||||
/* GL_ARB_transpose_matrix */
|
||||
@@ -4670,22 +5034,46 @@ _mesa_GetPointerv( GLenum pname, GLvoid **params )
|
||||
|
||||
switch (pname) {
|
||||
case GL_VERTEX_ARRAY_POINTER:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->Vertex.Ptr;
|
||||
#else
|
||||
*params = ctx->Array.Vertex.Ptr;
|
||||
#endif
|
||||
break;
|
||||
case GL_NORMAL_ARRAY_POINTER:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->Normal.Ptr;
|
||||
#else
|
||||
*params = ctx->Array.Normal.Ptr;
|
||||
#endif
|
||||
break;
|
||||
case GL_COLOR_ARRAY_POINTER:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->Color.Ptr;
|
||||
#else
|
||||
*params = ctx->Array.Color.Ptr;
|
||||
#endif
|
||||
break;
|
||||
case GL_INDEX_ARRAY_POINTER:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->Index.Ptr;
|
||||
#else
|
||||
*params = ctx->Array.Index.Ptr;
|
||||
#endif
|
||||
break;
|
||||
case GL_TEXTURE_COORD_ARRAY_POINTER:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->TexCoord[texUnit].Ptr;
|
||||
#else
|
||||
*params = ctx->Array.TexCoord[texUnit].Ptr;
|
||||
#endif
|
||||
break;
|
||||
case GL_EDGE_FLAG_ARRAY_POINTER:
|
||||
#ifdef VAO
|
||||
*params = ctx->Array.Current->EdgeFlag.Ptr;
|
||||
#else
|
||||
*params = ctx->Array.EdgeFlag.Ptr;
|
||||
#endif
|
||||
break;
|
||||
case GL_FEEDBACK_BUFFER_POINTER:
|
||||
*params = ctx->Feedback.Buffer;
|
||||
@@ -4707,7 +5095,7 @@ _mesa_GetString( GLenum name )
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
static const char *vendor = "Brian Paul";
|
||||
static const char *renderer = "Mesa";
|
||||
static const char *version = "1.2 Mesa 3.4";
|
||||
static const char *version = "1.2 Mesa 3.4.1";
|
||||
|
||||
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH_WITH_RETVAL(ctx, "glGetString", 0);
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: glheader.h,v 1.11.4.3 2000/09/15 15:42:51 brianp Exp $ */
|
||||
/* $Id: glheader.h,v 1.11.4.4 2000/12/13 00:54:57 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -39,9 +39,13 @@
|
||||
* If you touch this file, everything gets recompiled!
|
||||
*
|
||||
* This file should be included before any other header in the .c files.
|
||||
*
|
||||
* Put compiler/OS/assembly pragmas and macros here to avoid
|
||||
* cluttering other source files.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifdef XFree86LOADER
|
||||
#include "xf86_ansic.h"
|
||||
#else
|
||||
@@ -70,24 +74,11 @@
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Put compiler/OS/assembly pragmas and macros here to avoid
|
||||
* cluttering other source files.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* XXX move as many of these pragma's and MS Windows-isms into
|
||||
* the new src/glheader.h file.
|
||||
*/
|
||||
|
||||
#if defined(_WIN32) && !defined(__WIN32__)
|
||||
#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__)
|
||||
# define __WIN32__
|
||||
#endif
|
||||
|
||||
#if !defined(OPENSTEP) && (defined(__WIN32__) || defined(__CYGWIN__))
|
||||
#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__))
|
||||
# pragma warning( disable : 4068 ) /* unknown pragma */
|
||||
# pragma warning( disable : 4710 ) /* function 'foo' not inlined */
|
||||
# pragma warning( disable : 4711 ) /* function 'foo' selected for automatic inline expansion */
|
||||
@@ -134,7 +125,7 @@
|
||||
|
||||
/* compatability guard so we don't need to change client code */
|
||||
|
||||
#if defined(_WIN32) && !defined(_WINDEF_) && !defined(_GNU_H_WINDOWS32_BASE) && !defined(OPENSTEP)
|
||||
#if defined(_WIN32) && !defined(_WINDEF_) && !defined(_GNU_H_WINDOWS32_BASE) && !defined(OPENSTEP) && !defined(__CYGWIN__)
|
||||
#if 0
|
||||
# define CALLBACK GLCALLBACK
|
||||
typedef void *HGLRC;
|
||||
@@ -164,8 +155,10 @@ typedef unsigned long COLORREF;
|
||||
typedef struct tagLAYERPLANEDESCRIPTOR LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR;
|
||||
typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT;
|
||||
typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, *LPPIXELFORMATDESCRIPTOR;
|
||||
#if !defined(GLX_USE_MESA)
|
||||
#include <gl/mesa_wgl.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: hash.c,v 1.9 2000/03/21 22:20:42 brianp Exp $ */
|
||||
/* $Id: hash.c,v 1.9.4.1 2000/11/26 21:10:26 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -101,7 +101,6 @@ void *_mesa_HashLookup(const struct _mesa_HashTable *table, GLuint key)
|
||||
const struct HashEntry *entry;
|
||||
|
||||
assert(table);
|
||||
assert(key);
|
||||
|
||||
pos = key & (TABLE_SIZE-1);
|
||||
entry = table->Table[pos];
|
||||
@@ -130,7 +129,6 @@ void _mesa_HashInsert(struct _mesa_HashTable *table, GLuint key, void *data)
|
||||
struct HashEntry *entry;
|
||||
|
||||
assert(table);
|
||||
assert(key);
|
||||
|
||||
_glthread_LOCK_MUTEX(table->Mutex);
|
||||
|
||||
@@ -172,7 +170,6 @@ void _mesa_HashRemove(struct _mesa_HashTable *table, GLuint key)
|
||||
struct HashEntry *entry, *prev;
|
||||
|
||||
assert(table);
|
||||
assert(key);
|
||||
|
||||
_glthread_LOCK_MUTEX(table->Mutex);
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,8 @@
|
||||
/* $Id: image.h,v 1.9 2000/05/10 14:39:53 brianp Exp $ */
|
||||
/* $Id: image.h,v 1.9.4.1 2001/01/25 17:34:22 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
* Version: 3.4.1
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
*
|
||||
@@ -79,6 +79,15 @@ _mesa_pack_polygon_stipple( const GLuint pattern[32], GLubyte *dest,
|
||||
const struct gl_pixelstore_attrib *packing );
|
||||
|
||||
|
||||
extern void
|
||||
_mesa_pack_float_rgba_span( GLcontext *ctx,
|
||||
GLuint n, CONST GLfloat rgba[][4],
|
||||
GLenum dstFormat, GLenum dstType,
|
||||
GLvoid *dstAddr,
|
||||
const struct gl_pixelstore_attrib *dstPacking,
|
||||
GLboolean applyTransferOps );
|
||||
|
||||
|
||||
extern void
|
||||
_mesa_pack_rgba_span( GLcontext *ctx,
|
||||
GLuint n, CONST GLubyte rgba[][4],
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: lines.c,v 1.12 2000/07/14 14:04:07 brianp Exp $ */
|
||||
/* $Id: lines.c,v 1.12.2.1 2000/11/08 16:42:48 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -1058,7 +1058,7 @@ _mesa_print_line_function(GLcontext *ctx)
|
||||
else if (ctx->Driver.LineFunc == null_line)
|
||||
printf("null_line\n");
|
||||
else
|
||||
printf("Driver func %p\n", ctx->Driver.PointsFunc);
|
||||
printf("Driver func %p\n", ctx->Driver.LineFunc);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: matrix.c,v 1.18.4.1 2000/07/31 15:31:17 brianp Exp $ */
|
||||
/* $Id: matrix.c,v 1.18.4.2 2000/11/05 21:24:01 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -764,18 +764,16 @@ static void analyze_from_scratch( GLmatrix *mat )
|
||||
|
||||
/* Do the real work
|
||||
*/
|
||||
if (mask == MASK_IDENTITY) {
|
||||
if (mask == (GLuint) MASK_IDENTITY) {
|
||||
mat->type = MATRIX_IDENTITY;
|
||||
}
|
||||
else if ((mask & MASK_2D_NO_ROT) == MASK_2D_NO_ROT)
|
||||
{
|
||||
else if ((mask & MASK_2D_NO_ROT) == (GLuint) MASK_2D_NO_ROT) {
|
||||
mat->type = MATRIX_2D_NO_ROT;
|
||||
|
||||
if ((mask & MASK_NO_2D_SCALE) != MASK_NO_2D_SCALE)
|
||||
mat->flags = MAT_FLAG_GENERAL_SCALE;
|
||||
}
|
||||
else if ((mask & MASK_2D) == MASK_2D)
|
||||
{
|
||||
else if ((mask & MASK_2D) == (GLuint) MASK_2D) {
|
||||
GLfloat mm = DOT2(m, m);
|
||||
GLfloat m4m4 = DOT2(m+4,m+4);
|
||||
GLfloat mm4 = DOT2(m,m+4);
|
||||
@@ -794,8 +792,7 @@ static void analyze_from_scratch( GLmatrix *mat )
|
||||
mat->flags |= MAT_FLAG_ROTATION;
|
||||
|
||||
}
|
||||
else if ((mask & MASK_3D_NO_ROT) == MASK_3D_NO_ROT)
|
||||
{
|
||||
else if ((mask & MASK_3D_NO_ROT) == (GLuint) MASK_3D_NO_ROT) {
|
||||
mat->type = MATRIX_3D_NO_ROT;
|
||||
|
||||
/* Check for scale */
|
||||
@@ -806,8 +803,7 @@ static void analyze_from_scratch( GLmatrix *mat )
|
||||
} else
|
||||
mat->flags |= MAT_FLAG_GENERAL_SCALE;
|
||||
}
|
||||
else if ((mask & MASK_3D) == MASK_3D)
|
||||
{
|
||||
else if ((mask & MASK_3D) == (GLuint) MASK_3D) {
|
||||
GLfloat c1 = DOT3(m,m);
|
||||
GLfloat c2 = DOT3(m+4,m+4);
|
||||
GLfloat c3 = DOT3(m+8,m+8);
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: points.c,v 1.11.2.1 2000/08/16 17:25:40 brianp Exp $ */
|
||||
/* $Id: points.c,v 1.11.2.2 2000/11/08 16:41:17 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -161,7 +161,7 @@ size1_ci_points( GLcontext *ctx, GLuint first, GLuint last )
|
||||
GLuint i;
|
||||
|
||||
win = &VB->Win.data[first][0];
|
||||
for (i = first; i <= last; i++) {
|
||||
for (i = first; i < last; i++) {
|
||||
if (VB->ClipMask[i] == 0) {
|
||||
pbx[pbcount] = (GLint) win[0];
|
||||
pby[pbcount] = (GLint) win[1];
|
||||
@@ -187,7 +187,7 @@ size1_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
|
||||
struct pixel_buffer *PB = ctx->PB;
|
||||
GLuint i;
|
||||
|
||||
for (i = first; i <= last; i++) {
|
||||
for (i = first; i < last; i++) {
|
||||
if (VB->ClipMask[i] == 0) {
|
||||
GLint x, y, z;
|
||||
GLint red, green, blue, alpha;
|
||||
@@ -221,7 +221,7 @@ general_ci_points( GLcontext *ctx, GLuint first, GLuint last )
|
||||
GLint radius = isize >> 1;
|
||||
GLuint i;
|
||||
|
||||
for (i = first; i <= last; i++) {
|
||||
for (i = first; i < last; i++) {
|
||||
if (VB->ClipMask[i] == 0) {
|
||||
GLint x0, x1, y0, y1;
|
||||
GLint ix, iy;
|
||||
@@ -270,7 +270,7 @@ general_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
|
||||
GLint radius = isize >> 1;
|
||||
GLuint i;
|
||||
|
||||
for (i = first; i <= last; i++) {
|
||||
for (i = first; i < last; i++) {
|
||||
if (VB->ClipMask[i] == 0) {
|
||||
GLint x0, x1, y0, y1;
|
||||
GLint ix, iy;
|
||||
@@ -323,7 +323,7 @@ textured_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
|
||||
struct pixel_buffer *PB = ctx->PB;
|
||||
GLuint i;
|
||||
|
||||
for (i = first; i <= last; i++) {
|
||||
for (i = first; i < last; i++) {
|
||||
if (VB->ClipMask[i] == 0) {
|
||||
GLint x0, x1, y0, y1;
|
||||
GLint ix, iy, radius;
|
||||
@@ -410,7 +410,7 @@ multitextured_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
|
||||
struct pixel_buffer *PB = ctx->PB;
|
||||
GLuint i;
|
||||
|
||||
for (i = first; i <= last; i++) {
|
||||
for (i = first; i < last; i++) {
|
||||
if (VB->ClipMask[i] == 0) {
|
||||
GLint x0, x1, y0, y1;
|
||||
GLint ix, iy;
|
||||
@@ -551,7 +551,7 @@ antialiased_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
|
||||
GLuint i;
|
||||
|
||||
if (ctx->Texture.ReallyEnabled) {
|
||||
for (i = first; i <= last; i++) {
|
||||
for (i = first; i < last; i++) {
|
||||
if (VB->ClipMask[i] == 0) {
|
||||
GLint x, y;
|
||||
GLint red, green, blue, alpha;
|
||||
@@ -667,7 +667,7 @@ antialiased_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
|
||||
}
|
||||
else {
|
||||
/* Not texture mapped */
|
||||
for (i=first;i<=last;i++) {
|
||||
for (i=first;i<last;i++) {
|
||||
if (VB->ClipMask[i]==0) {
|
||||
GLint xmin, ymin, xmax, ymax;
|
||||
GLint x, y, z;
|
||||
@@ -738,7 +738,7 @@ dist3(GLfloat *out, GLuint first, GLuint last,
|
||||
const GLfloat *p = VEC_ELT(v, GLfloat, first);
|
||||
GLuint i;
|
||||
|
||||
for (i = first ; i <= last ; i++, STRIDE_F(p, stride) ) {
|
||||
for (i = first ; i < last ; i++, STRIDE_F(p, stride) ) {
|
||||
GLfloat dist = GL_SQRT(p[0]*p[0]+p[1]*p[1]+p[2]*p[2]);
|
||||
out[i] = 1.0F / (ctx->Point.Params[0] +
|
||||
dist * (ctx->Point.Params[1] +
|
||||
@@ -755,7 +755,7 @@ dist2(GLfloat *out, GLuint first, GLuint last,
|
||||
const GLfloat *p = VEC_ELT(v, GLfloat, first);
|
||||
GLuint i;
|
||||
|
||||
for (i = first ; i <= last ; i++, STRIDE_F(p, stride) ) {
|
||||
for (i = first ; i < last ; i++, STRIDE_F(p, stride) ) {
|
||||
GLfloat dist = GL_SQRT(p[0]*p[0]+p[1]*p[1]);
|
||||
out[i] = 1.0F / (ctx->Point.Params[0] +
|
||||
dist * (ctx->Point.Params[1] +
|
||||
@@ -795,7 +795,7 @@ clip_dist(GLfloat *out, GLuint first, GLuint last,
|
||||
const GLfloat *from = (GLfloat *)clip_vec->start;
|
||||
const GLuint stride = clip_vec->stride;
|
||||
|
||||
for (i = first ; i <= last ; i++ )
|
||||
for (i = first ; i < last ; i++ )
|
||||
{
|
||||
GLfloat dist = win[i][2];
|
||||
out[i] = 1/(ctx->Point.Params[0]+
|
||||
@@ -824,7 +824,7 @@ dist_atten_general_ci_points( GLcontext *ctx, GLuint first, GLuint last )
|
||||
else
|
||||
clip_dist( dist, first, last, ctx, VB->ClipPtr );
|
||||
|
||||
for (i=first;i<=last;i++) {
|
||||
for (i=first;i<last;i++) {
|
||||
if (VB->ClipMask[i]==0) {
|
||||
GLint x0, x1, y0, y1;
|
||||
GLint ix, iy;
|
||||
@@ -886,7 +886,7 @@ dist_atten_general_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
|
||||
else
|
||||
clip_dist( dist, first, last, ctx, VB->ClipPtr );
|
||||
|
||||
for (i=first;i<=last;i++) {
|
||||
for (i=first;i<last;i++) {
|
||||
if (VB->ClipMask[i]==0) {
|
||||
GLint x0, x1, y0, y1;
|
||||
GLint ix, iy;
|
||||
@@ -956,7 +956,7 @@ dist_atten_textured_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
|
||||
else
|
||||
clip_dist( dist, first, last, ctx, VB->ClipPtr );
|
||||
|
||||
for (i=first;i<=last;i++) {
|
||||
for (i=first;i<last;i++) {
|
||||
if (VB->ClipMask[i]==0) {
|
||||
GLint x0, x1, y0, y1;
|
||||
GLint ix, iy;
|
||||
@@ -1104,7 +1104,7 @@ dist_atten_antialiased_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
|
||||
clip_dist( dist, first, last, ctx, VB->ClipPtr );
|
||||
|
||||
if (ctx->Texture.ReallyEnabled) {
|
||||
for (i=first;i<=last;i++) {
|
||||
for (i=first;i<last;i++) {
|
||||
if (VB->ClipMask[i]==0) {
|
||||
GLfloat radius, rmin, rmax, rmin2, rmax2, cscale, alphaf;
|
||||
GLint xmin, ymin, xmax, ymax;
|
||||
@@ -1232,7 +1232,7 @@ dist_atten_antialiased_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
|
||||
}
|
||||
else {
|
||||
/* Not texture mapped */
|
||||
for (i = first; i <= last; i++) {
|
||||
for (i = first; i < last; i++) {
|
||||
if (VB->ClipMask[i] == 0) {
|
||||
GLfloat radius, rmin, rmax, rmin2, rmax2, cscale, alphaf;
|
||||
GLint xmin, ymin, xmax, ymax;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: state.c,v 1.21.4.4 2000/10/31 19:57:39 brianp Exp $ */
|
||||
/* $Id: state.c,v 1.21.4.6 2000/12/09 19:21:01 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -775,7 +775,7 @@ static void update_pixel_masking( GLcontext *ctx )
|
||||
|
||||
static void update_fog_mode( GLcontext *ctx )
|
||||
{
|
||||
int old_mode = ctx->FogMode;
|
||||
const GLuint old_mode = ctx->FogMode;
|
||||
|
||||
if (ctx->Fog.Enabled) {
|
||||
if (ctx->Texture.ReallyEnabled)
|
||||
@@ -926,9 +926,12 @@ void gl_update_state( GLcontext *ctx )
|
||||
ctx->NewState |= NEW_TEXTURING | NEW_RASTER_OPS;
|
||||
}
|
||||
|
||||
/* XXX this is a hack, gone in 3.5 */
|
||||
if (ctx->NewState & NEW_TEXTURE_ENV) {
|
||||
if (ctx->Texture.Unit[0].EnvMode == ctx->Texture.Unit[0].LastEnvMode &&
|
||||
ctx->Texture.Unit[1].EnvMode == ctx->Texture.Unit[1].LastEnvMode)
|
||||
ctx->Texture.Unit[1].EnvMode == ctx->Texture.Unit[1].LastEnvMode &&
|
||||
ctx->Texture.Unit[0].EnvMode != GL_COMBINE_EXT &&
|
||||
ctx->Texture.Unit[1].EnvMode != GL_COMBINE_EXT)
|
||||
ctx->NewState &= ~NEW_TEXTURE_ENV;
|
||||
ctx->Texture.Unit[0].LastEnvMode = ctx->Texture.Unit[0].EnvMode;
|
||||
ctx->Texture.Unit[1].LastEnvMode = ctx->Texture.Unit[1].EnvMode;
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/* $Id: stencil.c,v 1.16 2000/04/11 21:26:57 brianp Exp $ */
|
||||
/* $Id: stencil.c,v 1.16.4.1 2000/11/28 21:30:44 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
* Version: 3.4
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
*
|
||||
@@ -1351,11 +1351,11 @@ clear_hardware_stencil_buffer( GLcontext *ctx )
|
||||
const GLstencil clearVal = (ctx->Stencil.Clear & mask);
|
||||
GLstencil stencil[MAX_WIDTH];
|
||||
GLint i;
|
||||
(*ctx->Driver.ReadStencilSpan)(ctx, x, y, width, stencil);
|
||||
(*ctx->Driver.ReadStencilSpan)(ctx, width, x, y, stencil);
|
||||
for (i = 0; i < width; i++) {
|
||||
stencil[i] = (stencil[i] & invMask) | clearVal;
|
||||
}
|
||||
(*ctx->Driver.WriteStencilSpan)(ctx, x, y, width, stencil, NULL);
|
||||
(*ctx->Driver.WriteStencilSpan)(ctx, width, x, y, stencil, NULL);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -1366,7 +1366,7 @@ clear_hardware_stencil_buffer( GLcontext *ctx )
|
||||
stencil[i] = ctx->Stencil.Clear;
|
||||
}
|
||||
for (y = ctx->DrawBuffer->Ymin; y <= ctx->DrawBuffer->Ymax; y++) {
|
||||
(*ctx->Driver.WriteStencilSpan)(ctx, x, y, width, stencil, NULL);
|
||||
(*ctx->Driver.WriteStencilSpan)(ctx, width, x, y, stencil, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1384,11 +1384,11 @@ clear_hardware_stencil_buffer( GLcontext *ctx )
|
||||
for (y = 0; y < height; y++) {
|
||||
GLstencil stencil[MAX_WIDTH];
|
||||
GLuint i;
|
||||
(*ctx->Driver.ReadStencilSpan)(ctx, x, y, width, stencil);
|
||||
(*ctx->Driver.ReadStencilSpan)(ctx, width, x, y, stencil);
|
||||
for (i = 0; i < width; i++) {
|
||||
stencil[i] = (stencil[i] & invMask) | clearVal;
|
||||
}
|
||||
(*ctx->Driver.WriteStencilSpan)(ctx, x, y, width, stencil, NULL);
|
||||
(*ctx->Driver.WriteStencilSpan)(ctx, width, x, y, stencil, NULL);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -1402,7 +1402,7 @@ clear_hardware_stencil_buffer( GLcontext *ctx )
|
||||
stencil[i] = ctx->Stencil.Clear;
|
||||
}
|
||||
for (y = 0; y < height; y++) {
|
||||
(*ctx->Driver.WriteStencilSpan)(ctx, x, y, width, stencil, NULL);
|
||||
(*ctx->Driver.WriteStencilSpan)(ctx, width, x, y, stencil, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: teximage.c,v 1.39.4.7 2000/10/16 23:37:16 brianp Exp $ */
|
||||
/* $Id: teximage.c,v 1.39.4.10 2001/01/23 23:32:44 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -53,50 +53,50 @@
|
||||
#ifdef DEBUG
|
||||
static void PrintTexture(const struct gl_texture_image *img)
|
||||
{
|
||||
int i, j, c;
|
||||
GLubyte *data = img->Data;
|
||||
GLuint i, j, c;
|
||||
GLubyte *data = img->Data;
|
||||
|
||||
if (!data) {
|
||||
printf("No texture data\n");
|
||||
return;
|
||||
}
|
||||
if (!data) {
|
||||
printf("No texture data\n");
|
||||
return;
|
||||
}
|
||||
|
||||
switch (img->Format) {
|
||||
case GL_ALPHA:
|
||||
case GL_LUMINANCE:
|
||||
case GL_INTENSITY:
|
||||
case GL_COLOR_INDEX:
|
||||
c = 1;
|
||||
break;
|
||||
case GL_LUMINANCE_ALPHA:
|
||||
c = 2;
|
||||
break;
|
||||
case GL_RGB:
|
||||
c = 3;
|
||||
break;
|
||||
case GL_RGBA:
|
||||
c = 4;
|
||||
break;
|
||||
default:
|
||||
gl_problem(NULL, "error in PrintTexture\n");
|
||||
return;
|
||||
}
|
||||
switch (img->Format) {
|
||||
case GL_ALPHA:
|
||||
case GL_LUMINANCE:
|
||||
case GL_INTENSITY:
|
||||
case GL_COLOR_INDEX:
|
||||
c = 1;
|
||||
break;
|
||||
case GL_LUMINANCE_ALPHA:
|
||||
c = 2;
|
||||
break;
|
||||
case GL_RGB:
|
||||
c = 3;
|
||||
break;
|
||||
case GL_RGBA:
|
||||
c = 4;
|
||||
break;
|
||||
default:
|
||||
gl_problem(NULL, "error in PrintTexture\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
for (i = 0; i < img->Height; i++) {
|
||||
for (j = 0; j < img->Width; j++) {
|
||||
if (c==1)
|
||||
printf("%02x ", data[0]);
|
||||
else if (c==2)
|
||||
printf("%02x%02x ", data[0], data[1]);
|
||||
else if (c==3)
|
||||
printf("%02x%02x%02x ", data[0], data[1], data[2]);
|
||||
else if (c==4)
|
||||
printf("%02x%02x%02x%02x ", data[0], data[1], data[2], data[3]);
|
||||
data += c;
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
for (i = 0; i < img->Height; i++) {
|
||||
for (j = 0; j < img->Width; j++) {
|
||||
if (c==1)
|
||||
printf("%02x ", data[0]);
|
||||
else if (c==2)
|
||||
printf("%02x%02x ", data[0], data[1]);
|
||||
else if (c==3)
|
||||
printf("%02x%02x%02x ", data[0], data[1], data[2]);
|
||||
else if (c==4)
|
||||
printf("%02x%02x%02x%02x ", data[0], data[1], data[2], data[3]);
|
||||
data += c;
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -699,7 +699,7 @@ make_texture_image( GLcontext *ctx,
|
||||
&& !ctx->Pixel.IndexOffset && !ctx->Pixel.IndexShift
|
||||
&& srcType == GL_UNSIGNED_BYTE && depth == 1) {
|
||||
|
||||
if (srcFormat == internalFormat ||
|
||||
if ((GLint) srcFormat == internalFormat ||
|
||||
(srcFormat == GL_LUMINANCE && internalFormat == 1) ||
|
||||
(srcFormat == GL_LUMINANCE_ALPHA && internalFormat == 2) ||
|
||||
(srcFormat == GL_RGB && internalFormat == 3) ||
|
||||
@@ -825,13 +825,14 @@ make_null_texture( struct gl_texture_image *texImage )
|
||||
};
|
||||
|
||||
GLubyte *imgPtr = texImage->Data;
|
||||
GLint i, j, k;
|
||||
GLuint i, j;
|
||||
GLint k;
|
||||
for (i = 0; i < texImage->Height; i++) {
|
||||
GLint srcRow = 7 - i % 8;
|
||||
for (j = 0; j < texImage->Width; j++) {
|
||||
GLint srcCol = j % 32;
|
||||
GLint texel = (message[srcRow][srcCol]=='X') ? 255 : 70;
|
||||
for (k=0;k<components;k++) {
|
||||
for (k = 0; k < components; k++) {
|
||||
*imgPtr++ = (GLubyte) texel;
|
||||
}
|
||||
}
|
||||
@@ -1088,9 +1089,9 @@ subtexture_error_check( GLcontext *ctx, GLuint dimensions,
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
destTex = texUnit->CurrentD[2]->Image[level];
|
||||
destTex = texUnit->CurrentD[dimensions]->Image[level];
|
||||
if (!destTex) {
|
||||
gl_error(ctx, GL_INVALID_OPERATION, "glTexSubImage2D");
|
||||
gl_error(ctx, GL_INVALID_OPERATION, "glTexSubImage1/2/3D");
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
@@ -2153,7 +2154,7 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format,
|
||||
default:
|
||||
gl_problem( ctx, "bad format in gl_GetTexImage" );
|
||||
}
|
||||
_mesa_pack_rgba_span( ctx, width, (const GLubyte (*)[4])rgba,
|
||||
_mesa_pack_rgba_span( ctx, width, (CONST GLubyte (*)[4])rgba,
|
||||
format, type, dest, &ctx->Pack, GL_TRUE );
|
||||
}
|
||||
}
|
||||
@@ -2307,8 +2308,9 @@ _mesa_TexSubImage2D( GLenum target, GLint level,
|
||||
/* color index texture */
|
||||
GLubyte *dst = texImage->Data
|
||||
+ (yoffsetb * texImage->Width + xoffsetb) * texComponents;
|
||||
const GLubyte *src = _mesa_image_address(&ctx->Unpack, pixels,
|
||||
width, height, format, type, 0, 0, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(&ctx->Unpack, pixels, width, height, format,
|
||||
type, 0, 0, 0);
|
||||
GLint row;
|
||||
for (row = 0; row < height; row++) {
|
||||
_mesa_unpack_index_span(ctx, width, GL_UNSIGNED_BYTE, dst, type,
|
||||
@@ -2321,8 +2323,9 @@ _mesa_TexSubImage2D( GLenum target, GLint level,
|
||||
/* color texture */
|
||||
GLubyte *dst = texImage->Data
|
||||
+ (yoffsetb * texImage->Width + xoffsetb) * texComponents;
|
||||
const GLubyte *src = _mesa_image_address(&ctx->Unpack, pixels,
|
||||
width, height, format, type, 0, 0, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(&ctx->Unpack, pixels, width, height, format,
|
||||
type, 0, 0, 0);
|
||||
GLint row;
|
||||
for (row = 0; row < height; row++) {
|
||||
_mesa_unpack_ubyte_color_span(ctx, width, texFormat, dst, format,
|
||||
@@ -2412,8 +2415,9 @@ _mesa_TexSubImage3D( GLenum target, GLint level,
|
||||
/* color index texture */
|
||||
GLint img, row;
|
||||
for (img = 0; img < depth; img++) {
|
||||
const GLubyte *src = _mesa_image_address(&ctx->Unpack, pixels,
|
||||
width, height, format, type, img, 0, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(&ctx->Unpack, pixels, width, height,
|
||||
format, type, img, 0, 0);
|
||||
GLubyte *dst = texImage->Data + ((zoffsetb + img) * dstRectArea
|
||||
+ yoffsetb * texWidth + xoffsetb) * texComponents;
|
||||
for (row = 0; row < height; row++) {
|
||||
@@ -2428,8 +2432,9 @@ _mesa_TexSubImage3D( GLenum target, GLint level,
|
||||
/* color texture */
|
||||
GLint img, row;
|
||||
for (img = 0; img < depth; img++) {
|
||||
const GLubyte *src = _mesa_image_address(&ctx->Unpack, pixels,
|
||||
width, height, format, type, img, 0, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(&ctx->Unpack, pixels, width, height,
|
||||
format, type, img, 0, 0);
|
||||
GLubyte *dst = texImage->Data + ((zoffsetb + img) * dstRectArea
|
||||
+ yoffsetb * texWidth + xoffsetb) * texComponents;
|
||||
for (row = 0; row < height; row++) {
|
||||
@@ -2482,6 +2487,8 @@ read_color_image( GLcontext *ctx, GLint x, GLint y,
|
||||
|
||||
/* XXX TODO we have to apply pixel transfer ops here! */
|
||||
|
||||
RENDER_START(ctx);
|
||||
|
||||
dst = image;
|
||||
stride = width * 4 * sizeof(GLubyte);
|
||||
for (i = 0; i < height; i++) {
|
||||
@@ -2490,6 +2497,8 @@ read_color_image( GLcontext *ctx, GLint x, GLint y,
|
||||
dst += stride;
|
||||
}
|
||||
|
||||
RENDER_FINISH(ctx);
|
||||
|
||||
/* Read from draw buffer (the default) */
|
||||
(*ctx->Driver.SetReadBuffer)( ctx, ctx->DrawBuffer,
|
||||
ctx->Color.DriverDrawBuffer );
|
||||
@@ -2787,7 +2796,7 @@ _mesa_CompressedTexImage1DARB(GLenum target, GLint level,
|
||||
gl_error(ctx, GL_INVALID_VALUE, "glCompressedTexImage1DARB(imageSize)");
|
||||
return;
|
||||
}
|
||||
texImage->Data = MALLOC(computedImageSize);
|
||||
texImage->Data = (GLubyte *) MALLOC(computedImageSize);
|
||||
if (texImage->Data) {
|
||||
MEMCPY(texImage->Data, data, computedImageSize);
|
||||
}
|
||||
@@ -2922,7 +2931,7 @@ _mesa_CompressedTexImage2DARB(GLenum target, GLint level,
|
||||
gl_error(ctx, GL_INVALID_VALUE, "glCompressedTexImage2DARB(imageSize)");
|
||||
return;
|
||||
}
|
||||
texImage->Data = MALLOC(computedImageSize);
|
||||
texImage->Data = (GLubyte *) MALLOC(computedImageSize);
|
||||
if (texImage->Data) {
|
||||
MEMCPY(texImage->Data, data, computedImageSize);
|
||||
}
|
||||
@@ -3051,7 +3060,7 @@ _mesa_CompressedTexImage3DARB(GLenum target, GLint level,
|
||||
gl_error(ctx, GL_INVALID_VALUE, "glCompressedTexImage3DARB(imageSize)");
|
||||
return;
|
||||
}
|
||||
texImage->Data = MALLOC(computedImageSize);
|
||||
texImage->Data = (GLubyte *) MALLOC(computedImageSize);
|
||||
if (texImage->Data) {
|
||||
MEMCPY(texImage->Data, data, computedImageSize);
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: texobj.c,v 1.23.4.6 2000/10/24 02:52:36 brianp Exp $ */
|
||||
/* $Id: texobj.c,v 1.23.4.9 2000/12/14 23:10:39 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -70,6 +70,7 @@ gl_alloc_texture_object( struct gl_shared_state *shared, GLuint name,
|
||||
obj->Priority = 1.0F;
|
||||
obj->WrapS = GL_REPEAT;
|
||||
obj->WrapT = GL_REPEAT;
|
||||
obj->WrapR = GL_REPEAT;
|
||||
obj->MinFilter = GL_NEAREST_MIPMAP_LINEAR;
|
||||
obj->MagFilter = GL_LINEAR;
|
||||
obj->MinLod = -1000.0;
|
||||
@@ -206,8 +207,12 @@ _mesa_test_texobj_completeness( const GLcontext *ctx,
|
||||
t->P = max;
|
||||
}
|
||||
|
||||
t->P += baseLevel;
|
||||
t->P = MIN2(t->P, t->MaxLevel);
|
||||
t->P = MIN2(t->P, ctx->Const.MaxTextureLevels - 1);
|
||||
|
||||
/* Compute M (see the 1.2 spec) used during mipmapping */
|
||||
t->M = (GLfloat) (MIN2(t->MaxLevel, t->P) - t->BaseLevel);
|
||||
t->M = (GLfloat) (t->P - t->BaseLevel);
|
||||
|
||||
|
||||
if (t->Dimensions == 6) {
|
||||
@@ -241,8 +246,7 @@ _mesa_test_texobj_completeness( const GLcontext *ctx,
|
||||
*/
|
||||
GLint i;
|
||||
GLint minLevel = baseLevel;
|
||||
GLint maxLevel = MIN2(t->P, ctx->Const.MaxTextureLevels-1);
|
||||
maxLevel = MIN2(maxLevel, t->MaxLevel);
|
||||
GLint maxLevel = t->P;
|
||||
|
||||
if (minLevel > maxLevel) {
|
||||
t->Complete = GL_FALSE;
|
||||
@@ -552,6 +556,8 @@ _mesa_BindTexture( GLenum target, GLuint texName )
|
||||
return;
|
||||
}
|
||||
|
||||
ctx->NewState |= NEW_TEXTURING;
|
||||
|
||||
if (oldTexObj->Name == texName)
|
||||
return;
|
||||
|
||||
@@ -612,17 +618,12 @@ _mesa_BindTexture( GLenum target, GLuint texName )
|
||||
|| (oldTexObj->Image[0] && newTexObj->Image[0] &&
|
||||
(oldTexObj->Image[0]->Format!=newTexObj->Image[0]->Format))))
|
||||
{
|
||||
ctx->NewState |= (NEW_RASTER_OPS | NEW_TEXTURING);
|
||||
ctx->NewState |= NEW_RASTER_OPS;
|
||||
}
|
||||
|
||||
if (oldTexObj->Complete != newTexObj->Complete)
|
||||
ctx->NewState |= NEW_TEXTURING;
|
||||
|
||||
/* Pass BindTexture call to device driver */
|
||||
if (ctx->Driver.BindTexture) {
|
||||
(*ctx->Driver.BindTexture)( ctx, target, newTexObj );
|
||||
/* Make sure the Driver.UpdateState() function gets called! */
|
||||
ctx->NewState |= NEW_TEXTURING;
|
||||
}
|
||||
|
||||
if (oldTexObj->Name > 0) {
|
||||
|
@@ -1,21 +1,21 @@
|
||||
/* $Id: texstate.c,v 1.15.4.1 2000/08/01 17:33:51 brianp Exp $ */
|
||||
/* $Id: texstate.c,v 1.15.4.3 2001/01/06 22:43:00 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.4
|
||||
*
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
@@ -118,6 +118,14 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
|
||||
case GL_ADD:
|
||||
case GL_ADD_SIGNED_EXT:
|
||||
case GL_INTERPOLATE_EXT:
|
||||
case GL_DOT3_RGB_EXT:
|
||||
case GL_DOT3_RGBA_EXT:
|
||||
if ((mode == GL_DOT3_RGB_EXT ||
|
||||
mode == GL_DOT3_RGBA_EXT) &&
|
||||
!ctx->Extensions.HaveTextureEnvDot3) {
|
||||
gl_error(ctx, GL_INVALID_ENUM, "glTexEnv(param)");
|
||||
return;
|
||||
}
|
||||
if (texUnit->CombineModeRGB == mode)
|
||||
return; /* no change */
|
||||
texUnit->CombineModeRGB = mode;
|
||||
@@ -356,7 +364,7 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
|
||||
}
|
||||
|
||||
if (MESA_VERBOSE&(VERBOSE_API|VERBOSE_TEXTURE))
|
||||
fprintf(stderr, "glTexEnv %s %s %.1f(%s) ...\n",
|
||||
fprintf(stderr, "glTexEnv %s %s %.1f(%s) ...\n",
|
||||
gl_lookup_enum_by_nr(target),
|
||||
gl_lookup_enum_by_nr(pname),
|
||||
*param,
|
||||
@@ -620,7 +628,7 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params )
|
||||
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glTexParameterfv");
|
||||
|
||||
if (MESA_VERBOSE&(VERBOSE_API|VERBOSE_TEXTURE))
|
||||
fprintf(stderr, "texPARAM %s %s %d...\n",
|
||||
fprintf(stderr, "texPARAM %s %s %d...\n",
|
||||
gl_lookup_enum_by_nr(target),
|
||||
gl_lookup_enum_by_nr(pname),
|
||||
eparam);
|
||||
@@ -1092,7 +1100,7 @@ _mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params )
|
||||
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glTexGenfv");
|
||||
|
||||
if (MESA_VERBOSE&(VERBOSE_API|VERBOSE_TEXTURE))
|
||||
fprintf(stderr, "texGEN %s %s %x...\n",
|
||||
fprintf(stderr, "texGEN %s %s %x...\n",
|
||||
gl_lookup_enum_by_nr(coord),
|
||||
gl_lookup_enum_by_nr(pname),
|
||||
*(int *)params);
|
||||
@@ -1242,7 +1250,7 @@ _mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params )
|
||||
if (pname==GL_TEXTURE_GEN_MODE) {
|
||||
GLenum mode = (GLenum) (GLint) *params;
|
||||
switch (mode) {
|
||||
case GL_OBJECT_LINEAR:
|
||||
case GL_OBJECT_LINEAR:
|
||||
texUnit->GenModeQ = GL_OBJECT_LINEAR;
|
||||
texUnit->GenBitQ = TEXGEN_OBJ_LINEAR;
|
||||
break;
|
||||
@@ -1592,12 +1600,12 @@ void
|
||||
_mesa_ActiveTextureARB( GLenum target )
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
GLint maxUnits = ctx->Const.MaxTextureUnits;
|
||||
const GLuint maxUnits = ctx->Const.MaxTextureUnits;
|
||||
|
||||
ASSERT_OUTSIDE_BEGIN_END( ctx, "glActiveTextureARB" );
|
||||
|
||||
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
|
||||
fprintf(stderr, "glActiveTexture %s\n",
|
||||
fprintf(stderr, "glActiveTexture %s\n",
|
||||
gl_lookup_enum_by_nr(target));
|
||||
|
||||
if (target >= GL_TEXTURE0_ARB && target < GL_TEXTURE0_ARB + maxUnits) {
|
||||
@@ -1619,7 +1627,7 @@ void
|
||||
_mesa_ClientActiveTextureARB( GLenum target )
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
GLint maxUnits = ctx->Const.MaxTextureUnits;
|
||||
const GLuint maxUnits = ctx->Const.MaxTextureUnits;
|
||||
|
||||
ASSERT_OUTSIDE_BEGIN_END( ctx, "glClientActiveTextureARB" );
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: texutil.c,v 1.5.4.2 2000/09/13 22:06:36 brianp Exp $ */
|
||||
/* $Id: texutil.c,v 1.5.4.5 2000/11/17 02:42:01 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -127,8 +127,9 @@ _mesa_convert_teximage(MesaIntTexFormat dstFormat,
|
||||
/* store as 8-bit texels */
|
||||
if (wScale == 1 && hScale == 1) {
|
||||
/* no scaling needed - fast case */
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, 0, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth, srcHeight,
|
||||
srcFormat, srcType, 0, 0, 0);
|
||||
const GLint srcStride = _mesa_image_row_stride(packing,
|
||||
srcWidth, srcFormat, srcType);
|
||||
GLubyte *dst = (GLubyte *) dstImage;
|
||||
@@ -145,8 +146,9 @@ _mesa_convert_teximage(MesaIntTexFormat dstFormat,
|
||||
GLint row;
|
||||
for (row = 0; row < dstHeight; row++) {
|
||||
GLint srcRow = row / hScale;
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth,
|
||||
srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
GLint col;
|
||||
for (col = 0; col < dstWidth; col++) {
|
||||
dst[col] = src[col / wScale];
|
||||
@@ -164,8 +166,9 @@ _mesa_convert_teximage(MesaIntTexFormat dstFormat,
|
||||
else {
|
||||
/* store as 16-bit texels */
|
||||
if (wScale == 1 && hScale == 1) {
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, 0, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth, srcHeight,
|
||||
srcFormat, srcType, 0, 0, 0);
|
||||
const GLint srcStride = _mesa_image_row_stride(packing,
|
||||
srcWidth, srcFormat, srcType);
|
||||
GLushort *dst = (GLushort *) dstImage;
|
||||
@@ -186,8 +189,9 @@ _mesa_convert_teximage(MesaIntTexFormat dstFormat,
|
||||
GLint row, col;
|
||||
for (row = 0; row < dstHeight; row++) {
|
||||
GLint srcRow = row / hScale;
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth,
|
||||
srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
const GLint srcStride = _mesa_image_row_stride(packing,
|
||||
srcWidth, srcFormat, srcType);
|
||||
for (col = 0; col < dstWidth; col++) {
|
||||
@@ -207,8 +211,9 @@ _mesa_convert_teximage(MesaIntTexFormat dstFormat,
|
||||
if (srcFormat == GL_RGB && srcType == GL_UNSIGNED_SHORT_5_6_5) {
|
||||
/* special, optimized case */
|
||||
if (wScale == 1 && hScale == 1) {
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, 0, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth, srcHeight,
|
||||
srcFormat, srcType, 0, 0, 0);
|
||||
const GLint srcStride = _mesa_image_row_stride(packing,
|
||||
srcWidth, srcFormat, srcType);
|
||||
GLushort *dst = (GLushort *) dstImage;
|
||||
@@ -225,8 +230,9 @@ _mesa_convert_teximage(MesaIntTexFormat dstFormat,
|
||||
GLint row;
|
||||
for (row = 0; row < dstHeight; row++) {
|
||||
GLint srcRow = row / hScale;
|
||||
const GLushort *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
const GLushort *src = (const GLushort *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth,
|
||||
srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
GLint col;
|
||||
for (col = 0; col < dstWidth; col++) {
|
||||
dst[col] = src[col / wScale];
|
||||
@@ -238,8 +244,9 @@ _mesa_convert_teximage(MesaIntTexFormat dstFormat,
|
||||
else if (srcFormat == GL_RGB && srcType == GL_UNSIGNED_BYTE) {
|
||||
/* general case */
|
||||
if (wScale == 1 && hScale == 1) {
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, 0, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth, srcHeight,
|
||||
srcFormat, srcType, 0, 0, 0);
|
||||
const GLint srcStride = _mesa_image_row_stride(packing,
|
||||
srcWidth, srcFormat, srcType);
|
||||
#ifdef DO_32BIT_STORES
|
||||
@@ -290,8 +297,9 @@ _mesa_convert_teximage(MesaIntTexFormat dstFormat,
|
||||
GLint row;
|
||||
for (row = 0; row < dstHeight; row++) {
|
||||
GLint srcRow = row / hScale;
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth,
|
||||
srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
GLint col;
|
||||
for (col = 0; col < dstWidth; col++) {
|
||||
GLint col3 = (col / wScale) * 3;
|
||||
@@ -309,8 +317,9 @@ _mesa_convert_teximage(MesaIntTexFormat dstFormat,
|
||||
else if (srcFormat == GL_RGBA && srcType == GL_UNSIGNED_BYTE) {
|
||||
/* general case (used by Quake3) */
|
||||
if (wScale == 1 && hScale == 1) {
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, 0, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth, srcHeight,
|
||||
srcFormat, srcType, 0, 0, 0);
|
||||
const GLint srcStride = _mesa_image_row_stride(packing,
|
||||
srcWidth, srcFormat, srcType);
|
||||
#ifdef DO_32BIT_STORES
|
||||
@@ -361,8 +370,9 @@ _mesa_convert_teximage(MesaIntTexFormat dstFormat,
|
||||
GLint row;
|
||||
for (row = 0; row < dstHeight; row++) {
|
||||
GLint srcRow = row / hScale;
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth,
|
||||
srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
GLint col;
|
||||
for (col = 0; col < dstWidth; col++) {
|
||||
GLint col4 = (col / wScale) * 4;
|
||||
@@ -388,8 +398,9 @@ _mesa_convert_teximage(MesaIntTexFormat dstFormat,
|
||||
if (srcFormat == GL_BGRA && srcType == GL_UNSIGNED_SHORT_4_4_4_4_REV){
|
||||
/* special, optimized case */
|
||||
if (wScale == 1 && hScale == 1) {
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, 0, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth, srcHeight,
|
||||
srcFormat, srcType, 0, 0, 0);
|
||||
const GLint srcStride = _mesa_image_row_stride(packing,
|
||||
srcWidth, srcFormat, srcType);
|
||||
GLushort *dst = (GLushort *) dstImage;
|
||||
@@ -406,8 +417,9 @@ _mesa_convert_teximage(MesaIntTexFormat dstFormat,
|
||||
GLint row;
|
||||
for (row = 0; row < dstHeight; row++) {
|
||||
GLint srcRow = row / hScale;
|
||||
const GLushort *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
const GLushort *src = (const GLushort *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth,
|
||||
srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
GLint col;
|
||||
for (col = 0; col < dstWidth; col++) {
|
||||
dst[col] = src[col / wScale];
|
||||
@@ -419,8 +431,9 @@ _mesa_convert_teximage(MesaIntTexFormat dstFormat,
|
||||
else if (srcFormat == GL_RGBA && srcType == GL_UNSIGNED_BYTE) {
|
||||
/* general case */
|
||||
if (wScale == 1 && hScale == 1) {
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, 0, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth, srcHeight,
|
||||
srcFormat, srcType, 0, 0, 0);
|
||||
const GLint srcStride = _mesa_image_row_stride(packing,
|
||||
srcWidth, srcFormat, srcType);
|
||||
#ifdef DO_32BIT_STORES
|
||||
@@ -477,8 +490,9 @@ _mesa_convert_teximage(MesaIntTexFormat dstFormat,
|
||||
GLint row;
|
||||
for (row = 0; row < dstHeight; row++) {
|
||||
GLint srcRow = row / hScale;
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth,
|
||||
srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
GLint col;
|
||||
for (col = 0; col < dstWidth; col++) {
|
||||
GLint col4 = (col / wScale) * 4;
|
||||
@@ -506,8 +520,9 @@ _mesa_convert_teximage(MesaIntTexFormat dstFormat,
|
||||
if (srcFormat == GL_BGRA && srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV){
|
||||
/* special, optimized case */
|
||||
if (wScale == 1 && hScale == 1) {
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, 0, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth, srcHeight,
|
||||
srcFormat, srcType, 0, 0, 0);
|
||||
const GLint srcStride = _mesa_image_row_stride(packing,
|
||||
srcWidth, srcFormat, srcType);
|
||||
GLushort *dst = (GLushort *) dstImage;
|
||||
@@ -524,8 +539,9 @@ _mesa_convert_teximage(MesaIntTexFormat dstFormat,
|
||||
GLint row;
|
||||
for (row = 0; row < dstHeight; row++) {
|
||||
GLint srcRow = row / hScale;
|
||||
const GLushort *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
const GLushort *src = (const GLushort *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth,
|
||||
srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
GLint col;
|
||||
for (col = 0; col < dstWidth; col++) {
|
||||
dst[col] = src[col / wScale];
|
||||
@@ -537,8 +553,9 @@ _mesa_convert_teximage(MesaIntTexFormat dstFormat,
|
||||
else if (srcFormat == GL_RGBA && srcType == GL_UNSIGNED_BYTE) {
|
||||
/* general case */
|
||||
if (wScale == 1 && hScale == 1) {
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, 0, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth, srcHeight,
|
||||
srcFormat, srcType, 0, 0, 0);
|
||||
const GLint srcStride = _mesa_image_row_stride(packing,
|
||||
srcWidth, srcFormat, srcType);
|
||||
GLushort *dst = (GLushort *) dstImage;
|
||||
@@ -565,8 +582,9 @@ _mesa_convert_teximage(MesaIntTexFormat dstFormat,
|
||||
GLint row;
|
||||
for (row = 0; row < dstHeight; row++) {
|
||||
GLint srcRow = row / hScale;
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth,
|
||||
srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
GLint col;
|
||||
for (col = 0; col < dstWidth; col++) {
|
||||
GLint col4 = (col / wScale) * 4;
|
||||
@@ -595,11 +613,12 @@ _mesa_convert_teximage(MesaIntTexFormat dstFormat,
|
||||
if (srcFormat == GL_BGRA && srcType == GL_UNSIGNED_INT_8_8_8_8_REV){
|
||||
/* special, optimized case */
|
||||
if (wScale == 1 && hScale == 1) {
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, 0, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth, srcHeight,
|
||||
srcFormat, srcType, 0, 0, 0);
|
||||
const GLint srcStride = _mesa_image_row_stride(packing,
|
||||
srcWidth, srcFormat, srcType);
|
||||
GLuint *dst = dstImage;
|
||||
GLuint *dst = (GLuint *) dstImage;
|
||||
GLint row;
|
||||
for (row = 0; row < dstHeight; row++) {
|
||||
MEMCPY(dst, src, dstWidth * sizeof(GLuint));
|
||||
@@ -609,12 +628,13 @@ _mesa_convert_teximage(MesaIntTexFormat dstFormat,
|
||||
}
|
||||
else {
|
||||
/* must rescale image */
|
||||
GLuint *dst = dstImage;
|
||||
GLuint *dst = (GLuint *) dstImage;
|
||||
GLint row;
|
||||
for (row = 0; row < dstHeight; row++) {
|
||||
GLint srcRow = row / hScale;
|
||||
const GLuint *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
const GLuint *src = (const GLuint *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth,
|
||||
srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
GLint col;
|
||||
for (col = 0; col < dstWidth; col++) {
|
||||
dst[col] = src[col / wScale];
|
||||
@@ -626,11 +646,12 @@ _mesa_convert_teximage(MesaIntTexFormat dstFormat,
|
||||
else if (srcFormat == GL_RGBA && srcType == GL_UNSIGNED_BYTE) {
|
||||
/* general case */
|
||||
if (wScale == 1 && hScale == 1) {
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, 0, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth, srcHeight,
|
||||
srcFormat, srcType, 0, 0, 0);
|
||||
const GLint srcStride = _mesa_image_row_stride(packing,
|
||||
srcWidth, srcFormat, srcType);
|
||||
GLuint *dst = dstImage;
|
||||
GLuint *dst = (GLuint *) dstImage;
|
||||
GLint row;
|
||||
for (row = 0; row < dstHeight; row++) {
|
||||
GLint col, col4;
|
||||
@@ -647,12 +668,13 @@ _mesa_convert_teximage(MesaIntTexFormat dstFormat,
|
||||
}
|
||||
else {
|
||||
/* must rescale image */
|
||||
GLuint *dst = dstImage;
|
||||
GLuint *dst = (GLuint *) dstImage;
|
||||
GLint row;
|
||||
for (row = 0; row < dstHeight; row++) {
|
||||
GLint srcRow = row / hScale;
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth,
|
||||
srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
GLint col;
|
||||
for (col = 0; col < dstWidth; col++) {
|
||||
GLint col4 = (col / wScale) * 4;
|
||||
@@ -669,11 +691,12 @@ _mesa_convert_teximage(MesaIntTexFormat dstFormat,
|
||||
else if (srcFormat == GL_RGB && srcType == GL_UNSIGNED_BYTE) {
|
||||
/* general case */
|
||||
if (wScale == 1 && hScale == 1) {
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, 0, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth, srcHeight,
|
||||
srcFormat, srcType, 0, 0, 0);
|
||||
const GLint srcStride = _mesa_image_row_stride(packing,
|
||||
srcWidth, srcFormat, srcType);
|
||||
GLuint *dst = dstImage;
|
||||
GLuint *dst = (GLuint *) dstImage;
|
||||
GLint row;
|
||||
for (row = 0; row < dstHeight; row++) {
|
||||
GLint col, col3;
|
||||
@@ -690,12 +713,13 @@ _mesa_convert_teximage(MesaIntTexFormat dstFormat,
|
||||
}
|
||||
else {
|
||||
/* must rescale image */
|
||||
GLuint *dst = dstImage;
|
||||
GLuint *dst = (GLuint *) dstImage;
|
||||
GLint row;
|
||||
for (row = 0; row < dstHeight; row++) {
|
||||
GLint srcRow = row / hScale;
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth,
|
||||
srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
GLint col;
|
||||
for (col = 0; col < dstWidth; col++) {
|
||||
GLint col3 = (col / wScale) * 3;
|
||||
@@ -715,7 +739,7 @@ _mesa_convert_teximage(MesaIntTexFormat dstFormat,
|
||||
}
|
||||
if (dstFormat == MESA_FF_R8_G8_B8) {
|
||||
/* set alpha bytes to 0xff */
|
||||
GLuint i;
|
||||
GLint i;
|
||||
GLubyte *dst = (GLubyte *) dstImage;
|
||||
for (i = 0; i < dstWidth * dstHeight; i++) {
|
||||
dst[i * 4 + 3] = 0xff;
|
||||
@@ -736,11 +760,11 @@ _mesa_convert_teximage(MesaIntTexFormat dstFormat,
|
||||
* Replace a subregion of a texture image with new data.
|
||||
* Input:
|
||||
* dstFormat - destination image format
|
||||
* dstXoffset, dstYoffset - destination for new subregion
|
||||
* dstWidth, dstHeight - total size of dest image
|
||||
* dstXoffset, dstYoffset - destination for new subregion (in texels)
|
||||
* dstWidth, dstHeight - total size of dest image (in texels)
|
||||
* dstImage - pointer to dest image
|
||||
* dstRowStride - bytes to jump between image rows
|
||||
* width, height - size of region to copy/replace
|
||||
* dstRowStride - bytes to jump between image rows (in bytes)
|
||||
* width, height - size of region to copy/replace (in texels)
|
||||
* srcWidth, srcHeight - size of the corresponding gl_texture_image
|
||||
* srcFormat, srcType - source image format and datatype
|
||||
* srcImage - source image
|
||||
@@ -796,17 +820,24 @@ _mesa_convert_texsubimage(MesaIntTexFormat dstFormat,
|
||||
/* store as 8-bit texels */
|
||||
if (wScale == 1 && hScale == 1) {
|
||||
/* no scaling needed - fast case */
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, 0, 0);
|
||||
const GLint srcStride = _mesa_image_row_stride(packing,
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth, srcHeight,
|
||||
srcFormat, srcType, 0, 0, 0);
|
||||
const GLint srcRowStride = _mesa_image_row_stride(packing,
|
||||
width, srcFormat, srcType);
|
||||
GLubyte *dst = (GLubyte *) dstImage
|
||||
+ dstYoffset * dstRowStride + dstXoffset;
|
||||
const GLint rowSize = width * sizeof(GLubyte);
|
||||
GLint row;
|
||||
for (row = 0; row < height; row++) {
|
||||
MEMCPY(dst, src, width * sizeof(GLubyte));
|
||||
dst += dstRowStride;
|
||||
src += srcStride;
|
||||
if (dstRowStride == srcRowStride && dstRowStride == rowSize) {
|
||||
MEMCPY(dst, src, rowSize * height);
|
||||
}
|
||||
else {
|
||||
for (row = 0; row < height; row++) {
|
||||
MEMCPY(dst, src, rowSize);
|
||||
dst += dstRowStride;
|
||||
src += srcRowStride;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -816,8 +847,9 @@ _mesa_convert_texsubimage(MesaIntTexFormat dstFormat,
|
||||
GLint row;
|
||||
for (row = 0; row < height; row++) {
|
||||
GLint srcRow = row / hScale;
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth,
|
||||
srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
GLint col;
|
||||
for (col = 0; col < width; col++) {
|
||||
dst[col] = src[col / wScale];
|
||||
@@ -835,8 +867,9 @@ _mesa_convert_texsubimage(MesaIntTexFormat dstFormat,
|
||||
else {
|
||||
/* store as 16-bit texels */
|
||||
if (wScale == 1 && hScale == 1) {
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, 0, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth, srcHeight,
|
||||
srcFormat, srcType, 0, 0, 0);
|
||||
const GLint srcStride = _mesa_image_row_stride(packing,
|
||||
width, srcFormat, srcType);
|
||||
GLushort *dst = (GLushort *) ((GLubyte *) dstImage
|
||||
@@ -859,8 +892,9 @@ _mesa_convert_texsubimage(MesaIntTexFormat dstFormat,
|
||||
GLint row, col;
|
||||
for (row = 0; row < height; row++) {
|
||||
GLint srcRow = row / hScale;
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth,
|
||||
srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
const GLint srcStride = _mesa_image_row_stride(packing,
|
||||
width, srcFormat, srcType);
|
||||
for (col = 0; col < width; col++) {
|
||||
@@ -880,8 +914,9 @@ _mesa_convert_texsubimage(MesaIntTexFormat dstFormat,
|
||||
if (srcFormat == GL_RGB && srcType == GL_UNSIGNED_SHORT_5_6_5) {
|
||||
/* special, optimized case */
|
||||
if (wScale == 1 && hScale == 1) {
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, 0, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth, srcHeight,
|
||||
srcFormat, srcType, 0, 0, 0);
|
||||
const GLint srcStride = _mesa_image_row_stride(packing,
|
||||
width, srcFormat, srcType);
|
||||
GLushort *dst = (GLushort *) ((GLubyte *) dstImage
|
||||
@@ -900,8 +935,9 @@ _mesa_convert_texsubimage(MesaIntTexFormat dstFormat,
|
||||
GLint row;
|
||||
for (row = 0; row < height; row++) {
|
||||
GLint srcRow = row / hScale;
|
||||
const GLushort *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
const GLushort *src = (const GLushort *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth,
|
||||
srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
GLint col;
|
||||
for (col = 0; col < width; col++) {
|
||||
dst[col] = src[col / wScale];
|
||||
@@ -913,8 +949,9 @@ _mesa_convert_texsubimage(MesaIntTexFormat dstFormat,
|
||||
else if (srcFormat == GL_RGB && srcType == GL_UNSIGNED_BYTE) {
|
||||
/* general case */
|
||||
if (wScale == 1 && hScale == 1) {
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, 0, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth, srcHeight,
|
||||
srcFormat, srcType, 0, 0, 0);
|
||||
const GLint srcStride = _mesa_image_row_stride(packing,
|
||||
width, srcFormat, srcType);
|
||||
GLushort *dst = (GLushort *) ((GLubyte *) dstImage
|
||||
@@ -941,8 +978,9 @@ _mesa_convert_texsubimage(MesaIntTexFormat dstFormat,
|
||||
GLint row;
|
||||
for (row = 0; row < height; row++) {
|
||||
GLint srcRow = row / hScale;
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth,
|
||||
srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
GLint col;
|
||||
for (col = 0; col < width; col++) {
|
||||
GLint col3 = (col / wScale) * 3;
|
||||
@@ -960,8 +998,9 @@ _mesa_convert_texsubimage(MesaIntTexFormat dstFormat,
|
||||
else if (srcFormat == GL_RGBA && srcType == GL_UNSIGNED_BYTE) {
|
||||
/* general case (used by Quake3) */
|
||||
if (wScale == 1 && hScale == 1) {
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, 0, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth, srcHeight,
|
||||
srcFormat, srcType, 0, 0, 0);
|
||||
const GLint srcStride = _mesa_image_row_stride(packing,
|
||||
width, srcFormat, srcType);
|
||||
GLushort *dst = (GLushort *) ((GLubyte *) dstImage
|
||||
@@ -988,8 +1027,9 @@ _mesa_convert_texsubimage(MesaIntTexFormat dstFormat,
|
||||
GLint row;
|
||||
for (row = 0; row < height; row++) {
|
||||
GLint srcRow = row / hScale;
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth,
|
||||
srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
GLint col;
|
||||
for (col = 0; col < width; col++) {
|
||||
GLint col4 = (col / wScale) * 4;
|
||||
@@ -1015,8 +1055,9 @@ _mesa_convert_texsubimage(MesaIntTexFormat dstFormat,
|
||||
if (srcFormat == GL_BGRA && srcType == GL_UNSIGNED_SHORT_4_4_4_4_REV){
|
||||
/* special, optimized case */
|
||||
if (wScale == 1 && hScale == 1) {
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, 0, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth, srcHeight,
|
||||
srcFormat, srcType, 0, 0, 0);
|
||||
const GLint srcStride = _mesa_image_row_stride(packing,
|
||||
width, srcFormat, srcType);
|
||||
GLushort *dst = (GLushort *) ((GLubyte *) dstImage
|
||||
@@ -1035,8 +1076,9 @@ _mesa_convert_texsubimage(MesaIntTexFormat dstFormat,
|
||||
GLint row;
|
||||
for (row = 0; row < height; row++) {
|
||||
GLint srcRow = row / hScale;
|
||||
const GLushort *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
const GLushort *src = (const GLushort *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth,
|
||||
srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
GLint col;
|
||||
for (col = 0; col < width; col++) {
|
||||
dst[col] = src[col / wScale];
|
||||
@@ -1048,8 +1090,9 @@ _mesa_convert_texsubimage(MesaIntTexFormat dstFormat,
|
||||
else if (srcFormat == GL_RGBA && srcType == GL_UNSIGNED_BYTE) {
|
||||
/* general case */
|
||||
if (wScale == 1 && hScale == 1) {
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, 0, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth, srcHeight,
|
||||
srcFormat, srcType, 0, 0, 0);
|
||||
const GLint srcStride = _mesa_image_row_stride(packing,
|
||||
width, srcFormat, srcType);
|
||||
GLushort *dst = (GLushort *) ((GLubyte *) dstImage
|
||||
@@ -1078,8 +1121,9 @@ _mesa_convert_texsubimage(MesaIntTexFormat dstFormat,
|
||||
GLint row;
|
||||
for (row = 0; row < height; row++) {
|
||||
GLint srcRow = row / hScale;
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth,
|
||||
srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
GLint col;
|
||||
for (col = 0; col < width; col++) {
|
||||
GLint col4 = (col / wScale) * 4;
|
||||
@@ -1107,8 +1151,9 @@ _mesa_convert_texsubimage(MesaIntTexFormat dstFormat,
|
||||
if (srcFormat == GL_BGRA && srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV){
|
||||
/* special, optimized case */
|
||||
if (wScale == 1 && hScale == 1) {
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, 0, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth, srcHeight,
|
||||
srcFormat, srcType, 0, 0, 0);
|
||||
const GLint srcStride = _mesa_image_row_stride(packing,
|
||||
width, srcFormat, srcType);
|
||||
GLushort *dst = (GLushort *) ((GLubyte *) dstImage
|
||||
@@ -1127,8 +1172,9 @@ _mesa_convert_texsubimage(MesaIntTexFormat dstFormat,
|
||||
GLint row;
|
||||
for (row = 0; row < height; row++) {
|
||||
GLint srcRow = row / hScale;
|
||||
const GLushort *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
const GLushort *src = (const GLushort *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth,
|
||||
srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
GLint col;
|
||||
for (col = 0; col < width; col++) {
|
||||
dst[col] = src[col / wScale];
|
||||
@@ -1140,8 +1186,9 @@ _mesa_convert_texsubimage(MesaIntTexFormat dstFormat,
|
||||
else if (srcFormat == GL_RGBA && srcType == GL_UNSIGNED_BYTE) {
|
||||
/* general case */
|
||||
if (wScale == 1 && hScale == 1) {
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, 0, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth, srcHeight,
|
||||
srcFormat, srcType, 0, 0, 0);
|
||||
const GLint srcStride = _mesa_image_row_stride(packing,
|
||||
width, srcFormat, srcType);
|
||||
GLushort *dst = (GLushort *) ((GLubyte *) dstImage
|
||||
@@ -1170,8 +1217,9 @@ _mesa_convert_texsubimage(MesaIntTexFormat dstFormat,
|
||||
GLint row;
|
||||
for (row = 0; row < height; row++) {
|
||||
GLint srcRow = row / hScale;
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth,
|
||||
srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
GLint col;
|
||||
for (col = 0; col < width; col++) {
|
||||
GLint col4 = (col / wScale) * 4;
|
||||
@@ -1197,11 +1245,12 @@ _mesa_convert_texsubimage(MesaIntTexFormat dstFormat,
|
||||
case MESA_A8_R8_G8_B8:
|
||||
case MESA_FF_R8_G8_B8:
|
||||
/* 32-bit texels */
|
||||
if (srcFormat == GL_BGRA && srcType == GL_UNSIGNED_INT_8_8_8_8_REV){
|
||||
if (srcFormat == GL_BGRA && srcType == GL_UNSIGNED_INT_8_8_8_8_REV) {
|
||||
/* special, optimized case */
|
||||
if (wScale == 1 && hScale == 1) {
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, 0, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth, srcHeight,
|
||||
srcFormat, srcType, 0, 0, 0);
|
||||
const GLint srcStride = _mesa_image_row_stride(packing,
|
||||
width, srcFormat, srcType);
|
||||
GLuint *dst = (GLuint *) ((GLubyte *) dstImage
|
||||
@@ -1220,8 +1269,9 @@ _mesa_convert_texsubimage(MesaIntTexFormat dstFormat,
|
||||
GLint row;
|
||||
for (row = 0; row < height; row++) {
|
||||
GLint srcRow = row / hScale;
|
||||
const GLuint *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
const GLuint *src = (const GLuint *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth,
|
||||
srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
GLint col;
|
||||
for (col = 0; col < width; col++) {
|
||||
dst[col] = src[col / wScale];
|
||||
@@ -1229,12 +1279,27 @@ _mesa_convert_texsubimage(MesaIntTexFormat dstFormat,
|
||||
dst = (GLuint *) ((GLubyte *) dst + dstRowStride);
|
||||
}
|
||||
}
|
||||
if (dstFormat == MESA_FF_R8_G8_B8) {
|
||||
/* set alpha bytes to 0xff */
|
||||
GLint row, col;
|
||||
GLubyte *dst = (GLubyte *) dstImage
|
||||
+ dstYoffset * dstRowStride + dstXoffset * 4;
|
||||
assert(wScale == 1 && hScale == 1); /* XXX not done */
|
||||
for (row = 0; row < height; row++) {
|
||||
for (col = 0; col < width; col++) {
|
||||
dst[col * 4 + 3] = 0xff;
|
||||
}
|
||||
dst = dst + dstRowStride;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (srcFormat == GL_RGBA && srcType == GL_UNSIGNED_BYTE) {
|
||||
/* general case */
|
||||
const GLubyte aMask = (dstFormat==MESA_FF_R8_G8_B8) ? 0xff : 0x00;
|
||||
if (wScale == 1 && hScale == 1) {
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, 0, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth, srcHeight,
|
||||
srcFormat, srcType, 0, 0, 0);
|
||||
const GLint srcStride = _mesa_image_row_stride(packing,
|
||||
width, srcFormat, srcType);
|
||||
GLuint *dst = (GLuint *) ((GLubyte *) dstImage
|
||||
@@ -1246,7 +1311,7 @@ _mesa_convert_texsubimage(MesaIntTexFormat dstFormat,
|
||||
GLubyte r = src[col4 + 0];
|
||||
GLubyte g = src[col4 + 1];
|
||||
GLubyte b = src[col4 + 2];
|
||||
GLubyte a = src[col4 + 3];
|
||||
GLubyte a = src[col4 + 3] | aMask;
|
||||
dst[col] = (a << 24) | (r << 16) | (g << 8) | b;
|
||||
}
|
||||
src += srcStride;
|
||||
@@ -1260,15 +1325,16 @@ _mesa_convert_texsubimage(MesaIntTexFormat dstFormat,
|
||||
GLint row;
|
||||
for (row = 0; row < height; row++) {
|
||||
GLint srcRow = row / hScale;
|
||||
const GLubyte *src = _mesa_image_address(packing, srcImage,
|
||||
srcWidth, srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
const GLubyte *src = (const GLubyte *)
|
||||
_mesa_image_address(packing, srcImage, srcWidth,
|
||||
srcHeight, srcFormat, srcType, 0, srcRow, 0);
|
||||
GLint col;
|
||||
for (col = 0; col < width; col++) {
|
||||
GLint col4 = (col / wScale) * 4;
|
||||
GLubyte r = src[col4 + 0];
|
||||
GLubyte g = src[col4 + 1];
|
||||
GLubyte b = src[col4 + 2];
|
||||
GLubyte a = src[col4 + 3];
|
||||
GLubyte a = src[col4 + 3] | aMask;
|
||||
dst[col] = (a << 24) | (r << 16) | (g << 8) | b;
|
||||
}
|
||||
dst = (GLuint *) ((GLubyte *) dst + dstRowStride);
|
||||
@@ -1279,18 +1345,6 @@ _mesa_convert_texsubimage(MesaIntTexFormat dstFormat,
|
||||
/* can't handle this source format/type combination */
|
||||
return GL_FALSE;
|
||||
}
|
||||
if (dstFormat == MESA_FF_R8_G8_B8) {
|
||||
/* set alpha bytes to 0xff */
|
||||
GLint row, col;
|
||||
GLubyte *dst = (GLubyte *) dstImage
|
||||
+ dstYoffset * dstRowStride + dstXoffset;
|
||||
for (row = 0; row < height; row++) {
|
||||
for (col = 0; col < width; col++) {
|
||||
dst[col * 4 + 3] = 0xff;
|
||||
}
|
||||
dst = dst + dstRowStride;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,3 @@
|
||||
/* $Id: varray.h,v 1.7 2000/06/12 15:30:52 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -139,4 +138,9 @@ extern void gl_exec_array_elements( GLcontext *ctx,
|
||||
extern void gl_update_client_state( GLcontext *ctx );
|
||||
|
||||
|
||||
#ifdef VAO
|
||||
struct gl_array_object *
|
||||
_mesa_alloc_vertex_array_object(GLcontext *ctx, GLuint name);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: 3dnow.c,v 1.5.4.3 2000/10/22 23:10:51 gareth Exp $ */
|
||||
/* $Id: 3dnow.c,v 1.5.4.4 2000/11/30 02:44:22 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
#include "glheader.h"
|
||||
#include "context.h"
|
||||
#include "shade.h"
|
||||
#include "types.h"
|
||||
#include "vertices.h"
|
||||
#include "xform.h"
|
||||
@@ -171,6 +172,18 @@ void gl_init_3dnow_transform_asm( void )
|
||||
#endif
|
||||
}
|
||||
|
||||
void gl_init_3dnow_shade_asm( void )
|
||||
{
|
||||
#ifdef USE_3DNOW_ASM
|
||||
/* When the time comes, initialize optimized lighting here.
|
||||
*/
|
||||
|
||||
#if 0
|
||||
gl_test_all_shade_functions( "3DNow!" );
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void gl_init_3dnow_vertex_asm( void )
|
||||
{
|
||||
#ifdef USE_3DNOW_ASM
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: 3dnow.h,v 1.1.1.1.6.1 2000/10/22 23:10:51 gareth Exp $ */
|
||||
/* $Id: 3dnow.h,v 1.1.1.1.6.2 2000/11/30 02:44:22 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -32,9 +32,8 @@
|
||||
#ifndef __3DNOW_H__
|
||||
#define __3DNOW_H__
|
||||
|
||||
#include "xform.h"
|
||||
|
||||
void gl_init_3dnow_transform_asm( void );
|
||||
void gl_init_3dnow_shade_asm( void );
|
||||
void gl_init_3dnow_vertex_asm( void );
|
||||
|
||||
#endif
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: common_x86.c,v 1.6.4.2 2000/10/22 23:10:51 gareth Exp $ */
|
||||
/* $Id: common_x86.c,v 1.6.4.6 2000/12/07 02:36:07 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -36,7 +36,11 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#if defined(USE_KATMAI_ASM) && defined(__linux__) && defined(_POSIX_SOURCE)
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
#include "context.h"
|
||||
#include "common_x86_asm.h"
|
||||
|
||||
|
||||
@@ -49,11 +53,176 @@ extern int gl_identify_x86_cpu_features( void );
|
||||
|
||||
static void message( const char *msg )
|
||||
{
|
||||
GLboolean debug;
|
||||
#ifdef DEBUG
|
||||
debug = GL_TRUE;
|
||||
#else
|
||||
if ( getenv( "MESA_DEBUG" ) ) {
|
||||
fprintf( stderr, "%s\n", msg );
|
||||
debug = GL_TRUE;
|
||||
} else {
|
||||
debug = GL_FALSE;
|
||||
}
|
||||
#endif
|
||||
if ( debug ) {
|
||||
fprintf( stderr, "%s", msg );
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(USE_KATMAI_ASM)
|
||||
/*
|
||||
* We must verify that the Streaming SIMD Extensions are truly supported
|
||||
* on this processor before we go ahead and hook out the optimized code.
|
||||
* Unfortunately, the CPUID bit isn't enough, as the OS must set the
|
||||
* OSFXSR bit in CR4 if it supports the extended FPU save and restore
|
||||
* required to use SSE. Unfortunately, we can't just go ahead and read
|
||||
* this register, as only the kernel can do that. Similarly, we must
|
||||
* verify that the OSXMMEXCPT bit in CR4 has been set by the OS,
|
||||
* signifying that it supports unmasked SIMD FPU exceptions. If we take
|
||||
* an unmasked exception and the OS doesn't correctly support them, the
|
||||
* best we'll get is a SIGILL and the worst we'll get is an infinite
|
||||
* loop in the signal delivery from the kernel as we can't interact with
|
||||
* the SIMD FPU state to clear the exception bits. Either way, this is
|
||||
* not good.
|
||||
*/
|
||||
|
||||
extern void gl_test_os_katmai_support( void );
|
||||
extern void gl_test_os_katmai_exception_support( void );
|
||||
|
||||
#if defined(__linux__) && defined(_POSIX_SOURCE)
|
||||
static void sigill_handler( int signal, struct sigcontext sc )
|
||||
{
|
||||
message( "SIGILL, " );
|
||||
|
||||
/* Both the "xorps %%xmm0,%%xmm0" and "divps %xmm0,%%xmm1"
|
||||
* instructions are 3 bytes long. We must increment the instruction
|
||||
* pointer manually to avoid repeated execution of the offending
|
||||
* instruction.
|
||||
*
|
||||
* If the SIGILL is caused by a divide-by-zero when unmasked
|
||||
* exceptions aren't supported, the SIMD FPU status and control
|
||||
* word will be restored at the end of the test, so we don't need
|
||||
* to worry about doing it here. Besides, we may not be able to...
|
||||
*/
|
||||
sc.eip += 3;
|
||||
|
||||
gl_x86_cpu_features &= ~(X86_FEATURE_XMM);
|
||||
}
|
||||
|
||||
static void sigfpe_handler( int signal, struct sigcontext sc )
|
||||
{
|
||||
message( "SIGFPE, " );
|
||||
|
||||
if ( sc.fpstate->magic != 0xffff ) {
|
||||
/* Our signal context has the extended FPU state, so reset the
|
||||
* divide-by-zero exception mask and clear the divide-by-zero
|
||||
* exception bit.
|
||||
*/
|
||||
sc.fpstate->mxcsr |= 0x00000200;
|
||||
sc.fpstate->mxcsr &= 0xfffffffb;
|
||||
} else {
|
||||
/* If we ever get here, we're completely hosed.
|
||||
*/
|
||||
message( "\n\n" );
|
||||
gl_problem( NULL, "SSE enabling test failed badly!" );
|
||||
}
|
||||
}
|
||||
#endif /* __linux__ && _POSIX_SOURCE */
|
||||
|
||||
/* If we're running on a processor that can do SSE, let's see if we
|
||||
* are allowed to or not. This will catch 2.4.0 or later kernels that
|
||||
* haven't been configured for a Pentium III but are running on one,
|
||||
* and RedHat patched 2.2 kernels that have broken exception handling
|
||||
* support for user space apps that do SSE.
|
||||
*
|
||||
* GH: Isn't this just awful?
|
||||
*/
|
||||
static void check_os_katmai_support( void )
|
||||
{
|
||||
#if defined(__linux__)
|
||||
#if defined(_POSIX_SOURCE)
|
||||
struct sigaction saved_sigill;
|
||||
struct sigaction saved_sigfpe;
|
||||
|
||||
/* Save the original signal handlers.
|
||||
*/
|
||||
sigaction( SIGILL, NULL, &saved_sigill );
|
||||
sigaction( SIGFPE, NULL, &saved_sigfpe );
|
||||
|
||||
signal( SIGILL, (void (*)(int))sigill_handler );
|
||||
signal( SIGFPE, (void (*)(int))sigfpe_handler );
|
||||
|
||||
/* Emulate test for OSFXSR in CR4. The OS will set this bit if it
|
||||
* supports the extended FPU save and restore required for SSE. If
|
||||
* we execute an SSE instruction on a PIII and get a SIGILL, the OS
|
||||
* doesn't support Streaming SIMD Exceptions, even if the processor
|
||||
* does.
|
||||
*/
|
||||
if ( cpu_has_xmm ) {
|
||||
message( "Testing OS support for SSE... " );
|
||||
|
||||
gl_test_os_katmai_support();
|
||||
|
||||
if ( cpu_has_xmm ) {
|
||||
message( "yes.\n" );
|
||||
} else {
|
||||
message( "no!\n" );
|
||||
}
|
||||
}
|
||||
|
||||
/* Emulate test for OSXMMEXCPT in CR4. The OS will set this bit if
|
||||
* it supports unmasked SIMD FPU exceptions. If we unmask the
|
||||
* exceptions, do a SIMD divide-by-zero and get a SIGILL, the OS
|
||||
* doesn't support unmasked SIMD FPU exceptions. If we get a SIGFPE
|
||||
* as expected, we're okay but we need to clean up after it.
|
||||
*
|
||||
* Are we being too stringent in our requirement that the OS support
|
||||
* unmasked exceptions? Certain RedHat 2.2 kernels enable SSE by
|
||||
* setting CR4.OSFXSR but don't support unmasked exceptions. Win98
|
||||
* doesn't even support them. We at least know the user-space SSE
|
||||
* support is good in kernels that do support unmasked exceptions,
|
||||
* and therefore to be safe I'm going to leave this test in here.
|
||||
*/
|
||||
if ( cpu_has_xmm ) {
|
||||
message( "Testing OS support for SSE unmasked exceptions... " );
|
||||
|
||||
gl_test_os_katmai_exception_support();
|
||||
|
||||
if ( cpu_has_xmm ) {
|
||||
message( "yes.\n" );
|
||||
} else {
|
||||
message( "no!\n" );
|
||||
}
|
||||
}
|
||||
|
||||
/* Restore the original signal handlers.
|
||||
*/
|
||||
sigaction( SIGILL, &saved_sigill, NULL );
|
||||
sigaction( SIGFPE, &saved_sigfpe, NULL );
|
||||
|
||||
/* If we've gotten to here and the XMM CPUID bit is still set, we're
|
||||
* safe to go ahead and hook out the SSE code throughout Mesa.
|
||||
*/
|
||||
if ( cpu_has_xmm ) {
|
||||
message( "Tests of OS support for SSE passed.\n" );
|
||||
} else {
|
||||
message( "Tests of OS support for SSE failed!\n" );
|
||||
}
|
||||
#else
|
||||
/* We can't use POSIX signal handling to test the availability of
|
||||
* SSE, so we disable it by default.
|
||||
*/
|
||||
message( "Cannot test OS support for SSE, disabling to be safe.\n" );
|
||||
gl_x86_cpu_features &= ~(X86_FEATURE_XMM);
|
||||
#endif /* _POSIX_SOURCE */
|
||||
#else
|
||||
/* Do nothing on non-Linux platforms for now.
|
||||
*/
|
||||
message( "Not testing OS support for SSE, leaving enabled.\n" );
|
||||
#endif /* __linux__ */
|
||||
}
|
||||
|
||||
#endif /* USE_KATMAI_ASM */
|
||||
|
||||
|
||||
void gl_init_all_x86_transform_asm( void )
|
||||
{
|
||||
@@ -71,7 +240,7 @@ void gl_init_all_x86_transform_asm( void )
|
||||
#ifdef USE_MMX_ASM
|
||||
if ( cpu_has_mmx ) {
|
||||
if ( getenv( "MESA_NO_MMX" ) == 0 ) {
|
||||
message( "MMX cpu detected." );
|
||||
message( "MMX cpu detected.\n" );
|
||||
} else {
|
||||
gl_x86_cpu_features &= ~(X86_FEATURE_MMX);
|
||||
}
|
||||
@@ -81,7 +250,7 @@ void gl_init_all_x86_transform_asm( void )
|
||||
#ifdef USE_3DNOW_ASM
|
||||
if ( cpu_has_3dnow ) {
|
||||
if ( getenv( "MESA_NO_3DNOW" ) == 0 ) {
|
||||
message( "3Dnow cpu detected." );
|
||||
message( "3DNow! cpu detected.\n" );
|
||||
gl_init_3dnow_transform_asm();
|
||||
} else {
|
||||
gl_x86_cpu_features &= ~(X86_FEATURE_3DNOW);
|
||||
@@ -90,9 +259,12 @@ void gl_init_all_x86_transform_asm( void )
|
||||
#endif
|
||||
|
||||
#ifdef USE_KATMAI_ASM
|
||||
if ( cpu_has_xmm && getenv( "MESA_FORCE_KATMAI" ) == 0 ) {
|
||||
check_os_katmai_support();
|
||||
}
|
||||
if ( cpu_has_xmm ) {
|
||||
if ( getenv( "MESA_NO_KATMAI" ) == 0 ) {
|
||||
message( "Katmai cpu detected." );
|
||||
message( "Katmai cpu detected.\n" );
|
||||
gl_init_katmai_transform_asm();
|
||||
} else {
|
||||
gl_x86_cpu_features &= ~(X86_FEATURE_XMM);
|
||||
@@ -105,6 +277,21 @@ void gl_init_all_x86_transform_asm( void )
|
||||
/* Note: the above function must be called before this one, so that
|
||||
* gl_x86_cpu_features gets correctly initialized.
|
||||
*/
|
||||
void gl_init_all_x86_shade_asm( void )
|
||||
{
|
||||
#ifdef USE_X86_ASM
|
||||
if ( gl_x86_cpu_features ) {
|
||||
/* Nothing here yet... */
|
||||
}
|
||||
|
||||
#ifdef USE_3DNOW_ASM
|
||||
if ( cpu_has_3dnow && getenv( "MESA_NO_3DNOW" ) == 0 ) {
|
||||
gl_init_3dnow_shade_asm();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void gl_init_all_x86_vertex_asm( void )
|
||||
{
|
||||
#ifdef USE_X86_ASM
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: common_x86_asm.S,v 1.1.2.1 2000/10/22 23:10:51 gareth Exp $ */
|
||||
/* $Id: common_x86_asm.S,v 1.1.2.3 2001/02/09 23:20:27 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -33,6 +33,7 @@
|
||||
*
|
||||
* Cleaned up and simplified by Gareth Hughes <gareth@valinux.com>
|
||||
*/
|
||||
/* $XFree86: xc/extras/Mesa/src/X86/common_x86_asm.S,v 1.5 2000/12/12 23:52:37 dawes Exp $ */
|
||||
|
||||
#include "assyntax.h"
|
||||
#include "common_x86_features.h"
|
||||
@@ -55,8 +56,13 @@
|
||||
|
||||
/* We might want to print out some useful messages.
|
||||
*/
|
||||
LLBL( found_intel ): STRING( "Genuine Intel processor found\n\0" )
|
||||
LLBL( found_amd ): STRING( "Authentic AMD processor found\n\0" )
|
||||
GLNAME( found_intel ): STRING( "Genuine Intel processor found\n\0" )
|
||||
GLNAME( found_amd ): STRING( "Authentic AMD processor found\n\0" )
|
||||
|
||||
#ifdef USE_KATMAI_ASM
|
||||
GLNAME( katmai_test_dummy ):
|
||||
D_LONG 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000
|
||||
#endif
|
||||
|
||||
|
||||
SEG_TEXT
|
||||
@@ -150,3 +156,56 @@ LLBL ( cpuid_done ):
|
||||
|
||||
POP_L ( EBX )
|
||||
RET
|
||||
|
||||
|
||||
#ifdef USE_KATMAI_ASM
|
||||
/* Execute an SSE instruction to see if the operating system correctly
|
||||
* supports SSE. A signal handler for SIGILL should have been set
|
||||
* before calling this function, otherwise this could kill the client
|
||||
* application.
|
||||
*/
|
||||
ALIGNTEXT4
|
||||
GLOBL GLNAME( gl_test_os_katmai_support )
|
||||
GLNAME( gl_test_os_katmai_support ):
|
||||
|
||||
XORPS ( XMM0, XMM0 )
|
||||
|
||||
RET
|
||||
|
||||
|
||||
/* Perform an SSE divide-by-zero to see if the operating system
|
||||
* correctly supports unmasked SIMD FPU exceptions. Signal handlers for
|
||||
* SIGILL and SIGFPE should have been set before calling this function,
|
||||
* otherwise this could kill the client application.
|
||||
*/
|
||||
ALIGNTEXT4
|
||||
GLOBL GLNAME( gl_test_os_katmai_exception_support )
|
||||
GLNAME( gl_test_os_katmai_exception_support ):
|
||||
|
||||
PUSH_L ( EBP )
|
||||
MOV_L ( ESP, EBP )
|
||||
SUB_L ( CONST( 8 ), ESP )
|
||||
|
||||
/* Save the original MXCSR register value.
|
||||
*/
|
||||
STMXCSR ( REGOFF( -4, EBP ) )
|
||||
|
||||
/* Unmask the divide-by-zero exception and perform one.
|
||||
*/
|
||||
STMXCSR ( REGOFF( -8, EBP ) )
|
||||
AND_L ( CONST( 0xfffffdff ), REGOFF( -8, EBP ) )
|
||||
LDMXCSR ( REGOFF( -8, EBP ) )
|
||||
|
||||
XORPS ( XMM0, XMM0 )
|
||||
MOVUPS ( GLNAME( katmai_test_dummy ), XMM1 )
|
||||
|
||||
DIVPS ( XMM0, XMM1 )
|
||||
|
||||
/* Restore the original MXCSR register value.
|
||||
*/
|
||||
LDMXCSR ( REGOFF( -4, EBP ) )
|
||||
|
||||
LEAVE
|
||||
RET
|
||||
|
||||
#endif
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: common_x86_asm.h,v 1.1.2.1 2000/10/22 23:10:51 gareth Exp $ */
|
||||
/* $Id: common_x86_asm.h,v 1.1.2.2 2000/11/30 02:44:22 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -58,6 +58,7 @@
|
||||
extern int gl_x86_cpu_features;
|
||||
|
||||
extern void gl_init_all_x86_transform_asm( void );
|
||||
extern void gl_init_all_x86_shade_asm( void );
|
||||
extern void gl_init_all_x86_vertex_asm( void );
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user