RenderSystem DX11: it is rendering now

This commit is contained in:
Glatzemann 2011-12-14 13:02:49 +00:00
parent 469620eee7
commit 2629fa1c81
4 changed files with 7 additions and 4 deletions

View File

@ -76,6 +76,7 @@ namespace ANX.RenderSystem.Windows.DX11
for (int i = 0; i < blendStateDescription.RenderTarget.Length; i++) for (int i = 0; i < blendStateDescription.RenderTarget.Length; i++)
{ {
blendStateDescription.RenderTarget[i] = new RenderTargetBlendDescription(); blendStateDescription.RenderTarget[i] = new RenderTargetBlendDescription();
blendStateDescription.RenderTarget[i].IsBlendEnabled = (i < 4);
blendStateDescription.IndependentBlendEnable = true; blendStateDescription.IndependentBlendEnable = true;
} }

View File

@ -139,7 +139,7 @@ namespace ANX.RenderSystem.Windows.DX11
#else #else
Device.CreateWithSwapChain(DriverType.Hardware, DeviceCreationFlags.None, desc, out dxDevice, out swapChain); Device.CreateWithSwapChain(DriverType.Hardware, DeviceCreationFlags.None, desc, out dxDevice, out swapChain);
#endif #endif
this.deviceContext = new DeviceContext(dxDevice); this.deviceContext = dxDevice.ImmediateContext;
// Ignore all windows events // Ignore all windows events
Factory factory = swapChain.GetParent<Factory>(); Factory factory = swapChain.GetParent<Factory>();

View File

@ -10,8 +10,10 @@ namespace RenderTarget
/// Der Haupteinstiegspunkt für die Anwendung. /// Der Haupteinstiegspunkt für die Anwendung.
/// </summary> /// </summary>
static void Main(string[] args) static void Main(string[] args)
{ {
//AddInSystemFactory.Instance.PreferredRenderSystem = "OpenGL3"; //AddInSystemFactory.Instance.PreferredRenderSystem = "OpenGL3";
//AddInSystemFactory.Instance.PreferredRenderSystem = "DirectX11";
using (Game1 game = new Game1()) using (Game1 game = new Game1())
{ {
game.Run(); game.Run();

View File

@ -12,7 +12,7 @@ namespace WindowsGame1
static void Main(string[] args) static void Main(string[] args)
{ {
//AddInSystemFactory.Instance.PreferredRenderSystem = "OpenGL3"; //AddInSystemFactory.Instance.PreferredRenderSystem = "OpenGL3";
AddInSystemFactory.Instance.PreferredRenderSystem = "DirectX11"; //AddInSystemFactory.Instance.PreferredRenderSystem = "DirectX11";
using (Game1 game = new Game1()) using (Game1 game = new Game1())
{ {