Skip to content

Commit

Permalink
texture method to generate mipmaps
Browse files Browse the repository at this point in the history
  • Loading branch information
kirnosenko committed Jul 10, 2015
1 parent 9d677e4 commit b6d42d0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion MonoGame.Framework/Graphics/Texture2D.DirectX.cs
Expand Up @@ -36,7 +36,12 @@ private void PlatformConstruct(int width, int height, bool mipmap, SurfaceFormat

// Create texture
GetTexture();
}
}

public void GenerateMipMaps(GraphicsDevice device)
{
device._d3dContext.GenerateMips(GetShaderResourceView());
}

private void PlatformSetData<T>(int level, int arraySlice, Rectangle? rect, T[] data, int startIndex, int elementCount) where T : struct
{
Expand Down

0 comments on commit b6d42d0

Please sign in to comment.