Jump to content
  • Advertisement
Sign in to follow this  
FeverGames

XNA DXT texture from byte[]

This topic is 3499 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

Hi, recently I had a topic about going around the XNA content manager, http://www.gamedev.net/community/forums/topic.asp?topic_id=531671, but I was moving to Canada back then, and during this time the topic got "archived". I was wondering, I have a byte[] array for a DXT compressed image and I want to put this into a texture. Now the byte[] array is all the data, so also all the mipmaps. How can I add this to a texture? Writing to a texture inside a graphics card requires it to be dynamic, which is not really efficient. Does anyone have any tips?

Share this post


Link to post
Share on other sites
Advertisement
the current approach i took is to fill a systemMemory with the bytes and copy that to a normal texture in video memory. Is this a good approach?

Share this post


Link to post
Share on other sites
Quote:
Original post by rafalkozik
As I can see, FromFile method takes Stream as parameter. Use MemoryStream class ;)


FromFile is not supported on the XBOX itself that's the reason for doing this, else I could have just loaded it FromFile(string filename) ;-)

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!