| 23 | |
| 24 | |
| 25 | def __createDebugger(self): |
| 26 | self.debugger.vao = glGenVertexArrays(1) |
| 27 | glBindVertexArray(self.debugger.vao) |
| 28 | |
| 29 | vertices = np.array([-0.5, 0.5, 0.0, 0.0, 1.0, |
| 30 | -0.5, -0.5, 0.0, 0.0, 0.0, |
| 31 | 0.5, 0.5, 0.0, 1.0, 1.0, |
| 32 | 0.5, -0.5, 0.0, 1.0, 0.0], dtype="float32") |
| 33 | |
| 34 | |
| 35 | self.debugger.vbo = glGenBuffers(1) |
| 36 | glBindBuffer(GL_ARRAY_BUFFER, self.debugger.vbo) |
| 37 | glBufferData(GL_ARRAY_BUFFER, vertices, GL_STATIC_DRAW) |
| 38 | |
| 39 | stride = 5 |
| 40 | glEnableVertexAttribArray(0) |
| 41 | glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, self.d_fsize * stride, None) |
| 42 | |
| 43 | uv_offset = 3 |
| 44 | glEnableVertexAttribArray(1) |
| 45 | glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, self.d_fsize * stride, ctypes.cast(self.d_fsize * uv_offset, ctypes.c_void_p)) |
| 46 | |
| 47 | |
| 48 | def renderDebugMap(self): |