锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产毛片欧美毛片久久久,日本精品久久久久久久久免费,97久久精品人人澡人人爽http://www.shnenglu.com/Leaf/category/20462.html~~zh-cnSun, 28 Apr 2013 04:33:24 GMTSun, 28 Apr 2013 04:33:24 GMT60irrlicht寮曟搸錛氫負浠涔堟垜浼氭兂鐫鎹i紦榪欒揣http://www.shnenglu.com/Leaf/archive/2013/04/11/199331.htmlRender DonkeyRender DonkeyWed, 10 Apr 2013 17:30:00 GMThttp://www.shnenglu.com/Leaf/archive/2013/04/11/199331.htmlhttp://www.shnenglu.com/Leaf/comments/199331.htmlhttp://www.shnenglu.com/Leaf/archive/2013/04/11/199331.html#Feedback4http://www.shnenglu.com/Leaf/comments/commentRss/199331.htmlhttp://www.shnenglu.com/Leaf/services/trackbacks/199331.html鍏跺疄鎴戜篃鍦ㄩ棶鑷繁錛屼負浠涔堟暣鏉ユ暣鍘伙紝鍙堟崳榧撹搗榪欎釜涓滆タ浜嗐?/p>

棣栧厛錛宨rrlicht鐨勫晢涓氭ф槸寰堟祬鐨勶紝濡傛灉瑕佹兂搴旂敤浜庡晢涓氬寲錛屼笉涓嬩竴緲誨姛澶槸涓嶈鐨勩?姣旇搗鐜板湪婊″ぉ椋炶垶鐨刄INTY3D錛屽氨鏇翠笉鐢ㄨ浜嗐傚氨綆楀拰OGRE姣旓紝涔熷洜涓篒RRLICHT娌℃湁鎻愪緵澶鑺卞摠鐨勭壒鎬э紝鑰屽鑷磋繖涔堝騫存潵ARPU鍊間竴鐩存病鏈塐GRE楂橈紝鐜╁嫻佸け鐜囨槸宸ㄥぇ鐨勩?/p>

Niko鑷繁鏁寸殑SupperCuber.灝辨洿涓嶇敤璇翠簡錛屾垜鑷繁涓嬭澆鏉ュ紕浜嗕竴涓嬶紝涔熸病瑙佸緱鏈夊濂戒嬌錛屽弽姝f病鏈夊畼鏂逛粙緇嶅緱閭d箞鐗汢銆?/p>

 

鍦ㄩ噸鏂板畾浣嶈嚜宸辮娣卞叆鎸栨帢鐨勫紩鎿庝箣鍓嶏紝涔熸浘鍐嶄竴嬈¤OGRE鍚稿紩榪囥?鍘熷洜鏈夊緢澶氱錛?/p>

涓鏄ぉ榫欎唬鐮佺殑娉勬紡錛岄噷闈㈡湁寰堝OGRE妯″瀷錛屽彲浠ョ洿鎺ュ姞杞斤紝鏋勫緩鍦烘櫙銆傚緢蹇熷湴鑾峰緱鍍忔ā鍍忔牱鐨勬垚灝辨劅銆?/p>

浜屾槸錛孫GRE鏈韓鐨凞EMO灝辨彁渚涗簡澶ч噺鐨凷HADER錛屼笉鐢ㄨ嚜宸卞啀杈涜緵鑻﹁嫤鍦板幓涓滄嫾瑗挎壘浜嗐?/p>

涓夋槸錛屾湰鏉ヤ笌涓涓湅鍙嬬浉綰︾敤OGRE鏁碦TS鐨勶紝 鍥犱負鐩墠鍏徃鐨勯」鐩槸RTS錛屾墍浠ヤ竴鏃墮棿錛屽RTS鍏磋叮澶у錛?鐪嬩簡0 A.D. GLEST絳変唬鐮併?涔熸槑鐧戒簡RTS涓紝宸ュ叿涓嶢I錛岃繙榪滃ぇ榪囦簬鐢婚潰鏄劇ず銆?鎵浠ワ紝浣跨敤OGRE錛屾湁鐜版垚鐨凮greCrowd絳夊彲浠ヤ嬌鐢ㄣ?涓嶇敤鍐嶄負鍔ㄦ佸璺壘楹葷儲銆?/p>

鍥涙槸錛孫GRE鐨勬嫑鑱樺拰鎴愮啛鐨勬渚嬭繙榪滃ぇ浜巌rrlicht. 鍏夋槸鎴戠煡閬撶殑 澶╅緳鍏儴錛屾垚鍚夋濇睏錛岀嫭瀛ゆ眰璐ワ紝鏋佸厜涓栫晫錛岀伀鐐箣鍏夌瓑錛屽氨瓚沖璇存槑瀹冪殑濞佸姏銆?/p>

浜旀槸錛孫GRE瀹樻柟鏀寔WIN8,ADDROID,IOS銆傘?/p>

鍘熷洜澶浜嗭紝榪欐槸涓綃囪irrlicht鐨勬枃绔狅紝鑰佹槸澶窸GRE鏄笉閬撳痙鐨勩?/p>

 

涓嬮潰錛屾垜鏉ヨ璇存垜鐨勫師鍥狅紝涔熶緵鍜屾垜涓鏍風籂緇撶殑鏈嬪弸浣滀竴涓弬鑰冦?/p>

涓銆佹垜鏃墮棿鏈夐檺錛岃櫧鐒朵箣鍓嶇湅榪嘜GRE鐨勪唬鐮侊紝浣嗘槸瀵筄GRE榪樻槸涓嶆暍璇存湁鎺屾彙錛?濡傛灉瑕佺敤OGRE錛屽叾瀹炶繕鏄緱閲嶅ご鍐嶆潵銆?/p>

浜屻両RRLICHT鍥犱負涓滆タ涓嶅錛屾墍浠ヤ互鍓嶅湪澶у鐨勬椂鍊欙紝灝卞鍏跺緢鐔熸倝浜嗭紝鍥炶繃澶存潵涓婃墜錛屼篃鏇村鏄撱?/p>

涓夈佹湁涓鐐圭偣鎺у埗嬈插湪閲岄潰錛屾兂鐪嬬湅IRRLICHT緇忚繃鏀歸犲悗錛屾槸涓嶆槸鐪熺殑姣斾笉涓奜GRE銆?/p>

鍥涖佽渶闂ㄧ殑鎴愬姛錛岃凍澶熻鏄庝竴涓父鎴忕殑鐢婚潰錛屼笉鏄叏閮紝鍙涓嶅獎鍝嶅ぇ灞錛?鏈変竴涓瘮杈冧寒鐐圭殑鎶鏈垨鑰呮晥鏋滐紝灝卞彲浠ョ暀浣忕帺瀹躲?鎴戞兂錛岃渶闂ㄩ噷瑁呭鐨勬祦鍏夋晥鏋滐紝铏界劧灝辨槸緇忚繃緹庢湳綺懼績璁捐鍚庣殑綰圭悊鍔ㄧ敾錛?浣嗗凡緇忚凍澶熶綋鐜伴珮綰ц澶囧拰浣庣駭瑁呭鐨勫樊璺濄?鐜╁涔熻兘鎰熷彈鍒拌嚜宸遍珮綰ц澶囩殑鍗庝附錛?鎵浠ワ紝鎴戞洿鍠滄铚闂ㄧ殑灝忓閥銆?/p>

浜斻佺姱璐憋紝瓚婃槸澶氱殑浜哄枩嬈㈢殑涓滆タ錛岃秺鏄笉鎯蟲暣銆?/p>

鍏佹兂鎱㈡參榪囨浮錛屽厛浣跨敤IRRLICHT錛岀洿鍒癐RRLICHT涓嶅鐢紝灝辨敼錛屾敼瀹屼簡錛屽氨鎶奍RR鎵鏈夌殑涓滆タ鍒犻櫎浜嗭紝鍚嶅瓧鎹簡銆?灝辨槸鑷繁鐨勪簡銆?/p>

涓冦丟AMELOFT鐨勫埡瀹俊鏉$敤鐨勬槸IRRLICHT錛屾墍浠ワ紝鎴戣寰楄繕鏄彲浠ョ殑銆?錛圥S:涓嬭澆鏉ョ帺浜嗕竴涓嬶紝鍦↖PAD涓婏紝涓昏绔欑珛涓嶅姩鐨勬椂鍊欙紝浼氭潵鍥炴姈鍔紝 鎽勭浉鏈虹Щ鍔ㄧ殑鏃跺欙紝涔熶細鎶栧姩錛屽緢璐硅В錛?闅鵑亾鏄誕鐐圭簿搴﹂棶棰橈紵 浣哢NITY3D鍜孋OCOS2D-X絳夋槸娌℃湁榪欓棶棰樼殑鍛錛夈?/p>

 

鍏跺疄錛屽垪浜嗗緢澶氭潯錛屾渶鍚庝篃鍙戠幇錛孖RRLICHT闄や簡瑕佺畝鍗曠偣浠ュ錛屾槸娌℃湁OGRE閭d箞寮哄ぇ鐨勩?涓嶈繃錛屾垜榪樻槸閫夋嫨浜嗕粠綆錛屾瘯绔熺簿鍔涙湁闄愩?濡傛灉瑕佹妸OGRE鏁村涓滆タ鐞嗚В浜嗭紝鍐嶉愭閲嶅啓錛屾垜浼拌浼氱柉鎺夈?姣曠珶澶ц屽叏鐨勪笢瑗匡紝鍏蜂綋鍦ㄧ敤鐨勬椂鍊欙紝鏄鎶涙帀寰堝涓滆タ鏉ユ崲鍙栨晥鐜囩殑銆?/p>

 

鏃㈢劧鍒拌繖涓偣浜嗭紝涓嶅緱涓嶈鐐瑰埆鐨勩?/p>

