実機でのテクスチャーサイズ

どうも実機では、テクスチャー2の倍数じゃないとinvalid Error出るみたい。
しかも、GLって実行後の次のGLでエラーチェックでもするのか、そこでエラーがでるので見つけにくかった。

スマートじゃないですが、チェック用のメソッドを作った。
public static Bitmap loadBitmap(Context mContext,int id){
Bitmap bitmap= BitmapFactory.decodeResource(mContext.getResources(), id);

if(!sizeCheck(bitmap)){
throw new RuntimeException("width or height not 2x size,it make invalid error on OpenGL:"+id);
}
return bitmap;
}
private static boolean sizeCheck(Bitmap bitmap){
boolean ret=true;
int t=2;
int w=bitmap.getWidth();

while(w!=t){
if(w%t==1){
Log.e("glutils w=",w+","+t);
return false;
}
t*=2;
if(t>w){
return false;
}
}

t=2;
int h=bitmap.getHeight();
while(h!=t){
if(h%t==1){
Log.e("glutils h=",h+","+t);
return false;
}
t*=2;
if(t>h){
return false;
}
}

return ret;
}