本文整理汇总了Java中com.jogamp.opengl.GL4.glVertexAttribBinding方法的典型用法代码示例。如果您正苦于以下问题:Java GL4.glVertexAttribBinding方法的具体用法?Java GL4.glVertexAttribBinding怎么用?Java GL4.glVertexAttribBinding使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jogamp.opengl.GL4
的用法示例。
在下文中一共展示了GL4.glVertexAttribBinding方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initVertexArray
import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initVertexArray(GL4 gl4) {
gl4.glGenVertexArrays(1, vertexArrayName);
gl4.glBindVertexArray(vertexArrayName.get(0));
{
gl4.glVertexAttribBinding(Semantic.Attr.POSITION, Semantic.Buffer.STATIC);
gl4.glVertexAttribFormat(Semantic.Attr.POSITION, 2, GL_FLOAT, false, 0);
gl4.glVertexAttribBinding(Semantic.Attr.TEXCOORD, Semantic.Buffer.STATIC);
gl4.glVertexAttribFormat(Semantic.Attr.TEXCOORD, 2, GL_FLOAT, false, Vec2.SIZE);
gl4.glEnableVertexAttribArray(Semantic.Attr.POSITION);
gl4.glEnableVertexAttribArray(Semantic.Attr.TEXCOORD);
gl4.glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, bufferName.get(Buffer.ELEMENT));
gl4.glBindVertexBuffer(Semantic.Buffer.STATIC, bufferName.get(Buffer.VERTEX), 0, Vertex_v2fv2f.SIZE);
}
gl4.glBindVertexArray(0);
return true;
}
示例2: initVertexArray
import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initVertexArray(GL4 gl4) {
gl4.glGenVertexArrays(1, vertexArrayName);
gl4.glBindVertexArray(vertexArrayName.get(0));
{
int bindingIndex = 0;
gl4.glVertexAttribFormat(Semantic.Attr.POSITION, 2, GL_FLOAT, false, 0);
gl4.glVertexAttribFormat(Semantic.Attr.TEXCOORD, 2, GL_FLOAT, false, Vec2.SIZE);
gl4.glVertexAttribBinding(Semantic.Attr.POSITION, bindingIndex);
gl4.glVertexAttribBinding(Semantic.Attr.TEXCOORD, bindingIndex);
gl4.glEnableVertexAttribArray(Semantic.Attr.POSITION);
gl4.glEnableVertexAttribArray(Semantic.Attr.TEXCOORD);
gl4.glBindVertexBuffer(bindingIndex, bufferName.get(Buffer.VERTEX), 0, Vertex_v2fv2f.SIZE);
gl4.glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, bufferName.get(Buffer.ELEMENT));
}
gl4.glBindVertexArray(0);
return true;
}
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:25,代码来源:Gl_430_program_compute_variable_group_size.java
示例3: initVertexArray
import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initVertexArray(GL4 gl4) {
boolean validated = true;
gl4.glGenVertexArrays(1, vertexArrayName);
gl4.glBindVertexArray(vertexArrayName.get(0));
{
gl4.glVertexAttribBinding(Semantic.Attr.POSITION, Semantic.Buffer.STATIC);
gl4.glVertexAttribFormat(Semantic.Attr.POSITION, 2, GL_FLOAT, false, 0);
gl4.glVertexAttribBinding(Semantic.Attr.TEXCOORD, Semantic.Buffer.STATIC);
gl4.glVertexAttribFormat(Semantic.Attr.TEXCOORD, 2, GL_FLOAT, false, Vec2.SIZE);
gl4.glEnableVertexAttribArray(Semantic.Attr.POSITION);
gl4.glEnableVertexAttribArray(Semantic.Attr.TEXCOORD);
gl4.glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, bufferName.get(Buffer.ELEMENT));
gl4.glBindVertexBuffer(Semantic.Buffer.STATIC, bufferName.get(Buffer.VERTEX), 0, glf.Vertex_v2fv2f.SIZE);
}
gl4.glBindVertexArray(0);
return validated;
}
示例4: initVertexArray
import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initVertexArray(GL4 gl4) {
boolean validated = true;
gl4.glGenVertexArrays(1, vertexArrayName);
gl4.glBindVertexArray(vertexArrayName.get(0));
{
gl4.glVertexAttribBinding(Semantic.Attr.POSITION, Semantic.Buffer.STATIC);
gl4.glVertexAttribFormat(Semantic.Attr.POSITION, 2, GL_FLOAT, false, 0);
gl4.glVertexAttribBinding(Semantic.Attr.TEXCOORD, Semantic.Buffer.STATIC);
gl4.glVertexAttribFormat(Semantic.Attr.TEXCOORD, 2, GL_FLOAT, false, Vec2.SIZE);
gl4.glEnableVertexAttribArray(Semantic.Attr.POSITION);
gl4.glEnableVertexAttribArray(Semantic.Attr.TEXCOORD);
gl4.glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, bufferName.get(Buffer.ELEMENT));
gl4.glBindVertexBuffer(0, bufferName.get(Buffer.VERTEX), 0, glf.Vertex_v2fv2f.SIZE);
}
gl4.glBindVertexArray(0);
return validated;
}
示例5: initVertexArray
import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initVertexArray(GL4 gl4) {
gl4.glGenVertexArrays(Program.MAX, vertexArrayName);
gl4.glBindVertexArray(vertexArrayName.get(Program.TRANSFORM));
{
gl4.glVertexAttribFormat(Semantic.Attr.POSITION, 4, GL_FLOAT, false, 0);
gl4.glVertexAttribBinding(Semantic.Attr.POSITION, Semantic.Buffer.STATIC);
gl4.glEnableVertexAttribArray(Semantic.Attr.POSITION);
}
gl4.glBindVertexArray(0);
gl4.glBindVertexArray(vertexArrayName.get(Program.FEEDBACK));
{
gl4.glVertexAttribFormat(Semantic.Attr.POSITION, 4, GL_FLOAT, false, 0);
gl4.glVertexAttribBinding(Semantic.Attr.POSITION, Semantic.Buffer.STATIC);
gl4.glEnableVertexAttribArray(Semantic.Attr.POSITION);
gl4.glVertexAttribFormat(Semantic.Attr.COLOR, 4, GL_FLOAT, false, Vec4.SIZE);
gl4.glVertexAttribBinding(Semantic.Attr.COLOR, Semantic.Buffer.STATIC);
gl4.glEnableVertexAttribArray(Semantic.Attr.COLOR);
}
gl4.glBindVertexArray(0);
return true;
}
示例6: initVertexArray
import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initVertexArray(GL4 gl4) {
gl4.glGenVertexArrays(1, vertexArrayName);
gl4.glBindVertexArray(vertexArrayName.get(0));
{
gl4.glVertexAttribBinding(Semantic.Attr.POSITION, Semantic.Buffer.STATIC);
gl4.glVertexAttribFormat(Semantic.Attr.POSITION, 2, GL_FLOAT, false, 0);
gl4.glVertexAttribBinding(Semantic.Attr.TEXCOORD, Semantic.Buffer.STATIC);
gl4.glVertexAttribFormat(Semantic.Attr.TEXCOORD, 2, GL_FLOAT, false, Vec2.SIZE);
gl4.glEnableVertexAttribArray(Semantic.Attr.POSITION);
gl4.glEnableVertexAttribArray(Semantic.Attr.TEXCOORD);
gl4.glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, bufferName.get(Buffer.ELEMENT));
gl4.glBindVertexBuffer(0, bufferName.get(Buffer.VERTEX), 0, glf.Vertex_v2fv2f.SIZE);
}
gl4.glBindVertexArray(0);
return true;
}
示例7: initVertexArray
import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initVertexArray(GL4 gl4) {
gl4.glGenVertexArrays(1, vertexArrayName);
gl4.glBindVertexArray(vertexArrayName.get(0));
{
gl4.glVertexAttribBinding(Semantic.Attr.POSITION, Semantic.Buffer.STATIC);
gl4.glVertexAttribFormat(Semantic.Attr.POSITION, 2, GL_FLOAT, false, 0);
gl4.glVertexAttribBinding(Semantic.Attr.TEXCOORD, Semantic.Buffer.STATIC);
gl4.glVertexAttribFormat(Semantic.Attr.TEXCOORD, 2, GL_FLOAT, false, Vec2.SIZE);
gl4.glEnableVertexAttribArray(Semantic.Attr.POSITION);
gl4.glEnableVertexAttribArray(Semantic.Attr.TEXCOORD);
gl4.glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, bufferName.get(Buffer.ELEMENT));
gl4.glBindVertexBuffer(Semantic.Buffer.STATIC, bufferName.get(Buffer.VERTEX), 0, glf.Vertex_v2fv2f.SIZE);
}
gl4.glBindVertexArray(0);
return true;
}
示例8: initVertexArray
import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initVertexArray(GL4 gl4) {
gl4.glGenVertexArrays(Program.MAX, vertexArrayName, 0);
gl4.glBindVertexArray(vertexArrayName[Program.TRANSFORM]);
{
gl4.glVertexAttribFormat(Semantic.Attr.POSITION, 4, GL_FLOAT, false, 0);
gl4.glVertexAttribBinding(Semantic.Attr.POSITION, Semantic.Buffer.STATIC);
gl4.glEnableVertexAttribArray(Semantic.Attr.POSITION);
}
gl4.glBindVertexArray(0);
gl4.glBindVertexArray(vertexArrayName[Program.FEEDBACK]);
{
gl4.glVertexAttribFormat(Semantic.Attr.POSITION, 4, GL_FLOAT, false, 0);
gl4.glVertexAttribBinding(Semantic.Attr.POSITION, Semantic.Buffer.STATIC);
gl4.glEnableVertexAttribArray(Semantic.Attr.POSITION);
gl4.glVertexAttribFormat(Semantic.Attr.COLOR, 4, GL_FLOAT, false, Vec4.SIZE);
gl4.glVertexAttribBinding(Semantic.Attr.COLOR, Semantic.Buffer.STATIC);
gl4.glEnableVertexAttribArray(Semantic.Attr.COLOR);
}
gl4.glBindVertexArray(0);
return checkError(gl4, "initVertexArray");
}
示例9: initVertexArray
import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initVertexArray(GL4 gl4) {
gl4.glGenVertexArrays(1, vertexArrayName);
gl4.glBindVertexArray(vertexArrayName.get(0));
{
gl4.glVertexAttribFormat(Semantic.Attr.POSITION, 2, GL_FLOAT, false, 0);
gl4.glVertexAttribBinding(Semantic.Attr.POSITION, Semantic.Buffer.STATIC);
gl4.glEnableVertexAttribArray(Semantic.Attr.POSITION);
gl4.glVertexAttribFormat(Semantic.Attr.TEXCOORD, 2, GL_FLOAT, false, Vec2.SIZE);
gl4.glVertexAttribBinding(Semantic.Attr.TEXCOORD, Semantic.Buffer.STATIC);
gl4.glEnableVertexAttribArray(Semantic.Attr.TEXCOORD);
}
gl4.glBindVertexArray(0);
return checkError(gl4, "initVertexArray");
}