00001 #region License
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #endregion
00027
00028 using System;
00029 using System.Collections.Generic;
00030 using System.Text;
00031 using OpenTK.Platform;
00032
00033 namespace OpenTK.Graphics
00034 {
00035
00036 abstract class GraphicsContextBase : IGraphicsContext, IGraphicsContextInternal
00037 {
00038 #region Fields
00039
00040 bool disposed;
00041
00042 protected ContextHandle Handle;
00043 protected GraphicsMode Mode;
00044
00045 #endregion
00046
00047 #region IGraphicsContext Members
00048
00049 public abstract void SwapBuffers();
00050
00051 public abstract void MakeCurrent(IWindowInfo window);
00052
00053 public abstract bool IsCurrent { get; }
00054
00055 public bool IsDisposed
00056 {
00057 get { return disposed; }
00058 protected set { disposed = value; }
00059 }
00060
00061 public abstract bool VSync { get; set; }
00062
00063 public virtual void Update(IWindowInfo window) { }
00064
00065 public GraphicsMode GraphicsMode { get { return Mode; } }
00066
00067 public bool ErrorChecking
00068 {
00069 get { throw new NotImplementedException(); }
00070 set { throw new NotImplementedException(); }
00071 }
00072
00073 #endregion
00074
00075 #region IGraphicsContextInternal Members
00076
00077 public IGraphicsContext Implementation { get { return this; } }
00078
00079 public abstract void LoadAll();
00080
00081 public ContextHandle Context { get { return Handle; } }
00082
00083 public abstract IntPtr GetAddress(string function);
00084
00085 #endregion
00086
00087 #region IDisposable Members
00088
00089 public abstract void Dispose();
00090
00091 #endregion
00092 }
00093 }