Mercurial > hg > Members > kono > Cerium
view Renderer/Engine/viewerFB.cc @ 760:24a37fe8419a
first of all commit, not work Rendering/Test/create_task
author | hiroki |
---|---|
date | Thu, 04 Feb 2010 14:46:09 +0900 |
parents | b7376415fa5f |
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() { }