Пример #1
0
 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);
 }
Пример #2
0
 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);
 }
Пример #3
0
        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);
        }
Пример #4
0
        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();
        }
Пример #5
0
 public void RenderTargetMock_Constructor_Test()
 {
     var rt = new RenderTarget();
 }
Пример #6
0
 protected abstract bool RenderThumbnail(RenderTarget renderTarget);
Пример #7
0
 protected override bool RenderThumbnail(RenderTarget renderTarget)
 {
     Layout.Size = renderTarget.Size;
     return LayoutEditorViewModel.SceneManager.Render(this.framework.Renderer, renderTarget, false);
 }
Пример #8
0
 protected override bool RenderThumbnail(RenderTarget renderTarget)
 {
     return WorldEditorViewModel.SceneManager.Render(framework.Renderer, renderTarget, false);
 }