当前位置: 首页>>代码示例>>C#>>正文


C# RenderHelper.RenderTextureComplete方法代码示例

本文整理汇总了C#中RenderHelper.RenderTextureComplete方法的典型用法代码示例。如果您正苦于以下问题:C# RenderHelper.RenderTextureComplete方法的具体用法?C# RenderHelper.RenderTextureComplete怎么用?C# RenderHelper.RenderTextureComplete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RenderHelper的用法示例。


在下文中一共展示了RenderHelper.RenderTextureComplete方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Draw

 protected override void  Draw(GameTime gameTime, RenderHelper render)
 {
     render.RenderTextureComplete(texture, Color.White, GraphicInfo.FullScreenRectangle, Matrix.Identity);
     render.RenderTextComplete("Demo 17-22:Texture Generates On the fly ", new Vector2(10, 15), Color.White, Matrix.Identity);
     render.RenderTextComplete("Random Texture generated Procedurally on CPU", new Vector2(10, 35), Color.White, Matrix.Identity);
     render.RenderTextComplete("Hit Space to change the texture", new Vector2(10, 55), Color.White, Matrix.Identity);
 }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:7,代码来源:ProceduralTextureScreen.cs

示例2: DownColorTexture

 /// <summary>
 /// DownSample a Color Texture (using hardware Linear filtering, cant be used on Single/float Textures)
 /// </summary>
 /// <param name="render">The render.</param>
 /// <param name="Texture2D">The texture2 D.</param>
 /// <param name="SamplerState">State of the sampler.</param>
 /// <returns></returns>
 public Texture2D DownColorTexture(RenderHelper render, Texture2D Texture2D, SamplerState SamplerState)
 {
     render.PushRenderTarget(RenderTarget2D);
     render.RenderTextureComplete(Texture2D, Color.White,
         Rectangle, Matrix.Identity, Texture2D.Bounds,
         true, SpriteSortMode.Deferred, SamplerState);
     return render.PopRenderTargetAsSingleRenderTarget2D();
 }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:15,代码来源:DownSampler.cs

示例3: Draw

        protected override void Draw(GameTime gameTime, RenderHelper render)
        {
            if (drawBackground)
            {
                int w = render.GetViewPort().Width;
                int h = render.GetViewPort().Height;

                render.RenderTextureComplete(backT, Color.White, new Rectangle(0, 0, w, h), Matrix.Identity);
            }
        }
开发者ID:tubitos,项目名称:1,代码行数:10,代码来源:Menu.cs

示例4: Draw

        /// <summary>
        /// This is called when the screen should draw itself.
        /// </summary>
        /// <param name="gameTime"></param>
        /// <param name="render"></param>
        protected override void Draw(GameTime gameTime, RenderHelper render)
        {
            base.Draw(gameTime, render);

            Texture2D logo = GraphicFactory.GetTexture2D("Textures\\engine_logo");
            int wd = 64;
            int hg = 48;
            render.RenderTextureComplete(logo, new Rectangle(this.GraphicInfo.BackBufferWidth - wd, this.GraphicInfo.BackBufferHeight - hg, wd, hg));

            render.RenderTextComplete("Basic Screen Forward", new Vector2(GraphicInfo.Viewport.Width - 315, 15), Color.White, Matrix.Identity);
        }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:16,代码来源:BasicScreenForwardDemo.cs

