diff TaskManager/Test/test_render/task/Load_Texture.cpp @ 120:13b43de5ef5d draft

fix Load Texture
author gongo@gendarme.local
date Tue, 25 Nov 2008 00:18:49 +0900
parents 028ffc9c0375
children 40978d4b608a
line wrap: on
line diff
--- a/TaskManager/Test/test_render/task/Load_Texture.cpp	Thu Nov 13 11:12:29 2008 +0900
+++ b/TaskManager/Test/test_render/task/Load_Texture.cpp	Tue Nov 25 00:18:49 2008 +0900
@@ -1,4 +1,5 @@
 #include <stdlib.h>
+#include <string.h>
 #include "Load_Texture.h"
 #include "texture.h"
 #include "Func.h"
@@ -20,8 +21,15 @@
 int 
 LoadTexture::run(void *rbuf , void *wbuf) 
 {
-    int addr = get_param(0);
-    
+    int addr = smanager->get_param(0);
+    int addrNum = smanager->get_param(1);
+
+    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);
      
@@ -29,8 +37,10 @@
     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
+
     return 0;
 }