From 4226eb1105a37e495fa59879d90969e2d2458ed4 Mon Sep 17 00:00:00 2001 From: jensowen Date: Tue, 9 Apr 2002 20:44:00 +0000 Subject: merged trunk into drmcommand-0-0-1-branch --- xc/extras/Mesa/docs/RELNOTES-4.0 | 1 - xc/extras/Mesa/docs/RELNOTES-4.0.1 | 1 - xc/extras/Mesa/docs/RELNOTES-4.0.2 | 3 +- xc/extras/Mesa/docs/VERSIONS | 13 +- xc/extras/Mesa/include/GL/gl.h | 6 +- xc/extras/Mesa/include/GL/glext.h | 669 ++++++++++++++++++---------- xc/extras/Mesa/include/GL/glxext.h | 53 ++- xc/extras/Mesa/src/OSmesa/osmesa.c | 6 + xc/extras/Mesa/src/X/xm_dd.c | 2 - xc/extras/Mesa/src/X86/assyntax.h | 2 +- xc/extras/Mesa/src/X86/glapi_x86.S | 2 +- xc/extras/Mesa/src/api_validate.c | 11 +- xc/extras/Mesa/src/attrib.c | 33 +- xc/extras/Mesa/src/context.c | 14 +- xc/extras/Mesa/src/convolve.c | 14 +- xc/extras/Mesa/src/enable.c | 7 +- xc/extras/Mesa/src/image.c | 152 +++++-- xc/extras/Mesa/src/math/m_matrix.c | 11 +- xc/extras/Mesa/src/mem.h | 23 +- xc/extras/Mesa/src/swrast/s_accum.c | 5 +- xc/extras/Mesa/src/swrast/s_alphabuf.c | 16 +- xc/extras/Mesa/src/swrast/s_depth.c | 4 +- xc/extras/Mesa/src/swrast/s_linetemp.h | 8 +- xc/extras/Mesa/src/swrast/s_stencil.c | 4 +- xc/extras/Mesa/src/teximage.c | 22 +- xc/extras/Mesa/src/texstore.c | 14 +- xc/extras/Mesa/src/varray.c | 18 +- xc/lib/GL/glx/glxcmds.c | 3 + xc/lib/GL/mesa/src/drv/gamma/gamma_inithw.c | 56 +-- xc/lib/GL/mesa/src/drv/gamma/gamma_vb.c | 176 +++++--- xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.c | 4 +- 31 files changed, 877 insertions(+), 476 deletions(-) diff --git a/xc/extras/Mesa/docs/RELNOTES-4.0 b/xc/extras/Mesa/docs/RELNOTES-4.0 index aa7e6e139..2f729db15 100644 --- a/xc/extras/Mesa/docs/RELNOTES-4.0 +++ b/xc/extras/Mesa/docs/RELNOTES-4.0 @@ -160,4 +160,3 @@ See the VERSIONS file for more details about bug fixes, etc. in Mesa 4.0. ---------------------------------------------------------------------- -$Id: RELNOTES-4.0,v 1.3 2002/02/21 11:42:58 alanh Exp $ diff --git a/xc/extras/Mesa/docs/RELNOTES-4.0.1 b/xc/extras/Mesa/docs/RELNOTES-4.0.1 index eb1f9a836..e84df6bf8 100644 --- a/xc/extras/Mesa/docs/RELNOTES-4.0.1 +++ b/xc/extras/Mesa/docs/RELNOTES-4.0.1 @@ -19,4 +19,3 @@ Mesa 4.0.1 only contains bug fixes since version 4.0. See the docs/VERSIONS file for the list of bug fixes. ---------------------------------------------------------------------- -$Id: RELNOTES-4.0.1,v 1.3 2002/02/21 11:42:58 alanh Exp $ diff --git a/xc/extras/Mesa/docs/RELNOTES-4.0.2 b/xc/extras/Mesa/docs/RELNOTES-4.0.2 index 2e6291594..7b0b58ee3 100644 --- a/xc/extras/Mesa/docs/RELNOTES-4.0.2 +++ b/xc/extras/Mesa/docs/RELNOTES-4.0.2 @@ -1,7 +1,7 @@ Mesa 4.0.2 release notes - March ??, 2002 + April 2, 2002 PLEASE READ!!!! @@ -47,4 +47,3 @@ D3D needs updating ---------------------------------------------------------------------- -$Id: RELNOTES-4.0.2,v 1.1 2002/03/16 16:52:53 brianp Exp $ diff --git a/xc/extras/Mesa/docs/VERSIONS b/xc/extras/Mesa/docs/VERSIONS index 87a65f2f4..7890beb74 100644 --- a/xc/extras/Mesa/docs/VERSIONS +++ b/xc/extras/Mesa/docs/VERSIONS @@ -1,4 +1,3 @@ -$Id: VERSIONS,v 1.5 2002/02/21 11:42:58 alanh Exp $ Mesa Version History @@ -926,10 +925,13 @@ Mesa Version History - fixed bug in normal length caching (ParaView lighting bug) - fixed separate_specular color bug found in Chimera (18 Dec 2001) -4.0.2 February ??, 2002 +4.0.2 April 2, 2002 New: - New DOS (DJGPP) driver written by Daniel Borca - New driver interface functions for TCL drivers (such as Radeon DRI) + - GL_RENDERER string returns "Mesa Offscreen16" or "Mesa Offscreen32" + if using deep color channels + - latest GL/glext.h and GL/glxext.h headers from SGI Bug fixes: - GL_BLEND with non-black texture env color wasn't always correct - GL_REPLACE with GL_RGB texture format wasn't always correct (alpha) @@ -941,3 +943,10 @@ Mesa Version History - Fixed 1-bit float->int conversion bug in glDrawPixels(GL_DEPTH_COMP) - glColorMask as sometimes effecting glXSwapBuffers() - fixed a potential bug in XMesaGarbageCollect() + - N threads rendering into one window didn't work reliably + - glCopyPixels didn't work for deep color channels + - improved 8 -> 16bit/channel texture image conversion (Gerk Huisma) + - glPopAttrib() didn't correctly restore user clip planes + - user clip planes failed for some perspective projections (Chromium) + Known bugs: + - mipmap LOD computation diff --git a/xc/extras/Mesa/include/GL/gl.h b/xc/extras/Mesa/include/GL/gl.h index 38b0180a9..500a2ef83 100644 --- a/xc/extras/Mesa/include/GL/gl.h +++ b/xc/extras/Mesa/include/GL/gl.h @@ -1,9 +1,9 @@ /* * Mesa 3-D graphics library - * Version: 4.0 + * Version: 4.0.2 * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -1911,8 +1911,6 @@ GLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] ); GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert ); -GLAPI void GLAPIENTRY glSamplePass( GLenum pass ); - /* * GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1) diff --git a/xc/extras/Mesa/include/GL/glext.h b/xc/extras/Mesa/include/GL/glext.h index 5dbdc1e5f..c4b4baa09 100644 --- a/xc/extras/Mesa/include/GL/glext.h +++ b/xc/extras/Mesa/include/GL/glext.h @@ -42,17 +42,16 @@ extern "C" { #ifndef APIENTRY #define APIENTRY #endif - #ifndef GLAPI #define GLAPI extern #endif - /*************************************************************/ /* Header file version number, required by OpenGL ABI for Linux */ -/* glext.h last updated 2001/09/26 */ -#define GL_GLEXT_VERSION 9 +/* glext.h last updated 2002/03/22 */ +/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */ +#define GL_GLEXT_VERSION 11 #ifndef GL_VERSION_1_2 #define GL_CONSTANT_COLOR 0x8001 @@ -465,6 +464,31 @@ extern "C" { #define GL_DOT3_RGBA_EXT 0x86AF #endif +#ifndef GL_ARB_texture_mirrored_repeat +#define GL_MIRRORED_REPEAT_ARB 0x8370 +#endif + +#ifndef GL_ARB_depth_texture +#define GL_DEPTH_COMPONENT16_ARB 0x81A5 +#define GL_DEPTH_COMPONENT24_ARB 0x81A6 +#define GL_DEPTH_COMPONENT32_ARB 0x81A7 +#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A +#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B +#endif + +#ifndef GL_ARB_shadow +#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C +#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D +#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E +#endif + +#ifndef GL_ARB_shadow_ambient +#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF +#endif + +#ifndef GL_ARB_window_pos +#endif + #ifndef GL_EXT_abgr #define GL_ABGR_EXT 0x8000 #endif @@ -1721,30 +1745,33 @@ extern "C" { #endif #ifndef GL_NV_texture_shader -#define GL_TEXTURE_SHADER_NV 0x86DE +#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C +#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D +#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E #define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9 +#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA +#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB +#define GL_DSDT_MAG_INTENSITY_NV 0x86DC +#define GL_SHADER_CONSISTENT_NV 0x86DD +#define GL_TEXTURE_SHADER_NV 0x86DE #define GL_SHADER_OPERATION_NV 0x86DF #define GL_CULL_MODES_NV 0x86E0 #define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1 -#define GL_OFFSET_TEXTURE_2D_MATRIX_NV 0x86E1 #define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2 -#define GL_OFFSET_TEXTURE_2D_SCALE_NV 0x86E2 #define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3 -#define GL_OFFSET_TEXTURE_2D_BIAS_NV 0x86E3 +#define GL_OFFSET_TEXTURE_2D_MATRIX_NV GL_OFFSET_TEXTURE_MATRIX_NV +#define GL_OFFSET_TEXTURE_2D_SCALE_NV GL_OFFSET_TEXTURE_SCALE_NV +#define GL_OFFSET_TEXTURE_2D_BIAS_NV GL_OFFSET_TEXTURE_BIAS_NV #define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4 #define GL_CONST_EYE_NV 0x86E5 -#define GL_SHADER_CONSISTENT_NV 0x86DD #define GL_PASS_THROUGH_NV 0x86E6 #define GL_CULL_FRAGMENT_NV 0x86E7 #define GL_OFFSET_TEXTURE_2D_NV 0x86E8 -#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C -#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D #define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9 #define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA #define GL_DOT_PRODUCT_NV 0x86EC #define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED #define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE -#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E #define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0 #define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1 #define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2 @@ -1753,8 +1780,9 @@ extern "C" { #define GL_DSDT_NV 0x86F5 #define GL_DSDT_MAG_NV 0x86F6 #define GL_DSDT_MAG_VIB_NV 0x86F7 -#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA -#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB +#define GL_HILO16_NV 0x86F8 +#define GL_SIGNED_HILO_NV 0x86F9 +#define GL_SIGNED_HILO16_NV 0x86FA #define GL_SIGNED_RGBA_NV 0x86FB #define GL_SIGNED_RGBA8_NV 0x86FC #define GL_SIGNED_RGB_NV 0x86FE @@ -1767,15 +1795,11 @@ extern "C" { #define GL_SIGNED_ALPHA8_NV 0x8706 #define GL_SIGNED_INTENSITY_NV 0x8707 #define GL_SIGNED_INTENSITY8_NV 0x8708 -#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C -#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D -#define GL_HILO16_NV 0x86F8 -#define GL_SIGNED_HILO_NV 0x86F9 -#define GL_SIGNED_HILO16_NV 0x86FA #define GL_DSDT8_NV 0x8709 #define GL_DSDT8_MAG8_NV 0x870A -#define GL_DSDT_MAG_INTENSITY_NV 0x86DC #define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B +#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C +#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D #define GL_HI_SCALE_NV 0x870E #define GL_LO_SCALE_NV 0x870F #define GL_DS_SCALE_NV 0x8710 @@ -1806,28 +1830,20 @@ extern "C" { #ifndef GL_NV_vertex_program #define GL_VERTEX_PROGRAM_NV 0x8620 -#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642 -#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643 #define GL_VERTEX_STATE_PROGRAM_NV 0x8621 #define GL_ATTRIB_ARRAY_SIZE_NV 0x8623 #define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624 #define GL_ATTRIB_ARRAY_TYPE_NV 0x8625 #define GL_CURRENT_ATTRIB_NV 0x8626 -#define GL_PROGRAM_PARAMETER_NV 0x8644 -#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645 -#define GL_PROGRAM_TARGET_NV 0x8646 #define GL_PROGRAM_LENGTH_NV 0x8627 -#define GL_PROGRAM_RESIDENT_NV 0x8647 #define GL_PROGRAM_STRING_NV 0x8628 -#define GL_TRACK_MATRIX_NV 0x8648 -#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649 +#define GL_MODELVIEW_PROJECTION_NV 0x8629 +#define GL_IDENTITY_NV 0x862A +#define GL_INVERSE_NV 0x862B +#define GL_TRANSPOSE_NV 0x862C +#define GL_INVERSE_TRANSPOSE_NV 0x862D #define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E #define GL_MAX_TRACK_MATRICES_NV 0x862F -#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640 -#define GL_CURRENT_MATRIX_NV 0x8641 -#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A -#define GL_PROGRAM_ERROR_POSITION_NV 0x864B -#define GL_MODELVIEW_PROJECTION_NV 0x8629 #define GL_MATRIX0_NV 0x8630 #define GL_MATRIX1_NV 0x8631 #define GL_MATRIX2_NV 0x8632 @@ -1836,10 +1852,18 @@ extern "C" { #define GL_MATRIX5_NV 0x8635 #define GL_MATRIX6_NV 0x8636 #define GL_MATRIX7_NV 0x8637 -#define GL_IDENTITY_NV 0x862A -#define GL_INVERSE_NV 0x862B -#define GL_TRANSPOSE_NV 0x862C -#define GL_INVERSE_TRANSPOSE_NV 0x862D +#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640 +#define GL_CURRENT_MATRIX_NV 0x8641 +#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642 +#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643 +#define GL_PROGRAM_PARAMETER_NV 0x8644 +#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645 +#define GL_PROGRAM_TARGET_NV 0x8646 +#define GL_PROGRAM_RESIDENT_NV 0x8647 +#define GL_TRACK_MATRIX_NV 0x8648 +#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649 +#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A +#define GL_PROGRAM_ERROR_POSITION_NV 0x864B #define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650 #define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651 #define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652 @@ -2155,11 +2179,13 @@ extern "C" { #define GL_Y_EXT 0x87D6 #define GL_Z_EXT 0x87D7 #define GL_W_EXT 0x87D8 -#define GL_NEGEXTVE_X_EXT 0x87D9 -#define GL_NEGEXTVE_Y_EXT 0x87DA -#define GL_NEGEXTVE_Z_EXT 0x87DB -#define GL_NEGEXTVE_W_EXT 0x87DC -#define GL_NEGEXTVE_ONE_EXT 0x87DF +#define GL_NEGATIVE_X_EXT 0x87D9 +#define GL_NEGATIVE_Y_EXT 0x87DA +#define GL_NEGATIVE_Z_EXT 0x87DB +#define GL_NEGATIVE_W_EXT 0x87DC +#define GL_ZERO_EXT 0x87DD +#define GL_ONE_EXT 0x87DE +#define GL_NEGATIVE_ONE_EXT 0x87DF #define GL_NORMALIZED_RANGE_EXT 0x87E0 #define GL_FULL_RANGE_EXT 0x87E1 #define GL_CURRENT_VERTEX_EXT 0x87E2 @@ -2189,6 +2215,65 @@ extern "C" { #define GL_VERTEX_SOURCE_ATI 0x8774 #endif +#ifndef GL_ATI_element_array +#define GL_ELEMENT_ARRAY_ATI 0x8768 +#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769 +#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A +#endif + +#ifndef GL_SUN_mesh_array +#define GL_QUAD_MESH_SUN 0x8614 +#define GL_TRIANGLE_MESH_SUN 0x8615 +#endif + +#ifndef GL_SUN_slice_accum +#define GL_SLICE_ACCUM_SUN 0x85CC +#endif + +#ifndef GL_NV_multisample_filter_hint +#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534 +#endif + +#ifndef GL_NV_depth_clamp +#define GL_DEPTH_CLAMP_NV 0x864F +#endif + +#ifndef GL_NV_occlusion_query +#define GL_PIXEL_COUNTER_BITS_NV 0x8864 +#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865 +#define GL_PIXEL_COUNT_NV 0x8866 +#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867 +#endif + +#ifndef GL_NV_point_sprite +#define GL_POINT_SPRITE_NV 0x8861 +#define GL_COORD_REPLACE_NV 0x8862 +#define GL_POINT_SPRITE_R_MODE_NV 0x8863 +#endif + +#ifndef GL_NV_texture_shader3 +#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850 +#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851 +#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852 +#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853 +#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854 +#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855 +#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856 +#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857 +#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858 +#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859 +#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A +#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B +#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C +#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D +#define GL_HILO8_NV 0x885E +#define GL_SIGNED_HILO8_NV 0x885F +#define GL_FORCE_BLUE_TO_ONE_NV 0x8860 +#endif + +#ifndef GL_NV_vertex_program1_1 +#endif + /*************************************************************/ @@ -2500,6 +2585,16 @@ typedef void (APIENTRY * PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLin #define GL_ARB_texture_border_clamp 1 #endif +#ifndef GL_ARB_point_parameters +#define GL_ARB_point_parameters 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPointParameterfARB (GLenum, GLfloat); +GLAPI void APIENTRY glPointParameterfvARB (GLenum, const GLfloat *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRY * PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRY * PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params); +#endif + #ifndef GL_ARB_vertex_blend #define GL_ARB_vertex_blend 1 #ifdef GL_GLEXT_PROTOTYPES @@ -2554,6 +2649,60 @@ typedef void (APIENTRY * PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum typ #define GL_ARB_texture_env_dot3 1 #endif +#ifndef GL_ARB_texture_mirror_repeat +#define GL_ARB_texture_mirror_repeat 1 +#endif + +#ifndef GL_ARB_depth_texture +#define GL_ARB_depth_texture 1 +#endif + +#ifndef GL_ARB_shadow +#define GL_ARB_shadow 1 +#endif + +#ifndef GL_ARB_shadow_ambient +#define GL_ARB_shadow_ambient 1 +#endif + +#ifndef GL_ARB_window_pos +#define GL_ARB_window_pos 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glWindowPos2dARB (GLdouble, GLdouble); +GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *); +GLAPI void APIENTRY glWindowPos2fARB (GLfloat, GLfloat); +GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *); +GLAPI void APIENTRY glWindowPos2iARB (GLint, GLint); +GLAPI void APIENTRY glWindowPos2ivARB (const GLint *); +GLAPI void APIENTRY glWindowPos2sARB (GLshort, GLshort); +GLAPI void APIENTRY glWindowPos2svARB (const GLshort *); +GLAPI void APIENTRY glWindowPos3dARB (GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *); +GLAPI void APIENTRY glWindowPos3fARB (GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *); +GLAPI void APIENTRY glWindowPos3iARB (GLint, GLint, GLint); +GLAPI void APIENTRY glWindowPos3ivARB (const GLint *); +GLAPI void APIENTRY glWindowPos3sARB (GLshort, GLshort, GLshort); +GLAPI void APIENTRY glWindowPos3svARB (const GLshort *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRY * PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y); +typedef void (APIENTRY * PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v); +typedef void (APIENTRY * PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y); +typedef void (APIENTRY * PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v); +typedef void (APIENTRY * PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y); +typedef void (APIENTRY * PFNGLWINDOWPOS2IVARBPROC) (const GLint *v); +typedef void (APIENTRY * PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y); +typedef void (APIENTRY * PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v); +typedef void (APIENTRY * PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRY * PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v); +typedef void (APIENTRY * PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRY * PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v); +typedef void (APIENTRY * PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z); +typedef void (APIENTRY * PFNGLWINDOWPOS3IVARBPROC) (const GLint *v); +typedef void (APIENTRY * PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z); +typedef void (APIENTRY * PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v); +#endif + #ifndef GL_EXT_abgr #define GL_EXT_abgr 1 #endif @@ -2904,20 +3053,22 @@ typedef void (APIENTRY * PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GL #define GL_SGIX_texture_multi_buffer 1 #endif -#ifndef GL_ARB_point_parameters -#define GL_ARB_point_parameters 1 +#ifndef GL_EXT_point_parameters +#define GL_EXT_point_parameters 1 #ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPointParameterfARB (GLenum, GLfloat); -GLAPI void APIENTRY glPointParameterfvARB (GLenum, const GLfloat *); GLAPI void APIENTRY glPointParameterfEXT (GLenum, GLfloat); GLAPI void APIENTRY glPointParameterfvEXT (GLenum, const GLfloat *); -GLAPI void APIENTRY glPointParameterfSGIS (GLenum, GLfloat); -GLAPI void APIENTRY glPointParameterfvSGIS (GLenum, const GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRY * PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params); typedef void (APIENTRY * PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param); typedef void (APIENTRY * PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params); +#endif + +#ifndef GL_SGIS_point_parameters +#define GL_SGIS_point_parameters 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPointParameterfSGIS (GLenum, GLfloat); +GLAPI void APIENTRY glPointParameterfvSGIS (GLenum, const GLfloat *); +#endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRY * PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param); typedef void (APIENTRY * PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); #endif @@ -3887,21 +4038,21 @@ typedef void (APIENTRY * PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoi #ifndef GL_NV_fence #define GL_NV_fence 1 #ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenFencesNV (GLsizei, GLuint *); GLAPI void APIENTRY glDeleteFencesNV (GLsizei, const GLuint *); -GLAPI void APIENTRY glSetFenceNV (GLuint, GLenum); -GLAPI GLboolean APIENTRY glTestFenceNV (GLuint); -GLAPI void APIENTRY glFinishFenceNV (GLuint); +GLAPI void APIENTRY glGenFencesNV (GLsizei, GLuint *); GLAPI GLboolean APIENTRY glIsFenceNV (GLuint); +GLAPI GLboolean APIENTRY glTestFenceNV (GLuint); GLAPI void APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *); +GLAPI void APIENTRY glFinishFenceNV (GLuint); +GLAPI void APIENTRY glSetFenceNV (GLuint, GLenum); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); typedef void (APIENTRY * PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); -typedef void (APIENTRY * PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); -typedef GLboolean (APIENTRY * PFNGLTESTFENCENVPROC) (GLuint fence); -typedef void (APIENTRY * PFNGLFINISHFENCENVPROC) (GLuint fence); +typedef void (APIENTRY * PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); typedef GLboolean (APIENTRY * PFNGLISFENCENVPROC) (GLuint fence); +typedef GLboolean (APIENTRY * PFNGLTESTFENCENVPROC) (GLuint fence); typedef void (APIENTRY * PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); +typedef void (APIENTRY * PFNGLFINISHFENCENVPROC) (GLuint fence); +typedef void (APIENTRY * PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); #endif #ifndef GL_NV_evaluators @@ -3965,14 +4116,13 @@ typedef void (APIENTRY * PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, #ifndef GL_NV_vertex_program #define GL_NV_vertex_program 1 #ifdef GL_GLEXT_PROTOTYPES +GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei, const GLuint *, GLboolean *); GLAPI void APIENTRY glBindProgramNV (GLenum, GLuint); GLAPI void APIENTRY glDeleteProgramsNV (GLsizei, const GLuint *); GLAPI void APIENTRY glExecuteProgramNV (GLenum, GLuint, const GLfloat *); GLAPI void APIENTRY glGenProgramsNV (GLsizei, GLuint *); -GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei, const GLuint *, GLboolean *); -GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei, const GLuint *); -GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum, GLuint, GLenum, GLfloat *); GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum, GLuint, GLenum, GLdouble *); +GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum, GLuint, GLenum, GLfloat *); GLAPI void APIENTRY glGetProgramivNV (GLuint, GLenum, GLint *); GLAPI void APIENTRY glGetProgramStringNV (GLuint, GLenum, GLubyte *); GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum, GLuint, GLenum, GLint *); @@ -3982,62 +4132,62 @@ GLAPI void APIENTRY glGetVertexAttribivNV (GLuint, GLenum, GLint *); GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint, GLenum, GLvoid* *); GLAPI GLboolean APIENTRY glIsProgramNV (GLuint); GLAPI void APIENTRY glLoadProgramNV (GLenum, GLuint, GLsizei, const GLubyte *); -GLAPI void APIENTRY glProgramParameter4fNV (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glProgramParameter4dNV (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glProgramParameter4dvNV (GLenum, GLuint, const GLdouble *); +GLAPI void APIENTRY glProgramParameter4fNV (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glProgramParameter4fvNV (GLenum, GLuint, const GLfloat *); GLAPI void APIENTRY glProgramParameters4dvNV (GLenum, GLuint, GLuint, const GLdouble *); GLAPI void APIENTRY glProgramParameters4fvNV (GLenum, GLuint, GLuint, const GLfloat *); +GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei, const GLuint *); GLAPI void APIENTRY glTrackMatrixNV (GLenum, GLuint, GLenum, GLenum); GLAPI void APIENTRY glVertexAttribPointerNV (GLuint, GLint, GLenum, GLsizei, const GLvoid *); -GLAPI void APIENTRY glVertexAttrib1sNV (GLuint, GLshort); -GLAPI void APIENTRY glVertexAttrib1fNV (GLuint, GLfloat); GLAPI void APIENTRY glVertexAttrib1dNV (GLuint, GLdouble); -GLAPI void APIENTRY glVertexAttrib2sNV (GLuint, GLshort, GLshort); -GLAPI void APIENTRY glVertexAttrib2fNV (GLuint, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexAttrib2dNV (GLuint, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexAttrib3sNV (GLuint, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glVertexAttrib3fNV (GLuint, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexAttrib3dNV (GLuint, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexAttrib4sNV (GLuint, GLshort, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glVertexAttrib4fNV (GLuint, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexAttrib4dNV (GLuint, GLdouble, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint, GLubyte, GLubyte, GLubyte, GLubyte); -GLAPI void APIENTRY glVertexAttrib1svNV (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint, const GLfloat *); GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint, const GLdouble *); -GLAPI void APIENTRY glVertexAttrib2svNV (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint, const GLfloat *); +GLAPI void APIENTRY glVertexAttrib1fNV (GLuint, GLfloat); +GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint, const GLfloat *); +GLAPI void APIENTRY glVertexAttrib1sNV (GLuint, GLshort); +GLAPI void APIENTRY glVertexAttrib1svNV (GLuint, const GLshort *); +GLAPI void APIENTRY glVertexAttrib2dNV (GLuint, GLdouble, GLdouble); GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint, const GLdouble *); -GLAPI void APIENTRY glVertexAttrib3svNV (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint, const GLfloat *); +GLAPI void APIENTRY glVertexAttrib2fNV (GLuint, GLfloat, GLfloat); +GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint, const GLfloat *); +GLAPI void APIENTRY glVertexAttrib2sNV (GLuint, GLshort, GLshort); +GLAPI void APIENTRY glVertexAttrib2svNV (GLuint, const GLshort *); +GLAPI void APIENTRY glVertexAttrib3dNV (GLuint, GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint, const GLdouble *); -GLAPI void APIENTRY glVertexAttrib4svNV (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint, const GLfloat *); +GLAPI void APIENTRY glVertexAttrib3fNV (GLuint, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint, const GLfloat *); +GLAPI void APIENTRY glVertexAttrib3sNV (GLuint, GLshort, GLshort, GLshort); +GLAPI void APIENTRY glVertexAttrib3svNV (GLuint, const GLshort *); +GLAPI void APIENTRY glVertexAttrib4dNV (GLuint, GLdouble, GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint, const GLdouble *); +GLAPI void APIENTRY glVertexAttrib4fNV (GLuint, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint, const GLfloat *); +GLAPI void APIENTRY glVertexAttrib4sNV (GLuint, GLshort, GLshort, GLshort, GLshort); +GLAPI void APIENTRY glVertexAttrib4svNV (GLuint, const GLshort *); +GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint, GLubyte, GLubyte, GLubyte, GLubyte); GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint, const GLubyte *); -GLAPI void APIENTRY glVertexAttribs1svNV (GLuint, GLsizei, const GLshort *); -GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint, GLsizei, const GLfloat *); GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint, GLsizei, const GLdouble *); -GLAPI void APIENTRY glVertexAttribs2svNV (GLuint, GLsizei, const GLshort *); -GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glVertexAttribs1svNV (GLuint, GLsizei, const GLshort *); GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint, GLsizei, const GLdouble *); -GLAPI void APIENTRY glVertexAttribs3svNV (GLuint, GLsizei, const GLshort *); -GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glVertexAttribs2svNV (GLuint, GLsizei, const GLshort *); GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint, GLsizei, const GLdouble *); -GLAPI void APIENTRY glVertexAttribs4svNV (GLuint, GLsizei, const GLshort *); -GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glVertexAttribs3svNV (GLuint, GLsizei, const GLshort *); GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint, GLsizei, const GLdouble *); +GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glVertexAttribs4svNV (GLuint, GLsizei, const GLshort *); GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint, GLsizei, const GLubyte *); #endif /* GL_GLEXT_PROTOTYPES */ +typedef GLboolean (APIENTRY * PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences); typedef void (APIENTRY * PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id); -typedef void (APIENTRY * PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *ids); +typedef void (APIENTRY * PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); typedef void (APIENTRY * PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params); -typedef void (APIENTRY * PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *ids); -typedef GLboolean (APIENTRY * PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *ids, GLboolean *residences); -typedef void (APIENTRY * PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *ids); -typedef void (APIENTRY * PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRY * PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs); typedef void (APIENTRY * PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRY * PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); typedef void (APIENTRY * PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params); typedef void (APIENTRY * PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program); typedef void (APIENTRY * PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params); @@ -4047,53 +4197,54 @@ typedef void (APIENTRY * PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pna typedef void (APIENTRY * PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); typedef GLboolean (APIENTRY * PFNGLISPROGRAMNVPROC) (GLuint id); typedef void (APIENTRY * PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program); -typedef void (APIENTRY * PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void (APIENTRY * PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRY * PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *params); -typedef void (APIENTRY * PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *params); -typedef void (APIENTRY * PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint num, const GLdouble *params); -typedef void (APIENTRY * PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint num, const GLfloat *params); +typedef void (APIENTRY * PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v); +typedef void (APIENTRY * PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRY * PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v); +typedef void (APIENTRY * PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint count, const GLdouble *v); +typedef void (APIENTRY * PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint count, const GLfloat *v); +typedef void (APIENTRY * PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); typedef void (APIENTRY * PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); -typedef void (APIENTRY * PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRY * PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x); -typedef void (APIENTRY * PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x); +typedef void (APIENTRY * PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer); typedef void (APIENTRY * PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x); -typedef void (APIENTRY * PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y); -typedef void (APIENTRY * PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y); -typedef void (APIENTRY * PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRY * PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRY * PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRY * PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -typedef void (APIENTRY * PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v); typedef void (APIENTRY * PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRY * PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x); +typedef void (APIENTRY * PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRY * PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x); +typedef void (APIENTRY * PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRY * PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y); typedef void (APIENTRY * PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRY * PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (APIENTRY * PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRY * PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y); +typedef void (APIENTRY * PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRY * PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); typedef void (APIENTRY * PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRY * PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRY * PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRY * PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRY * PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRY * PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); typedef void (APIENTRY * PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRY * PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRY * PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRY * PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRY * PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRY * PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); typedef void (APIENTRY * PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei n, const GLshort *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei n, const GLfloat *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei n, const GLdouble *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei n, const GLshort *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei n, const GLfloat *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei n, const GLdouble *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei n, const GLshort *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei n, const GLfloat *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei n, const GLdouble *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei n, const GLshort *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei n, const GLfloat *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei n, const GLdouble *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei n, const GLubyte *v); +typedef void (APIENTRY * PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRY * PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRY * PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void (APIENTRY * PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRY * PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRY * PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void (APIENTRY * PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRY * PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRY * PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void (APIENTRY * PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRY * PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRY * PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void (APIENTRY * PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v); #endif #ifndef GL_SGIX_texture_coordinate_clamp @@ -4301,97 +4452,167 @@ typedef void (APIENTRY * PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum #ifndef GL_ATI_vertex_streams #define GL_ATI_vertex_streams 1 #ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexStream1s (GLenum, GLshort); -GLAPI void APIENTRY glVertexStream1sv (GLenum, const GLshort *); -GLAPI void APIENTRY glVertexStream1i (GLenum, GLint); -GLAPI void APIENTRY glVertexStream1iv (GLenum, const GLint *); -GLAPI void APIENTRY glVertexStream1f (GLenum, GLfloat); -GLAPI void APIENTRY glVertexStream1fv (GLenum, const GLfloat *); -GLAPI void APIENTRY glVertexStream1d (GLenum, GLdouble); -GLAPI void APIENTRY glVertexStream1dv (GLenum, const GLdouble *); -GLAPI void APIENTRY glVertexStream2s (GLenum, GLshort, GLshort); -GLAPI void APIENTRY glVertexStream2sv (GLenum, const GLshort *); -GLAPI void APIENTRY glVertexStream2i (GLenum, GLint, GLint); -GLAPI void APIENTRY glVertexStream2iv (GLenum, const GLint *); -GLAPI void APIENTRY glVertexStream2f (GLenum, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexStream2fv (GLenum, const GLfloat *); -GLAPI void APIENTRY glVertexStream2d (GLenum, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexStream2dv (GLenum, const GLdouble *); -GLAPI void APIENTRY glVertexStream3s (GLenum, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glVertexStream3sv (GLenum, const GLshort *); -GLAPI void APIENTRY glVertexStream3i (GLenum, GLint, GLint, GLint); -GLAPI void APIENTRY glVertexStream3iv (GLenum, const GLint *); -GLAPI void APIENTRY glVertexStream3f (GLenum, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexStream3fv (GLenum, const GLfloat *); -GLAPI void APIENTRY glVertexStream3d (GLenum, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexStream3dv (GLenum, const GLdouble *); -GLAPI void APIENTRY glVertexStream4s (GLenum, GLshort, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glVertexStream4sv (GLenum, const GLshort *); -GLAPI void APIENTRY glVertexStream4i (GLenum, GLint, GLint, GLint, GLint); -GLAPI void APIENTRY glVertexStream4iv (GLenum, const GLint *); -GLAPI void APIENTRY glVertexStream4f (GLenum, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexStream4fv (GLenum, const GLfloat *); -GLAPI void APIENTRY glVertexStream4d (GLenum, GLdouble, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexStream4dv (GLenum, const GLdouble *); -GLAPI void APIENTRY glNormalStream3b (GLenum, GLbyte, GLbyte, GLbyte); -GLAPI void APIENTRY glNormalStream3bv (GLenum, const GLbyte *); -GLAPI void APIENTRY glNormalStream3s (GLenum, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glNormalStream3sv (GLenum, const GLshort *); -GLAPI void APIENTRY glNormalStream3i (GLenum, GLint, GLint, GLint); -GLAPI void APIENTRY glNormalStream3iv (GLenum, const GLint *); -GLAPI void APIENTRY glNormalStream3f (GLenum, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glNormalStream3fv (GLenum, const GLfloat *); -GLAPI void APIENTRY glNormalStream3d (GLenum, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glNormalStream3dv (GLenum, const GLdouble *); -GLAPI void APIENTRY glClientActiveVertexStream (GLenum); -GLAPI void APIENTRY glVertexBlendEnvi (GLenum, GLint); -GLAPI void APIENTRY glVertexBlendEnvf (GLenum, GLfloat); +GLAPI void APIENTRY glVertexStream1sATI (GLenum, GLshort); +GLAPI void APIENTRY glVertexStream1svATI (GLenum, const GLshort *); +GLAPI void APIENTRY glVertexStream1iATI (GLenum, GLint); +GLAPI void APIENTRY glVertexStream1ivATI (GLenum, const GLint *); +GLAPI void APIENTRY glVertexStream1fATI (GLenum, GLfloat); +GLAPI void APIENTRY glVertexStream1fvATI (GLenum, const GLfloat *); +GLAPI void APIENTRY glVertexStream1dATI (GLenum, GLdouble); +GLAPI void APIENTRY glVertexStream1dvATI (GLenum, const GLdouble *); +GLAPI void APIENTRY glVertexStream2sATI (GLenum, GLshort, GLshort); +GLAPI void APIENTRY glVertexStream2svATI (GLenum, const GLshort *); +GLAPI void APIENTRY glVertexStream2iATI (GLenum, GLint, GLint); +GLAPI void APIENTRY glVertexStream2ivATI (GLenum, const GLint *); +GLAPI void APIENTRY glVertexStream2fATI (GLenum, GLfloat, GLfloat); +GLAPI void APIENTRY glVertexStream2fvATI (GLenum, const GLfloat *); +GLAPI void APIENTRY glVertexStream2dATI (GLenum, GLdouble, GLdouble); +GLAPI void APIENTRY glVertexStream2dvATI (GLenum, const GLdouble *); +GLAPI void APIENTRY glVertexStream3sATI (GLenum, GLshort, GLshort, GLshort); +GLAPI void APIENTRY glVertexStream3svATI (GLenum, const GLshort *); +GLAPI void APIENTRY glVertexStream3iATI (GLenum, GLint, GLint, GLint); +GLAPI void APIENTRY glVertexStream3ivATI (GLenum, const GLint *); +GLAPI void APIENTRY glVertexStream3fATI (GLenum, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glVertexStream3fvATI (GLenum, const GLfloat *); +GLAPI void APIENTRY glVertexStream3dATI (GLenum, GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glVertexStream3dvATI (GLenum, const GLdouble *); +GLAPI void APIENTRY glVertexStream4sATI (GLenum, GLshort, GLshort, GLshort, GLshort); +GLAPI void APIENTRY glVertexStream4svATI (GLenum, const GLshort *); +GLAPI void APIENTRY glVertexStream4iATI (GLenum, GLint, GLint, GLint, GLint); +GLAPI void APIENTRY glVertexStream4ivATI (GLenum, const GLint *); +GLAPI void APIENTRY glVertexStream4fATI (GLenum, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glVertexStream4fvATI (GLenum, const GLfloat *); +GLAPI void APIENTRY glVertexStream4dATI (GLenum, GLdouble, GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glVertexStream4dvATI (GLenum, const GLdouble *); +GLAPI void APIENTRY glNormalStream3bATI (GLenum, GLbyte, GLbyte, GLbyte); +GLAPI void APIENTRY glNormalStream3bvATI (GLenum, const GLbyte *); +GLAPI void APIENTRY glNormalStream3sATI (GLenum, GLshort, GLshort, GLshort); +GLAPI void APIENTRY glNormalStream3svATI (GLenum, const GLshort *); +GLAPI void APIENTRY glNormalStream3iATI (GLenum, GLint, GLint, GLint); +GLAPI void APIENTRY glNormalStream3ivATI (GLenum, const GLint *); +GLAPI void APIENTRY glNormalStream3fATI (GLenum, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glNormalStream3fvATI (GLenum, const GLfloat *); +GLAPI void APIENTRY glNormalStream3dATI (GLenum, GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glNormalStream3dvATI (GLenum, const GLdouble *); +GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum); +GLAPI void APIENTRY glVertexBlendEnviATI (GLenum, GLint); +GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum, GLfloat); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRY * PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x); +typedef void (APIENTRY * PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRY * PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x); +typedef void (APIENTRY * PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRY * PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x); +typedef void (APIENTRY * PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRY * PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x); +typedef void (APIENTRY * PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRY * PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y); +typedef void (APIENTRY * PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRY * PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y); +typedef void (APIENTRY * PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRY * PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y); +typedef void (APIENTRY * PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRY * PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y); +typedef void (APIENTRY * PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRY * PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRY * PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRY * PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z); +typedef void (APIENTRY * PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRY * PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRY * PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRY * PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRY * PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRY * PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRY * PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRY * PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRY * PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRY * PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRY * PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRY * PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRY * PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRY * PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); +typedef void (APIENTRY * PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords); +typedef void (APIENTRY * PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz); +typedef void (APIENTRY * PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRY * PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz); +typedef void (APIENTRY * PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRY * PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); +typedef void (APIENTRY * PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRY * PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); +typedef void (APIENTRY * PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRY * PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream); +typedef void (APIENTRY * PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param); +typedef void (APIENTRY * PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param); +#endif + +#ifndef GL_ATI_element_array +#define GL_ATI_element_array 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glElementPointerATI (GLenum, const GLvoid *); +GLAPI void APIENTRY glDrawElementArrayATI (GLenum, GLsizei); +GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum, GLuint, GLuint, GLsizei); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRY * PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer); +typedef void (APIENTRY * PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count); +typedef void (APIENTRY * PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count); +#endif + +#ifndef GL_SUN_mesh_array +#define GL_SUN_mesh_array 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum, GLint, GLsizei, GLsizei); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRY * PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width); +#endif + +#ifndef GL_SUN_slice_accum +#define GL_SUN_slice_accum 1 +#endif + +#ifndef GL_NV_multisample_filter_hint +#define GL_NV_multisample_filter_hint 1 +#endif + +#ifndef GL_NV_depth_clamp +#define GL_NV_depth_clamp 1 +#endif + +#ifndef GL_NV_occlusion_query +#define GL_NV_occlusion_query 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei, GLuint *); +GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei, const GLuint *); +GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint); +GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint); +GLAPI void APIENTRY glEndOcclusionQueryNV (void); +GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint, GLenum, GLint *); +GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint, GLenum, GLuint *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLVERTEXSTREAM1SPROC) (GLenum stream, GLshort x); -typedef void (APIENTRY * PFNGLVERTEXSTREAM1SVPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM1IPROC) (GLenum stream, GLint x); -typedef void (APIENTRY * PFNGLVERTEXSTREAM1IVPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM1FPROC) (GLenum stream, GLfloat x); -typedef void (APIENTRY * PFNGLVERTEXSTREAM1FVPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM1DPROC) (GLenum stream, GLdouble x); -typedef void (APIENTRY * PFNGLVERTEXSTREAM1DVPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM2SPROC) (GLenum stream, GLshort x, GLshort y); -typedef void (APIENTRY * PFNGLVERTEXSTREAM2SVPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM2IPROC) (GLenum stream, GLint x, GLint y); -typedef void (APIENTRY * PFNGLVERTEXSTREAM2IVPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM2FPROC) (GLenum stream, GLfloat x, GLfloat y); -typedef void (APIENTRY * PFNGLVERTEXSTREAM2FVPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM2DPROC) (GLenum stream, GLdouble x, GLdouble y); -typedef void (APIENTRY * PFNGLVERTEXSTREAM2DVPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM3SPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRY * PFNGLVERTEXSTREAM3SVPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM3IPROC) (GLenum stream, GLint x, GLint y, GLint z); -typedef void (APIENTRY * PFNGLVERTEXSTREAM3IVPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM3FPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRY * PFNGLVERTEXSTREAM3FVPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM3DPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRY * PFNGLVERTEXSTREAM3DVPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM4SPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRY * PFNGLVERTEXSTREAM4SVPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM4IPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRY * PFNGLVERTEXSTREAM4IVPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM4FPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRY * PFNGLVERTEXSTREAM4FVPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM4DPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRY * PFNGLVERTEXSTREAM4DVPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRY * PFNGLNORMALSTREAM3BPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); -typedef void (APIENTRY * PFNGLNORMALSTREAM3BVPROC) (GLenum stream, const GLbyte *coords); -typedef void (APIENTRY * PFNGLNORMALSTREAM3SPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz); -typedef void (APIENTRY * PFNGLNORMALSTREAM3SVPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRY * PFNGLNORMALSTREAM3IPROC) (GLenum stream, GLint nx, GLint ny, GLint nz); -typedef void (APIENTRY * PFNGLNORMALSTREAM3IVPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRY * PFNGLNORMALSTREAM3FPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); -typedef void (APIENTRY * PFNGLNORMALSTREAM3FVPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRY * PFNGLNORMALSTREAM3DPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); -typedef void (APIENTRY * PFNGLNORMALSTREAM3DVPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRY * PFNGLCLIENTACTIVEVERTEXSTREAMPROC) (GLenum stream); -typedef void (APIENTRY * PFNGLVERTEXBLENDENVIPROC) (GLenum pname, GLint param); -typedef void (APIENTRY * PFNGLVERTEXBLENDENVFPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRY * PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids); +typedef void (APIENTRY * PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean (APIENTRY * PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id); +typedef void (APIENTRY * PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id); +typedef void (APIENTRY * PFNGLENDOCCLUSIONQUERYNVPROC) (void); +typedef void (APIENTRY * PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRY * PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params); +#endif + +#ifndef GL_NV_point_sprite +#define GL_NV_point_sprite 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPointParameteriNV (GLenum, GLint); +GLAPI void APIENTRY glPointParameterivNV (GLenum, const GLint *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRY * PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param); +typedef void (APIENTRY * PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params); +#endif + +#ifndef GL_NV_texture_shader3 +#define GL_NV_texture_shader3 1 +#endif + +#ifndef GL_NV_vertex_program1_1 +#define GL_NV_vertex_program1_1 1 #endif diff --git a/xc/extras/Mesa/include/GL/glxext.h b/xc/extras/Mesa/include/GL/glxext.h index e61ad526f..54620bd4e 100644 --- a/xc/extras/Mesa/include/GL/glxext.h +++ b/xc/extras/Mesa/include/GL/glxext.h @@ -42,12 +42,16 @@ extern "C" { #ifndef APIENTRY #define APIENTRY #endif +#ifndef GLAPI +#define GLAPI extern +#endif /*************************************************************/ /* Header file version number, required by OpenGL ABI for Linux */ -/* glxext.h last updated 2001/09/26 */ -#define GLX_GLXEXT_VERSION 3 +/* glxext.h last updated 2002/03/22 */ +/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */ +#define GLX_GLXEXT_VERSION 5 #ifndef GLX_VERSION_1_3 #define GLX_WINDOW_BIT 0x00000001 @@ -113,6 +117,9 @@ extern "C" { #define GLX_SAMPLES 100001 #endif +#ifndef GLX_ARB_get_proc_address +#endif + #ifndef GLX_ARB_multisample #define GLX_SAMPLE_BUFFERS_ARB 100000 #define GLX_SAMPLES_ARB 100001 @@ -276,7 +283,6 @@ extern "C" { /*************************************************************/ #ifndef GLX_ARB_get_proc_address -/* XXX Added void parameter to silence many, many warnings (BrianP) */ typedef void (*__GLXextFuncPtr)(void); #endif @@ -348,6 +354,14 @@ typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigne typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask); #endif +#ifndef GLX_VERSION_1_4 +#define GLX_VERSION_1_4 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName); +#endif + #ifndef GLX_ARB_get_proc_address #define GLX_ARB_get_proc_address 1 #ifdef GLX_GLXEXT_PROTOTYPES @@ -356,6 +370,10 @@ extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *); typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName); #endif +#ifndef GLX_ARB_multisample +#define GLX_ARB_multisample 1 +#endif + #ifndef GLX_SGIS_multisample #define GLX_SGIS_multisample 1 #endif @@ -419,7 +437,7 @@ extern void glXFreeContextEXT (Display *, GLXContext); #endif /* GLX_GLXEXT_PROTOTYPES */ typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void); typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value); -typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (GLXContext context); +typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context); typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID); typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context); #endif @@ -554,14 +572,33 @@ typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode); #define GLX_SGIX_visual_select_group 1 #endif -#ifndef GLX_GLX_OML_swap_method -#define GLX_GLX_OML_swap_method 1 +#ifndef GLX_OML_swap_method +#define GLX_OML_swap_method 1 #endif -#ifndef GLX_GLX_OML_sync_control -#define GLX_GLX_OML_sync_control 1 +#if defined(__STDC_VERSION__) +#if __STDC_VERSION__ >= 199901L +/* Include ISO C99 integer types for OML_sync_control; need a better test */ +#include + +#ifndef GLX_OML_sync_control +#define GLX_OML_sync_control 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern Bool glXGetSyncValuesOML (Display *, GLXDrawable, int64_t *, int64_t *, int64_t *); +extern Bool glXGetMscRateOML (Display *, GLXDrawable, int32_t *, int32_t *); +extern int64_t glXSwapBuffersMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t); +extern Bool glXWaitForMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *); +extern Bool glXWaitForSbcOML (Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc); +typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator); +typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder); +typedef Bool ( * PFNGLXWAITFORMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc); +typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc); #endif +#endif /* C99 version test */ +#endif /* STDC test */ #ifdef __cplusplus } diff --git a/xc/extras/Mesa/src/OSmesa/osmesa.c b/xc/extras/Mesa/src/OSmesa/osmesa.c index d519baa50..ccce23967 100644 --- a/xc/extras/Mesa/src/OSmesa/osmesa.c +++ b/xc/extras/Mesa/src/OSmesa/osmesa.c @@ -877,7 +877,13 @@ static void clear( GLcontext *ctx, GLbitfield mask, GLboolean all, static void buffer_size( GLframebuffer *buffer, GLuint *width, GLuint *height ) { +#ifdef WIN32 + /* Hack to get around problems with exporting glapi_Context from MesaGL + and importing into OSMesa. */ + GLcontext *ctx = (GLcontext *) _glapi_get_context(); +#else GET_CURRENT_CONTEXT(ctx); +#endif (void) buffer; if (ctx) { OSMesaContext osmesa = OSMESA_CONTEXT(ctx); diff --git a/xc/extras/Mesa/src/X/xm_dd.c b/xc/extras/Mesa/src/X/xm_dd.c index 7f26bf757..ffc22884e 100644 --- a/xc/extras/Mesa/src/X/xm_dd.c +++ b/xc/extras/Mesa/src/X/xm_dd.c @@ -230,7 +230,6 @@ index_mask( GLcontext *ctx, GLuint mask ) else { m = (unsigned long) mask; } - XMesaSetPlaneMask( xmesa->display, xmesa->xm_buffer->gc, m ); XMesaSetPlaneMask( xmesa->display, xmesa->xm_buffer->cleargc, m ); } } @@ -256,7 +255,6 @@ color_mask(GLcontext *ctx, if (gmask) m |= GET_GREENMASK(xmesa->xm_visual); if (bmask) m |= GET_BLUEMASK(xmesa->xm_visual); } - XMesaSetPlaneMask( xmesa->display, xmesa->xm_buffer->gc, m ); XMesaSetPlaneMask( xmesa->display, xmesa->xm_buffer->cleargc, m ); } } diff --git a/xc/extras/Mesa/src/X86/assyntax.h b/xc/extras/Mesa/src/X86/assyntax.h index 02f606896..ebfe593fb 100644 --- a/xc/extras/Mesa/src/X86/assyntax.h +++ b/xc/extras/Mesa/src/X86/assyntax.h @@ -253,7 +253,7 @@ #endif /* ACK_ASSEMBLER */ -#if defined(__QNX__) || defined(Lynx) || (defined(SYSV) || defined(SVR4)) && !defined(ACK_ASSEMBLER) || defined(__ELF__) || defined(__GNU__) || defined(__GNUC__) +#if defined(__QNX__) || defined(Lynx) || (defined(SYSV) || defined(SVR4)) && !defined(ACK_ASSEMBLER) || defined(__ELF__) || defined(__GNU__) || defined(__GNUC__) && !defined(DJGPP) #define GLNAME(a) a #else #define GLNAME(a) CONCAT(_,a) diff --git a/xc/extras/Mesa/src/X86/glapi_x86.S b/xc/extras/Mesa/src/X86/glapi_x86.S index 25d10124f..5d1fbc168 100644 --- a/xc/extras/Mesa/src/X86/glapi_x86.S +++ b/xc/extras/Mesa/src/X86/glapi_x86.S @@ -12,7 +12,7 @@ #define GL_OFFSET(x) CODEPTR(REGOFF(4 * x, EAX)) -#ifdef GNU_ASSEMBLER +#if defined(GNU_ASSEMBLER) && !defined(DJGPP) #define GLOBL_FN(x) GLOBL x ; .type x,@function #else #define GLOBL_FN(x) GLOBL x diff --git a/xc/extras/Mesa/src/api_validate.c b/xc/extras/Mesa/src/api_validate.c index f00708858..bca682e89 100644 --- a/xc/extras/Mesa/src/api_validate.c +++ b/xc/extras/Mesa/src/api_validate.c @@ -1,9 +1,9 @@ /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 4.0.2 * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -43,8 +43,7 @@ _mesa_validate_DrawElements(GLcontext *ctx, return GL_FALSE; } - if (mode < 0 || - mode > GL_POLYGON) { + if (mode > GL_POLYGON) { _mesa_error(ctx, GL_INVALID_ENUM, "glDrawArrays(mode)" ); return GL_FALSE; } @@ -81,7 +80,7 @@ _mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode, return GL_FALSE; } - if (mode < 0 || mode > GL_POLYGON) { + if (mode > GL_POLYGON) { _mesa_error(ctx, GL_INVALID_ENUM, "glDrawArrays(mode)" ); return GL_FALSE; } @@ -121,7 +120,7 @@ _mesa_validate_DrawArrays(GLcontext *ctx, return GL_FALSE; } - if (mode < 0 || mode > GL_POLYGON) { + if (mode > GL_POLYGON) { _mesa_error(ctx, GL_INVALID_ENUM, "glDrawArrays(mode)" ); return GL_FALSE; } diff --git a/xc/extras/Mesa/src/attrib.c b/xc/extras/Mesa/src/attrib.c index 834ce19c5..a6323ad04 100644 --- a/xc/extras/Mesa/src/attrib.c +++ b/xc/extras/Mesa/src/attrib.c @@ -1,9 +1,9 @@ /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 4.0.2 * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,7 +32,6 @@ #include "attrib.h" #include "blend.h" #include "buffers.h" -#include "clip.h" #include "colormac.h" #include "context.h" #include "depth.h" @@ -1021,17 +1020,27 @@ _mesa_PopAttrib(void) const struct gl_transform_attrib *xform; xform = (const struct gl_transform_attrib *) attr->data; _mesa_MatrixMode(xform->MatrixMode); + + if (ctx->ProjectionMatrix.flags & MAT_DIRTY) + _math_matrix_analyse( &ctx->ProjectionMatrix ); + + /* restore clip planes */ for (i = 0; i < MAX_CLIP_PLANES; i++) { - GLdouble equation[4]; - const GLfloat *eq = xform->EyeUserPlane[i]; - _mesa_set_enable(ctx, GL_CLIP_PLANE0 + i, - xform->ClipEnabled[i]); - equation[0] = (GLdouble) eq[0]; - equation[1] = (GLdouble) eq[1]; - equation[2] = (GLdouble) eq[2]; - equation[3] = (GLdouble) eq[3]; - _mesa_ClipPlane( GL_CLIP_PLANE0 + i, equation ); + const GLfloat *eyePlane = xform->EyeUserPlane[i]; + COPY_4V(ctx->Transform.EyeUserPlane[i], eyePlane); + if (xform->ClipEnabled[i]) { + _mesa_transform_vector( ctx->Transform._ClipUserPlane[i], + eyePlane, + ctx->ProjectionMatrix.inv ); + _mesa_set_enable(ctx, GL_CLIP_PLANE0 + i, GL_TRUE ); + } + else { + _mesa_set_enable(ctx, GL_CLIP_PLANE0 + i, GL_FALSE ); + } + if (ctx->Driver.ClipPlane) + ctx->Driver.ClipPlane( ctx, i, eyePlane ); } + /* normalize/rescale */ _mesa_set_enable(ctx, GL_NORMALIZE, ctx->Transform.Normalize); _mesa_set_enable(ctx, GL_RESCALE_NORMAL_EXT, diff --git a/xc/extras/Mesa/src/context.c b/xc/extras/Mesa/src/context.c index 63a8cc3c2..6bff2915e 100644 --- a/xc/extras/Mesa/src/context.c +++ b/xc/extras/Mesa/src/context.c @@ -395,31 +395,31 @@ _mesa_free_framebuffer_data( GLframebuffer *buffer ) return; if (buffer->DepthBuffer) { - FREE( buffer->DepthBuffer ); + MESA_PBUFFER_FREE( buffer->DepthBuffer ); buffer->DepthBuffer = NULL; } if (buffer->Accum) { - FREE( buffer->Accum ); + MESA_PBUFFER_FREE( buffer->Accum ); buffer->Accum = NULL; } if (buffer->Stencil) { - FREE( buffer->Stencil ); + MESA_PBUFFER_FREE( buffer->Stencil ); buffer->Stencil = NULL; } if (buffer->FrontLeftAlpha) { - FREE( buffer->FrontLeftAlpha ); + MESA_PBUFFER_FREE( buffer->FrontLeftAlpha ); buffer->FrontLeftAlpha = NULL; } if (buffer->BackLeftAlpha) { - FREE( buffer->BackLeftAlpha ); + MESA_PBUFFER_FREE( buffer->BackLeftAlpha ); buffer->BackLeftAlpha = NULL; } if (buffer->FrontRightAlpha) { - FREE( buffer->FrontRightAlpha ); + MESA_PBUFFER_FREE( buffer->FrontRightAlpha ); buffer->FrontRightAlpha = NULL; } if (buffer->BackRightAlpha) { - FREE( buffer->BackRightAlpha ); + MESA_PBUFFER_FREE( buffer->BackRightAlpha ); buffer->BackRightAlpha = NULL; } } diff --git a/xc/extras/Mesa/src/convolve.c b/xc/extras/Mesa/src/convolve.c index 4426ee428..a2622e0f4 100644 --- a/xc/extras/Mesa/src/convolve.c +++ b/xc/extras/Mesa/src/convolve.c @@ -1,9 +1,9 @@ /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 4.0.2 * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -109,7 +109,7 @@ base_filter_format( GLenum format ) void _mesa_ConvolutionFilter1D(GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *image) { - GLenum baseFormat; + GLint baseFormat; GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); @@ -182,7 +182,7 @@ _mesa_ConvolutionFilter1D(GLenum target, GLenum internalFormat, GLsizei width, G void _mesa_ConvolutionFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image) { - GLenum baseFormat; + GLint baseFormat; GLint i, components; GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); @@ -476,7 +476,7 @@ _mesa_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params) void _mesa_CopyConvolutionFilter1D(GLenum target, GLenum internalFormat, GLint x, GLint y, GLsizei width) { - GLenum baseFormat; + GLint baseFormat; GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); @@ -504,7 +504,7 @@ _mesa_CopyConvolutionFilter1D(GLenum target, GLenum internalFormat, GLint x, GLi void _mesa_CopyConvolutionFilter2D(GLenum target, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height) { - GLenum baseFormat; + GLint baseFormat; GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); @@ -777,7 +777,7 @@ void _mesa_SeparableFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column) { const GLint colStart = MAX_CONVOLUTION_WIDTH * 4; - GLenum baseFormat; + GLint baseFormat; GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); diff --git a/xc/extras/Mesa/src/enable.c b/xc/extras/Mesa/src/enable.c index 0162ac552..08dc58f49 100644 --- a/xc/extras/Mesa/src/enable.c +++ b/xc/extras/Mesa/src/enable.c @@ -1,9 +1,9 @@ /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 4.0.2 * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -188,6 +188,9 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) ctx->Transform.EyeUserPlane[p], ctx->ProjectionMatrix.inv ); } + else { + ctx->Transform._AnyClip--; + } } break; case GL_COLOR_MATERIAL: diff --git a/xc/extras/Mesa/src/image.c b/xc/extras/Mesa/src/image.c index 73d8a6788..da2e6953f 100644 --- a/xc/extras/Mesa/src/image.c +++ b/xc/extras/Mesa/src/image.c @@ -1746,6 +1746,18 @@ _mesa_pack_rgba_span( GLcontext *ctx, dest += 3; } } + else if (transferOps == 0 && dstFormat == GL_RGBA && dstType == GL_UNSIGNED_BYTE) { + /* common simple case */ + GLuint i; + GLubyte *dest = (GLubyte *) dstAddr; + for (i = 0; i < n; i++) { + dest[0] = CHAN_TO_UBYTE(srcRgba[i][RCOMP]); + dest[1] = CHAN_TO_UBYTE(srcRgba[i][GCOMP]); + dest[2] = CHAN_TO_UBYTE(srcRgba[i][BCOMP]); + dest[3] = CHAN_TO_UBYTE(srcRgba[i][ACOMP]); + dest += 4; + } + } else { /* general solution */ GLuint i; @@ -2520,52 +2532,118 @@ _mesa_unpack_chan_color_span( GLcontext *ctx, srcType == GL_UNSIGNED_INT_2_10_10_10_REV); /* Try simple cases first */ - if (transferOps == 0 && srcType == CHAN_TYPE) { - if (dstFormat == GL_RGBA) { - if (srcFormat == GL_RGBA) { - MEMCPY( dest, source, n * 4 * sizeof(GLchan) ); - return; + if (transferOps == 0 ){ + if (srcType == CHAN_TYPE) { + if (dstFormat == GL_RGBA) { + if (srcFormat == GL_RGBA) { + MEMCPY( dest, source, n * 4 * sizeof(GLchan) ); + return; + } + else if (srcFormat == GL_RGB) { + GLuint i; + const GLchan *src = (const GLchan *) source; + GLchan *dst = dest; + for (i = 0; i < n; i++) { + dst[0] = src[0]; + dst[1] = src[1]; + dst[2] = src[2]; + dst[3] = CHAN_MAX; + src += 3; + dst += 4; + } + return; + } } - else if (srcFormat == GL_RGB) { - GLuint i; - const GLchan *src = (const GLchan *) source; - GLchan *dst = dest; - for (i = 0; i < n; i++) { - dst[0] = src[0]; - dst[1] = src[1]; - dst[2] = src[2]; - dst[3] = CHAN_MAX; - src += 3; - dst += 4; + else if (dstFormat == GL_RGB) { + if (srcFormat == GL_RGB) { + MEMCPY( dest, source, n * 3 * sizeof(GLchan) ); + return; + } + else if (srcFormat == GL_RGBA) { + GLuint i; + const GLchan *src = (const GLchan *) source; + GLchan *dst = dest; + for (i = 0; i < n; i++) { + dst[0] = src[0]; + dst[1] = src[1]; + dst[2] = src[2]; + src += 4; + dst += 3; + } + return; } + } + else if (dstFormat == srcFormat) { + GLint comps = _mesa_components_in_format(srcFormat); + assert(comps > 0); + MEMCPY( dest, source, n * comps * sizeof(GLchan) ); return; } } - else if (dstFormat == GL_RGB) { - if (srcFormat == GL_RGB) { - MEMCPY( dest, source, n * 3 * sizeof(GLchan) ); - return; + /* + * Common situation, loading 8bit RGBA/RGB source images + * into 16/32 bit destination. (OSMesa16/32) + */ + else if (srcType == GL_UNSIGNED_BYTE) { + if (dstFormat == GL_RGBA) { + if (srcFormat == GL_RGB) { + GLuint i; + const GLubyte *src = (const GLubyte *) source; + GLchan *dst = dest; + for (i = 0; i < n; i++) { + dst[0] = UBYTE_TO_CHAN(src[0]); + dst[1] = UBYTE_TO_CHAN(src[1]); + dst[2] = UBYTE_TO_CHAN(src[2]); + dst[3] = CHAN_MAX; + src += 3; + dst += 4; + } + return; + } + else if (srcFormat == GL_RGBA) { + GLuint i; + const GLubyte *src = (const GLubyte *) source; + GLchan *dst = dest; + for (i = 0; i < n; i++) { + dst[0] = UBYTE_TO_CHAN(src[0]); + dst[1] = UBYTE_TO_CHAN(src[1]); + dst[2] = UBYTE_TO_CHAN(src[2]); + dst[3] = UBYTE_TO_CHAN(src[3]); + src += 4; + dst += 4; + } + return; + } } - else if (srcFormat == GL_RGBA) { - GLuint i; - const GLchan *src = (const GLchan *) source; - GLchan *dst = dest; - for (i = 0; i < n; i++) { - dst[0] = src[0]; - dst[1] = src[1]; - dst[2] = src[2]; - src += 4; - dst += 3; + else if (dstFormat == GL_RGB) { + if (srcFormat == GL_RGB) { + GLuint i; + const GLubyte *src = (const GLubyte *) source; + GLchan *dst = dest; + for (i = 0; i < n; i++) { + dst[0] = UBYTE_TO_CHAN(src[0]); + dst[1] = UBYTE_TO_CHAN(src[1]); + dst[2] = UBYTE_TO_CHAN(src[2]); + src += 3; + dst += 3; + } + return; + } + else if (srcFormat == GL_RGBA) { + GLuint i; + const GLubyte *src = (const GLubyte *) source; + GLchan *dst = dest; + for (i = 0; i < n; i++) { + dst[0] = UBYTE_TO_CHAN(src[0]); + dst[1] = UBYTE_TO_CHAN(src[1]); + dst[2] = UBYTE_TO_CHAN(src[2]); + src += 4; + dst += 3; + } + return; } - return; } } - else if (dstFormat == srcFormat) { - GLint comps = _mesa_components_in_format(srcFormat); - assert(comps > 0); - MEMCPY( dest, source, n * comps * sizeof(GLchan) ); - return; - } } diff --git a/xc/extras/Mesa/src/math/m_matrix.c b/xc/extras/Mesa/src/math/m_matrix.c index c0806571e..c71f7e3b5 100644 --- a/xc/extras/Mesa/src/math/m_matrix.c +++ b/xc/extras/Mesa/src/math/m_matrix.c @@ -1,9 +1,9 @@ /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 4.0.2 * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -500,7 +500,14 @@ static inv_mat_func inv_mat_tab[7] = { invert_matrix_general, invert_matrix_identity, invert_matrix_3d_no_rot, +#if 0 + /* Don't use this function for now - it fails when the projection matrix + * is premultiplied by a translation (ala Chromium's tilesort SPU). + */ invert_matrix_perspective, +#else + invert_matrix_general, +#endif invert_matrix_3d, /* lazy! */ invert_matrix_2d_no_rot, invert_matrix_3d diff --git a/xc/extras/Mesa/src/mem.h b/xc/extras/Mesa/src/mem.h index d4e46d402..d27361e76 100644 --- a/xc/extras/Mesa/src/mem.h +++ b/xc/extras/Mesa/src/mem.h @@ -1,9 +1,9 @@ /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 4.0.2 * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -95,6 +95,25 @@ extern void _mesa_align_free(void *ptr); #define ALIGN_FREE(PTR) _mesa_align_free(PTR) +#ifdef MESA_EXTERNAL_BUFFERALLOC +/* + * If you want Mesa's depth/stencil/accum/etc buffers to be allocated + * with a specialized allocator you can define MESA_EXTERNAL_BUFFERALLOC + * and implement _ext_mesa_alloc/free_pixelbuffer() in your app. + * Contributed by Gerk Huisma (gerk@five-d.demon.nl). + */ +extern void *_ext_mesa_alloc_pixelbuffer( unsigned int size ); +extern void _ext_mesa_free_pixelbuffer( void *pb ); + +#define MESA_PBUFFER_ALLOC(BYTES) (void *) _ext_mesa_alloc_pixelbuffer(BYTES) +#define MESA_PBUFFER_FREE(PTR) _ext_mesa_free_pixelbuffer(PTR) +#else +/* Default buffer allocation uses the aligned allocation routines: */ +#define MESA_PBUFFER_ALLOC(BYTES) (void *) _mesa_align_malloc(BYTES, 512) +#define MESA_PBUFFER_FREE(PTR) _mesa_align_free(PTR) +#endif + + /* Memory copy: */ #ifdef SUNOS4 #define MEMCPY( DST, SRC, BYTES) \ diff --git a/xc/extras/Mesa/src/swrast/s_accum.c b/xc/extras/Mesa/src/swrast/s_accum.c index 558c52d9a..1374ec860 100644 --- a/xc/extras/Mesa/src/swrast/s_accum.c +++ b/xc/extras/Mesa/src/swrast/s_accum.c @@ -72,13 +72,13 @@ _mesa_alloc_accum_buffer( GLframebuffer *buffer ) GLint n; if (buffer->Accum) { - FREE( buffer->Accum ); + MESA_PBUFFER_FREE( buffer->Accum ); buffer->Accum = NULL; } /* allocate accumulation buffer if not already present */ n = buffer->Width * buffer->Height * 4 * sizeof(GLaccum); - buffer->Accum = (GLaccum *) MALLOC( n ); + buffer->Accum = (GLaccum *) MESA_PBUFFER_ALLOC( n ); if (!buffer->Accum) { /* unable to setup accumulation buffer */ _mesa_error( NULL, GL_OUT_OF_MEMORY, "glAccum" ); @@ -241,7 +241,6 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value, GLchan rgba[MAX_WIDTH][4]; const GLuint colorMask = *((GLuint *) &ctx->Color.ColorMask); - if (SWRAST_CONTEXT(ctx)->NewState) _swrast_validate_derived( ctx ); diff --git a/xc/extras/Mesa/src/swrast/s_alphabuf.c b/xc/extras/Mesa/src/swrast/s_alphabuf.c index ae90793e3..81b3a3dc9 100644 --- a/xc/extras/Mesa/src/swrast/s_alphabuf.c +++ b/xc/extras/Mesa/src/swrast/s_alphabuf.c @@ -56,9 +56,9 @@ _mesa_alloc_alpha_buffers( GLframebuffer *buffer ) ASSERT(buffer->UseSoftwareAlphaBuffers); if (buffer->FrontLeftAlpha) { - FREE( buffer->FrontLeftAlpha ); + MESA_PBUFFER_FREE( buffer->FrontLeftAlpha ); } - buffer->FrontLeftAlpha = (GLchan *) MALLOC( bytes ); + buffer->FrontLeftAlpha = (GLchan *) MESA_PBUFFER_ALLOC( bytes ); if (!buffer->FrontLeftAlpha) { /* out of memory */ _mesa_error( NULL, GL_OUT_OF_MEMORY, @@ -67,9 +67,9 @@ _mesa_alloc_alpha_buffers( GLframebuffer *buffer ) if (buffer->Visual.doubleBufferMode) { if (buffer->BackLeftAlpha) { - FREE( buffer->BackLeftAlpha ); + MESA_PBUFFER_FREE( buffer->BackLeftAlpha ); } - buffer->BackLeftAlpha = (GLchan *) MALLOC( bytes ); + buffer->BackLeftAlpha = (GLchan *) MESA_PBUFFER_ALLOC( bytes ); if (!buffer->BackLeftAlpha) { /* out of memory */ _mesa_error( NULL, GL_OUT_OF_MEMORY, @@ -79,9 +79,9 @@ _mesa_alloc_alpha_buffers( GLframebuffer *buffer ) if (buffer->Visual.stereoMode) { if (buffer->FrontRightAlpha) { - FREE( buffer->FrontRightAlpha ); + MESA_PBUFFER_FREE( buffer->FrontRightAlpha ); } - buffer->FrontRightAlpha = (GLchan *) MALLOC( bytes ); + buffer->FrontRightAlpha = (GLchan *) MESA_PBUFFER_ALLOC( bytes ); if (!buffer->FrontRightAlpha) { /* out of memory */ _mesa_error( NULL, GL_OUT_OF_MEMORY, @@ -90,9 +90,9 @@ _mesa_alloc_alpha_buffers( GLframebuffer *buffer ) if (buffer->Visual.doubleBufferMode) { if (buffer->BackRightAlpha) { - FREE( buffer->BackRightAlpha ); + MESA_PBUFFER_FREE( buffer->BackRightAlpha ); } - buffer->BackRightAlpha = (GLchan *) MALLOC( bytes ); + buffer->BackRightAlpha = (GLchan *) MESA_PBUFFER_ALLOC( bytes ); if (!buffer->BackRightAlpha) { /* out of memory */ _mesa_error( NULL, GL_OUT_OF_MEMORY, diff --git a/xc/extras/Mesa/src/swrast/s_depth.c b/xc/extras/Mesa/src/swrast/s_depth.c index cb7f99840..1270102e8 100644 --- a/xc/extras/Mesa/src/swrast/s_depth.c +++ b/xc/extras/Mesa/src/swrast/s_depth.c @@ -1493,7 +1493,7 @@ _mesa_alloc_depth_buffer( GLframebuffer *buffer ) /* deallocate current depth buffer if present */ if (buffer->DepthBuffer) { - FREE(buffer->DepthBuffer); + MESA_PBUFFER_FREE(buffer->DepthBuffer); buffer->DepthBuffer = NULL; } @@ -1503,7 +1503,7 @@ _mesa_alloc_depth_buffer( GLframebuffer *buffer ) else bytesPerValue = sizeof(GLuint); - buffer->DepthBuffer =MALLOC(buffer->Width * buffer->Height * bytesPerValue); + buffer->DepthBuffer = MESA_PBUFFER_ALLOC(buffer->Width * buffer->Height * bytesPerValue); if (!buffer->DepthBuffer) { /* out of memory */ diff --git a/xc/extras/Mesa/src/swrast/s_linetemp.h b/xc/extras/Mesa/src/swrast/s_linetemp.h index e2abdf2c9..ff7a8346b 100644 --- a/xc/extras/Mesa/src/swrast/s_linetemp.h +++ b/xc/extras/Mesa/src/swrast/s_linetemp.h @@ -1,9 +1,9 @@ /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 4.0.2 * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -272,7 +272,7 @@ ystep = -1; #endif #if defined(INTERP_Z) && defined(DEPTH_TYPE) - zPtrYstep = -ctx->DrawBuffer->Width * ((GLint)sizeof(DEPTH_TYPE)); + zPtrYstep = -((GLint) (ctx->DrawBuffer->Width * sizeof(DEPTH_TYPE))); #endif #ifdef PIXEL_ADDRESS pixelYstep = BYTES_PER_ROW; @@ -283,7 +283,7 @@ ystep = 1; #endif #if defined(INTERP_Z) && defined(DEPTH_TYPE) - zPtrYstep = ctx->DrawBuffer->Width * ((GLint)sizeof(DEPTH_TYPE)); + zPtrYstep = (GLint) (ctx->DrawBuffer->Width * sizeof(DEPTH_TYPE)); #endif #ifdef PIXEL_ADDRESS pixelYstep = -(BYTES_PER_ROW); diff --git a/xc/extras/Mesa/src/swrast/s_stencil.c b/xc/extras/Mesa/src/swrast/s_stencil.c index 173520a0d..70ba70488 100644 --- a/xc/extras/Mesa/src/swrast/s_stencil.c +++ b/xc/extras/Mesa/src/swrast/s_stencil.c @@ -1112,12 +1112,12 @@ _mesa_alloc_stencil_buffer( GLframebuffer *buffer ) { /* deallocate current stencil buffer if present */ if (buffer->Stencil) { - FREE(buffer->Stencil); + MESA_PBUFFER_FREE(buffer->Stencil); buffer->Stencil = NULL; } /* allocate new stencil buffer */ - buffer->Stencil = (GLstencil *) MALLOC(buffer->Width * buffer->Height + buffer->Stencil = (GLstencil *) MESA_PBUFFER_ALLOC(buffer->Width * buffer->Height * sizeof(GLstencil)); if (!buffer->Stencil) { /* out of memory */ diff --git a/xc/extras/Mesa/src/teximage.c b/xc/extras/Mesa/src/teximage.c index 0bd6d6fa5..af0425225 100644 --- a/xc/extras/Mesa/src/teximage.c +++ b/xc/extras/Mesa/src/teximage.c @@ -1,9 +1,9 @@ /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 4.0.2 * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -381,7 +381,7 @@ void _mesa_free_texture_image( struct gl_texture_image *teximage ) { if (teximage->Data) { - FREE( teximage->Data ); + MESA_PBUFFER_FREE( teximage->Data ); teximage->Data = NULL; } FREE( teximage ); @@ -1349,7 +1349,7 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat, } else if (texImage->Data) { /* free the old texture data */ - FREE(texImage->Data); + MESA_PBUFFER_FREE(texImage->Data); texImage->Data = NULL; } clear_teximage_fields(texImage); /* not really needed, but helpful */ @@ -1474,7 +1474,7 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat, } else if (texImage->Data) { /* free the old texture data */ - FREE(texImage->Data); + MESA_PBUFFER_FREE(texImage->Data); texImage->Data = NULL; } clear_teximage_fields(texImage); /* not really needed, but helpful */ @@ -1595,7 +1595,7 @@ _mesa_TexImage3D( GLenum target, GLint level, GLenum internalFormat, } } else if (texImage->Data) { - FREE(texImage->Data); + MESA_PBUFFER_FREE(texImage->Data); texImage->Data = NULL; } clear_teximage_fields(texImage); /* not really needed, but helpful */ @@ -1865,7 +1865,7 @@ _mesa_CopyTexImage1D( GLenum target, GLint level, } else if (texImage->Data) { /* free the old texture data */ - FREE(texImage->Data); + MESA_PBUFFER_FREE(texImage->Data); texImage->Data = NULL; } @@ -1929,7 +1929,7 @@ _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat, } else if (texImage->Data) { /* free the old texture data */ - FREE(texImage->Data); + MESA_PBUFFER_FREE(texImage->Data); texImage->Data = NULL; } @@ -2114,7 +2114,7 @@ _mesa_CompressedTexImage1DARB(GLenum target, GLint level, } } else if (texImage->Data) { - FREE(texImage->Data); + MESA_PBUFFER_FREE(texImage->Data); texImage->Data = NULL; } @@ -2213,7 +2213,7 @@ _mesa_CompressedTexImage2DARB(GLenum target, GLint level, } } else if (texImage->Data) { - FREE(texImage->Data); + MESA_PBUFFER_FREE(texImage->Data); texImage->Data = NULL; } @@ -2311,7 +2311,7 @@ _mesa_CompressedTexImage3DARB(GLenum target, GLint level, } } else if (texImage->Data) { - FREE(texImage->Data); + MESA_PBUFFER_FREE(texImage->Data); texImage->Data = NULL; } diff --git a/xc/extras/Mesa/src/texstore.c b/xc/extras/Mesa/src/texstore.c index 39f099f12..c74a72ee4 100644 --- a/xc/extras/Mesa/src/texstore.c +++ b/xc/extras/Mesa/src/texstore.c @@ -1,9 +1,9 @@ /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 4.0.2 * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -644,7 +644,7 @@ _mesa_store_teximage1d(GLcontext *ctx, GLenum target, GLint level, } /* allocate memory */ - texImage->Data = MALLOC(sizeInBytes); + texImage->Data = MESA_PBUFFER_ALLOC(sizeInBytes); if (!texImage->Data) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage1D"); return; @@ -717,7 +717,7 @@ _mesa_store_teximage2d(GLcontext *ctx, GLenum target, GLint level, } /* allocate memory */ - texImage->Data = MALLOC(sizeInBytes); + texImage->Data = MESA_PBUFFER_ALLOC(sizeInBytes); if (!texImage->Data) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D"); return; @@ -783,7 +783,7 @@ _mesa_store_teximage3d(GLcontext *ctx, GLenum target, GLint level, } /* allocate memory */ - texImage->Data = MALLOC(sizeInBytes); + texImage->Data = MESA_PBUFFER_ALLOC(sizeInBytes); if (!texImage->Data) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage3D"); return; @@ -1704,7 +1704,7 @@ _mesa_generate_mipmap(GLcontext *ctx, /* Free old image data */ if (dstImage->Data) - FREE(dstImage->Data); + MESA_PBUFFER_FREE(dstImage->Data); /* initialize new image */ _mesa_init_teximage_fields(ctx, dstImage, dstWidth, dstHeight, @@ -1718,7 +1718,7 @@ _mesa_generate_mipmap(GLcontext *ctx, ASSERT(dstWidth * dstHeight * dstDepth * bytesPerTexel > 0); /* alloc new image buffer */ - dstImage->Data = MALLOC(dstWidth * dstHeight * dstDepth + dstImage->Data = MESA_PBUFFER_ALLOC(dstWidth * dstHeight * dstDepth * bytesPerTexel); if (!dstImage->Data) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "generating mipmaps"); diff --git a/xc/extras/Mesa/src/varray.c b/xc/extras/Mesa/src/varray.c index 4918dfd21..f400f9ef5 100644 --- a/xc/extras/Mesa/src/varray.c +++ b/xc/extras/Mesa/src/varray.c @@ -1,9 +1,9 @@ /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 4.0.3 * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -140,7 +140,7 @@ _mesa_NormalPointer(GLenum type, GLsizei stride, const GLvoid *ptr ) ctx->Array.Normal.Stride = stride; ctx->Array.Normal.Ptr = (void *) ptr; ctx->NewState |= _NEW_ARRAY; - ctx->Array.NewState |= _NEW_ARRAY_VERTEX; + ctx->Array.NewState |= _NEW_ARRAY_NORMAL; if (ctx->Driver.NormalPointer) ctx->Driver.NormalPointer( ctx, type, stride, ptr ); @@ -205,7 +205,7 @@ _mesa_ColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr) ctx->Array.Color.Stride = stride; ctx->Array.Color.Ptr = (void *) ptr; ctx->NewState |= _NEW_ARRAY; - ctx->Array.NewState |= _NEW_ARRAY_VERTEX; + ctx->Array.NewState |= _NEW_ARRAY_COLOR; if (ctx->Driver.ColorPointer) ctx->Driver.ColorPointer( ctx, size, type, stride, ptr ); @@ -242,7 +242,7 @@ _mesa_FogCoordPointerEXT(GLenum type, GLsizei stride, const GLvoid *ptr) ctx->Array.FogCoord.Stride = stride; ctx->Array.FogCoord.Ptr = (void *) ptr; ctx->NewState |= _NEW_ARRAY; - ctx->Array.NewState |= _NEW_ARRAY_VERTEX; + ctx->Array.NewState |= _NEW_ARRAY_FOGCOORD; if (ctx->Driver.FogCoordPointer) ctx->Driver.FogCoordPointer( ctx, type, stride, ptr ); @@ -287,7 +287,7 @@ _mesa_IndexPointer(GLenum type, GLsizei stride, const GLvoid *ptr) ctx->Array.Index.Stride = stride; ctx->Array.Index.Ptr = (void *) ptr; ctx->NewState |= _NEW_ARRAY; - ctx->Array.NewState |= _NEW_ARRAY_VERTEX; + ctx->Array.NewState |= _NEW_ARRAY_INDEX; if (ctx->Driver.IndexPointer) ctx->Driver.IndexPointer( ctx, type, stride, ptr ); @@ -352,7 +352,7 @@ _mesa_SecondaryColorPointerEXT(GLint size, GLenum type, ctx->Array.SecondaryColor.Stride = stride; ctx->Array.SecondaryColor.Ptr = (void *) ptr; ctx->NewState |= _NEW_ARRAY; - ctx->Array.NewState |= _NEW_ARRAY_VERTEX; + ctx->Array.NewState |= _NEW_ARRAY_SECONDARYCOLOR; if (ctx->Driver.SecondaryColorPointer) ctx->Driver.SecondaryColorPointer( ctx, size, type, stride, ptr ); @@ -408,7 +408,7 @@ _mesa_TexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr ctx->Array.TexCoord[texUnit].Stride = stride; ctx->Array.TexCoord[texUnit].Ptr = (void *) ptr; ctx->NewState |= _NEW_ARRAY; - ctx->Array.NewState |= _NEW_ARRAY_VERTEX; + ctx->Array.NewState |= _NEW_ARRAY_TEXCOORD(texUnit); /* fprintf(stderr, "%s ptr %p\n", __FUNCTION__, ptr); */ @@ -434,7 +434,7 @@ _mesa_EdgeFlagPointer(GLsizei stride, const void *vptr) ctx->Array.EdgeFlag.StrideB = stride ? stride : sizeof(GLboolean); ctx->Array.EdgeFlag.Ptr = (GLboolean *) ptr; ctx->NewState |= _NEW_ARRAY; - ctx->Array.NewState |= _NEW_ARRAY_VERTEX; + ctx->Array.NewState |= _NEW_ARRAY_EDGEFLAG; if (ctx->Driver.EdgeFlagPointer) ctx->Driver.EdgeFlagPointer( ctx, stride, ptr ); diff --git a/xc/lib/GL/glx/glxcmds.c b/xc/lib/GL/glx/glxcmds.c index 3c3991fce..6809d15ae 100644 --- a/xc/lib/GL/glx/glxcmds.c +++ b/xc/lib/GL/glx/glxcmds.c @@ -87,6 +87,9 @@ GLXContext CreateContext(Display *dpy, XVisualInfo *vis, __GLXdisplayPrivate *priv; #endif + if (!dpy || !vis) + return NULL; + opcode = __glXSetupForCommand(dpy); if (!opcode) { return NULL; diff --git a/xc/lib/GL/mesa/src/drv/gamma/gamma_inithw.c b/xc/lib/GL/mesa/src/drv/gamma/gamma_inithw.c index ea0edc545..608502e70 100644 --- a/xc/lib/GL/mesa/src/drv/gamma/gamma_inithw.c +++ b/xc/lib/GL/mesa/src/drv/gamma/gamma_inithw.c @@ -196,28 +196,6 @@ void gammaInitHW( gammaContextPtr gmesa ) gmesa->ColorDDAMode = (ColorDDAEnable | ColorDDAGouraud); -#ifdef CULL_ALL_PRIMS - gmesa->GeometryMode = (GM_TextureDisable | - GM_FogDisable | - GM_FogExp | - GM_FrontPolyFill | - GM_BackPolyFill | - GM_FrontFaceCCW | - GM_PolyCullDisable | - GM_PolyCullBoth | - GM_ClipShortLinesDisable | - GM_ClipSmallTrisDisable | - GM_RenderMode | - GM_Feedback2D | - GM_CullFaceNormDisable | - GM_AutoFaceNormDisable | - GM_GouraudShading | - GM_UserClipNone | - GM_PolyOffsetPointDisable | - GM_PolyOffsetLineDisable | - GM_PolyOffsetFillDisable | - GM_InvertFaceNormCullDisable); -#else gmesa->GeometryMode = (GM_TextureDisable | GM_FogDisable | GM_FogExp | @@ -238,7 +216,6 @@ void gammaInitHW( gammaContextPtr gmesa ) GM_PolyOffsetLineDisable | GM_PolyOffsetFillDisable | GM_InvertFaceNormCullDisable); -#endif gmesa->AlphaTestMode = (AlphaTestModeDisable | AT_Always); @@ -293,46 +270,25 @@ void gammaInitHW( gammaContextPtr gmesa ) XM_TexGenModeR_None | XM_TexGenModeQ_None; - /* Set MXs to known state */ - CHECK_DMA_BUFFER(gmesa, 24); - WRITE(gmesa->buf, RasterizerMode, 0); - WRITE(gmesa->buf, AreaStippleMode, 0); + CHECK_DMA_BUFFER(gmesa, 20); WRITE(gmesa->buf, LineStippleMode, 0); - WRITE(gmesa->buf, ScissorMode, 0); WRITE(gmesa->buf, RouterMode, 0); WRITE(gmesa->buf, TextureAddressMode, 0); WRITE(gmesa->buf, TextureReadMode, 0); WRITE(gmesa->buf, TextureFilterMode, 0); - WRITE(gmesa->buf, ColorDDAMode, 0); WRITE(gmesa->buf, TextureColorMode, 0); - WRITE(gmesa->buf, FogMode, 0); - WRITE(gmesa->buf, AntialiasMode, 0); - WRITE(gmesa->buf, LBReadMode, 0); - WRITE(gmesa->buf, GLINTWindow, 0); WRITE(gmesa->buf, StencilMode, 0); - WRITE(gmesa->buf, DepthMode, 0); - WRITE(gmesa->buf, LBWriteMode, 0); - WRITE(gmesa->buf, FBReadMode, 0); WRITE(gmesa->buf, PatternRamMode, 0); WRITE(gmesa->buf, ChromaTestMode, 0); - WRITE(gmesa->buf, DitherMode, 0); - WRITE(gmesa->buf, LogicalOpMode, 0); - WRITE(gmesa->buf, FBWriteMode, 0); WRITE(gmesa->buf, StatisticMode, 0); - - /* Set Gamma to known state */ - CHECK_DMA_BUFFER(gmesa, 9); + WRITE(gmesa->buf, AreaStippleMode, gmesa->AreaStippleMode); + WRITE(gmesa->buf, ScissorMode, gmesa->ScissorMode); + WRITE(gmesa->buf, FogMode, gmesa->FogMode); + WRITE(gmesa->buf, AntialiasMode, gmesa->AntialiasMode); + WRITE(gmesa->buf, LogicalOpMode, gmesa->LogicalOpMode); WRITE(gmesa->buf, TriangleMode, gmesa->TriangleMode); - WRITE(gmesa->buf, GeometryMode, 0); - WRITE(gmesa->buf, NormalizeMode, 0); - WRITE(gmesa->buf, ColorMaterialMode, 0); - WRITE(gmesa->buf, MaterialMode, 0); WRITE(gmesa->buf, PointMode, gmesa->PointMode); WRITE(gmesa->buf, LineMode, gmesa->LineMode); - WRITE(gmesa->buf, TransformMode, 0); - WRITE(gmesa->buf, DeltaMode, 0); - - CHECK_DMA_BUFFER(gmesa, 2); WRITE(gmesa->buf, LBWriteFormat, gmesa->LBWriteFormat); WRITE(gmesa->buf, LBReadFormat, gmesa->LBReadFormat); diff --git a/xc/lib/GL/mesa/src/drv/gamma/gamma_vb.c b/xc/lib/GL/mesa/src/drv/gamma/gamma_vb.c index 552b47cd3..6fb0371d4 100644 --- a/xc/lib/GL/mesa/src/drv/gamma/gamma_vb.c +++ b/xc/lib/GL/mesa/src/drv/gamma/gamma_vb.c @@ -45,7 +45,9 @@ #define GAMMA_RGBA_BIT 0x2 #define GAMMA_XYZW_BIT 0x4 #define GAMMA_PTEX_BIT 0x8 -#define GAMMA_MAX_SETUP 0x10 +#define GAMMA_FOG_BIT 0x10 +#define GAMMA_SPEC_BIT 0x20 +#define GAMMA_MAX_SETUP 0x40 static struct { void (*emit)( GLcontext *, GLuint, GLuint, void *, GLuint ); @@ -57,12 +59,9 @@ static struct { GLuint vertex_format; } setup_tab[GAMMA_MAX_SETUP]; - -/* Only one vertex format, atm, so no need to give them names: - */ -#define TINY_VERTEX_FORMAT 0 -#define NOTEX_VERTEX_FORMAT 0 -#define TEX0_VERTEX_FORMAT 0 +#define TINY_VERTEX_FORMAT 1 +#define NOTEX_VERTEX_FORMAT 2 +#define TEX0_VERTEX_FORMAT 3 #define TEX1_VERTEX_FORMAT 0 #define PROJ_TEX1_VERTEX_FORMAT 0 #define TEX2_VERTEX_FORMAT 0 @@ -71,8 +70,8 @@ static struct { #define DO_XYZW (IND & GAMMA_XYZW_BIT) #define DO_RGBA (IND & GAMMA_RGBA_BIT) -#define DO_SPEC 0 -#define DO_FOG 0 +#define DO_SPEC (IND & GAMMA_SPEC_BIT) +#define DO_FOG (IND & GAMMA_FOG_BIT) #define DO_TEX0 (IND & GAMMA_TEX0_BIT) #define DO_TEX1 0 #define DO_TEX2 0 @@ -82,7 +81,7 @@ static struct { #define VERTEX gammaVertex #define GET_VIEWPORT_MAT() 0 #define GET_TEXSOURCE(n) n -#define GET_VERTEX_FORMAT() 0 +#define GET_VERTEX_FORMAT() GAMMA_CONTEXT(ctx)->vertex_format #define GET_VERTEX_STORE() GAMMA_CONTEXT(ctx)->verts #define GET_VERTEX_STRIDE_SHIFT() GAMMA_CONTEXT(ctx)->vertex_stride_shift #define INVALIDATE_STORED_VERTICES() @@ -92,7 +91,7 @@ static struct { #define HAVE_HW_VIEWPORT 1 #define HAVE_HW_DIVIDE 1 #define HAVE_RGBA_COLOR 0 /* we're BGRA */ -#define HAVE_TINY_VERTICES 0 +#define HAVE_TINY_VERTICES 1 #define HAVE_NOTEX_VERTICES 1 #define HAVE_TEX0_VERTICES 1 #define HAVE_TEX1_VERTICES 0 @@ -122,11 +121,14 @@ static struct { * Generate vertex emit and interp functions * ***********************************************************************/ - #define IND (GAMMA_XYZW_BIT|GAMMA_RGBA_BIT) #define TAG(x) x##_wg #include "tnl_dd/t_dd_vbtmp.h" +#define IND (GAMMA_XYZW_BIT|GAMMA_RGBA_BIT|GAMMA_SPEC_BIT) +#define TAG(x) x##_wgs +#include "tnl_dd/t_dd_vbtmp.h" + #define IND (GAMMA_XYZW_BIT|GAMMA_RGBA_BIT|GAMMA_TEX0_BIT) #define TAG(x) x##_wgt0 #include "tnl_dd/t_dd_vbtmp.h" @@ -135,82 +137,124 @@ static struct { #define TAG(x) x##_wgpt0 #include "tnl_dd/t_dd_vbtmp.h" +#define IND (GAMMA_XYZW_BIT|GAMMA_RGBA_BIT|GAMMA_SPEC_BIT|GAMMA_TEX0_BIT) +#define TAG(x) x##_wgst0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_XYZW_BIT|GAMMA_RGBA_BIT|GAMMA_SPEC_BIT|GAMMA_TEX0_BIT|\ + GAMMA_PTEX_BIT) +#define TAG(x) x##_wgspt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_XYZW_BIT|GAMMA_RGBA_BIT|GAMMA_FOG_BIT) +#define TAG(x) x##_wgf +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_XYZW_BIT|GAMMA_RGBA_BIT|GAMMA_FOG_BIT|GAMMA_SPEC_BIT) +#define TAG(x) x##_wgfs +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_XYZW_BIT|GAMMA_RGBA_BIT|GAMMA_FOG_BIT|GAMMA_TEX0_BIT) +#define TAG(x) x##_wgft0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_XYZW_BIT|GAMMA_RGBA_BIT|GAMMA_FOG_BIT|GAMMA_TEX0_BIT|\ + GAMMA_PTEX_BIT) +#define TAG(x) x##_wgfpt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_XYZW_BIT|GAMMA_RGBA_BIT|GAMMA_FOG_BIT|GAMMA_SPEC_BIT|\ + GAMMA_TEX0_BIT) +#define TAG(x) x##_wgfst0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_XYZW_BIT|GAMMA_RGBA_BIT|GAMMA_FOG_BIT|GAMMA_SPEC_BIT|\ + GAMMA_TEX0_BIT|GAMMA_PTEX_BIT) +#define TAG(x) x##_wgfspt0 +#include "tnl_dd/t_dd_vbtmp.h" + #define IND (GAMMA_TEX0_BIT) #define TAG(x) x##_t0 #include "tnl_dd/t_dd_vbtmp.h" +#define IND (GAMMA_FOG_BIT) +#define TAG(x) x##_f +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_FOG_BIT|GAMMA_TEX0_BIT) +#define TAG(x) x##_ft0 +#include "tnl_dd/t_dd_vbtmp.h" + #define IND (GAMMA_RGBA_BIT) #define TAG(x) x##_g #include "tnl_dd/t_dd_vbtmp.h" +#define IND (GAMMA_RGBA_BIT|GAMMA_SPEC_BIT) +#define TAG(x) x##_gs +#include "tnl_dd/t_dd_vbtmp.h" + #define IND (GAMMA_RGBA_BIT|GAMMA_TEX0_BIT) #define TAG(x) x##_gt0 #include "tnl_dd/t_dd_vbtmp.h" +#define IND (GAMMA_RGBA_BIT|GAMMA_SPEC_BIT|GAMMA_TEX0_BIT) +#define TAG(x) x##_gst0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_RGBA_BIT|GAMMA_FOG_BIT) +#define TAG(x) x##_gf +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_RGBA_BIT|GAMMA_FOG_BIT|GAMMA_SPEC_BIT) +#define TAG(x) x##_gfs +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_RGBA_BIT|GAMMA_FOG_BIT|GAMMA_TEX0_BIT) +#define TAG(x) x##_gft0 +#include "tnl_dd/t_dd_vbtmp.h" +#define IND (GAMMA_RGBA_BIT|GAMMA_FOG_BIT|GAMMA_SPEC_BIT|GAMMA_TEX0_BIT) +#define TAG(x) x##_gfst0 +#include "tnl_dd/t_dd_vbtmp.h" static void init_setup_tab( void ) { init_wg(); + init_wgs(); init_wgt0(); init_wgpt0(); + init_wgst0(); + init_wgspt0(); + init_wgf(); + init_wgfs(); + init_wgft0(); + init_wgfpt0(); + init_wgfst0(); + init_wgfspt0(); init_t0(); + init_f(); + init_ft0(); init_g(); + init_gs(); init_gt0(); + init_gst0(); + init_gf(); + init_gfs(); + init_gft0(); + init_gfst0(); } - -#if 0 -void gammaPrintSetupFlags(char *msg, GLuint flags ) -{ - fprintf(stderr, "%s(%x): %s%s%s%s%s%s\n", - msg, - (int)flags, - (flags & GAMMA_XYZW_BIT) ? " xyzw," : "", - (flags & GAMMA_RGBA_BIT) ? " rgba," : "", - (flags & GAMMA_SPEC_BIT) ? " spec," : "", - (flags & GAMMA_FOG_BIT) ? " fog," : "", - (flags & GAMMA_TEX0_BIT) ? " tex-0," : "", - (flags & GAMMA_TEX1_BIT) ? " tex-1," : ""); -} -#endif - - void gammaCheckTexSizes( GLcontext *ctx ) { TNLcontext *tnl = TNL_CONTEXT(ctx); gammaContextPtr gmesa = GAMMA_CONTEXT( ctx ); -#if 0 if (!setup_tab[gmesa->SetupIndex].check_tex_sizes(ctx)) { /* Invalidate stored verts */ gmesa->SetupNewInputs = ~0; gmesa->SetupIndex |= GAMMA_PTEX_BIT; - if (/*!gmesa->Fallback && */ - !(ctx->_TriangleCaps & (DD_TRI_LIGHT_TWOSIDE|DD_TRI_UNFILLED))) { - tnl->Driver.Render.Interp = setup_tab[gmesa->SetupIndex].interp; - tnl->Driver.Render.CopyPV = setup_tab[gmesa->SetupIndex].copy_pv; - } - } -#endif - - if (!setup_tab[gmesa->SetupIndex].check_tex_sizes(ctx)) { - GLuint ind = gmesa->SetupIndex |= (GAMMA_PTEX_BIT|GAMMA_RGBA_BIT); - - /* Radeon handles projective textures nicely; just have to change - * up to the new vertex format. - */ -#if 0 - if (setup_tab[ind].vertex_format != gmesa->vertex_format) { - RADEON_STATECHANGE(gmesa, 0); - gmesa->vertex_format = setup_tab[ind].vertex_format; - gmesa->vertex_size = setup_tab[ind].vertex_size; - gmesa->vertex_stride_shift = setup_tab[ind].vertex_stride_shift; - } -#endif - if (!(ctx->_TriangleCaps & (DD_TRI_LIGHT_TWOSIDE|DD_TRI_UNFILLED))) { tnl->Driver.Render.Interp = setup_tab[gmesa->SetupIndex].interp; tnl->Driver.Render.CopyPV = setup_tab[gmesa->SetupIndex].copy_pv; @@ -234,23 +278,29 @@ void gammaBuildVertices( GLcontext *ctx, return; if (newinputs & VERT_CLIP) { - setup_tab[gmesa->SetupIndex].emit( ctx, start, count, v, stride ); + setup_tab[gmesa->SetupIndex].emit( ctx, start, count, v, stride ); } else { GLuint ind = 0; if (newinputs & VERT_RGBA) ind |= GAMMA_RGBA_BIT; - + + if (newinputs & VERT_SPEC_RGB) + ind |= GAMMA_SPEC_BIT; + if (newinputs & VERT_TEX0) ind |= GAMMA_TEX0_BIT; + if (newinputs & VERT_FOG_COORD) + ind |= GAMMA_FOG_BIT; + if (gmesa->SetupIndex & GAMMA_PTEX_BIT) ind = ~0; ind &= gmesa->SetupIndex; if (ind) { - setup_tab[ind].emit( ctx, start, count, v, stride ); + setup_tab[ind].emit( ctx, start, count, v, stride ); } } } @@ -261,14 +311,26 @@ void gammaChooseVertexState( GLcontext *ctx ) TNLcontext *tnl = TNL_CONTEXT(ctx); GLuint ind = GAMMA_XYZW_BIT|GAMMA_RGBA_BIT; + if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) + ind |= GAMMA_SPEC_BIT; + + if (ctx->Fog.Enabled) + ind |= GAMMA_FOG_BIT; + if (ctx->Texture._ReallyEnabled) { _tnl_need_projected_coords( ctx, GL_FALSE ); ind |= GAMMA_TEX0_BIT; } else - _tnl_need_projected_coords( ctx, GL_TRUE ); + _tnl_need_projected_coords( ctx, GL_FALSE ); gmesa->SetupIndex = ind; + if (setup_tab[ind].vertex_format != gmesa->vertex_format) { + gmesa->vertex_format = setup_tab[ind].vertex_format; + gmesa->vertex_size = setup_tab[ind].vertex_size; + gmesa->vertex_stride_shift = setup_tab[ind].vertex_stride_shift; + } + if (ctx->_TriangleCaps & (DD_TRI_LIGHT_TWOSIDE|DD_TRI_UNFILLED)) { tnl->Driver.Render.Interp = gamma_interp_extras; tnl->Driver.Render.CopyPV = gamma_copy_pv_extras; diff --git a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.c b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.c index e204498ea..dfd47da84 100644 --- a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.c +++ b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.c @@ -975,7 +975,7 @@ tdfxDDTexImage2D(GLcontext *ctx, GLenum target, GLint level, 0, /* dstImageStride */ format, type, pixels, packing); assert(!texImage->Data); - texImage->Data = MALLOC(mml->width * mml->height * texelBytes); + texImage->Data = MESA_PBUFFER_ALLOC(mml->width * mml->height * texelBytes); if (!texImage->Data) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D"); FREE(tempImage); @@ -991,7 +991,7 @@ tdfxDDTexImage2D(GLcontext *ctx, GLenum target, GLint level, else { /* no rescaling needed */ assert(!texImage->Data); - texImage->Data = MALLOC(mml->width * mml->height * texelBytes); + texImage->Data = MESA_PBUFFER_ALLOC(mml->width * mml->height * texelBytes); if (!texImage->Data) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D"); return; -- cgit v1.2.3