示例#1
0
 public virtual void Draw(DrawInfo drawInfo)
 {
     UpdateTime(drawInfo);
     if (graphicParent == null)
     {
         GlHelper.GlLoadMatrix(matrixArray);
     }
     else
     {
         GlHelper.GlMultMatrix(matrixArray);
     }
     if (hasChildren)
     {
         DrawWithChildren(drawInfo);
     }
     else
     {
         DrawWithoutChildren(drawInfo);
     }
 }
示例#2
0
 public void Draw(DrawInfo drawInfo)
 {
     if (BeginDrawing != null)
     {
         BeginDrawing(this, new DrawEventArgs(drawInfo));
     }
     Gl.glViewport(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height);
     Gl.glMatrixMode(Gl.GL_PROJECTION);
     if (!calculated)
     {
         calculated = true;
         Calc();
     }
     GlHelper.GlLoadMatrix(matrixArray);
     Gl.glMatrixMode(Gl.GL_MODELVIEW);
     scene.Draw(drawInfo);
     if (EndDrawing != null)
     {
         EndDrawing(this, new DrawEventArgs(drawInfo));
     }
 }