Mercurial > touhou
comparison pytouhou/ui/opengl/renderer.pxd @ 518:75ae628522c9
Use shorts instead of ints for vertex position, reducing the size of a vertex to 20 bytes from 24.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 07 Dec 2013 14:15:43 +0100 |
parents | b3193b43a86c |
children | c0b3f8709f74 |
comparison
equal
deleted
inserted
replaced
517:dec43940f092 | 518:75ae628522c9 |
---|---|
1 from cpython cimport PyObject | 1 from cpython cimport PyObject |
2 from pytouhou.lib.opengl cimport GLuint | 2 from pytouhou.lib.opengl cimport GLuint |
3 from .texture cimport TextureManager, FontManager | 3 from .texture cimport TextureManager, FontManager |
4 | 4 |
5 cdef struct Vertex: | 5 cdef struct Vertex: |
6 int x, y, z | 6 short x, y, z, padding |
7 float u, v | 7 float u, v |
8 unsigned char r, g, b, a | 8 unsigned char r, g, b, a |
9 | 9 |
10 | 10 |
11 cdef struct PassthroughVertex: | 11 cdef struct PassthroughVertex: |
12 int x, y | 12 short x, y |
13 float u, v | 13 float u, v |
14 | 14 |
15 | 15 |
16 cdef class Texture: | 16 cdef class Texture: |
17 cdef long key | 17 cdef long key |