Mercurial > hg > Members > kono > Cerium
comparison Renderer/Engine/viewerSDL.cc @ 895:bed529c55eda
add alignment of classes in SPU
width and height are automatically set in frame buffer API
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 16 Jul 2010 17:23:49 +0900 |
parents | 4f77768d7a7f |
children | df5185513c2d |
comparison
equal
deleted
inserted
replaced
894:bfc61d38c004 | 895:bed529c55eda |
---|---|
25 if (screen == NULL) { | 25 if (screen == NULL) { |
26 fprintf(stderr, "Couldn't set GL mode: %s\n", SDL_GetError()); | 26 fprintf(stderr, "Couldn't set GL mode: %s\n", SDL_GetError()); |
27 SDL_Quit(); | 27 SDL_Quit(); |
28 exit(1); | 28 exit(1); |
29 } | 29 } |
30 this->width = screen->w; | |
31 this->height = screen->h; | |
32 this->bpp = screen->format->BitsPerPixel; | |
30 | 33 |
31 p = (Uint32*)manager->allocate(screen->pitch*height); | 34 p = (Uint32*)manager->allocate(screen->pitch*height); |
32 bitmap = SDL_CreateRGBSurfaceFrom((void *)p, | 35 bitmap = SDL_CreateRGBSurfaceFrom((void *)p, |
33 screen->w, screen->h, | 36 screen->w, screen->h, |
34 screen->format->BitsPerPixel, | 37 screen->format->BitsPerPixel, |