[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] Re: pygame + pyopengl



On Sun, Apr 08, 2001 at 11:17:14AM -0700, Kevin Turner wrote:
> You know, I thought that maybe I should be trying that swap buffers
> call.  But then I thought, well, let's get the single-buffer case
> working before we do double-buffers...  But you say that's the ticket,
> 'eh?  And this without doing SetAttribute SDL_GL_DOUBLEBUFFER in
> testgl1?  I'm a little confused about that...  I did try calling
> display.update (which calls SDL_GL_UpdateRects inside SDL), and that
> didn't seem to bring me any cheer.

I've had a poke about the SDL source and see that SDL_GL_SetAttributes just
sets up values in the video->gl_config structure.  SDL_SetVideoMode has to be
called aftewards to actually use those values.

Now, SDL_VideoInit defaults video->gl_config.double_buffer to be 1
(look in video/SDL_video.c).  Presumably this is because people 
usually need double buffering, so SDL defaults to it.

Pete, putting the flip in pygame.display.flip does sound cool.  Perhaps SDL
would be more the place to do this though?  The GL stuff seems to be
deliberately separate in SDL, perhaps it's just historical accident.

Anyway, I look forward to lots of funky 3D games with pygame 1.1!

Francis

-- 
Home: francis@flourish.org  Web: www.flourish.org
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org