Mercurial > hg > Members > kono > Cerium
comparison TaskManager/Test/simple_render/viewer.cpp @ 67:7d2874fb0671
*** empty log message ***
author | gongo |
---|---|
date | Sun, 17 Feb 2008 19:04:29 +0900 |
parents | 54355e641172 |
children | 178459e03f5c |
comparison
equal
deleted
inserted
replaced
66:1034077dd217 | 67:7d2874fb0671 |
---|---|
25 } | 25 } |
26 | 26 |
27 | 27 |
28 void Viewer::sdl_init() | 28 void Viewer::sdl_init() |
29 { | 29 { |
30 if( SDL_Init( SDL_INIT_VIDEO ) < 0 ) | 30 if (SDL_Init( SDL_INIT_VIDEO ) < 0) { |
31 { | |
32 fprintf(stderr,"Couldn't initialize SDL: %s\n",SDL_GetError()); | 31 fprintf(stderr,"Couldn't initialize SDL: %s\n",SDL_GetError()); |
33 exit( 1 ); | 32 exit( 1 ); |
34 } | 33 } |
35 screen = SDL_SetVideoMode( width, height, bpp, SDL_HWSURFACE ); | 34 |
35 screen = SDL_SetVideoMode( width, height, bpp, SDL_HWSURFACE); | |
36 if (screen == NULL) { | |
37 fprintf(stderr, "Couldn't set GL mode: %s\n", SDL_GetError()); | |
38 SDL_Quit(); | |
39 exit(1); | |
40 } | |
36 } | 41 } |
37 | 42 |
38 | 43 |
39 int Viewer::get_ticks() | 44 int Viewer::get_ticks() |
40 { | 45 { |
317 task_create_pp = manager->create_task(fd_create_pp, | 322 task_create_pp = manager->create_task(fd_create_pp, |
318 sizeof(SceneGraphPack), | 323 sizeof(SceneGraphPack), |
319 sgp_buff, pp_buff, NULL); | 324 sgp_buff, pp_buff, NULL); |
320 task = manager->create_task(fd, 0, 0, 0, NULL); | 325 task = manager->create_task(fd, 0, 0, 0, NULL); |
321 | 326 |
322 //manager->set_task_depend(task_update_sgp, task); | |
323 //manager->set_task_depend(task_create_pp, task); | |
324 task->set_depend(task_update_sgp); | 327 task->set_depend(task_update_sgp); |
325 task->set_depend(task_create_pp); | 328 task->set_depend(task_create_pp); |
326 | 329 |
327 //manager->spawn_task(task_update_sgp); | |
328 //manager->spawn_task(task_create_pp); | |
329 //manager->spawn_task(task); | |
330 task_update_sgp->spawn(); | 330 task_update_sgp->spawn(); |
331 task_create_pp->spawn(); | 331 task_create_pp->spawn(); |
332 task->spawn(); | 332 task->spawn(); |
333 | 333 |
334 sgp_buff->swap_buffer(); | 334 sgp_buff->swap_buffer(); |