René Dudfield | 13 Aug 10:37 2013
Picon

SDL 2.0

Happy days...


SDL 2.0 is released!

http://lists.libsdl.org/pipermail/sdl-libsdl.org/2013-August/089854.html

"""

These are the most important new features in SDL 2.0: - Full 3D hardware acceleration - Support for OpenGL 3.0+ in various profiles (core, compatibility, debug, robust, etc) - Support for OpenGL ES - Support for multiple windows - Support for multiple displays - Support for multiple audio devices - Android and iOS support - Simple 2D rendering API that can use Direct3D, OpenGL, OpenGL ES, or software rendering behind the scenes - Force Feedback available on Windows, Mac OS X and Linux - XInput and XAudio2 support for Windows - Atomic operations - Power management (exposes battery life remaining, etc) - Shaped windows - 32-bit audio (int and float) - Simplified Game Controller API (the Joystick API is still here, too!) - Touch support (multitouch, gestures, etc) - Better fullscreen support - Better keyboard support (scancodes vs keycodes, etc). - Message boxes - Clipboard support - Basic Drag'n'Drop support - Proper unicode input and IME support - A really powerful assert macro - Lots of old annoyances from 1.2 are gone - Many other things! """
Andrew Barlow | 13 Aug 10:47 2013
Picon

Re: SDL 2.0

Awesome! I hope we end up with a nice wrapper around previous pygame code so I don't have to rewrite everything!

I'd even pay good money for that!

On 13 August 2013 09:37, René Dudfield <renesd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Happy days...


SDL 2.0 is released!

http://lists.libsdl.org/pipermail/sdl-libsdl.org/2013-August/089854.html

"""
These are the most important new features in SDL 2.0: - Full 3D hardware acceleration - Support for OpenGL 3.0+ in various profiles (core, compatibility, debug, robust, etc) - Support for OpenGL ES - Support for multiple windows - Support for multiple displays - Support for multiple audio devices - Android and iOS support - Simple 2D rendering API that can use Direct3D, OpenGL, OpenGL ES, or software rendering behind the scenes - Force Feedback available on Windows, Mac OS X and Linux - XInput and XAudio2 support for Windows - Atomic operations - Power management (exposes battery life remaining, etc) - Shaped windows - 32-bit audio (int and float) - Simplified Game Controller API (the Joystick API is still here, too!) - Touch support (multitouch, gestures, etc) - Better fullscreen support - Better keyboard support (scancodes vs keycodes, etc). - Message boxes - Clipboard support - Basic Drag'n'Drop support - Proper unicode input and IME support - A really powerful assert macro - Lots of old annoyances from 1.2 are gone - Many other things! """

René Dudfield | 13 Aug 13:38 2013
Picon

Re: SDL 2.0

Hi,

Note: there are the pysdl2 wrappers here:
    http://pysdl2.readthedocs.org/en/latest/ 

There is also a guide "pysdl2 for pygamers" which shows which API calls in pygame map to which calls in pysdl2. 
    http://pysdl2.readthedocs.org/en/latest/tutorial/pygamers.html

I'd like to make a pygame compatible API layered on top of that work (however, maybe someone has started that already)... But that would take at least a whole month of full time hacking to complete.  Someone could probably hack together a prototype in a week which would run many current pygame games though (PyWeek project?!?).  I'm currently aiming to take a month or two off around September to complete this and the new website.

cu.



On Tue, Aug 13, 2013 at 10:47 AM, Andrew Barlow <andrew.barlow-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Awesome! I hope we end up with a nice wrapper around previous pygame code so I don't have to rewrite everything!

I'd even pay good money for that!


On 13 August 2013 09:37, René Dudfield <renesd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Happy days...


SDL 2.0 is released!

http://lists.libsdl.org/pipermail/sdl-libsdl.org/2013-August/089854.html

"""
These are the most important new features in SDL 2.0: - Full 3D hardware acceleration - Support for OpenGL 3.0+ in various profiles (core, compatibility, debug, robust, etc) - Support for OpenGL ES - Support for multiple windows - Support for multiple displays - Support for multiple audio devices - Android and iOS support - Simple 2D rendering API that can use Direct3D, OpenGL, OpenGL ES, or software rendering behind the scenes - Force Feedback available on Windows, Mac OS X and Linux - XInput and XAudio2 support for Windows - Atomic operations - Power management (exposes battery life remaining, etc) - Shaped windows - 32-bit audio (int and float) - Simplified Game Controller API (the Joystick API is still here, too!) - Touch support (multitouch, gestures, etc) - Better fullscreen support - Better keyboard support (scancodes vs keycodes, etc). - Message boxes - Clipboard support - Basic Drag'n'Drop support - Proper unicode input and IME support - A really powerful assert macro - Lots of old annoyances from 1.2 are gone - Many other things! """


Keith Nemitz | 13 Aug 14:09 2013
Picon

Re: SDL 2.0


Is there a way to create iOS games with pysdl2 ?  Would Cython be a path?




From: René Dudfield <renesd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pygame-users-eePT7DaMpNY@public.gmane.org
Sent: Tuesday, August 13, 2013 4:38 AM
Subject: Re: [pygame] SDL 2.0

Hi,

Note: there are the pysdl2 wrappers here:
    http://pysdl2.readthedocs.org/en/latest/ 

There is also a guide "pysdl2 for pygamers" which shows which API calls in pygame map to which calls in pysdl2. 
    http://pysdl2.readthedocs.org/en/latest/tutorial/pygamers.html

I'd like to make a pygame compatible API layered on top of that work (however, maybe someone has started that already)... But that would take at least a whole month of full time hacking to complete.  Someone could probably hack together a prototype in a week which would run many current pygame games though (PyWeek project?!?).  I'm currently aiming to take a month or two off around September to complete this and the new website.

