[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] +1 for sdl directx backend on windows (compiled latest pygame to find opengl fullscreen badness)



Thanks to Johnny Popplewell sharing his great work on building pygame
and me finally moving over to python 2.5, I was finally able to get a
usable pygame built from subversion sources (yay!)

I was surprised to find that with the latest, when I use a fullscreen
opengl display and it resizes my display, that when I try to toggle to
windowed mode, the display stays at the resized resolution, which
doesn't happen with pygame 1.7.1

using the archive of past sdl releases (and accompanying sources) here:
http://www.libsdl.org/release/
I was able to find that the bug starts happening with the sdl 1.2.9 to
sdl 1.2.10 changes - which evidently is when they changed the default
video backend to windib from directx. So it looks like the bug of
going out of fullscreen into windowed leaving your display resized
with an opengl display on windows XP is a problem in the SDL windib
video backend.

At the moment I'm using a 2 liner to workaround before calling pygame.init:
        if "SDL_VIDEODRIVER" not in os.environ:
            os.environ["SDL_VIDEODRIVER"] = "directx"
but Rene had mentioned possibly making pygame's default backend
directX in the next release - I'd support that

---
P.S. just in case some of this helps other people build pygame from
source on windows...

I built it with the toolkit compiler, which you can get from the
second link on this page:
http://npg.dl.ac.uk/MIDAS/download/midassort/midassort_Windows.html

I installed sdk stuff mentioned here, and I applied the distutils
patch from here:
http://www.vrplumber.com/programming/mstoolkit/

I used the prebuilt dependencies from here (with libpng13.lib renamed
to png.lib and libjpeg.lib to jpeg.lib), and used a modified batch
file to use correct paths on my system from here:
http://johnnypops.demon.co.uk/pygame/

Then I applied johnny popplewell's patch to transform.c here:
http://www.mail-archive.com/pygame-users@xxxxxxxx/msg04824.html

... and then python setup.py build would work. So I combined it's
output with the dll's from the prebuilts and it all worked.