示例5: Draw

        public override void Draw(Microsoft.Xna.Framework.Graphics.Texture2D ImageToProcess, RenderHelper rHelper, Microsoft.Xna.Framework.GameTime gt, PloobsEngine.Engine.GraphicInfo GraphicInfo, IWorld world, bool useFloatBuffer)
        {            
            //mix with last frame downsampled
            if (tex != null)
            {
                rHelper.PushRenderTarget(rtend);
                rHelper.RenderTextureComplete(tex, Color.FromNonPremultiplied(255, 255, 255, 255), GraphicInfo.FullScreenRectangle, Matrix.Identity, null, true, SpriteSortMode.Deferred, SamplerState.LinearClamp);
                rHelper.RenderTextureComplete(ImageToProcess, Color.FromNonPremultiplied(255, 255, 255, Amount), GraphicInfo.FullScreenRectangle, Matrix.Identity, null, true, SpriteSortMode.Deferred, SamplerState.LinearClamp, BlendState.AlphaBlend);                
                end = rHelper.PopRenderTargetAsSingleRenderTarget2D();
            }            

            //DownSample
            rHelper.PushRenderTarget(rt);
            rHelper.Clear(Color.Black);
            if (end == null)
            {
                rHelper.RenderTextureComplete(ImageToProcess, Color.White, rt.Bounds, Matrix.Identity, ImageToProcess.Bounds, true, SpriteSortMode.Deferred, SamplerState.AnisotropicClamp);
            }
            else
            {
                rHelper.RenderTextureComplete(end, Color.White, rt.Bounds, Matrix.Identity, ImageToProcess.Bounds, true, SpriteSortMode.Deferred, SamplerState.AnisotropicClamp);
            }
            tex = rHelper.PopRenderTargetAsSingleRenderTarget2D();                        

            if(end!=null)
                rHelper.RenderTextureComplete(end, Color.White, GraphicInfo.FullScreenRectangle, Matrix.Identity, null, true, SpriteSortMode.Deferred, SamplerState.LinearClamp);
            else
                rHelper.RenderTextureComplete(ImageToProcess, Color.White, GraphicInfo.FullScreenRectangle, Matrix.Identity, null, true, SpriteSortMode.Deferred, SamplerState.LinearClamp);
             
        }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:30,代码来源:MotionBlurPostEffect.cs

示例6: Draw

        protected override void Draw(GameTime gameTime, RenderHelper render)
        {
            //MouseState mstate = Mouse.GetState ();

            base.Draw (gameTime, render);

            render.RenderTextComplete ("Demo: Basic Screen Deferred", new Vector2 (GraphicInfo.Viewport.Width - 315, 15), Color.White, Matrix.Identity);

            if (EngineSettings.freeMouse)
            {
                render.RenderTextureComplete (mouseCursor, Color.White, new Rectangle (InputStates.mstate.X, InputStates.mstate.Y, 32, 32), Matrix.Identity);
            }
        }
开发者ID:tubitos,项目名称:1,代码行数:13,代码来源:Level.cs

示例7: Draw

        protected override void  Draw(GameTime gameTime, RenderHelper render)
        {
            if (firsttime)
            {

                ///Generate the PerlinNoise in CPU side using the real equation
                staticRandomTex = GraphicFactory.CreateTexture2DPerlinNoise(800, 600, frequency, amplitude, 0.55f, 8);
                firsttime = false;
            }
            render.RenderTextureComplete(staticRandomTex, Color.White, GraphicInfo.FullScreenRectangle, Matrix.Identity);
            render.RenderTextComplete("Demo 17-22:Texture Generated On the fly ", new Vector2(10, 15), Color.White, Matrix.Identity);
            render.RenderTextComplete("Perlin Noise Texture generated Precedurally ", new Vector2(10, 35), Color.White, Matrix.Identity);
            render.RenderTextComplete("Hit Space to change the texture", new Vector2(10, 55), Color.White, Matrix.Identity);
        }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:14,代码来源:PerlinNoiseScreen.cs

示例8: Draw

        /// <summary>
        /// This is called when the screen should draw itself.
        /// </summary>
        /// <param name="gameTime"></param>
        /// <param name="render"></param>
        protected override void Draw(GameTime gameTime, RenderHelper render)
        {
            ///must be called before
            base.Draw(gameTime, render);


            Texture2D logo = GraphicFactory.GetTexture2D("Textures\\engine_logo");
            int wd = 64;
            int hg = 48;
            render.RenderTextureComplete(logo, new Rectangle(this.GraphicInfo.BackBufferWidth - wd, this.GraphicInfo.BackBufferHeight - hg, wd, hg));

            ///Draw some text to the screen
            render.RenderTextComplete("Demo: Drawing Basic Debug Primitives", new Vector2(GraphicInfo.Viewport.Width - 515, 15), Color.White, Matrix.Identity);
        }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:19,代码来源:DebugDrawScreen.cs

