Ejemplo n.º 1
0
        private void SetUpRendering()
        {
            graphicsResources = new GraphicsResources();

            // Display compilation warnings.
            if (!graphicsResources.screenTextureShader.LinkStatusIsOk)
            {
                MessageBox.Show(graphicsResources.screenTextureShader.GetErrorLog(), "Failed Shader Compilation");
            }

            // Trigger the render event.
            glControl1.RenderFrame();
        }
Ejemplo n.º 2
0
        private void SetUpRendering()
        {
            // Pause the rendering thread to use the context on the current thread.
            glViewport.PauseRendering();

            graphicsResources = new GraphicsResources();

            // Display compilation warnings.
            if (!graphicsResources.screenTextureShader.LinkStatusIsOk)
            {
                System.Diagnostics.Debug.WriteLine("The texture shader did not link successfully.");
                System.Diagnostics.Debug.WriteLine(graphicsResources.screenTextureShader.GetErrorLog());
            }

            if (!graphicsResources.objModelShader.LinkStatusIsOk)
            {
                System.Diagnostics.Debug.WriteLine("The attribute shader did not link successfully.");
                System.Diagnostics.Debug.WriteLine(graphicsResources.objModelShader.GetErrorLog());
            }

            // Start rendering on the dedicated thread.
            glViewport.RestartRendering();
        }