Esempio n. 1
0
        public void Render(vdkRenderView renderView, vdkRenderInstance[] pModels, int modelCount)
        {
            if (modelCount == 0)
            {
                return;
            }

            if (renderView == null)
            {
                throw new Exception("renderView is null");
            }

            if (renderView.pRenderView == IntPtr.Zero)
            {
                throw new Exception("RenderView not initialised");
            }

            if (pRenderer == IntPtr.Zero)
            {
                throw new Exception("renderContext not initialised");
            }

            vdkError error = vdkRenderContext_Render(pRenderer, renderView.pRenderView, pModels, modelCount, (IntPtr.Zero));

            if (error == vdkError.vE_InvalidLicense)
            {
                context.RequestLicense(LicenseType.Render);
                error = vdkRenderContext_Render(pRenderer, renderView.pRenderView, pModels, modelCount, (IntPtr)0);
            }

            if (error != Vault.vdkError.vE_Success)
            {
                throw new Exception("vdkRenderContext.Render failed: " + error.ToString());
            }
        }
Esempio n. 2
0
        public void Render(vdkRenderView renderView, vdkRenderInstance[] pModels, int modelCount)
        {
            vdkError error = vdkRenderContext_Render(pRenderer, renderView.pRenderView, pModels, modelCount, (IntPtr)0);

            if (error != vdkError.vE_Success && error != vdkError.vE_InvalidLicense)
            {
                throw new Exception("vdkRenderContext.Render failed.");
            }
        }