Mercurial > hg > Game > Cerium
changeset 113:80d93fe0601d draft
Define New Texture Data Structure
author | gongo@gendarme.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Thu, 13 Nov 2008 10:10:57 +0900 |
parents | 7ef4fc1804cb |
children | 442cbf594017 |
files | TaskManager/Test/test_render/Makefile.def TaskManager/Test/test_render/Span.h TaskManager/Test/test_render/polygon.h TaskManager/Test/test_render/spe/CreateSpan.cpp TaskManager/Test/test_render/task/create_sgp.cpp |
diffstat | 5 files changed, 25 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskManager/Test/test_render/Makefile.def Wed Nov 12 17:55:23 2008 +0900 +++ b/TaskManager/Test/test_render/Makefile.def Thu Nov 13 10:10:57 2008 +0900 @@ -3,8 +3,9 @@ # include/library path # ex: macosx #CERIUM = /Users/gongo/Source/Concurrency/Game_project/Cerium +CERIUM = /Users/gongo/Source/Cerium # ex: linux/ps3 -CERIUM = /home/gongo/Game_project/Cerium +#CERIUM = /home/gongo/Game_project/Cerium #CERIUM = ../../.. \ No newline at end of file
--- a/TaskManager/Test/test_render/Span.h Wed Nov 12 17:55:23 2008 +0900 +++ b/TaskManager/Test/test_render/Span.h Thu Nov 13 10:10:57 2008 +0900 @@ -1,6 +1,10 @@ #ifndef INCLUDED_SPAN #define INCLUDED_SPAN +#ifndef INCLUDED_TAPESTRY +# include "Tapestry.h" +#endif + class Span { public: long *tex_addr; @@ -15,6 +19,9 @@ float tex_x2; float tex_y1; float tex_y2; + + //int tile_list_size; + //TileList[1]; // }; #endif
--- a/TaskManager/Test/test_render/polygon.h Wed Nov 12 17:55:23 2008 +0900 +++ b/TaskManager/Test/test_render/polygon.h Thu Nov 13 10:10:57 2008 +0900 @@ -24,6 +24,10 @@ long long size; char *name; char *parent_name; + + //int texture_id; + //int texture_px, texture_py; // texture の分割数 + float *data; //"vertex" and "normal" and "texture" float xyz[4]; // position float angle[4]; // angle
--- a/TaskManager/Test/test_render/spe/CreateSpan.cpp Wed Nov 12 17:55:23 2008 +0900 +++ b/TaskManager/Test/test_render/spe/CreateSpan.cpp Thu Nov 13 10:10:57 2008 +0900 @@ -220,6 +220,10 @@ span->tex_x2 = end_tex_x; span->tex_y1 = start_tex_y; span->tex_y2 = end_tex_y; + + // TilePtr の計算 + // tix, tiy (Tile 内での x, y) + // } }
--- a/TaskManager/Test/test_render/task/create_sgp.cpp Wed Nov 12 17:55:23 2008 +0900 +++ b/TaskManager/Test/test_render/task/create_sgp.cpp Thu Nov 13 10:10:57 2008 +0900 @@ -55,6 +55,14 @@ tex = 0; } + /** + * struct texture { + * int texture_id; + * float vertex[3]; + * float texture[2]; + * } + */ + node->vertex[d] = t->data[i*3]; node->vertex[d+1] = t->data[i*3+1]; node->vertex[d+2] = t->data[i*3+2];