On Tue, Jul 09, 2002 at 10:47:42PM -0400, William Earnest wrote:
> Hi all,
> 
>       For the past couple of weeks I have been unable to get a clean 
>       compile of plib, although SimGear and FlightGear have given no trouble. I 
> get a series of nearly identical errors from ssg such as this:
> 
> ssgLoadBGL.cxx:2103: no matching function for call to
> `ssgVtxArray::ssgVtxArray (int, ssgVertexArray *&, ssgNormalArray *&,
> NULL, NULL, ssgIndexArray *&)'
> ssg.h:1511: candidates are: ssgVtxArray::ssgVtxArray ()
> ssg.h:1517:                 ssgVtxArray::ssgVtxArray (GLenum,
> ssgVertexArray *, ssgNormalArray *, ssgTexCoordArray *, ssgColourArray
> *, ssgIndexArray *)
> ssg.h:1546:                 ssgVtxArray::ssgVtxArray (const ssgVtxArray
> &)
> 
>       This is with a current checkout of CVS each day. Did I miss a patch 
>       that hasn't made it to CVS yet, or is it from a compatibility issue at this 
> end? System is based on RH 7.1, c++ is gcc 2.96-85. Apologies for being 
> off topic, but have not had any contact with plib beeyond its fgfs usage.
> 
Try the attatched patch - it works for me(tm). If it works for you,
I'll see about sending it to the plib list . . .

Simon

-- 
PGP public key Id 0x144A991C, or ftp://bg77.anu.edu.au/pub/himi/himi.asc
(crappy) Homepage: http://bg77.anu.edu.au
doe #237 (see http://www.lemuria.org/DeCSS) 
My DeCSS mirror: ftp://bg77.anu.edu.au/pub/mirrors/css/ 
Index: ./src/ssg/ssgLoadBGL.cxx
===================================================================
RCS file: /cvsroot/plib/plib/src/ssg/ssgLoadBGL.cxx,v
retrieving revision 1.8
diff -u -r1.8 ssgLoadBGL.cxx
--- ./src/ssg/ssgLoadBGL.cxx    20 Jun 2002 20:07:52 -0000      1.8
+++ ./src/ssg/ssgLoadBGL.cxx    10 Jul 2002 05:57:59 -0000
@@ -536,7 +536,7 @@
 
 //===========================================================================
 
-static int createTriangIndices(ssgIndexArray *ixarr,
+static GLenum createTriangIndices(ssgIndexArray *ixarr,
                                 int numverts, const sgVec3 s_norm)
 {
   sgVec3 v1, v2, cross;
@@ -670,7 +670,7 @@
 #endif
     ssgIndexArray *strips = new ssgIndexArray(3* (numverts-2));
     ssgIndexArray *idx_array;
-    int ret;
+    GLenum ret;
     if ( (up != 0 ) && (down != 0)) {
       numverts = _ssgTriangulate(vertex_array_, ixarr, numverts, strips);
       numverts *= 3;
@@ -704,10 +704,10 @@
 
 //===========================================================================
 
-static int readTexIndices(FILE *fp, int numverts, const sgVec3 s_norm, bool flip_y)
+static GLenum readTexIndices(FILE *fp, int numverts, const sgVec3 s_norm, bool flip_y)
 {
   if(numverts <= 0)
-    return false;
+    return GL_FALSE;
 
   ssgIndexArray *curr_index_ = new ssgIndexArray();
 
@@ -795,10 +795,10 @@
 
 //===========================================================================
 
-static int readIndices(FILE* fp, int numverts, const sgVec3 s_norm)
+static GLenum readIndices(FILE* fp, int numverts, const sgVec3 s_norm)
 {
   if(numverts <= 0)
-    return false;
+    return GL_FALSE;
 
   ssgIndexArray *curr_index_ = new ssgIndexArray();
 
@@ -1822,7 +1822,7 @@
           flip_y = ulStrEqual( texture_extension, "BMP" ) != 0 ;
         }
 
-        int type = readTexIndices(fp, numverts, v, flip_y);
+       GLenum type = readTexIndices(fp, numverts, v, flip_y);
 
         if(!has_normals_)
         {
@@ -1870,7 +1870,7 @@
         flip_y = ulStrEqual( texture_extension, "BMP" ) != 0 ;
         }
 
-        int type = readTexIndices(fp, numverts, v, flip_y);
+        GLenum type = readTexIndices(fp, numverts, v, flip_y);
 
         if(!has_normals_)
         {
@@ -1909,7 +1909,7 @@
         readVector(fp, v);
 
         // Read vertex indices
-        int type = readIndices(fp, numverts, v);
+        GLenum type = readIndices(fp, numverts, v);
 
         if(!has_normals_)
         {
@@ -1952,7 +1952,7 @@
         ulEndianReadLittle32(fp);
 #endif
         // Read vertex indices
-        int type = readIndices(fp, numverts, v);
+        GLenum type = readIndices(fp, numverts, v);
 
         if(!has_normals_)
         {

Attachment: msg07598/pgp00000.pgp
Description: PGP signature

Reply via email to