本文整理匯總了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);
}
}