public void SetSurfaceCopyDataStageCallback(ISurfaceCopyStage stage, Action <TextureData> callback) { if (stage == null) { throw new Yak2DException("Unable to set GPU to CPU surface pixel data copy callback as stage passed is null"); } SetSurfaceCopyDataStageCallback(stage.Id, callback); }
public void CopySurfaceData(ISurfaceCopyStage stage, ITexture source) { if (stage == null) { throw new Yak2DException("Unable to queue CopySurfaceData. Stage is null", new ArgumentNullException()); } if (source == null) { throw new Yak2DException("Unable to queue CopySurfaceData. Source is null", new ArgumentNullException()); } _commandQueue.Add(RenderCommandType.GpuToCpuSurfaceCopy, stage.Id, source.Id, 0UL, //Highjacked the camera slot for a user integer 0UL, 0UL, 0UL, 0UL, RgbaFloat.Clear ); }