Mercurial > touhou
annotate pytouhou/ui/renderer.pxd @ 403:9589a01e6edf
Move MSG faces management to pytouhou.game.game, they have nothing to do in the MSG VM.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sun, 17 Feb 2013 15:20:30 +0100 |
parents | 1c773544eaeb |
children | 5fe6cd6ceb48 |
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 |
399
1c773544eaeb
Make the background use a single vbo and offsets, just like the 2D code.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
398
diff
changeset
|
7 cdef struct VertexFloat: |
1c773544eaeb
Make the background use a single vbo and offsets, just like the 2D code.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
398
diff
changeset
|
8 float x, y, z |
1c773544eaeb
Make the background use a single vbo and offsets, just like the 2D code.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
398
diff
changeset
|
9 float u, v |
1c773544eaeb
Make the background use a single vbo and offsets, just like the 2D code.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
398
diff
changeset
|
10 unsigned char r, g, b, a |
1c773544eaeb
Make the background use a single vbo and offsets, just like the 2D code.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
398
diff
changeset
|
11 |
1c773544eaeb
Make the background use a single vbo and offsets, just like the 2D code.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
398
diff
changeset
|
12 |
222
5cac48b328ad
Refactor rendering code a bit.
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
13 cdef class Renderer: |
5cac48b328ad
Refactor rendering code a bit.
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
14 cdef public texture_manager |
5cac48b328ad
Refactor rendering code a bit.
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
15 cdef Vertex *vertex_buffer |
399
1c773544eaeb
Make the background use a single vbo and offsets, just like the 2D code.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
398
diff
changeset
|
16 cdef object texture_key |
1c773544eaeb
Make the background use a single vbo and offsets, just like the 2D code.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
398
diff
changeset
|
17 cdef unsigned short blendfunc, nb_vertices |
1c773544eaeb
Make the background use a single vbo and offsets, just like the 2D code.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
398
diff
changeset
|
18 cdef VertexFloat *background_vertex_buffer |
222
5cac48b328ad
Refactor rendering code a bit.
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
19 |
5cac48b328ad
Refactor rendering code a bit.
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
20 cpdef render_elements(self, elements) |
399
1c773544eaeb
Make the background use a single vbo and offsets, just like the 2D code.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
398
diff
changeset
|
21 cpdef render_background(self) |
1c773544eaeb
Make the background use a single vbo and offsets, just like the 2D code.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
398
diff
changeset
|
22 cpdef prerender_background(self, background) |
370
74471afbac37
Add a programmable pipeline renderer, and a --fixed-pipeline switch to use the old one.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
222
diff
changeset
|
23 cpdef ortho_2d(self, left, right, bottom, top) |
74471afbac37
Add a programmable pipeline renderer, and a --fixed-pipeline switch to use the old one.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
222
diff
changeset
|
24 cpdef look_at(self, eye, center, up) |
74471afbac37
Add a programmable pipeline renderer, and a --fixed-pipeline switch to use the old one.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
222
diff
changeset
|
25 cpdef perspective(self, fovy, aspect, zNear, zFar) |
222
5cac48b328ad
Refactor rendering code a bit.
Thibaut Girka <thib@sitedethib.com>
parents:
diff
changeset
|
26 cpdef setup_camera(self, dx, dy, dz) |