protected override bool RenderThumbnail(RenderTarget renderTarget) { var sceneManager = new SceneManager(this.framework.Device, this.framework.AssetManager); sceneManager.AddRenderable(new MeshNode(this.framework.Device, Mesh)); sceneManager.LocateCameraLookingMesh(Mesh); return sceneManager.Render(this.framework.Renderer, renderTarget, false); }
protected override bool RenderThumbnail(RenderTarget renderTarget) { var mesh = Mesh.CreateSphere(this.framework.Device, this.framework.AssetManager, Material, 5.0f, 80, 80); var sceneManager = new SceneManager(this.framework.Device, this.framework.AssetManager); sceneManager.AddRenderable(new MeshNode(this.framework.Device, mesh)); sceneManager.LocateCameraLookingMesh(mesh); return sceneManager.Render(this.framework.Renderer, renderTarget, false); }
protected override bool RenderThumbnail(RenderTarget renderTarget) { var fontScale = 1.0f; var printPos = new Vector2(0.0f, renderTarget.Size.Height / 2.0f - Font.CharHeight * fontScale); var sampleSprite = new FontSampleSprite(Font, "The quick brown fox jumps over the lazy dog. 1234567890", Color.White, printPos, fontScale); return this.framework.Renderer.Render(renderTarget, null, new List<ISprite>() { sampleSprite }, new Camera(), new Light(), false); }
public RenderSystem(Device device, SpriteRenderer spriteRenderer) { if (device == null) throw new ArgumentNullException("device"); if (spriteRenderer == null) throw new ArgumentNullException("spriteRenderer"); this.device = device; this.spriteRenderer = spriteRenderer; PrimaryRenderTarget = new RenderTarget(); }
public void RenderTargetMock_Constructor_Test() { var rt = new RenderTarget(); }
protected abstract bool RenderThumbnail(RenderTarget renderTarget);
protected override bool RenderThumbnail(RenderTarget renderTarget) { Layout.Size = renderTarget.Size; return LayoutEditorViewModel.SceneManager.Render(this.framework.Renderer, renderTarget, false); }
protected override bool RenderThumbnail(RenderTarget renderTarget) { return WorldEditorViewModel.SceneManager.Render(framework.Renderer, renderTarget, false); }