OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

FLT plugin rescale some textures with dimensions non power of two


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Plugins [osgPlugins]
View previous topic :: View next topic  
Author Message
mfournigault
Newbie


Joined: 30 Apr 2013
Posts: 8

PostPosted: Tue Jun 11, 2013 1:05 pm    Post subject:
FLT plugin rescale some textures with dimensions non power of two
Reply with quote

Hi everyone,

I have some troubles with loading FLT models in my osg program.
For some models, if their textures have dimensions that are not power of two, the plugin enters in a case where it rescale those textures with the greatest power of two.
And the result is that finally the model is not mapped with textures who were "badlly dimensioned".

My program run on linux, with opengl 4.2, on a nvidia quadro 600.
Of course, my system supportes the ARB extension for textures with dimensions that are not power of two.

Is there any flt option that I can tune to avoid this problem ?
Or is there anyone that solved this kind of problem ?


Thank you for your replies and ideas !

Cheers,
Mike
Back to top
View user's profile Send private message
mfournigault
Newbie


Joined: 30 Apr 2013
Posts: 8

PostPosted: Wed Jul 31, 2013 6:53 pm    Post subject:
FLT plugin rescale some textures with dimensions non power of two
Reply with quote

Hi everyone,

I have some troubles with loading FLT models in my osg program.
For some models, if their textures have dimensions that are not power of two, the plugin enters in a case where it rescale those textures with the greatest power of two.
And the result is that finally the model is not mapped with textures who were "badlly dimensioned".

My program run on linux, with opengl 4.2, on a nvidia quadro 600.
Of course, my system supportes the ARB extension for textures with dimensions that are not power of two.

Is there any flt option that I can tune to avoid this problem ?
Or is there anyone that solved this kind of problem ?


Thank you for your replies and ideas !

Cheers,
Mike

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=54548#54548







------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12144

PostPosted: Fri Aug 02, 2013 9:24 am    Post subject:
FLT plugin rescale some textures with dimensions non power of two
Reply with quote

Hi Mike,

The osg::Texture class has a method:

/** Sets whether to force the texture to resize images that
have dimensions
* that are not a power of two. If enabled, NPOT images will
be resized,
* whether or not NPOT textures are supported by the
hardware. If disabled,
* NPOT images will not be resized if supported by hardware. */
inline void setResizeNonPowerOfTwoHint(bool flag) {
_resizeNonPowerOfTwoHint = flag; }

The can be used to hint to the texture whether to do the rescale or
not. For compatibility with old hardware this still defaults to
false, and the OpenFlight plugin doens't have an option for setting it
on Texture's it creates. You can however, traverse the loaded
subgraph and set the above hint on all the texturtes you find.

Robert.


On 11 June 2013 13:05, Mike Fournigault <> wrote:
Quote:
I have some troubles with loading FLT models in my osg program.
For some models, if their textures have dimensions that are not power of two, the plugin enters in a case where it rescale those textures with the greatest power of two.
And the result is that finally the model is not mapped with textures who were "badlly dimensioned".

My program run on linux, with opengl 4.2, on a nvidia quadro 600.
Of course, my system supportes the ARB extension for textures with dimensions that are not power of two.

Is there any flt option that I can tune to avoid this problem ?
Or is there anyone that solved this kind of problem ?

Thank you for your replies and ideas !


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
mfournigault
Newbie


Joined: 30 Apr 2013
Posts: 8

PostPosted: Tue Aug 20, 2013 11:02 am    Post subject:
Reply with quote

Hi Robert,

Thanks for your precise answer.
I will follow your board.

Cheers,
Mike
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Plugins [osgPlugins] All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Could not find plugin to load objects sdef General [3rdparty] 0 Sat Oct 27, 2018 6:10 am View latest post
No new posts Osgdem created terrains not displayin... D.J. Caldwell General 3 Wed Oct 24, 2018 7:32 pm View latest post
No new posts osg3.6.3 plugin issues jaisingla Plugins [osgPlugins] 2 Thu Oct 18, 2018 6:35 am View latest post
No new posts building the fbx plugin Tare Plugins [osgPlugins] 2 Wed Oct 10, 2018 3:04 pm View latest post
No new posts TIFF plugin reader does not handle im... Eric Sokolowsky Submission 0 Sat Sep 29, 2018 2:30 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP