Ejemplo n.º 1
0
        private unsafe RenderDoc(NativeLibrary lib)
        {
            _nativeLib = lib;
            pRENDERDOC_GetAPI getApiFunc = _nativeLib.LoadFunction <pRENDERDOC_GetAPI>("RENDERDOC_GetAPI");
            void *            apiPointers;
            int result = getApiFunc(RENDERDOC_Version.API_Version_1_2_0, &apiPointers);

            if (result != 1)
            {
                throw new InvalidOperationException("Failed to load RenderDoc API.");
            }

            _api = Marshal.PtrToStructure <RENDERDOC_API_1_3_0>((IntPtr)apiPointers);
        }
Ejemplo n.º 2
0
        private unsafe RenderDoc(NativeLibrary lib)
        {
            _nativeLib = lib;
            pRENDERDOC_GetAPI getApiFunc = _nativeLib.LoadFunction <pRENDERDOC_GetAPI>("RENDERDOC_GetAPI");
            void *            apiPointers;
            int result = getApiFunc(RENDERDOC_Version.API_Version_1_2_0, &apiPointers);

            if (result != 1)
            {
                throw new InvalidOperationException("Failed to load RenderDoc API.");
            }

            _api = System.Runtime.InteropServices.Marshal.PtrToStructure <RENDERDOC_API_1_4_0>((IntPtr)apiPointers);
            this.OverlayEnabled = false;
        }