示例#1
0
        private void Display()
        {
            bridge_.StartDrawingOperation();
            // if(polySmooth) {
            //     Gl.glClear(Gl.GL_COLOR_BUFFER_BIT);
            //     Gl.glEnable(Gl.GL_BLEND);
            //     Gl.glEnable(Gl.GL_POLYGON_SMOOTH);
            //     Gl.glDisable(Gl.GL_DEPTH_TEST);
            // }
            // else {
            //     Gl.glClear(Gl.GL_COLOR_BUFFER_BIT | Gl.GL_DEPTH_BUFFER_BIT);
            //     Gl.glDisable(Gl.GL_BLEND);
            //     Gl.glDisable(Gl.GL_POLYGON_SMOOTH);
            //     Gl.glEnable(Gl.GL_DEPTH_TEST);
            // }

            // Gl.glPushMatrix();
            // Gl.glTranslatef(0.0f, 0.0f, -8.0f);
            // Gl.glRotatef(30.0f, 1.0f, 0.0f, 0.0f);
            // Gl.glRotatef(60.0f, 0.0f, 1.0f, 0.0f);
            // DrawCube(-0.5f, 0.5f, -0.5f, 0.5f, -0.5f, 0.5f);
            // Gl.glPopMatrix ();

            // Gl.glFlush ();
            Random rand = new Random();
            float  r, g, b;

            r = (float)(rand.Next(0, 255) / 255.0);
            g = (float)(rand.Next(0, 255) / 255.0);
            b = (float)(rand.Next(0, 255) / 255.0);
            Gl.glClear(Gl.GL_COLOR_BUFFER_BIT | Gl.GL_DEPTH_BUFFER_BIT);
            Gl.glColor3f(r, g, b);
            Gl.glRectf(-0.75f, 0.75f, 0.75f, -0.75f);

            bridge_.EndDrawingOperation();
        }
示例#2
0
 public void EndDrawingOperation()
 {
     DrawingBridge.EndDrawingOperation(cside_);
 }