Add Begin() and End() functions to each extension for pre/post frame tasks.
This commit is contained in:
@@ -42,11 +42,23 @@ namespace Dashboard.Pal
|
||||
Dispose(false);
|
||||
}
|
||||
|
||||
public virtual void Begin() { }
|
||||
public virtual void Begin()
|
||||
{
|
||||
foreach (IDeviceContextExtension extension in _extensions)
|
||||
{
|
||||
extension.Begin();
|
||||
}
|
||||
}
|
||||
|
||||
// public abstract void Paint(object renderbuffer);
|
||||
|
||||
public virtual void End() { }
|
||||
public virtual void End()
|
||||
{
|
||||
foreach (IDeviceContextExtension extension in _extensions)
|
||||
{
|
||||
extension.End();
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsExtensionAvailable<T>() where T : IDeviceContextExtension
|
||||
{
|
||||
|
||||
@@ -2,5 +2,7 @@ namespace Dashboard.Pal
|
||||
{
|
||||
public interface IDeviceContextExtension : IContextExtensionBase<DeviceContext>
|
||||
{
|
||||
void Begin() {}
|
||||
void End() {}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user