Example #1
0
        public void DrawPostFxMaterial(MaterialBase material, GPUTextureView view, ref Viewport viewport, GPUTexture input = null)
        {
#if UNIT_TEST_COMPILANT
            throw new NotImplementedException("Unit tests, don't support methods calls. Only properties can be get or set.");
#else
            Internal_DrawPostFxMaterial3(unmanagedPtr, FlaxEngine.Object.GetUnmanagedPtr(material), view, ref viewport, FlaxEngine.Object.GetUnmanagedPtr(input));
#endif
        }
Example #2
0
        public void Clear(GPUTextureView view, Color color)
        {
#if UNIT_TEST_COMPILANT
            throw new NotImplementedException("Unit tests, don't support methods calls. Only properties can be get or set.");
#else
            Internal_Clear(unmanagedPtr, view, ref color);
#endif
        }
Example #3
0
 /// <summary>
 /// Begins the rendering phrase.
 /// </summary>
 /// <param name="context">The GPU commands context to use.</param>
 /// <param name="output">The output target.</param>
 /// <param name="depthBuffer">The depth buffer.</param>
 /// <param name="viewport">The output viewport.</param>
 /// <param name="viewProjection">The View*Projection matrix. Allows to render GUI in 3D or with custom transformations.</param>
 public static void Begin(GPUContext context, GPUTextureView output, GPUTextureView depthBuffer, ref Viewport viewport, ref Matrix viewProjection)
 {
     Internal_Begin3(FlaxEngine.Object.GetUnmanagedPtr(context), FlaxEngine.Object.GetUnmanagedPtr(output), FlaxEngine.Object.GetUnmanagedPtr(depthBuffer), ref viewport, ref viewProjection);
 }
Example #4
0
 /// <summary>
 /// Draws the render target.
 /// </summary>
 /// <param name="rt">The render target handle to draw.</param>
 /// <param name="rect">The rectangle to draw.</param>
 /// <param name="color">The color to multiply all texture pixels.</param>
 public static void DrawTexture(GPUTextureView rt, Rectangle rect, Color color)
 {
     Internal_DrawTexture(FlaxEngine.Object.GetUnmanagedPtr(rt), ref rect, ref color);
 }
Example #5
0
 /// <summary>
 /// Draws the collected debug shapes to the output.
 /// </summary>
 /// <param name="renderContext">The rendering context.</param>
 /// <param name="target">The rendering output surface handle.</param>
 /// <param name="depthBuffer">The custom depth texture used for depth test. Can be MSAA. Must match target surface size.</param>
 /// <param name="enableDepthTest">True if perform manual depth test with scene depth buffer when rendering the primitives. Uses custom shader and the scene depth buffer.</param>
 public static void Draw(ref RenderContext renderContext, GPUTextureView target = null, GPUTextureView depthBuffer = null, bool enableDepthTest = false)
 {
     Internal_Draw(ref renderContext, FlaxEngine.Object.GetUnmanagedPtr(target), FlaxEngine.Object.GetUnmanagedPtr(depthBuffer), enableDepthTest);
 }
Example #6
0
 /// <summary>
 /// Draws the collected debug shapes to the output.
 /// </summary>
 /// <param name="renderContext">The rendering context.</param>
 /// <param name="target">The rendering output surface handle.</param>
 /// <param name="depthBuffer">The custom depth texture used for depth test. Can be MSAA. Must match target surface size.</param>
 /// <param name="enableDepthTest">True if perform manual depth test with scene depth buffer when rendering the primitives. Uses custom shader and the scene depth buffer.</param>
 public static void Draw(ref RenderContext renderContext, GPUTextureView target = null, GPUTextureView depthBuffer = null, bool enableDepthTest = false)
 {
 }
 /// <summary>
 /// Draws postFx material to the render target.
 /// </summary>
 /// <param name="context">The GPU commands context to use.</param>
 /// <param name="renderContext">The rendering context.</param>
 /// <param name="material">The material to render. It must be a post fx material.</param>
 /// <param name="output">The output texture. Must be valid and created.</param>
 /// <param name="input">The input texture. It's optional.</param>
 public static void DrawPostFxMaterial(GPUContext context, ref RenderContext renderContext, MaterialBase material, GPUTexture output, GPUTextureView input)
 {
     Internal_DrawPostFxMaterial(FlaxEngine.Object.GetUnmanagedPtr(context), ref renderContext, FlaxEngine.Object.GetUnmanagedPtr(material), FlaxEngine.Object.GetUnmanagedPtr(output), FlaxEngine.Object.GetUnmanagedPtr(input));
 }
