]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - libs/splines/splines.cpp
Merge remote-tracking branch 'github/master'
[xonotic/netradiant.git] / libs / splines / splines.cpp
index b9b7c0c90e4907514e497ed252f2356a8bcdc3f4..05cb3bf972c09d5b6723be51710b0c088f9fac5a 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 1999-2007 id Software, Inc. and contributors.
+   Copyright (C) 1999-2006 Id Software, Inc. and contributors.
    For a list of contributors, see the accompanying CONTRIBUTORS file.
 
    This file is part of GtkRadiant.
@@ -96,17 +96,17 @@ idCameraDef *g_splineList = &splineList;
 idVec3 idSplineList::zero( 0,0,0 );
 
 void glLabeledPoint( idVec3 &color, idVec3 &point, float size, const char *label ) {
-       qglColor3fv( color );
-       qglPointSize( size );
-       qglBegin( GL_POINTS );
-       qglVertex3fv( point );
-       qglEnd();
+       glColor3fv( color );
+       glPointSize( size );
+       glBegin( GL_POINTS );
+       glVertex3fv( point );
+       glEnd();
        idVec3 v = point;
        v.x += 1;
        v.y += 1;
        v.z += 1;
-       qglRasterPos3fv( v );
-       qglCallLists( strlen( label ), GL_UNSIGNED_BYTE, label );
+       glRasterPos3fv( v );
+       glCallLists( strlen( label ), GL_UNSIGNED_BYTE, label );
 }
 
 
@@ -119,30 +119,30 @@ void glBox( idVec3 &color, idVec3 &point, float size ) {
        maxs[0] += size;
        maxs[1] -= size;
        maxs[2] += size;
-       qglColor3fv( color );
-       qglBegin( GL_LINE_LOOP );
-       qglVertex3f( mins[0],mins[1],mins[2] );
-       qglVertex3f( maxs[0],mins[1],mins[2] );
-       qglVertex3f( maxs[0],maxs[1],mins[2] );
-       qglVertex3f( mins[0],maxs[1],mins[2] );
-       qglEnd();
-       qglBegin( GL_LINE_LOOP );
-       qglVertex3f( mins[0],mins[1],maxs[2] );
-       qglVertex3f( maxs[0],mins[1],maxs[2] );
-       qglVertex3f( maxs[0],maxs[1],maxs[2] );
-       qglVertex3f( mins[0],maxs[1],maxs[2] );
-       qglEnd();
-
-       qglBegin( GL_LINES );
-       qglVertex3f( mins[0],mins[1],mins[2] );
-       qglVertex3f( mins[0],mins[1],maxs[2] );
-       qglVertex3f( mins[0],maxs[1],maxs[2] );
-       qglVertex3f( mins[0],maxs[1],mins[2] );
-       qglVertex3f( maxs[0],mins[1],mins[2] );
-       qglVertex3f( maxs[0],mins[1],maxs[2] );
-       qglVertex3f( maxs[0],maxs[1],maxs[2] );
-       qglVertex3f( maxs[0],maxs[1],mins[2] );
-       qglEnd();
+       glColor3fv( color );
+       glBegin( GL_LINE_LOOP );
+       glVertex3f( mins[0],mins[1],mins[2] );
+       glVertex3f( maxs[0],mins[1],mins[2] );
+       glVertex3f( maxs[0],maxs[1],mins[2] );
+       glVertex3f( mins[0],maxs[1],mins[2] );
+       glEnd();
+       glBegin( GL_LINE_LOOP );
+       glVertex3f( mins[0],mins[1],maxs[2] );
+       glVertex3f( maxs[0],mins[1],maxs[2] );
+       glVertex3f( maxs[0],maxs[1],maxs[2] );
+       glVertex3f( mins[0],maxs[1],maxs[2] );
+       glEnd();
+
+       glBegin( GL_LINES );
+       glVertex3f( mins[0],mins[1],mins[2] );
+       glVertex3f( mins[0],mins[1],maxs[2] );
+       glVertex3f( mins[0],maxs[1],maxs[2] );
+       glVertex3f( mins[0],maxs[1],mins[2] );
+       glVertex3f( maxs[0],mins[1],mins[2] );
+       glVertex3f( maxs[0],mins[1],maxs[2] );
+       glVertex3f( maxs[0],maxs[1],maxs[2] );
+       glVertex3f( maxs[0],maxs[1],mins[2] );
+       glEnd();
 
 }
 
@@ -256,14 +256,14 @@ void idSplineList::draw( bool editMode ) {
        }
 
 
-       qglColor3fv( controlColor );
-       qglPointSize( 5 );
+       glColor3fv( controlColor );
+       glPointSize( 5 );
 
-       qglBegin( GL_POINTS );
+       glBegin( GL_POINTS );
        for ( i = 0; i < controlPoints.Num(); i++ ) {
-               qglVertex3fv( *controlPoints[i] );
+               glVertex3fv( *controlPoints[i] );
        }
-       qglEnd();
+       glEnd();
 
        if ( editMode ) {
                for ( i = 0; i < controlPoints.Num(); i++ ) {
@@ -272,22 +272,22 @@ void idSplineList::draw( bool editMode ) {
        }
 
        //Draw the curve
-       qglColor3fv( pathColor );
-       qglBegin( GL_LINE_STRIP );
+       glColor3fv( pathColor );
+       glBegin( GL_LINE_STRIP );
        int count = splinePoints.Num();
        for ( i = 0; i < count; i++ ) {
-               qglVertex3fv( *splinePoints[i] );
+               glVertex3fv( *splinePoints[i] );
        }
-       qglEnd();
+       glEnd();
 
        if ( editMode ) {
-               qglColor3fv( segmentColor );
-               qglPointSize( 3 );
-               qglBegin( GL_POINTS );
+               glColor3fv( segmentColor );
+               glPointSize( 3 );
+               glBegin( GL_POINTS );
                for ( i = 0; i < count; i++ ) {
-                       qglVertex3fv( *splinePoints[i] );
+                       glVertex3fv( *splinePoints[i] );
                }
-               qglEnd();
+               glEnd();
        }
        if ( count > 0 ) {
                //assert(activeSegment >=0 && activeSegment < count);