/// <summary> /// Vertex Buffer Object. /// </summary> /// <param name="usage"></param> public Buffer(BufferUsage usage) { if (glGenBuffers == null) { glGenBuffers = OpenGL.GetDelegateFor <OpenGL.glGenBuffers>(); glBindBuffer = OpenGL.GetDelegateFor <OpenGL.glBindBuffer>(); glBufferData = OpenGL.GetDelegateFor <OpenGL.glBufferData>(); } this.Usage = usage; }
private static void InitFunctions() { glGenBuffers = OpenGL.GetDelegateFor<OpenGL.glGenBuffers>(); glBindBuffer = OpenGL.GetDelegateFor<OpenGL.glBindBuffer>(); glBufferData = OpenGL.GetDelegateFor<OpenGL.glBufferData>(); }
private static void InitFunctions() { glGenBuffers = OpenGL.GetDelegateFor <OpenGL.glGenBuffers>(); glBindBuffer = OpenGL.GetDelegateFor <OpenGL.glBindBuffer>(); glBufferData = OpenGL.GetDelegateFor <OpenGL.glBufferData>(); }