Mercurial > touhou
annotate pytouhou/ui/renderer.pxd @ 301:6f1ca1cb5238
Avoid segfaults in the unlikely case a huge number of sprites is rendered.
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Sat, 10 Mar 2012 20:30:55 +0100 |
parents | 5cac48b328ad |
children | 74471afbac37 |
rev | line source |
---|---|
222
5cac48b328ad
Refactor rendering code a bit.
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
1 cdef struct Vertex: |
5cac48b328ad
Refactor rendering code a bit.
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
2 int x, y, z |
5cac48b328ad
Refactor rendering code a bit.
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
3 float u, v |
5cac48b328ad
Refactor rendering code a bit.
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
4 unsigned char r, g, b, a |
5cac48b328ad
Refactor rendering code a bit.
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
5 |
5cac48b328ad
Refactor rendering code a bit.
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
6 |
5cac48b328ad
Refactor rendering code a bit.
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
7 cdef class Renderer: |
5cac48b328ad
Refactor rendering code a bit.
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
8 cdef public texture_manager |
5cac48b328ad
Refactor rendering code a bit.
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
9 cdef Vertex *vertex_buffer |
5cac48b328ad
Refactor rendering code a bit.
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
10 |
5cac48b328ad
Refactor rendering code a bit.
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
11 cpdef render_elements(self, elements) |
5cac48b328ad
Refactor rendering code a bit.
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
12 cpdef setup_camera(self, dx, dy, dz) |