Mercurial > sdl-ios-xcode
comparison src/render/SDL_render.c @ 5231:710d00cb3a6a
Made it possible to disable the rendering subsystem with configure --disable-render
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 08 Feb 2011 10:04:09 -0800 |
parents | 2178ffe17222 |
children | b530ef003506 |
comparison
equal
deleted
inserted
replaced
5230:5d01d426f2ea | 5231:710d00cb3a6a |
---|---|
43 return retval; \ | 43 return retval; \ |
44 } | 44 } |
45 | 45 |
46 | 46 |
47 static const SDL_RenderDriver *render_drivers[] = { | 47 static const SDL_RenderDriver *render_drivers[] = { |
48 #if !SDL_RENDER_DISABLED | |
48 #if SDL_VIDEO_RENDER_D3D | 49 #if SDL_VIDEO_RENDER_D3D |
49 &D3D_RenderDriver, | 50 &D3D_RenderDriver, |
50 #endif | 51 #endif |
51 #if SDL_VIDEO_RENDER_OGL | 52 #if SDL_VIDEO_RENDER_OGL |
52 &GL_RenderDriver, | 53 &GL_RenderDriver, |
59 #endif | 60 #endif |
60 #if SDL_VIDEO_RENDER_DIRECTFB | 61 #if SDL_VIDEO_RENDER_DIRECTFB |
61 &DirectFB_RenderDriver, | 62 &DirectFB_RenderDriver, |
62 #endif | 63 #endif |
63 &SW_RenderDriver | 64 &SW_RenderDriver |
65 #endif /* !SDL_RENDER_DISABLED */ | |
64 }; | 66 }; |
65 static char renderer_magic; | 67 static char renderer_magic; |
66 static char texture_magic; | 68 static char texture_magic; |
67 | 69 |
68 int | 70 int |
168 } | 170 } |
169 | 171 |
170 SDL_Renderer * | 172 SDL_Renderer * |
171 SDL_CreateSoftwareRenderer(SDL_Surface * surface) | 173 SDL_CreateSoftwareRenderer(SDL_Surface * surface) |
172 { | 174 { |
175 #if !SDL_RENDER_DISABLED | |
173 return SW_CreateRendererForSurface(surface); | 176 return SW_CreateRendererForSurface(surface); |
177 #else | |
178 SDL_SetError("SDL not built with rendering support"); | |
179 return NULL; | |
180 #endif /* !SDL_RENDER_DISABLED */ | |
174 } | 181 } |
175 | 182 |
176 int | 183 int |
177 SDL_GetRendererInfo(SDL_Renderer * renderer, SDL_RendererInfo * info) | 184 SDL_GetRendererInfo(SDL_Renderer * renderer, SDL_RendererInfo * info) |
178 { | 185 { |