#include "sbox/rendercallbacks.h"

native class CReadTexturePixelsManagedCallback as NativeEngine.CReadTexturePixelsManagedCallback : IReadTexturePixelsCallback
{
	void DeleteThis(); [delete]
	static CReadTexturePixelsManagedCallback Create(); [new]

	void SetManagedId( int id );
	int GetManagedId();

	void Done();
}

native class CReadBufferManagedCallback as NativeEngine.CReadBufferManagedCallback : IReadBufferCallback
{
	void DeleteThis(); [delete]
	static CReadBufferManagedCallback Create(); [new]

	void SetManagedId( int id );
	int GetManagedId();

	void Done();
}

managed static class Sandbox.AsyncGPUReadback
{
	void DispatchManagedReadTextureCallback( NativeEngine.CReadTexturePixelsManagedCallback caller, IntPtr pData, ImageFormat format, int nMipLevel, int nWidth, int nHeight, int nPitchInBytes );
	void DispatchManagedReadBufferCallback( NativeEngine.CReadBufferManagedCallback caller, IntPtr pData, int nBytes );
}
