Mercurial > hg > Game > Cerium
diff TaskManager/Test/test_render/task/Load_Texture.cpp @ 130:40978d4b608a draft
テクスチャの大きさを128x128以外にも使えるように。(若干バグ有り)
author | gongo@gendarme.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Tue, 25 Nov 2008 17:19:43 +0900 |
parents | 13b43de5ef5d |
children | 7bc603ec6111 |
line wrap: on
line diff
--- a/TaskManager/Test/test_render/task/Load_Texture.cpp Tue Nov 25 15:53:26 2008 +0900 +++ b/TaskManager/Test/test_render/task/Load_Texture.cpp Tue Nov 25 17:19:43 2008 +0900 @@ -21,26 +21,12 @@ int LoadTexture::run(void *rbuf , void *wbuf) { - int addr = smanager->get_param(0); - int addrNum = smanager->get_param(1); + int addrNum = smanager->get_param(0); + int addrSize = addrNum*sizeof(void*); + void **list = (void**)global_alloc(TEXTURE2_ID, addrSize); void **addrList = (void**)smanager->get_input(0); - void **list = (void**)global_alloc(TEXTURE2_ID, addrNum*sizeof(void*)); - - memcpy(list, addrList, addrNum*sizeof(void*)); - -#if 0 - //タスクからタスクを生成 - TaskPtr task = create_task(TASK_SET_TEXTURE); - - // 16kbyte づつ送ってる - task->add_inData(addr, MAX_LOAD_SIZE); - task->add_inData(addr + MAX_LOAD_SIZE, MAX_LOAD_SIZE); - task->add_inData(addr + MAX_LOAD_SIZE*2, MAX_LOAD_SIZE); - task->add_inData(addr + MAX_LOAD_SIZE*3, MAX_LOAD_SIZE); - - wait_task(task); -#endif + memcpy(list, addrList, addrSize); return 0; }