public GetEffectPass ( string technique, string pass ) : |
||
technique | string | |
pass | string | |
return |
public void Build(RTSRenderer renderer, RTSFXEntity fx, string technique, string pass, string texture) { vb = renderer.CreateVertexBuffer(VertexPositionTexture.VertexDeclaration, 4, BufferUsage.WriteOnly); vb.SetData(new VertexPositionTexture[] { new VertexPositionTexture(new Vector3(-1, 0, -1), Vector2.Zero), new VertexPositionTexture(new Vector3(1, 0, -1), Vector2.UnitX), new VertexPositionTexture(new Vector3(-1, 0, 1), Vector2.UnitY), new VertexPositionTexture(new Vector3(1, 0, 1), Vector2.One) }); ib = renderer.CreateIndexBuffer(IndexElementSize.ThirtyTwoBits, 6, BufferUsage.WriteOnly); ib.SetData(new int[] { 0, 1, 2, 2, 1, 3 }); dvb = renderer.CreateDynamicVertexBuffer(VertexHealthInstance.Declaration, MAX_COUNT, BufferUsage.WriteOnly); instances = new VertexHealthInstance[MAX_COUNT]; vbBinds = new VertexBufferBinding[] { new VertexBufferBinding(vb), new VertexBufferBinding(dvb, 0, 1) }; fxPass = fx.GetEffectPass(technique, pass); }
public void Build(RTSRenderer renderer, RTSFXEntity fx, string technique, string pass, string texture) { vb = renderer.CreateVertexBuffer(VertexPositionTexture.VertexDeclaration, 4, BufferUsage.WriteOnly); vb.SetData(new VertexPositionTexture[] { new VertexPositionTexture(new Vector3(-1, 0, -1), Vector2.Zero), new VertexPositionTexture(new Vector3(1, 0, -1), Vector2.UnitX), new VertexPositionTexture(new Vector3(-1, 0, 1), Vector2.UnitY), new VertexPositionTexture(new Vector3(1, 0, 1), Vector2.One) }); ib = renderer.CreateIndexBuffer(IndexElementSize.ThirtyTwoBits, 6, BufferUsage.WriteOnly); ib.SetData(new int[] { 0, 1, 2, 2, 1, 3 }); dvb = renderer.CreateDynamicVertexBuffer(VertexHealthInstance.Declaration, MAX_COUNT, BufferUsage.WriteOnly); instances = new VertexHealthInstance[MAX_COUNT]; vbBinds = new VertexBufferBinding[]{ new VertexBufferBinding(vb), new VertexBufferBinding(dvb, 0, 1) }; fxPass = fx.GetEffectPass(technique, pass); }