cu.



On Tue, Aug 13, 2013 at 10:47 AM, Andrew Barlow <andrew.barlow-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Awesome! I hope we end up with a nice wrapper around previous pygame code so I don't have to rewrite everything!

I'd even pay good money for that!


On 13 August 2013 09:37, René Dudfield <renesd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Happy days...


SDL 2.0 is released!

http://lists.libsdl.org/pipermail/sdl-libsdl.org/2013-August/089854.html

"""
These are the most important new features in SDL 2.0: - Full 3D hardware acceleration - Support for OpenGL 3.0+ in various profiles (core, compatibility, debug, robust, etc) - Support for OpenGL ES - Support for multiple windows - Support for multiple displays - Support for multiple audio devices - Android and iOS support - Simple 2D rendering API that can use Direct3D, OpenGL, OpenGL ES, or software rendering behind the scenes - Force Feedback available on Windows, Mac OS X and Linux - XInput and XAudio2 support for Windows - Atomic operations - Power management (exposes battery life remaining, etc) - Shaped windows - 32-bit audio (int and float) - Simplified Game Controller API (the Joystick API is still here, too!) - Touch support (multitouch, gestures, etc) - Better fullscreen support - Better keyboard support (scancodes vs keycodes, etc). - Message boxes - Clipboard support - Basic Drag'n'Drop support - Proper unicode input and IME support - A really powerful assert macro - Lots of old annoyances from 1.2 are gone - Many other things! """




René Dudfield | 13 Aug 16:18 2013
Picon

Re: SDL 2.0

On Tue, Aug 13, 2013 at 2:09 PM, Keith Nemitz <musenik-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:


Is there a way to create iOS games with pysdl2 ?  Would Cython be a path?


Hello,

Using ctypes and pysdl2 should be possible with some work, but I'm not 100% certain.

Python and ctypes on iOS can work, but would require some extra code.  Instead of using the ctypes FFI load library call, it gets the function pointers from the statically compiled executable.  So this would be a small python c extension module exposing all of the SDL functions.  Generating this small module could be mostly automated I think.  Then the rest of ctypes can be used for memory structures etc.  iOS does not allow dynamically loading, so everything needs to be compiled in statically (SDL2, python etc).

That may pass the Apple review, and only require a small amount of code (mostly automated) which can replace the ctypes FFI loading.  The rest of pysdl2 could be reused.

There are a number of python on iOS ports around... and I got it running myself a few years ago.

Using cython would be another way.  But of course would be a separate code base.

I'd probably attempt the ctypes+FFI replacement module instead of the cython path.



all the best,
ninmonkeys | 18 Aug 02:56 2013
Picon

Re: SDL 2.0

I did see in the wiki for porting, a method to use the read-access of surface, yet copies into an existing texture. Meaning you don't do the slow createTextureFromSurface() every frame. 

I'd paste it but I can't on my phone. 
--
Monkey

On Aug 13, 2013, at 1:47 AM, Andrew Barlow <andrew.barlow <at> gmail.com> wrote:

Awesome! I hope we end up with a nice wrapper around previous pygame code so I don't have to rewrite everything!

I'd even pay good money for that!

On 13 August 2013 09:37, René Dudfield <renesd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Happy days...


SDL 2.0 is released!

http://lists.libsdl.org/pipermail/sdl-libsdl.org/2013-August/089854.html

"""
These are the most important new features in SDL 2.0: - Full 3D hardware acceleration - Support for OpenGL 3.0+ in various profiles (core, compatibility, debug, robust, etc) - Support for OpenGL ES - Support for multiple windows - Support for multiple displays - Support for multiple audio devices - Android and iOS support - Simple 2D rendering API that can use Direct3D, OpenGL, OpenGL ES, or software rendering behind the scenes - Force Feedback available on Windows, Mac OS X and Linux - XInput and XAudio2 support for Windows - Atomic operations - Power management (exposes battery life remaining, etc) - Shaped windows - 32-bit audio (int and float) - Simplified Game Controller API (the Joystick API is still here, too!) - Touch support (multitouch, gestures, etc) - Better fullscreen support - Better keyboard support (scancodes vs keycodes, etc). - Message boxes - Clipboard support - Basic Drag'n'Drop support - Proper unicode input and IME support - A really powerful assert macro - Lots of old annoyances from 1.2 are gone - Many other things! """

Russell Jones | 19 Sep 15:46 2013
Picon

Re: SDL 2.0

Which wiki? SDL2, PySDL2 or Pygame?

Just playing, but here are (probably suboptimal, even ignoring the
naive algorithm) Pygame and PySDL2 examples of Conway's life. They
require a recent numpy. I'd be interested to hear about better
approaches. I'd like to get my head around using OpenGL "shader"
threads to do it even more quickly in parallel, but that looks
annoyingly fiddly. Maybe writing versions using the multiprocessing
module would be a first step, I don't think I'd have any trouble with
that.

#life.py

import pygame
import numpy as np
from pygame.color import Color
from scipy.ndimage.filters import generic_filter

pygame.init()
window_size = width, height = (400, 400)
background = Color(0, 0, 0, 128) #colour. alpha, red, green and blue.
foreground = Color(0, 210, 0, 0) #colour. alpha, red, green and blue.
bg=int(background)
fg=int(foreground)

screen = pygame.display.set_mode(window_size)
surfarray=np.random.choice([bg, fg], size=(width, height))

#valid=[fg*x+bg*(8-x) for x in range(9)]

def life(a):
     live=(a[4]==fg)
     a[4]=0
     s=int(a.sum())
