Fixed double vision problem in foreground orbits
-
Topic authordoctorjoe
- Posts: 76
- Joined: 23.05.2005
- With us: 19 years 6 months
- Location: Austin, Texas
Fixed double vision problem in foreground orbits
Fixed the double vision problem in the foreground orbits patch. The problem was that the two methods of calculating the orbits had different precision. The patch copies the matrix from the initial orbit draw and uses it for the foreground draw.
http://www.gnacademy.org/twiki/bin/view ... Extensions
http://www.gnacademy.org/twiki/bin/view ... Extensions
-
- Posts: 485
- Joined: 19.03.2005
- With us: 19 years 8 months
- Location: Los Angeles, CA
doctorjoe... thanks again!
question for ya... I downloaded the patch and it seems that, in this case, it's actually several patchES
just so i understand what's going on... your prior patch that did all these things was just one file... but now you have "broken out" the different functions into different patches? all of which need to be applied?
thanks,
Steve
question for ya... I downloaded the patch and it seems that, in this case, it's actually several patchES
just so i understand what's going on... your prior patch that did all these things was just one file... but now you have "broken out" the different functions into different patches? all of which need to be applied?
thanks,
Steve
Steven Binder, Mac OS X 10.4.10
-
- Developer
- Posts: 3776
- Joined: 04.02.2005
- With us: 19 years 9 months
Hello Doc,
Good news!! Tx a lot.
About the planetary orbit, there is nothing to do?
(see:http://www.shatters.net/forum/viewtopic.php?t=7524&highlight=)
Bye
Good news!! Tx a lot.
About the planetary orbit, there is nothing to do?
(see:http://www.shatters.net/forum/viewtopic.php?t=7524&highlight=)
Bye
-
- Posts: 485
- Joined: 19.03.2005
- With us: 19 years 8 months
- Location: Los Angeles, CA
Doctorjoe... I am getting a failed build when trying to build with all patches applied.
I then started applying one at a time (after downloading off CVS clean)... then building. The first one I tried (foreground.orbits.diff) worked. Then I applied gototime.diff - then tried to build - and got a failure.
I'm not sure if that was the only problem - b/c the permutations and possibilities are large - so I figured I'd post here first.
P.S. Using Xcode 2.1 in Tiger - and having no problems building off a clean CVS download.
I then started applying one at a time (after downloading off CVS clean)... then building. The first one I tried (foreground.orbits.diff) worked. Then I applied gototime.diff - then tried to build - and got a failure.
I'm not sure if that was the only problem - b/c the permutations and possibilities are large - so I figured I'd post here first.
P.S. Using Xcode 2.1 in Tiger - and having no problems building off a clean CVS download.
Steven Binder, Mac OS X 10.4.10
-
Topic authordoctorjoe
- Posts: 76
- Joined: 23.05.2005
- With us: 19 years 6 months
- Location: Austin, Texas
Failed build
Post the error log.
Also one command I've found really useful is
cvs diff | patch -p0 -R
This reverts your cvs tree to the main build.
Also one command I've found really useful is
cvs diff | patch -p0 -R
This reverts your cvs tree to the main build.
-
- Posts: 485
- Joined: 19.03.2005
- With us: 19 years 8 months
- Location: Los Angeles, CA
Well, for starters, here's what happens when I apply the patches:
Then I opened the celestia.xcode file in Xcode 2.1 and got this WARNING:
I open an upgraded copy. Then I change Set Active Build Configuration to "Deployment" and hit BUILD. And I get a FAILED and this error:
Any ideas? Thanks,
Steve
P.S. And thanks for the revert command!
Last login: Sun Jun 26 14:31:13 on ttyp1
Welcome to Darwin!
steven-binders-power-mac-g5:~ stevenbinder$ cd celestia/src
steven-binders-power-mac-g5:~/celestia/src stevenbinder$ patch -p0 < foreground.orbits.diff
patching file celengine/render.cpp
patching file celengine/render.h
steven-binders-power-mac-g5:~/celestia/src stevenbinder$ patch -p0 < gototime.diff
patching file celengine/body.cpp
patching file celengine/body.h
patching file celengine/simulation.cpp
patching file celengine/simulation.h
patching file celestia/celestiacore.cpp
steven-binders-power-mac-g5:~/celestia/src stevenbinder$ patch -p0 < rings.diff
patching file celengine/render.cpp
Hunk #1 succeeded at 4036 (offset 96 lines).
Hunk #2 succeeded at 4182 (offset 96 lines).
Hunk #3 succeeded at 4258 (offset 96 lines).
Hunk #4 succeeded at 4661 (offset 96 lines).
Hunk #5 succeeded at 4669 (offset 96 lines).
Hunk #6 succeeded at 4735 (offset 96 lines).
Hunk #7 succeeded at 5283 (offset 96 lines).
Hunk #8 succeeded at 5292 (offset 96 lines).
Hunk #9 succeeded at 5409 (offset 96 lines).
patching file celengine/texture.cpp
patching file celengine/texture.h
steven-binders-power-mac-g5:~/celestia/src stevenbinder$ patch -p0 < virtualtex.diff
patching file celengine/texture.cpp
patching file celengine/texture.h
Hunk #1 succeeded at 50 with fuzz 2.
Hunk #2 succeeded at 100 (offset 1 line).
Hunk #3 succeeded at 127 (offset 1 line).
Hunk #4 succeeded at 152 (offset 2 lines).
patching file celengine/virtualtex.cpp
patching file celengine/virtualtex.h
steven-binders-power-mac-g5:~/celestia/src stevenbinder$ patch -p0 < precession.diff
patching file celengine/astro.cpp
patching file celengine/astro.h
patching file celengine/render.cpp
Hunk #1 succeeded at 1452 (offset 125 lines).
Hunk #2 succeeded at 6589 (offset 143 lines).
Hunk #3 succeeded at 6618 (offset 143 lines).
Hunk #4 succeeded at 6630 (offset 143 lines).
patching file celengine/render.h
Hunk #1 succeeded at 278 (offset 2 lines).
steven-binders-power-mac-g5:~/celestia/src stevenbinder$
Then I opened the celestia.xcode file in Xcode 2.1 and got this WARNING:
The project "celestia.xcode" was saved with an older version of Xcode. To open it, you must first make a copy of it, which will have the '.xcodeproj' extension. Are you sure you want to open an upgraded copy?
I open an upgraded copy. Then I change Set Active Build Configuration to "Deployment" and hit BUILD. And I get a FAILED and this error:
Any ideas? Thanks,
Steve
P.S. And thanks for the revert command!
Steven Binder, Mac OS X 10.4.10
-
- Posts: 485
- Joined: 19.03.2005
- With us: 19 years 8 months
- Location: Los Angeles, CA
Actually, doctorjoe... i took a gamble and tried to recompile the OLD patch (the unified one) as well - and the build also failed.
Since the old patch USED to work - and I have since upgraded to Tiger (and Xcode 2.1) - my best guess is the problem isn't the new patch... it's something to do with Tiger.
I don't think you're on the Mac OS but any thoughts would, of course, be appreciated. Anyone else out there on a Mac having the same problem? Or having success applying and building any of doctor joes patches in Tiger with Xcode 2.1?
Or, in general, any Mac OS coders out there have any suggestions?
Thanks,
Steven
Since the old patch USED to work - and I have since upgraded to Tiger (and Xcode 2.1) - my best guess is the problem isn't the new patch... it's something to do with Tiger.
I don't think you're on the Mac OS but any thoughts would, of course, be appreciated. Anyone else out there on a Mac having the same problem? Or having success applying and building any of doctor joes patches in Tiger with Xcode 2.1?
Or, in general, any Mac OS coders out there have any suggestions?
Thanks,
Steven
Steven Binder, Mac OS X 10.4.10
-
- Posts: 485
- Joined: 19.03.2005
- With us: 19 years 8 months
- Location: Los Angeles, CA
Hey Dirkpitt - thanks for having a look. As for the fresh check out and re-patch, I'm somewhat embarrassed to say that, pretty much EVERY time I do a build I go through all those steps again. Mostly because I'm still not comfortable with all the permutations of possible ways for me to screw up the process and figure that, by a fresh check-out, I cut down the possible number of "what coulda gona wrong"'s...
Steven Binder, Mac OS X 10.4.10
I applied all the patches but compile aborts with a template-related error in vecmath.h:
../src/celmath/vecmath.h: In member function 'Vector3<T> Vector3<T>::operator-() const':
../src/celmath/vecmath.h:245: error: 'x' was not declared in this scope
../src/celmath/vecmath.h:245: error: 'y' was not declared in this scope
../src/celmath/vecmath.h:245: error: 'z' was not declared in this scope
../src/celmath/vecmath.h: In member function 'T Vector3<T>::length() const':
../src/celmath/vecmath.h:318: error: 'x' was not declared in this scope
../src/celmath/vecmath.h:318: error: 'y' was not declared in this scope
../src/celmath/vecmath.h:318: error: 'z' was not declared in this scope
../src/celmath/vecmath.h: In member function 'T Vector3<T>::lengthSquared() const':
../src/celmath/vecmath.h:323: error: 'x' was not declared in this scope
../src/celmath/vecmath.h:323: error: 'y' was not declared in this scope
../src/celmath/vecmath.h:323: error: 'z' was not declared in this scope
../src/celmath/vecmath.h: In member function 'void Vector3<T>::normalize()':
../src/celmath/vecmath.h:328: error: 'x' was not declared in this scope
../src/celmath/vecmath.h:328: error: 'y' was not declared in this scope
../src/celmath/vecmath.h:328: error: 'z' was not declared in this scope
../src/celmath/vecmath.h: In member function 'T Point3<T>::distanceTo(const Point3<T>&) const':
../src/celmath/vecmath.h:391: error: 'x' was not declared in this scope
../src/celmath/vecmath.h:392: error: 'y' was not declared in this scope
../src/celmath/vecmath.h:393: error: 'z' was not declared in this scope
../src/celmath/vecmath.h: In member function 'T Point3<T>::distanceToSquared(const Point3<T>&) const':
../src/celmath/vecmath.h:398: error: 'x' was not declared in this scope
../src/celmath/vecmath.h:399: error: 'y' was not declared in this scope
../src/celmath/vecmath.h:400: error: 'z' was not declared in this scope
../src/celmath/vecmath.h: In member function 'T Point3<T>::distanceFromOrigin() const':
../src/celmath/vecmath.h:405: error: 'x' was not declared in this scope
../src/celmath/vecmath.h:405: error: 'y' was not declared in this scope
../src/celmath/vecmath.h:405: error: 'z' was not declared in this scope
../src/celmath/vecmath.h: In member function 'T Point3<T>::distanceFromOriginSquared() const':
../src/celmath/vecmath.h:410: error: 'x' was not declared in this scope
../src/celmath/vecmath.h:410: error: 'y' was not declared in this scope
../src/celmath/vecmath.h:410: error: 'z' was not declared in this scope
I am using gcc 4.0 (powerpc-apple-darwin8-gcc-4.0.0 (GCC) 4.0.0 (Apple Computer, Inc. build 5026). Unfortunately I'm not terribly familiar with templates so I don't know how to fix this.
../src/celmath/vecmath.h: In member function 'Vector3<T> Vector3<T>::operator-() const':
../src/celmath/vecmath.h:245: error: 'x' was not declared in this scope
../src/celmath/vecmath.h:245: error: 'y' was not declared in this scope
../src/celmath/vecmath.h:245: error: 'z' was not declared in this scope
../src/celmath/vecmath.h: In member function 'T Vector3<T>::length() const':
../src/celmath/vecmath.h:318: error: 'x' was not declared in this scope
../src/celmath/vecmath.h:318: error: 'y' was not declared in this scope
../src/celmath/vecmath.h:318: error: 'z' was not declared in this scope
../src/celmath/vecmath.h: In member function 'T Vector3<T>::lengthSquared() const':
../src/celmath/vecmath.h:323: error: 'x' was not declared in this scope
../src/celmath/vecmath.h:323: error: 'y' was not declared in this scope
../src/celmath/vecmath.h:323: error: 'z' was not declared in this scope
../src/celmath/vecmath.h: In member function 'void Vector3<T>::normalize()':
../src/celmath/vecmath.h:328: error: 'x' was not declared in this scope
../src/celmath/vecmath.h:328: error: 'y' was not declared in this scope
../src/celmath/vecmath.h:328: error: 'z' was not declared in this scope
../src/celmath/vecmath.h: In member function 'T Point3<T>::distanceTo(const Point3<T>&) const':
../src/celmath/vecmath.h:391: error: 'x' was not declared in this scope
../src/celmath/vecmath.h:392: error: 'y' was not declared in this scope
../src/celmath/vecmath.h:393: error: 'z' was not declared in this scope
../src/celmath/vecmath.h: In member function 'T Point3<T>::distanceToSquared(const Point3<T>&) const':
../src/celmath/vecmath.h:398: error: 'x' was not declared in this scope
../src/celmath/vecmath.h:399: error: 'y' was not declared in this scope
../src/celmath/vecmath.h:400: error: 'z' was not declared in this scope
../src/celmath/vecmath.h: In member function 'T Point3<T>::distanceFromOrigin() const':
../src/celmath/vecmath.h:405: error: 'x' was not declared in this scope
../src/celmath/vecmath.h:405: error: 'y' was not declared in this scope
../src/celmath/vecmath.h:405: error: 'z' was not declared in this scope
../src/celmath/vecmath.h: In member function 'T Point3<T>::distanceFromOriginSquared() const':
../src/celmath/vecmath.h:410: error: 'x' was not declared in this scope
../src/celmath/vecmath.h:410: error: 'y' was not declared in this scope
../src/celmath/vecmath.h:410: error: 'z' was not declared in this scope
I am using gcc 4.0 (powerpc-apple-darwin8-gcc-4.0.0 (GCC) 4.0.0 (Apple Computer, Inc. build 5026). Unfortunately I'm not terribly familiar with templates so I don't know how to fix this.
-
- Posts: 485
- Joined: 19.03.2005
- With us: 19 years 8 months
- Location: Los Angeles, CA
Just for clarification, I got essentially same abort issue Dirkpitt got when I downloaded all the new patches listed POST 6/26 that doctorjoe wrote. The failed build I listed above didn't abort - it just failed (but it was only using the PRE-6/26 patches).
So apparently there are two different issues at play here from two different batches of patches - the first batch resulted in a completed, but failed, build. The second batch caused the build to actually abort.
So apparently there are two different issues at play here from two different batches of patches - the first batch resulted in a completed, but failed, build. The second batch caused the build to actually abort.
Steven Binder, Mac OS X 10.4.10
-
Topic authordoctorjoe
- Posts: 76
- Joined: 23.05.2005
- With us: 19 years 6 months
- Location: Austin, Texas
Interesting......
I'll fix it this evening.
I'm using gcc-3.3 since gcc-4.0 won't display 3d models.
I'm using gcc-3.3 since gcc-4.0 won't display 3d models.
BlindedByTheLight wrote:I open an upgraded copy. Then I change Set Active Build Configuration to "Deployment" and hit BUILD. And I get a FAILED and this error:
FWIW, I also get this error when I apply all patches except the template one. It seems gcc (4.0?) requires static member variables to be both declared (.h) and defined (.cpp).
-
Topic authordoctorjoe
- Posts: 76
- Joined: 23.05.2005
- With us: 19 years 6 months
- Location: Austin, Texas
Fixed template problem
Fixed the template problem
-
Topic authordoctorjoe
- Posts: 76
- Joined: 23.05.2005
- With us: 19 years 6 months
- Location: Austin, Texas
Another fix
Fixed the HUGE_NUMBER problem.
gcc-4.0 is much more pendantic than gcc-3.3
In particular
I had to identify the class which the variable belonged to in a template, and I have to make sure that a static const variable in a header is also defined in a cpp file.
gcc-4.0 is much more pendantic than gcc-3.3
In particular
I had to identify the class which the variable belonged to in a template, and I have to make sure that a static const variable in a header is also defined in a cpp file.
-
- Posts: 485
- Joined: 19.03.2005
- With us: 19 years 8 months
- Location: Los Angeles, CA
Re: Fixed template problem
doctorjoe wrote:Fixed the template problem
Yep, thanks! Worked like a charm (though I curious what all those Hunk offsets were....)
Also, on my system, the new foreground orbit fix results in fairly jagged orbit lines... is that because they are being drawn double-thickness?
Steven Binder, Mac OS X 10.4.10
The newer patch does indeed fix the thick lines issue. But there are two new regressions:
- I'm not sure what's going on here, but some other planet's moon orbits seem to be drawing on top of Saturn: (this cel url illustrates).
- Performance is affected significantly. This may be considered a worst-case scenario, but with the geosynch and Iridium satellite addons installed and looking at Earth (cel url), framerates are less than 1/10 what they used to be. In actual figures, I get <1 fps rotating around Earth when before it was ~10 fps. I can do a time profile and/or GL profile if this will help.
- I'm not sure what's going on here, but some other planet's moon orbits seem to be drawing on top of Saturn: (this cel url illustrates).
- Performance is affected significantly. This may be considered a worst-case scenario, but with the geosynch and Iridium satellite addons installed and looking at Earth (cel url), framerates are less than 1/10 what they used to be. In actual figures, I get <1 fps rotating around Earth when before it was ~10 fps. I can do a time profile and/or GL profile if this will help.
-
Topic authordoctorjoe
- Posts: 76
- Joined: 23.05.2005
- With us: 19 years 6 months
- Location: Austin, Texas
Thanks
I think that the saturn rendering is correct and what you are seeing are some background moon orbits. I looked at the item with celestia 1.4pre6 and the rendering is the same.
I've got a good guess as to what caused the slow down. Basically to simplify the code I changed it so that elliptical orbits used the same sampling code as the custom orbits and this involves calculating the time based location which is slow.
Let me upload another version.
I've got a good guess as to what caused the slow down. Basically to simplify the code I changed it so that elliptical orbits used the same sampling code as the custom orbits and this involves calculating the time based location which is slow.
Let me upload another version.
-
Topic authordoctorjoe
- Posts: 76
- Joined: 23.05.2005
- With us: 19 years 6 months
- Location: Austin, Texas
Uploaded new version
I uploaded a new version that backs out the changes to elliptical orbits that may have been causing the slow down. Let me know if it speeds things up. If not let me know.