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

Re: [pygame] immediate mode not working?



The problem is that you need to tell SDL to process windows messages before your window can be used (any event getting function should do)

try this:
---------
import pygame
pygame.init()
screen = pygame.display.set_mode((400,300))
pygame.event.get()
screen.fill((255,255,255))
pygame.display.flip()
screen.fill((0,0,0))
pygame.display.flip()
---------

it worked in a command prompt console for me

On Tue, Jul 8, 2008 at 2:09 PM, Gabriel Hasbun <gastomaster@xxxxxxxxx> wrote:
sure:

C:\Documents and Settings\Gabriel>python
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygame
>>> pygame.init()
(6, 0)
>>> screen = pygame.display.set_mode((400, 300))
>>> whiteSquare = pygame.surface.Surface((50,50))
>>> whiteSquare.fill((255,0,0))
<rect(0, 0, 50, 50)>
>>> screen.blit(whiteSquare, (100,100))
<rect(100, 100, 50, 50)>
>>> pygame.display.flip()
>>>

As you can guess nothing happens on my pygame window, while using the MSDOS(the real) python.

--- On Tue, 7/8/08, Ian Mallett <geometrian@xxxxxxxxx> wrote:
From: Ian Mallett <geometrian@xxxxxxxxx>
Subject: Re: [pygame] immediate mode not working?
To: pygame-users@xxxxxxxx
Date: Tuesday, July 8, 2008, 1:16 PM


Could we see the code?
-I