Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Starting support for Direct3D render driver.
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jul 8, 2006
1 parent d980263 commit c16ff97
Show file tree
Hide file tree
Showing 9 changed files with 591 additions and 103 deletions.
25 changes: 19 additions & 6 deletions configure.in
Expand Up @@ -1861,12 +1861,6 @@ AC_HELP_STRING([--enable-stdio-redirect], [Redirect STDIO to files on Win32 [[de
if test x$enable_stdio_redirect != xyes; then
EXTRA_CFLAGS="$EXTRA_CFLAGS -DNO_STDIO_REDIRECT"
fi

if test x$enable_video = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_WIN32)
SOURCES="$SOURCES $srcdir/src/video/win32/*.c"
have_video=yes
fi
}

dnl Find the DirectX includes and libraries
Expand All @@ -1876,6 +1870,7 @@ CheckDIRECTX()
AC_HELP_STRING([--enable-directx], [use DirectX for Win32 audio/video [[default=yes]]]),
, enable_directx=yes)
if test x$enable_directx = xyes; then
AC_CHECK_HEADER(d3d9.h, have_d3d=yes)
AC_CHECK_HEADER(dsound.h, have_dsound=yes)
AC_CHECK_HEADER(dinput.h, use_dinput=yes)
fi
Expand Down Expand Up @@ -2298,6 +2293,24 @@ case "$host" in
CheckglSDL
CheckDIRECTX
CheckNASM
# Set up files for the video library
if test x$enable_video = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_WIN32)
SOURCES="$SOURCES $srcdir/src/video/win32/*.c"
have_video=yes
AC_ARG_ENABLE(render-gdi,
AC_HELP_STRING([--enable-render-gdi], [enable the GDI render driver [[default=yes]]]),
, enable_render_gdi=yes)
if test x$enable_render_gdi = xyes; then
AC_DEFINE(SDL_VIDEO_RENDER_GDI)
fi
AC_ARG_ENABLE(render-d3d,
AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[default=yes]]]),
, enable_render_d3d=yes)
if test x$enable_render_d3d = xyes -a x$have_d3d = xyes; then
AC_DEFINE(SDL_VIDEO_RENDER_D3D)
fi
fi
# Set up files for the audio library
if test x$enable_audio = xyes; then
AC_DEFINE(SDL_AUDIO_DRIVER_WAVEOUT)
Expand Down
4 changes: 4 additions & 0 deletions include/SDL_config.h.in
Expand Up @@ -291,6 +291,10 @@
#undef SDL_VIDEO_DRIVER_X11_XV
#undef SDL_VIDEO_DRIVER_XBIOS

#undef SDL_VIDEO_RENDER_D3D
#undef SDL_VIDEO_RENDER_GDI
#undef SDL_VIDEO_RENDER_OGL

/* Enable OpenGL support */
#undef SDL_VIDEO_OPENGL
#undef SDL_VIDEO_OPENGL_GLX
Expand Down
4 changes: 4 additions & 0 deletions include/SDL_config_win32.h
Expand Up @@ -153,10 +153,14 @@ typedef unsigned int uintptr_t;
#define SDL_VIDEO_DRIVER_DUMMY 1
#define SDL_VIDEO_DRIVER_WIN32 1

#define SDL_VIDEO_RENDER_D3D 1
#define SDL_VIDEO_RENDER_GDI 1

/* Enable OpenGL support */
#ifndef _WIN32_WCE
#define SDL_VIDEO_OPENGL 1
#define SDL_VIDEO_OPENGL_WGL 1
#define SDL_VIDEO_RENDER_OGL 1
#endif

/* Enable assembly routines (Win64 doesn't have inline asm) */
Expand Down

0 comments on commit c16ff97

Please sign in to comment.