本文整理汇总了Java中org.lwjgl.opengl.GL20.glGetAttribLocation方法的典型用法代码示例。如果您正苦于以下问题:Java GL20.glGetAttribLocation方法的具体用法?Java GL20.glGetAttribLocation怎么用?Java GL20.glGetAttribLocation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.lwjgl.opengl.GL20
的用法示例。
在下文中一共展示了GL20.glGetAttribLocation方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fetchAttribs
import org.lwjgl.opengl.GL20; //导入方法依赖的package包/类
private Attribute[] fetchAttribs()
{
int len = GL20.glGetProgrami(this.handle, GL20.GL_ACTIVE_ATTRIBUTES);
int strlen = GL20.glGetProgrami(this.handle, GL20.GL_ACTIVE_ATTRIBUTE_MAX_LENGTH);
Attribute[] attribs = new Attribute[len];
IntBuffer sizeBuffer = BufferUtils.createIntBuffer(1);
IntBuffer typeBuffer = BufferUtils.createIntBuffer(1);
for(int i = 0; i < attribs.length; ++i)
{
String name = GL20.glGetActiveAttrib(this.handle, i, strlen, sizeBuffer, typeBuffer);
int location = GL20.glGetAttribLocation(this.handle, name);
attribs[i] = new Attribute(this, name, typeBuffer.get(), location);
typeBuffer.flip();
}
return attribs;
}
示例2: glGetAttribLocation
import org.lwjgl.opengl.GL20; //导入方法依赖的package包/类
public static int glGetAttribLocation(int p_153164_0_, CharSequence p_153164_1_)
{
return arbShaders ? ARBVertexShader.glGetAttribLocationARB(p_153164_0_, p_153164_1_) : GL20.glGetAttribLocation(p_153164_0_, p_153164_1_);
}
示例3: glGetAttribLocation
import org.lwjgl.opengl.GL20; //导入方法依赖的package包/类
public static int glGetAttribLocation(int program, CharSequence name)
{
return arbShaders ? ARBVertexShader.glGetAttribLocationARB(program, name) : GL20.glGetAttribLocation(program, name);
}