internal static void Initialize()
{
// opengl
//GL.ShadeModel(ShadingModel.Decal); // what is decal?
GL.ShadeModel(ShadingModel.Smooth);
GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
GL.ClearColor(0.0f, 0.0f, 0.0f, 0.0f);
GL.Enable(EnableCap.DepthTest);
if (!TexturingEnabled)
{
GL.Enable(EnableCap.Texture2D);
TexturingEnabled = true;
}
GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha);
GL.DepthFunc(DepthFunction.Lequal);
GL.Hint(HintTarget.PerspectiveCorrectionHint, HintMode.Fastest);
GL.Hint(HintTarget.GenerateMipmapHint, HintMode.Nicest);
GL.Enable(EnableCap.CullFace); CullEnabled = true;
GL.CullFace(CullFaceMode.Front);
GL.Disable(EnableCap.Dither);
// opengl
GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
GL.PushMatrix();
GL.ClearColor(0.67f, 0.67f, 0.67f, 1.0f);
var mat = Matrix4d.LookAt(0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0);
GL.MultMatrix(ref mat);
GL.PopMatrix();
TransparentColorDepthSorting = Interface.CurrentOptions.TransparencyMode == TransparencyMode.Smooth & Interface.CurrentOptions.Interpolation != TextureManager.InterpolationMode.NearestNeighbor & Interface.CurrentOptions.Interpolation != TextureManager.InterpolationMode.Bilinear;
}