Ejemplo n.º 1
0
        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();
            }
        }
Ejemplo n.º 2
0
 public MethodLoader(BaseGraphicsContext context)
 {
     this.context = context;
     functions    = new Dictionary <string, Delegate>();
 }