Pregunta

I am trying to create a window using Carbon framework in C++ on Mac OS X Maverick.I need it to setup AGL window OpenGL context.But what I found is that most of related Carbon methods link only in x86 mode.For example in the header for 'CreateNewWindow' method it is clearly stated :

Availability: * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]

So I succeed compiling it only in 32bit mode which is useless to me as I target 64bit OS.What's the workaround for 64bit? Also I am not interested in using Cocoa + ObjectiveC way of doing it.

¿Fue útil?

Solución

As mentioned, Carbon is no longer supported in 64-bit mode. You need to create a Cocoa app. The easiest way to do what you want is to create an NSWindow containing an NSOpenGLView.

Also, AGL is deprecated. The context you get from an NSOpenGLView will be a CGLContext.

It sounds like you're trying to make some old code work. You should also read up on OpenGL 3.3 and later. If you're using OpenGL code that worked with Carbon, it's likely OpenGL 1.2 and using lots of deprecated functionality.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top