port from perforce

This commit is contained in:
2026-04-18 22:31:51 +02:00
commit 8d0ab5b7cc
8409 changed files with 3972376 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
using SlimDX;
using SlimDX.Direct3D10;
namespace Aiwaz.Contracts
{
public class ViewPort
{
public ViewPort()
{
MaxDepth = 1.0f;
}
public int TopLeftX;
public int TopLeftY;
public int Width;
public int Height;
public float MinDepth;
public float MaxDepth;
public static implicit operator SlimDX.Direct3D10.Viewport(ViewPort vp)
{
return new SlimDX.Direct3D10.Viewport(vp.TopLeftX, vp.TopLeftY, vp.Width, vp.Height, vp.MinDepth, vp.MaxDepth);
}
};
public enum BindFlags
{
None = 0x000,
ClearDepthStencil = 0x001,
ClearColor = 0x002,
ClearAll = 0x00F,
BindAdditionalTexture0 = 0x010,
BindAdditionalTexture1 = 0x020,
BindAdditionalTexture2 = 0x040,
BindAdditionalTexture3 = 0x080,
BindBaseTexture = 0x100,
BindAllTextures = 0xFF0,
Default = ClearAll | BindAllTextures
};
public interface IRenderTargetBase
{
float ClearDepth { get; set; }
byte ClearStencil { get; set; }
Color4 ClearColor { get; set; }
ViewPort ViewPort { get; set; }
int RenderTargetWidth { get; }
int RenderTargetHeight { get; }
SlimDX.DXGI.Format RenderTargetFormat { get; }
bool HasDepthStencilBuffer { get; set; }
RenderTargetView DX10RenderTargetView { get; }
DepthStencilView DX10DepthStencilView { get; }
void AddAdditionalRenderTarget(IRenderTargetBase target);
void RemoveAdditionalRenderTarget(IRenderTargetBase target);
void Bind(BindFlags bindFlags);
void UnbindAllRenderTargets();
};
}