C++ wrapper of SDL?

Hi everyone…

I plan to write some libs on top of SDL, and I was wondering if some
of you guys are aware of up-to-date and living SDL C++ wrapper ?

I am thinking of a basic wrapper, doing nothing more than SDL
functions, but still implementing most of the documented requirements
(call this function before this one, this flag is not used in this
function, etc.)

I had a look around, googled, etc. but I cant find anything (SDLmm
looks nice, but looks like it has been inactive for a long time
now…)
It looks like everyone is writing his own with its own goals, so I
started doing the same :frowning:

Is there any “common” effort somewhere to develop a C++ wrapper ? or
is this useless ?

Hi everyone…

I plan to write some libs on top of SDL, and I was wondering if some
of you guys are aware of up-to-date and living SDL C++ wrapper ?

I am thinking of a basic wrapper, doing nothing more than SDL
functions, but still implementing most of the documented requirements
(call this function before this one, this flag is not used in this
function, etc.)

I had a look around, googled, etc. but I cant find anything (SDLmm
looks nice, but looks like it has been inactive for a long time
now…)
It looks like everyone is writing his own with its own goals, so I
started doing the same :frowning:

Is there any “common” effort somewhere to develop a C++ wrapper ? or
is this useless ?

I find that a wrapper is not necesary. The most anoying thing from a
C++ perspective is remembering to clean up after your surfaces. With
Boost’s intrusive_ptr or shared_ptr this can be solved:

#include <SDL.h>
#include <boost/intrusive_ptr.hpp>

// We tell intrusive_ptr how to deal with SDL_Surface*
void intrusive_ptr_add_ref(SDL_Surface* p)
{
p->refcount++;
}

void intrusive_ptr_release(SDL_Surface* p)
{
SDL_FreeSurface§;
}

void foo()
{
// We pass false to the constructor because refcount==1 already.
boost::intrusive_ptr<SDL_Surface> sfc(IMG_Load(file), false);

}

HTH,
BrunoOn Sat, 19 Nov 2005 23:48:33 -0200, Asmodehn Shade wrote:

Have you seen CRM32Pro?

maybe it can help you.

Cheers> ----- Original Message -----

From: asmodehn@gmail.com (Asmodehn Shade)
To:
Sent: Sunday, November 20, 2005 2:48 AM
Subject: [SDL] C++ wrapper of SDL ???

Hi everyone…

I plan to write some libs on top of SDL, and I was wondering if some
of you guys are aware of up-to-date and living SDL C++ wrapper ?

I am thinking of a basic wrapper, doing nothing more than SDL
functions, but still implementing most of the documented requirements
(call this function before this one, this flag is not used in this
function, etc.)

I had a look around, googled, etc. but I cant find anything (SDLmm
looks nice, but looks like it has been inactive for a long time
now…)
It looks like everyone is writing his own with its own goals, so I
started doing the same :frowning:

Is there any “common” effort somewhere to develop a C++ wrapper ? or
is this useless ?


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Yeah I have seen CRM32Pro, but the main problem is that I cant access
the source of it, for some license reason I suppose, and so I cant
build it on the different OSes I am using.

I am looking for a free software (BSD-like or LGPL licensed at least),
that I can include in my code without any worries… after all a
library wrapper is usually aimed to be included in a code using the
library wrapped, isnt it ?

The one I have started is under BSD license, works quite ok, but is
still mostly incomplete And as I am still alone working on it
unfortunately, it takes times…

So I am still looking around for help / ideas / critics…

Cheers,

2005/11/20, Roberto Prieto :> Have you seen CRM32Pro?

maybe it can help you.

Cheers

----- Original Message -----
From: “Asmodehn Shade” <@Asmodehn_Shade>
To:
Sent: Sunday, November 20, 2005 2:48 AM
Subject: [SDL] C++ wrapper of SDL ???

Hi everyone…

I plan to write some libs on top of SDL, and I was wondering if some
of you guys are aware of up-to-date and living SDL C++ wrapper ?

I am thinking of a basic wrapper, doing nothing more than SDL
functions, but still implementing most of the documented requirements
(call this function before this one, this flag is not used in this
function, etc.)

I had a look around, googled, etc. but I cant find anything (SDLmm
looks nice, but looks like it has been inactive for a long time
now…)
It looks like everyone is writing his own with its own goals, so I
started doing the same :frowning:

Is there any “common” effort somewhere to develop a C++ wrapper ? or
is this useless ?


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Hi (and sorry for the shameless plug),

maybe you could take a look at OSDL (Object-oriented Simple DirectMedia
Layer, http://osdl.sourceforge.net). It is a LGPL’d C++ library built on
top of SDL, SDL_image, SDL_gfx, SDL_ttf and, soon, SDL_mixer. It is
still alpha though (not everything is implemented) and developer
platform is GNU/Linux. And, of course, any help would be appreciated
since it is a long process indeed :slight_smile:

In my opinion, a “mostly thin” C++ wrapper would not be that useful,
since I guess most object-oriented users would expect higher level
primitives as well (actually it is at least my case !).

Cheers,

Olivier.

Asmodehn Shade wrote:>Yeah I have seen CRM32Pro, but the main problem is that I cant access

the source of it, for some license reason I suppose, and so I cant
build it on the different OSes I am using.

I am looking for a free software (BSD-like or LGPL licensed at least),
that I can include in my code without any worries… after all a
library wrapper is usually aimed to be included in a code using the
library wrapped, isnt it ?

The one I have started is under BSD license, works quite ok, but is
still mostly incomplete And as I am still alone working on it
unfortunately, it takes times…

So I am still looking around for help / ideas / critics…

Cheers,

2005/11/20, Roberto Prieto :

Have you seen CRM32Pro?

maybe it can help you.

Cheers

----- Original Message -----
From: “Asmodehn Shade”
To:
Sent: Sunday, November 20, 2005 2:48 AM
Subject: [SDL] C++ wrapper of SDL ???

Hi everyone…

I plan to write some libs on top of SDL, and I was wondering if some
of you guys are aware of up-to-date and living SDL C++ wrapper ?

I am thinking of a basic wrapper, doing nothing more than SDL
functions, but still implementing most of the documented requirements
(call this function before this one, this flag is not used in this
function, etc.)

I had a look around, googled, etc. but I cant find anything (SDLmm
looks nice, but looks like it has been inactive for a long time
now…)
It looks like everyone is writing his own with its own goals, so I
started doing the same :frowning:

Is there any “common” effort somewhere to develop a C++ wrapper ? or
is this useless ?


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl