示例#1
0
        public ShaderDebugTrace PSGetDebugStates(UInt32 x, UInt32 y)
        {
            IntPtr mem = CustomMarshal.Alloc(typeof(ShaderDebugTrace));

            bool success = ReplayRenderer_PSGetDebugStates(m_Real, x, y, mem);

            ShaderDebugTrace ret = null;

            if (success)
            {
                ret = (ShaderDebugTrace)CustomMarshal.PtrToStructure(mem, typeof(ShaderDebugTrace), true);
            }

            CustomMarshal.Free(mem);

            return(ret);
        }
示例#2
0
        public ShaderDebugTrace CSGetDebugStates(UInt32[] groupid, UInt32[] threadid)
        {
            IntPtr mem = CustomMarshal.Alloc(typeof(ShaderDebugTrace));

            bool success = ReplayRenderer_CSGetDebugStates(m_Real, groupid, threadid, mem);

            ShaderDebugTrace ret = null;

            if (success)
            {
                ret = (ShaderDebugTrace)CustomMarshal.PtrToStructure(mem, typeof(ShaderDebugTrace), true);
            }

            CustomMarshal.Free(mem);

            return(ret);
        }
示例#3
0
        public D3D11PipelineState GetD3D11PipelineState()
        {
            IntPtr mem = CustomMarshal.Alloc(typeof(D3D11PipelineState));

            bool success = ReplayRenderer_GetD3D11PipelineState(m_Real, mem);

            D3D11PipelineState ret = null;

            if (success)
            {
                ret = (D3D11PipelineState)CustomMarshal.PtrToStructure(mem, typeof(D3D11PipelineState), true);
            }

            CustomMarshal.Free(mem);

            return(ret);
        }
示例#4
0
        public ShaderDebugTrace VSGetDebugStates(UInt32 vertid, UInt32 instid, UInt32 idx, UInt32 instOffset, UInt32 vertOffset)
        {
            IntPtr mem = CustomMarshal.Alloc(typeof(ShaderDebugTrace));

            bool success = ReplayRenderer_VSGetDebugStates(m_Real, vertid, instid, idx, instOffset, vertOffset, mem);

            ShaderDebugTrace ret = null;

            if (success)
            {
                ret = (ShaderDebugTrace)CustomMarshal.PtrToStructure(mem, typeof(ShaderDebugTrace), true);
            }

            CustomMarshal.Free(mem);

            return(ret);
        }
示例#5
0
        public ShaderDebugTrace DebugPixel(UInt32 x, UInt32 y, UInt32 sample, UInt32 primitive)
        {
            IntPtr mem = CustomMarshal.Alloc(typeof(ShaderDebugTrace));

            bool success = ReplayRenderer_DebugPixel(m_Real, x, y, sample, primitive, mem);

            ShaderDebugTrace ret = null;

            if (success)
            {
                ret = (ShaderDebugTrace)CustomMarshal.PtrToStructure(mem, typeof(ShaderDebugTrace), true);
            }

            CustomMarshal.Free(mem);

            return(ret);
        }
示例#6
0
        public PixelValue PickPixel(ResourceId texID, bool customShader, UInt32 x, UInt32 y, UInt32 sliceFace, UInt32 mip)
        {
            IntPtr mem = CustomMarshal.Alloc(typeof(PixelValue));

            bool success = ReplayOutput_PickPixel(m_Real, texID, customShader, x, y, sliceFace, mip, mem);

            PixelValue ret = null;

            if (success)
            {
                ret = (PixelValue)CustomMarshal.PtrToStructure(mem, typeof(PixelValue), false);
            }

            CustomMarshal.Free(mem);

            return(ret);
        }
示例#7
0
        public CounterDescription DescribeCounter(UInt32 counterID)
        {
            IntPtr mem = CustomMarshal.Alloc(typeof(CounterDescription));

            bool success = ReplayRenderer_DescribeCounter(m_Real, counterID, mem);

            CounterDescription ret = null;

            if (success)
            {
                ret = (CounterDescription)CustomMarshal.PtrToStructure(mem, typeof(CounterDescription), false);
            }

            CustomMarshal.Free(mem);

            return(ret);
        }
示例#8
0
        public FetchFrameInfo GetFrameInfo()
        {
            IntPtr mem = CustomMarshal.Alloc(typeof(FetchFrameInfo));

            bool success = ReplayRenderer_GetFrameInfo(m_Real, mem);

            FetchFrameInfo ret = null;

            if (success)
            {
                ret = (FetchFrameInfo)CustomMarshal.PtrToStructure(mem, typeof(FetchFrameInfo), true);
            }

            CustomMarshal.Free(mem);

            return(ret);
        }
示例#9
0
        public PostVSMeshData GetPostVSData(MeshDataStage stage)
        {
            IntPtr mem = CustomMarshal.Alloc(typeof(PostVSMeshData));

            PostVSMeshData ret = null;

            bool success = ReplayRenderer_GetPostVSData(m_Real, stage, mem);

            if (success)
            {
                ret = (PostVSMeshData)CustomMarshal.PtrToStructure(mem, typeof(PostVSMeshData), true);
            }

            CustomMarshal.Free(mem);

            return(ret);
        }
