OpenGL ES2.0学習中に発生した問題
1,glGetAttribLocationは-1を返します.
頂点シェーダでattributeが定義されている場合、glGetAttribLocationは-1を返します.このattributeが使用されていないためです.
If the named attribute variable is not an active attribute in the specified program object or if
2,shaderの作成に失敗しました
ifカッコを付ける必要があります.そうしないと、一部のデバイスでshaderが作成されません.
if() return ;if(){return}と書かなければなりません
}
else{
return ;
}
GPUの中でshaderは注意します
頂点シェーダでattributeが定義されている場合、glGetAttribLocationは-1を返します.このattributeが使用されていないためです.
If the named attribute variable is not an active attribute in the specified program object or if
name
starts with the reserved prefix "gl_", a value of -1 is returned. 2,shaderの作成に失敗しました
ifカッコを付ける必要があります.そうしないと、一部のデバイスでshaderが作成されません.
if() return ;if(){return}と書かなければなりません
}
else{
return ;
}
GPUの中でshaderは注意します