2011-01-24 20 views

答えて

2

あなたはこのようにインデックスを取得(この例では、属性が「textureCoords」と命名された)シェーダプログラムやテクスチャ属性の名前を考える:

int a_texture = glGetAttribLocation(program, "textureCoords"); 

してから、このようglVertexAttribPointerでa_textureを使用します。

glVertexAttribPointer(a_texture, 2, GL_FLOAT, 0, 0, textureVertices); 
+0

ありがとうございました。 –

関連する問題