本文整理汇总了C#中OpenGL.GenBuffers方法的典型用法代码示例。如果您正苦于以下问题:C# OpenGL.GenBuffers方法的具体用法?C# OpenGL.GenBuffers怎么用?C# OpenGL.GenBuffers使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenGL
的用法示例。
在下文中一共展示了OpenGL.GenBuffers方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Create
public void Create(OpenGL gl)
{
// Generate the vertex array.
uint[] ids = new uint[1];
gl.GenBuffers(1, ids);
bufferObject = ids[0];
}
示例2: Create
/// <summary>
/// Creates the render context provider. Must also create the OpenGL extensions.
/// </summary>
/// <param name="openGLVersion">The desired OpenGL version.</param>
/// <param name="gl">The OpenGL context.</param>
/// <param name="width">The width.</param>
/// <param name="height">The height.</param>
/// <param name="bitDepth">The bit depth.</param>
/// <param name="parameter">The parameter</param>
/// <returns></returns>
public override bool Create(OpenGLVersion openGLVersion, OpenGL gl, int width, int height, int bitDepth, object parameter)
{
this.gl = gl;
// Call the base class.
base.Create(openGLVersion, gl, width, height, bitDepth, parameter);
// Request an id for our pixel buffer.
uint[] ids = new uint[1];
ids = new uint[1];
gl.GenBuffers(1, ids);
pixelBufferID = ids[0];
// The writeable bitmap needs to be initialized, so trigger setDimensions for this.
SetDimensions(width, height);
return true;
}