Ejemplo n.º 1
0
        void glCanvas1_OpenGLDraw(object sender, PaintEventArgs e)
        {
            PrintCameraInfo();

            GL.ClearColor(0x87 / 255.0f, 0xce / 255.0f, 0xeb / 255.0f, 0xff / 255.0f);
            GL.Clear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);

            var arg = new RenderEventArgs(RenderModes.Render, this.camera);

            axisElement.Render(arg);

            var uiArg = new RenderEventArgs(RenderModes.Render, null);

            if (this.renderSign % 2 == 0)
            {
                uiLeftBottomRect.Render(uiArg);
                uiLeftTopRect.Render(uiArg);
                uiRightBottomRect.Render(uiArg);
                uiRightTopRect.Render(uiArg);
            }
            else if (this.renderSign % 2 == 1)
            {
                legacyLeftBottomRect.Render(uiArg);
                legacyLeftTopRect.Render(uiArg);
                legacyRightBottomRect.Render(uiArg);
                legacyRightTopRect.Render(uiArg);
            }
        }
Ejemplo n.º 2
0
        void glCanvas1_OpenGLDraw(object sender, PaintEventArgs e)
        {
            PrintCameraInfo();

            //GL.ClearColor(0x87 / 255.0f, 0xce / 255.0f, 0xeb / 255.0f, 0xff / 255.0f);
            GL.Clear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);

            var  arg = new RenderEventArgs(RenderModes.Render, this.camera);
            mat4 projectionMatrix = camera.GetProjectionMat4();
            mat4 viewMatrix       = camera.GetViewMat4();
            mat4 modelMatrix      = mat4.identity();
            mat4 mvp = projectionMatrix * viewMatrix * modelMatrix;

            axisElement.mvp = mvp;

            axisElement.Render(arg);

            var uiArg = new RenderEventArgs(RenderModes.Render, null);

            if (this.renderSign % 2 == 0)
            {
                uiLeftBottomRect.Render(uiArg);
                uiLeftTopRect.Render(uiArg);
                uiRightBottomRect.Render(uiArg);
                uiRightTopRect.Render(uiArg);
            }
            else if (this.renderSign % 2 == 1)
            {
                legacyLeftBottomRect.Render(uiArg);
                legacyLeftTopRect.Render(uiArg);
                legacyRightBottomRect.Render(uiArg);
                legacyRightTopRect.Render(uiArg);
            }
        }
Ejemplo n.º 3
0
        void glCanvas1_OpenGLDraw(object sender, PaintEventArgs e)
        {
            PrintCameraInfo();

            GL.ClearColor(0x87 / 255.0f, 0xce / 255.0f, 0xeb / 255.0f, 0xff / 255.0f);
            GL.Clear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);

            var  arg = new RenderEventArgs(RenderModes.Render, this.camera);
            mat4 projectionMatrix = camera.GetProjectionMat4();
            mat4 viewMatrix       = camera.GetViewMat4();
            mat4 modelMatrix      = mat4.identity();
            mat4 mvp = projectionMatrix * viewMatrix * modelMatrix;

            axisElement.mvp = mvp;
            axisElement.Render(arg);

            uiLeftBottomRect.Render(arg);
            //uiLeftTopRect.Render(arg);
            //uiRightBottomRect.Render(arg);
            //uiRightTopRect.Render(arg);

            legacyUIRect_BeforeRendering(this.legacyLeftBottomRect, arg);
            legacyLeftBottomRect.Render(arg);
            legacyUIRect_AfterRendering(this.legacyLeftBottomRect, arg);
            //legacyLeftTopRect.Render(arg);
            //legacyRightBottomRect.Render(arg);
            //legacyRightTopRect.Render(arg);

            uiLeftBottomAxis.Render(arg);
        }
Ejemplo n.º 4
0
        void glCanvas1_OpenGLDraw(object sender, PaintEventArgs e)
        {
            //PrintCameraInfo();

            GL.ClearColor(0x87 / 255.0f, 0xce / 255.0f, 0xeb / 255.0f, 0xff / 255.0f);
            GL.Clear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);

            var arg = new RenderEventArgs(RenderModes.Render, this.camera);

            legacyUIRect.Render(arg);
            modernUIRect.Render(arg);
            leftUIAxis.Render(arg);
            rightUIAxis.Render(arg);
            element.Render(arg);
        }
Ejemplo n.º 5
0
        void glCanvas1_OpenGLDraw(object sender, PaintEventArgs e)
        {
            PrintCameraInfo();

            GL.ClearColor(0x87 / 255.0f, 0xce / 255.0f, 0xeb / 255.0f, 0xff / 255.0f);
            GL.Clear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);

            var arg = new RenderEventArgs(RenderModes.Render, this.camera);

            axisElement.Render(arg);

            var uiArg = new RenderEventArgs(RenderModes.Render, null);

            uiRectElement.Render(uiArg);
        }