gba-x3dtest

view src/x3d.h @ 20:2e903e27e35a

fixed x3d_disable_texture added runtime teture checks in the rasterizer
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 01 Jul 2014 23:23:37 +0300
parents b755fb002f17
children
line source
1 #ifndef X3D_H_
2 #define X3D_H_
4 #include <stdint.h>
6 enum {
7 X3D_POINTS = 1,
8 X3D_LINES = 2,
9 X3D_TRIANGLES = 3,
10 X3D_QUADS = 4
11 };
13 void x3d_projection(int fov, int32_t aspect, int32_t nearz, int32_t farz);
15 int x3d_push_matrix(void);
16 int x3d_pop_matrix(void);
17 void x3d_load_matrix(int32_t *m);
18 void x3d_mult_matrix(int32_t *m);
19 void x3d_load_identity(void);
20 void x3d_translate(int32_t x, int32_t y, int32_t z);
21 void x3d_rotate(int32_t angle, int32_t x, int32_t y, int32_t z);
22 void x3d_scale(int32_t x, int32_t y, int32_t z);
24 void x3d_vertex_array(int count, const int32_t *ptr);
25 void x3d_color_array(int count, const int32_t *ptr);
26 void x3d_texcoord_array(int count, const int32_t *ptr);
28 int x3d_draw(int prim, int vnum);
29 int x3d_draw_indexed(int prim, int count, uint16_t *ptr);
31 void x3d_color_index(int cidx);
32 void x3d_color(int32_t r, int32_t g, int32_t b);
34 int x3d_create_texture_rgb(int xsz, int ysz, const uint16_t *pixels);
35 void x3d_enable_texture(int texid);
36 void x3d_disable_texture(void);
37 int x3d_get_active_texture(void);
39 #endif /* X3D_H_ */