Mercurial > hg > Members > kono > Cerium
view Renderer/Engine/viewerFB.cc @ 728:4f77768d7a7f
add Engine/ViewerDevice , SgRootChange not work
author | aaa |
---|---|
date | Sat, 19 Dec 2009 20:32:02 +0900 |
parents | 735f76483bb2 |
children | bed529c55eda |
line wrap: on
line source
#include "viewerFB.h" #include "fb.h" #define default_sdl_flag SDL_INIT_TIMER | SDL_INIT_JOYSTICK //extern void post2runLoop(void *); ViewerFB::ViewerFB() {} ViewerFB::~ViewerFB() {} Uint32 * ViewerFB::video_init(TaskManager *manager, int bpp, int width, int height) { Uint32 sdl_flag = default_sdl_flag | SDL_INIT_VIDEO; if (SDL_Init(sdl_flag) < 0) { fprintf(stderr,"Couldn't initialize SDL: %s\n",SDL_GetError()); exit(1); } Uint32 *pixels = (Uint32*)get_fbdev_addr(); if (pixels == 0) { pixels = (new Uint32[width*height*32/8]); } return pixels; } void ViewerFB::clean_pixels() { //bzero(pixels, sizeof(int)*width*height); //memset(pixels, 0xFF, sizeof(int)*width*height); } void ViewerFB::clear_screen() { } void ViewerFB::free_device() { }