You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use MonoGame 3.4 on Windows (Windows DirectX project) with Visual Studio 2015.
I have this texture into DXT1 format:
When I use this code:
Texture2Dtexture;SpriteBatchspriteBatch;protectedoverridevoidLoadContent(){spriteBatch=new SpriteBatch(GraphicsDevice);// Load Dxt1 texture (256x256).texture= Content.Load<Texture2D>("t");byte[]data=newbyte[texture.Width * texture.Height /2];// Dxt1 correct data size
texture.GetData(data);
texture.SetData(data);// Now texture is corrupted.}protectedoverridevoidDraw(GameTimegameTime){
GraphicsDevice.Clear(Color.CornflowerBlue);
spriteBatch.Begin();
spriteBatch.Draw(texture, Vector2.Zero, Color.White);
spriteBatch.End();base.Draw(gameTime);}
I get this result:
But, the same code with the texture into Color format (ARGB8) work fine.
I have also tried with DXT3 and DXT5 format and it's the same result as DXT1: texture is corrupted.
A previous issue thread #3590 suggest to change the type of struct to get texture data to avoid troubles, but no changes for DXT textures this time.
The text was updated successfully, but these errors were encountered:
I use MonoGame 3.4 on Windows (Windows DirectX project) with Visual Studio 2015.
I have this texture into DXT1 format:
When I use this code:
I get this result:
But, the same code with the texture into Color format (ARGB8) work fine.
I have also tried with DXT3 and DXT5 format and it's the same result as DXT1: texture is corrupted.
A previous issue thread #3590 suggest to change the type of struct to get texture data to avoid troubles, but no changes for DXT textures this time.
The text was updated successfully, but these errors were encountered: