private void CreateContext() { context = new WglGraphicsContext(window.Handle); context.UpdateDeviceParameters(24, 8, 0); context.VSync = Settings.Current.UseVSync; context.MakeCurrent(); string version = GLHelper.GetString(StringName.Version); if (string.IsNullOrEmpty(version)) { return; } int majorVersion = int.Parse(version[0] + ""); if (majorVersion < 3 || string.IsNullOrEmpty(GLHelper.GetString(StringName.Extensions))) { throw new OpenGLVersionDoesNotSupportShaders(); } }
public MethodLoader(BaseGraphicsContext context) { this.context = context; functions = new Dictionary <string, Delegate>(); }