{"id":4484,"date":"2018-08-31T08:36:08","date_gmt":"2018-08-31T00:36:08","guid":{"rendered":"http:\/\/www.bookcard.net\/wordpress\/?p=4484"},"modified":"2018-10-14T21:27:26","modified_gmt":"2018-10-14T13:27:26","slug":"android_game_light","status":"publish","type":"post","link":"https:\/\/www.bookcard.net\/wordpress\/android_game_light\/","title":{"rendered":"Android\u904a\u6232\u4e4b\u5149\u7167"},"content":{"rendered":"<figure id=\"attachment_4485\" aria-describedby=\"caption-attachment-4485\" style=\"width: 1200px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2018\/08\/Android_Game_Light.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-4485\" src=\"https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2018\/08\/Android_Game_Light.jpg\" alt=\"\" width=\"1200\" height=\"800\" srcset=\"https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2018\/08\/Android_Game_Light.jpg 1200w, https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2018\/08\/Android_Game_Light-300x200.jpg 300w, https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2018\/08\/Android_Game_Light-768x512.jpg 768w, https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2018\/08\/Android_Game_Light-1024x683.jpg 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><figcaption id=\"caption-attachment-4485\" class=\"wp-caption-text\">Android\u904a\u6232\u4e4b\u5149\u7167<\/figcaption><\/figure>\n<p>\u5149\u7167\u7cfb\u7d71\u5b83\u53ef\u4ee5\u4ee43D\u904a\u6232\u66f4\u52a0\u903c\u771f.\u8981\u6a21\u64ec\u5149\u7167\u9700\u8981\u5149\u6e90\u767c\u5c04\u5149\u7dda.\u548c\u88ab\u5149\u7167\u7167\u5c04\u7269.\u6700\u5f8c\u9700\u8981\u4e00\u53f0\u76f8\u6a5f\u6355\u8db3\u5149\u6e90\u767c\u5c04\u5149\u4ee5\u53ca\u88ab\u7269\u9ad4\u53cd\u5c04\u5149.\u5149\u7167\u6703\u6539\u8b8a\u89c0\u5bdf\u8005\u5c0d\u88ab\u89c0\u5bdf\u8005\u7269\u9ad4\u984f\u8272\u611f\u53d7.\u53d6\u537b\u65bc\u4ee5\u4e0b\u5e7e\u500b\u56e0\u7d20<\/p>\n<ol>\n<li>\u5149\u6e90\u985e\u578b<\/li>\n<li>\u5149\u6e90\u984f\u8272\u548c\u5f37\u5ea6<\/li>\n<li>\u5149\u6e90\u76f8\u5c0d\u65bc\u88ab\u7167\u5c04\u7269\u9ad4\u4f4d\u7f6e\u548c\u65b9\u5411<\/li>\n<li>\u88ab\u7167\u5c04\u7269\u6750\u8cea\u548c\u7d0b\u7406<\/li>\n<\/ol>\n<p>\u88ab\u7167\u5c04\u7269\u9ad4\u53cd\u5c04\u5149\u5f37\u5ea6\u53d6\u6c7a\u65bc\u5149\u7167\u5c04\u5230\u81f3\u7269\u9ad4\u5e73\u9762\u6642\u5149\u8207\u7269\u9ad4\u5e73\u9762\u593e\u89d2.\u5149\u8207\u5176\u6240\u7167\u5c04\u5e73\u9762\u8d8a\u63a5\u8fd1\u5782\u76f4,\u7269\u9ad4\u8868\u9762\u53cd\u5c04\u5149\u5f37\u5ea6\u8d8a\u5927<\/p>\n<p>\u4e00\u65e6\u5149\u7167\u5c04\u5230\u5e73\u9762\u5b83\u6703\u4ee5\u5169\u7a2e\u65b9\u5f0f\u53cd\u5c04.\u93e1\u9762\u53cd\u5c04\u6703\u7269\u9ad4\u4e0a\u8868\u73fe\u51fa\u5f37\u5149\u6548\u679c.\u7269\u9ad4\u93e1\u9762\u53cd\u5c04\u6548\u679c\u53d6\u6c7a\u65bc\u6750\u8cea.<\/p>\n<p>\u6f2b\u53cd\u5c04:\u5927\u90e8\u5206\u53cd\u5c04\u5149\u7dda\u6703\u56e0\u70ba\u7269\u9ad4\u4e0d\u898f\u5247\u8868\u9762\u800c\u96a8\u6a5f\u5730\u767c\u6563\u958b\u4f86,\u5177\u6709\u5149\u6ed1\u8868\u9762<\/p>\n<p>\u93e1\u9762\u53cd\u5c04:\u5149\u7167\u5c04\u5230\u5149\u6ed1\u93e1\u9762\u5f8c\u8fd4\u5c04\u56de\u4f86,\u5177\u6709\u7c97\u7cd9\u4e0d\u5e73\u6574\u8868\u9762\u662f\u4e0d\u53ef\u80fd\u5f62\u6210<\/p>\n<p>\u800c\u5149\u7167\u5c04\u5230\u8868\u9762\u6642\u53cd\u5c04\u5149\u984f\u8272\u9084\u53d6\u6c7a\u65bc\u5149\u6e90\u548c\u6750\u8cea\u984f\u8272.<\/p>\n<p>OpenGL ES\u53ef\u4ee5\u5275\u5efa\u51fa\u56db\u7a2e\u4e0d\u540c\u5149\u6e90<\/p>\n<p>\u74b0\u5883\u5149\u6e90:\u74b0\u5883\u5149\u672c\u8eab\u975e\u5149\u6e90,\u800c\u662f\u7531\u6240\u5728\u74b0\u5883\u4e2d\u5176\u5b83\u5149\u6e90\u767c\u51fa\u5149\u53cd\u5c04\u5728\u5468\u570d\u5f97\u5230.\u9019\u4e9b\u74b0\u5883\u5149\u6df7\u5408\u5f62\u6210\u7167\u660e\u6548\u679c.\u74b0\u5883\u5149\u7121\u65b9\u5411\u4e26\u4e14\u88ab\u74b0\u5883\u5149\u7167\u5c04\u6240\u6709\u7269\u9ad4\u90fd\u6709\u5171\u540c\u4eae\u5ea6.<\/p>\n<p>\u9ede\u5149\u6e90:\u9ede\u5149\u6e90\u5728\u7a7a\u9593\u4e2d\u6709\u56fa\u5b9a\u4f4d\u7f6e,\u4e26\u4e14\u5411\u500b\u65b9\u5411\u7167\u5c04.\u5982\u71c8\u6ce1<\/p>\n<p>\u5b9a\u5411\u5149\u6e90:\u5b9a\u5411\u5149\u9700\u8981\u4e00\u500b\u65b9\u5411\u4e26\u5ef6\u4f38\u81f3\u7121\u9650\u9060.\u5982\u592a\u967d\u662f\u6a19\u6e96\u5b9a\u5411\u5149\u6e90<\/p>\n<p>\u6295\u5c04\u5149\u6e90:\u57283D\u7a7a\u9593\u4e2d\u6709\u56fa\u5b9a\u4f4d\u7f6e.\u4e26\u4e14\u6709\u500b\u7167\u5c04\u65b9\u5411.\u4e26\u4e14\u5177\u6709\u9310\u5f62\u7167\u5c04\u5340\u57df.\u5982\u8857\u71c8\u5c31\u662f\u6a19\u6e96\u6295\u5c04\u5149.\u4f46\u5f88\u8017GPU\u8cc7\u6e90.<\/p>\n<p>OpenGL ES\u5141\u8a31\u6307\u5b9a\u5149\u984f\u8272\u8207\u5f37\u5ea6,\u4f7f\u7528RGBA\u6307\u5b9a\u984f\u8272<\/p>\n<p>\u74b0\u5883\u5149\u8272:\u88ab\u7167\u5c04\u7121\u9ad4\u6574\u9ad4\u53d7\u5230\u5149\u8272.\u7269\u9ad4\u5c07\u6703\u63a5\u53d7\u9019\u7a2e\u984f\u8272\u7167\u5c04.\u4e26\u4e14\u8207\u5149\u6e90\u4f4d\u7f6e\u548c\u65b9\u5411\u7121\u95dc.<\/p>\n<p>\u6f2b\u53cd\u5c04\u8272:\u7269\u9ad4\u53cd\u5c04\u6642\u53d7\u5230\u5149\u8272.\u80cc\u8457\u5149\u6e90\u53e6\u4e00\u9762\u4e0d\u6703\u88ab\u7167\u5c04\u5230<\/p>\n<p>\u93e1\u9762\u53cd\u5c04\u8272:\u93e1\u9762\u53cd\u5c04\u8272\u50c5\u50c5\u5f71\u97ff\u9762\u5411\u89c0\u5bdf\u8005\u548c\u5149\u6e90\u9762<\/p>\n<p>\u6295\u5c04\u8272:\u50c5\u5f71\u97ff\u9310\u578b\u7167\u5c04\u7269<\/p>\n<p>\u555f\u7528\u5149\u7167,\u4e00\u65e6\u958b\u555f\u5149\u7167\u7cfb\u7d71\u5c07\u88ab\u61c9\u7528\u65bc\u6240\u6709\u6e32\u67d3.\u4f60\u9084\u9700\u8981\u6307\u5b9a\u5149\u6e90\u8207\u6750\u8cea\u4ee5\u53ca\u9802\u9ede\u6cd5\u7dda\u78ba\u5b9a\u6700\u5f8c\u5149\u7167\u6548\u679c<\/p>\n<p>GL10.glEnable(GL10.GL_LIGHTING);<\/p>\n<p>\u6e32\u67d3\u5b8c\u6210\u5fc5\u9700\u95dc\u9589\u5149\u7167.\u5426\u5247\u5f71\u97ff\u4e4b\u5f8cGUI\u6e32\u67d3.<\/p>\n<p>GL10.glDisable(GL10.GL_LIGHTING);<\/p>\n<p>OpenGL ES\u5141\u8a31\u6bcf\u500b\u5834\u666f\u4e2d\u6700\u591a\u4f7f\u75288\u500b\u5149\u6e90,\u5916\u52a0\u4e00\u500b\u5168\u57df\u5149\u6e90.\u5149\u6e90ID\u5f9eGL10.GL_LIGHT0\u81f3GL10.GL_LIGHT7<\/p>\n<p>\u5149\u6e900\u4f7f\u80fd\u4e26\u5c07\u5176\u61c9\u7528\u6240\u6709\u6e32\u67d3\u7269<\/p>\n<p>GL10.glEnable(GL10.GL_LIGHT0);<\/p>\n<p>\u82e5\u60f3\u55ae\u7368\u7981\u7528\u67d0\u5149\u6e90<\/p>\n<p>GL10.glDisable(GL10.GL_LIGHT0);<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"179\">\u5149\u6e90\u5be6\u73fe\u4ee3\u78bc<\/td>\n<\/tr>\n<tr>\n<td width=\"179\"><a href=\"https:\/\/www.bookcard.net\/wordpress\/android_game_light_ambient\/\">\u74b0\u5883\u5149<\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"179\"><a href=\"https:\/\/www.bookcard.net\/wordpress\/android_game_light_directional\/\">\u5b9a\u5411\u5149<\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"179\"><a href=\"https:\/\/www.bookcard.net\/wordpress\/android_game_light_point\/\">\u71c8\u5149<\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"179\"><a href=\"https:\/\/www.bookcard.net\/wordpress\/android_game_light_spot\/\">\u5c04\u71c8<\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"179\"><a href=\"https:\/\/www.bookcard.net\/wordpress\/android_game_material\/\">\u6750\u8cea<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5149\u7167\u7cfb\u7d71\u5b83\u53ef\u4ee5\u4ee43D\u904a\u6232\u66f4\u52a0\u903c\u771f.\u8981\u6a21\u64ec\u5149\u7167\u9700\u8981\u5149\u6e90\u767c\u5c04\u5149\u7dda.\u548c\u88ab\u5149\u7167\u7167\u5c04\u7269.\u6700\u5f8c\u9700\u8981\u4e00\u53f0\u76f8\u6a5f\u6355\u8db3\u5149\u6e90\u767c\u5c04\u5149\u4ee5 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.bookcard.net\/wordpress\/android_game_light\/\" class=\"more-link\">\u7e7c\u7e8c\u95b1\u8b80 <span class=\"screen-reader-text\">Android\u904a\u6232\u4e4b\u5149\u7167<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,62],"tags":[2,50],"class_list":["post-4484","post","type-post","status-publish","format-standard","hentry","category-android","category-opengl","tag-android","tag-opengl","entry"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/posts\/4484","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/comments?post=4484"}],"version-history":[{"count":2,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/posts\/4484\/revisions"}],"predecessor-version":[{"id":4506,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/posts\/4484\/revisions\/4506"}],"wp:attachment":[{"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/media?parent=4484"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/categories?post=4484"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/tags?post=4484"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}