Horde3D

Next-Generation Graphics Engine
It is currently 23.01.2020, 02:53

All times are UTC + 1 hour




Post new topic Reply to topic  [ 74 posts ]  Go to page Previous  1, 2, 3, 4, 5
Author Message
PostPosted: 19.04.2010, 02:15 
Offline

Joined: 19.04.2010, 02:00
Posts: 3
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?


Top
 Profile  
Reply with quote  
PostPosted: 19.04.2010, 09:40 
Offline

Joined: 16.04.2010, 07:17
Posts: 7
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.


Top
 Profile  
Reply with quote  
PostPosted: 19.04.2010, 10:51 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1149
Location: Germany
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.


Top
 Profile  
Reply with quote  
PostPosted: 19.04.2010, 14:08 
Offline

Joined: 16.04.2010, 07:17
Posts: 7
Any chance you can post a tar.gz of your build? I couldn't get the patch working against latest SVN.


Top
 Profile  
Reply with quote  
PostPosted: 19.04.2010, 16:25 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1149
Location: Germany
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).


Top
 Profile  
Reply with quote  
PostPosted: 19.04.2010, 22:59 
Offline

Joined: 16.04.2010, 07:17
Posts: 7
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.


Top
 Profile  
Reply with quote  
PostPosted: 20.04.2010, 00:31 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
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.


Top
 Profile  
Reply with quote  
PostPosted: 20.04.2010, 02:24 
Offline

Joined: 16.04.2010, 07:17
Posts: 7
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.


Top
 Profile  
Reply with quote  
PostPosted: 20.04.2010, 03:10 
Offline

Joined: 19.04.2010, 02:00
Posts: 3
With Zibba's changes, it compiles and runs fine on my system. Thanks for all your help!


Top
 Profile  
Reply with quote  
PostPosted: 20.04.2010, 08:28 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1149
Location: Germany
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.


Top
 Profile  
Reply with quote  
PostPosted: 20.04.2010, 08:32 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1149
Location: Germany
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?


Top
 Profile  
Reply with quote  
PostPosted: 20.04.2010, 09:39 
Offline

Joined: 16.04.2010, 07:17
Posts: 7
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.


Top
 Profile  
Reply with quote  
PostPosted: 18.05.2010, 00:43 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
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:

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
PostPosted: 18.05.2010, 18:43 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1149
Location: Germany
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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 74 posts ]  Go to page Previous  1, 2, 3, 4, 5

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group