Mercurial > hg > Game > Cerium
comparison TaskManager/Test/test_render/spe/Set_Texture.cpp @ 109:028ffc9c0375 draft
Cerium cvs version
author | gongo@gendarme.local |
---|---|
date | Wed, 12 Nov 2008 17:39:33 +0900 |
parents | |
children | 13b43de5ef5d |
comparison
equal
deleted
inserted
replaced
108:6f3b3dd3c095 | 109:028ffc9c0375 |
---|---|
1 #include <string.h> | |
2 #include "Set_Texture.h" | |
3 #include "texture.h" | |
4 | |
5 SchedDefineTask(SetTexture); | |
6 | |
7 //texture をglobal 領域にコピーするタスク | |
8 int | |
9 SetTexture::run(void *rbuf, void *wbuf) | |
10 { | |
11 void *src[3]; | |
12 | |
13 src[0] = get_input(rbuf, 0); | |
14 src[1] = get_input(rbuf, 1); | |
15 src[2] = get_input(rbuf, 2); | |
16 | |
17 //タスクが共有できる領域確保 | |
18 void *data = global_alloc(TEXTURE_ID, MAX_LOAD_SIZE*3); | |
19 | |
20 memcpy(data, src[0], MAX_LOAD_SIZE); | |
21 memcpy((void*)((int)data + MAX_LOAD_SIZE), src[1], MAX_LOAD_SIZE); | |
22 memcpy((void*)((int)data + MAX_LOAD_SIZE*2), src[2], MAX_LOAD_SIZE); | |
23 | |
24 return 0; | |
25 } |