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