Great idea! I like this patch.
I have one small suggestion. Instead of always creating both the
repeating and clamped texture, I might delay the instantiation until
needed. I started making this change by putting the texture
initialization in the toTextureStateSet method. However, that method is
declared a "const" method, which I could have either removed the "const"
or declared the two texture objects mutable. I assumed that was a reason
for the method to be "const," so I stopped work on this change and
decided just to send this email.
So, other than this small suggestion, I am happy with this patch. I
think the temporary overhead of at most one extra texture object per
texture used in an AC3D model could be considered negligible enough to
not bother. So, unless Mathias considers my suggestion worth pursuing, I
would just commit his patch.
Thanks
John Cummings
Mathias Fröhlich wrote:
Hi,
I had a quick look at the problem.
Attached is a change that is able to provide shared textures for the clamp and
the repeat case.
So this appears to be the best fix I guess ...
Also it additionaly shares the TexEnv StateAttribute in a whole ac3d model.
The attached change is based on rev 8946.
Please apply.
Thanks
Mathias
--
Dr. Mathias Fröhlich, science + computing ag, Software Solutions
Hagellocher Weg 71-75, D-72070 Tuebingen, Germany
Phone: +49 7071 9457-268, Fax: +49 7071 9457-511
--
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Florian Geyer,
Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Prof. Dr. Hanns Ruder
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org