PenelopeのC#書き直し版(Unity)
http://gltovar.com/blog/?p=35textureToolがありません
PVR画像を作りたいがコマンドがない-bash: texturetool: command not found
vi ~/.bash_profile
で編集して
PATH="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:${PATH}" export PATH
を追記
. ~/.bash_profile
適用
texturetool -m -e PVRTC --bits-per-pixel-4 -o 変更後.pvr -f PVR 変更前.png
94KB(512x512)のPNG画像が176KBに重くなった。改善が必要。
- mがミップマップを持っている
GLuint loadTexture(NSString* fileName){ GLuint texture; CGImageRef image = [UIImage imageNamed:fileName].CGImage;
今まで「hoge.png」にしてても、「hoge.pvr」にせず「hoge」だけで拡張子は書かない。
ここの記事参考になる
◯Nullpot
・Part1
http://nullpot.blog.fc2.com/blog-entry-16.html
・Part2
http://nullpot.blog.fc2.com/blog-entry-18.html
・変換コマンド
http://webos-goodies.jp/archives/using_compressed_textures_in_iphone.html
「OpenGLで作るiPhone SDKゲームプログラミング」057ページのloadTextureで画像をロードすると
なぜか画像が変なところにひっついたりする。メモリに残る?
しかしPVRにしたり「Nullpot」さんの記事を参考にすると解決した。