示例9: Draw

        protected override void Draw(GameTime gameTime, RenderHelper render)
        {
            base.Draw(gameTime, render);

            Texture2D logo = GraphicFactory.GetTexture2D("Textures\\engine_logo");
            int wd = 64;
            int hg = 48;
            render.RenderTextureComplete(logo, new Rectangle(this.GraphicInfo.BackBufferWidth - wd, this.GraphicInfo.BackBufferHeight - hg, wd, hg));

            render.RenderTextComplete("Trigger (BEPU)", new Vector2(GraphicInfo.Viewport.Width - 515, 15), Color.White, Matrix.Identity);
            render.RenderTextComplete("Launch balls (Left Mouse buttom) at the red box", new Vector2(GraphicInfo.Viewport.Width - 515, 40), Color.White, Matrix.Identity);
            
            if (shouldDraw)
            {
                render.RenderTextComplete("Object: Trigger Activated " + mesSend.Cod + " Objeto " + triggerSend.ContactEntity.Name, new Vector2(20, 60), Color.White, Matrix.Identity);
                render.RenderTextComplete("RecieveMessage: Trigger Artivated " + rmessage.mesRec.Cod + " Objeto " + triggerSend.ContactEntity.Name, new Vector2(20, 85), Color.White, Matrix.Identity);
            }            
        }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:18,代码来源:TriggerBepuScreen.cs

示例10: Draw

        protected override void Draw(GameTime gameTime, RenderHelper render)
        {
            base.Draw(gameTime, render);

            Texture2D logo = GraphicFactory.GetTexture2D("Textures\\engine_logo");
            int wd = 64;
            int hg = 48;
            render.RenderTextureComplete(logo, new Rectangle(this.GraphicInfo.BackBufferWidth - wd, this.GraphicInfo.BackBufferHeight - hg, wd, hg));

            render.RenderTextComplete("Demo Scripts 2 -> Scrips", new Vector2(GraphicInfo.Viewport.Width - 715, 15), Color.White, Matrix.Identity);
            render.RenderTextComplete("Scripts Advanced Usage: Press Space to send a message to be handled by a script", new Vector2(GraphicInfo.Viewport.Width - 715, 35), Color.White, Matrix.Identity);
            render.RenderTextComplete("Messages recieved: " + recievedMessage, new Vector2(GraphicInfo.Viewport.Width - 715, 55), Color.White, Matrix.Identity);
        }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:13,代码来源:ActionScriptScreen.cs

示例11: Draw

        protected override void Draw(GameTime gameTime, RenderHelper render)
        {
            base.Draw(gameTime, render);

            Texture2D logo = GraphicFactory.GetTexture2D("Textures\\engine_logo");
            int wd = 64;
            int hg = 48;
            render.RenderTextureComplete(logo, new Rectangle(this.GraphicInfo.BackBufferWidth - wd, this.GraphicInfo.BackBufferHeight - hg, wd, hg));

            render.RenderTextComplete("Picking", new Vector2(GraphicInfo.Viewport.Width - 315, 15), Color.White,Matrix.Identity);
            render.RenderTextComplete("Left click to pick an object", new Vector2(GraphicInfo.Viewport.Width - 315, 40), Color.White, Matrix.Identity);

            if (shouldDraw)
            {
                render.RenderTextComplete("Selected -> " + objName, new Vector2(20, 20), Color.White, Matrix.Identity);
                render.RenderTextComplete("Position " + ri.ImpactPosition, new Vector2(20, 40), Color.White, Matrix.Identity);
                render.RenderTextComplete("Normal " + ri.ImpactNormal, new Vector2(20, 60), Color.White, Matrix.Identity);
            }            
        }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:19,代码来源:PickingScreen.cs