#     if s not in valid:
#             raise(Exception("invalid sum "+s))
     if live:
         if s < (2*fg+6*bg):
             return bg
         elif s <= (3*fg+5*bg):
             return fg
         else: # s > (3*fg + 5*bg)
             return bg
#dead
     if s == (3*fg+5*bg):
         return fg
     else:
         return bg

keep_going = True

try: #get ready to deal with any problems
    while keep_going:
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                keep_going = False #exit the loop
        new=generic_filter(surfarray, life, size=3, mode='wrap')
        del surfarray # explicitly delete old array
        surfarray=new
        pygame.surfarray.blit_array(screen, surfarray)
        pygame.display.flip()
except:
    raise #show what went wrong
finally:
    pygame.display.quit() #close the window

#life-sdl2.py
import sdl2
import numpy as np
from sdl2.ext import Color
from scipy.ndimage.filters import generic_filter

window_size = width, height = (400, 400)
background = Color(0, 0, 0, 128) #colour. alpha, red, green and blue.
foreground = Color(0, 210, 0, 0) #colour. alpha, red, green and blue.
bg=int(background)
fg=int(foreground)

sdl2.ext.init()
#http://pysdl2.readthedocs.org/en/latest/modules/sdl2ext_window.html#sdl2.ext.Window
window = sdl2.ext.Window("PySDL2 life", size=window_size)
window.show()
# http://wiki.libsdl.org/SDL_GetWindowSurface
# http://wiki.libsdl.org/SDL_Surface
windowsurf = sdl2.SDL_GetWindowSurface(window.window)
#http://pysdl2.readthedocs.org/en/latest/modules/sdl2ext_pixelaccess.html#sdl2.ext.PixelView
windowarray = sdl2.ext.pixels2d(windowsurf.contents)
surfarray=np.random.choice(np.array([bg, fg], dtype=np.uint32),
size=(width, height))

#valid=[fg*x+bg*(8-x) for x in range(9)]

def life(a):
     live=(a[4]==fg)
     a[4]=0
     s=int(a.sum())
#     if s not in valid:
#             raise(Exception("invalid sum "+s))
     if live:
         if s < (2*fg+6*bg):
             return bg
         elif s <= (3*fg+5*bg):
             return fg
         else: # s > (3*fg + 5*bg)
             return bg
#dead
     if s == (3*fg+5*bg):
         return fg
     else:
         return bg

keep_going = True

try: #get ready to deal with any problems
    while keep_going:
        for event in sdl2.ext.get_events():
            if event.type == sdl2.SDL_QUIT:
                keep_going = False #exit the loop
        new=generic_filter(surfarray, life, size=3, mode='wrap')
        del surfarray # explicitly delete old array
        surfarray=new
        del new
        np.copyto(windowarray, surfarray)
        window.refresh()
except:
    raise #show what went wrong
finally:
    sdl2.SDL_Quit() #close the window

On 18 August 2013 01:56,  <ninmonkeys@...> wrote:
> I did see in the wiki for porting, a method to use the read-access of
> surface, yet copies into an existing texture. Meaning you don't do the slow
> createTextureFromSurface() every frame.
>
> I'd paste it but I can't on my phone.
> --
> Monkey
>
> On Aug 13, 2013, at 1:47 AM, Andrew Barlow <andrew.barlow@...> wrote:
>
> Awesome! I hope we end up with a nice wrapper around previous pygame code so
> I don't have to rewrite everything!
>
> I'd even pay good money for that!
>
> On 13 August 2013 09:37, René Dudfield <renesd@...> wrote:
>>
>> Happy days...
>>
>>
>> SDL 2.0 is released!
>>
>> http://lists.libsdl.org/pipermail/sdl-libsdl.org/2013-August/089854.html
>>
>> """
>>
>> These are the most important new features in SDL 2.0:
>>
>>    - Full 3D hardware acceleration
>>    - Support for OpenGL 3.0+ in various profiles (core, compatibility,
>>    debug, robust, etc)
>>    - Support for OpenGL ES
>>    - Support for multiple windows
>>    - Support for multiple displays
>>    - Support for multiple audio devices
>>    - Android and iOS support
>>    - Simple 2D rendering API that can use Direct3D, OpenGL, OpenGL ES, or
>>    software rendering behind the scenes
>>    - Force Feedback available on Windows, Mac OS X and Linux
>>    - XInput and XAudio2 support for Windows
>>    - Atomic operations
>>    - Power management (exposes battery life remaining, etc)
>>    - Shaped windows
>>    - 32-bit audio (int and float)
>>    - Simplified Game Controller API (the Joystick API is still here, too!)
>>    - Touch support (multitouch, gestures, etc)
>>    - Better fullscreen support
>>    - Better keyboard support (scancodes vs keycodes, etc).
>>    - Message boxes
>>    - Clipboard support
>>    - Basic Drag'n'Drop support
>>    - Proper unicode input and IME support
>>    - A really powerful assert macro
>>    - Lots of old annoyances from 1.2 are gone
>>    - Many other things!
>>
>> """
>
>

geneb | 13 Aug 15:25 2013

Re: SDL 2.0

On Tue, 13 Aug 2013, René Dudfield wrote:

