예제 #1
0
파일: Mesh.cs 프로젝트: dsrbecky/ColladaDOM
 public void Render(InstanceGeometry instanceGeometry)
 {
     using(new PerformanceLog("Render geometry: " + instanceGeometry.Url)) {
         foreach(Primitives primitive in this.Primitives) {
             primitive.Render(instanceGeometry);
         }
     }
 }
예제 #2
0
 public void Render(InstanceGeometry instanceGeometry)
 {
     if (this.Item is Mesh) {
         ((Mesh)this.Item).Render(instanceGeometry);
     }
 }
예제 #3
0
        public void Render(InstanceGeometry instanceGeometry)
        {
            if (!wasLoaded) {
                using(new PerformanceLog("Load data: " + instanceGeometry.Url, LogType.Loading)) {
                    LoadData();
                }
            }

            if (this.GetMaterial() != null) {
                using(new PerformanceLog("Switch material: " + this.GetMaterial(), LogType.Verbose)) {
                    instanceGeometry.GetMaterial(this.GetMaterial()).Use();
                }
            }

            if (!displayList.HasValue) {
                using(new PerformanceLog("Make display list: " + instanceGeometry.Url, LogType.Loading)) {
                    LoadDisplayList();
                }
            }

            using(new PerformanceLog("Call display list: " + instanceGeometry.Url, LogType.Verbose)) {
                Gl.glCallList(displayList.Value);
            }
        }