add convenience method for presenting a whole texture

main
cosmonaut 2021-01-18 17:53:07 -08:00
parent 7a98e98fc3
commit 2145e87ae0
1 changed files with 28 additions and 0 deletions

View File

@ -352,6 +352,34 @@ namespace Campari
); );
} }
public void QueuePresent(
Texture texture,
Refresh.Filter filter
) {
var refreshTextureSlice = new Refresh.TextureSlice
{
texture = texture.Handle,
rectangle = new Refresh.Rect
{
x = 0,
y = 0,
w = (int) texture.Width,
h = (int) texture.Height
},
layer = 0,
level = 0,
depth = 0
};
Refresh.Refresh_QueuePresent(
Device.Handle,
Handle,
ref refreshTextureSlice,
IntPtr.Zero,
filter
);
}
public void CopyTextureToTexture( public void CopyTextureToTexture(
ref TextureSlice sourceTextureSlice, ref TextureSlice sourceTextureSlice,
ref TextureSlice destinationTextureSlice, ref TextureSlice destinationTextureSlice,