Пример #1
0
 /// <summary>
 /// Function updates buffer with verticies
 /// </summary>
 /// <param name="buffer">Full buffer</param>
 /// <param name="bufferData">Array with data</param>
 /// <param name="bufferIndex">Index of changing buffer</param>
 public static void updateVertexBufferFully(VAO buffer, VBOArrayF bufferData)
 {
     GL.BindBuffer(BufferTarget.ArrayBuffer, buffer.Vbo[0]);
     GL.BufferSubData(BufferTarget.ArrayBuffer, new IntPtr(0),
                      bufferData.getAtrributeByteSize(0), bufferData.Vertices);
     GL.BindBuffer(BufferTarget.ArrayBuffer, 0);
 }
Пример #2
0
 public VAO(VBOArrayF bufferData)
 {
     _maped        = false;
     _dataInserted = false;
     this._vaoData = bufferData;
     this._vboID   = new uint[bufferData.getActiveAttribsCount()];
     this._vaoID   = new uint[1];
     this._iboID   = new uint[1];
 }
Пример #3
0
 public void changeBufferData(VBOArrayF bufferData)
 {
     _vaoData = bufferData;
 }