> Happy days...
>
>
> SDL 2.0 is released!
>
> http://lists.libsdl.org/pipermail/sdl-libsdl.org/2013-August/089854.html
>
> """
>
> These are the most important new features in SDL 2.0:
>
>   - Full 3D hardware acceleration
>   - Support for OpenGL 3.0+ in various profiles (core, compatibility,
>   debug, robust, etc)
>   - Support for OpenGL ES

Does the OpenGL ES support mean that it will work properly on the 
Raspberry Pi?

tnx!

g.

--

-- 
Proud owner of F-15C 80-0007
http://www.f15sim.com - The only one of its kind.
http://www.diy-cockpits.org/coll - Go Collimated or Go Home.
Some people collect things for a hobby.  Geeks collect hobbies.

ScarletDME - The red hot Data Management Environment
A Multi-Value database for the masses, not the classes.
http://scarlet.deltasoft.com - Get it _today_!
René Dudfield | 13 Aug 16:29 2013
Picon

Re: SDL 2.0

On Tue, Aug 13, 2013 at 3:25 PM, geneb <geneb-vS57ZBhJb3Xby3iVrkZq2A@public.gmane.org> wrote:


Does the OpenGL ES support mean that it will work properly on the Raspberry Pi?

tnx!


Hi,

Yes, it does work with raspberrypi.

There are some people working on better SDL2 support for raspberrypi in this issue:
    http://bugzilla.libsdl.org/show_bug.cgi?id=2005

That should let you use Directfb, rather than needing X11.  At some point there should be support for using the dedicated video scaling hardware, which is the fast path for 2D graphics on the raspberrypi.  Whereas the OpenGL ES is the slower hardware when doing just 2D graphics on the pi.


cheers,
geneb | 13 Aug 16:34 2013

Re: SDL 2.0

On Tue, 13 Aug 2013, René Dudfield wrote:

> On Tue, Aug 13, 2013 at 3:25 PM, geneb <geneb@...> wrote:
>
>>
>> Does the OpenGL ES support mean that it will work properly on the
>> Raspberry Pi?
>>
>> tnx!
>
>
>
> Hi,
>
> Yes, it does work with raspberrypi.
>
> There are some people working on better SDL2 support for raspberrypi in
> this issue:
>    http://bugzilla.libsdl.org/show_bug.cgi?id=2005
>
> That should let you use Directfb, rather than needing X11.  At some point
> there should be support for using the dedicated video scaling hardware,
> which is the fast path for 2D graphics on the raspberrypi.  Whereas the
> OpenGL ES is the slower hardware when doing just 2D graphics on the pi.

Excellent news, thanks!  I was hoping to avoid X11 as well - I want to use 
the Raspberry Pi as a dedicated MPCD/MFD controller for my flight sim 
projects and being able to skip X11 would be nice.

tnx!

g.

--

-- 
Proud owner of F-15C 80-0007
http://www.f15sim.com - The only one of its kind.
http://www.diy-cockpits.org/coll - Go Collimated or Go Home.
Some people collect things for a hobby.  Geeks collect hobbies.

ScarletDME - The red hot Data Management Environment
A Multi-Value database for the masses, not the classes.
http://scarlet.deltasoft.com - Get it _today_!
claudio canepa | 13 Aug 15:47 2013
Picon

Re: SDL 2.0




On Tue, Aug 13, 2013 at 5:37 AM, René Dudfield <renesd <at> gmail.com> wrote:
Happy days...


SDL 2.0 is released!

http://lists.libsdl.org/pipermail/sdl-libsdl.org/2013-August/089854.html

"""

Wohoo!!!
 
Lenard Lindstrom | 16 Aug 22:12 2013
Picon

Re: SDL 2.0

Hi,

I recommend we put a feature freeze of Pygame 1.9.2. Personally, I still 
want to see Pygame 1.9.2 reach release status. I expect identifying 
existing bugs in Pygame 1.9.2 is easier than chasing them down later in 
an SDL 2 port. Otherwise, I would rather put time into an SDL2 port than 
patching the 1.9.2.

The SDL2 port of Pygame — Pygame 1.9,10? — can be a fork of Pygame 
1.9.2. Debugging of Pygame 1.9.2 would continue, with fixes merged into 
the SDL2 port. To reduce workload, Pygame 1.9.2 debugging can be limited 
to code that servives in the SDL2 port.

Lenard

On 13-08-13 01:37 AM, René Dudfield wrote:
> Happy days...
>
>
> SDL 2.0 is released!
>
> http://lists.libsdl.org/pipermail/sdl-libsdl.org/2013-August/089854.html
>
> """
> These are the most important new features in SDL 2.0:
>
>     - Full 3D hardware acceleration
>     - Support for OpenGL 3.0+ in various profiles (core, compatibility,
>     debug, robust, etc)
>     - Support for OpenGL ES
>     - Support for multiple windows
>     - Support for multiple displays
>     - Support for multiple audio devices
>     - Android and iOS support
>     - Simple 2D rendering API that can use Direct3D, OpenGL, OpenGL ES, or
>     software rendering behind the scenes
>     - Force Feedback available on Windows, Mac OS X and Linux
>     - XInput and XAudio2 support for Windows
>     - Atomic operations
>     - Power management (exposes battery life remaining, etc)
>     - Shaped windows
>     - 32-bit audio (int and float)
>     - Simplified Game Controller API (the Joystick API is still here, too!)
>     - Touch support (multitouch, gestures, etc)
>     - Better fullscreen support
>     - Better keyboard support (scancodes vs keycodes, etc).
>     - Message boxes
>     - Clipboard support
>     - Basic Drag'n'Drop support
>     - Proper unicode input and IME support
>     - A really powerful assert macro
>     - Lots of old annoyances from 1.2 are gone
>     - Many other things!
> """

Andrew Barlow | 16 Aug 22:26 2013
Picon

Re: SDL 2.0

I favour this hugely.
 
I'd love to have a feature freeze on 1.9.2... squish any final bugs on it... start SDL2 port for a PyGame 1.9.10 (Maybe even just PyGame 2.0?)


On 16 August 2013 21:12, Lenard Lindstrom <len-l-EynCeXvFgoheoWH0uzbU5w@public.gmane.org> wrote:
Hi,

