Ejemplo n.º 1
0
        private void ParticleTestBench_RenderFrame(object sender, FrameEventArgs e)
        {
            if (shaderUpdatePoller.HasChanges)
            {
                components.Reload();
                shaderUpdatePoller.Reset();
            }

            components.ProjectionMatrix = camera.Projection;
            components.ViewMatrix       = camera.View;


            GL.ClearColor(0.0f, 0.1f, 0.2f, 1.0f);
            GL.ClearDepth(1.0);
            GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);


            components.Render(frameData);



            GL.Disable(EnableCap.DepthTest);
            GL.Enable(EnableCap.Blend);

            //text.Render();

            SwapBuffers();
            model.SwapBuffers();
            Thread.Sleep(0);
        }
Ejemplo n.º 2
0
        private void TestBench_RenderFrame(FrameEventArgs e)
        {
            if (shaderUpdatePoller.Poll())
            {
                components.Reload();
                shaderUpdatePoller.Reset();
            }

            GL.ClearColor(0.0f, 0.1f, 0.2f, 1.0f);
            GL.ClearDepth(1.0);
            GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
            //GL.Disable(EnableCap.DepthTest);
            //GL.Enable(EnableCap.Blend);


            components.Render(frameData);

            SwapBuffers();
            Thread.Sleep(0);
        }
Ejemplo n.º 3
0
        private void VisHost_RenderFrame(FrameEventArgs e)
        {
            //lock (this.threadLock)
            //{
            double time = timer.Elapsed.TotalSeconds;

            frameData.DeltaRenderTime = time - frameData.RenderTime;
            frameData.RenderTime      = time;

            if (shaderUpdatePoller.HasChanges)
            {
                components.Reload();
                shaderUpdatePoller.Reset();
            }

            //text.AddOrUpdate(title);

            GL.ClearColor(0.0f, 0.0f, 0.0f, 1.0f);
            GL.ClearDepth(1.0);
            GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);


            components.Render(frameData);



            //GL.Disable(EnableCap.DepthTest);
            //GL.Enable(EnableCap.Blend);

            //text.Render();

            //GL.Finish();

            SwapBuffers();
            Thread.Sleep(0);
            //}
        }