11騫寸殑鏃跺欙紝鍏徃鐮斿彂鐨勫紩鎿庡湪婕旂ず瀹孌EMO鍚庯紝灝卞彨鍋滀簡銆?欏圭洰榪涜浜嗕袱騫村崐錛屾渶鍚庡彧鏈変竴鍫嗕唬鐮佸拰婕旂ず紼嬪簭銆?瀵瑰叕鍙告潵璇達紝鍏跺疄鏄竴瀹氱殑鎹熷け銆?鍚庢潵欏圭洰緇勬垚鍛樿漿鎴榃EB銆?nbsp; 璧板埌榪欎竴姝ワ紝鍏跺疄鍘熸潵鐨勬垚鍛樺彧鍓╁拰鎴戝彟涓涓惌妗d簡銆?/p>

娌℃兂鍒幫紝榪涘叆浜哤EB錛屽氨涓鍘諱笉澶嶈繑浜嗐?騫朵笖錛屽叕鍙哥殑WEB欏圭洰榪涘睍涔熶笉鏄緢欏哄埄銆?nbsp; 閮借姣曚笟鍚庝袱騫存槸涓涓垎姘村箔錛?褰撴椂姝eソ姣曚笟涓ゅ勾銆?浜庢槸鍐沖畾鎹竴涓幆澧冩寫鎴樸?灝辨潵鍒頒簡鐩墠鐨勫叕鍙革紝鍋歊TS娓告垙鏈嶅姟鍣ㄣ?nbsp; 闈㈠鏈煡鐨勪笢瑗匡紝璨屼技鏇磋兘嬋鍙戞垜鐨勫叴瓚o紝濡備粖椹笂鍙堟槸涓騫翠簡銆傛笎娓愬湴錛屽紑濮嬫蹇靛紩鎿庯紝鎬蹇靛浘褰€?鍙互璇碔RRLICHT鐩墠灝辨槸琚垜鐢ㄦ潵琛ㄨ揪鎴戝鍥懼艦鐨勬濆康銆?铏界劧鎴戝浘褰㈡柟闈㈢殑鎶鏈緢闄堟棫錛岃佸湡錛?浣嗗茍涓嶅獎鍝嶆垜璇存垜鍠滄鎼炲浘褰€?/p>

鏂囩珷灝卞埌姝ゅ惂銆備篃涓嶇煡閬撳啀瑕佽浜涗粈涔堜簡銆?/p>

Render Donkey 2013-04-11 01:30 鍙戣〃璇勮
]]>
irrlicht寮曟搸:涓枃鏀寔http://www.shnenglu.com/Leaf/archive/2013/04/11/199329.htmlRender DonkeyRender DonkeyWed, 10 Apr 2013 17:01:00 GMThttp://www.shnenglu.com/Leaf/archive/2013/04/11/199329.htmlhttp://www.shnenglu.com/Leaf/comments/199329.htmlhttp://www.shnenglu.com/Leaf/archive/2013/04/11/199329.html#Feedback0http://www.shnenglu.com/Leaf/comments/commentRss/199329.htmlhttp://www.shnenglu.com/Leaf/services/trackbacks/199329.html榪樻槸鍏堜笂鍥懼惂

榪欐槸浣跨敤freetype榪涜涓枃鏄劇ず鐨勬晥鏋溿?/p>

irrlicht鐢變簬鏄嬌鐢ㄤ綅鍥懼瓧浣撶殑鏂瑰紡錛屾槸寰堝鏄撴浛鎹㈡帀瀛椾綋鐨勩?鍚屾椂錛屽叾鏈韓涔熸彁渚涗簡Font鎺ュ彛鏇挎崲鐨勫姛鑳姐?/p>

鍏蜂綋鍋氭硶鍜岀綉涓婂ぇ澶氭暟浜烘槸涓鏍風殑銆?/p>

 

鍦ㄥ仛榪欎釜鐨勬椂鍊欙紝鍙堝紩鍏ヤ簡鍙︿竴涓瘽棰橈紝 gameswf鍜宬font(KlayGE Font)

gameswf鏄竴涓紑婧愮殑C++ FLASH PLAYER銆?/p>

gameloft浠ュ強寰堝縐誨姩搴旂敤鎴栬呮父鎴忛兘鍦ㄤ嬌鐢ㄥ畠銆?/p>

褰撶劧錛屼篃鍖呮嫭ScaleForm. 鍥犱負ScaleForm鏄晢涓氱殑錛屾墍浠ユ瘮gameswf鏇村姞瀹屽杽錛岃櫧鐒惰錛実ameswf鏄疭caleForm鐨勫師鍨嬨?/p>

 

kfont涓鐩存槸鑷繁鍠滄鐨勪竴縐嶅瓧浣撹В鍐蟲柟妗堬紝鍏舵棤姣旀媺浼哥殑鑳藉姏闈炲父璁ㄤ漢鍠滄銆傚姞涓婄幇鍦ㄥ張鍗曠嫭鎴愬簱浜嗭紝濡傛灉涓嶇敤gameswf鐨勮瘽錛屾垜鎯蟲妸瀹冩暣鍚堣繘irrlicht涓?涓ゅ勾鍓嶅叕鍙革紙鍏堝墠鐨勫叕鍙革級鐨勫紩鎿庡氨鐢ㄤ笂浜嗚繖涓紝閬楁喚瀛椾綋搴撲笉鏄垜寮勮繘鍘葷殑錛屼竴鐩村kfont娌℃湁榪戣窛紱繪帴瑙︺?/p>

 

緗戜笂涓嬭澆涓嬫潵鐨勪唬鐮?涓嬮潰鍦板潃鍙緵鍙傝冿紝榪欐槸鎴戣寰椾紬澶氭枃绔犱腑錛岃寰楁瘮杈冪粏鐨勪竴涓?/p>

http://blog.csdn.net/lee353086/article/details/5260101

 

鑷充簬FreeType,澶у鍘誨畼鏂逛笅杞芥潵緙栬瘧灝卞彲浠ヤ簡銆?/p>

Render Donkey 2013-04-11 01:01 鍙戣〃璇勮
]]>
irrlicht寮曟搸:Bloom鏁堟灉http://www.shnenglu.com/Leaf/archive/2013/04/11/199328.htmlRender DonkeyRender DonkeyWed, 10 Apr 2013 16:49:00 GMThttp://www.shnenglu.com/Leaf/archive/2013/04/11/199328.htmlhttp://www.shnenglu.com/Leaf/comments/199328.htmlhttp://www.shnenglu.com/Leaf/archive/2013/04/11/199328.html#Feedback0http://www.shnenglu.com/Leaf/comments/commentRss/199328.htmlhttp://www.shnenglu.com/Leaf/services/trackbacks/199328.html鍏堜笂鍥撅紝鍐嶈鐐瑰埆鐨勩?/p>

 

image

BLOOM寮

 

2000

BLOOM鍏?/p>

 

鍦↖RRLICHT涓疄鐜癇LOOM錛屽拰鍏跺畠寮曟搸涓病鏈夊お澶氱殑涓嶅悓銆?SHADER榪樻槸閭d釜SHADER銆?/p>

鍏充簬BLOOM鐨勭畻娉曪紝涔熷氨閭f牱浜嗭紝娌℃湁鐗瑰埆涔嬪錛屽喌涓旓紝鎴戣繖BLOOM寰堟毚鍔?/p>

render scene to texture.

1/4 downsample 閫夋嫨鏆村厜鍍忕礌

h_blur  7嬈¢噰鏍?鍜屾潈閲嶆販鍚?

v_blur  7嬈¢噰鏍?鍜屾潈閲嶆販鍚?/p>

compose 涓ゅ浘鍙犲姞

 

涓嬮潰璇磋鎴戝湪irrlicht涓疄鐜皃ost processing鐨勬柟妗堛?/p>

鍦╥rrlicht涓槸娌℃湁灞忓箷瀵歸綈鍥涜竟褰㈣妭鐐圭殑錛屽鏋滆鐗規畩鎵╁睍錛屽氨鍙兘淇敼浠g爜浜嗐傛垜鏄敖閲忎繚璇佽嚜宸變笉淇敼IRR涓琛屼唬鐮侊紝 闄ら潪鏄湡姝d嬌鐢ㄦ椂錛岃瀵規晥鐜囪繘琛屼紭鍖栥傚墠鐜板疄鐜扮殑GPU钂欑毊錛屾按闈紝闀滈潰絳夛紝閮芥病鏈変慨鏀硅繃涓琛屼唬鐮侊紝 鍥犱負鎴戜笉鎯沖洜涓鴻嚜宸辯殑涓鏃墮渶姹傦紝鑰屾敼鍔ㄤ簡閭d竴鍫嗐?褰撴垜鐪熺殑闇瑕佹敼鍔╥rrlicht鎵嶈兘杈懼埌鐩爣鐨勬椂鍊欙紝琛ㄧずirrlicht涓垜浣跨敤鐨勯儴鍒嗭紝鍙互閫浼戜簡銆?/p>

 

娓叉煋鍦烘櫙鐨勬椂鍊欙紝鎴戜滑閫氬父鍦ㄤ嬌鐢╝ddXXXXSceneNode鐨勬椂鍊欙紝閮介粯璁や笉浼犵埗鑺傜偣銆傝繖鏍峰氨鏄粯璁ょ殑鍦烘櫙鏍硅妭鐐廣備絾鏄紝褰撴垜浠鍋歱ost process鐨勬椂鍊欙紝灝遍渶瑕佸鍦烘櫙涓殑鐗╀綋榪涜鏄劇ず鐨勫紑鍜屽叧錛?浜庢槸錛屾垜浠負浜嗗緢蹇熷湴鎺у埗錛?浜庢槸灝嗘櫘閫氬満鏅妭鐐瑰鍔犱簡涓涓埗鑺傜偣錛?鑰宲ost processing浣滀負鍦烘櫙鐨勫厔寮熻妭鐐癸紝 榪欐牱鍦ㄦ覆鏌撶殑鏃跺欙紝灝卞彲浠ユ柟渚垮湴榪涜鐩稿叧鎺у埗浜嗐?/p>

澶ф鏄繖鏍風殑

                          RootSceneNode

     PostProcessingNode            SceneOjbectsNode

                                             Obj1鈥?Obj2鈥?Obj3鈥?/p>

 

嫻佺▼錛?/p>

鍏抽棴    PostProcessingNode 錛?娓叉煋  SceneOjbectsNode 涓嬫墍鏈夌殑鐗╀綋鍒癛T涓娿?/p>

鍏抽棴    SceneOjbectsNode錛?鎵撳紑PostProcessingNode錛?榪涜涓緋誨垪鐨勫悗鏈熸晥鏋滃鐞嗐?/p>

 

鍦╥rrlicht涓槸娌℃湁鎻愪緵灞忓箷瀵歸綈鍥涜竟褰㈢粯鍒剁殑錛?濡傛灉鎵嬪伐鏋勫緩錛屽氨寰堥夯鐑︺?鎵浠ワ紝鎴戦噰鐢ㄧ殑鏄竴縐嶅緢甯歌鐨勬墜娉曪紝 鍗抽氳繃UV鍧愭爣鏉ヨ綆楁渶鏈緇堢殑欏剁偣鍧愭爣鍊箋?/p>

VS鐨勮緭鍑猴紝鏄涓鍖栧潗鏍囩郴錛?鍗砐,Y鏄浜?錛堬紞1錛?錛変箣闂寸殑錛?浜庢槸銆?鎴戜滑鍙渶瑕?pos = (uv-0.5)*2;  pos.y = 鈥損os.y;灝卞彲浠ヤ簡銆?/p>

鏈榪戜竴鐩村湪鍔犵彮錛屾病鏃墮棿鏁寸悊鍑轟唬鐮併?鏈夊叴瓚g殑鏈嬪弸鍙互鍔犱笅闈㈢殑緹?/p>

Irrlicht Engine-China

254431855



Render Donkey 2013-04-11 00:49 鍙戣〃璇勮
]]>
Programming 3D games on Android with Irrlicht and Bullethttp://www.shnenglu.com/Leaf/archive/2013/04/06/199161.htmlRender DonkeyRender DonkeySat, 06 Apr 2013 13:19:00 GMThttp://www.shnenglu.com/Leaf/archive/2013/04/06/199161.htmlhttp://www.shnenglu.com/Leaf/comments/199161.htmlhttp://www.shnenglu.com/Leaf/archive/2013/04/06/199161.html#Feedback0http://www.shnenglu.com/Leaf/comments/commentRss/199161.htmlhttp://www.shnenglu.com/Leaf/services/trackbacks/199161.htmlProgramming 3D games on Android with Irrlicht and Bullet (Part 1)

Posted on May 19, 2011, 11:00 pm, by xp, under Programming.

Just got a new Android phone (a Samsung Vibrant) a month ago, so after flashing a new ROM and installing a bunch of applications, what would I want to do with the new phone? Well, I鈥檇 like to know if the phone is fast enough to play 3D games. From the hardware configuration point of view, it is better equipped than my desktop computer in the 1990s, and since my desktop computer at the time had no problem with 3D games, I would expect it to be fast enough to do the same.

At first, I was considering downloading a 3D game from the market, but 3D games for Android are still rare, then why don鈥檛 I just create a 3D demo game myself?

After looking around which 3D game engines are available for the Android platform, I just settled down with Irrlicht. This is an open source C++ graphic engine, and not really a game engine per se, but it should have enough features to create my demo 3D application. And I like to have realistic physics in my game, so what could be better than the Bullet Physics library? This is the best known open source physics library, also developed in C++. The two libraries together would be an interesting combination.

Although Irrlicht was developed for desktop computers, but luckily enough, someone has already ported Irrlicht to the Android platform, which requires a special device driver for the graphic engine. And guess what? Someone has also created a Bullet wrapper for the Irrlicht engine. All of them in C++, and open source. All we need to do now to pull all these codes together to build a shared library for Android.

In this part, I鈥檒l just describe what needs to compile all the codes for Android. Since we will compile C/C++ codes, you鈥檒l need to download the Android native development kit. Please refer to the documentation on how to install.

We create an Android project, and add a jni folder. Then we put all the C/C++ source codes under the jni folder. I created three sub-folders:

  1. Bullet: All the Bullet Physics source codes. Actually, we only need the Collision, Dynamics, Soft Body and Linear Math libraries.
  2. Irrlicht: The Irrlicht 3D graphic engine source codes. This is the Android port of the engine.
  3. irrBullet: This is the Bullet wrapper for Irrlicht engine, which makes it easier to write your programs.

After, all we need to do is to create an Android.mk file, which is quite simple, really. You can read the makefile to see how it is structured. Basically, we just tell the Android NDK build tools that we want to build all the source codes for the Arm platform, and we want to link with the OpenGL ES library, to create a shared library called libirrlichtbullet.so. That鈥檚 about it.

However, there鈥檚 one minor thing to note though. Android does not really support C++ standard template library, but the irrBullet library made use of it. Therefore, in the jni folder, we need to add an Application.mk file, which contains the following line:

APP_STL  := stlport_static

And that鈥檚 it. Now, you can run ndk-build to build the shared library. If you have a slow computer, it would take a while. If everything is alright, you should have a shared library in the folder libs/armeabi/. That shared library contains the Bullet Physics, Irrlicht and the irrBullet wrapper libraries. You can now create your 3D games for Android with it. In the next part, we will write a small demo program using this library.

You can download all the source codes and pre-built library here.

 

 

Programming 3D games on Android with Irrlicht and Bullet (Part 2)

Posted on May 20, 2011, 11:30 am, by xp, under Programming.

In the last post, we have built the Bullet Physics, Irrlicht and irrBullet libraries together to create a shared library for the Android platform. In this post, we are going to create a small demo 3D game for Android, using the libraries that we have built earlier.

This demo is not really anything new, I am going to just convert an Irrlicht example to run on Android. In this simple game, we are going to stack up a bunch of crates, and then we will shoot a sphere or a cube, from a distance, to topple the crates. The Irrlicht engine will handle all the 3D graphics, and the Bullet Physics library will take care of rigid body collision detection and all realistic physical kinetics. For example, when we shoot a sphere from the distance, how the sphere follows a curve line when flying over the air, how far it will fly, where it is going to fall on to the ground, how it reacts when it hits the ground, how it reacts when it hits the crates, and how the crates will react when being hit, etc, all these will be taken care of by Bullet Physics, and Irrlicht will render the game world accordingly.

Since it is easier to create Android project in Eclipse, we are going to work with Eclipse here. You will need to following tools to work with:

  1. Android SDK
  2. Android NDK
  3. Eclipse IDE
  4. Eclipse plugin for Android development.

I鈥檓 assuming you have all these tools installed and configured correctly. And I鈥檓 assuming you have basic knowledge on Android programming too, so I won鈥檛 get into the basic details here.

Let鈥檚 create a project called ca.renzhi.bullet, with an Activity called BulletActivity. The onCreate() method will look something like this:

  1. @Override

  2. public void onCreate(Bundle savedInstanceState) {

  3. super.onCreate(savedInstanceState);

  4. // Lock screen to landscape mode.

  5. this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);

  6. mGLView = new GLSurfaceView(getApplication());

  7. renderer = new BulletRenderer(this);

  8. mGLView.setRenderer(renderer);

  9. DisplayMetrics displayMetrics = getResources().getDisplayMetrics();

  10. width = displayMetrics.widthPixels;

  11. height = displayMetrics.heightPixels;

  12. setContentView(mGLView);

  13. }

This just tells Android that we want an OpenGL surface view. We will create a Renderer class for this, something very simple like the following:

  1. public class BulletRenderer implements Renderer

  2. {

  3. BulletActivity activity;

  4. public BulletRenderer(BulletActivity activity)

  5. {

  6. this.activity = activity;

  7. }

  8. public void onDrawFrame(GL10 arg0)

  9. {

  10. activity.drawIteration();

  11. }

  12. public void onSurfaceChanged(GL10 gl, int width, int height)

  13. {

  14. activity.nativeResize(width, height);

  15. }

  16. public void onSurfaceCreated(GL10 gl, EGLConfig config)

  17. {

  18. activity.nativeInitGL(activity.width, activity.height);

  19. }

  20. }

The renderer class鈥檚 method will be invoked every time a frame needs to be rendered. There鈥檚 nothing special here. When the methods are invoked, we just invoke the native methods in the activity class, which will then call the C native functions through JNI. Since Irrlicht and Bullet are C++ libraries, we will have to write the main part of the game in C/C++. We keep very little logic in Java code.

When the surface is first created, the onSurfaceCreated() method is invoked, and here, we just call nativeInitGL(), which will initialize our game world in Irrlicht. This will initialize the device, the scene manager, create a physical world to manage the rigid bodies and their collision, create a ground floor, and put a stack of crates in the middle point. Then, we create a first-person-shooter (FPS) camera to look at the stack of crates. The player will look at this game world through the FPS camera.

I鈥檓 not going to describe the codes line by line, since you can download the codes to play with it. But when you create the Irrlicht device with the following line of code:

  1. device = createDevice( video::EDT_OGLES1, dimension2d(gWindowWidth, gWindowHeight), 16, false, false, false, 0);

Make sure you select the correct version of OpenGL ES library on your Android device. I have version 1.x on mine. But if you have version 2.x, change to video::EDT_OGLES2 instead.

After the initialization, we would have a scene that looks like this:

When a frame is changed and needs to render, the onDrawFrame() method of the renderer is invoked. And here, we just call the nativeDrawIteration() function and will handle the game logic in C/C++ codes. The code looks like this:

  1. void Java_ca_renzhi_bullet_BulletActivity_nativeDrawIteration(

  2. JNIEnv* env,

  3. jobject thiz,

  4. jint direction,

  5. jfloat markX, jfloat markY)

  6. {

  7. deltaTime = device->getTimer()->getTime() 鈥?timeStamp;

  8. timeStamp = device->getTimer()->getTime();

  9. device->run();

  10. // Step the simulation

  11. world->stepSimulation(deltaTime * 0.001f, 120);

  12. if ((direction != -1) || (markX != -1) || (markY != -1))

  13. handleUserInput(direction, markX, markY);

  14. driver->beginScene(true, true, SColor(0, 200, 200, 200));

  15. smgr->drawAll();

  16. guienv->drawAll();

  17. driver->endScene();

  18. }

As you can see, this is very standard Irrlicht game loop, the only thing added here is a function to handle user input.

User input includes moving left and right, forward and backward, shooting sphere and cube. Irrlicht engine depends on keyboard and mouse for user interaction, which are not available on Android devices. So, we will create a very basic kludge to allow users to move around and shoot. We will use touch and tap to handle user input. Users will move their finger left and right, on the left part of the screen, to move left and right in the game world. Users will move their finger up and down, on the right part of screen, to move forward and backward in the game world. And tap on the screen to shoot. Therefore, the movement direction is translated into a parameter, called direction, and passed to the native code to be handled. We also grab the X and Y coordinates of the shooting mark, and pass them as parameters to native codes as well.

That鈥檚 it. You can now build it, package into an apk, install it on your Android device, and play with it. When you shoot on the stack of crates, you would have a scene that looks like this:

The performance on my Samsung Vibrant is ok, I get about 56 or 57 FPS, which is quite smooth. But if there are too many objects to animate, especially after we have shot many spheres and cubes, we will have a screen that hangs and jumps a bit, or sometimes, it stops to react to user input for a fraction of second. In a real game, we might want to remove objects that have done their work, so that the number of objects to animate is significantly reduced to maintain an acceptable performance.

The other important thing that we want to improve is user interaction and control. The Irrlicht engine is developed for desktop computers, it relies mainly on keyboard and mouse for user interaction. These are not available on mobile devices. The current demo attempted to use touch and tap on screen as user control, but it does not work very well. In a next post, we will try to create virtual controls on screen (e.g. buttons, dials, etc), and we might want to take advantage of the sensor as well, which is a standard feature on mobile devices now.

You can download the source codes of the demo here.

 

Programming 3D games on Android with Irrlicht and Bullet (Part 3)

Posted on May 23, 2011, 6:25 pm, by xp, under Programming.

In the last post, we have created a basic 3D demo application with Irrlicht, in which we put a stack of crates, and we topple them by shooting a cube or a sphere.

In this post, we will try to create an on-screen control so that you can move around with it, like using a hardware control. What we want to have is something like this, in the following screenshot:

What we have here is a control knob, sitting on a base. The knob is in the centre of the base. The on-screen control always stays on top of the game scene, and the position should stay still regardless of how you move the camera. However, users can press on the knob, and drag it left and right, and this, in turn, moves the camera left and right accordingly.

Obviously, you can implement movement direction along more than one axis too. And you can also have more than one on-screen control if you want, since it is a device with multi-touch screen. But that鈥檚 left to you as an exercise.

Placing an on-screen control is actually quite easy. All you have to do is to load a picture as texture, then draw it as 2D image on the screen, at the location you want to put the control. But since we want the on-screen control to be always on top, we have to draw the 2D image after the game scene (and all the scene objects) are drawn. If we draw the 2D image first, it will hidden by the game scene. There, in your loop, you would have something like this:

  1. driver->beginScene(true, true, SColor(0, 200, 200, 200));

  2. smgr->drawAll();

  3. guienv->drawAll();

  4. // Draw the on-screen control now

  5. onScreenControl->draw(driver);

  6. driver->endScene();

That鈥檚 the basic idea. Here, we have created an OnScreenControl class, which encloses two objects, one of VirtualControlBase class and the other, of VirtualControlKnob class. The draw() method of the OnScreenControl class looks like this:

  1. void OnScreenControl::draw(IVideoDriver* driver)

  2. {

  3. base->draw(driver);

  4. knob->draw(driver);

  5. }

It just relegates the drawing works to its sub-objects, the control base and the control knob. Note that the knob has to be drawn after the base, otherwise, it will be hidden behind the base, instead of sitting on top of it. The draw() method of the base looks like:

  1. void VirtualControlBase::draw(IVideoDriver* driver)

  2. {

  3. driver->draw2DImage(_texture,

  4. position2d(pos_x, pos_y),

  5. rect(0, 0, width, height),

  6. 0,

  7. SColor(255,255,255,255),

  8. true);

  9. }

As you see, it just draws a 2D image with the texture, at the location specified. That鈥檚 it.

After putting the on-screen control in place, we have to handle user touch events on the screen. If users press on the knob (i.e. pressing within the square boundary of the knob image), and move the finger around, we update the position of the knob according to the movement direction. Here, we want to make sure that users can not drag the knob out of the control base boundary (or too far out of the boundary anyway), to make it look and behave like a real control. As users move the knob around, you want to update your camera鈥檚 position accordingly. And when the knob is released, you want to reset its position back to the centre of the control base.

That鈥檚 basically the idea. You can grab the source code here. Ugly codes, I warn you.

The major problem of programming Irrlicht on Android is the separation of Java codes and the C/C++ codes. If you want to limit your program to only Android 2.3 or later, you can probably write the whole program in C/C++, using the native activity class. That way, you don鈥檛 have to move back and forth between Java and C++. But if you want to run your program on older versions of Android, your Activity must be written in Java, and the main game logic written in C/C++. You then have to catch user interaction events in your Java code, pass them through JNI to your C/C++ code. There will be loss of information as you move back and forth, not to mention that there will be quite a bit of code duplication. You can certainly create a full wrapper for the Irrlicht and Bullet libraries, but that will be taxing your mobile device heavily, and will certainly have a negative impact on performance. And creating a full wrapper for these two libraries would be a heck of a job.

The other problem is that, Irrlicht is an engine developed for the desktop, where keyboard and mouse are the main input devices. The Irrlicht port to Android mainly concerns with a display driver for Android, but the port has not really gone deep into this area of user interaction. Therefore, as you write your Irrlicht-based Android program, you would have to hack together user input handling model, event model, etc. In my demo, I haven鈥檛 even touched that, I have just kludged together some primitive event handling codes. In order to have our program fit in those multi-touch based devices, we would have to dig into the Irrlicht scene node animator and event handling mechanisms, and work it out from there. For example, we will have to define our own scene node animator which would be based on touch events instead of keyboard and mouse events, and add it to the scene node that we want to animate. This is something that we are going to look into in our future posts.

