Compare commits
13 Commits
mesa_3_1_b
...
kw-mesa-1
Author | SHA1 | Date | |
---|---|---|---|
|
485f040741 | ||
|
a7313e045d | ||
|
3af541c541 | ||
|
37290c844c | ||
|
1076e7cd21 | ||
|
6a659315cd | ||
|
2ed47d29c6 | ||
|
d598ca05e1 | ||
|
08a454c7af | ||
|
dcf11bdb93 | ||
|
63fee8b3be | ||
|
45b95f048d | ||
|
69cfdb2fcb |
@@ -1,13 +1,13 @@
|
||||
/*
|
||||
* Copyright (c) 1993-1997, Silicon Graphics, Inc.
|
||||
* ALL RIGHTS RESERVED
|
||||
* Permission to use, copy, modify, and distribute this software for
|
||||
* ALL RIGHTS RESERVED
|
||||
* Permission to use, copy, modify, and distribute this software for
|
||||
* any purpose and without fee is hereby granted, provided that the above
|
||||
* copyright notice appear in all copies and that both the copyright notice
|
||||
* and this permission notice appear in supporting documentation, and that
|
||||
* and this permission notice appear in supporting documentation, and that
|
||||
* the name of Silicon Graphics, Inc. not be used in advertising
|
||||
* or publicity pertaining to distribution of the software without specific,
|
||||
* written prior permission.
|
||||
* written prior permission.
|
||||
*
|
||||
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
|
||||
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
|
||||
@@ -21,8 +21,8 @@
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
|
||||
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* US Government Users Restricted Rights
|
||||
*
|
||||
* US Government Users Restricted Rights
|
||||
* Use, duplication, or disclosure by the Government is subject to
|
||||
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
|
||||
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
|
||||
@@ -45,7 +45,7 @@
|
||||
* Note the exterior rectangle is drawn with its vertices
|
||||
* in counter-clockwise order, but its interior clockwise.
|
||||
* Note the combineCallback is needed for the self-intersecting
|
||||
* star. Also note that removing the TessProperty for the
|
||||
* star. Also note that removing the TessProperty for the
|
||||
* star will make the interior unshaded (WINDING_ODD).
|
||||
*/
|
||||
#include <GL/glut.h>
|
||||
@@ -102,7 +102,7 @@ void CALLBACK vertexCallback(GLvoid *vertex)
|
||||
* but weight[4] may be used to average color, normal, or texture
|
||||
* coordinate data. In this program, color is weighted.
|
||||
*/
|
||||
void CALLBACK combineCallback(GLdouble coords[3],
|
||||
void CALLBACK combineCallback(GLdouble coords[3],
|
||||
GLdouble *vertex_data[4],
|
||||
GLfloat weight[4], GLdouble **dataOut )
|
||||
{
|
||||
@@ -114,15 +114,15 @@ void CALLBACK combineCallback(GLdouble coords[3],
|
||||
vertex[0] = coords[0];
|
||||
vertex[1] = coords[1];
|
||||
vertex[2] = coords[2];
|
||||
for (i = 3; i < 7; i++)
|
||||
vertex[i] = weight[0] * vertex_data[0][i]
|
||||
for (i = 3; i < 6; i++)
|
||||
vertex[i] = weight[0] * vertex_data[0][i]
|
||||
+ weight[1] * vertex_data[1][i]
|
||||
+ weight[2] * vertex_data[2][i]
|
||||
+ weight[2] * vertex_data[2][i]
|
||||
+ weight[3] * vertex_data[3][i];
|
||||
*dataOut = vertex;
|
||||
}
|
||||
|
||||
void init (void)
|
||||
void init (void)
|
||||
{
|
||||
GLUtesselator *tobj;
|
||||
GLdouble rect[4][3] = {50.0, 50.0, 0.0,
|
||||
@@ -143,18 +143,18 @@ void init (void)
|
||||
startList = glGenLists(2);
|
||||
|
||||
tobj = gluNewTess();
|
||||
gluTessCallback(tobj, GLU_TESS_VERTEX,
|
||||
gluTessCallback(tobj, GLU_TESS_VERTEX,
|
||||
(GLvoid (CALLBACK*) ()) &glVertex3dv);
|
||||
gluTessCallback(tobj, GLU_TESS_BEGIN,
|
||||
gluTessCallback(tobj, GLU_TESS_BEGIN,
|
||||
(GLvoid (CALLBACK*) ()) &beginCallback);
|
||||
gluTessCallback(tobj, GLU_TESS_END,
|
||||
gluTessCallback(tobj, GLU_TESS_END,
|
||||
(GLvoid (CALLBACK*) ()) &endCallback);
|
||||
gluTessCallback(tobj, GLU_TESS_ERROR,
|
||||
gluTessCallback(tobj, GLU_TESS_ERROR,
|
||||
(GLvoid (CALLBACK*) ()) &errorCallback);
|
||||
|
||||
/* rectangle with triangular hole inside */
|
||||
glNewList(startList, GL_COMPILE);
|
||||
glShadeModel(GL_FLAT);
|
||||
glShadeModel(GL_FLAT);
|
||||
gluTessBeginPolygon(tobj, NULL);
|
||||
gluTessBeginContour(tobj);
|
||||
gluTessVertex(tobj, rect[0], rect[0]);
|
||||
@@ -170,20 +170,20 @@ void init (void)
|
||||
gluTessEndPolygon(tobj);
|
||||
glEndList();
|
||||
|
||||
gluTessCallback(tobj, GLU_TESS_VERTEX,
|
||||
gluTessCallback(tobj, GLU_TESS_VERTEX,
|
||||
(GLvoid (CALLBACK*) ()) &vertexCallback);
|
||||
gluTessCallback(tobj, GLU_TESS_BEGIN,
|
||||
gluTessCallback(tobj, GLU_TESS_BEGIN,
|
||||
(GLvoid (CALLBACK*) ()) &beginCallback);
|
||||
gluTessCallback(tobj, GLU_TESS_END,
|
||||
gluTessCallback(tobj, GLU_TESS_END,
|
||||
(GLvoid (CALLBACK*) ()) &endCallback);
|
||||
gluTessCallback(tobj, GLU_TESS_ERROR,
|
||||
gluTessCallback(tobj, GLU_TESS_ERROR,
|
||||
(GLvoid (CALLBACK*) ()) &errorCallback);
|
||||
gluTessCallback(tobj, GLU_TESS_COMBINE,
|
||||
gluTessCallback(tobj, GLU_TESS_COMBINE,
|
||||
(GLvoid (CALLBACK*) ()) &combineCallback);
|
||||
|
||||
/* smooth shaded, self-intersecting star */
|
||||
glNewList(startList + 1, GL_COMPILE);
|
||||
glShadeModel(GL_SMOOTH);
|
||||
glShadeModel(GL_SMOOTH);
|
||||
gluTessProperty(tobj, GLU_TESS_WINDING_RULE,
|
||||
GLU_TESS_WINDING_POSITIVE);
|
||||
gluTessBeginPolygon(tobj, NULL);
|
||||
@@ -228,7 +228,7 @@ int main(int argc, char** argv)
|
||||
glutReshapeFunc(reshape);
|
||||
glutKeyboardFunc(keyboard);
|
||||
glutMainLoop();
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else
|
||||
|
@@ -29,7 +29,8 @@ INCDIR = ../include
|
||||
LIBDIR = ../lib
|
||||
|
||||
SOURCES = glu.c mipmap.c nurbs.c nurbscrv.c nurbssrf.c nurbsutl.c \
|
||||
project.c quadric.c tess.c tess_fist.c tess_hash.c tess_heap.c
|
||||
project.c quadric.c tess.c tess_fist.c tess_hash.c tess_heap.c \
|
||||
tess_winding.c
|
||||
|
||||
OBJECTS = $(SOURCES:.c=.o)
|
||||
|
||||
|
@@ -19,9 +19,12 @@
|
||||
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
|
||||
# $Id: Makefile.BeOS-R4,v 1.4 1999/09/17 00:06:57 brianp Exp $
|
||||
# $Id: Makefile.BeOS-R4,v 1.5 1999/10/03 00:53:38 gareth Exp $
|
||||
|
||||
# $Log: Makefile.BeOS-R4,v $
|
||||
# Revision 1.5 1999/10/03 00:53:38 gareth
|
||||
# Added tessellation winding rule files.
|
||||
#
|
||||
# Revision 1.4 1999/09/17 00:06:57 brianp
|
||||
# version symbol changes
|
||||
#
|
||||
@@ -55,7 +58,8 @@ INCDIR = ../include
|
||||
LIBDIR = ../lib
|
||||
|
||||
SOURCES = glu.c mipmap.c nurbs.c nurbscrv.c nurbssrf.c nurbsutl.c \
|
||||
project.c quadric.c tess.c tess_fist.c tess_hash.c tess_heap.c
|
||||
project.c quadric.c tess.c tess_fist.c tess_hash.c tess_heap.c \
|
||||
tess_winding.c
|
||||
|
||||
OBJECTS = $(SOURCES:.c=.o)
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# $Id: Makefile.X11,v 1.5 1999/09/17 12:06:56 brianp Exp $
|
||||
# $Id: Makefile.X11,v 1.6 1999/10/03 00:53:38 gareth Exp $
|
||||
|
||||
# Mesa 3-D graphics library
|
||||
# Version: 3.1
|
||||
@@ -19,7 +19,8 @@ INCDIR = ../include
|
||||
LIBDIR = ../lib
|
||||
|
||||
SOURCES = glu.c mipmap.c nurbs.c nurbscrv.c nurbssrf.c nurbsutl.c \
|
||||
project.c quadric.c tess.c tess_fist.c tess_hash.c tess_heap.c
|
||||
project.c quadric.c tess.c tess_fist.c tess_hash.c tess_heap.c \
|
||||
tess_winding.c
|
||||
|
||||
OBJECTS = $(SOURCES:.c=.o)
|
||||
|
||||
|
@@ -15,11 +15,12 @@ LIBDIR = [-.lib]
|
||||
CFLAGS = /include=$(INCDIR)/define=(FBIND=1)
|
||||
|
||||
SOURCES = glu.c mipmap.c nurbs.c nurbscrv.c nurbssrf.c nurbsutl.c \
|
||||
project.c quadric.c tess.c tess_fist.c tess_hash.c tess_heap.c
|
||||
project.c quadric.c tess.c tess_fist.c tess_hash.c tess_heap.c \
|
||||
tess_winding.c
|
||||
|
||||
OBJECTS =glu.obj,mipmap.obj,nurbs.obj,nurbscrv.obj,nurbssrf.obj,nurbsutl.obj,\
|
||||
project.obj,quadric.obj,tess.obj,tess_fist.obj,tess_hash.obj,\
|
||||
tess_heap.obj
|
||||
tess_heap.obj,tess_winding.obj
|
||||
|
||||
|
||||
|
||||
|
@@ -1,21 +1,21 @@
|
||||
/* $Id: tess.c,v 1.9 1999/09/17 06:34:46 gareth Exp $ */
|
||||
/* $Id: tess.c,v 1.10 1999/10/03 00:56:07 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.1
|
||||
*
|
||||
*
|
||||
* Copyright (C) 1999 Brian Paul All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
@@ -26,6 +26,9 @@
|
||||
|
||||
/*
|
||||
* $Log: tess.c,v $
|
||||
* Revision 1.10 1999/10/03 00:56:07 gareth
|
||||
* Added tessellation winding rule support. Misc bug fixes.
|
||||
*
|
||||
* Revision 1.9 1999/09/17 06:34:46 gareth
|
||||
* Winding rule updates.
|
||||
*
|
||||
@@ -124,6 +127,8 @@ GLUtesselator* GLAPIENTRY gluNewTess( void )
|
||||
tobj->grid = NULL;
|
||||
#endif
|
||||
tobj->cvc_lists = NULL;
|
||||
tobj->user_data = NULL;
|
||||
tobj->label = 0;
|
||||
|
||||
tobj->error = GLU_NO_ERROR;
|
||||
|
||||
@@ -143,7 +148,7 @@ void GLAPIENTRY gluDeleteTess( GLUtesselator *tobj )
|
||||
{
|
||||
/* gluEndPolygon was not called. */
|
||||
DEBUGP( 0, ( "*** error 3 ***\n" ) );
|
||||
tess_error_callback( tobj, GLU_TESS_ERROR3, NULL );
|
||||
tess_error_callback( tobj, GLU_TESS_ERROR3 );
|
||||
}
|
||||
|
||||
/* Delete all internal structures. */
|
||||
@@ -167,11 +172,13 @@ void GLAPIENTRY gluTessBeginPolygon( GLUtesselator *tobj, void *polygon_data )
|
||||
{
|
||||
/* gluEndPolygon was not called. */
|
||||
DEBUGP( 0, ( "*** error 3 ***\n" ) );
|
||||
tess_error_callback( tobj, GLU_TESS_ERROR3, NULL );
|
||||
tess_error_callback( tobj, GLU_TESS_ERROR3 );
|
||||
|
||||
tess_cleanup( tobj );
|
||||
}
|
||||
|
||||
tobj->user_data = polygon_data;
|
||||
|
||||
DEBUGP( 3, ( "<- gluTessBeginPolygon( tobj:%p data:%p )\n", tobj, polygon_data ) );
|
||||
}
|
||||
|
||||
@@ -188,7 +195,7 @@ void GLAPIENTRY gluTessBeginContour( GLUtesselator *tobj )
|
||||
{
|
||||
/* gluTessEndContour was not called. */
|
||||
DEBUGP( 0, ( "*** error 4 ***\n" ) );
|
||||
tess_error_callback( tobj, GLU_TESS_ERROR4, NULL );
|
||||
tess_error_callback( tobj, GLU_TESS_ERROR4 );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -196,7 +203,7 @@ void GLAPIENTRY gluTessBeginContour( GLUtesselator *tobj )
|
||||
(tess_contour_t *) malloc( sizeof(tess_contour_t) ) ) == NULL )
|
||||
{
|
||||
DEBUGP( 0, ( "*** memory error ***\n" ) );
|
||||
tess_error_callback( tobj, GLU_OUT_OF_MEMORY, NULL );
|
||||
tess_error_callback( tobj, GLU_OUT_OF_MEMORY );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -241,7 +248,7 @@ void GLAPIENTRY gluTessVertex( GLUtesselator *tobj, GLdouble coords[3],
|
||||
{
|
||||
/* gluTessBeginContour was not called. */
|
||||
DEBUGP( 0, ( "*** error 2 ***\n" ) );
|
||||
tess_error_callback( tobj, GLU_TESS_ERROR2, NULL );
|
||||
tess_error_callback( tobj, GLU_TESS_ERROR2 );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -255,7 +262,7 @@ void GLAPIENTRY gluTessVertex( GLUtesselator *tobj, GLdouble coords[3],
|
||||
malloc( sizeof(tess_vertex_t) ) ) == NULL )
|
||||
{
|
||||
DEBUGP( 0, ( "*** memory error ***\n" ) );
|
||||
tess_error_callback( tobj, GLU_OUT_OF_MEMORY, NULL );
|
||||
tess_error_callback( tobj, GLU_OUT_OF_MEMORY );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -271,6 +278,7 @@ void GLAPIENTRY gluTessVertex( GLUtesselator *tobj, GLdouble coords[3],
|
||||
|
||||
last_vertex->angle = 0.0;
|
||||
last_vertex->label = 0;
|
||||
last_vertex->mark = 0;
|
||||
|
||||
last_vertex->next = NULL;
|
||||
last_vertex->previous = NULL;
|
||||
@@ -285,7 +293,7 @@ void GLAPIENTRY gluTessVertex( GLUtesselator *tobj, GLdouble coords[3],
|
||||
malloc( sizeof(tess_vertex_t) ) ) == NULL )
|
||||
{
|
||||
DEBUGP( 0, ( "*** memory error ***\n" ) );
|
||||
tess_error_callback( tobj, GLU_OUT_OF_MEMORY, NULL );
|
||||
tess_error_callback( tobj, GLU_OUT_OF_MEMORY );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -298,6 +306,7 @@ void GLAPIENTRY gluTessVertex( GLUtesselator *tobj, GLdouble coords[3],
|
||||
|
||||
vertex->angle = 0.0;
|
||||
vertex->label = 0;
|
||||
vertex->mark = 0;
|
||||
|
||||
vertex->next = NULL;
|
||||
vertex->previous = last_vertex;
|
||||
@@ -326,7 +335,7 @@ void GLAPIENTRY gluTessEndContour( GLUtesselator *tobj )
|
||||
{
|
||||
/* gluTessBeginContour was not called. */
|
||||
DEBUGP( 0, ( "*** error 2 ***\n" ) );
|
||||
tess_error_callback( tobj, GLU_TESS_ERROR2, NULL );
|
||||
tess_error_callback( tobj, GLU_TESS_ERROR2 );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -357,7 +366,7 @@ void GLAPIENTRY gluTessEndPolygon( GLUtesselator *tobj )
|
||||
{
|
||||
/* gluTessBeginPolygon was not called. */
|
||||
DEBUGP( 0, ( "*** error 1 ***\n" ) );
|
||||
tess_error_callback( tobj, GLU_TESS_ERROR1, NULL );
|
||||
tess_error_callback( tobj, GLU_TESS_ERROR1 );
|
||||
return;
|
||||
}
|
||||
TESS_CHECK_ERRORS( tobj );
|
||||
@@ -590,12 +599,12 @@ void GLAPIENTRY gluEndPolygon( GLUtesselator *tobj )
|
||||
* tess_error_callback
|
||||
*
|
||||
* Internal error handler. Call the user-registered error callback.
|
||||
*
|
||||
* 2nd arg changed from 'errno' to 'errnum' since MSVC defines errnum as
|
||||
* a macro (of all things) and thus breaks the build -tjump
|
||||
*****************************************************************************/
|
||||
|
||||
/* 2nd arg changed from 'errno' to 'errnum' since MSVC defines errnum as */
|
||||
/* a macro (of all things) and thus breaks the build -tjump */
|
||||
|
||||
void tess_error_callback( GLUtesselator *tobj, GLenum errnum, void *data )
|
||||
void tess_error_callback( GLUtesselator *tobj, GLenum errnum )
|
||||
{
|
||||
if ( tobj->error == GLU_NO_ERROR )
|
||||
{
|
||||
@@ -604,7 +613,7 @@ void tess_error_callback( GLUtesselator *tobj, GLenum errnum, void *data )
|
||||
|
||||
if ( tobj->callbacks.errorData != NULL )
|
||||
{
|
||||
( tobj->callbacks.errorData )( errnum, data );
|
||||
( tobj->callbacks.errorData )( errnum, tobj->user_data );
|
||||
}
|
||||
else if ( tobj->callbacks.error != NULL )
|
||||
{
|
||||
@@ -737,7 +746,7 @@ static GLenum find_normal( GLUtesselator *tobj )
|
||||
|
||||
if ( vb == va ) {
|
||||
DEBUGP( 0, ( "*** error 7 ***\n" ) );
|
||||
tess_error_callback( tobj, GLU_TESS_ERROR7, NULL );
|
||||
tess_error_callback( tobj, GLU_TESS_ERROR7 );
|
||||
}
|
||||
|
||||
SUB_3V( a, vb->coords, va->coords );
|
||||
@@ -762,7 +771,7 @@ static GLenum find_normal( GLUtesselator *tobj )
|
||||
}
|
||||
}
|
||||
DEBUGP( 0, ( "*** error 7 ***\n" ) );
|
||||
tess_error_callback( tobj, GLU_TESS_ERROR7, NULL );
|
||||
tess_error_callback( tobj, GLU_TESS_ERROR7 );
|
||||
|
||||
return GLU_ERROR;
|
||||
}
|
||||
@@ -963,7 +972,9 @@ static void delete_all_contours( GLUtesselator *tobj )
|
||||
free( vertex );
|
||||
vertex = next_vertex;
|
||||
}
|
||||
free( vertex );
|
||||
if ( vertex ) {
|
||||
free( vertex );
|
||||
}
|
||||
next_contour = current->next;
|
||||
|
||||
free( current );
|
||||
@@ -981,11 +992,12 @@ static void delete_all_contours( GLUtesselator *tobj )
|
||||
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
/*****************************************************************************
|
||||
* Debugging output
|
||||
*****************************************************************************/
|
||||
#ifdef DEBUG
|
||||
int tess_debug_level = 0;
|
||||
int tess_debug_level = -1;
|
||||
|
||||
int vdebugstr( char *format_str, ... )
|
||||
{
|
||||
@@ -996,4 +1008,5 @@ int vdebugstr( char *format_str, ... )
|
||||
va_end( ap );
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -1,21 +1,21 @@
|
||||
/* $Id: tess.h,v 1.8 1999/09/17 06:31:02 gareth Exp $ */
|
||||
/* $Id: tess.h,v 1.9 1999/10/03 00:56:07 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.1
|
||||
*
|
||||
*
|
||||
* Copyright (C) 1999 Brian Paul All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
@@ -26,6 +26,9 @@
|
||||
|
||||
/*
|
||||
* $Log: tess.h,v $
|
||||
* Revision 1.9 1999/10/03 00:56:07 gareth
|
||||
* Added tessellation winding rule support. Misc bug fixes.
|
||||
*
|
||||
* Revision 1.8 1999/09/17 06:31:02 gareth
|
||||
* Winding rule updates.
|
||||
*
|
||||
@@ -89,6 +92,8 @@ struct GLUtesselator
|
||||
#endif
|
||||
heap_t *ears;
|
||||
hashtable_t *cvc_lists;
|
||||
void *user_data;
|
||||
GLuint label;
|
||||
GLenum error;
|
||||
};
|
||||
|
||||
@@ -96,7 +101,7 @@ struct GLUtesselator
|
||||
/*****************************************************************************
|
||||
* Tessellation error handler:
|
||||
*****************************************************************************/
|
||||
extern void tess_error_callback( GLUtesselator *, GLenum, void * );
|
||||
extern void tess_error_callback( GLUtesselator *, GLenum );
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
@@ -107,7 +112,7 @@ extern int tess_debug_level;
|
||||
int vdebugstr( char *format_str, ... );
|
||||
|
||||
#pragma message( "tess: using DEBUGP for debugging output" )
|
||||
#define DEBUGP(level, body) \
|
||||
#define DEBUGP( level, body ) \
|
||||
do { \
|
||||
if ( tess_debug_level >= level ) { \
|
||||
vdebugstr( "%11.11s:%-5d ", __FILE__, __LINE__, level ); \
|
||||
@@ -115,12 +120,15 @@ int vdebugstr( char *format_str, ... );
|
||||
fflush( stderr ); \
|
||||
} \
|
||||
} while ( 0 )
|
||||
#define DEBUGIF(level) do { if ( tess_debug_level >= level ) {
|
||||
#define DEBUGENDIF } } while ( 0 )
|
||||
#define DEBUGIF( level ) do { if ( tess_debug_level >= level ) {
|
||||
#define DEBUGENDIF } } while ( 0 )
|
||||
|
||||
#else
|
||||
#define DEBUGP(level, body)
|
||||
#define DEBUGIF(level) while(0) {
|
||||
|
||||
#define DEBUGP( level, body )
|
||||
#define DEBUGIF( level ) while(0) {
|
||||
#define DEBUGENDIF }
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# $Id: Makefile.X11,v 1.5 1999/09/17 12:07:10 brianp Exp $
|
||||
# $Id: Makefile.X11,v 1.6 1999/10/08 09:27:09 keithw Exp $
|
||||
|
||||
# Mesa 3-D graphics library
|
||||
# Version: 3.1
|
||||
@@ -46,6 +46,7 @@ CORE_SOURCES = \
|
||||
feedback.c \
|
||||
fog.c \
|
||||
get.c \
|
||||
glmisc.c \
|
||||
hash.c \
|
||||
image.c \
|
||||
light.c \
|
||||
@@ -53,7 +54,6 @@ CORE_SOURCES = \
|
||||
logic.c \
|
||||
masking.c \
|
||||
matrix.c \
|
||||
misc.c \
|
||||
mmath.c \
|
||||
mthreads.c \
|
||||
pb.c \
|
||||
|
@@ -824,332 +824,196 @@ fxMesaContext GLAPIENTRY fxMesaCreateContext(GLuint win,GrScreenResolution_t res
|
||||
GrScreenRefresh_t ref,
|
||||
const GLint attribList[])
|
||||
{
|
||||
fxMesaContext fxMesa;
|
||||
int i,type;
|
||||
int aux;
|
||||
GLboolean doubleBuffer=GL_FALSE;
|
||||
GLboolean alphaBuffer=GL_FALSE;
|
||||
GLboolean verbose=GL_FALSE;
|
||||
GLint depthSize=0;
|
||||
GLint stencilSize=0;
|
||||
GLint accumSize=0;
|
||||
GLcontext *shareCtx = NULL;
|
||||
GLcontext *ctx = 0;
|
||||
FX_GrContext_t glideContext = 0;
|
||||
char *errorstr;
|
||||
fxMesaContext fxMesa = NULL;
|
||||
int i,type;
|
||||
int aux;
|
||||
GLboolean doubleBuffer=GL_FALSE;
|
||||
GLboolean alphaBuffer=GL_FALSE;
|
||||
GLboolean verbose=GL_FALSE;
|
||||
GLint depthSize=0;
|
||||
GLint stencilSize=0;
|
||||
GLint accumSize=0;
|
||||
GLcontext *shareCtx = NULL;
|
||||
GLcontext *ctx = 0;
|
||||
FX_GrContext_t glideContext = 0;
|
||||
char *errorstr;
|
||||
|
||||
if (MESA_VERBOSE&VERBOSE_DRIVER) {
|
||||
fprintf(stderr,"fxmesa: fxMesaCreateContext() Start\n");
|
||||
}
|
||||
if (MESA_VERBOSE&VERBOSE_DRIVER) {
|
||||
fprintf(stderr,"fxmesa: fxMesaCreateContext() Start\n");
|
||||
}
|
||||
|
||||
if(getenv("MESA_FX_INFO"))
|
||||
verbose=GL_TRUE;
|
||||
if(getenv("MESA_FX_INFO"))
|
||||
verbose=GL_TRUE;
|
||||
|
||||
aux=0;
|
||||
i=0;
|
||||
while(attribList[i]!=FXMESA_NONE) {
|
||||
switch (attribList[i]) {
|
||||
case FXMESA_DOUBLEBUFFER:
|
||||
doubleBuffer=GL_TRUE;
|
||||
break;
|
||||
case FXMESA_ALPHA_SIZE:
|
||||
i++;
|
||||
alphaBuffer=attribList[i]>0;
|
||||
if(alphaBuffer)
|
||||
aux=1;
|
||||
break;
|
||||
case FXMESA_DEPTH_SIZE:
|
||||
i++;
|
||||
depthSize=attribList[i];
|
||||
if(depthSize)
|
||||
aux=1;
|
||||
break;
|
||||
case FXMESA_STENCIL_SIZE:
|
||||
i++;
|
||||
stencilSize=attribList[i];
|
||||
break;
|
||||
case FXMESA_ACCUM_SIZE:
|
||||
i++;
|
||||
accumSize=attribList[i];
|
||||
break;
|
||||
/* XXX ugly hack here for sharing display lists */
|
||||
aux=0;
|
||||
i=0;
|
||||
while(attribList[i]!=FXMESA_NONE) {
|
||||
switch (attribList[i]) {
|
||||
case FXMESA_DOUBLEBUFFER:
|
||||
doubleBuffer=GL_TRUE;
|
||||
break;
|
||||
case FXMESA_ALPHA_SIZE:
|
||||
i++;
|
||||
alphaBuffer=attribList[i]>0;
|
||||
if(alphaBuffer)
|
||||
aux=1;
|
||||
break;
|
||||
case FXMESA_DEPTH_SIZE:
|
||||
i++;
|
||||
depthSize=attribList[i];
|
||||
if(depthSize)
|
||||
aux=1;
|
||||
break;
|
||||
case FXMESA_STENCIL_SIZE:
|
||||
i++;
|
||||
stencilSize=attribList[i];
|
||||
break;
|
||||
case FXMESA_ACCUM_SIZE:
|
||||
i++;
|
||||
accumSize=attribList[i];
|
||||
break;
|
||||
/* XXX ugly hack here for sharing display lists */
|
||||
#define FXMESA_SHARE_CONTEXT 990099 /* keep in sync with xmesa1.c! */
|
||||
case FXMESA_SHARE_CONTEXT:
|
||||
case FXMESA_SHARE_CONTEXT:
|
||||
i++;
|
||||
{
|
||||
const void *vPtr = &attribList[i];
|
||||
GLcontext **ctx = (GLcontext **) vPtr;
|
||||
shareCtx = *ctx;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (MESA_VERBOSE&VERBOSE_DRIVER) {
|
||||
fprintf(stderr,"fxmesa: fxMesaCreateContext() End (defualt)\n");
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
i++;
|
||||
{
|
||||
const void *vPtr = &attribList[i];
|
||||
GLcontext **ctx = (GLcontext **) vPtr;
|
||||
shareCtx = *ctx;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (MESA_VERBOSE&VERBOSE_DRIVER) {
|
||||
fprintf(stderr,"fxmesa: fxMesaCreateContext() End (defualt)\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* A workaround for Linux GLQuake */
|
||||
if(depthSize && alphaBuffer)
|
||||
alphaBuffer=0;
|
||||
|
||||
if(verbose)
|
||||
fprintf(stderr,"Mesa fx Voodoo Device Driver v0.30\nWritten by David Bucciarelli (davibu@tin.it.it)\n");
|
||||
|
||||
if((type=fxQueryHardware()) < 0) {
|
||||
fprintf(stderr,"fx Driver: ERROR no Voodoo1/2 Graphics or Voodoo Rush !\n");
|
||||
return NULL;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
/* A workaround for Linux GLQuake */
|
||||
if(depthSize && alphaBuffer)
|
||||
alphaBuffer=0;
|
||||
|
||||
if(verbose)
|
||||
fprintf(stderr,"Mesa fx Voodoo Device Driver v0.30\nWritten by David Bucciarelli (davibu@tin.it.it)\n");
|
||||
|
||||
if((type=fxQueryHardware()) >= 0) {
|
||||
if(type==GR_SSTTYPE_VOODOO)
|
||||
if(type==GR_SSTTYPE_VOODOO)
|
||||
win=0;
|
||||
|
||||
grSstSelect(glbCurrentBoard);
|
||||
grSstSelect(glbCurrentBoard);
|
||||
|
||||
#if FXMESA_USE_ARGB
|
||||
glideContext = FX_grSstWinOpen((FxU32)win,res,ref,
|
||||
GR_COLORFORMAT_ARGB,GR_ORIGIN_LOWER_LEFT,2,aux);
|
||||
|
||||
#else
|
||||
glideContext = FX_grSstWinOpen((FxU32)win,res,ref,
|
||||
GR_COLORFORMAT_ABGR,GR_ORIGIN_LOWER_LEFT,2,aux);
|
||||
#endif
|
||||
if (!glideContext){
|
||||
errorstr = "grSstWinOpen";
|
||||
fxMesa=(fxMesaContext)calloc(1,sizeof(struct tfxMesaContext));
|
||||
if(!fxMesa) {
|
||||
errorstr = "malloc";
|
||||
goto errorhandler;
|
||||
}
|
||||
}
|
||||
|
||||
if(verbose)
|
||||
if(glbHWConfig.SSTs[glbCurrentBoard].type==GR_SSTTYPE_VOODOO)
|
||||
fxMesa->haveTwoTMUs=(glbHWConfig.SSTs[glbCurrentBoard].sstBoard.VoodooConfig.nTexelfx > 1);
|
||||
else if(glbHWConfig.SSTs[glbCurrentBoard].type==GR_SSTTYPE_SST96)
|
||||
fxMesa->haveTwoTMUs=(glbHWConfig.SSTs[glbCurrentBoard].sstBoard.SST96Config.nTexelfx > 1);
|
||||
else
|
||||
fxMesa->haveTwoTMUs=GL_FALSE;
|
||||
|
||||
fxMesa->haveDoubleBuffer=doubleBuffer;
|
||||
fxMesa->haveAlphaBuffer=alphaBuffer;
|
||||
fxMesa->haveGlobalPaletteTexture=GL_FALSE;
|
||||
fxMesa->haveZBuffer=depthSize ? 1 : 0;
|
||||
fxMesa->verbose=verbose;
|
||||
fxMesa->width=FX_grSstScreenWidth();
|
||||
fxMesa->height=FX_grSstScreenHeight();
|
||||
fxMesa->board=glbCurrentBoard;
|
||||
|
||||
if(verbose)
|
||||
fprintf(stderr,"Glide screen size: %dx%d\n",
|
||||
(int)FX_grSstScreenWidth(),(int)FX_grSstScreenHeight());
|
||||
} else {
|
||||
fprintf(stderr,"fx Driver: ERROR no Voodoo1/2 Graphics or Voodoo Rush !\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
fxMesa=(fxMesaContext)calloc(1,sizeof(struct tfxMesaContext));
|
||||
if(!fxMesa) {
|
||||
errorstr = "malloc";
|
||||
goto errorhandler;
|
||||
}
|
||||
|
||||
FX_setupGrVertexLayout();
|
||||
|
||||
fxMesa->glideContext = glideContext;
|
||||
fxMesa->board=glbCurrentBoard;
|
||||
fxMesa->width=FX_grSstScreenWidth();
|
||||
fxMesa->height=FX_grSstScreenHeight();
|
||||
fxMesa->glVis=gl_create_visual(GL_TRUE, /* RGB mode */
|
||||
alphaBuffer,
|
||||
doubleBuffer,
|
||||
GL_FALSE, /* stereo */
|
||||
depthSize, /* depth_size */
|
||||
stencilSize, /* stencil_size */
|
||||
accumSize, /* accum_size */
|
||||
0, /* index bits */
|
||||
5,6,5,0); /* RGBA bits */
|
||||
if (!fxMesa->glVis) {
|
||||
errorstr = "gl_create_visual";
|
||||
goto errorhandler;
|
||||
}
|
||||
|
||||
fxMesa->verbose=verbose;
|
||||
|
||||
if(glbHWConfig.SSTs[glbCurrentBoard].type==GR_SSTTYPE_VOODOO)
|
||||
fxMesa->haveTwoTMUs=(glbHWConfig.SSTs[glbCurrentBoard].sstBoard.VoodooConfig.nTexelfx > 1);
|
||||
else if(glbHWConfig.SSTs[glbCurrentBoard].type==GR_SSTTYPE_SST96)
|
||||
fxMesa->haveTwoTMUs=(glbHWConfig.SSTs[glbCurrentBoard].sstBoard.SST96Config.nTexelfx > 1);
|
||||
else
|
||||
fxMesa->haveTwoTMUs=GL_FALSE;
|
||||
|
||||
if (getenv("FX_EMULATE_SINGLE_TMU")) {
|
||||
if (MESA_VERBOSE&VERBOSE_DRIVER)
|
||||
fprintf(stderr, "\n\nEmulating single tmu\n\n");
|
||||
fxMesa->haveTwoTMUs = GL_FALSE;
|
||||
}
|
||||
|
||||
fxMesa->emulateTwoTMUs = fxMesa->haveTwoTMUs;
|
||||
|
||||
if (!getenv("FX_DONT_FAKE_MULTITEX")) {
|
||||
if (MESA_VERBOSE&VERBOSE_DRIVER) {
|
||||
if (!fxMesa->haveTwoTMUs)
|
||||
fprintf(stderr, "\n\nEmulating multitexture\n\n");
|
||||
}
|
||||
fxMesa->emulateTwoTMUs = GL_TRUE;
|
||||
}
|
||||
|
||||
|
||||
fxMesa->haveDoubleBuffer=doubleBuffer;
|
||||
fxMesa->haveAlphaBuffer=alphaBuffer;
|
||||
fxMesa->haveGlobalPaletteTexture=GL_FALSE;
|
||||
|
||||
if(getenv("FX_GLIDE_SWAPINTERVAL"))
|
||||
fxMesa->swapInterval=atoi(getenv("FX_GLIDE_SWAPINTERVAL"));
|
||||
else
|
||||
fxMesa->swapInterval=1;
|
||||
|
||||
if(getenv("MESA_FX_SWAP_PENDING"))
|
||||
fxMesa->maxPendingSwapBuffers=atoi(getenv("MESA_FX_SWAP_PENDING"));
|
||||
else
|
||||
fxMesa->maxPendingSwapBuffers=2;
|
||||
|
||||
fxMesa->color=0xffffffff;
|
||||
fxMesa->clearC=0;
|
||||
fxMesa->clearA=0;
|
||||
|
||||
fxMesa->stats.swapBuffer=0;
|
||||
fxMesa->stats.reqTexUpload=0;
|
||||
fxMesa->stats.texUpload=0;
|
||||
fxMesa->stats.memTexUpload=0;
|
||||
|
||||
fxMesa->tmuSrc=FX_TMU_NONE;
|
||||
fxMesa->lastUnitsMode=FX_UM_NONE;
|
||||
fxTMInit(fxMesa);
|
||||
|
||||
/* FX units setup */
|
||||
|
||||
fxMesa->unitsState.alphaTestEnabled=GL_FALSE;
|
||||
fxMesa->unitsState.alphaTestFunc=GR_CMP_ALWAYS;
|
||||
fxMesa->unitsState.alphaTestRefValue=0;
|
||||
|
||||
fxMesa->unitsState.blendEnabled=GL_FALSE;
|
||||
fxMesa->unitsState.blendSrcFuncRGB=GR_BLEND_ONE;
|
||||
fxMesa->unitsState.blendDstFuncRGB=GR_BLEND_ZERO;
|
||||
fxMesa->unitsState.blendSrcFuncAlpha=GR_BLEND_ONE;
|
||||
fxMesa->unitsState.blendDstFuncAlpha=GR_BLEND_ZERO;
|
||||
|
||||
fxMesa->unitsState.depthTestEnabled =GL_FALSE;
|
||||
fxMesa->unitsState.depthMask =GL_TRUE;
|
||||
fxMesa->unitsState.depthTestFunc =GR_CMP_LESS;
|
||||
|
||||
grColorMask(FXTRUE,alphaBuffer ? FXTRUE : FXFALSE);
|
||||
if(doubleBuffer) {
|
||||
fxMesa->currentFB=GR_BUFFER_BACKBUFFER;
|
||||
grRenderBuffer(GR_BUFFER_BACKBUFFER);
|
||||
} else {
|
||||
fxMesa->currentFB=GR_BUFFER_FRONTBUFFER;
|
||||
grRenderBuffer(GR_BUFFER_FRONTBUFFER);
|
||||
}
|
||||
|
||||
fxMesa->state = NULL;
|
||||
fxMesa->fogTable = NULL;
|
||||
|
||||
fxMesa->state = malloc(FX_grGetInteger(FX_GLIDE_STATE_SIZE));
|
||||
fxMesa->fogTable = malloc(FX_grGetInteger(FX_FOG_TABLE_ENTRIES)*sizeof(GrFog_t));
|
||||
|
||||
if (!fxMesa->state || !fxMesa->fogTable) {
|
||||
errorstr = "malloc";
|
||||
goto errorhandler;
|
||||
}
|
||||
|
||||
if(depthSize)
|
||||
grDepthBufferMode(GR_DEPTHBUFFER_ZBUFFER);
|
||||
|
||||
#if (!FXMESA_USE_ARGB)
|
||||
grLfbWriteColorFormat(GR_COLORFORMAT_ABGR); /* Not every Glide supports this */
|
||||
#endif
|
||||
|
||||
fxMesa->glVis=gl_create_visual(GL_TRUE, /* RGB mode */
|
||||
alphaBuffer,
|
||||
doubleBuffer,
|
||||
GL_FALSE, /* stereo */
|
||||
depthSize, /* depth_size */
|
||||
stencilSize, /* stencil_size */
|
||||
accumSize, /* accum_size */
|
||||
0, /* index bits */
|
||||
5,6,5,0); /* RGBA bits */
|
||||
if (!fxMesa->glVis) {
|
||||
errorstr = "gl_create_visual";
|
||||
goto errorhandler;
|
||||
}
|
||||
|
||||
ctx = fxMesa->glCtx=gl_create_context(fxMesa->glVis,
|
||||
shareCtx, /* share list context */
|
||||
(void *) fxMesa, GL_TRUE);
|
||||
if (!ctx) {
|
||||
errorstr = "gl_create_context";
|
||||
goto errorhandler;
|
||||
}
|
||||
|
||||
fxMesa->glBuffer=gl_create_framebuffer(fxMesa->glVis);
|
||||
if (!fxMesa->glBuffer) {
|
||||
errorstr = "gl_create_framebuffer";
|
||||
goto errorhandler;
|
||||
}
|
||||
|
||||
fxMesa->glCtx->Const.MaxTextureLevels=9;
|
||||
fxMesa->glCtx->Const.MaxTextureSize=256;
|
||||
fxMesa->glCtx->Const.MaxTextureUnits=fxMesa->emulateTwoTMUs ? 2 : 1;
|
||||
|
||||
fxMesa->glCtx->NewState|=NEW_DRVSTATE1;
|
||||
fxMesa->new_state = NEW_ALL;
|
||||
|
||||
fxDDSetupInit();
|
||||
fxDDCvaInit();
|
||||
fxDDClipInit();
|
||||
fxDDTrifuncInit();
|
||||
fxDDFastPathInit();
|
||||
|
||||
fxSetupDDPointers(fxMesa->glCtx);
|
||||
fxDDRenderInit(fxMesa->glCtx);
|
||||
fxDDInitExtensions(fxMesa->glCtx);
|
||||
|
||||
fxDDSetNearFar(fxMesa->glCtx,1.0,100.0);
|
||||
|
||||
grGlideGetState((GrState*)fxMesa->state);
|
||||
|
||||
/* XXX Fix me: callback not registered when main VB is created.
|
||||
*/
|
||||
if (fxMesa->glCtx->VB)
|
||||
fxDDRegisterVB( fxMesa->glCtx->VB );
|
||||
|
||||
/* XXX Fix me too: need to have the 'struct dd' prepared prior to
|
||||
* creating the context... The below is broken if you try to insert
|
||||
* new stages.
|
||||
*/
|
||||
if (ctx->NrPipelineStages)
|
||||
ctx->NrPipelineStages = fxDDRegisterPipelineStages( ctx->PipelineStage,
|
||||
ctx->PipelineStage,
|
||||
ctx->NrPipelineStages);
|
||||
|
||||
|
||||
glbTotNumCtx++;
|
||||
|
||||
/* Run the config file */
|
||||
gl_context_initialize( fxMesa->glCtx );
|
||||
|
||||
/* install signal handlers */
|
||||
#if defined(__linux__)
|
||||
if (fxMesa->glCtx->CatchSignals) {
|
||||
signal(SIGINT,cleangraphics_handler);
|
||||
signal(SIGHUP,cleangraphics_handler);
|
||||
signal(SIGPIPE,cleangraphics_handler);
|
||||
signal(SIGFPE,cleangraphics_handler);
|
||||
signal(SIGBUS,cleangraphics_handler);
|
||||
signal(SIGILL,cleangraphics_handler);
|
||||
signal(SIGSEGV,cleangraphics_handler);
|
||||
signal(SIGTERM,cleangraphics_handler);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (MESA_VERBOSE&VERBOSE_DRIVER) {
|
||||
fprintf(stderr,"fxmesa: fxMesaCreateContext() End\n");
|
||||
}
|
||||
|
||||
return fxMesa;
|
||||
|
||||
errorhandler:
|
||||
if (fxMesa) {
|
||||
if (fxMesa->glideContext)
|
||||
FX_grSstWinClose(fxMesa->glideContext);
|
||||
fxMesa->glideContext = 0;
|
||||
|
||||
if (fxMesa->state)
|
||||
free(fxMesa->state);
|
||||
if (fxMesa && fxMesa->fogTable)
|
||||
free(fxMesa->fogTable);
|
||||
if (fxMesa->glBuffer)
|
||||
gl_destroy_framebuffer(fxMesa->glBuffer);
|
||||
if (fxMesa->glVis)
|
||||
gl_destroy_visual(fxMesa->glVis);
|
||||
if (fxMesa->glCtx)
|
||||
gl_destroy_context(fxMesa->glCtx);
|
||||
free(fxMesa);
|
||||
ctx = fxMesa->glCtx=gl_create_context(fxMesa->glVis,
|
||||
shareCtx, /* share list context */
|
||||
(void *) fxMesa, GL_TRUE);
|
||||
if (!ctx) {
|
||||
errorstr = "gl_create_context";
|
||||
goto errorhandler;
|
||||
}
|
||||
|
||||
|
||||
if (!fxDDInitFxMesaContext( fxMesa, win, res, ref, aux )) {
|
||||
errorstr = "fxDDInitFxMesaContext failed";
|
||||
goto errorhandler;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (MESA_VERBOSE&VERBOSE_DRIVER) {
|
||||
fxMesa->glBuffer=gl_create_framebuffer(fxMesa->glVis);
|
||||
if (!fxMesa->glBuffer) {
|
||||
errorstr = "gl_create_framebuffer";
|
||||
goto errorhandler;
|
||||
}
|
||||
|
||||
glbTotNumCtx++;
|
||||
|
||||
/* install signal handlers */
|
||||
#if defined(__linux__)
|
||||
if (fxMesa->glCtx->CatchSignals) {
|
||||
signal(SIGINT,cleangraphics_handler);
|
||||
signal(SIGHUP,cleangraphics_handler);
|
||||
signal(SIGPIPE,cleangraphics_handler);
|
||||
signal(SIGFPE,cleangraphics_handler);
|
||||
signal(SIGBUS,cleangraphics_handler);
|
||||
signal(SIGILL,cleangraphics_handler);
|
||||
signal(SIGSEGV,cleangraphics_handler);
|
||||
signal(SIGTERM,cleangraphics_handler);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (MESA_VERBOSE&VERBOSE_DRIVER) {
|
||||
fprintf(stderr,"fxmesa: fxMesaCreateContext() End\n");
|
||||
}
|
||||
|
||||
return fxMesa;
|
||||
|
||||
errorhandler:
|
||||
if (fxMesa) {
|
||||
if (fxMesa->glideContext)
|
||||
FX_grSstWinClose(fxMesa->glideContext);
|
||||
fxMesa->glideContext = 0;
|
||||
|
||||
if (fxMesa->state)
|
||||
free(fxMesa->state);
|
||||
if (fxMesa->fogTable)
|
||||
free(fxMesa->fogTable);
|
||||
if (fxMesa->glBuffer)
|
||||
gl_destroy_framebuffer(fxMesa->glBuffer);
|
||||
if (fxMesa->glVis)
|
||||
gl_destroy_visual(fxMesa->glVis);
|
||||
if (fxMesa->glCtx)
|
||||
gl_destroy_context(fxMesa->glCtx);
|
||||
free(fxMesa);
|
||||
}
|
||||
|
||||
if (MESA_VERBOSE&VERBOSE_DRIVER) {
|
||||
fprintf(stderr,"fxmesa: fxMesaCreateContext() End (%s)\n",errorstr);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -29,6 +29,7 @@
|
||||
|
||||
#if defined(FX)
|
||||
|
||||
#include "types.h"
|
||||
#include "fxdrv.h"
|
||||
#include "enums.h"
|
||||
#include "extensions.h"
|
||||
@@ -337,6 +338,7 @@ static GLint fxDDGetParameteri(const GLcontext *ctx, GLint param)
|
||||
fprintf(stderr,"fx Driver: internal error in fxDDGetParameteri(): %x\n",param);
|
||||
fxCloseHardware();
|
||||
exit(-1);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -353,55 +355,161 @@ void fxDDSetNearFar(GLcontext *ctx, GLfloat n, GLfloat f)
|
||||
*/
|
||||
static const GLubyte *fxDDGetString(GLcontext *ctx, GLenum name)
|
||||
{
|
||||
static char *extensions="GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_logic_op GL_EXT_blend_subtract GL_EXT_paletted_texture GL_EXT_point_parameters GL_EXT_polygon_offset GL_EXT_vertex_array GL_EXT_texture_object GL_EXT_texture3D GL_MESA_window_pos GL_MESA_resize_buffers GL_EXT_shared_texture_palette GL_EXT_rescale_normal GL_EXT_abgr GL_SGIS_texture_edge_clamp 3DFX_set_global_palette GL_FXMESA_global_texture_lod_bias";
|
||||
|
||||
static char buf[MAX_NUM_SST][64];
|
||||
|
||||
fxQueryHardware();
|
||||
|
||||
switch (name) {
|
||||
case GL_RENDERER:
|
||||
if(glbHWConfig.SSTs[glbCurrentBoard].type==GR_SSTTYPE_VOODOO) {
|
||||
sprintf(buf[glbCurrentBoard],"Mesa Glide v0.30 Voodoo_Graphics %d CARD/%d FB/%d TM/%d TMU/%s",
|
||||
glbCurrentBoard,
|
||||
|
||||
(glbHWConfig.SSTs[glbCurrentBoard].sstBoard.VoodooConfig.sliDetect ?
|
||||
(glbHWConfig.SSTs[glbCurrentBoard].sstBoard.VoodooConfig.fbRam*2) :
|
||||
glbHWConfig.SSTs[glbCurrentBoard].sstBoard.VoodooConfig.fbRam),
|
||||
|
||||
glbHWConfig.SSTs[glbCurrentBoard].sstBoard.VoodooConfig.tmuConfig[GR_TMU0].tmuRam+
|
||||
((glbHWConfig.SSTs[glbCurrentBoard].sstBoard.VoodooConfig.nTexelfx>1) ?
|
||||
glbHWConfig.SSTs[glbCurrentBoard].sstBoard.VoodooConfig.tmuConfig[GR_TMU1].tmuRam :
|
||||
0),
|
||||
|
||||
glbHWConfig.SSTs[glbCurrentBoard].sstBoard.VoodooConfig.nTexelfx,
|
||||
|
||||
(glbHWConfig.SSTs[glbCurrentBoard].sstBoard.VoodooConfig.sliDetect ? "SLI" : "NOSLI")
|
||||
);
|
||||
}
|
||||
else {
|
||||
if(glbHWConfig.SSTs[glbCurrentBoard].type==GR_SSTTYPE_SST96)
|
||||
sprintf(buf[glbCurrentBoard],"Glide v0.30 Voodoo_Rush %d CARD/%d FB/%d TM/%d TMU/NOSLI",
|
||||
glbCurrentBoard,
|
||||
|
||||
glbHWConfig.SSTs[glbCurrentBoard].sstBoard.SST96Config.fbRam,
|
||||
|
||||
glbHWConfig.SSTs[glbCurrentBoard].sstBoard.SST96Config.tmuConfig.tmuRam,
|
||||
|
||||
glbHWConfig.SSTs[glbCurrentBoard].sstBoard.SST96Config.nTexelfx
|
||||
);
|
||||
else
|
||||
strcpy(buf[glbCurrentBoard],"Glide v0.30 UNKNOWN");
|
||||
}
|
||||
return (GLubyte *) buf[glbCurrentBoard];
|
||||
case GL_EXTENSIONS:
|
||||
return (GLubyte *) extensions;
|
||||
default:
|
||||
switch (name) {
|
||||
case GL_RENDERER:
|
||||
#if defined(GLX_DIRECT_RENDERING)
|
||||
return "Mesa Glide - DRI VB/V3";
|
||||
#else
|
||||
return "Mesa Glide";
|
||||
#endif
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int fxDDInitFxMesaContext( fxMesaContext fxMesa,
|
||||
int win,
|
||||
int res,
|
||||
int ref,
|
||||
int aux )
|
||||
{
|
||||
FX_GrContext_t glideContext = FX_grSstWinOpen((FxU32)win,res,ref,
|
||||
#if FXMESA_USE_ARGB
|
||||
GR_COLORFORMAT_ARGB,
|
||||
#else
|
||||
GR_COLORFORMAT_ABGR,
|
||||
#endif
|
||||
GR_ORIGIN_LOWER_LEFT,
|
||||
2,
|
||||
aux);
|
||||
|
||||
if (!glideContext) return 0;
|
||||
|
||||
FX_setupGrVertexLayout();
|
||||
|
||||
fxMesa->glideContext = glideContext;
|
||||
|
||||
if (getenv("FX_EMULATE_SINGLE_TMU"))
|
||||
fxMesa->haveTwoTMUs = GL_FALSE;
|
||||
|
||||
fxMesa->emulateTwoTMUs = fxMesa->haveTwoTMUs;
|
||||
|
||||
if (!getenv("FX_DONT_FAKE_MULTITEX"))
|
||||
fxMesa->emulateTwoTMUs = GL_TRUE;
|
||||
|
||||
if(getenv("FX_GLIDE_SWAPINTERVAL"))
|
||||
fxMesa->swapInterval=atoi(getenv("FX_GLIDE_SWAPINTERVAL"));
|
||||
else
|
||||
fxMesa->swapInterval=1;
|
||||
|
||||
if(getenv("MESA_FX_SWAP_PENDING"))
|
||||
fxMesa->maxPendingSwapBuffers=atoi(getenv("MESA_FX_SWAP_PENDING"));
|
||||
else
|
||||
fxMesa->maxPendingSwapBuffers=2;
|
||||
|
||||
fxMesa->color=0xffffffff;
|
||||
fxMesa->clearC=0;
|
||||
fxMesa->clearA=0;
|
||||
|
||||
fxMesa->stats.swapBuffer=0;
|
||||
fxMesa->stats.reqTexUpload=0;
|
||||
fxMesa->stats.texUpload=0;
|
||||
fxMesa->stats.memTexUpload=0;
|
||||
|
||||
fxMesa->tmuSrc=FX_TMU_NONE;
|
||||
fxMesa->lastUnitsMode=FX_UM_NONE;
|
||||
fxTMInit(fxMesa);
|
||||
|
||||
/* FX units setup */
|
||||
|
||||
fxMesa->unitsState.alphaTestEnabled=GL_FALSE;
|
||||
fxMesa->unitsState.alphaTestFunc=GR_CMP_ALWAYS;
|
||||
fxMesa->unitsState.alphaTestRefValue=0;
|
||||
|
||||
fxMesa->unitsState.blendEnabled=GL_FALSE;
|
||||
fxMesa->unitsState.blendSrcFuncRGB=GR_BLEND_ONE;
|
||||
fxMesa->unitsState.blendDstFuncRGB=GR_BLEND_ZERO;
|
||||
fxMesa->unitsState.blendSrcFuncAlpha=GR_BLEND_ONE;
|
||||
fxMesa->unitsState.blendDstFuncAlpha=GR_BLEND_ZERO;
|
||||
|
||||
fxMesa->unitsState.depthTestEnabled =GL_FALSE;
|
||||
fxMesa->unitsState.depthMask =GL_TRUE;
|
||||
fxMesa->unitsState.depthTestFunc =GR_CMP_LESS;
|
||||
|
||||
grColorMask(FXTRUE, fxMesa->haveAlphaBuffer ? FXTRUE : FXFALSE);
|
||||
if(fxMesa->haveDoubleBuffer) {
|
||||
fxMesa->currentFB=GR_BUFFER_BACKBUFFER;
|
||||
grRenderBuffer(GR_BUFFER_BACKBUFFER);
|
||||
} else {
|
||||
fxMesa->currentFB=GR_BUFFER_FRONTBUFFER;
|
||||
grRenderBuffer(GR_BUFFER_FRONTBUFFER);
|
||||
}
|
||||
|
||||
fxMesa->state = NULL;
|
||||
fxMesa->fogTable = NULL;
|
||||
|
||||
fxMesa->state = malloc(FX_grGetInteger(FX_GLIDE_STATE_SIZE));
|
||||
fxMesa->fogTable = malloc(FX_grGetInteger(FX_FOG_TABLE_ENTRIES)*sizeof(GrFog_t));
|
||||
|
||||
if (!fxMesa->state || !fxMesa->fogTable) {
|
||||
if (fxMesa->state) free(fxMesa->state);
|
||||
if (fxMesa->fogTable) free(fxMesa->fogTable);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(fxMesa->haveZBuffer)
|
||||
grDepthBufferMode(GR_DEPTHBUFFER_ZBUFFER);
|
||||
|
||||
#if (!FXMESA_USE_ARGB)
|
||||
grLfbWriteColorFormat(GR_COLORFORMAT_ABGR); /* Not every Glide has this */
|
||||
#endif
|
||||
|
||||
fxMesa->glCtx->Const.MaxTextureLevels=9;
|
||||
fxMesa->glCtx->Const.MaxTextureSize=256;
|
||||
fxMesa->glCtx->Const.MaxTextureUnits=fxMesa->emulateTwoTMUs ? 2 : 1;
|
||||
fxMesa->glCtx->NewState|=NEW_DRVSTATE1;
|
||||
fxMesa->new_state = NEW_ALL;
|
||||
|
||||
fxDDSetupInit();
|
||||
fxDDCvaInit();
|
||||
fxDDClipInit();
|
||||
fxDDTrifuncInit();
|
||||
fxDDFastPathInit();
|
||||
|
||||
fxSetupDDPointers(fxMesa->glCtx);
|
||||
fxDDRenderInit(fxMesa->glCtx);
|
||||
fxDDInitExtensions(fxMesa->glCtx);
|
||||
|
||||
fxDDSetNearFar(fxMesa->glCtx,1.0,100.0);
|
||||
|
||||
grGlideGetState((GrState*)fxMesa->state);
|
||||
|
||||
/* XXX Fix me: callback not registered when main VB is created.
|
||||
*/
|
||||
if (fxMesa->glCtx->VB)
|
||||
fxDDRegisterVB( fxMesa->glCtx->VB );
|
||||
|
||||
/* XXX Fix me too: need to have the 'struct dd' prepared prior to
|
||||
* creating the context... The below is broken if you try to insert
|
||||
* new stages.
|
||||
*/
|
||||
if (fxMesa->glCtx->NrPipelineStages)
|
||||
fxMesa->glCtx->NrPipelineStages = fxDDRegisterPipelineStages(
|
||||
fxMesa->glCtx->PipelineStage,
|
||||
fxMesa->glCtx->PipelineStage,
|
||||
fxMesa->glCtx->NrPipelineStages);
|
||||
|
||||
/* Run the config file */
|
||||
gl_context_initialize( fxMesa->glCtx );
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void fxDDInitExtensions( GLcontext *ctx )
|
||||
{
|
||||
fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx;
|
||||
@@ -409,6 +517,9 @@ void fxDDInitExtensions( GLcontext *ctx )
|
||||
gl_extensions_add( ctx, DEFAULT_ON, "3DFX_set_global_palette", 0 );
|
||||
gl_extensions_add( ctx, DEFAULT_ON, "GL_FXMESA_global_texture_lod_bias", 0);
|
||||
|
||||
if(fxMesa->haveTwoTMUs)
|
||||
gl_extensions_add( ctx, DEFAULT_ON, "GL_EXT_texture_env_add", 0);
|
||||
|
||||
if (!fxMesa->emulateTwoTMUs)
|
||||
gl_extensions_disable( ctx, "GL_ARB_multitexture" );
|
||||
}
|
||||
|
@@ -34,7 +34,7 @@
|
||||
/*************************** Texture Mapping ****************************/
|
||||
/************************************************************************/
|
||||
|
||||
static void fxTexInvalidate(GLcontext *ctx, struct gl_texture_object *tObj)
|
||||
void fxTexInvalidate(GLcontext *ctx, struct gl_texture_object *tObj)
|
||||
{
|
||||
fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx;
|
||||
tfxTexInfo *ti;
|
||||
|
@@ -29,11 +29,16 @@
|
||||
* you turn debugging on/off from the debugger.
|
||||
*/
|
||||
|
||||
#ifndef XFree86Server
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
#include <assert.h>
|
||||
#else
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__linux__)
|
||||
#include <signal.h>
|
||||
@@ -79,6 +84,20 @@ extern void fx_sanity_triangle( GrVertex *, GrVertex *, GrVertex * );
|
||||
#define S1COORD GR_VERTEX_SOW_TMU1_OFFSET
|
||||
#define T1COORD GR_VERTEX_TOW_TMU1_OFFSET
|
||||
|
||||
|
||||
#if FX_USE_PARGB
|
||||
|
||||
#define CLIP_XCOORD 0 /* normal place */
|
||||
#define CLIP_YCOROD 1 /* normal place */
|
||||
#define CLIP_ZCOORD 2 /* normal place */
|
||||
#define CLIP_WCOORD 3 /* normal place */
|
||||
#define CLIP_GCOORD 4 /* GR_VERTEX_PARGB_OFFSET */
|
||||
#define CLIP_BCOORD 5 /* GR_VERTEX_SOW_TMU0_OFFSET */
|
||||
#define CLIP_RCOORD 6 /* GR_VERTEX_TOW_TMU0_OFFSET */
|
||||
#define CLIP_ACOORD 7 /* GR_VERTEX_OOW_TMU0_OFFSET */
|
||||
|
||||
#else
|
||||
|
||||
#define CLIP_XCOORD 0 /* normal place */
|
||||
#define CLIP_YCOROD 1 /* normal place */
|
||||
#define CLIP_ZCOORD 2 /* GR_VERTEX_Z_OFFSET */
|
||||
@@ -89,7 +108,7 @@ extern void fx_sanity_triangle( GrVertex *, GrVertex *, GrVertex * );
|
||||
#define CLIP_ACOORD 7 /* normal place */
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/* Should have size == 16 * sizeof(float).
|
||||
*/
|
||||
@@ -141,6 +160,12 @@ do { \
|
||||
gWin[(x)].v.a=UBYTE_COLOR_TO_FLOAT_255_COLOR(col[3]); \
|
||||
}
|
||||
|
||||
#if FX_USE_PARGB
|
||||
#define GOURAUD2(v, c) { \
|
||||
GLubyte *col = c; \
|
||||
v->argb=MESACOLOR2PARGB(col); \
|
||||
}
|
||||
#else
|
||||
#define GOURAUD2(v, c) { \
|
||||
GLubyte *col = c; \
|
||||
v->r=UBYTE_COLOR_TO_FLOAT_255_COLOR(col[0]); \
|
||||
@@ -148,6 +173,7 @@ do { \
|
||||
v->b=UBYTE_COLOR_TO_FLOAT_255_COLOR(col[2]); \
|
||||
v->a=UBYTE_COLOR_TO_FLOAT_255_COLOR(col[3]); \
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* Mergable items first
|
||||
@@ -178,29 +204,31 @@ do { \
|
||||
#define FX_UM_E0_MODULATE 0x00000002
|
||||
#define FX_UM_E0_DECAL 0x00000004
|
||||
#define FX_UM_E0_BLEND 0x00000008
|
||||
#define FX_UM_E0_ADD 0x00000010
|
||||
|
||||
#define FX_UM_E1_REPLACE 0x00000010
|
||||
#define FX_UM_E1_MODULATE 0x00000020
|
||||
#define FX_UM_E1_DECAL 0x00000040
|
||||
#define FX_UM_E1_BLEND 0x00000080
|
||||
#define FX_UM_E1_REPLACE 0x00000020
|
||||
#define FX_UM_E1_MODULATE 0x00000040
|
||||
#define FX_UM_E1_DECAL 0x00000080
|
||||
#define FX_UM_E1_BLEND 0x00000100
|
||||
#define FX_UM_E1_ADD 0x00000200
|
||||
|
||||
#define FX_UM_E_ENVMODE 0x000000ff
|
||||
#define FX_UM_E_ENVMODE 0x000003ff
|
||||
|
||||
#define FX_UM_E0_ALPHA 0x00000100
|
||||
#define FX_UM_E0_LUMINANCE 0x00000200
|
||||
#define FX_UM_E0_LUMINANCE_ALPHA 0x00000400
|
||||
#define FX_UM_E0_INTENSITY 0x00000800
|
||||
#define FX_UM_E0_RGB 0x00001000
|
||||
#define FX_UM_E0_RGBA 0x00002000
|
||||
#define FX_UM_E0_ALPHA 0x00001000
|
||||
#define FX_UM_E0_LUMINANCE 0x00002000
|
||||
#define FX_UM_E0_LUMINANCE_ALPHA 0x00004000
|
||||
#define FX_UM_E0_INTENSITY 0x00008000
|
||||
#define FX_UM_E0_RGB 0x00010000
|
||||
#define FX_UM_E0_RGBA 0x00020000
|
||||
|
||||
#define FX_UM_E1_ALPHA 0x00004000
|
||||
#define FX_UM_E1_LUMINANCE 0x00008000
|
||||
#define FX_UM_E1_LUMINANCE_ALPHA 0x00010000
|
||||
#define FX_UM_E1_INTENSITY 0x00020000
|
||||
#define FX_UM_E1_RGB 0x00040000
|
||||
#define FX_UM_E1_RGBA 0x00080000
|
||||
#define FX_UM_E1_ALPHA 0x00040000
|
||||
#define FX_UM_E1_LUMINANCE 0x00080000
|
||||
#define FX_UM_E1_LUMINANCE_ALPHA 0x00100000
|
||||
#define FX_UM_E1_INTENSITY 0x00200000
|
||||
#define FX_UM_E1_RGB 0x00400000
|
||||
#define FX_UM_E1_RGBA 0x00800000
|
||||
|
||||
#define FX_UM_E_IFMT 0x000fff00
|
||||
#define FX_UM_E_IFMT 0x00fff000
|
||||
|
||||
#define FX_UM_COLOR_ITERATED 0x00100000
|
||||
#define FX_UM_COLOR_CONSTANT 0x00200000
|
||||
@@ -355,9 +383,15 @@ struct tfxMesaVertexBuffer {
|
||||
};
|
||||
|
||||
#define FX_DRIVER_DATA(vb) ((struct tfxMesaVertexBuffer *)((vb)->driver_data))
|
||||
#define FX_CONTEXT(ctx) ((struct tfxMesaContext *)((ctx)->DriverCtx))
|
||||
#define FX_CONTEXT(ctx) ((fxMesaContext)((ctx)->DriverCtx))
|
||||
#define FX_TEXTURE_DATA(t) ((tfxTexInfo *) ((t)->Current->DriverData))
|
||||
|
||||
#if defined(XFree86Server) || defined(GLX_DIRECT_RENDERING)
|
||||
#include "tdfx_init.h"
|
||||
#else
|
||||
#define DRI_FX_CONTEXT
|
||||
#endif
|
||||
|
||||
struct tfxMesaContext {
|
||||
GuTexPalette glbPalette;
|
||||
|
||||
@@ -435,12 +469,16 @@ struct tfxMesaContext {
|
||||
GLboolean haveTwoTMUs; /* True if we really have 2 tmu's */
|
||||
GLboolean emulateTwoTMUs; /* True if we present 2 tmu's to mesa. */
|
||||
GLboolean haveAlphaBuffer;
|
||||
GLboolean haveZBuffer;
|
||||
GLboolean haveDoubleBuffer;
|
||||
GLboolean haveGlobalPaletteTexture;
|
||||
GLint swapInterval;
|
||||
GLint maxPendingSwapBuffers;
|
||||
|
||||
FX_GrContext_t glideContext;
|
||||
|
||||
DRI_FX_CONTEXT
|
||||
|
||||
};
|
||||
|
||||
typedef void (*tfxSetupFunc)(struct vertex_buffer *, GLuint, GLuint);
|
||||
@@ -452,10 +490,10 @@ extern void fxSetupFXUnits(GLcontext *);
|
||||
extern void fxSetupDDPointers(GLcontext *);
|
||||
extern void fxDDSetNearFar(GLcontext *, GLfloat, GLfloat);
|
||||
|
||||
extern void fxDDSetupInit();
|
||||
extern void fxDDCvaInit();
|
||||
extern void fxDDTrifuncInit();
|
||||
extern void fxDDFastPathInit();
|
||||
extern void fxDDSetupInit(void);
|
||||
extern void fxDDCvaInit(void);
|
||||
extern void fxDDTrifuncInit(void);
|
||||
extern void fxDDFastPathInit(void);
|
||||
|
||||
extern void fxDDChooseRenderState( GLcontext *ctx );
|
||||
|
||||
@@ -475,7 +513,7 @@ extern quad_func fxDDChooseQuadFunction(GLcontext *);
|
||||
extern render_func **fxDDChooseRenderVBTables(GLcontext *);
|
||||
|
||||
extern void fxDDRenderInit(GLcontext *);
|
||||
extern void fxDDClipInit();
|
||||
extern void fxDDClipInit(void);
|
||||
|
||||
extern void fxUpdateDDSpanPointers(GLcontext *);
|
||||
extern void fxSetupDDSpanPointers(GLcontext *);
|
||||
@@ -531,8 +569,8 @@ extern void fxDDRenderVBIndirectDirect( struct vertex_buffer *VB );
|
||||
|
||||
extern void fxDDInitExtensions( GLcontext *ctx );
|
||||
|
||||
extern void fxTMInit(fxMesaContext);
|
||||
extern void fxTMClose(fxMesaContext);
|
||||
extern void fxTMInit(fxMesaContext ctx);
|
||||
extern void fxTMClose(fxMesaContext ctx);
|
||||
extern void fxTMMoveInTM(fxMesaContext, struct gl_texture_object *, GLint);
|
||||
extern void fxTMMoveOutTM(fxMesaContext, struct gl_texture_object *);
|
||||
extern void fxTMFreeTexture(fxMesaContext, struct gl_texture_object *);
|
||||
@@ -580,5 +618,7 @@ extern void fxPrintHintState( const char *msg, GLuint state );
|
||||
|
||||
extern void fxDDDoRenderVB( struct vertex_buffer *VB );
|
||||
|
||||
extern int fxDDInitFxMesaContext( fxMesaContext fxMesa,
|
||||
int win, int res, int ref, int aux );
|
||||
|
||||
#endif
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: fxglidew.c,v 1.2 1999/09/17 03:07:28 tjump Exp $ */
|
||||
/* $Id: fxglidew.c,v 1.3 1999/10/05 19:26:54 miklos Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -161,6 +161,22 @@ void FX_grAADrawPoint(GrVertex *a)
|
||||
grDrawPoint(a);
|
||||
}
|
||||
|
||||
#if FX_USE_PARGB
|
||||
void FX_setupGrVertexLayout(void)
|
||||
{
|
||||
grReset(GR_VERTEX_PARAMETER);
|
||||
|
||||
grCoordinateSpace(GR_WINDOW_COORDS);
|
||||
grVertexLayout(GR_PARAM_XY, GR_VERTEX_X_OFFSET << 2, GR_PARAM_ENABLE);
|
||||
grVertexLayout(GR_PARAM_PARGB, GR_VERTEX_PARGB_OFFSET << 2, GR_PARAM_ENABLE);
|
||||
grVertexLayout(GR_PARAM_Q, GR_VERTEX_OOW_OFFSET << 2, GR_PARAM_ENABLE);
|
||||
grVertexLayout(GR_PARAM_Z, GR_VERTEX_OOZ_OFFSET << 2, GR_PARAM_ENABLE);
|
||||
grVertexLayout(GR_PARAM_ST0, GR_VERTEX_SOW_TMU0_OFFSET << 2, GR_PARAM_ENABLE);
|
||||
grVertexLayout(GR_PARAM_Q0, GR_VERTEX_OOW_TMU0_OFFSET << 2, GR_PARAM_DISABLE);
|
||||
grVertexLayout(GR_PARAM_ST1, GR_VERTEX_SOW_TMU1_OFFSET << 2, GR_PARAM_DISABLE);
|
||||
grVertexLayout(GR_PARAM_Q1, GR_VERTEX_OOW_TMU1_OFFSET << 2, GR_PARAM_DISABLE);
|
||||
}
|
||||
#else /* FX_USE_PARGB */
|
||||
void FX_setupGrVertexLayout(void)
|
||||
{
|
||||
grReset(GR_VERTEX_PARAMETER);
|
||||
@@ -177,6 +193,7 @@ void FX_setupGrVertexLayout(void)
|
||||
grVertexLayout(GR_PARAM_ST1, GR_VERTEX_SOW_TMU1_OFFSET << 2, GR_PARAM_DISABLE);
|
||||
grVertexLayout(GR_PARAM_Q1, GR_VERTEX_OOW_TMU1_OFFSET << 2, GR_PARAM_DISABLE);
|
||||
}
|
||||
#endif
|
||||
|
||||
void FX_grHints(GrHint_t hintType, FxU32 hintMask)
|
||||
{
|
||||
@@ -225,7 +242,8 @@ int FX_grSstQueryHardware(GrHwConfiguration *config)
|
||||
config->SSTs[i].sstBoard.VoodooConfig.sliDetect = FXFALSE;
|
||||
for (j = 0; j < config->SSTs[i].sstBoard.VoodooConfig.nTexelfx; j++)
|
||||
{
|
||||
grGet(GR_MEMORY_TMU,4,(void*)&(config->SSTs[i].sstBoard.VoodooConfig.tmuConfig[i].tmuRam));
|
||||
grGet(GR_MEMORY_TMU,4,(void*)&(config->SSTs[i].sstBoard.VoodooConfig.tmuConfig[j].tmuRam));
|
||||
config->SSTs[i].sstBoard.VoodooConfig.tmuConfig[j].tmuRam /= 1024*1024;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
|
@@ -155,6 +155,50 @@ typedef struct {
|
||||
float oow; /* 1/w (used mipmapping - really 0xfff/w) */
|
||||
} GrTmuVertex;
|
||||
|
||||
|
||||
#if FX_USE_PARGB
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float x, y; /* X and Y in screen space */
|
||||
float ooz; /* 65535/Z (used for Z-buffering) */
|
||||
float oow; /* 1/W (used for W-buffering, texturing) */
|
||||
FxU32 argb; /* R, G, B, A [0..255.0] */
|
||||
GrTmuVertex tmuvtx[GLIDE_NUM_TMU];
|
||||
float z; /* Z is ignored */
|
||||
} GrVertex;
|
||||
|
||||
#define GR_VERTEX_X_OFFSET 0
|
||||
#define GR_VERTEX_Y_OFFSET 1
|
||||
#define GR_VERTEX_OOZ_OFFSET 2
|
||||
#define GR_VERTEX_OOW_OFFSET 3
|
||||
#define GR_VERTEX_PARGB_OFFSET 4
|
||||
#define GR_VERTEX_SOW_TMU0_OFFSET 5
|
||||
#define GR_VERTEX_TOW_TMU0_OFFSET 6
|
||||
#define GR_VERTEX_OOW_TMU0_OFFSET 7
|
||||
#define GR_VERTEX_SOW_TMU1_OFFSET 8
|
||||
#define GR_VERTEX_TOW_TMU1_OFFSET 9
|
||||
#define GR_VERTEX_OOW_TMU1_OFFSET 10
|
||||
#define GR_VERTEX_Z_OFFSET 11
|
||||
|
||||
#define GET_PARGB(v) ((FxU32*)(v))[GR_VERTEX_PARGB_OFFSET]
|
||||
/* GET_PA: returns the alpha component */
|
||||
#if GLIDE_ENDIAN == GLIDE_ENDIAN_BIG
|
||||
#define GET_PA(v) ((FxU8*)(v))[GR_VERTEX_PARGB_OFFSET*4]
|
||||
#else
|
||||
#define GET_PA(v) ((FxU8*)(v))[GR_VERTEX_PARGB_OFFSET*4+3]
|
||||
#endif
|
||||
#define MESACOLOR2PARGB(c) (c[ACOMP] << 24 | c[GCOMP] << 16 | c[GCOMP] << 8 | c[BCOMP])
|
||||
#define PACK_4F_ARGB(dest,a,r,g,b) { \
|
||||
const GLuint cr = (int)r; \
|
||||
const GLuint cg = (int)g; \
|
||||
const GLuint ca = (int)a; \
|
||||
const GLuint cb = (int)b; \
|
||||
dest = ca << 24 | cr << 16 | cg << 8 | cb; \
|
||||
}
|
||||
|
||||
#else /* FX_USE_PARGB */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float x, y; /* X and Y in screen space */
|
||||
@@ -180,6 +224,7 @@ typedef struct
|
||||
#define GR_VERTEX_SOW_TMU1_OFFSET 12
|
||||
#define GR_VERTEX_TOW_TMU1_OFFSET 13
|
||||
#define GR_VERTEX_OOW_TMU1_OFFSET 14
|
||||
#endif /* FX_USE_PARGB */
|
||||
|
||||
#endif
|
||||
|
||||
|
@@ -167,6 +167,9 @@ GLuint fxGetTexSetConfiguration(GLcontext *ctx,
|
||||
case GL_BLEND:
|
||||
envmode|=FX_UM_E0_BLEND;
|
||||
break;
|
||||
case GL_ADD:
|
||||
envmode|=FX_UM_E0_ADD;
|
||||
break;
|
||||
default:
|
||||
/* do nothing */
|
||||
break;
|
||||
@@ -213,6 +216,9 @@ GLuint fxGetTexSetConfiguration(GLcontext *ctx,
|
||||
case GL_BLEND:
|
||||
envmode|=FX_UM_E1_BLEND;
|
||||
break;
|
||||
case GL_ADD:
|
||||
envmode|=FX_UM_E1_ADD;
|
||||
break;
|
||||
default:
|
||||
/* do nothing */
|
||||
break;
|
||||
@@ -786,6 +792,57 @@ static void fxSetupTextureDoubleTMU(GLcontext *ctx)
|
||||
GR_COMBINE_OTHER_TEXTURE,
|
||||
FXFALSE);
|
||||
break;
|
||||
|
||||
|
||||
case (FX_UM_E0_MODULATE | FX_UM_E1_ADD): /* Quake 3 Sky */
|
||||
{
|
||||
GLboolean isalpha[FX_NUM_TMU];
|
||||
|
||||
if(ti0->baseLevelInternalFormat==GL_ALPHA)
|
||||
isalpha[ti0->tmi.whichTMU]=GL_TRUE;
|
||||
else
|
||||
isalpha[ti0->tmi.whichTMU]=GL_FALSE;
|
||||
|
||||
if(ti1->baseLevelInternalFormat==GL_ALPHA)
|
||||
isalpha[ti1->tmi.whichTMU]=GL_TRUE;
|
||||
else
|
||||
isalpha[ti1->tmi.whichTMU]=GL_FALSE;
|
||||
|
||||
if(isalpha[FX_TMU1])
|
||||
grTexCombine(GR_TMU1,
|
||||
GR_COMBINE_FUNCTION_ZERO,GR_COMBINE_FACTOR_NONE,
|
||||
GR_COMBINE_FUNCTION_LOCAL,GR_COMBINE_FACTOR_NONE,
|
||||
FXTRUE,FXFALSE);
|
||||
else
|
||||
grTexCombine(GR_TMU1,
|
||||
GR_COMBINE_FUNCTION_LOCAL,GR_COMBINE_FACTOR_NONE,
|
||||
GR_COMBINE_FUNCTION_LOCAL,GR_COMBINE_FACTOR_NONE,
|
||||
FXFALSE,FXFALSE);
|
||||
|
||||
if(isalpha[FX_TMU0])
|
||||
grTexCombine(GR_TMU0,
|
||||
GR_COMBINE_FUNCTION_SCALE_OTHER,GR_COMBINE_FACTOR_ONE,
|
||||
GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL,GR_COMBINE_FACTOR_ONE,
|
||||
FXFALSE,FXFALSE);
|
||||
else
|
||||
grTexCombine(GR_TMU0,
|
||||
GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL,GR_COMBINE_FACTOR_ONE,
|
||||
GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL,GR_COMBINE_FACTOR_ONE,
|
||||
FXFALSE,FXFALSE);
|
||||
|
||||
grColorCombine(GR_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GR_COMBINE_FACTOR_LOCAL,
|
||||
localc,
|
||||
GR_COMBINE_OTHER_TEXTURE,
|
||||
FXFALSE);
|
||||
|
||||
grAlphaCombine(GR_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GR_COMBINE_FACTOR_LOCAL,
|
||||
locala, GR_COMBINE_OTHER_TEXTURE,
|
||||
FXFALSE);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (MESA_VERBOSE&VERBOSE_DRIVER) {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: xmesaP.h,v 1.1 1999/08/19 00:55:42 jtg Exp $ */
|
||||
/* $Id: xmesaP.h,v 1.2 1999/10/08 09:27:12 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -23,6 +23,9 @@
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
/* $XFree86: xc/lib/GL/mesa/src/X/xmesaP.h,v 1.5 1999/07/06 14:51:28 dawes Exp $ */
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef XMESAP_H
|
||||
@@ -30,20 +33,33 @@
|
||||
|
||||
|
||||
#ifdef XFree86Server
|
||||
#include "xf86glx_util.h"
|
||||
# include "GL/xf86glx.h"
|
||||
# include "xf86glx_util.h"
|
||||
#else
|
||||
#ifdef SHM
|
||||
#include <X11/extensions/XShm.h>
|
||||
#endif
|
||||
# ifdef GLX_DIRECT_RENDERING
|
||||
# include "dri_mesa.h"
|
||||
# endif
|
||||
# ifdef SHM
|
||||
# include <X11/extensions/XShm.h>
|
||||
# endif
|
||||
#endif
|
||||
#include "GL/xmesa.h"
|
||||
#include "types.h"
|
||||
#ifdef FX
|
||||
#if defined(FX) && !defined(GLX_DIRECT_RENDERING)
|
||||
#include "GL/fxmesa.h"
|
||||
#include "../FX/fxdrv.h"
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(GLX_DIRECT_RENDERING) && !defined(XFree86Server)
|
||||
# include "xdriP.h"
|
||||
#else
|
||||
# define DRI_DRAWABLE_ARG
|
||||
# define DRI_DRAWABLE_PARM
|
||||
# define DRI_CTX_ARG
|
||||
#endif
|
||||
|
||||
|
||||
/* for PF_8R8G8B24 pixel format */
|
||||
typedef struct {
|
||||
GLubyte b;
|
||||
@@ -52,13 +68,17 @@ typedef struct {
|
||||
} bgr_t;
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* "Derived" from gl_visual. Basically corresponds to an XVisualInfo.
|
||||
*/
|
||||
struct xmesa_visual {
|
||||
GLvisual *gl_visual; /* Device independent visual parameters */
|
||||
XMesaDisplay *display; /* The X11 display */
|
||||
#ifndef XFree86Server
|
||||
#ifdef XFree86Server
|
||||
GLint screen_depth; /* The depth of the screen */
|
||||
#else
|
||||
XVisualInfo *vishandle; /* The pointer returned by glXChooseVisual */
|
||||
#endif
|
||||
XMesaVisualInfo visinfo; /* X's visual info */
|
||||
@@ -119,6 +139,13 @@ struct xmesa_context {
|
||||
|
||||
GLubyte clearcolor[4]; /* current clearing color */
|
||||
unsigned long clearpixel; /* current clearing pixel value */
|
||||
|
||||
#if defined(GLX_DIRECT_RENDERING) && !defined(XFree86Server)
|
||||
__DRIcontextPrivate *driContextPriv; /* back pointer to DRI context
|
||||
* used for locking
|
||||
*/
|
||||
void *private; /* device-specific private context */
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -194,7 +221,14 @@ struct xmesa_buffer {
|
||||
int num_alloced;
|
||||
unsigned long alloced_colors[256];
|
||||
|
||||
#ifdef FX
|
||||
#if defined(GLX_DIRECT_RENDERING) && !defined(XFree86Server)
|
||||
__DRIdrawablePrivate *driDrawPriv; /* back pointer to DRI drawable
|
||||
* used for direct access to framebuffer
|
||||
*/
|
||||
void *private; /* device-specific private drawable */
|
||||
#endif
|
||||
|
||||
#if defined( FX ) && !defined(GLX_DIRECT_RENDERING)
|
||||
/* For 3Dfx Glide only */
|
||||
GLboolean FXisHackUsable; /* Can we render into window? */
|
||||
GLboolean FXwindowHack; /* Are we rendering into a window? */
|
||||
@@ -278,6 +312,7 @@ struct xmesa_buffer {
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* If pixelformat==PF_DITHER:
|
||||
*
|
||||
@@ -287,6 +322,7 @@ struct xmesa_buffer {
|
||||
#undef _R
|
||||
#undef _G
|
||||
#undef _B
|
||||
#undef _D
|
||||
#ifdef DITHER666
|
||||
# define _R 6
|
||||
# define _G 6
|
||||
@@ -484,8 +520,9 @@ extern triangle_func xmesa_get_triangle_func( GLcontext *ctx );
|
||||
/* XXX this is a hack to implement shared display lists with 3Dfx */
|
||||
extern XMesaBuffer XMesaCreateWindowBuffer2( XMesaVisual v,
|
||||
XMesaWindow w,
|
||||
XMesaContext c );
|
||||
|
||||
XMesaContext c
|
||||
DRI_DRAWABLE_ARG
|
||||
);
|
||||
|
||||
/*
|
||||
* These are the extra routines required for integration with XFree86.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# $Id: Makefile.DJ,v 1.1 1999/08/19 00:55:41 jtg Exp $
|
||||
# $Id: Makefile.DJ,v 1.2 1999/10/08 09:27:09 keithw Exp $
|
||||
|
||||
# Makefile for core library for MS-DOS using djgpp
|
||||
|
||||
@@ -22,8 +22,11 @@
|
||||
|
||||
|
||||
# $Log: Makefile.DJ,v $
|
||||
# Revision 1.1 1999/08/19 00:55:41 jtg
|
||||
# Initial revision
|
||||
# Revision 1.2 1999/10/08 09:27:09 keithw
|
||||
# Fixed includes & added a few hooks for the DRI.
|
||||
#
|
||||
# Revision 1.1.1.1 1999/08/19 00:55:41 jtg
|
||||
# Imported sources
|
||||
#
|
||||
# Revision 1.1 1999/01/01 14:35:09 brianp
|
||||
# Initial revision
|
||||
@@ -48,7 +51,7 @@ CORE_SOURCES = accum.c alpha.c alphabuf.c api1.c api2.c apiext.c attrib.c \
|
||||
bitmap.c blend.c clip.c colortab.c context.c copypix.c depth.c \
|
||||
dlist.c drawpix.c enable.c eval.c feedback.c fog.c \
|
||||
get.c hash.c image.c light.c lines.c logic.c masking.c matrix.c \
|
||||
misc.c mmath.c mthreads.c pb.c pixel.c points.c pointers.c polygon.c \
|
||||
glmisc.c mmath.c mthreads.c pb.c pixel.c points.c pointers.c polygon.c \
|
||||
quads.c rastpos.c readpix.c rect.c scissor.c shade.c span.c \
|
||||
stencil.c teximage.c texobj.c texstate.c texture.c triangle.c \
|
||||
varray.c winpos.c vb.c vbfill.c vbrender.c vbxform.c xform.c \
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# $Id: Makefile.X11,v 1.5 1999/09/17 12:07:10 brianp Exp $
|
||||
# $Id: Makefile.X11,v 1.6 1999/10/08 09:27:09 keithw Exp $
|
||||
|
||||
# Mesa 3-D graphics library
|
||||
# Version: 3.1
|
||||
@@ -46,6 +46,7 @@ CORE_SOURCES = \
|
||||
feedback.c \
|
||||
fog.c \
|
||||
get.c \
|
||||
glmisc.c \
|
||||
hash.c \
|
||||
image.c \
|
||||
light.c \
|
||||
@@ -53,7 +54,6 @@ CORE_SOURCES = \
|
||||
logic.c \
|
||||
masking.c \
|
||||
matrix.c \
|
||||
misc.c \
|
||||
mmath.c \
|
||||
mthreads.c \
|
||||
pb.c \
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: accum.c,v 1.2 1999/08/19 11:54:28 brianp Exp $ */
|
||||
/* $Id: accum.c,v 1.3 1999/10/08 09:27:09 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -25,14 +25,18 @@
|
||||
*/
|
||||
|
||||
|
||||
/* $XFree86: xc/lib/GL/mesa/src/accum.c,v 1.3 1999/04/04 00:20:17 dawes Exp $ */
|
||||
|
||||
#ifdef PC_HEADER
|
||||
#include "all.h"
|
||||
#else
|
||||
#include <assert.h>
|
||||
#ifndef XFree86Server
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#else
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#include "accum.h"
|
||||
#include "context.h"
|
||||
#include "macros.h"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: attrib.c,v 1.4 1999/09/19 23:43:02 keithw Exp $ */
|
||||
/* $Id: attrib.c,v 1.5 1999/10/08 09:27:10 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -31,15 +31,19 @@
|
||||
#ifdef PC_HEADER
|
||||
#include "all.h"
|
||||
#else
|
||||
#ifndef XFree86Server
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#else
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#include "attrib.h"
|
||||
#include "context.h"
|
||||
#include "glmisc.h"
|
||||
#include "enable.h"
|
||||
#include "enums.h"
|
||||
#include "macros.h"
|
||||
#include "misc.h"
|
||||
#include "simple_list.h"
|
||||
#include "texstate.h"
|
||||
#include "types.h"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: blend.c,v 1.2 1999/08/19 15:48:01 brianp Exp $ */
|
||||
/* $Id: blend.c,v 1.4 1999/10/08 09:27:10 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -29,9 +29,13 @@
|
||||
#ifdef PC_HEADER
|
||||
#include "all.h"
|
||||
#else
|
||||
#include <stdio.h>
|
||||
#ifndef XFree86Server
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#else
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#include "alphabuf.h"
|
||||
#include "blend.h"
|
||||
#include "context.h"
|
||||
@@ -203,6 +207,11 @@ gl_BlendFuncSeparate( GLcontext *ctx, GLenum sfactorRGB, GLenum dfactorRGB,
|
||||
|
||||
ctx->Color.BlendFunc = NULL;
|
||||
ctx->NewState |= NEW_RASTER_OPS;
|
||||
|
||||
if (ctx->Driver.BlendFuncSeparate) {
|
||||
(*ctx->Driver.BlendFuncSeparate)( ctx, sfactorRGB, dfactorRGB,
|
||||
sfactorA, dfactorA );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -243,6 +252,9 @@ void gl_BlendEquation( GLcontext *ctx, GLenum mode )
|
||||
|
||||
ctx->Color.BlendFunc = NULL;
|
||||
ctx->NewState |= NEW_RASTER_OPS;
|
||||
|
||||
if (ctx->Driver.BlendEquation)
|
||||
ctx->Driver.BlendEquation( ctx, mode );
|
||||
}
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: clip.c,v 1.2 1999/09/18 20:41:22 keithw Exp $ */
|
||||
/* $Id: clip.c,v 1.3 1999/10/08 09:27:10 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -31,9 +31,12 @@
|
||||
#ifdef PC_HEADER
|
||||
#include "all.h"
|
||||
#else
|
||||
#ifndef XFree86Server
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#else
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#include "clip.h"
|
||||
#include "context.h"
|
||||
#include "macros.h"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: colortab.c,v 1.1 1999/08/19 00:55:41 jtg Exp $ */
|
||||
/* $Id: colortab.c,v 1.2 1999/10/08 09:27:10 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -23,6 +23,7 @@
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
/* $XFree86: xc/lib/GL/mesa/src/colortab.c,v 1.2 1999/04/04 00:20:21 dawes Exp $ */
|
||||
|
||||
|
||||
|
||||
@@ -31,6 +32,9 @@
|
||||
#ifdef PC_HEADER
|
||||
#include "all.h"
|
||||
#else
|
||||
#ifdef XFree86Server
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#include "colortab.h"
|
||||
#include "context.h"
|
||||
#include "macros.h"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: context.c,v 1.9 1999/09/19 23:43:02 keithw Exp $ */
|
||||
/* $Id: context.c,v 1.10 1999/10/08 09:27:10 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -25,6 +25,8 @@
|
||||
*/
|
||||
|
||||
|
||||
/* $XFree86: xc/lib/GL/mesa/src/context.c,v 1.4 1999/04/04 00:20:21 dawes Exp $ */
|
||||
|
||||
/*
|
||||
* If multi-threading is enabled (-DTHREADS) then each thread has it's
|
||||
* own rendering context. A thread obtains the pointer to its GLcontext
|
||||
@@ -38,11 +40,15 @@
|
||||
#ifdef PC_HEADER
|
||||
#include "all.h"
|
||||
#else
|
||||
#ifndef XFree86Server
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#else
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#include "accum.h"
|
||||
#include "alphabuf.h"
|
||||
#include "api.h"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: dd.h,v 1.2 1999/09/18 20:41:22 keithw Exp $ */
|
||||
/* $Id: dd.h,v 1.3 1999/09/30 11:18:21 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -563,6 +563,23 @@ struct dd_function_table {
|
||||
*/
|
||||
|
||||
|
||||
GLboolean (*IsTextureResident)( GLcontext *ctx,
|
||||
struct gl_texture_object *t );
|
||||
/*
|
||||
* Allows the driver to implement the AreTexturesResident tests without
|
||||
* knowing about Mesa's internal hash tables for textures.
|
||||
*/
|
||||
|
||||
void (*PrioritizeTexture)( GLcontext *ctx,
|
||||
struct gl_texture_object *t,
|
||||
GLclampf priority );
|
||||
/*
|
||||
* Notify driver of priority change for a texture.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
/***
|
||||
*** NEW in Mesa 3.x
|
||||
***/
|
||||
@@ -616,7 +633,11 @@ struct dd_function_table {
|
||||
* the driver's UpdateState() function must do.
|
||||
*/
|
||||
void (*AlphaFunc)(GLcontext *ctx, GLenum func, GLclampf ref);
|
||||
void (*BlendEquation)(GLcontext *ctx, GLenum mode);
|
||||
void (*BlendFunc)(GLcontext *ctx, GLenum sfactor, GLenum dfactor);
|
||||
void (*BlendFuncSeparate)( GLcontext *ctx, GLenum sfactorRGB,
|
||||
GLenum dfactorRGB, GLenum sfactorA,
|
||||
GLenum dfactorA );
|
||||
void (*ClearDepth)(GLcontext *ctx, GLclampd d);
|
||||
void (*CullFace)(GLcontext *ctx, GLenum mode);
|
||||
void (*FrontFace)(GLcontext *ctx, GLenum mode);
|
||||
@@ -626,6 +647,9 @@ struct dd_function_table {
|
||||
void (*Enable)(GLcontext* ctx, GLenum cap, GLboolean state);
|
||||
void (*Fogfv)(GLcontext *ctx, GLenum pname, const GLfloat *params);
|
||||
void (*Hint)(GLcontext *ctx, GLenum target, GLenum mode);
|
||||
void (*Lightfv)(GLcontext *ctx, GLenum light,
|
||||
GLenum pname, const GLfloat *params, GLint nparams );
|
||||
void (*LightModelfv)(GLcontext *ctx, GLenum pname, const GLfloat *params);
|
||||
void (*PolygonMode)(GLcontext *ctx, GLenum face, GLenum mode);
|
||||
void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
|
||||
void (*ShadeModel)(GLcontext *ctx, GLenum mode);
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: depth.c,v 1.3 1999/09/19 23:43:02 keithw Exp $ */
|
||||
/* $Id: depth.c,v 1.4 1999/10/08 09:27:10 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -25,6 +25,8 @@
|
||||
*/
|
||||
|
||||
|
||||
/* $XFree86: xc/lib/GL/mesa/src/depth.c,v 1.3 1999/04/04 00:20:22 dawes Exp $ */
|
||||
|
||||
/*
|
||||
* Depth buffer functions
|
||||
*/
|
||||
@@ -33,9 +35,13 @@
|
||||
#ifdef PC_HEADER
|
||||
#include "all.h"
|
||||
#else
|
||||
#ifndef XFree86Server
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#else
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#include "context.h"
|
||||
#include "enums.h"
|
||||
#include "depth.h"
|
||||
|
@@ -1,4 +1,5 @@
|
||||
/* $Id: depth.h,v 1.1 1999/08/19 00:55:41 jtg Exp $ */
|
||||
|
||||
/* $Id: depth.h,v 1.2 1999/10/08 09:27:10 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: dlist.c,v 1.5 1999/09/20 14:30:22 keithw Exp $ */
|
||||
/* $Id: dlist.c,v 1.6 1999/10/08 09:27:10 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -25,13 +25,19 @@
|
||||
*/
|
||||
|
||||
|
||||
/* $XFree86: xc/lib/GL/mesa/src/dlist.c,v 1.3 1999/04/04 00:20:22 dawes Exp $ */
|
||||
|
||||
#ifdef PC_HEADER
|
||||
#include "all.h"
|
||||
#else
|
||||
#ifndef XFree86Server
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#else
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#include "accum.h"
|
||||
#include "api.h"
|
||||
#include "alpha.h"
|
||||
@@ -52,6 +58,7 @@
|
||||
#include "feedback.h"
|
||||
#include "fog.h"
|
||||
#include "get.h"
|
||||
#include "glmisc.h"
|
||||
#include "hash.h"
|
||||
#include "image.h"
|
||||
#include "light.h"
|
||||
@@ -61,7 +68,6 @@
|
||||
#include "macros.h"
|
||||
#include "masking.h"
|
||||
#include "matrix.h"
|
||||
#include "misc.h"
|
||||
#include "pipeline.h"
|
||||
#include "pixel.h"
|
||||
#include "points.h"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: drawpix.c,v 1.2 1999/09/18 20:41:22 keithw Exp $ */
|
||||
/* $Id: drawpix.c,v 1.3 1999/10/08 09:27:10 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -31,9 +31,13 @@
|
||||
#ifdef PC_HEADER
|
||||
#include "all.h"
|
||||
#else
|
||||
#ifndef XFree86Server
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#else
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#include "context.h"
|
||||
#include "drawpix.h"
|
||||
#include "feedback.h"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: enable.c,v 1.5 1999/09/18 20:41:23 keithw Exp $ */
|
||||
/* $Id: enable.c,v 1.6 1999/10/08 09:27:10 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -25,11 +25,17 @@
|
||||
*/
|
||||
|
||||
|
||||
/* $XFree86: xc/lib/GL/mesa/src/enable.c,v 1.3 1999/04/04 00:20:23 dawes Exp $ */
|
||||
|
||||
#ifdef PC_HEADER
|
||||
#include "all.h"
|
||||
#else
|
||||
#include <string.h>
|
||||
#ifndef XFree86Server
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#else
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#include "context.h"
|
||||
#include "enable.h"
|
||||
#include "light.h"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: eval.c,v 1.1 1999/08/19 00:55:41 jtg Exp $ */
|
||||
/* $Id: eval.c,v 1.2 1999/10/08 09:27:10 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -44,9 +44,13 @@
|
||||
#ifdef PC_HEADER
|
||||
#include "all.h"
|
||||
#else
|
||||
#ifndef XFree86Server
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#else
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#include "context.h"
|
||||
#include "eval.h"
|
||||
#include "macros.h"
|
||||
@@ -1988,7 +1992,7 @@ void gl_GetMapiv( GLcontext* ctx, GLenum target, GLenum query, GLint *v )
|
||||
|
||||
|
||||
|
||||
void eval_points1( GLfloat outcoord[][4],
|
||||
static void eval_points1( GLfloat outcoord[][4],
|
||||
GLfloat coord[][4],
|
||||
const GLuint *flags,
|
||||
GLfloat du, GLfloat u1 )
|
||||
@@ -2003,7 +2007,7 @@ void eval_points1( GLfloat outcoord[][4],
|
||||
}
|
||||
}
|
||||
|
||||
void eval_points2( GLfloat outcoord[][4],
|
||||
static void eval_points2( GLfloat outcoord[][4],
|
||||
GLfloat coord[][4],
|
||||
const GLuint *flags,
|
||||
GLfloat du, GLfloat u1,
|
||||
@@ -2030,11 +2034,11 @@ static const GLubyte dirty_flags[5] = {
|
||||
};
|
||||
|
||||
|
||||
GLvector4f *eval1_4f( GLvector4f *dest,
|
||||
GLfloat coord[][4],
|
||||
const GLuint *flags,
|
||||
GLuint dimension,
|
||||
struct gl_1d_map *map )
|
||||
static GLvector4f *eval1_4f( GLvector4f *dest,
|
||||
GLfloat coord[][4],
|
||||
const GLuint *flags,
|
||||
GLuint dimension,
|
||||
struct gl_1d_map *map )
|
||||
{
|
||||
const GLfloat u1 = map->u1;
|
||||
const GLfloat du = map->du;
|
||||
@@ -2055,10 +2059,10 @@ GLvector4f *eval1_4f( GLvector4f *dest,
|
||||
}
|
||||
|
||||
|
||||
GLvector1ui *eval1_1ui( GLvector1ui *dest,
|
||||
GLfloat coord[][4],
|
||||
const GLuint *flags,
|
||||
struct gl_1d_map *map )
|
||||
static GLvector1ui *eval1_1ui( GLvector1ui *dest,
|
||||
GLfloat coord[][4],
|
||||
const GLuint *flags,
|
||||
struct gl_1d_map *map )
|
||||
{
|
||||
const GLfloat u1 = map->u1;
|
||||
const GLfloat du = map->du;
|
||||
@@ -2077,7 +2081,7 @@ GLvector1ui *eval1_1ui( GLvector1ui *dest,
|
||||
return dest;
|
||||
}
|
||||
|
||||
GLvector3f *eval1_norm( GLvector3f *dest,
|
||||
static GLvector3f *eval1_norm( GLvector3f *dest,
|
||||
GLfloat coord[][4],
|
||||
GLuint *flags, /* not const */
|
||||
struct gl_1d_map *map )
|
||||
@@ -2098,7 +2102,7 @@ GLvector3f *eval1_norm( GLvector3f *dest,
|
||||
return dest;
|
||||
}
|
||||
|
||||
GLvector4ub *eval1_color( GLvector4ub *dest,
|
||||
static GLvector4ub *eval1_color( GLvector4ub *dest,
|
||||
GLfloat coord[][4],
|
||||
GLuint *flags, /* not const */
|
||||
struct gl_1d_map *map )
|
||||
@@ -2124,12 +2128,12 @@ GLvector4ub *eval1_color( GLvector4ub *dest,
|
||||
|
||||
|
||||
|
||||
GLvector4f *eval2_obj_norm( GLvector4f *obj_ptr,
|
||||
GLvector3f *norm_ptr,
|
||||
GLfloat coord[][4],
|
||||
GLuint *flags,
|
||||
GLuint dimension,
|
||||
struct gl_2d_map *map )
|
||||
static GLvector4f *eval2_obj_norm( GLvector4f *obj_ptr,
|
||||
GLvector3f *norm_ptr,
|
||||
GLfloat coord[][4],
|
||||
GLuint *flags,
|
||||
GLuint dimension,
|
||||
struct gl_2d_map *map )
|
||||
{
|
||||
const GLfloat u1 = map->u1;
|
||||
const GLfloat du = map->du;
|
||||
@@ -2161,11 +2165,11 @@ GLvector4f *eval2_obj_norm( GLvector4f *obj_ptr,
|
||||
}
|
||||
|
||||
|
||||
GLvector4f *eval2_4f( GLvector4f *dest,
|
||||
GLfloat coord[][4],
|
||||
const GLuint *flags,
|
||||
GLuint dimension,
|
||||
struct gl_2d_map *map )
|
||||
static GLvector4f *eval2_4f( GLvector4f *dest,
|
||||
GLfloat coord[][4],
|
||||
const GLuint *flags,
|
||||
GLuint dimension,
|
||||
struct gl_2d_map *map )
|
||||
{
|
||||
const GLfloat u1 = map->u1;
|
||||
const GLfloat du = map->du;
|
||||
@@ -2189,10 +2193,10 @@ GLvector4f *eval2_4f( GLvector4f *dest,
|
||||
}
|
||||
|
||||
|
||||
GLvector3f *eval2_norm( GLvector3f *dest,
|
||||
GLfloat coord[][4],
|
||||
GLuint *flags,
|
||||
struct gl_2d_map *map )
|
||||
static GLvector3f *eval2_norm( GLvector3f *dest,
|
||||
GLfloat coord[][4],
|
||||
GLuint *flags,
|
||||
struct gl_2d_map *map )
|
||||
{
|
||||
const GLfloat u1 = map->u1;
|
||||
const GLfloat du = map->du;
|
||||
@@ -2215,10 +2219,10 @@ GLvector3f *eval2_norm( GLvector3f *dest,
|
||||
}
|
||||
|
||||
|
||||
GLvector1ui *eval2_1ui( GLvector1ui *dest,
|
||||
GLfloat coord[][4],
|
||||
const GLuint *flags,
|
||||
struct gl_2d_map *map )
|
||||
static GLvector1ui *eval2_1ui( GLvector1ui *dest,
|
||||
GLfloat coord[][4],
|
||||
const GLuint *flags,
|
||||
struct gl_2d_map *map )
|
||||
{
|
||||
const GLfloat u1 = map->u1;
|
||||
const GLfloat du = map->du;
|
||||
@@ -2244,10 +2248,10 @@ GLvector1ui *eval2_1ui( GLvector1ui *dest,
|
||||
|
||||
|
||||
|
||||
GLvector4ub *eval2_color( GLvector4ub *dest,
|
||||
GLfloat coord[][4],
|
||||
GLuint *flags,
|
||||
struct gl_2d_map *map )
|
||||
static GLvector4ub *eval2_color( GLvector4ub *dest,
|
||||
GLfloat coord[][4],
|
||||
GLuint *flags,
|
||||
struct gl_2d_map *map )
|
||||
{
|
||||
const GLfloat u1 = map->u1;
|
||||
const GLfloat du = map->du;
|
||||
@@ -2272,8 +2276,8 @@ GLvector4ub *eval2_color( GLvector4ub *dest,
|
||||
}
|
||||
|
||||
|
||||
GLvector4f *copy_4f( GLvector4f *out, CONST GLvector4f *in,
|
||||
const GLuint *flags)
|
||||
static GLvector4f *copy_4f( GLvector4f *out, CONST GLvector4f *in,
|
||||
const GLuint *flags)
|
||||
{
|
||||
GLfloat (*to)[4] = out->data;
|
||||
GLfloat (*from)[4] = in->data;
|
||||
@@ -2286,8 +2290,8 @@ GLvector4f *copy_4f( GLvector4f *out, CONST GLvector4f *in,
|
||||
return out;
|
||||
}
|
||||
|
||||
GLvector3f *copy_3f( GLvector3f *out, CONST GLvector3f *in,
|
||||
const GLuint *flags)
|
||||
static GLvector3f *copy_3f( GLvector3f *out, CONST GLvector3f *in,
|
||||
const GLuint *flags)
|
||||
{
|
||||
GLfloat (*to)[3] = out->data;
|
||||
GLfloat (*from)[3] = in->data;
|
||||
@@ -2300,8 +2304,8 @@ GLvector3f *copy_3f( GLvector3f *out, CONST GLvector3f *in,
|
||||
return out;
|
||||
}
|
||||
|
||||
GLvector4ub *copy_4ub( GLvector4ub *out, CONST GLvector4ub *in,
|
||||
const GLuint *flags )
|
||||
static GLvector4ub *copy_4ub( GLvector4ub *out, CONST GLvector4ub *in,
|
||||
const GLuint *flags )
|
||||
{
|
||||
GLubyte (*to)[4] = out->data;
|
||||
GLubyte (*from)[4] = in->data;
|
||||
@@ -2314,8 +2318,8 @@ GLvector4ub *copy_4ub( GLvector4ub *out, CONST GLvector4ub *in,
|
||||
return out;
|
||||
}
|
||||
|
||||
GLvector1ui *copy_1ui( GLvector1ui *out, CONST GLvector1ui *in,
|
||||
const GLuint *flags )
|
||||
static GLvector1ui *copy_1ui( GLvector1ui *out, CONST GLvector1ui *in,
|
||||
const GLuint *flags )
|
||||
{
|
||||
GLuint *to = out->data;
|
||||
CONST GLuint *from = in->data;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: extensions.c,v 1.4 1999/09/16 16:47:35 brianp Exp $ */
|
||||
/* $Id: extensions.c,v 1.5 1999/10/08 09:27:10 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -46,10 +46,11 @@ struct extension {
|
||||
|
||||
static struct { int enabled; const char *name; } default_extensions[] = {
|
||||
{ ALWAYS_ENABLED, "GL_EXT_blend_color" },
|
||||
{ ALWAYS_ENABLED, "GL_EXT_blend_minmax" },
|
||||
{ ALWAYS_ENABLED, "GL_EXT_blend_logic_op" },
|
||||
{ ALWAYS_ENABLED, "GL_EXT_blend_subtract" },
|
||||
{ ALWAYS_ENABLED, "GL_EXT_paletted_texture" },
|
||||
{ DEFAULT_OFF, "ARB_imaging" },
|
||||
{ DEFAULT_ON, "GL_EXT_blend_minmax" },
|
||||
{ DEFAULT_ON, "GL_EXT_blend_logic_op" },
|
||||
{ DEFAULT_ON, "GL_EXT_blend_subtract" },
|
||||
{ DEFAULT_ON, "GL_EXT_paletted_texture" },
|
||||
{ DEFAULT_ON, "GL_EXT_point_parameters" },
|
||||
{ ALWAYS_ENABLED, "GL_EXT_polygon_offset" },
|
||||
{ ALWAYS_ENABLED, "GL_EXT_vertex_array" },
|
||||
@@ -62,7 +63,7 @@ static struct { int enabled; const char *name; } default_extensions[] = {
|
||||
{ ALWAYS_ENABLED, "GL_EXT_abgr" },
|
||||
{ ALWAYS_ENABLED, "GL_SGIS_texture_edge_clamp" },
|
||||
{ ALWAYS_ENABLED, "GL_EXT_stencil_wrap" },
|
||||
{ ALWAYS_ENABLED, "GL_INGR_blend_func_separate" },
|
||||
{ DEFAULT_ON, "GL_INGR_blend_func_separate" },
|
||||
{ DEFAULT_ON, "GL_ARB_multitexture" },
|
||||
{ ALWAYS_ENABLED, "GL_NV_texgen_reflection" },
|
||||
{ DEFAULT_ON, "GL_PGI_misc_hints" },
|
||||
@@ -140,6 +141,7 @@ void gl_extensions_dtr( GLcontext *ctx )
|
||||
|
||||
if (ctx->Extensions.ext_list) {
|
||||
foreach_s( i, nexti, ctx->Extensions.ext_list ) {
|
||||
remove_from_list( i );
|
||||
free( i );
|
||||
}
|
||||
|
||||
@@ -205,7 +207,7 @@ const char *gl_extensions_get_string( GLcontext *ctx )
|
||||
* Also, this function does not yet do per-context function searches.
|
||||
* Not applicable to Mesa at this time.
|
||||
*/
|
||||
GLfunction gl_GetProcAddress( GLcontext *ctx, const GLubyte *procName )
|
||||
void (* gl_GetProcAddress( GLcontext *ctx, const GLubyte *procName ))()
|
||||
{
|
||||
struct proc {
|
||||
const char *name;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: extensions.h,v 1.3 1999/09/11 11:48:11 brianp Exp $ */
|
||||
/* $Id: extensions.h,v 1.4 1999/10/08 09:27:10 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -38,7 +38,7 @@
|
||||
/* Return 0 on success.
|
||||
*/
|
||||
extern int gl_extensions_add( struct gl_context *ctx, int state,
|
||||
const char *name, void (*notify)() );
|
||||
const char *name, void (*notify)( void ) );
|
||||
|
||||
extern int gl_extensions_enable( struct gl_context *ctx, const char *name );
|
||||
extern int gl_extensions_disable( struct gl_context *ctx, const char *name );
|
||||
@@ -46,7 +46,7 @@ extern void gl_extensions_dtr( struct gl_context *ctx );
|
||||
extern void gl_extensions_ctr( struct gl_context *ctx );
|
||||
extern const char *gl_extensions_get_string( struct gl_context *ctx );
|
||||
|
||||
extern GLfunction gl_GetProcAddress( GLcontext *ctx, const GLubyte *procName );
|
||||
extern void (*gl_GetProcAddress( GLcontext *ctx, const GLubyte *procName ))( void );
|
||||
|
||||
#endif
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: feedback.c,v 1.3 1999/09/19 02:03:19 tjump Exp $ */
|
||||
/* $Id: feedback.c,v 1.4 1999/10/08 09:27:10 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -31,8 +31,12 @@
|
||||
#ifdef PC_HEADER
|
||||
#include "all.h"
|
||||
#else
|
||||
#ifndef XFree86Server
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#else
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#include "context.h"
|
||||
#include "enums.h"
|
||||
#include "feedback.h"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: fog.c,v 1.1 1999/08/19 00:55:41 jtg Exp $ */
|
||||
/* $Id: fog.c,v 1.2 1999/10/08 09:27:10 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -25,11 +25,17 @@
|
||||
*/
|
||||
|
||||
|
||||
/* $XFree86: xc/lib/GL/mesa/src/fog.c,v 1.4 1999/04/04 00:20:24 dawes Exp $ */
|
||||
|
||||
#ifdef PC_HEADER
|
||||
#include "all.h"
|
||||
#else
|
||||
#ifndef XFree86Server
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#include "context.h"
|
||||
#include "fog.h"
|
||||
#include "macros.h"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: get.c,v 1.3 1999/09/16 15:46:05 brianp Exp $ */
|
||||
/* $Id: get.c,v 1.4 1999/10/08 09:27:10 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -25,12 +25,18 @@
|
||||
*/
|
||||
|
||||
|
||||
/* $XFree86: xc/lib/GL/mesa/src/get.c,v 1.3 1999/04/04 00:20:25 dawes Exp $ */
|
||||
|
||||
#ifdef PC_HEADER
|
||||
#include "all.h"
|
||||
#else
|
||||
#ifndef XFree86Server
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#else
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#include "context.h"
|
||||
#include "enable.h"
|
||||
#include "enums.h"
|
||||
@@ -40,9 +46,6 @@
|
||||
#include "mmath.h"
|
||||
#include "types.h"
|
||||
#include "vb.h"
|
||||
#ifdef XFree86Server
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: hash.c,v 1.1 1999/08/19 00:55:41 jtg Exp $ */
|
||||
/* $Id: hash.c,v 1.2 1999/10/08 09:27:10 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -31,13 +31,14 @@
|
||||
#ifdef PC_HEADER
|
||||
#include "all.h"
|
||||
#else
|
||||
#ifndef XFree86Server
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include "hash.h"
|
||||
#ifdef XFree86Server
|
||||
#else
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#include "hash.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: image.c,v 1.2 1999/09/15 13:56:44 brianp Exp $ */
|
||||
/* $Id: image.c,v 1.3 1999/10/08 09:27:10 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -29,9 +29,13 @@
|
||||
#ifdef PC_HEADER
|
||||
#include "all.h"
|
||||
#else
|
||||
#ifndef XFree86Server
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#else
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#include "context.h"
|
||||
#include "image.h"
|
||||
#include "macros.h"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: light.c,v 1.2 1999/09/18 20:41:23 keithw Exp $ */
|
||||
/* $Id: light.c,v 1.4 1999/10/08 09:27:11 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -31,10 +31,15 @@
|
||||
#ifdef PC_HEADER
|
||||
#include "all.h"
|
||||
#else
|
||||
#include <float.h>
|
||||
#ifndef XFree86Server
|
||||
#include <assert.h>
|
||||
#include <float.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include "context.h"
|
||||
#include "enums.h"
|
||||
@@ -46,9 +51,6 @@
|
||||
#include "types.h"
|
||||
#include "vb.h"
|
||||
#include "xform.h"
|
||||
#ifdef XFree86Server
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -168,6 +170,9 @@ void gl_Lightfv( GLcontext *ctx,
|
||||
break;
|
||||
}
|
||||
|
||||
if (ctx->Driver.Lightfv)
|
||||
ctx->Driver.Lightfv( ctx, light, pname, params, nparams );
|
||||
|
||||
ctx->NewState |= NEW_LIGHTING;
|
||||
}
|
||||
|
||||
@@ -328,6 +333,10 @@ void gl_LightModelfv( GLcontext *ctx, GLenum pname, const GLfloat *params )
|
||||
gl_error( ctx, GL_INVALID_ENUM, "glLightModel" );
|
||||
break;
|
||||
}
|
||||
|
||||
if (ctx->Driver.LightModelfv)
|
||||
ctx->Driver.LightModelfv( ctx, pname, params );
|
||||
|
||||
ctx->NewState |= NEW_LIGHTING;
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: lines.c,v 1.2 1999/09/18 20:41:23 keithw Exp $ */
|
||||
/* $Id: lines.c,v 1.3 1999/10/08 09:27:11 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -31,7 +31,11 @@
|
||||
#ifdef PC_HEADER
|
||||
#include "all.h"
|
||||
#else
|
||||
#ifndef XFree86Server
|
||||
#include <assert.h>
|
||||
#else
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#include "context.h"
|
||||
#include "depth.h"
|
||||
#include "feedback.h"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: macros.h,v 1.1 1999/08/19 00:55:41 jtg Exp $ */
|
||||
/* $Id: macros.h,v 1.2 1999/10/08 09:27:11 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -36,9 +36,12 @@
|
||||
#ifndef MACROS_H
|
||||
#define MACROS_H
|
||||
|
||||
|
||||
#if defined( XFree86LOADER ) && defined( XFree86Server )
|
||||
#include <GL/glx_ansic.h>
|
||||
#else
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
@@ -49,7 +52,7 @@
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__GNUC__) || defined(__MWERKS__)
|
||||
#if defined(__GNUC__)
|
||||
#define INLINE __inline__
|
||||
#elif defined(__MSC__)
|
||||
#define INLINE __inline
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: matrix.c,v 1.4 1999/09/19 23:06:40 keithw Exp $ */
|
||||
/* $Id: matrix.c,v 1.5 1999/10/08 09:27:11 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -43,10 +43,14 @@
|
||||
#ifdef PC_HEADER
|
||||
#include "all.h"
|
||||
#else
|
||||
#ifndef XFree86Server
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#else
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#include "context.h"
|
||||
#include "enums.h"
|
||||
#include "macros.h"
|
||||
@@ -298,7 +302,7 @@ static GLboolean invert_matrix_general( GLmatrix *mat )
|
||||
|
||||
/* Adapted from graphics gems II.
|
||||
*/
|
||||
GLboolean invert_matrix_3d_general( GLmatrix *mat )
|
||||
static GLboolean invert_matrix_3d_general( GLmatrix *mat )
|
||||
{
|
||||
const GLfloat *in = mat->m;
|
||||
GLfloat *out = mat->inv;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: matrix.h,v 1.1 1999/08/19 00:55:41 jtg Exp $ */
|
||||
/* $Id: matrix.h,v 1.2 1999/10/08 09:27:11 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -111,5 +111,9 @@ extern void gl_matrix_mul( GLmatrix *dest,
|
||||
extern void gl_matrix_analyze( GLmatrix *mat );
|
||||
|
||||
|
||||
extern void gl_MultMatrixd( GLcontext *ctx, const GLdouble *m );
|
||||
extern GLboolean gl_matrix_invert( GLmatrix *mat );
|
||||
extern void gl_print_matrix( const GLmatrix *m );
|
||||
|
||||
|
||||
#endif
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: pixel.c,v 1.1 1999/08/19 00:55:41 jtg Exp $ */
|
||||
/* $Id: pixel.c,v 1.2 1999/10/08 09:27:11 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -36,9 +36,13 @@
|
||||
#ifdef PC_HEADER
|
||||
#include "all.h"
|
||||
#else
|
||||
#ifndef XFree86Server
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#include "context.h"
|
||||
#include "macros.h"
|
||||
#include "pixel.h"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: points.c,v 1.2 1999/09/18 20:41:23 keithw Exp $ */
|
||||
/* $Id: points.c,v 1.3 1999/10/08 09:27:11 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -23,6 +23,7 @@
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
/* $XFree86: xc/lib/GL/mesa/src/points.c,v 1.4 1999/04/04 00:20:29 dawes Exp $ */
|
||||
|
||||
|
||||
|
||||
@@ -31,18 +32,22 @@
|
||||
#ifdef PC_HEADER
|
||||
#include "all.h"
|
||||
#else
|
||||
#ifndef XFree86Server
|
||||
#include <math.h>
|
||||
#else
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#include "context.h"
|
||||
#include "feedback.h"
|
||||
#include "macros.h"
|
||||
#include "mmath.h"
|
||||
#include "pb.h"
|
||||
#include "points.h"
|
||||
#include "span.h"
|
||||
#include "texstate.h"
|
||||
#include "types.h"
|
||||
#include "vb.h"
|
||||
#include "mmath.h"
|
||||
#ifdef XFree86Server
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: polygon.c,v 1.3 1999/09/20 14:30:22 keithw Exp $ */
|
||||
/* $Id: polygon.c,v 1.4 1999/10/08 09:27:11 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -25,13 +25,19 @@
|
||||
*/
|
||||
|
||||
|
||||
/* $XFree86: xc/lib/GL/mesa/src/polygon.c,v 1.3 1999/04/04 00:20:29 dawes Exp $ */
|
||||
|
||||
#ifdef PC_HEADER
|
||||
#include "all.h"
|
||||
#else
|
||||
#ifndef XFree86Server
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#else
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#include "context.h"
|
||||
#include "image.h"
|
||||
#include "enums.h"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: rastpos.c,v 1.1 1999/08/19 00:55:41 jtg Exp $ */
|
||||
/* $Id: rastpos.c,v 1.2 1999/10/08 09:27:11 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -31,22 +31,24 @@
|
||||
#ifdef PC_HEADER
|
||||
#include "all.h"
|
||||
#else
|
||||
#ifndef XFree86Server
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#else
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#include "clip.h"
|
||||
#include "context.h"
|
||||
#include "feedback.h"
|
||||
#include "light.h"
|
||||
#include "macros.h"
|
||||
#include "matrix.h"
|
||||
#include "mmath.h"
|
||||
#include "rastpos.h"
|
||||
#include "shade.h"
|
||||
#include "types.h"
|
||||
#include "xform.h"
|
||||
#include "context.h"
|
||||
#ifdef XFree86Server
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: stencil.c,v 1.3 1999/09/19 02:03:19 tjump Exp $ */
|
||||
/* $Id: stencil.c,v 1.4 1999/10/08 09:27:11 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -25,11 +25,17 @@
|
||||
*/
|
||||
|
||||
|
||||
/* $XFree86: xc/lib/GL/mesa/src/stencil.c,v 1.3 1999/04/04 00:20:32 dawes Exp $ */
|
||||
|
||||
#ifdef PC_HEADER
|
||||
#include "all.h"
|
||||
#else
|
||||
#ifndef XFree86Server
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#else
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#include "context.h"
|
||||
#include "macros.h"
|
||||
#include "pb.h"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: teximage.c,v 1.1 1999/08/19 00:55:41 jtg Exp $ */
|
||||
/* $Id: teximage.c,v 1.2 1999/10/08 09:27:11 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -25,13 +25,19 @@
|
||||
*/
|
||||
|
||||
|
||||
/* $XFree86: xc/lib/GL/mesa/src/teximage.c,v 1.3 1999/04/04 00:20:32 dawes Exp $ */
|
||||
|
||||
#ifdef PC_HEADER
|
||||
#include "all.h"
|
||||
#else
|
||||
#ifndef XFree86Server
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#else
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#include "context.h"
|
||||
#include "image.h"
|
||||
#include "macros.h"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: texobj.c,v 1.1 1999/08/19 00:55:41 jtg Exp $ */
|
||||
/* $Id: texobj.c,v 1.3 1999/10/08 09:27:11 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -23,7 +23,7 @@
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $XFree86: xc/lib/GL/mesa/src/texobj.c,v 1.3 1999/04/04 00:20:32 dawes Exp $ */
|
||||
|
||||
|
||||
|
||||
@@ -31,9 +31,13 @@
|
||||
#ifdef PC_HEADER
|
||||
#include "all.h"
|
||||
#else
|
||||
#ifndef XFree86Server
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#include "context.h"
|
||||
#include "enums.h"
|
||||
#include "hash.h"
|
||||
@@ -42,9 +46,6 @@
|
||||
#include "texstate.h"
|
||||
#include "texobj.h"
|
||||
#include "types.h"
|
||||
#ifdef XFree86Server
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -507,6 +508,9 @@ void gl_PrioritizeTextures( GLcontext *ctx,
|
||||
HashLookup(ctx->Shared->TexObjects, texName[i]);
|
||||
if (t) {
|
||||
t->Priority = CLAMP( priorities[i], 0.0F, 1.0F );
|
||||
|
||||
if (ctx->Driver.PrioritizeTexture)
|
||||
ctx->Driver.PrioritizeTexture( ctx, t, t->Priority );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -515,7 +519,7 @@ void gl_PrioritizeTextures( GLcontext *ctx,
|
||||
|
||||
|
||||
/*
|
||||
* Execute glAreTexturesResident
|
||||
* Execute glAreTexturesResident
|
||||
*/
|
||||
GLboolean gl_AreTexturesResident( GLcontext *ctx, GLsizei n,
|
||||
const GLuint *texName,
|
||||
@@ -541,8 +545,10 @@ GLboolean gl_AreTexturesResident( GLcontext *ctx, GLsizei n,
|
||||
t = (struct gl_texture_object *)
|
||||
HashLookup(ctx->Shared->TexObjects, texName[i]);
|
||||
if (t) {
|
||||
/* we consider all valid texture objects to be resident */
|
||||
residences[i] = GL_TRUE;
|
||||
if (ctx->Driver.IsTextureResident)
|
||||
residences[i] = ctx->Driver.IsTextureResident( ctx, t );
|
||||
else
|
||||
residences[i] = GL_TRUE;
|
||||
}
|
||||
else {
|
||||
gl_error( ctx, GL_INVALID_VALUE, "glAreTexturesResident(textures)" );
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: texstate.c,v 1.2 1999/09/07 22:31:30 brianp Exp $ */
|
||||
/* $Id: texstate.c,v 1.3 1999/10/08 09:27:11 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -29,8 +29,12 @@
|
||||
#ifdef PC_HEADER
|
||||
#include "all.h"
|
||||
#else
|
||||
#ifndef XFree86Server
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#else
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#include "context.h"
|
||||
#include "enums.h"
|
||||
#include "macros.h"
|
||||
@@ -40,9 +44,6 @@
|
||||
#include "texture.h"
|
||||
#include "types.h"
|
||||
#include "xform.h"
|
||||
#ifdef XFree86Server
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: varray.c,v 1.3 1999/09/07 22:31:30 brianp Exp $ */
|
||||
/* $Id: varray.c,v 1.4 1999/10/08 09:27:11 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -27,9 +27,13 @@
|
||||
#ifdef PC_HEADER
|
||||
#include "all.h"
|
||||
#else
|
||||
#ifndef XFree86Server
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#else
|
||||
#include "GL/xf86glx.h"
|
||||
#endif
|
||||
#include "context.h"
|
||||
#include "api.h"
|
||||
#include "cva.h"
|
||||
@@ -55,6 +59,11 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(GLX_DIRECT_RENDERING) && !defined(XFree86Server) && !defined(GLX_USE_DLOPEN)
|
||||
#define NEED_MESA_FUNCS_WRAPPED
|
||||
#include "mesa_api.h"
|
||||
#endif
|
||||
|
||||
|
||||
void GLAPIENTRY glVertexPointer(CTX_ARG GLint size, GLenum type, GLsizei stride,
|
||||
const GLvoid *ptr )
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: varray.h,v 1.2 1999/09/09 23:48:02 brianp Exp $ */
|
||||
/* $Id: varray.h,v 1.3 1999/10/08 09:27:11 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -60,6 +60,10 @@ extern void gl_EdgeFlagPointer( GLcontext *ctx,
|
||||
GLsizei stride, const GLboolean *ptr );
|
||||
|
||||
|
||||
extern void gl_GetPointerv( GLcontext *ctx, GLenum pname, GLvoid **params );
|
||||
|
||||
|
||||
|
||||
extern void gl_DrawArrays( GLcontext *ctx,
|
||||
GLenum mode, GLint first, GLsizei count );
|
||||
|
||||
@@ -89,7 +93,6 @@ extern void gl_DrawRangeElements( GLcontext *ctx, GLenum mode, GLuint start,
|
||||
GLuint end, GLsizei count, GLenum type,
|
||||
const GLvoid *indices );
|
||||
|
||||
|
||||
extern void gl_save_DrawRangeElements( GLcontext *ctx, GLenum mode,
|
||||
GLuint start, GLuint end, GLsizei count,
|
||||
GLenum type, const GLvoid *indices );
|
||||
|
Reference in New Issue
Block a user