I recommend we put a feature freeze of Pygame 1.9.2. Personally, I still want to see Pygame 1.9.2 reach release status. I expect identifying existing bugs in Pygame 1.9.2 is easier than chasing them down later in an SDL 2 port. Otherwise, I would rather put time into an SDL2 port than patching the 1.9.2.

The SDL2 port of Pygame — Pygame 1.9,10? — can be a fork of Pygame 1.9.2. Debugging of Pygame 1.9.2 would continue, with fixes merged into the SDL2 port. To reduce workload, Pygame 1.9.2 debugging can be limited to code that servives in the SDL2 port.

Lenard


On 13-08-13 01:37 AM, René Dudfield wrote:
Happy days...


SDL 2.0 is released!

http://lists.libsdl.org/pipermail/sdl-libsdl.org/2013-August/089854.html

"""
These are the most important new features in SDL 2.0:

    - Full 3D hardware acceleration
    - Support for OpenGL 3.0+ in various profiles (core, compatibility,
    debug, robust, etc)
    - Support for OpenGL ES
    - Support for multiple windows
    - Support for multiple displays
    - Support for multiple audio devices
    - Android and iOS support
    - Simple 2D rendering API that can use Direct3D, OpenGL, OpenGL ES, or
    software rendering behind the scenes
    - Force Feedback available on Windows, Mac OS X and Linux
    - XInput and XAudio2 support for Windows
    - Atomic operations
    - Power management (exposes battery life remaining, etc)
    - Shaped windows
    - 32-bit audio (int and float)
    - Simplified Game Controller API (the Joystick API is still here, too!)
    - Touch support (multitouch, gestures, etc)
    - Better fullscreen support
    - Better keyboard support (scancodes vs keycodes, etc).
    - Message boxes
    - Clipboard support
    - Basic Drag'n'Drop support
    - Proper unicode input and IME support
    - A really powerful assert macro
    - Lots of old annoyances from 1.2 are gone
    - Many other things!
"""


Lenard Lindstrom | 17 Aug 02:32 2013
Picon

Re: SDL 2.0

Hi Andrew,

Marcus von Appen has "pygame2" as a synonym for PyGame Reloaded. I 
noticed, though, that PyGame Reloaded was discontinued (1) in favor of 
PySDL2. So if there will be no confusion and Marcus is agreeable, then I 
second "PyGame 2.0".

Lenard

(1) https://code.google.com/p/pgreloaded/

On 13-08-16 01:26 PM, Andrew Barlow wrote:
> I favour this hugely.
> I'd love to have a feature freeze on 1.9.2... squish any final bugs on 
> it... start SDL2 port for a PyGame 1.9.10 (Maybe even just PyGame 2.0?)
>
>
> On 16 August 2013 21:12, Lenard Lindstrom <len-l@... 
> <mailto:len-l@...>> wrote:
>
>     Hi,
>
>     I recommend we put a feature freeze of Pygame 1.9.2. Personally, I
>     still want to see Pygame 1.9.2 reach release status. I expect
>     identifying existing bugs in Pygame 1.9.2 is easier than chasing
>     them down later in an SDL 2 port. Otherwise, I would rather put
>     time into an SDL2 port than patching the 1.9.2.
>
>     The SDL2 port of Pygame — Pygame 1.9,10? — can be a fork of Pygame
>     1.9.2. Debugging of Pygame 1.9.2 would continue, with fixes merged
>     into the SDL2 port. To reduce workload, Pygame 1.9.2 debugging can
>     be limited to code that servives in the SDL2 port.
>
>     Lenard
>
>
>     On 13-08-13 01:37 AM, René Dudfield wrote:
>
>         Happy days...
>
>
>         SDL 2.0 is released!
>
>         http://lists.libsdl.org/pipermail/sdl-libsdl.org/2013-August/089854.html
>
>         """
>         These are the most important new features in SDL 2.0:
>
>             - Full 3D hardware acceleration
>             - Support for OpenGL 3.0+ in various profiles (core,
>         compatibility,
>             debug, robust, etc)
>             - Support for OpenGL ES
>             - Support for multiple windows
>             - Support for multiple displays
>             - Support for multiple audio devices
>             - Android and iOS support
>             - Simple 2D rendering API that can use Direct3D, OpenGL,
>         OpenGL ES, or
>             software rendering behind the scenes
>             - Force Feedback available on Windows, Mac OS X and Linux
>             - XInput and XAudio2 support for Windows
>             - Atomic operations
>             - Power management (exposes battery life remaining, etc)
>             - Shaped windows
>             - 32-bit audio (int and float)
>             - Simplified Game Controller API (the Joystick API is
>         still here, too!)
>             - Touch support (multitouch, gestures, etc)
>             - Better fullscreen support
>             - Better keyboard support (scancodes vs keycodes, etc).
>             - Message boxes
>             - Clipboard support
>             - Basic Drag'n'Drop support
>             - Proper unicode input and IME support
>             - A really powerful assert macro
>             - Lots of old annoyances from 1.2 are gone
>             - Many other things!
>         """
>
>
>

Paul Vincent Craven | 17 Aug 04:48 2013

Re: SDL 2.0

I started a pygame port based off Marcus's CTypes work. I think it is the best way to go for an SDL 2 pygame. 

Some things are harder, like full SDL 2 support would require versions of code on some functions for rastarized, openGL, and DirectX. Things like 'line width' aren't supported, so I had to code those. Not too bad under OpenGL, but the other modes...

Some things are easier. Like scaling bitmaps, something we don't have support for now.

Are there other people that wish to work on it?

Paul Vincent Craven


