Sign in to follow this  
REspawn

[.net] Reading an 8bit texture with palette through graphics stream

Recommended Posts

Hi, I wondering if there is an easy way to read an 8bit texture with its palette through a graphics stream like you do with dxt1 textures, like the code below?
gs = textures[i].TextureImage.LockRectangle(0, LockFlags.Discard);
chunk = br.ReadBytes(Convert.ToInt32(whereYouShouldBe - br.BaseStream.Position));
gs.Write(chunk);
textures[i].TextureImage.UnlockRectangle(0);

Thanks for any help, -Dave

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