Horde3D
http://horde3d.org/forums/

Horde3D on Mac OS X [Partial Success]
http://horde3d.org/forums/viewtopic.php?f=1&t=192
Page 5 of 5

Author:  necubi [ 19.04.2010, 02:15 ]
Post subject:  Re: Horde3D on Mac OS X [Partial Success]

I've been trying to get this to work on 10.6, and haven't been successful. I was getting the typeLongInteger undeclared error, but patching with the file above just causes a bunch of compile errors in GLFW. Anybody have any ideas?

Author:  zibba [ 19.04.2010, 09:40 ]
Post subject:  Re: Horde3D on Mac OS X [Partial Success]

I tried it as well and it looks like that version of GLFW is using a lot of Carbon which was largely removed in 10.6. I was going to try replacing it with GLFW-Lite which I think has been update to 10.6 and Cocoa.

Author:  Volker [ 19.04.2010, 10:51 ]
Post subject:  Re: Horde3D on Mac OS X [Partial Success]

Did you change the CMakeFile as mentined by iLeshlink?

Quote:
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
FIND_LIBRARY(COCOA_LIBRARY Cocoa)
FIND_LIBRARY(APPLICATION_SERVICES_LIBRARY ApplicationServices)
FIND_LIBRARY(AGL_LIBRARY AGL)
IF(COCOA_LIBRARY)
target_link_libraries(Knight ${COCOA_LIBRARY} ${APPLICATION_SERVICES_LIBRARY} ${AGL_LIBRARY})
ELSE(COCOA_LIBRARY)
FIND_LIBRARY(CARBON_LIBRARY Carbon)
target_link_libraries(Knight ${CARBON_LIBRARY} ${APPLICATION_SERVICES_LIBRARY} ${AGL_LIBRARY})
ENDIF(COCOA_LIBRARY)
endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")


I already build it successfully with Mac OS 10.6 so it should be possible in general.

Author:  zibba [ 19.04.2010, 14:08 ]
Post subject:  Re: Horde3D on Mac OS X [Partial Success]

Any chance you can post a tar.gz of your build? I couldn't get the patch working against latest SVN.

Author:  Volker [ 19.04.2010, 16:25 ]
Post subject:  Re: Horde3D on Mac OS X [Partial Success]

I commited the changes that worked for me into the SVN repositories (along with that goes an update to GLFW 2.7). I hope that won't break any other platforms (I'm still not sure if the CMake statements to check for COCOA are correct).

Author:  zibba [ 19.04.2010, 22:59 ]
Post subject:  Re: Horde3D on Mac OS X [Partial Success]

Thanks Volker. I managed to get that compiling with some minor alterations, they were:

I added the following into trunk/Horde3d/Samples/glfw/lib/cocoa
cocoa_enable.m from here http://glfw.svn.sourceforge.net/viewvc/ ... vision=966
platform.h from http://glfw.svn.sourceforge.net/viewvc/ ... ision=1011

Then in platform.h I edited the #include path to be #include "../glfw.h"

Everything compiles but doesn't run because it can't create one of the render targets, the format is unsupported. I guess my old Macbook Pro ATI Radeon X1600 isn't up to it.

Edit: The problem was the shadow maps. In the Chicago example I commented out the deferred.pipeline.xml and the setting of the shadow values in the light source. It's now rendering.

Author:  marciano [ 20.04.2010, 00:31 ]
Post subject:  Re: Horde3D on Mac OS X [Partial Success]

zibba wrote:
I guess my old Macbook Pro ATI Radeon X1600 isn't up to it.

Edit: The problem was the shadow maps. In the Chicago example I commented out the deferred.pipeline.xml and the setting of the shadow values in the light source. It's now rendering.

Actually all SM3 hardware should be fine to run horde and I know that shadows worked on that card. We recently refactored the selection of depth precision in order to improve ATI support, maybe your problem is related to that. If you have a minute, could you please add the line _depthFormat = GL_DEPTH_COMPONENT; at the end of RendererBase::init() to see if that helps?

Volker wrote:
I hope that won't break any other platforms (I'm still not sure if the CMake statements to check for COCOA are correct).