On Fri, Aug 16, 2013 at 7:32 PM, Lenard Lindstrom <len-l-EynCeXvFgoheoWH0uzbU5w@public.gmane.org> wrote:
Hi Andrew,

Marcus von Appen has "pygame2" as a synonym for PyGame Reloaded. I noticed, though, that PyGame Reloaded was discontinued (1) in favor of PySDL2. So if there will be no confusion and Marcus is agreeable, then I second "PyGame 2.0".

Lenard

(1) https://code.google.com/p/pgreloaded/


On 13-08-16 01:26 PM, Andrew Barlow wrote:
I favour this hugely.
I'd love to have a feature freeze on 1.9.2... squish any final bugs on it... start SDL2 port for a PyGame 1.9.10 (Maybe even just PyGame 2.0?)


On 16 August 2013 21:12, Lenard Lindstrom <len-l-EynCeXvFgoheoWH0uzbU5w@public.gmane.org <mailto:len-l-EynCeXvFgoheoWH0uzbU5w@public.gmane.org>> wrote:

    Hi,

    I recommend we put a feature freeze of Pygame 1.9.2. Personally, I
    still want to see Pygame 1.9.2 reach release status. I expect
    identifying existing bugs in Pygame 1.9.2 is easier than chasing
    them down later in an SDL 2 port. Otherwise, I would rather put
    time into an SDL2 port than patching the 1.9.2.

    The SDL2 port of Pygame — Pygame 1.9,10? — can be a fork of Pygame
    1.9.2. Debugging of Pygame 1.9.2 would continue, with fixes merged
    into the SDL2 port. To reduce workload, Pygame 1.9.2 debugging can
    be limited to code that servives in the SDL2 port.

    Lenard


    On 13-08-13 01:37 AM, René Dudfield wrote:

        Happy days...


        SDL 2.0 is released!

        http://lists.libsdl.org/pipermail/sdl-libsdl.org/2013-August/089854.html

        """
        These are the most important new features in SDL 2.0:

            - Full 3D hardware acceleration
            - Support for OpenGL 3.0+ in various profiles (core,
        compatibility,
            debug, robust, etc)
            - Support for OpenGL ES
            - Support for multiple windows
            - Support for multiple displays
            - Support for multiple audio devices
            - Android and iOS support
            - Simple 2D rendering API that can use Direct3D, OpenGL,
        OpenGL ES, or
            software rendering behind the scenes
            - Force Feedback available on Windows, Mac OS X and Linux
            - XInput and XAudio2 support for Windows
            - Atomic operations
            - Power management (exposes battery life remaining, etc)
            - Shaped windows
            - 32-bit audio (int and float)
            - Simplified Game Controller API (the Joystick API is
        still here, too!)
            - Touch support (multitouch, gestures, etc)
            - Better fullscreen support
            - Better keyboard support (scancodes vs keycodes, etc).
            - Message boxes
            - Clipboard support
            - Basic Drag'n'Drop support
            - Proper unicode input and IME support
            - A really powerful assert macro
            - Lots of old annoyances from 1.2 are gone
            - Many other things!
        """





Lenard Lindstrom | 17 Aug 08:21 2013
Picon

Re: SDL 2.0

Ctypes may be the way to go on PyPy, but it is slow in CPython. It lacks 
new buffer support. Well, ctype types have buffers, but they don't work 
with NumPy. Array support is convoluted and slow (see _numpysurfarray.py 
in Pygame 1.8.0). And Python is unsuited for writing the custom blitters 
added to Pygame. But I agree that more of Pygame should be implemented 
in Python.

Lenard

On 13-08-16 07:48 PM, Paul Vincent Craven wrote:
> I started a pygame port based off Marcus's CTypes work. I think it is 
> the best way to go for an SDL 2 pygame.
>
>

Marcus von Appen | 17 Aug 09:28 2013

Re: SDL 2.0

On, Sat Aug 17, 2013, Lenard Lindstrom wrote:

> Ctypes may be the way to go on PyPy, but it is slow in CPython. It lacks
> new buffer support. Well, ctype types have buffers, but they don't work
> with NumPy.

Take a look at
https://bitbucket.org/marcusva/py-sdl2/src/963b26e2110449a453efa7fa45328c0062c72697/sdl2/ext/pixelaccess.py?at=default

Accessing ctypes buffers or exposing ctypes buffers to Numpy is not a
problem.

Cheers
Marcus
ninmonkeys | 18 Aug 03:04 2013
Picon

Re: SDL 2.0

Is this required If you use the pixel access sample in the sdl2 migration wiki?

--
Monkey

On Aug 17, 2013, at 12:28 AM, Marcus von Appen <mva@...> wrote:

> On, Sat Aug 17, 2013, Lenard Lindstrom wrote:
> 
>> Ctypes may be the way to go on PyPy, but it is slow in CPython. It lacks
>> new buffer support. Well, ctype types have buffers, but they don't work
>> with NumPy.
> 
> Take a look at
> https://bitbucket.org/marcusva/py-sdl2/src/963b26e2110449a453efa7fa45328c0062c72697/sdl2/ext/pixelaccess.py?at=default
> 
> Accessing ctypes buffers or exposing ctypes buffers to Numpy is not a
> problem.
> 
> Cheers
> Marcus

Marcus von Appen | 21 Aug 19:05 2013

Re: SDL 2.0

On, Sun Aug 18, 2013, ninmonkeys@... wrote:

> Is this required If you use the pixel access sample in the sdl2
> migration wiki?

What example do you mean exactly?

