Mercurial > hg > Members > kono > Cerium
comparison Renderer/Engine/viewerFB.cc @ 748:b7376415fa5f
TaskManager changeset 683, Renderer changeset 746
author | hiroki |
---|---|
date | Mon, 25 Jan 2010 18:01:19 +0900 |
parents | 735f76483bb2 |
children | bed529c55eda |
comparison
equal
deleted
inserted
replaced
677:fd3492a767c7 | 748:b7376415fa5f |
---|---|
1 #include "viewerFB.h" | 1 #include "viewerFB.h" |
2 #include "Func.h" | |
3 #include "fb.h" | 2 #include "fb.h" |
4 | 3 |
4 #define default_sdl_flag SDL_INIT_TIMER | SDL_INIT_JOYSTICK | |
5 //extern void post2runLoop(void *); | 5 //extern void post2runLoop(void *); |
6 ViewerFB::ViewerFB() {} | |
7 ViewerFB::~ViewerFB() {} | |
6 | 8 |
7 void | 9 Uint32 * |
8 ViewerFB::video_init(TaskManager *manager) | 10 ViewerFB::video_init(TaskManager *manager, int bpp, int width, int height) |
9 { | 11 { |
10 Uint32 sdl_flag = default_sdl_flag | SDL_INIT_VIDEO; | 12 Uint32 sdl_flag = default_sdl_flag | SDL_INIT_VIDEO; |
11 | 13 |
12 if (SDL_Init(sdl_flag) < 0) { | 14 if (SDL_Init(sdl_flag) < 0) { |
13 fprintf(stderr,"Couldn't initialize SDL: %s\n",SDL_GetError()); | 15 fprintf(stderr,"Couldn't initialize SDL: %s\n",SDL_GetError()); |
14 exit(1); | 16 exit(1); |
15 } | 17 } |
16 | 18 |
17 pixels = (Uint32*)get_fbdev_addr(); | 19 Uint32 *pixels = (Uint32*)get_fbdev_addr(); |
18 | 20 |
19 if (pixels == 0) { | 21 if (pixels == 0) { |
20 pixels = (new Uint32[width*height*32/8]); | 22 pixels = (new Uint32[width*height*32/8]); |
21 } | 23 } |
24 | |
25 return pixels; | |
22 } | 26 } |
23 | 27 |
24 void | 28 void |
25 ViewerFB::clean_pixels() | 29 ViewerFB::clean_pixels() |
26 { | 30 { |
27 //bzero(pixels, sizeof(int)*width*height); | 31 //bzero(pixels, sizeof(int)*width*height); |
28 //memset(pixels, 0xFF, sizeof(int)*width*height); | 32 //memset(pixels, 0xFF, sizeof(int)*width*height); |
29 } | 33 } |
34 | |
35 void | |
36 ViewerFB::clear_screen() | |
37 { | |
38 } | |
39 | |
40 | |
41 void | |
42 ViewerFB::free_device() | |
43 { | |
44 } | |
45 | |
46 |