SDL in Cocoa

Until now, the only framework for Mac programming I knew how to use was SDL. Now, I am learning Cocoa, and I am making some pretty cool programs with it. I was curious if it is possible to have SDL in a Cocoa app. Like there is an OpenGL View control in IB.
How can I have a view control inside my Cocoa window that could display SDL? (if it is possible, of course) I could use a custom view, but how do I put SDL inside it?

Thanks in advance.

i believe you should modify sdlmain.m and then build from it
at least that’s what most iphone app do, so it shouldn’t be much differentOn Mon, Jun 14, 2010 at 4:51 PM, Kikolani wrote:

Until now, the only framework for Mac programming I knew how to use was SDL. Now, I am learning Cocoa, and I am making some pretty cool programs with it. I was curious if it is possible to have SDL in a Cocoa app. Like there is an OpenGL View control in IB.
How can I have a view control inside my Cocoa window that could display SDL? (if it is possible, of course) I could use a custom view, but how do I put SDL inside it?

Thanks in advance.


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

i believe you should modify sdlmain.m and then build from it
at least that’s what most iphone app do, so it shouldn’t be much different

Until now, the only framework for Mac programming I knew how to use was
SDL. Now, I am learning Cocoa, and I am making some pretty cool programs
with it. I was curious if it is possible to have SDL in a Cocoa app. Like
there is an OpenGL View control in IB.
How can I have a view control inside my Cocoa window that could display
SDL? (if it is possible, of course) I could use a custom view, but how do
I put SDL inside it?

There used to be a template that showed how to grab an SDL view in
Interface Builder and put it into a native Cocoa app. However, this
code used deprecated APIs which are not present in 64-bit so we
removed this capability. I suspect we could get it back, but no work I
know have has been done on this.

There was somebody posting here about doing stuff like you describe in
SDL 1.3 with iPhone maybe within the last 6 months. (Check the
archives.) I think they made a lot progress and were starting to
document things. I didn’t have time to look at it, but it sounded
pretty good and I plan to take a look at it when I get more time.

Meanwhile I also proposed changing the back-end implementation to be
more centered around Cocoa views and Core Animation layers. My hope is
we can then create a backdoor way to access the raw views and layers
so they can be more easily integrated into a native Cocoa app, similar
to the Interface Builder techniques. However, again that free time
problem.

-EricOn 6/15/10, Vittorio G. <vitto.giova at yahoo.it> wrote:

On Mon, Jun 14, 2010 at 4:51 PM, Kikolani wrote: