Mercurial > hg > Members > kono > Cerium
comparison Renderer/Engine/sgchangeFB.cc @ 692:50750b118116
add sgchangeFB,SDL
author | hiroki@localhost.localdomain |
---|---|
date | Tue, 08 Dec 2009 16:52:04 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
691:9d1bcc07734b | 692:50750b118116 |
---|---|
1 #include "sgchangeFB.h" | |
2 #include "Func.h" | |
3 #include "fb.h" | |
4 | |
5 //extern void post2runLoop(void *); | |
6 | |
7 void | |
8 SgChangeFB::video_init(TaskManager *manager) | |
9 { | |
10 Uint32 sdl_flag = default_sdl_flag | SDL_INIT_VIDEO; | |
11 | |
12 if (SDL_Init(sdl_flag) < 0) { | |
13 fprintf(stderr,"Couldn't initialize SDL: %s\n",SDL_GetError()); | |
14 exit(1); | |
15 } | |
16 | |
17 pixels = (Uint32*)get_fbdev_addr(); | |
18 | |
19 if (pixels == 0) { | |
20 pixels = (new Uint32[width*height*32/8]); | |
21 } | |
22 } | |
23 | |
24 void | |
25 SgChangeFB::clean_pixels() | |
26 { | |
27 //bzero(pixels, sizeof(int)*width*height); | |
28 //memset(pixels, 0xFF, sizeof(int)*width*height); | |
29 } |