Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Made it possible to disable the rendering subsystem with configure --…

…disable-render
  • Loading branch information
slouken committed Feb 8, 2011
1 parent 7c0c1e8 commit b0d2e83910f24019530116846a3df489742fc1dd
@@ -362,6 +362,12 @@ AC_HELP_STRING([--enable-video], [Enable the video subsystem [[default=yes]]]),
if test x$enable_video != xyes; then
AC_DEFINE(SDL_VIDEO_DISABLED)
fi
AC_ARG_ENABLE(render,
AC_HELP_STRING([--enable-render], [Enable the render subsystem [[default=yes]]]),
, enable_render=yes)
if test x$enable_render != xyes; then
AC_DEFINE(SDL_RENDER_DISABLED)
fi
AC_ARG_ENABLE(events,
AC_HELP_STRING([--enable-events], [Enable the events subsystem [[default=yes]]]),
, enable_events=yes)
@@ -179,6 +179,7 @@
#undef SDL_JOYSTICK_DISABLED
#undef SDL_HAPTIC_DISABLED
#undef SDL_LOADSO_DISABLED
#undef SDL_RENDER_DISABLED
#undef SDL_THREADS_DISABLED
#undef SDL_TIMERS_DISABLED
#undef SDL_VIDEO_DISABLED
@@ -45,6 +45,7 @@


static const SDL_RenderDriver *render_drivers[] = {
#if !SDL_RENDER_DISABLED
#if SDL_VIDEO_RENDER_D3D
&D3D_RenderDriver,
#endif
@@ -61,6 +62,7 @@ static const SDL_RenderDriver *render_drivers[] = {
&DirectFB_RenderDriver,
#endif
&SW_RenderDriver
#endif /* !SDL_RENDER_DISABLED */
};
static char renderer_magic;
static char texture_magic;
@@ -170,7 +172,12 @@ SDL_CreateRenderer(SDL_Window * window, int index, Uint32 flags)
SDL_Renderer *
SDL_CreateSoftwareRenderer(SDL_Surface * surface)
{
#if !SDL_RENDER_DISABLED
return SW_CreateRendererForSurface(surface);
#else
SDL_SetError("SDL not built with rendering support");
return NULL;
#endif /* !SDL_RENDER_DISABLED */
}

int
@@ -119,6 +119,8 @@ struct SDL_RenderDriver
SDL_RendererInfo info;
};

#if !SDL_RENDER_DISABLED

#if SDL_VIDEO_RENDER_D3D
extern SDL_RenderDriver D3D_RenderDriver;
#endif
@@ -136,6 +138,8 @@ extern SDL_RenderDriver DirectFB_RenderDriver;
#endif
extern SDL_RenderDriver SW_RenderDriver;

#endif /* !SDL_RENDER_DISABLED */

#endif /* _SDL_sysrender_h */

/* vi: set ts=4 sw=4 expandtab: */
@@ -21,7 +21,8 @@
*/
#include "SDL_config.h"

#if SDL_VIDEO_RENDER_D3D
#if SDL_VIDEO_RENDER_D3D && !SDL_RENDER_DISABLED


#include "../../core/windows/SDL_windows.h"

@@ -1066,6 +1067,6 @@ D3D_DestroyRenderer(SDL_Renderer * renderer)
SDL_free(renderer);
}

#endif /* SDL_VIDEO_RENDER_D3D */
#endif /* SDL_VIDEO_RENDER_D3D && !SDL_RENDER_DISABLED */

/* vi: set ts=4 sw=4 expandtab: */
@@ -21,7 +21,7 @@
*/
#include "SDL_config.h"

#if SDL_VIDEO_RENDER_OGL
#if SDL_VIDEO_RENDER_OGL && !SDL_RENDER_DISABLED

#include "SDL_opengl.h"
#include "../SDL_sysrender.h"
@@ -841,6 +841,6 @@ GL_DestroyRenderer(SDL_Renderer * renderer)
SDL_free(renderer);
}

#endif /* SDL_VIDEO_RENDER_OGL */
#endif /* SDL_VIDEO_RENDER_OGL && !SDL_RENDER_DISABLED */

/* vi: set ts=4 sw=4 expandtab: */
@@ -21,7 +21,7 @@
*/
#include "SDL_config.h"

#if SDL_VIDEO_RENDER_OGL_ES
#if SDL_VIDEO_RENDER_OGL_ES && !SDL_RENDER_DISABLED

