mayingzhen / nvidia-texture-tools

Automatically exported from code.google.com/p/nvidia-texture-tools
Other
0 stars 0 forks source link

nvtt::format vs Image::format seems a little odd #63

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
While implementing the lib i runned into a simple, but stupid problem.
Version 2.03

nvtt::Format and Image::Format

Both enums have the same named members Format_RGB, Format_RGBA, but in nvtt
we have 

Format_RGB,
Format_RGBA = Format_RGB,

So if i check the Image.Format() against the nvtt::format i get wrong
results. In my case all maps got converted to dxt5 instead of dxt1 because
i wasnt paying attention that there are 2 Enums with the same name + same
members, but nvtt::Format has a different define for Format_RGBA.

Now silly question why? Is it a typo?

Original issue reported on code.google.com by andyieg....@googlemail.com on 2 Sep 2008 at 5:49

GoogleCodeExporter commented 8 years ago
Oki just noticed why,

Image::Format_ARGB != Format_RGBA

My mistake but maybe rename one of the Format enums to make this more clear :)

Original comment by andyieg....@googlemail.com on 2 Sep 2008 at 5:52

GoogleCodeExporter commented 8 years ago
Image::Format is not part of the public API, so I did not worry much about the 
conflict.

In any case, nvtt::Format should have been named OutputFormat, but it's too 
late to 
change it at this point. I'll keep this in mind for 3.0, but I have no plans to 
start 
working on that anytime soon.

Original comment by cast...@gmail.com on 10 Sep 2008 at 9:42