private void GLView_Paint(object sender, System.Windows.Forms.PaintEventArgs e) { ChaosTime.UpdateTime(); ChaosPhysics.Frame(); GL.Viewport(0, 0, GLView.Width, GLView.Height); GL.Clear(ClearBufferMask.ColorBufferBit); GL.Clear(ClearBufferMask.DepthBufferBit); //GL.UseProgram(shaders["default"]); GL.BindVertexArray(VAO); GL.DrawArrays(PrimitiveType.Triangles, 0, 3); GLView.SwapBuffers(); }
public void setParent(ChaosObject parent) { if (destroyed) { throw new Exception("You're trying to access destroyed object."); } if (ChaosPhysics.HasObject(parent)) { if (this.parent != null) { this.parent.removeChild(this); } this.parent = parent; this.parent.addChild(this); } }