Commit 003327a2c36a49b266644cef02a6f15fb2176d84
1 parent
d59f387c
Fixed the impropper visualization of the spider, as well as spider being skewed
Showing
2 changed files
with
18 additions
and
72 deletions
Show diff stats
TextureTest.cu
... | ... | @@ -76,7 +76,7 @@ glInit() |
76 | 76 | glLoadIdentity(); |
77 | 77 | glOrtho(-5.0, 2.0,-5.0, 2.0, -0.0, 1000.0); |
78 | 78 | glMatrixMode(GL_MODELVIEW); |
79 | - spidey = stim::gl_spider<float>(0.5, 0.5, 0.5, 0.1, 0.1, 0.1, 0.5, 0.5); | |
79 | + spidey = stim::gl_spider<float>(0.5, 0.5, 0.5, -0.1, -0.1, -0.1, 0.5, 0.5); | |
80 | 80 | CHECK_OPENGL_ERROR |
81 | 81 | } |
82 | 82 | |
... | ... | @@ -100,10 +100,10 @@ DrawCube() |
100 | 100 | void |
101 | 101 | DrawPlanes() |
102 | 102 | { |
103 | - p1 = spidey.ver.p(0,0); | |
104 | - p2 = spidey.ver.p(0,1); | |
105 | - p3 = spidey.ver.p(1,0); | |
106 | - p4 = spidey.ver.p(1,1); | |
103 | + p1 = spidey.ver.p(1,1); | |
104 | + p2 = spidey.ver.p(1,0); | |
105 | + p3 = spidey.ver.p(0,0); | |
106 | + p4 = spidey.ver.p(0,1); | |
107 | 107 | glPushName(VERTICAL); |
108 | 108 | glBegin(GL_QUADS); |
109 | 109 | glTexCoord3f( |
... | ... | @@ -148,10 +148,10 @@ DrawPlanes() |
148 | 148 | ); |
149 | 149 | glEnd(); |
150 | 150 | glPopName(); |
151 | - p1 = spidey.hor.p(0,0); | |
152 | - p2 = spidey.hor.p(0,1); | |
153 | - p3 = spidey.hor.p(1,0); | |
154 | - p4 = spidey.hor.p(1,1); | |
151 | + p1 = spidey.hor.p(1,1); | |
152 | + p2 = spidey.hor.p(1,0); | |
153 | + p3 = spidey.hor.p(0,0); | |
154 | + p4 = spidey.hor.p(0,1); | |
155 | 155 | glPushName(HORIZONTAL); |
156 | 156 | glBegin(GL_QUADS); |
157 | 157 | glTexCoord3f( |
... | ... | @@ -200,64 +200,10 @@ DrawPlanes() |
200 | 200 | void |
201 | 201 | DrawSpiders() |
202 | 202 | { |
203 | - /* | |
204 | - glBegin(GL_QUADS); | |
205 | - glTexCoord3f( | |
206 | - vertexTex[0][0], | |
207 | - vertexTex[0][1], | |
208 | - oriTex[2] | |
209 | - ); | |
210 | - glVertex2f( -5.0,-5.0); | |
211 | - glTexCoord3f( | |
212 | - vertexTex[1][0], | |
213 | - vertexTex[1][1], | |
214 | - oriTex[2] | |
215 | - ); | |
216 | - glVertex2f(-3.0, -5.0); | |
217 | - glTexCoord3f( | |
218 | - vertexTex[2][0], | |
219 | - vertexTex[2][1], | |
220 | - oriTex[2] | |
221 | - ); | |
222 | - glVertex2f(-3.0, -3.0); | |
223 | - glTexCoord3f( | |
224 | - vertexTex[3][0], | |
225 | - vertexTex[3][1], | |
226 | - oriTex[2] | |
227 | - ); | |
228 | - glVertex2f(-5.0, -3.0); | |
229 | - glEnd(); | |
230 | - glBegin(GL_QUADS); | |
231 | - glTexCoord3f( | |
232 | - vertexTex[3][0], | |
233 | - oriTex[1], | |
234 | - vertexTex[3][2] | |
235 | - ); | |
236 | - glVertex2f(-5.0, -2.9); | |
237 | - glTexCoord3f( | |
238 | - vertexTex[2][0], | |
239 | - oriTex[1], | |
240 | - vertexTex[2][2] | |
241 | - ); | |
242 | - glVertex2f(-3.0, -2.9); | |
243 | - glTexCoord3f( | |
244 | - vertexTex[7][0], | |
245 | - oriTex[1], | |
246 | - vertexTex[7][2] | |
247 | - ); | |
248 | - glVertex2f(-3.0, -0.9); | |
249 | - glTexCoord3f( | |
250 | - vertexTex[6][0], | |
251 | - oriTex[1], | |
252 | - vertexTex[6][2] | |
253 | - ); | |
254 | - glVertex2f(-5.0, -0.9); | |
255 | - glEnd(); | |
256 | - */ | |
257 | - p1 = spidey.hor.p(0,0); | |
258 | - p2 = spidey.hor.p(0,1); | |
259 | - p3 = spidey.hor.p(1,0); | |
260 | - p4 = spidey.hor.p(1,1); | |
203 | + p1 = spidey.hor.p(1,1); | |
204 | + p2 = spidey.hor.p(1,0); | |
205 | + p3 = spidey.hor.p(0,0); | |
206 | + p4 = spidey.hor.p(0,1); | |
261 | 207 | glBegin(GL_QUADS); |
262 | 208 | glTexCoord3f( |
263 | 209 | p1[0], |
... | ... | @@ -284,10 +230,10 @@ DrawSpiders() |
284 | 230 | ); |
285 | 231 | glVertex2f(-5.0, -3.0); |
286 | 232 | glEnd(); |
287 | - p1 = spidey.ver.p(0,0); | |
288 | - p2 = spidey.ver.p(0,1); | |
289 | - p3 = spidey.ver.p(1,0); | |
290 | - p4 = spidey.ver.p(1,1); | |
233 | + p1 = spidey.ver.p(1,1); | |
234 | + p2 = spidey.ver.p(1,0); | |
235 | + p3 = spidey.ver.p(0,0); | |
236 | + p4 = spidey.ver.p(0,1); | |
291 | 237 | |
292 | 238 | glBegin(GL_QUADS); |
293 | 239 | glTexCoord3f( | ... | ... |