[Gridflow-cvs] [svn] commit: r5798 - in /trunk/src: gem.cxx gridflow.cxx

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Tue Jul 27 19:57:59 EDT 2010


Author: matju
Date: Tue Jul 27 19:57:58 2010
New Revision: 5798

Log:
!!!!!!!

Modified:
    trunk/src/gem.cxx
    trunk/src/gridflow.cxx

Modified: trunk/src/gem.cxx
==============================================================================
--- trunk/src/gem.cxx (original)
+++ trunk/src/gem.cxx Tue Jul 27 19:57:58 2010
@@ -28,14 +28,14 @@
 struct imageStruct {
   GLint xsize, ysize, csize; GLenum type, format; int notowned;
   unsigned char *data; unsigned char *pdata; size_t datasize; GLboolean upsidedown;
-  void clear(); imageStruct(); ~imageStruct();
+  virtual void clear(); imageStruct(); ~imageStruct();
   unsigned char *allocate(size_t size); unsigned char *allocate();
 };
 #else // older
 struct imageStruct {
   GLint xsize, ysize, csize; GLenum type, format; int notowned;
   unsigned char *data; unsigned char *pdata; size_t datasize; GLboolean upsidedown;
-  virtual void clear(); imageStruct(); ~imageStruct();
+  void clear(); imageStruct(); ~imageStruct();
   unsigned char *allocate(size_t size); unsigned char *allocate();
 };
 #endif
@@ -79,14 +79,6 @@
   TexCoord(float s_, float t_) : s(s_), t(t_) {}
   float s,t;
 };
-#if 0 /* unused GemState fields */
-  TexCoord *texCoords; int numTexCoords, multiTexUnits;
-  float tickTime; GLenum drawType; int stackDepth[4];
-#endif
-
-static int gem=0;
-static int imageStruct_has_virtual = 0;
-struct GemVersion {static const char *versionString();};
 /* end of summary */
 
 #ifdef MACOSX
@@ -106,12 +98,10 @@
 	void startRendering () {pb->newimage = 1;}
 	\constructor () {
 		yflip = false;
-		if (imageStruct_has_virtual) {
-			pb = new pixBlock();
-			imageStruct &im = pb->image = imageStruct();
-			im.ysize = 1; im.xsize = 1; im.csize = 4; im.format = GEM_RGBA; im.type = GL_UNSIGNED_BYTE;
-			im.allocate(); *(int*)im.data = 0x000000ff;
-		}
+		pb = new pixBlock();
+		imageStruct &im = pb->image = imageStruct();
+		im.ysize = 1; im.xsize = 1; im.csize = 4; im.format = GEM_RGBA; im.type = GL_UNSIGNED_BYTE;
+		im.allocate(); *(int*)im.data = 0x000000ff;
 	}
 	~GridToPix () {}
 	\grin 1 int
@@ -318,8 +308,8 @@
 }
 
 extern "C" void gridflow_gem9292_setup () {post("GridFlow Gem 9292 module loaded"); startup_gem();}
-extern "C" void gridflow_gem9293_setup () {post("GridFlow Gem 9292 module loaded"); startup_gem();}
-extern "C" void gridflow_gem9393_setup () {post("GridFlow Gem 9292 module loaded"); startup_gem();}
+extern "C" void gridflow_gem9293_setup () {post("GridFlow Gem 9293 module loaded"); startup_gem();}
+extern "C" void gridflow_gem9393_setup () {post("GridFlow Gem 9393 module loaded"); startup_gem();}
 
 /*
 virtual void processRGBAImage(imageStruct &image) {}

Modified: trunk/src/gridflow.cxx
==============================================================================
--- trunk/src/gridflow.cxx (original)
+++ trunk/src/gridflow.cxx Tue Jul 27 19:57:58 2010
@@ -1023,6 +1023,7 @@
 }
 
 #ifdef HAVE_GEM
+	//struct GemVersion {static const char *versionString();};
 	struct GemState    {GemState(); char trabant[666];};
 	struct imageStruct {imageStruct(); char lada[666];};
 	extern "C" void sys_load_lib(t_canvas *,const char *);
@@ -1083,7 +1084,7 @@
 		else if (j==5 || j==6) {gem = 92;}
 		else error("GridFlow: can't detect this version of GEM: i=%d j=%d",i,j);
 	}
-	//post("GridFlow/GEM bridge : GEM version is detected to be %d",gem);
+	post("GridFlow/GEM bridge : GEM version is detected to be %d",gem);
 	//delete dummy;
 	/* note that j==6 is because in 64-bit mode you have one int of padding in GemState92 just before the pixBlock* */
 	bool imageStruct_has_virtual = !!*(long *)new imageStruct();



More information about the Gridflow-cvs mailing list