Mercurial > hg > Game > Cerium
view 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 source
#include <stdlib.h> #include <string.h> #include "Load_Texture.h" #include "texture.h" #include "Func.h" /** * 決めうちじゃなくて、 * create_task の時に param で渡せばおk */ #define height 128 #define width 128 // byteperpixel = 3 width = 128 dma_height= 32 #define LOAD_SIZE 3*128*32 #define MAX_LOAD_SIZE 16384 #define USE_ARRAY 3 SchedDefineTask(LoadTexture); int LoadTexture::run(void *rbuf , void *wbuf) { 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); memcpy(list, addrList, addrSize); return 0; }