Mercurial > touhou
comparison eclviewer.py @ 58:3da4de9decd0
Use logging module
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Tue, 23 Aug 2011 21:01:50 +0200 |
parents | ab826bc29aa2 |
children | 4fe37a620b22 |
comparison
equal
deleted
inserted
replaced
57:694f25881d0f | 58:3da4de9decd0 |
---|---|
123 # 224. = 448. / 2. = height / 2. | 123 # 224. = 448. / 2. = height / 2. |
124 # 835.979370 = 224./math.tan(math.radians(15)) = (height/2.)/math.tan(math.radians(fov/2)) | 124 # 835.979370 = 224./math.tan(math.radians(15)) = (height/2.)/math.tan(math.radians(fov/2)) |
125 # This is so that objects on the (O, x, y) plane use pixel coordinates | 125 # This is so that objects on the (O, x, y) plane use pixel coordinates |
126 gluLookAt(192., 224., - 835.979370 * dz, | 126 gluLookAt(192., 224., - 835.979370 * dz, |
127 192. + dx, 224. - dy, 0., 0., -1., 0.) | 127 192. + dx, 224. - dy, 0., 0., -1., 0.) |
128 #print(glGetFloat(GL_MODELVIEW_MATRIX)) | |
129 glTranslatef(-x, -y, -z) | 128 glTranslatef(-x, -y, -z) |
130 | 129 |
131 glEnable(GL_DEPTH_TEST) | 130 glEnable(GL_DEPTH_TEST) |
132 for texture_key, (nb_vertices, vertices, uvs, colors) in background.objects_by_texture.items(): | 131 for texture_key, (nb_vertices, vertices, uvs, colors) in background.objects_by_texture.items(): |
133 glBindTexture(GL_TEXTURE_2D, texture_manager[texture_key]) | 132 glBindTexture(GL_TEXTURE_2D, texture_manager[texture_key]) |