Mercurial > hg > Game > Cerium
view Renderer/DataPack/Test/SpanPack/polygonpack.h @ 327:c8edba9cabb7 draft
add test_render/show_time.{cpp,h} {spe,task}/ShowTime.{cpp,h} but incomplete
author | aaa |
---|---|
date | Fri, 12 Jun 2009 02:07:06 +0900 |
parents | 587baff06cbc |
children |
line wrap: on
line source
#ifndef INCLUDE_POLYGON_PACK #define INCLUDE_POLYGON_PACK typedef struct vertex { float x; float y; float z; float tex_x; float tex_y; }Vertex, *Vertex_ptr; typedef struct Triangle { long *tex_addr, tex_width, tex_height; Vertex ver1; Vertex ver2; Vertex ver3; //float x1, y1, z1, tex_x1, tex_y1; //float x2, y2, z2, tex_x2, tex_y2; //float x3, y3, z3, tex_x3, tex_y3; } TRIANGLEPACK, *TRIANGLEPACK_PTR; typedef struct PolygonPack { struct PORIGON_INFO { int size; int light_pos[3]; int light_rgb[3]; }info; TRIANGLEPACK tri[16]; } POLYGONPACK,*POLYGONPACK_PTR; typedef struct Span { long tex_addr, tex_width, tex_height; int x, y, length_x; float start_z, end_z; float tex_x1, tex_x2, tex_y1, tex_y2; } SPAN, *SPNA_PTR; typedef struct SpanPack { struct PORIGON_INFO { int size; int light_pos[3]; int light_rgb[3]; } info; SPAN span[16]; } SPANPACK, *SPANPACK_PTR; class Polygon_Pack { public: int create_span(void *wbuf, void *rbuf); void half_triangle(long *tex_addr,long tex_width,long tex_height,Vertex *vMin, Vertex *vMid, Vertex *vMid1); }; #endif