本文整理汇总了C#中SharpGL.OpenGL.VertexAttribDivisor方法的典型用法代码示例。如果您正苦于以下问题:C# OpenGL.VertexAttribDivisor方法的具体用法?C# OpenGL.VertexAttribDivisor怎么用?C# OpenGL.VertexAttribDivisor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SharpGL.OpenGL
的用法示例。
在下文中一共展示了OpenGL.VertexAttribDivisor方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BindVBOs
public void BindVBOs(OpenGL gl, LinesProgram program)
{
var attribPos = program.Attribs["Position"];
gl.BindBuffer(_vboTarget, Position);
gl.VertexAttribPointer(attribPos, 3, OpenGL.GL_FLOAT, false, 0, IntPtr.Zero);
gl.EnableVertexAttribArray(attribPos);
attribPos = program.Attribs["ColorValue"];
gl.BindBuffer(_vboTarget, ColorValue);
gl.VertexAttribPointer(attribPos, 3, OpenGL.GL_FLOAT, false, 0, IntPtr.Zero);
gl.VertexAttribDivisor(attribPos, 1);
gl.EnableVertexAttribArray(attribPos);
if (IndicesCount > 0)
gl.BindBuffer(_iboTarget, Ibo);
}
示例2: BindNMVBOs
public void BindNMVBOs(OpenGL gl, NormalMaterialProgram program)
{
var attribPos = program.Attribs["Position"];
gl.BindBuffer(_vboTarget, Position);
gl.VertexAttribPointer(attribPos, 3, OpenGL.GL_FLOAT, false, 0, IntPtr.Zero);
gl.EnableVertexAttribArray(attribPos);
attribPos = program.Attribs["Normal"];
gl.BindBuffer(_vboTarget, Normal);
gl.VertexAttribPointer(attribPos, 3, OpenGL.GL_FLOAT, false, 0, IntPtr.Zero);
gl.EnableVertexAttribArray(attribPos);
attribPos = program.Attribs["AmbientMaterial"];
gl.BindBuffer(_vboTarget, AmbientMaterial);
gl.VertexAttribPointer(attribPos, 3, OpenGL.GL_FLOAT, false, 0, IntPtr.Zero);
gl.VertexAttribDivisor(attribPos, 1);
gl.EnableVertexAttribArray(attribPos);
attribPos = program.Attribs["DiffuseMaterial"];
gl.BindBuffer(_vboTarget, DiffuseMaterial);
gl.VertexAttribPointer(attribPos, 3, OpenGL.GL_FLOAT, false, 0, IntPtr.Zero);
gl.VertexAttribDivisor(attribPos, 1);
gl.EnableVertexAttribArray(attribPos);
attribPos = program.Attribs["SpecularMaterial"];
gl.BindBuffer(_vboTarget, SpecularMaterial);
gl.VertexAttribPointer(attribPos, 3, OpenGL.GL_FLOAT, false, 0, IntPtr.Zero);
gl.VertexAttribDivisor(attribPos, 1);
gl.EnableVertexAttribArray(attribPos);
attribPos = program.Attribs["ShininessValue"];
gl.BindBuffer(_vboTarget, ShininessValue);
gl.VertexAttribPointer(attribPos, 1, OpenGL.GL_FLOAT, false, 0, IntPtr.Zero);
gl.VertexAttribDivisor(attribPos, 1);
gl.EnableVertexAttribArray(attribPos);
gl.BindBuffer(_iboTarget, Ibo);
}
示例3: BindHTVBOs
public void BindHTVBOs(OpenGL gl, HitTestProgram program)
{
var attribPos = program.Attribs["Position"];
gl.BindBuffer(_vboTarget, Position);
gl.VertexAttribPointer(attribPos, 3, OpenGL.GL_FLOAT, false, 0, IntPtr.Zero);
gl.EnableVertexAttribArray(attribPos);
attribPos = program.Attribs["HTColorId"];
gl.BindBuffer(_vboTarget, HTColorId);
gl.VertexAttribPointer(attribPos, 3, OpenGL.GL_FLOAT, false, 0, IntPtr.Zero);
gl.VertexAttribDivisor(attribPos, 1);
gl.EnableVertexAttribArray(attribPos);
gl.BindBuffer(_iboTarget, Ibo);
}
示例4: Invoke
public void Invoke(OpenGL gl)
{
//CurrentVariant.Invoke(gl);
gl.VertexAttribPointer(Index, Size, (uint)Type, Normalized, Stride, OffsetPointer);
if (DivisorValue > 0)
{
gl.VertexAttribDivisor(Index, DivisorValue);
}
}