Example #1
0
        public void DrawSceneDepth(SceneRenderTask task, RenderTarget output, bool drawTransparency = true, Actor[] customActors = null, ActorsSources actorsSource = ActorsSources.Scenes)
        {
#if UNIT_TEST_COMPILANT
            throw new NotImplementedException("Unit tests, don't support methods calls. Only properties can be get or set.");
#else
            // Get unmanaged actors
            IntPtr[] actors      = null;
            int      actorsCount = 0;
            if (customActors != null)
            {
                actorsCount = customActors.Length;
                if (_cachedActors == null || _cachedActors.Length < actorsCount)
                {
                    _cachedActors = new IntPtr[Mathf.NextPowerOfTwo(actorsCount)];
                }
                actors = _cachedActors;
                for (int i = 0; i < actorsCount; i++)
                {
                    _cachedActors[i] = GetUnmanagedPtr(customActors[i]);
                }
            }

            Internal_DrawSceneDepth(unmanagedPtr, GetUnmanagedPtr(task), GetUnmanagedPtr(output), drawTransparency, actors, actorsCount, actorsSource);
#endif
        }
Example #2
0
        public void DrawSceneDepth(SceneRenderTask task, RenderTarget output, bool drawTransparency = true, List <Actor> customActors = null, ActorsSources actorsSource = ActorsSources.Scenes)
        {
#if UNIT_TEST_COMPILANT
            throw new NotImplementedException("Unit tests, don't support methods calls. Only properties can be get or set.");
#else
            // Get unmanaged actors
            var actors = GetActors(customActors, out int actorsCount);

            Internal_DrawSceneDepth(unmanagedPtr, GetUnmanagedPtr(task), GetUnmanagedPtr(output), drawTransparency, actors, actorsCount, actorsSource);
#endif
        }
Example #3
0
        public void DrawPostFxMaterial(MaterialBase material, RenderTarget output, RenderTarget input, SceneRenderTask sceneRenderTask)
        {
#if UNIT_TEST_COMPILANT
            throw new NotImplementedException("Unit tests, don't support methods calls. Only properties can be get or set.");
#else
            Internal_DrawPostFxMaterial2(unmanagedPtr, GetUnmanagedPtr(material), GetUnmanagedPtr(output), GetUnmanagedPtr(input), ref sceneRenderTask.View, Object.GetUnmanagedPtr(sceneRenderTask.Buffers));
#endif
        }