Re: [osg-users] OSGExp patch for texture clamp and mirror

2011-05-23 Thread Farshid Lashkari
Thanks again.

On Mon, May 23, 2011 at 3:44 AM, Laurens Voerman l.voer...@rug.nl wrote:

 Hi Farshid,
 seems to me your version is working perfectly fine. I had to create a
 testmodel to see the sharing for different max materials, it's not something
 that happens in our models often.

 I attach a few unrelated small fixes:

 src\Helpers\OSGHelper.def
 src\OSGExp\OSGExp.def

 src\OSGExp\Export.cpp
 src\OSGExp\Util.cpp


 The .def files fix a (innocent) warning from visual studio:
 OSGExp.exp : warning LNK4070: /OUT:OSGExp.dll directive in .EXP differs
 from output filename
 'C:\Users\laurens\osg2\osgExp\sourceforge_svn_modtrunk_2010_vc91\src\OSGExp\Release\OSGExp.dle';
 ignoring directive

 The change in Export.cpp (tri-DeleteThis instead of delete tri 2x) is
 probably from a time I tested with a compliler not matching the compiler
 used to compile 3dstudio.

 The change in util avoids a double dynamic_cast and fixes a memory leak.

 Laurens.



 On 5/20/2011 7:58 PM, Farshid Lashkari wrote:

 Hi Laurens,

 I just committed your patch, but with a small change to support texture
 caching. The texture cache now takes the wrap mode of the texture into
 account, so it should be able to reuse textures that use the same wrap
 mode (which is the more common case). Can you please test out the
 changes and let me know if it work with your models?

 Cheers,
 Farshid

 On Fri, May 20, 2011 at 10:17 AM, Farshid Lashkari fla...@gmail.com
 mailto:fla...@gmail.com wrote:

Thanks Laurens. I have a concern though.

Your change to createTexture2D breaks the texture caching feature.
I believe I understand why you made that change, since the texture
wrap modes might be different per texture instance. Maybe a better
approach would be to only create a new texture instance if the wrap
mode is different? I wish OSG supported setting the wrap mode
independently of the texture.

Cheers,
Farshid

On Fri, May 20, 2011 at 5:46 AM, Laurens Voerman l.voer...@rug.nl
mailto:l.voer...@rug.nl wrote:

Hi Farshid,
attached is a patch for svn revision 205 (current Fri 20 May)
for setting the texture repeat/tile mirror options according to
the max material settings.

Regards,
Laurens.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
mailto:osg-users@lists.openscenegraph.org


 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org





 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSGExp patch for texture clamp and mirror

2011-05-20 Thread Farshid Lashkari
Thanks Laurens. I have a concern though.

Your change to createTexture2D breaks the texture caching feature. I
believe I understand why you made that change, since the texture wrap modes
might be different per texture instance. Maybe a better approach would be to
only create a new texture instance if the wrap mode is different? I wish OSG
supported setting the wrap mode independently of the texture.

Cheers,
Farshid

On Fri, May 20, 2011 at 5:46 AM, Laurens Voerman l.voer...@rug.nl wrote:

 Hi Farshid,
 attached is a patch for svn revision 205 (current Fri 20 May) for setting
 the texture repeat/tile mirror options according to the max material
 settings.

 Regards,
 Laurens.

 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSGExp patch for texture clamp and mirror

2011-05-20 Thread Farshid Lashkari
Hi Laurens,

I just committed your patch, but with a small change to support texture
caching. The texture cache now takes the wrap mode of the texture into
account, so it should be able to reuse textures that use the same wrap mode
(which is the more common case). Can you please test out the changes and let
me know if it work with your models?

Cheers,
Farshid

On Fri, May 20, 2011 at 10:17 AM, Farshid Lashkari fla...@gmail.com wrote:

 Thanks Laurens. I have a concern though.

 Your change to createTexture2D breaks the texture caching feature. I
 believe I understand why you made that change, since the texture wrap modes
 might be different per texture instance. Maybe a better approach would be to
 only create a new texture instance if the wrap mode is different? I wish OSG
 supported setting the wrap mode independently of the texture.

 Cheers,
 Farshid

 On Fri, May 20, 2011 at 5:46 AM, Laurens Voerman l.voer...@rug.nl wrote:

 Hi Farshid,
 attached is a patch for svn revision 205 (current Fri 20 May) for setting
 the texture repeat/tile mirror options according to the max material
 settings.

 Regards,
 Laurens.

 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org