protected override void OnSetContext()
{
if (sphere == null)
{
sphere = new GLUSphere(GI, 1, 32, 32);
sphere.DrawingStyle = QuadricDrawStyle.Fill;
}
GI.Features.DepthTest.Enable();
gl.glDepthFunc(gl.GL_LESS);
GI.Features.Lighting.Enable();
GI.Features.Lighting.Light0.Enable();
GI.Features.Lighting.Light0.Ambient = ambient;
GI.Features.Lighting.Light0.Diffuse = diffuse;
GI.Features.Lighting.Light0.Location = position;
gl.glLightModelfv(gl.GL_LIGHT_MODEL_AMBIENT, lmodel_ambient);
gl.glLightModelfv(gl.GL_LIGHT_MODEL_LOCAL_VIEWER, local_view);
GI.Buffers.ColorBuffer.Color = new ColorRGBA(0.0f, 0.1f, 0.1f, 0.0f);
}