Mercurial > sdl-ios-xcode
comparison src/video/dc/SDL_dcvideo.c @ 1658:e49147870aac SDL-1.3
glSDL support
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 01 May 2006 06:58:33 +0000 |
parents | 11134dc42da8 |
children | 782fd950bd46 |
comparison
equal
deleted
inserted
replaced
1657:5b0805ceb50f | 1658:e49147870aac |
---|---|
165 switch(format->BitsPerPixel) { | 165 switch(format->BitsPerPixel) { |
166 case 15: | 166 case 15: |
167 case 16: | 167 case 16: |
168 return &vid_modes; | 168 return &vid_modes; |
169 case 32: | 169 case 32: |
170 if (!(flags & SDL_OPENGL)) | 170 if (!(flags & SDL_INTERNALOPENGL)) |
171 return &vid_modes; | 171 return &vid_modes; |
172 default: | 172 default: |
173 return NULL; | 173 return NULL; |
174 } | 174 } |
175 // return (SDL_Rect **) -1; | 175 // return (SDL_Rect **) -1; |
218 case 32: pixel_mode = PM_RGB888; pitch = width*4; | 218 case 32: pixel_mode = PM_RGB888; pitch = width*4; |
219 Rmask = 0x00ff0000; | 219 Rmask = 0x00ff0000; |
220 Gmask = 0x0000ff00; | 220 Gmask = 0x0000ff00; |
221 Bmask = 0x000000ff; | 221 Bmask = 0x000000ff; |
222 #if SDL_VIDEO_OPENGL | 222 #if SDL_VIDEO_OPENGL |
223 if (!(flags & SDL_OPENGL)) | 223 if (!(flags & SDL_INTERNALOPENGL)) |
224 #endif | 224 #endif |
225 break; | 225 break; |
226 default: | 226 default: |
227 SDL_SetError("Couldn't find requested mode in list"); | 227 SDL_SetError("Couldn't find requested mode in list"); |
228 return(NULL); | 228 return(NULL); |
250 vid_set_mode(disp_mode,pixel_mode); | 250 vid_set_mode(disp_mode,pixel_mode); |
251 | 251 |
252 current->pixels = vram_s; | 252 current->pixels = vram_s; |
253 | 253 |
254 #if SDL_VIDEO_OPENGL | 254 #if SDL_VIDEO_OPENGL |
255 if (flags & SDL_OPENGL) { | 255 if (flags & SDL_INTERNALOPENGL) { |
256 this->gl_config.driver_loaded = 1; | 256 this->gl_config.driver_loaded = 1; |
257 current->flags = SDL_FULLSCREEN | SDL_OPENGL; | 257 current->flags = SDL_FULLSCREEN | SDL_INTERNALOPENGL; |
258 current->pixels = NULL; | 258 current->pixels = NULL; |
259 pvr_inited = 1; | 259 pvr_inited = 1; |
260 pvr_init(¶ms); | 260 pvr_init(¶ms); |
261 glKosInit(); | 261 glKosInit(); |
262 glKosBeginFrame(); | 262 glKosBeginFrame(); |