|
From: Sean M. <se...@ro...> - 2008-08-15 20:05:29
|
Hi all, So we've just downloaded Quesa CVS and tried to build it as 64 bit. Not sure if we're the first to try... it doesn't compile. :) Attached is a patch that fixes almost all compilation issues. Could someone review it? Most changes are pretty straightforward. Some comments: a) QUESA_SUPPORT_QUICKTIME is forced to 0 in 64 bit. b) Added a QUESA_SUPPORT_QUICKDRAW that is analogous to QUESA_SUPPORT_QUICKTIME. It must be 0 in 64 bit since QuickDraw/ HIToolbox is gone. Changed some QUESA_OS_MACINTOSH to QUESA_SUPPORT_QUICKDRAW. c) Removed FSSpec usage in 64 bit. d) various casts, tweaks, etc. Note that I have only compiled this on Mac OS X, no other platforms. Note that even with this patch, there are still compiler errors in 64 bit (but not in 32 bit). The remaining errors I am not comfortable fixing because it requires a better knowledge of Quesa than I have. I thought I'd start with this patch before discussing remaining problems.... Lastly, I realise that removing the QuickDraw/HIToolbox usage in Quesa means that it will be missing major functionality. In our case however, we only need a small subset of Quesa and are happy to report that that subset runs just fine in x86_64! Cheers, -- ____________________________________________________________ Sean McBride, B. Eng se...@ro... Rogue Research www.rogue-research.com Mac Software Developer Montréal, Québec, Canada |
|
From: James W. <ja...@fr...> - 2008-08-15 21:04:28
|
Sean McBride wrote: > So we've just downloaded Quesa CVS and tried to build it as 64 bit. Not > sure if we're the first to try... it doesn't compile. :) > > Attached is a patch that fixes almost all compilation issues. Could > someone review it? Pardon my ignorance, but what is a patch file, i.e., what programs use .patch files? -- James W. Walker, Innoventive Software LLC <http://www.frameforge3d.com/> |
|
From: Sean M. <se...@ro...> - 2008-08-17 23:37:08
|
On 8/15/08 2:04 PM, James Walker said: >> So we've just downloaded Quesa CVS and tried to build it as 64 bit. Not >> sure if we're the first to try... it doesn't compile. :) >> >> Attached is a patch that fixes almost all compilation issues. Could >> someone review it? > >Pardon my ignorance, but what is a patch file, i.e., what programs use >.patch files? On Mac OS X type 'man patch' in Terminal... If you'd prefer, I could always send you my entire modified Quesa directory, but it would be too big for the list, I'm sure. -- ____________________________________________________________ Sean McBride, B. Eng se...@ro... Rogue Research www.rogue-research.com Mac Software Developer Montréal, Québec, Canada |
|
From: Roger H. <rog...@mi...> - 2008-08-16 09:08:08
|
On 15 Aug, 2008, at 21:04, Sean McBride wrote: > Hi all, > > So we've just downloaded Quesa CVS and tried to build it as 64 > bit. Not > sure if we're the first to try... Yes I think you are. I have thought about it and concluded it was doable but I didn't have the time to do it then. > it doesn't compile. :) You thought it would? :-) > > Attached is a patch that fixes almost all compilation issues. Could > someone review it? I know our tech support guy generates patch files so that users can update our products with minimal download time. I'll ask him to see if we can use your file with out program. > > Most changes are pretty straightforward. Some comments: > > a) QUESA_SUPPORT_QUICKTIME is forced to 0 in 64 bit. > > b) Added a QUESA_SUPPORT_QUICKDRAW that is analogous to > QUESA_SUPPORT_QUICKTIME. It must be 0 in 64 bit since QuickDraw/ > HIToolbox is gone. Changed some QUESA_OS_MACINTOSH to > QUESA_SUPPORT_QUICKDRAW. Is all the QuickDraw usage in the viewer code? If so, I'm not currently using it either. > > c) Removed FSSpec usage in 64 bit. Not replaced? Have you disabled file I/O temporarily? > > d) various casts, tweaks, etc. > > Note that I have only compiled this on Mac OS X, no other platforms. Personally that's all I want anyway. It could be that with the other platforms, 64 bit is not such an issue. > > Note that even with this patch, there are still compiler errors in 64 > bit (but not in 32 bit). The remaining errors I am not comfortable > fixing because it requires a better knowledge of Quesa than I have. I > thought I'd start with this patch before discussing remaining > problems.... Oh, I see. > > Lastly, I realise that removing the QuickDraw/HIToolbox usage in Quesa > means that it will be missing major functionality. It's a fair chunk of code, but I think it was all platform dependant. Maybe we need a new platform in Quesa for Mac OS-X 64 bit. It could use Cocoa and Objective C++ for the user interface. > In our case however, > we only need a small subset of Quesa and are happy to report that that > subset runs just fine in x86_64! Please explain how you get around the compiler errors in 64 bit mode. There is another future problem to be addressed one day. It fine having 64 bit code, but the Quesa file structure uses 32 bit offsets, in fact everything including booleans are 32 bits. I am very happy to stay with 32 bit floating point values internally but I wonder if we should define a new file type, maybe .Q64 or .3DMF64 is Windoze allows more than 3 characters now. In the new file type everything would be 64 bits, even the floating point values, which would get converted to 32 bit floats when the file was read, until such time as 64 bit floating point gets (almost) as quick as 32 bit. I suppose someone is now going to tell me it is already, well I have not checked the specs, I'm just assuming and if I'm wrong then thats great and I can go and change the another product's source code. Well done Sean for being the first of us to put his head above the 64bit parapet. Roger > > Cheers, > > -- > ____________________________________________________________ > Sean McBride, B. Eng se...@ro... > Rogue Research www.rogue-research.com > Mac Software Developer Montréal, Québec, > Canada<quesa_64.patch>------------------------------------------------ > ------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win > great prizes > Grand prize is a trip for two to an Open Source event anywhere in > the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Quesa-develop mailing list > Que...@li... > https://lists.sourceforge.net/lists/listinfo/quesa-develop |
|
From: Sean M. <se...@ro...> - 2008-08-18 14:26:40
|
On 8/16/08 10:07 AM, Roger Holmes said: >> b) Added a QUESA_SUPPORT_QUICKDRAW that is analogous to >> QUESA_SUPPORT_QUICKTIME. It must be 0 in 64 bit since QuickDraw/ >> HIToolbox is gone. Changed some QUESA_OS_MACINTOSH to >> QUESA_SUPPORT_QUICKDRAW. > >Is all the QuickDraw usage in the viewer code? If so, I'm not >currently using it either. Use of QUESA_SUPPORT_QUICKDRAW is in QD3DViewer.c, E3Viewer.c, and GLDrawContext.c. >> c) Removed FSSpec usage in 64 bit. > >Not replaced? Have you disabled file I/O temporarily? There seem to already be FSRef versions, happily. >Please explain how you get around the compiler errors in 64 bit mode. The errors that remain after our patch we simply commented out. :) Luckily, none of the code was needed in our case. It's just one file: E3MacDrawContext.c. -- ____________________________________________________________ Sean McBride, B. Eng se...@ro... Rogue Research www.rogue-research.com Mac Software Developer Montréal, Québec, Canada |
|
From: Sean M. <se...@ro...> - 2008-08-20 14:50:49
|
On 8/15/08 2:04 PM, James Walker said: >> Attached is a patch that fixes almost all compilation issues. Could >> someone review it? > >Pardon my ignorance, but what is a patch file, i.e., what programs use >.patch files? So to clarify further... the patch file is just text, and was created like so: cvs diff -u > patch.txt and you can apply it to a fresh cvs checkout like so: cd /path/to/quesa patch -p0 <patch.txt I look forward to you trying it, so we can discuss the remaining harder to fix problems. :) Cheers, -- ____________________________________________________________ Sean McBride, B. Eng se...@ro... Rogue Research www.rogue-research.com Mac Software Developer Montréal, Québec, Canada |
|
From: James W. <ja...@fr...> - 2008-08-20 17:32:41
|
Sean McBride wrote: > So to clarify further... the patch file is just text, and was created like so: > > cvs diff -u > patch.txt > > and you can apply it to a fresh cvs checkout like so: > > cd /path/to/quesa > patch -p0 <patch.txt OK, that helps. > I look forward to you trying it, so we can discuss the remaining harder > to fix problems. :) Maybe I can do it on the weekend. I can't really justify spending time on it at work, since we have no plans to leave the Carbon world. -- James W. Walker, Innoventive Software LLC <http://www.frameforge3d.com/> |
|
From: James W. W. <os...@jw...> - 2008-08-24 06:18:47
|
OK, I've done some testing with the 64-bit patch. My first comment is that I'm not sure if I like the symbol QUESA_SUPPORT_QUICKDRAW, since a Carbon app using Quesa does not necessarily use QuickDraw to any significant degree. Maybe QUESA_SUPPORT_HITOOLBOX or QUESA_SUPPORT_AGL. When building for 64 bit, I removed the following sources from the target: QD3DViewer.c E3Viewer.c E3ViewerOldAPIs.c E3MacDrawContext.c Quesa.rsrc (I think this is only needed for the viewer?) In QD3DDrawContext.c, I placed the Q3MacDrawContext_ functions under the condition #if QUESA_OS_MACINTOSH & QUESA_SUPPORT_QUICKDRAW. In E3Main.c, I added the QUESA_SUPPORT_QUICKDRAW condition to the E3Viewer_RegisterClass and E3Viewer_UnregisterClass calls. In E3MacSystem.c, in E3MacSystem_Terminate, I surrounded the aglResetLibrary stuff by #if QUESA_SUPPORT_QUICKDRAW. In E3DrawContext.c, I put QUESA_SUPPORT_QUICKDRAW conditions on the calls to E3MacDrawContext_RegisterClass, E3MacDrawContext_UnregisterClass, and E3MacDrawContext_NewWithWindow. With these changes, and using the 10.5 SDK, the framework compiles and links as x86_64. Then I built the Cocoa sample as 64 bit, and it runs! Activity Monitor shows that it is indeed running as Intel 64 bit. |
|
From: Sean M. <se...@ro...> - 2008-08-25 15:12:26
|
On 8/23/08 11:18 PM, James W. Walker said: >OK, I've done some testing with the 64-bit patch. > > *SNIP* > >With these changes, and using the 10.5 SDK, the framework compiles and >links as x86_64. Then I built the Cocoa sample as 64 bit, and it >runs! Activity Monitor shows that it is indeed running as Intel 64 bit. James, Thanks for trying it out. Your improvements sound good to me, can you let us know when it's in CVS so we can try it out? Thanks, -- ____________________________________________________________ Sean McBride, B. Eng se...@ro... Rogue Research www.rogue-research.com Mac Software Developer Montréal, Québec, Canada |