Sign in to follow this  
webjeff

[.net] ContentLoader Power of 2

Recommended Posts

Guys: Is there a way NOT to have a texture scale to a power of 2? I basically want to load the raw data and perform the padding myself into a new power of 2 Texture2D. However, I don't see any way of loading data so it won't do the scale... arggg, the scaling is soo bad. I also prefer not just using File IO and having to parse out the formats, its a benefit that .NET allows you to load many different formats... just wish I could specify no scaling. Any ideas would be GREATLY appreciated. Jeff.

Share this post


Link to post
Share on other sites
I'm pretty sure you're talking about xna, but you should still specify what library you're talking about.

When using the Xna content pipeline as is, you get what you get.

I haven't messed with it much myself, but you could look at creating custom content loaders/processors. You may be able to derive from the current texture loader and alter it's behavior.

Two other alternatives: one, if your game is windows only, you don't need to load the textures through the pipeline. Secondly, you could also load the image data with other utility such as System.Drawing.Bitmap or DevIL, and create the texture yourself from that.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this