Landscape::setZRotation() doesn't work correctly for old_style landscapes

Bug #604258 reported by Bogdan Marinov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Stellarium
Fix Released
Undecided
Unassigned

Bug Description

Landscape::setZRotation() doesn't work correctly for old_style landscapes. It affects only the base texture, not the side textures.

Possible reason: angleRotateZOffset is not used in LandscapeOldStyle::drawDecor(). Perhaps it had been used, but it was moved somewhere else because of optimization?

Proposed solution: if recalculating the rotation each time is too costly, simply reimplement setZRotation() for LandscapeOldStyle so that the costly calculations are done only when the value of angleRotateZOffset is changed.

Revision history for this message
Fabien Chéreau (xalioth) wrote :

How do you reproduce that?
Fab

Changed in stellarium:
status: New → Incomplete
Revision history for this message
Bogdan Marinov (daggerstab) wrote :

I have a test case, but it's a modification of the ExampleDialog plug-in. I'll send it after the feature freeze - I want to do some other work before that.

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

Here's the test case - a plug-in that is supposed to rotate the landscape.

1. Check out the Example Dialog plug-in from here:
http://stellarium.svn.sourceforge.net/viewvc/stellarium/trunk/extmodules/ExampleDialog/
You can directly "Download GNU tarball" as you don't need version control:
http://stellarium.svn.sourceforge.net/viewvc/stellarium/trunk/extmodules/ExampleDialog/?view=tar

2. Apply the attached patch

3. Build and try to use. On old_style landscapes, only the base texture will rotate.

Before, angleRotateZOffset was used every time the horizon textures were drawn in the Landscape class. Now, it is used only in the initialization function - load().

Changed in stellarium:
status: Incomplete → Triaged
Revision history for this message
Fabien Chéreau (xalioth) wrote :

should be fixed in rev 4833

Changed in stellarium:
status: Triaged → Fix Committed
milestone: none → 0.10.6
Changed in stellarium:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.