#include "SDL_opengles.h"
#include "../SDL_sysrender.h"
@@ -728,6 +728,6 @@ GLES_DestroyRenderer(SDL_Renderer * renderer)
SDL_free(renderer);
}

#endif /* SDL_VIDEO_RENDER_OGL_ES */
#endif /* SDL_VIDEO_RENDER_OGL_ES && !SDL_RENDER_DISABLED */

/* vi: set ts=4 sw=4 expandtab: */
@@ -23,7 +23,7 @@

#include "SDL_config.h"

#if SDL_VIDEO_RENDER_OGL_ES2
#if SDL_VIDEO_RENDER_OGL_ES2 && !SDL_RENDER_DISABLED

#include "SDL_opengles2.h"
#include "../SDL_sysrender.h"
@@ -1201,6 +1201,6 @@ GLES2_CreateRenderer(SDL_Window *window, Uint32 flags)
return renderer;
}

#endif /* SDL_VIDEO_RENDER_OGL_ES2 */
#endif /* SDL_VIDEO_RENDER_OGL_ES2 && !SDL_RENDER_DISABLED */

/* vi: set ts=4 sw=4 expandtab: */
@@ -23,7 +23,7 @@

#include "SDL_config.h"

#if SDL_VIDEO_RENDER_OGL_ES2
#if SDL_VIDEO_RENDER_OGL_ES2 && !SDL_RENDER_DISABLED

#include "SDL_video.h"
#include "SDL_opengles2.h"
@@ -539,6 +539,6 @@ const GLES2_Shader *GLES2_GetShader(GLES2_ShaderType type, SDL_BlendMode blendMo
}
}

#endif /* SDL_VIDEO_RENDER_OGL_ES2 */
#endif /* SDL_VIDEO_RENDER_OGL_ES2 && !SDL_RENDER_DISABLED */

/* vi: set ts=4 sw=4 expandtab: */
@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"

#if !SDL_RENDER_DISABLED

#include "SDL_draw.h"
#include "SDL_blendfillrect.h"

@@ -345,4 +347,6 @@ SDL_BlendFillRects(SDL_Surface * dst, const SDL_Rect ** rects, int count,
return status;
}

#endif /* !SDL_RENDER_DISABLED */

/* vi: set ts=4 sw=4 expandtab: */
@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"

#if !SDL_RENDER_DISABLED

#include "SDL_draw.h"
#include "SDL_blendline.h"
#include "SDL_blendpoint.h"
@@ -779,4 +781,6 @@ SDL_BlendLines(SDL_Surface * dst, const SDL_Point * points, int count,
return 0;
}

#endif /* !SDL_RENDER_DISABLED */

/* vi: set ts=4 sw=4 expandtab: */
@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"

#if !SDL_RENDER_DISABLED

#include "SDL_draw.h"
#include "SDL_blendpoint.h"

@@ -343,4 +345,6 @@ SDL_BlendPoints(SDL_Surface * dst, const SDL_Point * points, int count,
return status;
}

#endif /* !SDL_RENDER_DISABLED */

/* vi: set ts=4 sw=4 expandtab: */
@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"

#if !SDL_RENDER_DISABLED

#include "SDL_draw.h"
#include "SDL_drawline.h"
#include "SDL_drawpoint.h"
@@ -208,4 +210,6 @@ SDL_DrawLines(SDL_Surface * dst, const SDL_Point * points, int count,
return 0;
}

#endif /* !SDL_RENDER_DISABLED */

/* vi: set ts=4 sw=4 expandtab: */
@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"

#if !SDL_RENDER_DISABLED

#include "SDL_draw.h"
#include "SDL_drawpoint.h"

@@ -114,4 +116,6 @@ SDL_DrawPoints(SDL_Surface * dst, const SDL_Point * points, int count,
return 0;
}

#endif /* !SDL_RENDER_DISABLED */

/* vi: set ts=4 sw=4 expandtab: */
@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"

#if !SDL_RENDER_DISABLED

#include "../SDL_sysrender.h"
#include "../../video/SDL_pixels_c.h"

@@ -428,4 +430,6 @@ SW_DestroyRenderer(SDL_Renderer * renderer)
SDL_free(renderer);
}

#endif /* !SDL_RENDER_DISABLED */

/* vi: set ts=4 sw=4 expandtab: */

0 comments on commit b0d2e83

Please sign in to comment.