Mercurial > hg > Game > Cerium
view TaskManager/Test/test_render/task/update_sgp.cpp @ 155:79ded2ad7236 draft
TextureInfoList がずれてたのを修正
author | gongo@gendarme.local |
---|---|
date | Thu, 04 Dec 2008 13:58:41 +0900 |
parents | f35504025f73 |
children | 443c7ae1c7a7 8c9cae96404b |
line wrap: on
line source
#include <stdio.h> #include <string.h> #include <unistd.h> #include <math.h> #include "scene_graph_pack.h" #include "sys.h" #include "update_sgp.hpp" SchedDefineTask(Update_SGP); int Update_SGP::run(void *rbuf, void *wbuf) { SceneGraphNodePtr node; SceneGraphPack *sgp = (SceneGraphPack*)get_input(rbuf, 0); SceneGraphPack *_sgp = (SceneGraphPack*)get_output(wbuf, 0); int screen_width = get_param(0); int screen_height = get_param(1); // ϤǤʤ for (int i = 0; i < sgp->info.size && i < 3; i++) { node = &sgp->node[i]; do { if (node->pn != -1) { get_matrix(node->translation, node->angle, node->obj_pos, sgp->node[node->pn].translation); } else { get_matrix(node->translation, node->angle, node->obj_pos, NULL); } node = node->next; } while (node); } memcpy(_sgp, sgp, sizeof(SceneGraphPack)); return 0; }