예제 #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);
 }