Add IPostProcessWorldShader for custom effect render passes.
This commit is contained in:
@@ -648,6 +648,7 @@ namespace OpenRA.Platforms.Default
|
||||
readonly Func<object, object> setData2;
|
||||
readonly Action<object> setData3;
|
||||
readonly Func<object, object> setData4;
|
||||
readonly Action<object> setData5;
|
||||
readonly Action dispose;
|
||||
|
||||
public ThreadedTexture(ThreadedGraphicsContext device, ITextureInternal texture)
|
||||
@@ -663,6 +664,7 @@ namespace OpenRA.Platforms.Default
|
||||
setData2 = tuple => { setData1(tuple); return null; };
|
||||
setData3 = tuple => { var t = ((float[], int, int))tuple; texture.SetFloatData(t.Item1, t.Item2, t.Item3); };
|
||||
setData4 = tuple => { setData3(tuple); return null; };
|
||||
setData5 = rect => texture.SetDataFromReadBuffer((Rectangle)rect);
|
||||
dispose = texture.Dispose;
|
||||
}
|
||||
|
||||
@@ -725,6 +727,11 @@ namespace OpenRA.Platforms.Default
|
||||
}
|
||||
}
|
||||
|
||||
public void SetDataFromReadBuffer(Rectangle rect)
|
||||
{
|
||||
device.Post(setData5, rect);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
device.Post(dispose);
|
||||
|
||||
Reference in New Issue
Block a user