Generally speaking: no, you do not have to rely on numpy, but can use
your own favourite way of accessing the data, either by using the ctypes
pointer to the pixels directly or wrapping it into a Python array, byte
array or something else. If you plan to do so, I recommend you to take a
brief look at the sdl2/ext/array.py code, which contains several ways of
accessing and converting such a buffer. It might save you some time to
create your own implementation.

Cheers
Marcus

>
> On Aug 17, 2013, at 12:28 AM, Marcus von Appen <mva@...> wrote:
>
> > On, Sat Aug 17, 2013, Lenard Lindstrom wrote:
> >
> >> Ctypes may be the way to go on PyPy, but it is slow in CPython. It lacks
> >> new buffer support. Well, ctype types have buffers, but they don't work
> >> with NumPy.
> >
> > Take a look at
> > https://bitbucket.org/marcusva/py-sdl2/src/963b26e2110449a453efa7fa45328c0062c72697/sdl2/ext/pixelaccess.py?at=default
> >
> > Accessing ctypes buffers or exposing ctypes buffers to Numpy is not a
> > problem.
> >
> > Cheers
> > Marcus
Lenard Lindstrom | 18 Aug 22:16 2013
Picon

Re: SDL 2.0

On 13-08-17 12:28 AM, Marcus von Appen wrote:
> On, Sat Aug 17, 2013, Lenard Lindstrom wrote:
>
>> Ctypes may be the way to go on PyPy, but it is slow in CPython. It lacks
>> new buffer support. Well, ctype types have buffers, but they don't work
>> with NumPy.
> Take a look at
> https://bitbucket.org/marcusva/py-sdl2/src/963b26e2110449a453efa7fa45328c0062c72697/sdl2/ext/pixelaccess.py?at=default
>
> Accessing ctypes buffers or exposing ctypes buffers to Numpy is not a
> problem.
>
> Cheers
> Marcus
Hi Marcus,

Is there a way to create a custom bf_releasebuffer function for a ctype 
object? When exporting an SDL_Surface pixel buffer using the 3118 (new) 
buffer interface, I would like the release callback to unlock the 
surface, rather than use a NumPy array's __del__ method.

Lenard

Marcus von Appen | 21 Aug 19:11 2013

Re: SDL 2.0

On, Sun Aug 18, 2013, Lenard Lindstrom wrote:

> On 13-08-17 12:28 AM, Marcus von Appen wrote:
> > On, Sat Aug 17, 2013, Lenard Lindstrom wrote:
> >
> >> Ctypes may be the way to go on PyPy, but it is slow in CPython. It lacks
> >> new buffer support. Well, ctype types have buffers, but they don't work
> >> with NumPy.
> > Take a look at
> > https://bitbucket.org/marcusva/py-sdl2/src/963b26e2110449a453efa7fa45328c0062c72697/sdl2/ext/pixelaccess.py?at=default
> >
> > Accessing ctypes buffers or exposing ctypes buffers to Numpy is not a
> > problem.
> >
> > Cheers
> > Marcus
> Hi Marcus,
>
> Is there a way to create a custom bf_releasebuffer function for a ctype
> object? When exporting an SDL_Surface pixel buffer using the 3118 (new)
> buffer interface, I would like the release callback to unlock the
> surface, rather than use a NumPy array's __del__ method.

The PEP does not specify anything like that and I did not stumble across
such a feature. The only thing, I am aware f is the slightly enhanced
mechanism for dealing with struct.pack/unpack in regards to buffers,
which however does not help here.

Cheers
Marcus
Richard Jones | 17 Aug 14:09 2013
Picon

Re: SDL 2.0

On 17 August 2013 16:21, Lenard Lindstrom <len-l-EynCeXvFgoheoWH0uzbU5w@public.gmane.org> wrote:
Ctypes may be the way to go on PyPy, but it is slow in CPython.
 
PyPy moved to cffi some time ago, and it's much faster on both platforms. 


    Richard
ninmonkeys | 18 Aug 03:00 2013
Picon

Re: SDL 2.0

Does pygame use sdl_gfx ? That has a 2 port. 

--
Monkey

On Aug 16, 2013, at 7:48 PM, Paul Vincent Craven <paul-ICoT3idlrjDLiC/qqWbuZQ@public.gmane.org> wrote:

I started a pygame port based off Marcus's CTypes work. I think it is the best way to go for an SDL 2 pygame. 

Some things are harder, like full SDL 2 support would require versions of code on some functions for rastarized, openGL, and DirectX. Things like 'line width' aren't supported, so I had to code those. Not too bad under OpenGL, but the other modes...

Some things are easier. Like scaling bitmaps, something we don't have support for now.

Are there other people that wish to work on it?

Paul Vincent Craven


On Fri, Aug 16, 2013 at 7:32 PM, Lenard Lindstrom <len-l-EynCeXvFgoheoWH0uzbU5w@public.gmane.org> wrote:
Hi Andrew,

Marcus von Appen has "pygame2" as a synonym for PyGame Reloaded. I noticed, though, that PyGame Reloaded was discontinued (1) in favor of PySDL2. So if there will be no confusion and Marcus is agreeable, then I second "PyGame 2.0".

Lenard

(1) https://code.google.com/p/pgreloaded/


On 13-08-16 01:26 PM, Andrew Barlow wrote:
I favour this hugely.
I'd love to have a feature freeze on 1.9.2... squish any final bugs on it... start SDL2 port for a PyGame 1.9.10 (Maybe even just PyGame 2.0?)


