From: Morten Kjeldgaard Subject: modification to source code --- a/src/Common.cpp +++ b/src/Common.cpp @@ -136,8 +136,8 @@ Byte* GetSnapshot(int sx, int sy, bool alpha){ - static uint textureSnap = 666; - static uint frameSnap; + //static uint textureSnap = 666; + //static uint frameSnap; // set offline rendering mainCanvas.RedirectToMemory(); @@ -448,7 +448,7 @@ ); glBegin(GL_QUADS); - for (int i=0; i=DirV.size()) return true; + if (AOdoneLvl >= (int)DirV.size()) return true; if (atom.size()<10) return (AOdoneLvl>6*k); if (atom.size()<100) return (AOdoneLvl>4*k); if (atom.size()<1000) return (AOdoneLvl>2*k); @@ -751,12 +751,12 @@ } // for testing purposes -bool Mol::PrepareAOSingleView(){ +void Mol::PrepareAOSingleView(){ static int i=0; PrepareAOstart(); AOgpu2::Bind(); AOgpu2 ao(DirV[i], *this, 4 ); - i++; if (i>DirV.size()) i=0; + i++; if (i > (int)DirV.size()) i=0; AOgpu2::UnBind(); AOdoneLvl=DirV.size(); } @@ -772,7 +772,7 @@ AOdoneLvl++; - return (AOdoneLvl>=DirV.size()) ; + return (AOdoneLvl >= (int)DirV.size()) ; } void Mol::PrepareAOallAtOnce(){ @@ -786,12 +786,12 @@ //refresh(); FILE *f = fopen("res.txt", "w"); - long int w=TakeTime(f,"sampled"); + long int w=TakeTime(f, (char *)"sampled"); - fprintf(f," %d views done in %d msec (%.2f views x sec), with %d atoms & %d sticks.\n", - DirV.size(), w, - DirV.size()*1000.0/w, this->atom.size(), - this->sticks?(this->bond.size()):0 ); + fprintf(f," %d views done in %ld msec (%.2f views x sec), with %d atoms & %d sticks.\n", + (int)DirV.size(), w, + (int)DirV.size()*1000.0/w, (int)this->atom.size(), + (int)(this->sticks?(this->bond.size()):0) ); fclose(f); AOready=true; @@ -822,7 +822,7 @@ tb.GetView(); tb.Apply(false); - float pos[4]={0.0f,0.0f,-1.0f,0.0f}; + //float pos[4]={0.0f,0.0f,-1.0f,0.0f}; float d[16]; glGetFloatv(GL_MODELVIEW_MATRIX,d); glPopMatrix();