Converted David Ludwig's D3D11 renderer to C and optimized it.
The D3D11 renderer is now slightly faster than D3D9 on my Windows 8 machine (testsprite2 runs at 3400 FPS vs 3100 FPS) This will need tweaking to fix the Windows RT build.
This commit is contained in:
1 parent
a8f540fe4a
commit
1a35f32b68
12 files changed
+1007
-816
No files matched your search
+6
-1
@@ -799,11 +799,12 @@ elseif(WINDOWS)
|
||||
endif()
|
||||
set(CMAKE_REQUIRED_FLAGS "/I\"$ENV{DXSDK_DIR}\\Include\"")
|
||||
check_include_file(d3d9.h HAVE_D3D_H)
|
||||
check_include_file(d3d11_1.h HAVE_D3D11_H)
|
||||
check_include_file(ddraw.h HAVE_DDRAW_H)
|
||||
check_include_file(dsound.h HAVE_DSOUND_H)
|
||||
check_include_file(dinput.h HAVE_DINPUT_H)
|
||||
check_include_file(xaudio2.h HAVE_XAUDIO2_H)
|
||||
if(HAVE_D3D_H OR HAVE_DDRAW_H OR HAVE_DSOUND_H OR HAVE_DINPUT_H OR HAVE_XAUDIO2_H)
|
||||
if(HAVE_D3D_H OR HAVE_D3D11_H OR HAVE_DDRAW_H OR HAVE_DSOUND_H OR HAVE_DINPUT_H OR HAVE_XAUDIO2_H)
|
||||
set(HAVE_DIRECTX TRUE)
|
||||
# TODO: change $ENV{DXSDL_DIR} to get the path from the include checks
|
||||
link_directories($ENV{DXSDK_DIR}\\lib\\${PROCESSOR_ARCH})
|
||||
@@ -844,6 +845,10 @@ elseif(WINDOWS)
|
||||
set(SDL_VIDEO_RENDER_D3D 1)
|
||||
set(HAVE_RENDER_D3D TRUE)
|
||||
endif()
|
||||
if(RENDER_D3D AND HAVE_D3D11_H)
|
||||
set(SDL_VIDEO_RENDER_D3D11 1)
|
||||
set(HAVE_RENDER_D3D TRUE)
|
||||
endif()
|
||||
set(HAVE_SDL_VIDEO TRUE)
|
||||
endif()
|
||||
|
||||
|
||||
Reference in new issue
Block a user