It’s possible this problem has already been addressed, if it has I haven’t seen the solution. In order to solve the problem I modified the OgreOSXCocoaWindow.mm and OgreOSXCarbonWindow.cpp files as follows:
Original OgreOSXCocoaWindow.mm:
Code: Select all
NameValuePairList::const_iterator opt(NULL);
NameValuePairList::const_iterator param_useNSView_pair(NULL);
if(miscParams) {
opt = miscParams->find("externalWindowHandle");
param_useNSView_pair = miscParams->find("macAPICocoaUseNSView") ;
}
if(!miscParams || opt == miscParams->end())
{
...
}
else
{
...
}
Code: Select all
bool useCurrentGLContext = false;
if(miscParams) {
NameValuePairList::const_iterator opt = miscParams->find("currentGLContext");
if (opt != miscParams->end())
useCurrentGLContext = StringConverter::parseBool(opt->second);
}
if(!useCurrentGLContext) {
NameValuePairList::const_iterator opt(NULL);
NameValuePairList::const_iterator param_useNSView_pair(NULL);
if(miscParams) {
opt = miscParams->find("externalWindowHandle");
param_useNSView_pair = miscParams->find("macAPICocoaUseNSView") ;
}
if(!miscParams || opt == miscParams->end())
{
...
}
else
{
...
}
}
else
{
mView = [[NSOpenGLContext currentContext] view];
}
Code: Select all
else
{
mView = [[NSOpenGLContext currentContext] view];
}
Code: Select all
else
{
mWindow = HIApplicationGetFocus(true);
mView = HIViewGetRoot(mWindow);
}