Render to Mac OS X Carbon and Linux X11 Window

Does anyone have a small example of rendering to a Mac OS X Carbon or Linux
X11 Window?

I know how to do it in Windows using SDL_WINDOWID, but was wondering if it
is any different in
the other OSes.

thanks,

Dominique.

Hi Dominique,

Drawing (and everything else) with SDL is cross platform, so the same
code should run on Mac OS X and Linux.

Mac OS X has been slowly moving away from Carbon, which is an API
designed to provide code compatibility with Mac OS9, and towards the
Cocoa and Core Mac OS X APIs. Is there some reason you specifically
want Carbon? SDL 1.3 for Mac OS X does not use carbon for drawing,
though I don’t know about SDL 1.2 and below.

Does anyone have a small example of rendering to a Mac OS X Carbon
or Linux
X11 Window?

I know how to do it in Windows using SDL_WINDOWID, but was wondering
if it
is any different in
the other OSes.

thanks,

Dominique.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

SDL 1.2 does not use Carbon, Cocoa is not usable from C code (unlike Carbon), so SDL has a fair amount of Objective-C to deal with it.

As far as I know, iPhone lacks Carbon, and I’ve read that the next Mac OS X version will remove Carbon as well, so any programs using it are out of luck.

Holmes Futrell wrote:> Hi Dominique,

Drawing (and everything else) with SDL is cross platform, so the same
code should run on Mac OS X and Linux.

Mac OS X has been slowly moving away from Carbon, which is an API
designed to provide code compatibility with Mac OS9, and towards the
Cocoa and Core Mac OS X APIs. Is there some reason you specifically
want Carbon? SDL 1.3 for Mac OS X does not use carbon for drawing,
though I don’t know about SDL 1.2 and below.

  • Holmes

On Nov 8, 2008, at 6:08 PM, wrote:

Does anyone have a small example of rendering to a Mac OS X Carbon or
Linux
X11 Window?

I know how to do it in Windows using SDL_WINDOWID, but was wondering
if it
is any different in
the other OSes.

thanks,

Dominique.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Forest ‘LordHavoc’ Hale
Author of DarkPlaces Quake1 engine and mod
http://icculus.org/twilight/darkplaces/
Address: 94340 Horton Road Blachly OR 97412
Phone/Fax: 541-925-4130

Hello Dominique,

I have the experience of rendering SDL surface into gtk or QT widget. I’m
sure you can find some information from google.
But for rendering to Linux X11 I didn’t do that.

You said you know how to do that in Windows using SDL_WINDOWID. Could you
tell me your solution? I want to put the
sdl surface into a windows widget, such as a CEdit or put in in a window,
but I did NOT get success.
Could you do me a favour?
Thanks.

Regards,
Eric ZHOU

2008/11/9 dominique at savagesoftware.com.au> Does anyone have a small example of rendering to a Mac OS X Carbon or Linux

X11 Window?

I know how to do it in Windows using SDL_WINDOWID, but was wondering if it
is any different in
the other OSes.

thanks,

Dominique.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

For X11 on OS X use the X11 version of SDL either from source or one
of the ports collections like Darwinports or Fink. These will build
against a version of X11R6 libraries not Cocoa or Carbon which are
native OS X windowing environments. My understanding is that Carbon is
being dropped in the future.
You need to distinguish the target platform when building, between X11
and OS X. I.e. you would either build against an X11 windowing toolkit
or an OSX toolkit even though X11 apps can run side by side with OSX
apps.
Best
Ed> SDL 1.2 does not use Carbon, Cocoa is not usable from C code (unlike

Carbon), so SDL has a fair amount of Objective-C to deal with it.

As far as I know, iPhone lacks Carbon, and I’ve read that the next
Mac OS X version will remove Carbon as well, so any programs using
it are out of luck.

Holmes Futrell wrote:

Hi Dominique,

Drawing (and everything else) with SDL is cross platform, so the same
code should run on Mac OS X and Linux.

Mac OS X has been slowly moving away from Carbon, which is an API
designed to provide code compatibility with Mac OS9, and towards the
Cocoa and Core Mac OS X APIs. Is there some reason you specifically
want Carbon? SDL 1.3 for Mac OS X does not use carbon for drawing,
though I don’t know about SDL 1.2 and below.

  • Holmes

On Nov 8, 2008, at 6:08 PM, wrote:

Does anyone have a small example of rendering to a Mac OS X Carbon
or
Linux
X11 Window?

I know how to do it in Windows using SDL_WINDOWID, but was wondering
if it
is any different in
the other OSes.

thanks,

Dominique.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Forest ‘LordHavoc’ Hale
Author of DarkPlaces Quake1 engine and mod
http://icculus.org/twilight/darkplaces/
Address: 94340 Horton Road Blachly OR 97412
Phone/Fax: 541-925-4130


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Hello,

Yup, it’s true that the iPhone doesn’t have the Carbon APIs.

Not sure if the next version of Mac OS X will remove Carbon, but I
believe 64 bit development will be Cocoa only, which presents
difficulties in getting 64 bit Mac versions of programs like
Photoshop, which rely on Carbon.

  • HolmesOn Nov 9, 2008, at 3:13 AM, Forest Hale wrote:

SDL 1.2 does not use Carbon, Cocoa is not usable from C code (unlike
Carbon), so SDL has a fair amount of Objective-C to deal with it.

As far as I know, iPhone lacks Carbon, and I’ve read that the next
Mac OS X version will remove Carbon as well, so any programs using
it are out of luck.

Holmes Futrell wrote:

Hi Dominique,

Drawing (and everything else) with SDL is cross platform, so the same
code should run on Mac OS X and Linux.

Mac OS X has been slowly moving away from Carbon, which is an API
designed to provide code compatibility with Mac OS9, and towards the
Cocoa and Core Mac OS X APIs. Is there some reason you specifically
want Carbon? SDL 1.3 for Mac OS X does not use carbon for drawing,
though I don’t know about SDL 1.2 and below.

  • Holmes

On Nov 8, 2008, at 6:08 PM, wrote:

Does anyone have a small example of rendering to a Mac OS X Carbon
or
Linux
X11 Window?

I know how to do it in Windows using SDL_WINDOWID, but was wondering
if it
is any different in
the other OSes.

thanks,

Dominique.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Forest ‘LordHavoc’ Hale
Author of DarkPlaces Quake1 engine and mod
http://icculus.org/twilight/darkplaces/
Address: 94340 Horton Road Blachly OR 97412
Phone/Fax: 541-925-4130


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org