Esempio n. 1
0
        public ResourceId BuildTargetShader(string entry, string source, UInt32 compileFlags, ShaderStageType type, out string errors)
        {
            IntPtr mem = CustomMarshal.Alloc(typeof(templated_array));

            ResourceId ret = ResourceId.Null;

            IntPtr entry_mem  = CustomMarshal.MakeUTF8String(entry);
            IntPtr source_mem = CustomMarshal.MakeUTF8String(source);

            bool success = ReplayRenderer_BuildTargetShader(m_Real, entry_mem, source_mem, compileFlags, type, ref ret, mem);

            CustomMarshal.Free(entry_mem);
            CustomMarshal.Free(source_mem);

            if (!success)
            {
                ret = ResourceId.Null;
            }

            errors = CustomMarshal.TemplatedArrayToString(mem, true);

            CustomMarshal.Free(mem);

            return(ret);
        }
Esempio n. 2
0
        public static string[] EnumerateAndroidDevices()
        {
            IntPtr driverListInt = CustomMarshal.Alloc(typeof(templated_array));

            RENDERDOC_EnumerateAndroidDevices(driverListInt);

            string driverList = CustomMarshal.TemplatedArrayToString(driverListInt, true);

            CustomMarshal.Free(driverListInt);

            return(driverList.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries));
        }
Esempio n. 3
0
        public static bool SupportLocalReplay(string logfile, out string driverName)
        {
            IntPtr mem = CustomMarshal.Alloc(typeof(templated_array));

            IntPtr logfile_mem = CustomMarshal.MakeUTF8String(logfile);

            bool ret = RENDERDOC_SupportLocalReplay(logfile_mem, mem);

            CustomMarshal.Free(logfile_mem);

            driverName = CustomMarshal.TemplatedArrayToString(mem, true);

            CustomMarshal.Free(mem);
            return(ret);
        }
Esempio n. 4
0
        public static ReplaySupport SupportLocalReplay(string logfile, out string driverName, out string recordMachineIdent)
        {
            IntPtr name_mem  = CustomMarshal.Alloc(typeof(templated_array));
            IntPtr ident_mem = CustomMarshal.Alloc(typeof(templated_array));

            IntPtr logfile_mem = CustomMarshal.MakeUTF8String(logfile);

            ReplaySupport ret = RENDERDOC_SupportLocalReplay(logfile_mem, name_mem, ident_mem);

            CustomMarshal.Free(logfile_mem);

            driverName         = CustomMarshal.TemplatedArrayToString(name_mem, true);
            recordMachineIdent = CustomMarshal.TemplatedArrayToString(ident_mem, true);

            CustomMarshal.Free(name_mem);
            CustomMarshal.Free(ident_mem);

            return(ret);
        }