Render Donkey 2013-04-06 21:19 鍙戣〃璇勮
]]>
irrlicht寮曟搸錛氶暅瀛愭晥鏋?/title><link>http://www.shnenglu.com/Leaf/archive/2013/04/05/199111.html</link><dc:creator>Render Donkey</dc:creator><author>Render Donkey</author><pubDate>Thu, 04 Apr 2013 16:53:00 GMT</pubDate><guid>http://www.shnenglu.com/Leaf/archive/2013/04/05/199111.html</guid><wfw:comment>http://www.shnenglu.com/Leaf/comments/199111.html</wfw:comment><comments>http://www.shnenglu.com/Leaf/archive/2013/04/05/199111.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/Leaf/comments/commentRss/199111.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/Leaf/services/trackbacks/199111.html</trackback:ping><description><![CDATA[<p> </p> <p>鏈榪戝湪鐢╥rrlicht鍋氫竴涓?D璇曡。闂寸殑灝忛」鐩紝涓轟簡緇欓」鐩娣葷偣鑺辨牱錛屼簬鏄兂瀹炵幇涓闈㈤暅瀛愩?/p> <p>鎴戣寰桪3D榫欎功涓婃湁涓涓嬌鐢ㄦā鏉跨紦鍐插尯瀹炵幇鐨勪緥瀛愩傜綉涓婁篃鏈塐PENGL瀹炵幇鐨勪緥瀛愩?浣嗚繖涓嬈★紝鎴戞兂鐢╥rrlicht鐨凴TT瀹炵幇涓闈㈤暅瀛愭晥鏋溿?/p> <p>鍏跺疄鍘熺悊鍜屾按闈㈠弽灝勫師鐞嗘槸涓鏍風殑錛?鍙槸娌℃湁鍔犳壈鍔ㄨ屽凡</p> <p> </p> <p>絎竴姝ワ細娓叉煋鍙嶅皠璐村浘</p> <blockquote> <p>鍙嶅皠璐村浘鐨勬覆鏌擄紝鍏跺疄灝辨槸灝嗘憚鐩告満閫氳繃闀滈潰闀滃儚鍗沖彲錛宨rrlicht涓垜鎵句簡鍗婂ぉ錛屾病鏈夊彂鐜伴暅鍍忕煩闃電殑綆楁硶錛屽掓槸鍦ㄧ綉涓婃悳鍒頒簡涓涓?寰堟槸涓嶉敊銆?/p></blockquote> <p>鍚屾椂錛屼篃緲婚槄浜嗕竴涓嬪厛鍓嶅叕鍙稿紩鎿庨」鐩殑浠g爜錛屽彂鐜板叾瀹炲氨鏄偅涓叕寮忋?鏈夊叴瓚g殑鏈嬪弸鍙互鍙傜湅榪欓噷</p> <p> </p> <p><a title="http://www.cnblogs.com/glshader/archive/2010/11/02/1866971.html" >http://www.cnblogs.com/glshader/archive/2010/11/02/1866971.html</a></p> <p> </p> <p>閫氳繃榪欎釜闀滈潰鍙嶅皠鐭╅樀錛屾垜浠彲浠ュ皢鎽勭浉鏈洪暅鍍忥紝 鐩稿綋浜庢槸浠庨暅瀛愰噷鍚戝鐪嬶紝娓叉煋鍑轟竴涓笘鐣屻?鍦ㄦ覆鏌撶殑鏃跺欙紝瑕佽寰楄緗鍓潰銆?鍦ㄦ垜鐨勬祴璇曚腑鎴戞病鏈夎緗?/p> <p>絎簩姝ワ細閲嶆柊娓叉煋涓栫晫</p> <blockquote> <p>閲嶆柊娓叉煋涓栫晫鐨勬椂鍊欙紝闀滃瓙闇瑕佷竴涓壒孌婄殑綰圭悊鏉ヨ繘琛屽弽灝勮創鍥俱傦紙闀滃儚鎽勭浉鏈虹┖闂寸殑鎶曞獎綰圭悊鏄犲皠錛夈?榪欎釜璐村浘鏂瑰紡錛屽氨鏄寚蹇界暐闀滃瓙鐨勭汗鐞嗗潗鏍囷紝鑰岄氳繃</p></blockquote> <p>闀滃儚鎽勭浉鏈烘潵璁$畻鍑烘姇褰卞潗鏍囷紝鐒跺悗璐村湪闀滃瓙涓娿傚湪鎴戠殑嫻嬭瘯涓紝鏄敤SHADER鏉ュ疄鐜扮殑銆?涓洪暅瀛愬仛浜嗕竴涓壒孌婄殑綰圭悊銆?/p> <p> </p> <p>涓嬮潰錛屾垜璐翠竴涓婼HADER錛屽緢綆鍗曪紝濡傛灉瀹炲湪涓嶆竻妤氱殑錛屽彲浠ュ弬鑰冧竴浜涙姇褰辯汗鐞嗙浉鍏崇殑璧勬枡銆?/p> <p> </p> <p>欏剁偣鐫鑹插櫒浠g爜 HLSL</p> <p>float4x4    WorldViewProj;<br>float4x4    MirrorWorldViewProj;<br>struct VS_OUTPUT<br>{<br>    float4 position    :POSITION; </p> <p>    float3 uv: TEXCOORD0;<br>}; </p> <p>struct VS_INPUT<br>{<br>    float4 position        : POSITION;<br>    float4 color        : COLOR0;<br>    float2 texCoord0    : TEXCOORD0;<br>}; <p>VS_OUTPUT main(VS_INPUT input)<br>{<br>    VS_OUTPUT output; <br>    float4 pos = mul(input.position, WorldViewProj);<br>    output.position = pos;</p> <p>    //璁$畻鍙嶅皠綰圭悊鐨勫潗鏍?</p> <p>    pos = mul(input.position,MirrorWorldViewProj);<br>    output.uv.x = 0.5 * (pos.w + pos.x);<br>    output.uv.y = 0.5 * (pos.w - pos.y);<br>    output.uv.z = pos.w;<br>    return output;<br>} <p>  <p>鍍忕礌鐫鑹插櫒浠g爜 HLSL <p>sampler2D colorMap;<br>struct PS_OUTPUT<br>{<br>    float4 color : COLOR0;   <br>}; <p>struct PS_INPUT<br>{<br>    float4 position    : POSITION;<br>    float3 uv: TEXCOORD0;<br>};<br>PS_OUTPUT main( PS_INPUT input )<br>{ <br>    PS_OUTPUT output;<br>    float2 uv = saturate(input.uv.xy / input.uv.z);<br>    output.color = tex2D(colorMap,uv);<br>    return output;<br>} <p> </p> <p> </p> <p>RTT鐩稿叧鐨勬搷浣滐紝irrlicht鐨凴enderToTexture宸茬粡寰堟槑鐧戒簡錛屽啀姝や笉鍦ㄦ暦榪般?/p> <p> </p> <p>涓婂浘錛屾敹宸?/p> <p> </p> <p><a href="http://www.shnenglu.com/images/cppblog_com/Leaf/WindowsLiveWriter/irrlicht_C6B/2000_2.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="2000" border="0" alt="2000" src="http://www.shnenglu.com/images/cppblog_com/Leaf/WindowsLiveWriter/irrlicht_C6B/2000_thumb.jpg" width="539" height="405"></a></p><img src ="http://www.shnenglu.com/Leaf/aggbug/199111.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/Leaf/" target="_blank">Render Donkey</a> 2013-04-05 00:53 <a href="http://www.shnenglu.com/Leaf/archive/2013/04/05/199111.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>irrlicht寮曟搸錛氱湡瀹炵殑姘撮潰娓叉煋http://www.shnenglu.com/Leaf/archive/2013/04/04/199101.htmlRender DonkeyRender DonkeyThu, 04 Apr 2013 10:16:00 GMThttp://www.shnenglu.com/Leaf/archive/2013/04/04/199101.htmlhttp://www.shnenglu.com/Leaf/comments/199101.htmlhttp://www.shnenglu.com/Leaf/archive/2013/04/04/199101.html#Feedback0http://www.shnenglu.com/Leaf/comments/commentRss/199101.htmlhttp://www.shnenglu.com/Leaf/services/trackbacks/199101.html鍏堜笂鍥?/p>

image

 

image

鏈潵璇存槸鍋氶暅瀛愭晥鏋滅殑錛岀粨鏋滄墜宸ヨ綆楃殑闀滈潰鍙嶅皠鐭╅樀搴旂敤鍦╥rrlicht鐩告満涓婄殑鏃跺欙紝濮嬬粓鏃犳硶鍑虹幇鏁堟灉錛屽彧鑳藉幓緗戜笂鎼滅儲

鍦╥rrlicht official wiki涓婂彂鐜頒簡榪欎釜鎵╁睍鐨刉aterNode錛屼笅杞戒笅鏉ワ紝鏀逛簡鐐笲UG錛屾暣鍚堣繘浜員errain Demo閲岋紝 灝辨槸涓婂浘鐨勬晥鏋溿?/p>

鍦ㄦ垜鐨勬満鍣ㄤ笂,HLSL鐗堟湰鏄病鏈夐棶棰樼殑錛孏L鐗堟湰璨屼技RTT鏈夌偣闂銆?/p>

 

鐐瑰嚮姝ゅ涓嬭澆婧愪唬鐮?/a>