Example #8
0
 internal static extern void Internal_DrawPostFxMaterial3(IntPtr obj, IntPtr material, GPUTextureView view, ref Viewport viewport, IntPtr input);
Example #9
0
 internal static extern void Internal_DrawPostFxMaterial2(IntPtr obj, IntPtr material, GPUTextureView view, IntPtr input);
Example #10
0
 internal static extern void Internal_Clear(IntPtr obj, GPUTextureView view, ref Color color);
Example #11
0
 /// <summary>
 /// Clears depth buffer.
 /// </summary>
 /// <param name="depthBuffer">The depth buffer to clear.</param>
 /// <param name="depthValue">The clear depth value.</param>
 public void ClearDepth(GPUTextureView depthBuffer, float depthValue = 1.0f)
 {
     Internal_ClearDepth(unmanagedPtr, FlaxEngine.Object.GetUnmanagedPtr(depthBuffer), depthValue);
 }
Example #12
0
 /// <summary>
 /// Draws the specified texture to render target (using fullscreen triangle). Copies contents with resizing and format conversion support. Uses linear texture sampling.
 /// </summary>
 /// <param name="rt">The texture view.</param>
 public void Draw(GPUTextureView rt)
 {
     Internal_Draw2(unmanagedPtr, FlaxEngine.Object.GetUnmanagedPtr(rt));
 }
Example #13
0
 /// <summary>
 /// Clears texture surface with a color. Supports volumetric textures and texture arrays (including cube textures).
 /// </summary>
 /// <param name="rt">The target surface.</param>
 /// <param name="color">The clear color.</param>
 public void Clear(GPUTextureView rt, Color color)
 {
     Internal_Clear(unmanagedPtr, FlaxEngine.Object.GetUnmanagedPtr(rt), ref color);
 }
Example #14
0
 /// <summary>
 /// Sets the render target and unordered access output.
 /// </summary>
 /// <param name="rt">The render target to bind to output.</param>
 /// <param name="uaOutput">The unordered access buffer to bind to output.</param>
 public void SetRenderTarget(GPUTextureView rt, GPUBuffer uaOutput)
 {
     Internal_SetRenderTarget3(unmanagedPtr, FlaxEngine.Object.GetUnmanagedPtr(rt), FlaxEngine.Object.GetUnmanagedPtr(uaOutput));
 }
Example #15
0
 /// <summary>
 /// Sets the render targets and the depth buffer to the output.
 /// </summary>
 /// <param name="depthBuffer">The depth buffer (can be null).</param>
 /// <param name="rts">The array with render targets to bind.</param>
 public void SetRenderTarget(GPUTextureView depthBuffer, GPUTextureView[] rts)
 {
     Internal_SetRenderTarget2(unmanagedPtr, FlaxEngine.Object.GetUnmanagedPtr(depthBuffer), rts);
 }
Example #16
0
 /// <summary>
 /// Sets the render target to the output.
 /// </summary>
 /// <param name="rt">The render target.</param>
 public void SetRenderTarget(GPUTextureView rt)
 {
     Internal_SetRenderTarget(unmanagedPtr, FlaxEngine.Object.GetUnmanagedPtr(rt));
 }