[GLU32] Sync with glu 9.0.1 (#2314)

This commit is contained in:
Masanori Ogino 2020-02-08 02:07:56 +09:00 committed by GitHub
parent 507cda98cf
commit 695946a5cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 85 additions and 83 deletions

View file

@ -381,13 +381,13 @@ ArcTessellator::tessellateNonlinear( Arc *arc, REAL geo_stepsize, REAL arc_steps
#ifndef NOELIMINATION
int ocanremove = 0;
#endif
register long order = bezierArc->order;
long order = bezierArc->order;
for( step=1, ++vert; step<nsteps; step++, vert++ ) {
register REAL p = dp * step;
register REAL u = pow_u[0];
register REAL v = pow_v[0];
register REAL w = pow_w[0];
for( register int i = 1; i < order; i++ ) {
REAL p = dp * step;
REAL u = pow_u[0];
REAL v = pow_v[0];
REAL w = pow_w[0];
for( int i = 1; i < order; i++ ) {
u = u * p + pow_u[i];
v = v * p + pow_v[i];
w = w * p + pow_w[i];
@ -444,12 +444,12 @@ ArcTessellator::tessellateNonlinear( Arc *arc, REAL geo_stepsize, REAL arc_steps
#ifndef NOELIMINATION
int ocanremove = 0;
#endif
register long order = bezierArc->order;
long order = bezierArc->order;
for( step=1, ++vert; step<nsteps; step++, vert++ ) {
register REAL p = dp * step;
register REAL u = pow_u[0];
register REAL v = pow_v[0];
for( register int i = 1; i < bezierArc->order; i++ ) {
REAL p = dp * step;
REAL u = pow_u[0];
REAL v = pow_v[0];
for( int i = 1; i < bezierArc->order; i++ ) {
u = u * p + pow_u[i];
v = v * p + pow_v[i];
}
@ -591,9 +591,9 @@ const REAL ArcTessellator::gl_Bernstein[][MAXORDER][MAXORDER] = {
void
ArcTessellator::trim_power_coeffs( BezierArc *bez_arc, REAL *p, int coord )
{
register int stride = bez_arc->stride;
register int order = bez_arc->order;
register REAL *base = bez_arc->cpts + coord;
int stride = bez_arc->stride;
int order = bez_arc->order;
REAL *base = bez_arc->cpts + coord;
REAL const (*mat)[MAXORDER][MAXORDER] = &gl_Bernstein[order-1];
REAL const (*lrow)[MAXORDER] = &(*mat)[order];
@ -601,9 +601,9 @@ ArcTessellator::trim_power_coeffs( BezierArc *bez_arc, REAL *p, int coord )
/* WIN32 didn't like the following line within the for-loop */
REAL const (*row)[MAXORDER] = &(*mat)[0];
for( ; row != lrow; row++ ) {
register REAL s = 0.0;
register REAL *point = base;
register REAL const *mlast = *row + order;
REAL s = 0.0;
REAL *point = base;
REAL const *mlast = *row + order;
for( REAL const *m = *row; m != mlast; m++, point += stride )
s += *(m) * (*point);
*(p++) = s;

View file

@ -56,12 +56,12 @@ Subdivider::bbox( TrimVertex *a, TrimVertex *b, TrimVertex *c, int p )
int
Subdivider::ccwTurn_sr( Arc_ptr j1, Arc_ptr j2 ) // dir = 1
{
register TrimVertex *v1 = &j1->pwlArc->pts[j1->pwlArc->npts-1];
register TrimVertex *v1last = &j1->pwlArc->pts[0];
register TrimVertex *v2 = &j2->pwlArc->pts[0];
register TrimVertex *v2last = &j2->pwlArc->pts[j2->pwlArc->npts-1];
register TrimVertex *v1next = v1-1;
register TrimVertex *v2next = v2+1;
TrimVertex *v1 = &j1->pwlArc->pts[j1->pwlArc->npts-1];
TrimVertex *v1last = &j1->pwlArc->pts[0];
TrimVertex *v2 = &j2->pwlArc->pts[0];
TrimVertex *v2last = &j2->pwlArc->pts[j2->pwlArc->npts-1];
TrimVertex *v1next = v1-1;
TrimVertex *v2next = v2+1;
int sgn;
assert( v1 != v1last );
@ -169,12 +169,12 @@ Subdivider::ccwTurn_sr( Arc_ptr j1, Arc_ptr j2 ) // dir = 1
int
Subdivider::ccwTurn_sl( Arc_ptr j1, Arc_ptr j2 ) // dir = 0
{
register TrimVertex *v1 = &j1->pwlArc->pts[j1->pwlArc->npts-1];
register TrimVertex *v1last = &j1->pwlArc->pts[0];
register TrimVertex *v2 = &j2->pwlArc->pts[0];
register TrimVertex *v2last = &j2->pwlArc->pts[j2->pwlArc->npts-1];
register TrimVertex *v1next = v1-1;
register TrimVertex *v2next = v2+1;
TrimVertex *v1 = &j1->pwlArc->pts[j1->pwlArc->npts-1];
TrimVertex *v1last = &j1->pwlArc->pts[0];
TrimVertex *v2 = &j2->pwlArc->pts[0];
TrimVertex *v2last = &j2->pwlArc->pts[j2->pwlArc->npts-1];
TrimVertex *v1next = v1-1;
TrimVertex *v2next = v2+1;
int sgn;
assert( v1 != v1last );
@ -282,12 +282,12 @@ Subdivider::ccwTurn_sl( Arc_ptr j1, Arc_ptr j2 ) // dir = 0
int
Subdivider::ccwTurn_tr( Arc_ptr j1, Arc_ptr j2 ) // dir = 1
{
register TrimVertex *v1 = &j1->pwlArc->pts[j1->pwlArc->npts-1];
register TrimVertex *v1last = &j1->pwlArc->pts[0];
register TrimVertex *v2 = &j2->pwlArc->pts[0];
register TrimVertex *v2last = &j2->pwlArc->pts[j2->pwlArc->npts-1];
register TrimVertex *v1next = v1-1;
register TrimVertex *v2next = v2+1;
TrimVertex *v1 = &j1->pwlArc->pts[j1->pwlArc->npts-1];
TrimVertex *v1last = &j1->pwlArc->pts[0];
TrimVertex *v2 = &j2->pwlArc->pts[0];
TrimVertex *v2last = &j2->pwlArc->pts[j2->pwlArc->npts-1];
TrimVertex *v1next = v1-1;
TrimVertex *v2next = v2+1;
int sgn;
assert( v1 != v1last );
@ -395,12 +395,12 @@ Subdivider::ccwTurn_tr( Arc_ptr j1, Arc_ptr j2 ) // dir = 1
int
Subdivider::ccwTurn_tl( Arc_ptr j1, Arc_ptr j2 )
{
register TrimVertex *v1 = &j1->pwlArc->pts[j1->pwlArc->npts-1];
register TrimVertex *v1last = &j1->pwlArc->pts[0];
register TrimVertex *v2 = &j2->pwlArc->pts[0];
register TrimVertex *v2last = &j2->pwlArc->pts[j2->pwlArc->npts-1];
register TrimVertex *v1next = v1-1;
register TrimVertex *v2next = v2+1;
TrimVertex *v1 = &j1->pwlArc->pts[j1->pwlArc->npts-1];
TrimVertex *v1last = &j1->pwlArc->pts[0];
TrimVertex *v2 = &j2->pwlArc->pts[0];
TrimVertex *v2last = &j2->pwlArc->pts[j2->pwlArc->npts-1];
TrimVertex *v1next = v1-1;
TrimVertex *v2next = v2+1;
int sgn;
assert( v1 != v1last );
@ -508,12 +508,10 @@ Subdivider::ccwTurn_tl( Arc_ptr j1, Arc_ptr j2 )
#ifndef NDEBUG
int
Subdivider::bbox( register REAL sa, register REAL sb, register REAL sc,
register REAL ta, register REAL tb, register REAL tc )
Subdivider::bbox( REAL sa, REAL sb, REAL sc, REAL ta, REAL tb, REAL tc )
#else
int
Subdivider::bbox( register REAL sa, register REAL sb, register REAL sc,
register REAL , register REAL , register REAL )
Subdivider::bbox( REAL sa, REAL sb, REAL sc, REAL , REAL , REAL )
#endif
{
#ifndef NDEBUG

View file

@ -139,7 +139,7 @@ Hull::nextupper( GridTrimVertex *gv )
}
GridTrimVertex *
Hull::nextlower( register GridTrimVertex *gv )
Hull::nextlower( GridTrimVertex *gv )
{
if( lower.left ) {
gv->set( lower.left->next() );

View file

@ -156,7 +156,7 @@ Mapdesc::copyPt( REAL *d, REAL *s )
*--------------------------------------------------------------------------
*/
void
Mapdesc::sumPt( REAL *dst, REAL *src1, REAL *src2, register REAL alpha, register REAL beta )
Mapdesc::sumPt( REAL *dst, REAL *src1, REAL *src2, REAL alpha, REAL beta )
{
assert( hcoords > 0 );
switch( hcoords ) {
@ -204,10 +204,10 @@ Mapdesc::clipbits( REAL *p )
assert( inhcoords >= 0 );
assert( inhcoords <= 3 );
register int nc = inhcoords;
register REAL pw = p[nc];
register REAL nw = -pw;
register unsigned int bits = 0;
int nc = inhcoords;
REAL pw = p[nc];
REAL nw = -pw;
unsigned int bits = 0;
if( pw == 0.0 ) return mask;

View file

@ -276,13 +276,13 @@ Mesher::output( int x )
void
Mesher::addLast( )
{
register int ilast = itop;
int ilast = itop;
if( lastedge == 0 ) {
if( equal( 0, 1 ) ) {
output( ilast );
swapMesh();
for( register int i = 2; i < ilast; i++ ) {
for( int i = 2; i < ilast; i++ ) {
swapMesh();
output( i );
}
@ -290,7 +290,7 @@ Mesher::addLast( )
} else if( equal( ilast-2, ilast-1) ) {
swapMesh();
output( ilast );
for( register int i = ilast-3; i >= 0; i-- ) {
for( int i = ilast-3; i >= 0; i-- ) {
output( i );
swapMesh();
}
@ -299,7 +299,7 @@ Mesher::addLast( )
closeMesh(); openMesh();
output( ilast );
output( 0 );
for( register int i = 1; i < ilast; i++ ) {
for( int i = 1; i < ilast; i++ ) {
swapMesh();
output( i );
}
@ -309,7 +309,7 @@ Mesher::addLast( )
if( equal( 1, 0) ) {
swapMesh();
output( ilast );
for( register int i = 2; i < ilast; i++ ) {
for( int i = 2; i < ilast; i++ ) {
output( i );
swapMesh();
}
@ -317,7 +317,7 @@ Mesher::addLast( )
} else if( equal( ilast-1, ilast-2) ) {
output( ilast );
swapMesh();
for( register int i = ilast-3; i >= 0; i-- ) {
for( int i = ilast-3; i >= 0; i-- ) {
swapMesh();
output( i );
}
@ -326,7 +326,7 @@ Mesher::addLast( )
closeMesh(); openMesh();
output( 0 );
output( ilast );
for( register int i = 1; i < ilast; i++ ) {
for( int i = 1; i < ilast; i++ ) {
output( i );
swapMesh();
}
@ -334,19 +334,19 @@ Mesher::addLast( )
}
}
closeMesh();
//for( register long k=0; k<=ilast; k++ ) pop( k );
//for( long k=0; k<=ilast; k++ ) pop( k );
}
void
Mesher::addUpper( )
{
register int ilast = itop;
int ilast = itop;
if( lastedge == 0 ) {
if( equal( 0, 1 ) ) {
output( ilast );
swapMesh();
for( register int i = 2; i < ilast; i++ ) {
for( int i = 2; i < ilast; i++ ) {
swapMesh();
output( i );
}
@ -354,7 +354,7 @@ Mesher::addUpper( )
} else if( equal( ilast-2, ilast-1) ) {
swapMesh();
output( ilast );
for( register int i = ilast-3; i >= 0; i-- ) {
for( int i = ilast-3; i >= 0; i-- ) {
output( i );
swapMesh();
}
@ -363,14 +363,14 @@ Mesher::addUpper( )
closeMesh(); openMesh();
output( ilast );
output( 0 );
for( register int i = 1; i < ilast; i++ ) {
for( int i = 1; i < ilast; i++ ) {
swapMesh();
output( i );
}
copy( ilast, ilast-1 );
}
lastedge = 1;
//for( register long k=0; k<ilast-1; k++ ) pop( k );
//for( long k=0; k<ilast-1; k++ ) pop( k );
move( 0, ilast-1 );
move( 1, ilast );
itop = 1;
@ -383,7 +383,7 @@ Mesher::addUpper( )
if( equal( ilast-1, ilast-2 ) ) {
output( ilast );
swapMesh();
for( register int i=ilast-3; i>=itop-1; i-- ) {
for( int i=ilast-3; i>=itop-1; i-- ) {
swapMesh();
output( i );
}
@ -391,7 +391,7 @@ Mesher::addUpper( )
} else if( equal( itop, itop-1 ) ) {
swapMesh();
output( ilast );
for( register int i = itop+1; i < ilast; i++ ) {
for( int i = itop+1; i < ilast; i++ ) {
output( i );
swapMesh();
}
@ -400,13 +400,13 @@ Mesher::addUpper( )
closeMesh(); openMesh();
output( ilast );
output( ilast-1 );
for( register int i=ilast-2; i>=itop-1; i-- ) {
for( int i=ilast-2; i>=itop-1; i-- ) {
swapMesh();
output( i );
}
copy( ilast, itop-1 );
}
//for( register int k=itop; k<ilast; k++ ) pop( k );
//for( int k=itop; k<ilast; k++ ) pop( k );
move( itop, ilast );
}
}
@ -414,13 +414,13 @@ Mesher::addUpper( )
void
Mesher::addLower()
{
register int ilast = itop;
int ilast = itop;
if( lastedge == 1 ) {
if( equal( 1, 0) ) {
swapMesh();
output( ilast );
for( register int i = 2; i < ilast; i++ ) {
for( int i = 2; i < ilast; i++ ) {
output( i );
swapMesh();
}
@ -428,7 +428,7 @@ Mesher::addLower()
} else if( equal( ilast-1, ilast-2) ) {
output( ilast );
swapMesh();
for( register int i = ilast-3; i >= 0; i-- ) {
for( int i = ilast-3; i >= 0; i-- ) {
swapMesh();
output( i );
}
@ -437,7 +437,7 @@ Mesher::addLower()
closeMesh(); openMesh();
output( 0 );
output( ilast );
for( register int i = 1; i < ilast; i++ ) {
for( int i = 1; i < ilast; i++ ) {
output( i );
swapMesh();
}
@ -445,7 +445,7 @@ Mesher::addLower()
}
lastedge = 0;
//for( register long k=0; k<ilast-1; k++ ) pop( k );
//for( long k=0; k<ilast-1; k++ ) pop( k );
move( 0, ilast-1 );
move( 1, ilast );
itop = 1;
@ -458,7 +458,7 @@ Mesher::addLower()
if( equal( ilast-2, ilast-1) ) {
swapMesh();
output( ilast );
for( register int i=ilast-3; i>=itop-1; i--) {
for( int i=ilast-3; i>=itop-1; i--) {
output( i );
swapMesh( );
}
@ -466,7 +466,7 @@ Mesher::addLower()
} else if( equal( itop-1, itop) ) {
output( ilast );
swapMesh();
for( register int i=itop+1; i<ilast; i++ ) {
for( int i=itop+1; i<ilast; i++ ) {
swapMesh( );
output( i );
}
@ -475,13 +475,13 @@ Mesher::addLower()
closeMesh(); openMesh();
output( ilast-1 );
output( ilast );
for( register int i=ilast-2; i>=itop-1; i-- ) {
for( int i=ilast-2; i>=itop-1; i-- ) {
output( i );
swapMesh( );
}
copy( itop-1, ilast );
}
//for( register int k=itop; k<ilast; k++ ) pop( k );
//for( int k=itop; k<ilast; k++ ) pop( k );
move( itop, ilast );
}
}

View file

@ -117,7 +117,7 @@ Trimline::getNextPts( REAL vval, Backend& backend )
reset(); swap(); append( tinterp );
assert( tinterp->param[1] >= vval );
register TrimVertex *p;
TrimVertex *p;
for( p=jarcl.getnextpt() ; p->param[1] >= vval; p=jarcl.getnextpt() ) {
append( p );
}
@ -139,7 +139,7 @@ Trimline::getPrevPts( REAL vval, Backend& backend )
reset(); swap(); append( tinterp );
assert( tinterp->param[1] >= vval );
register TrimVertex *q;
TrimVertex *q;
for( q=jarcl.getprevpt(); q->param[1] >= vval; q=jarcl.getprevpt() ) {
append( q );
}
@ -165,7 +165,7 @@ Trimline::getNextPts( Arc_ptr botarc )
TrimVertex *lastpt1 = &lastpwl->pts[lastpwl->npts-1];
#endif
TrimVertex *lastpt2 = botarc->pwlArc->pts;
register TrimVertex *p = jarcl.getnextpt();
TrimVertex *p = jarcl.getnextpt();
for( append( p ); p != lastpt2; append( p ) ) {
assert( p != lastpt1 );
p = jarcl.getnextpt();
@ -183,7 +183,7 @@ Trimline::getPrevPts( Arc_ptr botarc )
TrimVertex *lastpt2 = botarc->pwlArc->pts;
#endif
register TrimVertex *q = jarcl.getprevpt();
TrimVertex *q = jarcl.getprevpt();
for( append( q ); q != lastpt1; append( q ) ) {
assert( q != lastpt2 );
q = jarcl.getprevpt();

View file

@ -65,6 +65,7 @@ PriorityQ *pqNewPriorityQ( int (*leq)(PQkey key1, PQkey key2) )
return NULL;
}
pq->order = NULL;
pq->size = 0;
pq->max = INIT_SIZE;
pq->initialized = FALSE;

View file

@ -30,6 +30,7 @@
#include "gluos.h"
#include "gluint.h"
#include <stddef.h>
#include <GL/glu.h>

View file

@ -4509,6 +4509,8 @@ static int gluBuild2DMipmapLevelsCore(GLenum target, GLint internalFormat,
glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels);
glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length);
glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes);
free(srcImage);
free(dstImage);
return GLU_OUT_OF_MEMORY;
}

View file

@ -31,8 +31,8 @@ Used Version: 8.0.4
Website: http://www.mesa3d.org
Title: Mesa3D glu libary
Used Version: 9.0
Website: ftp://ftp.freedesktop.org/pub/mesa/glu/
Used Version: 9.0.1
Website: https://gitlab.freedesktop.org/mesa/glu | ftp://ftp.freedesktop.org/pub/mesa/glu/
Title: GNU adns
Used Version: 1.0 REV 5