Render Donkey 2013-04-04 18:16 鍙戣〃璇勮
]]>
irrlicht寮曟搸錛氱‖浠惰挋鐨楠煎姩鐢?/title><link>http://www.shnenglu.com/Leaf/archive/2013/03/26/198823.html</link><dc:creator>Render Donkey</dc:creator><author>Render Donkey</author><pubDate>Mon, 25 Mar 2013 16:08:00 GMT</pubDate><guid>http://www.shnenglu.com/Leaf/archive/2013/03/26/198823.html</guid><wfw:comment>http://www.shnenglu.com/Leaf/comments/198823.html</wfw:comment><comments>http://www.shnenglu.com/Leaf/archive/2013/03/26/198823.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/Leaf/comments/commentRss/198823.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/Leaf/services/trackbacks/198823.html</trackback:ping><description><![CDATA[<p>榪欎釜涓滆タ寰堥『鍒╋紝浠呯敤浜嗗崐灝忔椂灝辨壘鍒頒簡鏂規硶錛屾渶搴旇鎰熻阿鐨勮繕鏄疭uper TuxKart(綆縐癝TK錛屼笅闈㈠氨閮界敤榪欎笁瀛楁瘝浜?. 濡傛灉涓嶆槑鐧絊TK錛屽悓鏃跺張瀵瑰畠鎰熷叴瓚g殑绔ラ瀷錛屽彲浠ヨ闂繖閲?/p> <p><a title="http://supertuxkart.sourceforge.net/" >http://supertuxkart.sourceforge.net/</a></p> <p>鐢變簬澧欑殑鍘熷洜錛岄渶瑕佸悇浣嶆惌姊瓙銆?/p> <p> </p> <p>涓婂懆鏈紝鍦ㄥ紕鎹㈣鐨勬椂鍊欙紝鍙戠幇irrlicht寮曟搸鏈韓鏄笉鏀寔紜歡钂欑毊鐨勶紝澶氬皯浠や漢鏈変簺澶辨湜銆?蹇冮噷灝變竴鐩村鎬濈潃鎬庝箞鎵╁睍涓涓嬶紝灝嗗畠寮勫嚭鏉ャ?/p> <p>鍊煎緱璇存槑鐨勬槸STK瀵筰rrlicht寮曟搸鐨勭敤娉曟槸寰堢畝鍗曠殑錛屽熀鏈笂鍙互璇存槸瑁哥敤錛屽茍鏈湪irrlicht鎺ュ彛涓婂仛淇敼銆?鑰屾槸瀵瑰榪涜浜嗕竴浜涘繀瑕佺殑鎵╁睍銆?/p> <p>褰撶劧錛孲TK涔熷澶栧紑鏀句簡涓涓猧rrlicht.dll錛岃鏄慨鏀逛簡鍏朵腑鐨凚UG銆?浣嗙洿鎺ヤ嬌鐢╥rrlicht鏄彲浠ョ殑銆?/p> <p> </p> <p>搴熻瘽涓嶅璇達紝鏉ヨ璇村浣曚笉淇敼irrlicht涓琛屼唬鐮侊紝閫氳繃澶栭儴鎵╁睍鏉ュ疄鐜扮‖浠墮楠煎姩鐢誨惂</p> <p> </p> <p>棣栧厛錛岃兘澶熶嬌鎴戜滑涓嶄慨鏀筰rrlicht浠g爜鐨勫師鍥狅紝鏄洜涓篒SkinnedMesh鎻愪緵浜嗕竴涓猻etHardwareSkinning鎺ュ彛錛岄粯璁や負false.</p> <p>铏界劧榪欎釜鎺ュ彛鐨勮鏄庢槸"(This feature is not implemented in irrlicht yet)”錛屼絾騫朵笉浠h〃錛岃緗笌涓嶈緗棤宸埆銆?</p> <p>鏌ョ湅浠g爜鍙互鍙戠幇錛屽綋浣犺緗簡榪欎釜涓簍rue浠ュ悗錛宨rrlicht灝卞畬鍏ㄤ笉綆′綘鐨勫姩鐢諱簡銆?鎰忔濆氨鏄紝瑕佹槸浣犻潪瑕佽鎴戝共鎴戜笉騫蹭笉浜嗙殑浜嬶紝閭e氨鍙湁鎮ㄥ彟璇烽珮鏄庝簡銆?/p> <p>irrlicht榪濩PU璁$畻閮戒笉浼氬弬涓庛?榪欐濂借鎴戜滑鏈夋満鍙箻錛屽畬鍏ㄧ敤GPU鎺ョ銆?/p> <p> </p> <p>鑰岃璁╀竴涓《鐐瑰弬涓庨楠艱綆楋紝閭i楠肩儲寮曞垯鏄皯涓嶄簡鐨勩傛墍浠ワ紝鎴戜滑闇瑕佹兂鍔炴硶璁╅《鐐規暟鎹兘澶熷皢楠ㄩ绱㈠紩浠e叆SHADER涓?/p> <p>鍦⊿TK涓敤浜嗕竴縐嶅閥濡欑殑鏂規硶錛?灝辨槸浣跨敤浜嗛《鐐圭殑棰滆壊鏁版嵁錛?铏界劧榪欐牱涓鏉ワ紝欏剁偣棰滆壊灝辯敤涓嶄簡浜嗐?浣嗗湪妯″瀷娓叉煋鏃訛紝欏剁偣棰滆壊寰堝皯琚嬌鐢ㄥ埌鐨勩?涔熷氨鏄錛岄《鐐歸鑹插湪STK鐨勫姩鐢繪ā鍨嬩腑錛岃鐢ㄤ綔浜嗛楠肩儲寮曘?/p> <p>鍒濆鍖栭楠肩儲寮曠殑鏂規硶寰堢畝鍗曪紝鐢ㄤ笅闈㈢殑浠g爜閬嶅巻鍗沖彲銆?/p> <p>璁撅細鎴戜滑鏈変竴涓楠煎姩鐢繪ā鍨嬫槸 ISkinnedMesh* pSkinnedMesh = …</p> <p>閭d箞錛氬垵濮嬪寲浠g爜濡備笅</p> <p>for(u32 i = 0;i < pSkinnedMesh ->getMeshBuffers().size();++i)<br>{<br>    for(u32 g = 0;g < pSkinnedMesh ->getMeshBuffers()[i]->getVertexCount();++g)<br>    {<br>        pSkinnedMesh ->getMeshBuffers()[i]->getVertex(g)->Color = video::SColor(0,0,0,0);<br>    }<br>}</p> <p>//鍒濆鍖栧畬姣曚互鍚庯紝灝辨槸闇瑕佺湡姝g殑绱㈠紩璧嬪間簡錛岄氳繃浠ヤ笅浠g爜鍙互瀹屾垚</p> <p>const core::array<scene::ISkinnedMesh::SJoint*>& joints = pSkinnedMesh ->getAllJoints();<br>for(u32 i = 0;i < joints.size();++i)<br>{<br>    const core::array<scene::ISkinnedMesh::SWeight>&    weights = joints[i]->Weights;<br>    for(u32 j = 0;j < weights.size();++j)<br>    {<br>        int buffId = weights[j].buffer_id; <p>        int vertexId = pSkinedMesh->getAllJoints()[i]->Weights[j].vertex_id;<br>        video::SColor* vColor = &pSkinedMesh->getMeshBuffers()[buffId]->getVertex(vertexId)->Color; <p>        if(vColor->getRed() == 0)<br>            vColor->setRed(i + 1);<br>        else if(vColor->getGreen() == 0)<br>            vColor->setGreen(i + 1);<br>        else if(vColor->getBlue() == 0)<br>            vColor->setBlue(i + 1);<br>        else if(vColor->getAlpha() == 0)<br>            vColor->setAlpha(i + 1);<br>    }<br>} <p> </p> <p>//緇忚繃浠ヤ笂涓や釜姝ラ錛岄《鐐規暟鎹敼閫犲畬鎴愩?鍊煎緱娉ㄦ剰鐨勬槸錛?鍦ㄨ繖閲岋紝 绱㈠紩 0 鏄璁や負鏄棤鏁堢殑</p> <p> </p> <p>鐒跺悗錛屾垜浠潵鍒涘緩涓涓猄HADER浣滀負娓叉煋銆?/p> <p>鍋囪 鎴戜滑灝嗚繖涓猵SkinnedMesh緇戝畾浜嗗埌浜嗕竴涓狪AnimatedSceneNode* node 涓娿?/p> <p>閭o紝鎴戜滑涓鴻繖涓粨鐐瑰垱寤轟竴涓潗璐?鍦ㄥ垱寤烘潗璐ㄥ墠錛屾垜浠渶瑕佸噯澶囦竴涓猄HADER鍥炶皟銆?SHADER鍥炶皟灝卞儚涓嬮潰涓鏍峰氨鍙互浜嗐?/p> <p>class HWSkinCallBack:public video::IShaderConstantSetCallBack<br>{<br>    scene::IAnimatedMeshSceneNode* m_pNode;<br>public:<br>    HWSkinCallBack(scene::IAnimatedMeshSceneNode* node):m_pNode(node)<br>    { <p>    }<br>    virtual void OnSetConstants(video::IMaterialRendererServices* services,<br>        s32 userData)<br>    {<br>        scene::ISkinnedMesh* mesh = (scene::ISkinnedMesh*)m_pNode->getMesh();<br>        f32 joints_data[55 * 16];<br>        int copyIncrement = 0; <p>        const core::array<scene::ISkinnedMesh::SJoint*> joints = mesh->getAllJoints();<br>        for(u32 i = 0;i < joints.size();++i)<br>        {<br>            core::matrix4 joint_vertex_pull(core::matrix4::EM4CONST_NOTHING);<br>            joint_vertex_pull.setbyproduct(joints[i]->GlobalAnimatedMatrix, joints[i]->GlobalInversedMatrix); <p>            f32* pointer = joints_data + copyIncrement;<br>            for(int i = 0;i < 16;++i)<br>                *pointer++ = joint_vertex_pull[i]; <p>            copyIncrement += 16;<br>        } <p>        services->setVertexShaderConstant("JointTransform", joints_data, mesh->getAllJoints().size() * 16);<br>    }<br>}; <p> </p> <p>濂戒簡錛岀幇鍦ㄦ垜浠潵鍒涘緩涓涓潗璐?/p> <p>s32 hwskm = gpu->addHighLevelShaderMaterialFromFiles(<br>        "../../skinning.vert","main",video::EVST_VS_2_0,<br>        "","main",video::EPST_PS_2_0,&hwc,video::EMT_SOLID);</p> <p>//鐢ㄦ柊鍒涘緩鍑烘潵鐨勬潗璐ㄨ祴鍊肩粰榪欎釜緇撶偣</p> <p>node->setMaterialType((video::E_MATERIAL_TYPE)hwskm );</p> <p> </p> <p>//鍒版錛岃緗畬姣曘?/p> <p> //鏈鍚庯紝灝辨槸skinning.vert鏈韓鐨勫唴瀹逛簡銆?璐村嚭鏉ュ嵆鍙紝娌℃湁澶鎶宸э紝灝辨槸涓涓櫘閫氱殑钂欑毊銆?/p> <p>// skinning.vert <p>#define MAX_JOINT_NUM 36<br>#define MAX_LIGHT_NUM 8 <p>uniform mat4 JointTransform[MAX_JOINT_NUM]; <p>void main() <br>{<br>    int index;<br>    vec4 ecPos;<br>    vec3 normal;<br>    vec3 light_dir;<br>    float n_dot_l;<br>    float dist; <p>    mat4 ModelTransform = gl_ModelViewProjectionMatrix;<br>    index = int(gl_Color.r * 255.99);<br>    mat4 vertTran = JointTransform[index - 1];<br>    index = int(gl_Color.g * 255.99);<br>    if(index > 0)<br>        vertTran += JointTransform[index - 1]; <p>    index = int(gl_Color.b * 255.99);<br>    if(index > 0)<br>        vertTran += JointTransform[index - 1];<br>    index = int(gl_Color.a * 255.99);<br>    if(index > 0)<br>        vertTran += JointTransform[index - 1];<br>    ecPos = gl_ModelViewMatrix * vertTran * gl_Vertex;<br>    normal = normalize(gl_NormalMatrix * mat3(vertTran) * gl_Normal);<br>    gl_FrontColor = vec4(0,0,0,0);<br>    for(int i = 0;i < MAX_LIGHT_NUM;i++)<br>    {<br>        light_dir = vec3(gl_LightSource[i].position-ecPos);<br>        n_dot_l = max(dot(normal, normalize(light_dir)), 0.0);<br>        dist = length(light_dir);<br>        n_dot_l *= 1.0 / (gl_LightSource[0].constantAttenuation + gl_LightSource[0].linearAttenuation * dist);<br>        gl_FrontColor += gl_LightSource[i].diffuse * n_dot_l;<br>    }<br>    gl_FrontColor = clamp(gl_FrontColor,0.3,1.0); <p>    ModelTransform *= vertTran;<br>    gl_Position = ModelTransform * gl_Vertex;<br>    gl_TexCoord[0] = gl_MultiTexCoord0;<br>    gl_TexCoord[1] = gl_MultiTexCoord1;<br>    /* <br>    // Reflections.<br>    vec3 r = reflect( ecPos.xyz , normal );<br>    float m = 2.0 * sqrt( r.x*r.x + r.y*r.y + (r.z+1.0)*(r.z+1.0) );<br>    gl_TexCoord[1].s = r.x/m + 0.5;<br>    gl_TexCoord[1].t = r.y/m + 0.5;<br>    */<br>} <p> </p> <p> </p> <p>//娉細榪欐槸GLSL 2.0錛?鍦ㄧ敤IRR鍋氭祴璇曠殑鏃跺欙紝瑕侀塆L椹卞姩鏂瑰紡銆?/p> <p> </p> <p>榪樻槸涓婁釜鍥懼惂錛屼笉涓婂浘鎰熻娌℃湁鐪熷儚銆?铏界劧鍥劇湅涓嶅嚭鏉ヤ粈涔堝姩浣?/p> <p><a href="http://www.shnenglu.com/images/cppblog_com/Leaf/WindowsLiveWriter/irrlicht_14DD5/image_2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.shnenglu.com/images/cppblog_com/Leaf/WindowsLiveWriter/irrlicht_14DD5/image_thumb.png" width="526" height="410"></a> </p> <p>涓轟簡璇存槑瀹冪湡鐨勫湪鍔紝涓嶅緱涓嶄笂絎簩寮犮?</p> <p> </p> <p><a href="http://www.shnenglu.com/images/cppblog_com/Leaf/WindowsLiveWriter/irrlicht_14DD5/image_4.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.shnenglu.com/images/cppblog_com/Leaf/WindowsLiveWriter/irrlicht_14DD5/image_thumb_1.png" width="523" height="417"></a> </p> <p> </p> <p>鍦ㄦ錛屽崄鍒嗘劅璋uper Tux Kart. 鎻愪緵浜嗕竴涓涔犲拰鎵╁睍irrlicht鐨勬鏍?</p> <img src ="http://www.shnenglu.com/Leaf/aggbug/198823.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/Leaf/" target="_blank">Render Donkey</a> 2013-03-26 00:08 <a href="http://www.shnenglu.com/Leaf/archive/2013/03/26/198823.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>irrlicht寮曟搸錛氬疄鐜板ぉ榫欏叓閮ㄧ殑RPG瑙掕壊鎹㈣http://www.shnenglu.com/Leaf/archive/2013/03/24/198762.htmlRender DonkeyRender DonkeySat, 23 Mar 2013 20:08:00 GMThttp://www.shnenglu.com/Leaf/archive/2013/03/24/198762.htmlhttp://www.shnenglu.com/Leaf/comments/198762.htmlhttp://www.shnenglu.com/Leaf/archive/2013/03/24/198762.html#Feedback0http://www.shnenglu.com/Leaf/comments/commentRss/198762.htmlhttp://www.shnenglu.com/Leaf/services/trackbacks/198762.html鐪嬩簡鐪嬫椂闂達紝宸茬粡3鐐硅繃浜嗭紝紿佺劧鎯沖啓鐐逛粈涔堬紝鍗村張涓嶇煡浠庝綍璇磋搗銆?/p>