Do we actually have to support Carbon at all? AFAIK, COCOA should be available on all OSX versions.

Author:  zibba [ 20.04.2010, 02:24 ]
Post subject:  Re: Horde3D on Mac OS X [Partial Success]

Quote:
could you please add the line _depthFormat = GL_DEPTH_COMPONENT; at the end of RendererBase::init() to see if that helps?


That didn't fix it, but commenting out line 842 in egRenderBase.cpp did for Chicago :D
I see there's a comment in RenderBase::init referring to ATI cards.

Quote:
Do we actually have to support Carbon at all? AFAIK, COCOA should be available on all OSX versions.


IMHO, I don't think you need to support Carbon.

Author:  necubi [ 20.04.2010, 03:10 ]
Post subject:  Re: Horde3D on Mac OS X [Partial Success]

With Zibba's changes, it compiles and runs fine on my system. Thanks for all your help!

Author:  Volker [ 20.04.2010, 08:28 ]
Post subject:  Re: Horde3D on Mac OS X [Partial Success]

zibba wrote:
I added the following into trunk/Horde3d/Samples/glfw/lib/cocoa
cocoa_enable.m from here http://glfw.svn.sourceforge.net/viewvc/ ... vision=966
platform.h from http://glfw.svn.sourceforge.net/viewvc/ ... ision=1011

For some reason I forgot those files to commit to the community branch,... thanks for mentioning it.

Author:  Volker [ 20.04.2010, 08:32 ]
Post subject:  Re: Horde3D on Mac OS X [Partial Success]

zibba wrote:
That didn't fix it, but commenting out line 842 in egRenderBase.cpp did for Chicago :D
I see there's a comment in RenderBase::init referring to ATI cards.

Do you mean the line
Code:
if( samples > 0 )
?

zibba wrote:
Quote:
Do we actually have to support Carbon at all? AFAIK, COCOA should be available on all OSX versions.

IMHO, I don't think you need to support Carbon.

So can we remove the carbon files from glfw and the find_library statements in the cmake files?

Author:  zibba [ 20.04.2010, 09:39 ]
Post subject:  Re: Horde3D on Mac OS X [Partial Success]

I mean the line just before which reads:

if( status != GL_FRAMEBUFFER_COMPLETE_EXT ) valid = false;

For some reason status is GL_FRAMEBUFFER_UNSUPPORTED_EXT

Quote:
So can we remove the carbon files from glfw and the find_library statements in the cmake files?


I think that will be ok, I removed them and it was ok.

Author:  swiftcoder [ 18.05.2010, 00:43 ]
Post subject:  Re: Horde3D on Mac OS X [Partial Success]

Volker wrote:
iLeshik wrote:
I think COCOA not available on old versions of Mac OS, carbon more old then cocoa.
The question is, is carbon available on newer Mac OS and if it is, why it's not possible to link against it correctly. Or is the IF statement always true, even if the framework is not available. Then the solution with testing on Cocoa first won't run on Mac OS system where it is not available.
To clarify fully:
* Cocoa is the native framework of Mac OS X, and is available on all versions of Mac OS X.

* Carbon is a C++ compatability layer for the Classic Mac OS, which is available to 32-bit programs on all versions of Mac OS X to date. It is officially deprecated, will never be available for 64-bit applications, and will likely be removed entirely in future versions of the OS.

* On 10.6, GCC defaults to 64-bit mode, so no Carbon applications will compile without compiler configuration tweaks, which are slightly tricky to force from within CMake.

GLFW-lite (from the glfw subversions server) has a fully functional Cocoa backend, which runs Horde fine on 10.6. Unfortunately, I lost my Mac hard drive (and subsequently my Mac) before I was able to submit the proper patch to Horde - though it looks like you have done an excellent job without me :wink:

Author:  Volker [ 18.05.2010, 18:43 ]
Post subject:  Re: Horde3D on Mac OS X [Partial Success]

Thanks for the clarification, I sometimes got access to a MacBook Pro so I could test some of the things to get it working. I will remove the carbon part within the next days since it seems that it really isn't required anymore.

Page 5 of 5 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/