• Advertisement
Sign in to follow this  

[.net] ContentLoader Power of 2

This topic is 3677 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Just create an image that is a power of two but don't draw the empty area on screen. Or will that not work for your situation?

Share this post


Link to post
Share on other sites
i think .dds Direct X Textures are that way. use portable net graphics(png) and load it onto Texture2D.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement