comparison TaskManager/Test/test_render/viewerFB.cpp @ 109:5c194c71eca8

Cerium cvs version
author gongo@gendarme.local
date Wed, 12 Nov 2008 17:39:33 +0900
parents
children 10ad99550ee8
comparison
equal deleted inserted replaced
108:6f3b3dd3c095 109:5c194c71eca8
1 #include "viewerFB.h"
2 #include "Func.h"
3 #include "fb.h"
4
5 extern void post2runLoop(void *);
6
7 void
8 ViewerFB::video_init(void)
9 {
10 Uint32 sdl_flag = default_sdl_flag | SDL_INIT_VIDEO;
11 //Uint32 sdl_flag = default_sdl_flag;
12
13 if (SDL_Init(sdl_flag) < 0) {
14 fprintf(stderr,"Couldn't initialize SDL: %s\n",SDL_GetError());
15 exit(1);
16 }
17
18 pixels = (Uint32*)get_fbdev_addr();
19
20 if (pixels == 0) {
21 pixels = (new Uint32[width*height*32/8]);
22 }
23 }
24
25 void
26 ViewerFB::clean_pixels()
27 {
28 //bzero(pixels, sizeof(int)*width*height);
29 }