Exemplo n.º 1
0
 /// <summary>
 /// Allocates memory for both buffer objects and initializes the first buffer with the given data.
 /// The second buffer is left uninitialized.
 /// </summary>
 /// <param name="target">The BufferTarget to use when binding the buffers.</param>
 /// <param name="data">The data to upload to the first buffer and allocate enough memory for in the second buffer.</param>
 /// <param name="usageHint">The usage hint for both buffer objects.</param>
 public void Init(BufferTarget target, T[] data, BufferUsageHint usageHint = BufferUsageHint.StaticDraw)
 {
     Ping.Init(target, data, usageHint);
     Pong.Init(target, data.Length, usageHint);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Allocates memory for both buffer objects without initializing it.
 /// </summary>
 /// <param name="target">The BufferTarget to use when binding the buffers.</param>
 /// <param name="elementCount">The number of elements for each buffer to allocate memory for.</param>
 /// <param name="usageHint">The usage hint for both buffer objects.</param>
 public void Init(BufferTarget target, int elementCount, BufferUsageHint usageHint = BufferUsageHint.StaticDraw)
 {
     Ping.Init(target, elementCount, usageHint);
     Pong.Init(target, elementCount, usageHint);
 }