Mercurial > hg > Game > Cerium
comparison TaskManager/Test/test_render/SceneGraph.cpp @ 149:f85ad3769897 draft
SceneGraph.cpp での texture_list fix
author | gongo@charles.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Tue, 02 Dec 2008 18:58:08 +0900 |
parents | 74341c8bf935 |
children | 3f467ad8c40d |
comparison
equal
deleted
inserted
replaced
148:74341c8bf935 | 149:f85ad3769897 |
---|---|
321 if (converted != NULL) { | 321 if (converted != NULL) { |
322 SDL_FreeSurface(texture_image); | 322 SDL_FreeSurface(texture_image); |
323 texture_image = converted; | 323 texture_image = converted; |
324 } | 324 } |
325 | 325 |
326 list[id_count-1].t_w = texture_image->w; | |
327 list[id_count-1].t_h = texture_image->h; | |
328 list[id_count-1].pixels = (Uint32*)texture_image->pixels; | |
329 | |
330 uint32 *tex_dest = (uint32*)manager->malloc(texture_image->w*texture_image->h*4); | 326 uint32 *tex_dest = (uint32*)manager->malloc(texture_image->w*texture_image->h*4); |
331 | 327 |
332 { | 328 { |
333 int t = 0; | 329 int t = 0; |
334 int tex_width = texture_image->w; | 330 int tex_width = texture_image->w; |
344 } | 340 } |
345 } | 341 } |
346 } | 342 } |
347 } | 343 } |
348 | 344 |
345 list[id_count-1].t_w = texture_image->w; | |
346 list[id_count-1].t_h = texture_image->h; | |
347 list[id_count-1].pixels_orig = (Uint32*)texture_image->pixels; | |
348 list[id_count-1].pixels = tex_dest; | |
349 | |
349 texture_id = id_count-1; | 350 texture_id = id_count-1; |
350 texture_info.t_w = texture_image->w; | 351 texture_info.t_w = texture_image->w; |
351 texture_info.t_h = texture_image->h; | 352 texture_info.t_h = texture_image->h; |
352 texture_info.pixels_orig = (Uint32*)texture_image->pixels; | 353 texture_info.pixels_orig = (Uint32*)texture_image->pixels; |
353 texture_info.pixels = tex_dest; | 354 texture_info.pixels = tex_dest; |
354 printf("%p\n", tex_dest); | 355 printf("%d %d\n", texture_image->w, texture_image->h); |
355 //load_texture(image_name); | 356 //load_texture(image_name); |
356 if(unlink(image_name)) | 357 if(unlink(image_name)) |
357 { | 358 { |
358 cout << "unlink error\n"; | 359 cout << "unlink error\n"; |
359 } | 360 } |