On Wed, Apr 27, 2011 at 17:09, David Chisnall <address@hidden>
I'm not sure - I always use GNUstep with a window manager.
I just tested on Linux, no borders here. Oh well, painting windows isn't that hard once other parts of view hierarchy work :)
There's some sample code for this in my Cocoa Programming book I think - the examples can be downloaded from the book's page.
I'll take a look at them.
I'll also take a look at the book :-)
That's what NSImage lockFocus is for. Call this, and the drawing target becomes that NSImage instance. Then you can just get the data from it.
> Maybe! I was rather looking for something that paints into framebuffer (without X11) that I could easily reuse to paint in-game, but maybe things could easily be patched to render views into textures.
That sounds like exactly what I need! Thanks!
Opal is an implementation of CoreGraphics, which (on OS X) sits between AppKit and the window server. You don't really have to understand any of that for CoreAnimation though - just provide a mechanism for redirecting drawing to an OpenGL texture and animating a rectangle that this texture is attached to.
> I am not familiar with Cairo, however, and I did not take a look at Opal, so I'm not sure how much I could help.
> Is there some documentation/diagrams I could take a look to quickly understand what piece of the puzzle does what, apart from studying the code (which may generate more questions than answers)? For example, I am somewhat confused by what Opal exactly is. :-)
This sounds to me like it could be a job for a category that would provide a texture object, something like a GSOpalGLTextureObject. That would require a GL context -- I suppose that would have to be hacked into NSWindow somehow. This is the place where I have no idea how things work: but perhaps base view of an NSWindow can be replaced by an NSOpenGLView?