示例#1
0
 public UnitSphere(IdHolder holder)
 {
     Holder = holder;
     GenerateVertices();
     PrepareAttributes();
     PrepareUniforms();
     PrepareBuffers();
 }
示例#2
0
        protected override void OnLoad(EventArgs e)
        {
            BasePath = AppDomain.CurrentDomain.BaseDirectory;

            base.OnLoad(e);
            Title = "Planetarium";

            holder            = new IdHolder();
            holder.Height     = Height;
            holder.Width      = Width;
            holder.ShaderMode = 1;
            InitProgram();
            sphere = new UnitSphere(holder);

            lums = LuminaryCreator.Create(BasePath + @"\universe.xml", sphere); //load luminaries from xml

            cam = new Camera();

            GL.ClearColor(Color.CornflowerBlue);
        }
示例#3
0
 public UnitSphere(IdHolder holder, int rings, int segments)
 {
     Rings    = rings;
     Segments = segments;
     new UnitSphere(holder);
 }