Mercurial > hg > Members > kono > Cerium
comparison Renderer/Engine/viewerPS3.cc @ 988:0b6f8c82625a akira
fix for double buffer
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 02 Oct 2010 03:48:39 +0900 |
parents | e40dd2384357 |
children |
comparison
equal
deleted
inserted
replaced
987:5eb651827ae3 | 988:0b6f8c82625a |
---|---|
31 | 31 |
32 return info; | 32 return info; |
33 } | 33 } |
34 | 34 |
35 #else /* !defined(__linux__) */ | 35 #else /* !defined(__linux__) */ |
36 ScreenInfo get_fbdev_addr(void) { | 36 ScreenInfo |
37 ViewerPS3::get_fbdev_addr(void) { | |
37 ScreenInfo tmp = {0,0,0,0}; | 38 ScreenInfo tmp = {0,0,0,0}; |
38 return tmp; | 39 return tmp; |
39 } | 40 } |
40 #endif /* defined(__linux__) */ | 41 #endif /* defined(__linux__) */ |
41 | 42 |
81 { | 82 { |
82 // At the vsync, the previous frame is finished sending to the CRT | 83 // At the vsync, the previous frame is finished sending to the CRT |
83 // cp_fb_wait_vsync( &fb ); | 84 // cp_fb_wait_vsync( &fb ); |
84 | 85 |
85 // Send the frame just drawn to the CRT by the next vblank | 86 // Send the frame just drawn to the CRT by the next vblank |
87 #ifdef __linux__ | |
86 cp_fb_flip( &fb, frame_ndx ); | 88 cp_fb_flip( &fb, frame_ndx ); |
89 #endif | |
87 | 90 |
88 frame_ndx = frame_ndx ^ 0x01; | 91 frame_ndx = frame_ndx ^ 0x01; |
89 return (uint32_t*)fb.draw_addr[ frame_ndx ]; | 92 return (uint32_t*)fb.draw_addr[ frame_ndx ]; |
90 } | 93 } |
91 | 94 |
92 | 95 |
93 void | 96 void |
94 ViewerPS3::free_device() | 97 ViewerPS3::free_device() |
95 { | 98 { |
99 #ifdef __linux__ | |
96 cp_vt_close(&vt); | 100 cp_vt_close(&vt); |
97 cp_fb_close(&fb); | 101 cp_fb_close(&fb); |
102 #endif | |
98 } | 103 } |
99 | 104 |
100 /* end */ | 105 /* end */ |