I recently managed to get pysdl2 (0.9.3) working on a Windows 8.1 (64-bit) machine (along with the extension modules gfx, mixer, ttf and image). Everything worked fine, including all demos in pysdl2's example folder.
However, when I try to run the same code with the same SDL2 DLL versions on Windows 7 (64-bit), I get the error message:
sdl2.ext.common.SDLrror: 'directx not available'
After calling
sdl2.ext.init()
I tried installing the Directx End User Runtimes (June 2010) and even the complete SDK, but to no avail. I also tried changing the SDL_VIDEODRIVER environment variable to something else than directx, but this does not work either (apparently 'windib' is not available as an option anymore in SDL2).
I know SDL2 is probably looking for Directx 9, which has been completely replaced by Directx 11 nowadays, but after installing the end user runtimes, my system should have Directx 9 at its disposal again. In addition, if this was the cause of the problem, then it also shouldn't have worked on Windows 8.1, since this OS is even newer and is even less likely to carry DX9?
EDIT: On a sidenote, pygame (which uses the older SDL 1.2 libraries) is able to find directx as
pygame.display.get_driver()
outputs:
'directx'
so there must be something wrong with the internal configuration of the SDL2 libraries.
D3DX9and it's kin. See Not So Direct Setupval = sdl2.video.SDL_GetNumVideoDrivers(); for i in range(val): print(sdl2.video.SDL_GetVideoDriver(i))