示例12: Draw

        protected override void Draw(GameTime gameTime, RenderHelper render)
        {
            base.Draw(gameTime, render);

            Texture2D logo = GraphicFactory.GetTexture2D("Textures\\engine_logo");
            int wd = 64;
            int hg = 48;
            render.RenderTextureComplete(logo, new Rectangle(this.GraphicInfo.BackBufferWidth - wd, this.GraphicInfo.BackBufferHeight - hg, wd, hg));

            render.RenderTextComplete("Demo Scripts 1 -> Scene generated on script file", new Vector2(GraphicInfo.Viewport.Width - 715, 15), Color.White, Matrix.Identity);
            render.RenderTextComplete("Check the Code", new Vector2(GraphicInfo.Viewport.Width - 715, 35), Color.White, Matrix.Identity);            
        }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:12,代码来源:ScriptScreen.cs

示例13: Draw

        /// <summary>
        /// This is called when the screen should draw itself.
        /// </summary>
        /// <param name="gameTime"></param>
        /// <param name="render"></param>
        protected override void Draw(GameTime gameTime, RenderHelper render)
        {
            base.Draw(gameTime, render);

            Texture2D logo = GraphicFactory.GetTexture2D("Textures\\engine_logo");
            int wd = 64;
            int hg = 48;
            render.RenderTextureComplete(logo, new Rectangle(this.GraphicInfo.BackBufferWidth - wd, this.GraphicInfo.BackBufferHeight - hg, wd, hg));


            ///Draw some text on the screen
            render.RenderTextComplete("Demo: PathFinding", new Vector2(GraphicInfo.Viewport.Width - 715, 15), Color.Red, Matrix.Identity);
            render.RenderTextComplete("It uses the Waypoints generated in the last Screen", new Vector2(GraphicInfo.Viewport.Width - 715, 35), Color.Red, Matrix.Identity);
            render.RenderTextComplete("Left Mouse Bottom to place an endpoint for the BlockObject", new Vector2(GraphicInfo.Viewport.Width - 715, 55), Color.Red, Matrix.Identity);
            
        }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:21,代码来源:IaPathFindingScreen.cs

示例14: Draw

        protected override void Draw(GameTime gameTime, RenderHelper render)
        {
            base.Draw(gameTime, render);

            Texture2D logo = GraphicFactory.GetTexture2D("Textures\\engine_logo");
            int wd = 64;
            int hg = 48;
            render.RenderTextureComplete(logo, new Rectangle(this.GraphicInfo.BackBufferWidth - wd, this.GraphicInfo.BackBufferHeight - hg, wd, hg));

            render.RenderTextComplete("Demo: Changing Messages", new Vector2(GraphicInfo.Viewport.Width - 515, 15), Color.White,Matrix.Identity);
            render.RenderTextComplete("Launch balls (Left Mouse Buttom) at the grey platform", new Vector2(GraphicInfo.Viewport.Width - 515, 40), Color.White, Matrix.Identity);

            if (shouldDraw)
            {
                render.RenderTextComplete("Collision With Object: " + objNameTemp, new Vector2(20, 60), Color.White, Matrix.Identity); 
            }
            
        }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:18,代码来源:ChangingMessagesScreen.cs

示例15: Draw

        protected override void Draw(GameTime gameTime, RenderHelper render)
        {
            base.Draw(gameTime, render);

            Texture2D logo = GraphicFactory.GetTexture2D("Textures\\engine_logo");
            int wd = 64;
            int hg = 48;
            render.RenderTextureComplete(logo, new Rectangle(this.GraphicInfo.BackBufferWidth - wd, this.GraphicInfo.BackBufferHeight - hg, wd, hg));

            render.RenderTextComplete("Character Movement", new Vector2(GraphicInfo.Viewport.Width - 315, 15), Color.White,Matrix.Identity);
            render.RenderTextComplete("Space = switch to character camera", new Vector2(GraphicInfo.Viewport.Width  - 315, 40), Color.White,Matrix.Identity);
            
            if(shouldDraw)
            {
            render.RenderTextComplete("T = forward, G = back, F = left, ", new Vector2(20, 15), Color.White,Matrix.Identity);
            render.RenderTextComplete("H = right, R = jump", new Vector2(20, 40), Color.White,Matrix.Identity);
            }
            
            
        }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:20,代码来源:MovementScreen.cs


注:本文中的RenderHelper.RenderTextureComplete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。