Mercurial > hg > Members > kono > Cerium
diff Renderer/Engine/viewerSDL.cc @ 996:78ebcdaae8bc
add sdl_test file
author | yutaka@charles.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Mon, 11 Oct 2010 18:56:51 +0900 |
parents | 33616b2789de |
children | 625be5ca53ab |
line wrap: on
line diff
--- a/Renderer/Engine/viewerSDL.cc Mon Oct 11 14:22:09 2010 +0900 +++ b/Renderer/Engine/viewerSDL.cc Mon Oct 11 18:56:51 2010 +0900 @@ -65,12 +65,13 @@ exit(1); } - screen = SDL_SetVideoMode(width, height, bpp, SDL_SWSURFACE); + screen = SDL_SetVideoMode(width, height, bpp, SDL_HWSURFACE); if (screen == NULL) { fprintf(stderr, "Couldn't set SDL mode: %s\n", SDL_GetError()); SDL_Quit(); exit(1); } + this->width = screen->w; this->height = screen->h; this->bpp = screen->format->BitsPerPixel; @@ -84,6 +85,7 @@ ViewerSDL::clean_pixels() { //bzero(pixels, sizeof(int)*width*height); + //SDL_FillRect(screen,NULL,SDL_MapRGB(screen->format,0,0,0)); }