Hi,
On 15-07-13 04:09 AM, Jake b wrote:
cases.
I expect much of the code that defines extension classes will
be rewritten. Pygame extensions to SDL, such as custom blitters,
may be salvaged.
Much of the work will be writing code to support the new SDL 2.0
features.
There's also the problem of Texture vs Surfaces.
For future code to be backwards compatible we can default to Texture.
But if the user needs pixel access he will need to create a Texture
and Surface.
The 3 options are summarized: https://wiki.libsdl.org/MigrationGuide#Video
Actually, Pygame Surfaces would stay about the same. What would go are
such pixel format manipulations such as set_masks(). SDL2 has a strict
policy on valid formats.
Textures would be an addition. I see Textures as a limited form of
Surface. In fact, Textures and Surfaces could share a common parent class.
Also, SDL2 does support display surfaces and the flip and update
operations. They are tied to individual windows rather than being global
operations.
> I'm pretty sure it should be possible to make a version of pygame
that runs existing pygame code while exposing new features to new code
- allowing people to exploit much of their existing knowledge.
and
On Sun, Jul 12, 2015 at 8:48 PM, Lenard Lindstrom <le...@telus.net
<mailto:le...@telus.net>> wrote:
Hi Jake,
For the parts of SDL2 that did not see a major redesign, such as
Surfaces, there are enough small differences that simply replacing
SDL 1.2 calls with equivalent SDL 2.0 functions is not enough. The
event types SDL2 posts has undergone some reorganization. There is
no longer a clear mapping equivalence SDL 2.0 and 1.2 in some
Do you think we should
start pygame2 to support SDL2 design decisions rather than trying to
support both old and new code at once? I figured if there was a time
to make potentially breaking design changes to follow modern SDL, now
would be the time to do it.
If we decide pygame2 must be fully backward compatible, I was worried
it would limit future changes. Or that supporting both old with new is
adding too much complexity for something that might not be needed?
Pygame2 can never be fully backward compatible. SDL2 is more strict that
SDL 1.2 in some areas. Overlays and cd rom support are gone. Pygame2 can
support a large subset of Pygame1 though.
--
Jake