示例#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
文件: Asset.cs 项目: HaKDMoDz/Irelia
 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);
 }