public SimpleVertex(Vector3 position, Vector3 normal, Color4f color) { this.Color = color; this.Normal = Vector3.Normalize(normal); this.Position = position; this.__packing = 0f; }
public SimpleVertex(Vector3 position, Vector3 normal, Color4f color) { this.Color = color; this.Normal = Vector3.Normalize(normal); this.Position = position; this.__packing = 0f; }
public SimpleRenderer() { string title = "SharpDX Renderer (SIMD " + (Vector.IsHardwareAccelerated ? "Enabled" : "Disabled") + ")"; title += Environment.Is64BitProcess ? " 64-bit" : " 32-bit"; this.renderForm = new RenderForm(title); this.renderables = ImmutableArray <IRenderable> .Empty; CreateAndInitializeDevice(); renderForm.Show(); AmbientColor = new Color4f(.25f, .25f, .25f, 1); #if TEXT_RENDERER this.TextRenderer = new SimpleText(this.Get2DGraphicsDevice(), "Fonts/textfont.dds"); #endif }
public DirectionalLight(Device device, DeviceContext deviceContext, Vector3 direction, Color4f color) { this.device = device; this.deviceContext = deviceContext; this.direction = Vector3.Normalize(direction); this.diffuseColor = color; this.lightMatrixBuffer = new SharpDX.Direct3D11.Buffer( device, Marshal.SizeOf(typeof(LightBuffer)), ResourceUsage.Default, BindFlags.ConstantBuffer, CpuAccessFlags.None, ResourceOptionFlags.None, 0); }
public DirectionalLight(Device device, DeviceContext deviceContext, Vector3 direction, Color4f color) { this.device = device; this.deviceContext = deviceContext; this.direction = Vector3.Normalize(direction); this.diffuseColor = color; this.lightMatrixBuffer = new SharpDX.Direct3D11.Buffer( device, Marshal.SizeOf(typeof(LightBuffer)), ResourceUsage.Default, BindFlags.ConstantBuffer, CpuAccessFlags.None, ResourceOptionFlags.None, 0); }
public AmbientLightBuffer(Color4f color) { this.AmbientColor = color; }
private SharpDX.Color ToSharpColor(Color4f color4f) { return(new SharpDX.Color(color4f.R, color4f.G, color4f.B, color4f.A)); }
public void DrawText(string text, Vector2 screenPosition, Color4f color) { //spriteBatch.Begin(); spriteBatch.DrawString(spriteFont, text, ToSharpVector(screenPosition), ToSharpColor(color)); //spriteBatch.End(); }
public SimpleRenderer() { string title = "SharpDX Renderer (SIMD " + (Vector.IsHardwareAccelerated ? "Enabled" : "Disabled") + ")"; title += Environment.Is64BitProcess ? " 64-bit" : " 32-bit"; this.renderForm = new RenderForm(title); this.renderables = ImmutableArray<IRenderable>.Empty; CreateAndInitializeDevice(); renderForm.Show(); AmbientColor = new Color4f(.25f, .25f, .25f, 1); #if TEXT_RENDERER this.TextRenderer = new SimpleText(this.Get2DGraphicsDevice(), "Fonts/textfont.dds"); #endif }
public AmbientLightBuffer(Color4f color) { this.AmbientColor = color; }
private SharpDX.Color ToSharpColor(Color4f color4f) { return new SharpDX.Color(color4f.R, color4f.G, color4f.B, color4f.A); }
public void DrawText(string text, Vector2 screenPosition, Color4f color) { //spriteBatch.Begin(); spriteBatch.DrawString(spriteFont, text, ToSharpVector(screenPosition), ToSharpColor(color)); //spriteBatch.End(); }
public LightBuffer(Color4f diffuseColor, Vector3 direction) { this.diffuseColor = diffuseColor; this.lightDirection = direction; this.__packing = 0; }
public LightBuffer(Color4f diffuseColor, Vector3 direction) { this.diffuseColor = diffuseColor; this.lightDirection = direction; this.__packing = 0; }