   [SlimDx] Simple triangle wont render
  Hi,I created a class to render a simple triangle (using sample code) and that renders fine. But it doesnt use any Matrices or camera.So I started to change the class. Created a new camera object, included a new effect file, passed in effect params to set view/projection/world.But the result is a black screen, and I cannot figure out why. It must be something really obvious, can anyone spot it?using System;using Buffer = SlimDX.Direct3D10.Buffer;using Device = SlimDX.Direct3D10.Device;using SlimDX;using SlimDX.Direct3D10;using SlimDX.DXGI;using SlimDX.Windows;namespace Beta{    public class WorldTriangle : IFrameworkObject    {   const int sizeOfStream = 32;   const int numVertices = 3;   private Effect effect;   private EffectTechnique technique;   private EffectPass pass;   private InputLayout layout;   private Buffer vertices;   public WorldTriangle(GraphicsDevice graphicsDevice)   {  this.effect = Effect.FromFile(graphicsDevice.Device, "Effects\\WorldTriangle.fx", "fx_4_0", ShaderFlags.None, EffectFlags.None, null, null);  layout = new InputLayout(graphicsDevice.Device, effect.GetTechniqueByIndex(0).GetPassByIndex(0).Description.Signature, new[] {   new InputElement("POSITION", 0, Format.R32G32B32A32_Float, 0, 0),   new InputElement("COLOR", 0, Format.R32G32B32A32_Float, 16, 0)});  var stream = new DataStream(numVertices * sizeOfStream, true, true);  stream.WriteRange(new[] { new Vector4(0.0f, 0.5f, 0.5f, 1.0f), new Vector4(1.0f, 0.0f, 0.0f, 1.0f), new Vector4(0.5f, -0.5f, 0.5f, 1.0f), new Vector4(0.0f, 1.0f, 0.0f, 1.0f), new Vector4(-0.5f, -0.5f, 0.5f, 1.0f), new Vector4(0.0f, 0.0f, 1.0f, 1.0f)  });  stream.Position = 0;  vertices = new SlimDX.Direct3D10.Buffer(graphicsDevice.Device, stream, new BufferDescription()  { BindFlags = BindFlags.VertexBuffer, CpuAccessFlags = CpuAccessFlags.None, OptionFlags = ResourceOptionFlags.None, SizeInBytes = numVertices * sizeOfStream, Usage = ResourceUsage.Default  });  stream.Dispose();   }   public void Render(GraphicsDevice graphicsDevice, Camera camera)   {  graphicsDevice.Device.InputAssembler.SetInputLayout(layout);  graphicsDevice.Device.InputAssembler.SetPrimitiveTopology(PrimitiveTopology.TriangleList);  graphicsDevice.Device.InputAssembler.SetVertexBuffers(0, new VertexBufferBinding(vertices, sizeOfStream, 0));  effect.GetVariableByName("Projection").AsMatrix().SetMatrix(camera.Projection);  effect.GetVariableByName("View").AsMatrix().SetMatrix(camera.View);  effect.GetVariableByName("World").AsMatrix().SetMatrix(Matrix.Identity);  effect.GetTechniqueByIndex(0).GetPassByIndex(0).Apply();  graphicsDevice.Device.Draw(numVertices, 0);   }   public void Dispose()   {  Dispose(true);   }   private void Dispose(bool calledExplicitly)   {  if (calledExplicitly)  { vertices.Dispose(); layout.Dispose(); effect.Dispose();  }   }    }}The camera has been set to position 0,0,10, looking at 0,0,0.   public Matrix Projection   {  get { return Matrix.PerspectiveFovLH(45.0f, width / (float)height, 1.0f, 1000.0f); }   }   public Matrix View   {  get { return Matrix.LookAtLH(Position, Target, up); }   }The effect file is pretty simple:float4x4 World;float4x4 View;float4x4 Projection;struct VertexShaderInput{    float4 Position : POSITION;    float4 col : COLOR;};struct VertexShaderOutput{    float4 Position : SV_POSITION;float4 col : COLOR;};VertexShaderOutput VertexShaderFunction(VertexShaderInput input){    VertexShaderOutput output;    float4 worldPosition = mul(input.Position, World);    float4 viewPosition = mul(worldPosition, View);    output.Position = mul(viewPosition, Projection);output.col = input.col;    return output;}float4 PixelShaderFunction(VertexShaderOutput input) : SV_Target{    return input.col;}technique10 Render{pass P0{SetGeometryShader( 0 );SetVertexShader( CompileShader( vs_4_0, VertexShaderFunction() ) );SetPixelShader( CompileShader( ps_4_0, PixelShaderFunction() ) );}}One other question, when setting the device viewport, should the maxZ value correspond to the same Zfar in the camera? I noticed from the examples its always 1.device.Rasterizer.SetViewports(new Viewport(0, 0, form.ClientSize.Width, form.ClientSize.Height, 0.0f, 1.0f)); 