閭e氨浠庝粖澶╄繖涓敤irrlicht鍋氬ぉ榫欏叓閮ㄧ殑妯″瀷鎹㈣璇磋搗鍚с?/p>

 

涔熶笉鐭ラ亾鏄負浠涔堬紝鏈榪戝張鎹i紦璧蜂簡OGRE鍜宨rrlicht. 騫朵笖錛屾繪兂鐢╥rrlicht瀹炵幇涓浜汷GRE涓殑涓滆タ銆?/p>

褰撶劧錛岃繖涓嶆槸鍟嗕笟欏圭洰錛屼篃娌℃湁鍟嗕笟鐩殑錛岀函灞炶泲鐤艱屽凡銆?/p>

 

涓鍒囪鍔ㄧ殑鐢辨潵錛岄兘鏉ヨ嚜浜巚czh閭eぉ鏅氫笂鐨勪婦鍔ㄣ?/p>

璁板緱鏈変竴澶╂櫄涓婂湪緹ら噷鑱婂ぉ錛屽ぇ浼欏氨縐拌禐鍚勪綅鑿婅嫞鏄涔堢殑鍘夊銆?/p>

鏈鍚巚c鍙戜簡涓涓嚜宸辯殑妗岄潰鎴浘璇達細璁╀綘浠湅鐪嬭強鑻f槸濡備綍緇冩垚鐨勶紙榪欎笉鏄師璇濓紝鍜岃瘽鐨勫瓧鐪兼湁鍑哄叆錛屽湪姝や笉鎯寵礋浠諱綍璐d換錛屽鏋滅湡鏈夋兂鐪嬬殑錛屽幓緲葷兢鐨勮亰澶╄褰曪級

閭eぉ鏅氫笂錛屾垜鎯充簡寰堜箙銆傛兂鎯寵嚜宸辮嚜浠庤漿鍋氶〉娓鎬互鍚庯紝鏄浣曡櫄娓″厜闃寸殑銆?/p>

緇堜簬蹇嶄笉浣忎簡錛岀炕寮浜嗚嚜宸辯殑縐誨姩紜洏錛岀湅鐪嬭嚜宸辨浘緇忓仛榪囩殑灝忎笢瑗褲?0%鏄緩濂藉伐紼嬪氨娌$悊浜嗐?/p>

榪欐墠鏄庣櫧錛屾垜鑺卞湪鎬濊冧笂鐨勬椂闂磋繙榪滃ぇ浜庝簡琛屽姩銆?浜庢槸錛屾垜鍐沖畾鏀瑰彉鑷繁錛屾壘鍥為偅涓湡鐨勬垜銆?/p>

 

3D娓告垙鏄垜鐨勭湡鐖憋紝 鐪熺埍鍒板氨綆楃敾闈㈠樊涓鐐癸紝鍙鏄?D錛屾垜涔熶細寰堝枩嬈€?/p>

浜庢槸錛屾垜瑙夊緱鑷繁榪樻槸搴旇鎺ョ潃鍏堝墠鐨勮礬璧頒笅鍘匯?浠涔堟湇鍔″櫒錛屼粈涔?AS3. 閮芥槸嫻簯錛?涓嶅枩嬈㈠氨鏄笉鍠滄銆?/p>

縐佷笅鍙堝紑濮嬬爺絀秈rrlicht浜嗐?/p>

鐚涘湴涓鍙戠幇錛岃嚜宸辨槸澶氫箞鐨勬悶絎戯紝 浠?9騫村埌11騫達紝涓鐩村湪鍋氬紩鎿庡紑鍙戯紝 涔熺炕榪噄rrlicht鍜宱gre鏃犳暟閬嶃?鍗翠粠鏉ュ氨娌℃湁鍐欏畬榪囦竴涓畬鏁寸殑DEMO銆?/p>

榪炲姛鑳芥祴璇曠敤渚嬮兘娌℃湁鍐欒繃銆傜獊鐒惰寰椾箣鍓嶇殑涓浜涜璁′技涔庢湁浜涜劚紱諱簡瀹為檯銆傛病鏈夌湡姝d嬌鐢ㄨ繃錛屽張鎬庣煡濡備綍鏄ソ錛屽浣曟槸鍧忓憿錛?/p>

 

榪欎竴嬈℃槸鐪熺殑鐜﹊rrlicht浜嗭紝 涓棿涔熺籂緇撹繃鏄笉鏄疧GRE鏇撮傚悎銆?浣嗗湪鐩墠榪欎釜鏃墮棿鏈夐檺鐨勭┖闂翠笅錛屾垜鏇存効鎰忕帺irrlicht.灝忓閥錛岃交渚褲?褰撶劧錛屾剰鍛崇潃鏇村涓滆タ瑕佽嚜宸卞疄鐜般?涓嶈繃瀵逛簬涓涓唬鐮佹帶鏉ヨ錛屼篃鍙嶈屾洿鑷緱鍏朵箰銆?姝eソ鍙互鍦ㄧ煭璺殑鏃跺欙紝鍘誨弬鑰冧竴涓嬪叾瀹冨紩鎿庯紝鐢ㄦ潵鎵╁厖irrlicht.

鎴戣鍋氱殑涓嶆槸鎶奿rrlicht鏁村緱鐗汢錛岃屾槸鎯寵嚜宸卞紕寮勶紝鍔犱笂縐誨姩騫沖彴鐨勫礇璧鳳紝鎴戣寰梚rrlicht鏇村姞閫傚悎鍚с?鎹gameloft涔熸湁浣跨敤錛堜粎鏄嵁璇達級銆?/p>

 

鍙兘寰堝鍏勫紵浼氳鎴戣繖璁茬殑涓滆タ錛屽叾瀹炲氨鏄竴鍧ㄥ睅浜嗐?涓嶈繃錛屾垜瑙夊緱鍐嶅潖鐨勮瘎璁猴紝涔熻〃紺轟竴縐嶅叧娉ㄣ?鎵硅瘎濂借繃浜庢棤瑙嗗晩~~~~

----------------------------------------------------------涓嬮潰璇磋鎴戦亣涓婄殑綰犵粨------------------------------------------------

綰犵粨1:鎹㈣闇瑕佸満鏅妭鐐歸厤鍚?/strong>

  鍦╥rrlicht涓紝騫舵病鏈夋彁渚涙櫘閫氬紩鎿庝腑鐨剆ubmesh鎴栬卋odypart榪欑涓滆タ錛岀敤浜庣洿鎺ユ敮鎸佹崲瑁呫?鍦╥rrlicht涓紝濡傛灉鎯寵鎹㈣錛屾渶鐩存帴鐨勬柟娉曞氨鏄緷璧栦簬鍦烘櫙緇撶偣

姣斿,鍦ㄦ垜鐨勭ず渚嬩腑錛屽彲浠ユ洿鎹㈠ご鍙戯紝甯藉瓙錛岃。鏈嶏紝鎶よ厱錛岄澊瀛愶紝闈㈠銆?閭e氨闇瑕?涓満鏅妭鐐癸紝1涓綔涓烘牴鑺傜偣錛岀敤浜庢帶鍒舵暣涓鑹茬殑涓栫晫鍧愭爣錛屽鉤縐伙紝緙╂斁錛屾棆杞瓑灞炴с傚彟澶?涓満鏅妭鐐瑰垯鍒嗗埆緇戞湁鍚勪釜閮ㄤ歡鐨勬ā鍨?/p>

璐翠竴涓嬫垜鐨勮鑹茬被鐨勪唬鐮侊紝琛屾暟涓嶅

