Mercurial > hg > Game > Cerium
comparison Renderer/test_render/viewerFB.cpp @ 283:15bfacccde99 draft
fix test_render
author | e065746@localhost.localdomain |
---|---|
date | Fri, 05 Jun 2009 16:49:12 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
282:ef6b225f6f40 | 283:15bfacccde99 |
---|---|
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 | |
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 ViewerFB::clean_pixels() | |
26 { | |
27 //bzero(pixels, sizeof(int)*width*height); | |
28 //memset(pixels, 0xFF, sizeof(int)*width*height); | |
29 } |