Example #1
0
        /// <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;
        }
Example #2
0
 private static void InitFunctions()
 {
     glGenBuffers = OpenGL.GetDelegateFor<OpenGL.glGenBuffers>();
     glBindBuffer = OpenGL.GetDelegateFor<OpenGL.glBindBuffer>();
     glBufferData = OpenGL.GetDelegateFor<OpenGL.glBufferData>();
 }
Example #3
0
 private static void InitFunctions()
 {
     glGenBuffers = OpenGL.GetDelegateFor <OpenGL.glGenBuffers>();
     glBindBuffer = OpenGL.GetDelegateFor <OpenGL.glBindBuffer>();
     glBufferData = OpenGL.GetDelegateFor <OpenGL.glBufferData>();
 }