【3Dエンジン】Irrlicht初心者質問スレ【高速描画】at GAMEDEV【3Dエンジン】Irrlicht初心者質問スレ【高速描画】 - 暇つぶし2ch■コピペモード□スレを通常表示□オプションモード□このスレッドのURL■項目テキスト806:名前は開発中のものです。 09/03/01 13:12:49 ISZp42BO ビルボードのUVの変え方貼り逃げ vector2df UVCount, UVSize, UVScale, UVFrame; // UVの縦横のコマ個数を保存 UVCount = vector2df( 4, 4 ); //UVの縦横の現在のコマを保存 UVFrame = vector2df( 0, 0 ); // 1つあたりのサイズ取得 UVSize.X = Texture->getOriginalSize().Width/UVCount.X; UVSize.Y = Texture->getOriginalSize().Height/UVCount.Y; // スケール比 UVScale.X = 1.0f/UVCount.X; UVScale.Y = 1.0f/UVCount.Y; // リソースサイズ取得 f32 sizeW = Texture->getOriginalSize().Width; f32 sizeH = Texture->getOriginalSize().Height; // matrix4 mat; // UV変更 mat = Node->getMaterial( 0 ).getTextureMatrix( 0 ).buildTextureTransform( 0.0f, vector2df( 0.0f ), vector2df( UVSize.X*UVFrame.X, UVSize.Y*UVFrame.Y ), vector2df( UVScale.X, UVScale.Y ) ); // マテリアル再設定 Node->getMaterial( 0 ).setTextureMatrix( 0, mat ); 次ページ最新レス表示レスジャンプ類似スレ一覧スレッドの検索話題のニュースおまかせリストオプションしおりを挟むスレッドに書込スレッドの一覧暇つぶし2ch