Debian Codegraph @

debian/patches/08_common.cpp.patch

raw symbols SCIP
1 Fromscip-debian debian qutemol 0.4.1~cvs20081111-15 qutemol/patches/`08_common.cpp.patch`#From.: Morten Kjeldgaard <[email protected]scip-debian . . . identity/`[email protected]`.>
2 Subjectscip-debian debian qutemol 0.4.1~cvs20081111-15 qutemol/patches/`08_common.cpp.patch`#Subject.: modification to source code
3
4
5 --- a/src/Common.cppscip-debian debian qutemol 0.4.1~cvs20081111-15 qutemol/upstream/`src/Common.cpp`:
6 +++ b/src/Common.cppscip-debian debian qutemol 0.4.1~cvs20081111-15 qutemol/upstream/`src/Common.cpp`:
7 @@ -136,8 +136,8 @@
8 Byte* GetSnapshot(int sx, int sy, bool alpha){
9
10
11 - static uint textureSnap = 666;
12 - static uint frameSnap;
13 + //static uint textureSnap = 666;
14 + //static uint frameSnap;
15
16 // set offline rendering
17 mainCanvas.RedirectToMemory();
18 @@ -448,7 +448,7 @@
19 );
20
21 glBegin(GL_QUADS);
22 - for (int i=0; i<atom.size(); i++) atom[i].DrawHalo();
23 + for (int i=0; i < (int)atom.size(); i++) atom[i].DrawHalo();
24 glEnd();
25
26 /*
27 @@ -496,7 +496,7 @@
28
29 shadowSettings.BindShaders();
30 glBegin(GL_QUADS);
31 - for (int i=0; i<atom.size(); i++) atom[i].DrawShadowmap();
32 + for (int i=0; i < (int)atom.size(); i++) atom[i].DrawShadowmap();
33 glEnd();
34
35 if (sticks) {
36 @@ -507,7 +507,7 @@
37
38
39 glBegin(GL_QUADS);
40 - for (int i=0; i<bond.size(); i++) bond[i].DrawShadowmap();
41 + for (int i=0; i < (int)bond.size(); i++) bond[i].DrawShadowmap();
42 glEnd();
43 }
44 glPopMatrix();
45 @@ -559,7 +559,7 @@
46 if (draw_balls) {
47 if (draw_wireframe_balls) {
48 glDisable(GL_FRAGMENT_PROGRAM_ARB);
49 - for (int i=0; i<atom.size(); i++) {
50 + for (int i=0; i < (int)atom.size(); i++) {
51 glColor3f(0,0,1);
52 glBegin(GL_LINE_LOOP);
53 atom[i].Draw();
54 @@ -571,7 +571,7 @@
55 //if (DL_atoms==666) glGenD
56
57 glBegin(GL_QUADS);
58 - for (int i=0; i<atom.size(); i++) atom[i].Draw();
59 + for (int i=0; i < (int)atom.size(); i++) atom[i].Draw();
60 glEnd();
61
62 glDisable(GL_VERTEX_PROGRAM_ARB);
63 @@ -604,7 +604,7 @@
64 glColor3f(1,1,1);
65 if (draw_wireframe_sticks) {
66 glDisable(GL_FRAGMENT_PROGRAM_ARB);
67 - for (int i=0; i<bond.size(); i++) {
68 + for (int i=0; i < (int)bond.size(); i++) {
69 glColor3f(0,0.6,0.3);
70 glBegin(GL_LINE_LOOP);
71 bond[i].Draw();
72 @@ -613,7 +613,7 @@
73 }
74 else {
75 glBegin(GL_QUADS);
76 - for (int i=0; i<bond.size(); i++) bond[i].Draw();
77 + for (int i=0; i < (int)bond.size(); i++) bond[i].Draw();
78 glEnd();
79 }
80 cgSettings.BindShaders();
81 @@ -703,12 +703,12 @@
82 if (!ready) return false;
83 if (cgSettings.P_texture==0) return false;
84 if (DirV.size()==0) return true;
85 - return AOdoneLvl<DirV.size();
86 + return AOdoneLvl< (int)DirV.size();
87 }
88
89 bool Mol::DecentAO(){
90 float k=1;
91 - if (AOdoneLvl>=DirV.size()) return true;
92 + if (AOdoneLvl >= (int)DirV.size()) return true;
93 if (atom.size()<10) return (AOdoneLvl>6*k);
94 if (atom.size()<100) return (AOdoneLvl>4*k);
95 if (atom.size()<1000) return (AOdoneLvl>2*k);
96 @@ -751,12 +751,12 @@
97 }
98
99 // for testing purposes
100 -bool Mol::PrepareAOSingleView(){
101 +void Mol::PrepareAOSingleView(){
102 static int i=0;
103 PrepareAOstart();
104 AOgpu2::Bind();
105 AOgpu2 ao(DirV[i], *this, 4 );
106 - i++; if (i>DirV.size()) i=0;
107 + i++; if (i > (int)DirV.size()) i=0;
108 AOgpu2::UnBind();
109 AOdoneLvl=DirV.size();
110 }
111 @@ -772,7 +772,7 @@
112
113
114 AOdoneLvl++;
115 - return (AOdoneLvl>=DirV.size()) ;
116 + return (AOdoneLvl >= (int)DirV.size()) ;
117 }
118
119 void Mol::PrepareAOallAtOnce(){
120 @@ -786,12 +786,12 @@
121 //refresh();
122
123 FILE *f = fopen("res.txt", "w");
124 - long int w=TakeTime(f,"sampled");
125 + long int w=TakeTime(f, (char *)"sampled");
126
127 - fprintf(f," %d views done in %d msec (%.2f views x sec), with %d atoms & %d sticks.\n",
128 - DirV.size(), w,
129 - DirV.size()*1000.0/w, this->atom.size(),
130 - this->sticks?(this->bond.size()):0 );
131 + fprintf(f," %d views done in %ld msec (%.2f views x sec), with %d atoms & %d sticks.\n",
132 + (int)DirV.size(), w,
133 + (int)DirV.size()*1000.0/w, (int)this->atom.size(),
134 + (int)(this->sticks?(this->bond.size()):0) );
135 fclose(f);
136
137 AOready=true;
138 @@ -822,7 +822,7 @@
139 tb.GetView();
140 tb.Apply(false);
141
142 - float pos[4]={0.0f,0.0f,-1.0f,0.0f};
143 + //float pos[4]={0.0f,0.0f,-1.0f,0.0f};
144 float d[16];
145 glGetFloatv(GL_MODELVIEW_MATRIX,d);
146 glPopMatrix();