示例#10
0
        public void GetBasis(out Vec3f pos, out Vec3f fwd, out Vec3f right, out Vec3f up)
        {
            IntPtr p = CustomMarshal.Alloc(typeof(FloatVector));
            IntPtr f = CustomMarshal.Alloc(typeof(FloatVector));
            IntPtr r = CustomMarshal.Alloc(typeof(FloatVector));
            IntPtr u = CustomMarshal.Alloc(typeof(FloatVector));

            Camera_GetBasis(m_Real, p, f, r, u);

            pos   = new Vec3f((FloatVector)CustomMarshal.PtrToStructure(p, typeof(FloatVector), false));
            fwd   = new Vec3f((FloatVector)CustomMarshal.PtrToStructure(f, typeof(FloatVector), false));
            right = new Vec3f((FloatVector)CustomMarshal.PtrToStructure(r, typeof(FloatVector), false));
            up    = new Vec3f((FloatVector)CustomMarshal.PtrToStructure(u, typeof(FloatVector), false));

            CustomMarshal.Free(p);
            CustomMarshal.Free(f);
            CustomMarshal.Free(r);
            CustomMarshal.Free(u);
        }
示例#11
0
        public MeshFormat GetPostVSData(UInt32 instID, MeshDataStage stage)
        {
            IntPtr mem = CustomMarshal.Alloc(typeof(MeshFormat));

            MeshFormat ret = new MeshFormat();

            ret.buf = ResourceId.Null;

            bool success = ReplayRenderer_GetPostVSData(m_Real, instID, stage, mem);

            if (success)
            {
                ret = (MeshFormat)CustomMarshal.PtrToStructure(mem, typeof(MeshFormat), true);
            }

            CustomMarshal.Free(mem);

            return(ret);
        }
示例#12
0
        public bool GetMinMax(ResourceId tex, UInt32 sliceFace, UInt32 mip, UInt32 sample, out PixelValue minval, out PixelValue maxval)
        {
            IntPtr mem1 = CustomMarshal.Alloc(typeof(PixelValue));
            IntPtr mem2 = CustomMarshal.Alloc(typeof(PixelValue));

            bool success = ReplayRenderer_GetMinMax(m_Real, tex, sliceFace, mip, sample, mem1, mem2);

            if (success)
            {
                minval = (PixelValue)CustomMarshal.PtrToStructure(mem1, typeof(PixelValue), true);
                maxval = (PixelValue)CustomMarshal.PtrToStructure(mem2, typeof(PixelValue), true);
            }
            else
            {
                minval = null;
                maxval = null;
            }

            CustomMarshal.Free(mem1);
            CustomMarshal.Free(mem2);

            return(success);
        }
示例#13
0
        public void fpsLook(Vec3f lookpos, Vec3f lookrot)
        {
            IntPtr p = CustomMarshal.Alloc(typeof(FloatVector));
            IntPtr f = CustomMarshal.Alloc(typeof(FloatVector));
            IntPtr r = CustomMarshal.Alloc(typeof(FloatVector));

            isarc    = false;
            parampos = new Vec3f(lookpos);
            paramrot = new Vec3f(lookrot);

            var ps = new FloatVector(lookpos);
            var rt = new FloatVector(lookrot);

            Maths_CameraFPSLook(ref ps, ref rt, p, f, r);

            pos   = new Vec3f((FloatVector)CustomMarshal.PtrToStructure(p, typeof(FloatVector), false));
            fwd   = new Vec3f((FloatVector)CustomMarshal.PtrToStructure(f, typeof(FloatVector), false));
            right = new Vec3f((FloatVector)CustomMarshal.PtrToStructure(r, typeof(FloatVector), false));

            CustomMarshal.Free(p);
            CustomMarshal.Free(f);
            CustomMarshal.Free(r);
        }
示例#14
0
        public void Arcball(float dist, Vec3f rot)
        {
            IntPtr p = CustomMarshal.Alloc(typeof(FloatVector));
            IntPtr f = CustomMarshal.Alloc(typeof(FloatVector));
            IntPtr r = CustomMarshal.Alloc(typeof(FloatVector));

            isarc      = true;
            parampos.x = dist;
            parampos.y = 0.0f;
            parampos.z = 0.0f;
            paramrot   = new Vec3f(rot);

            var rt = new FloatVector(rot);

            Maths_CameraArcball(dist, ref rt, p, f, r);

            pos   = new Vec3f((FloatVector)CustomMarshal.PtrToStructure(p, typeof(FloatVector), false));
            fwd   = new Vec3f((FloatVector)CustomMarshal.PtrToStructure(f, typeof(FloatVector), false));
            right = new Vec3f((FloatVector)CustomMarshal.PtrToStructure(r, typeof(FloatVector), false));

            CustomMarshal.Free(p);
            CustomMarshal.Free(f);
            CustomMarshal.Free(r);
        }