class CCharactor
{
    IrrlichtDevice* m_pDevice;
    IAnimatedMeshSceneNode* m_pBodyParts[eCBPT_Num];
    ISceneNode* m_pRoot;
public:
    CCharactor(IrrlichtDevice* pDevice)
        :m_pDevice(pDevice)
    {
        memset(m_pBodyParts,0,sizeof(m_pBodyParts));
        m_pRoot = pDevice->getSceneManager()->addEmptySceneNode(NULL,12345);
    }
    void changeBodyPart(ECharactorBodyPartType ePartType,stringw& meshPath,stringw& metrialPath)
    {
        ISceneManager* smgr = m_pDevice->getSceneManager();

        IAnimatedMeshSceneNode* pBpNode = m_pBodyParts[ePartType];
        IAnimatedMesh* pMesh = smgr->getMesh(meshPath.c_str());
        if(pMesh==NULL)
            return;

        if(pBpNode==NULL)
        {
            pBpNode = smgr->addAnimatedMeshSceneNode(pMesh,m_pRoot);
            m_pBodyParts[ePartType] = pBpNode;
        }
        else
        {
            pBpNode->setMesh(pMesh);
        }
        ITexture* pTexture = m_pDevice->getVideoDriver()->getTexture(metrialPath.c_str());
        if(pTexture)
            pBpNode->setMaterialTexture(0,pTexture);
    }
};

 

//鐒跺悗錛屾垜鐢ㄤ簡涓涓粨鏋勪綋鏉ユ瀯寤洪儴浠朵俊鎭?/p>

struct SBodyPartInfo
{
    stringw Desc;
    ECharactorBodyPartType Type;
    stringw MeshPath;
    stringw MeterialPath;
};

 

綰犵粨2錛氬叡浜楠?/strong>

棣栧厛錛宨rrlicht 1.8涓OGRE妯″瀷鐨勬牸寮忔敮鎸佸湪浠g爜涓紝鏈楂樺彧鐪嬪埌浜?.40鐗堟湰鐨勮В鏋愶紝鏇撮珮鐨勫氨浼氳鏃犺銆?澶╅緳鍏儴鐨勬ā鍨嬫湁鍑犱釜鏄?.30鐨勶紝鑰岀敤浜庢崲瑁呭拰涓昏鐨勶紝閮芥槸1.40鐨勩?鍙兘鏄В鏋愪笉鍏ㄧ殑鍘熷洜錛屽鑷?.40鐨勯楠煎姩鐢繪棤娉曟甯告挱鏀俱?榪欎釜闂鏁翠簡鍑犱釜灝忔椂錛屾病鏈夎В鍐籌紝鏄庡ぉ緇х畫

鍏舵錛屽涓ā鍨嬪叡浜楠煎彧鑳介氳繃鍦烘櫙鑺傜偣鐨剈seAnimationFrom鏉ュ畬鎴愶紝騫朵笖浼犲叆鐨勬槸涓涓狹esh鍙傛暟銆傝繖鐐硅浜鴻泲鐤鹼紝 澶╅緳鍏儴鐨勮鑹插姩浣滄槸鍒嗗紑浜嗙殑錛屼笉鍚岀殑鏀誨嚮鍔ㄤ綔鏄竴涓猻keleton鏂囦歡銆?鎯寵瀹炵幇鍏變韓錛屾湁鐐歸夯鐑︺?/p>

 

綰犵粨3錛氭ā鍨嬫枃浠舵牸寮?/strong>

irrlicht涓嶅儚OGRE閭f牱鏈変竴涓己澶т笖鎴愮啛鐨勬ā鍨嬫枃浠舵牸寮?铏界劧鎻愪緵浜?irr鏍煎紡錛屼絾浠呮槸鐢ㄤ簬irrEdit鐨勫満鏅俊鎭緭鍑恒傚厛鐪嬩竴寮犲浘

image

榪欏紶鍥炬槸irrlicht samples涓殑MeshViewer鐨勬彁紺烘鍐呭銆?涓婇潰鍒楀嚭浜嗗彲浠ユ敮鎸佺殑妯″瀷鏂囦歡綾誨瀷銆?澶у鍙互鐪嬬湅錛屽張鏈夊灝戞ā鍨嬫牸寮忔槸鍙互鐩存帴鎷挎潵鏀懼埌欏圭洰涓婄敤鐨勫憿錛?mdl鍜宮s3d鍙互鑰冭檻錛宒ae鐨勮瘽錛屾垜鍦ㄥ紑婧愭父鎴? A.D. 涓鍒頒嬌鐢ㄨ繃銆?鍏跺畠鐨勮瘽錛屽氨瀹屽叏涓嶇啛鎮変簡銆?OGRE鐨?.mesh鏀寔涔熶笉瀹屽叏銆?闅鵑亾鐪熻鑷繁鏁翠竴涓?

鎴戣兘鎯沖埌鐨勶紝灝辨槸閫変竴涓彃浠跺畬鏁村拰妯″瀷鍜屽姩鐢繪牸寮忛兘姣旇緝濂界殑浣滀負涓庣編鏈伐鍏蜂氦浜掔殑鏍煎紡銆?鑷繁鍐嶅啓涓涓伐鍏鳳紝杞崲鎴愯嚜宸辯殑鏍煎紡銆?/p>

 

綰犵粨4錛氱‖浠惰挋鐨?/strong>

鎴戜互涓哄儚NIKO閭f牱鐨勬妧鏈媯錛屾庝箞浼氭斁鎺夎繖涓涓壒鎬с?寰堥珮鍏村湴鍦ㄥ満鏅妭鐐逛笂鍙戠幇浜嗙‖浠惰挋鐨殑鍑芥暟鎺ュ彛銆備絾涓鐪嬫敞閲婏紝鎶婃垜鍜界潃浜嗐?/p>

//! (This feature is not implemented in irrlicht yet)
virtual bool setHardwareSkinning(bool on);

 

鍏跺畠鍦版柟錛岃繕娌℃湁鍘繪暣錛屽氨鍏堜笉鍙戣〃璦璁轟簡銆?緇х畫鐫榪欎釜寰堝偦B,寰堝ぉ鐪熺殑鎹i紦涔嬭礬銆?

涓婁釜鍥撅紝綰康涓涓嬫垜鐨刬rrlicht浜х墿銆?/p>

 

甯冭。

image

 

鎹簡韜洈鐢?/p>

image

 

鎹簡甯藉瓙鍜岄澊瀛?/p>

image

 

PS:澶村彂娌℃湁綰圭悊錛屾墍浠ユ槸鐧界殑銆?/p>

]]>
[鍘焆irrlicht v1.6 涓枃渚嬬▼18 Splitscreenhttp://www.shnenglu.com/Leaf/archive/2010/04/26/113563.htmlRender DonkeyRender DonkeyMon, 26 Apr 2010 01:50:00 GMThttp://www.shnenglu.com/Leaf/archive/2010/04/26/113563.htmlhttp://www.shnenglu.com/Leaf/comments/113563.htmlhttp://www.shnenglu.com/Leaf/archive/2010/04/26/113563.html#Feedback0http://www.shnenglu.com/Leaf/comments/commentRss/113563.htmlhttp://www.shnenglu.com/Leaf/services/trackbacks/113563.html鎴戜滑灝嗗垱寤轟竴涓鍒嗕負4涓儴鍒嗙殑瑙嗗彛錛屾湁3涓浐瀹氭憚鐩告満鍜屼竴涓敤鎴峰彲浠ユ帶鍒剁殑鎽勭浉鏈哄ソ錛岃浠粠澶存枃浠跺紑濮嬪惂錛堟垜鎯蟲病鏈夊啀澶氳鐨勫繀瑕佷簡錛?nbsp; 闃呰鍏ㄦ枃

]]>
[鍘焆Irrlicht(楝肩伀寮曟搸錛変腑澶氳澶囩殑鏀寔http://www.shnenglu.com/Leaf/archive/2010/04/26/113558.htmlRender DonkeyRender DonkeyMon, 26 Apr 2010 01:10:00 GMThttp://www.shnenglu.com/Leaf/archive/2010/04/26/113558.htmlhttp://www.shnenglu.com/Leaf/comments/113558.htmlhttp://www.shnenglu.com/Leaf/archive/2010/04/26/113558.html#Feedback0http://www.shnenglu.com/Leaf/comments/commentRss/113558.htmlhttp://www.shnenglu.com/Leaf/services/trackbacks/113558.html闃呰鍏ㄦ枃

]]>
久久最新精品国产| 久久人人爽人人爽人人片AV东京热| 久久综合亚洲色HEZYO社区| 一本色道久久99一综合| 99久久精品费精品国产一区二区 | 中文无码久久精品| 99久久成人国产精品免费| 欧美久久久久久午夜精品| 亚洲中文久久精品无码ww16| 久久91综合国产91久久精品 | 久久综合九色综合网站| 99久久中文字幕| 精品伊人久久大线蕉色首页| 国产精品女同久久久久电影院| 久久久久久国产精品无码下载| 久久国产亚洲精品无码| 亚洲国产成人精品91久久久| 久久精品国产精品国产精品污| 国产aⅴ激情无码久久| 国产亚洲精久久久久久无码AV| 久久精品国产亚洲AV无码麻豆 | avtt天堂网久久精品| 模特私拍国产精品久久| 国产成人精品久久亚洲| 99久久婷婷国产综合亚洲| 久久精品国产亚洲AV蜜臀色欲| 久久乐国产精品亚洲综合| 久久久国产精品福利免费| 久久精品亚洲一区二区三区浴池| 国产成人精品综合久久久| 少妇久久久久久被弄到高潮| 国产精品久久久久一区二区三区 | 18岁日韩内射颜射午夜久久成人| 久久精品综合一区二区三区| 久久久精品一区二区三区| 好久久免费视频高清| 久久成人精品视频| 99久久亚洲综合精品成人| 91精品国产91久久久久久| 国产精品美女久久久久av爽| 久久99精品国产99久久6|