On 16 August 2013 21:12, Lenard Lindstrom <len-l-EynCeXvFgoheoWH0uzbU5w@public.gmane.org <mailto:len-l-EynCeXvFgoheoWH0uzbU5w@public.gmane.org>> wrote:

    Hi,

    I recommend we put a feature freeze of Pygame 1.9.2. Personally, I
    still want to see Pygame 1.9.2 reach release status. I expect
    identifying existing bugs in Pygame 1.9.2 is easier than chasing
    them down later in an SDL 2 port. Otherwise, I would rather put
    time into an SDL2 port than patching the 1.9.2.

    The SDL2 port of Pygame — Pygame 1.9,10? — can be a fork of Pygame
    1.9.2. Debugging of Pygame 1.9.2 would continue, with fixes merged
    into the SDL2 port. To reduce workload, Pygame 1.9.2 debugging can
    be limited to code that servives in the SDL2 port.

    Lenard


    On 13-08-13 01:37 AM, René Dudfield wrote:

        Happy days...


        SDL 2.0 is released!

        http://lists.libsdl.org/pipermail/sdl-libsdl.org/2013-August/089854.html

        """
        These are the most important new features in SDL 2.0:

            - Full 3D hardware acceleration
            - Support for OpenGL 3.0+ in various profiles (core,
        compatibility,
            debug, robust, etc)
            - Support for OpenGL ES
            - Support for multiple windows
            - Support for multiple displays
            - Support for multiple audio devices
            - Android and iOS support
            - Simple 2D rendering API that can use Direct3D, OpenGL,
        OpenGL ES, or
            software rendering behind the scenes
            - Force Feedback available on Windows, Mac OS X and Linux
            - XInput and XAudio2 support for Windows
            - Atomic operations
            - Power management (exposes battery life remaining, etc)
            - Shaped windows
            - 32-bit audio (int and float)
            - Simplified Game Controller API (the Joystick API is
        still here, too!)
            - Touch support (multitouch, gestures, etc)
            - Better fullscreen support
            - Better keyboard support (scancodes vs keycodes, etc).
            - Message boxes
            - Clipboard support
            - Basic Drag'n'Drop support
            - Proper unicode input and IME support
            - A really powerful assert macro
            - Lots of old annoyances from 1.2 are gone
            - Many other things!
        """





Marcus von Appen | 17 Aug 09:20 2013

Re: SDL 2.0

On, Sat Aug 17, 2013, Lenard Lindstrom wrote:

> Hi Andrew,
>
> Marcus von Appen has "pygame2" as a synonym for PyGame Reloaded. I
> noticed, though, that PyGame Reloaded was discontinued (1) in favor of
> PySDL2. So if there will be no confusion and Marcus is agreeable, then I
> second "PyGame 2.0".

Sure, go ahead!
Lenard Lindstrom | 18 Aug 00:41 2013
Picon

Re: SDL 2.0

On 13-08-17 12:20 AM, Marcus von Appen wrote:
> On, Sat Aug 17, 2013, Lenard Lindstrom wrote:
>
>> Hi Andrew,
>>
>> Marcus von Appen has "pygame2" as a synonym for PyGame Reloaded. I
>> noticed, though, that PyGame Reloaded was discontinued (1) in favor of
>> PySDL2. So if there will be no confusion and Marcus is agreeable, then I
>> second "PyGame 2.0".
> Sure, go ahead!
Thanks, Marcus

Lenard

ninmonkeys | 18 Aug 02:59 2013
Picon

Re: SDL 2.0

Pygame 2.0 might be a better name  to signify the large change to SDL2

--
Monkey

On Aug 16, 2013, at 1:26 PM, Andrew Barlow <andrew.barlow-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

I favour this hugely.
 
I'd love to have a feature freeze on 1.9.2... squish any final bugs on it... start SDL2 port for a PyGame 1.9.10 (Maybe even just PyGame 2.0?)


On 16 August 2013 21:12, Lenard Lindstrom <len-l-EynCeXvFgoheoWH0uzbU5w@public.gmane.org> wrote:
Hi,

I recommend we put a feature freeze of Pygame 1.9.2. Personally, I still want to see Pygame 1.9.2 reach release status. I expect identifying existing bugs in Pygame 1.9.2 is easier than chasing them down later in an SDL 2 port. Otherwise, I would rather put time into an SDL2 port than patching the 1.9.2.

The SDL2 port of Pygame — Pygame 1.9,10? — can be a fork of Pygame 1.9.2. Debugging of Pygame 1.9.2 would continue, with fixes merged into the SDL2 port. To reduce workload, Pygame 1.9.2 debugging can be limited to code that servives in the SDL2 port.

Lenard


On 13-08-13 01:37 AM, René Dudfield wrote:
Happy days...


SDL 2.0 is released!

http://lists.libsdl.org/pipermail/sdl-libsdl.org/2013-August/089854.html

"""
These are the most important new features in SDL 2.0:

    - Full 3D hardware acceleration
    - Support for OpenGL 3.0+ in various profiles (core, compatibility,
    debug, robust, etc)
    - Support for OpenGL ES
    - Support for multiple windows
    - Support for multiple displays
    - Support for multiple audio devices
    - Android and iOS support
    - Simple 2D rendering API that can use Direct3D, OpenGL, OpenGL ES, or
    software rendering behind the scenes
    - Force Feedback available on Windows, Mac OS X and Linux
    - XInput and XAudio2 support for Windows
    - Atomic operations
    - Power management (exposes battery life remaining, etc)
    - Shaped windows
    - 32-bit audio (int and float)
    - Simplified Game Controller API (the Joystick API is still here, too!)
    - Touch support (multitouch, gestures, etc)
    - Better fullscreen support
    - Better keyboard support (scancodes vs keycodes, etc).
    - Message boxes
    - Clipboard support
    - Basic Drag'n'Drop support
    - Proper unicode input and IME support
    - A really powerful assert macro
    - Lots of old annoyances from 1.2 are gone
    - Many other things!
"""



Gmane