away3d / away3d-core-fp11

Away3D engine for Flash Player 11
http://www.away3d.com
Other
639 stars 273 forks source link

SegmentSet Refactoring Invalid #201

Closed tcorbet closed 12 years ago

tcorbet commented 12 years ago

Other than the addition of the formerly missing dispose() method, the 'external contract' of the SegmentSet Class has not changed. The user should expect, therefore, that no change will be required in whatever current use his application makes of that Class in the Master branch.

It does not appear that sufficient testing was performed to insure that that would be the case.

After an hour of testing, it looked to me like the problem must have to do with the changes of textures as materials. Since the SegmentMaterial Class was not touched, I went to the SegmentPass where, indeed, the changes are extensive. I do not have the knowledge to be able to debug/fix the problems. So, I reverted to the Master version of the Class -- only making the necessary changes in overriden methods to make SegmentPass conformant to the new API based on LightPicker logic.

While that probably will have other complications in other environments where enhanced light handling is envisioned, it is a valid fix to the current malfunctioning Dev version. The in-line notes indicate that SegmentPass has not really been redesigned/retested for the new API, so until it functions as a plug-in replacement for existing applications, I would recommend that a hacked version similar to mine be used as a placeholder so that existing applications can continue to be used with the Dev codebranch.

profelis commented 12 years ago

Look this commit https://github.com/profelis/away3d-core-fp11/commit/36fa65566edf0f28d43c5120e641bd38688636cb I use dev branch too, and this commit fixed segments render

tcorbet commented 12 years ago

Since I have zero knowledge of how to write AGAL code, my own patch/work-around left the original _projectionRawData Vector arithmetic in the Constructor and the original AGAL code alone. I just changed the parts of the code that were necessary to 'fake' the new LightPicker wrapper for lights.

Since you seem to know AGAL and since whoever made the change did not correctly replace the _projectionRawData arithmetic with equivalent AGAL code, if yours works, I am sure that is better than my non-fix. I could test it if you like, but I am sure if it is a good fix, you have a good test and hopefully your fix will be applied to the Dev branch. Thank you.

----- Original Message ----- From: "Dima Granetchi" reply@reply.github.com To: "tcorbet" tcorbet@ix.netcom.com Sent: January 09, 2012 12:18 PM Subject: Re: [away3d-core-fp11] SegmentSet Refactoring Invalid (#201)

Look this commit https://github.com/profelis/away3d-core-fp11/commit/36fa65566edf0f28d43c5120e641bd38688636cb I use dev branch too, and this commit fixed segments render


Reply to this email directly or view it on GitHub: https://github.com/away3d/away3d-core-fp11/issues/201#issuecomment-3419485


No virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.1901 / Virus Database: 2109/4720 - Release Date: 01/03/12

DerSchmale commented 12 years ago

I think this was a result of a faulty merge overwriting an index. The above fix works in some cases, but would break for RTT. The latest version should fix things.

profelis commented 12 years ago

Thanks. I didn't know about rtt. I see my fault now.