{"id":1440,"date":"2018-08-05T07:39:13","date_gmt":"2018-08-05T07:39:13","guid":{"rendered":"http:\/\/demensdeum.com\/blog\/?p=1440"},"modified":"2025-08-12T12:05:33","modified_gmt":"2025-08-12T09:05:33","slug":"black-screen-opengl","status":"publish","type":"post","link":"https:\/\/demensdeum.com\/blog\/zh\/2018\/08\/05\/black-screen-opengl\/","title":{"rendered":"\u6211\u4eec\u51fb\u8d25\u4e86\u9a6c\u91cc\u7ef4\u5947\uff0c\u9ed1\u8272\u6b63\u65b9\u5f62opengl"},"content":{"rendered":"<p> Malevich\u5b9a\u671f\u51fa\u73b0\u5728OpenGL\u4e0a\u7684\u4efb\u4f55\u5f00\u53d1\u4eba\u5458\u3002\u8fd9\u662f\u51fa\u4e4e\u610f\u6599\u800c\u5927\u80c6\u5730\u53d1\u751f\u7684\uff0c\u60a8\u53ea\u9700\u542f\u52a8\u8be5\u9879\u76ee\u5e76\u770b\u5230\u4e00\u4e2a\u9ed1\u8272\u6b63\u65b9\u5f62\u800c\u4e0d\u662f\u4e00\u4e2a\u7f8e\u5999\u7684\u6e32\u67d3\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1441\" src=\"https:\/\/demensdeum.com\/blog\/wp-content\/uploads\/2018\/08\/malevich.png\" alt=\"\" width=\"688\" height=\"553\" srcset=\"https:\/\/demensdeum.com\/blog\/wp-content\/uploads\/2018\/08\/malevich.png 688w, https:\/\/demensdeum.com\/blog\/wp-content\/uploads\/2018\/08\/malevich-300x241.png 300w\" sizes=\"auto, (max-width: 688px) 100vw, 688px\" \/><\/p>\n<p>\u4eca\u5929\uff0c\u6211\u5c06\u51fa\u4e8e\u4ec0\u4e48\u539f\u56e0\u88ab\u4e00\u4e2a\u9ed1\u8272\u5e7f\u573a\u62dc\u8bbf\uff0c\u53d1\u73b0\u7684\u95ee\u9898\u662f\u56e0\u4e3aOpenGL\u4e0d\u4f1a\u5728\u5c4f\u5e55\u4e0a\u7ed8\u5236\u4efb\u4f55\u5185\u5bb9\uff0c\u6709\u65f6\u751a\u81f3\u4f7f\u7a97\u6237\u900f\u660e\u3002 <\/p>\n<h3>\u4f7f\u7528\u5de5\u5177<\/ h3><\/h3>\n<p>\u5bf9\u4e8e\u8c03\u8bd5OpenGL\uff0c\u6709\u4e24\u4e2a\u5de5\u5177\u5e2e\u52a9\u4e86\u6211\uff1a<a href =\u201c https:\/\/github.com\/baldurk\/renderdoc\u201d target =\u201c _ blank\u201d rel =\u201c noopener\u201d> renderdoc <\/a> and renderdoc <\/a>\u548c<aa> and <aa> and <aa> and <aa> and <a href =\u201c href =\u201d \u201c nooopener\u201d> apitrace <\/a>\u3002 Renderdoc\uff06\uff038211;\u7528\u4e8e\u8c03\u8bd5OpenGL\u6e32\u67d3\u8fc7\u7a0b\u7684\u5de5\u5177\uff0c\u60a8\u53ef\u4ee5\u67e5\u770b\u6240\u6709\u5185\u5bb9\uff06\uff038211;\u9876\u70b9\uff0c\u7740\u8272\u5668\uff0c\u7eb9\u7406\uff0c\u9a7e\u9a76\u5458\u7684\u503a\u52a1\u6d88\u606f\u3002 Apitrace\uff06\uff038211;\u4e00\u4e2a\u8ffd\u8e2a\u56fe\u5f62API\u6311\u6218\u7684\u5de5\u5177\uff0c\u8fdb\u884c\u8f6c\u50a8\u8c03\u7528\u5e76\u663e\u793a\u53c2\u6570\u3002\u8fd8\u6709\u4e00\u4e2a\u5f88\u597d\u7684\u673a\u4f1a\u53ef\u4ee5\u901a\u8fc7WDIFF\uff08\u6216\u6ca1\u6709\u4f46\u4e0d\u90a3\u4e48\u65b9\u4fbf\uff09\u6bd4\u8f83\u4e24\u4e2a\u8f6c\u50a8<\/p>\n<h3>\u68c0\u67e5\u60a8\u4e0e\u8c01\u4e00\u8d77\u5de5\u4f5c<\/ h3><\/h3>\n<p>\u6211\u6709\u4e00\u4e2a\u64cd\u4f5c\u7cfb\u7edfubuntu 16.10\uff0c\u5e26\u6709\u65e7\u7684\u4f9d\u8d56\u9879SDL2\uff0cGLM\uff0cAssimp\uff0cGlew\u3002\u5728\u6700\u65b0\u7248\u672c\u7684Ubuntu 18.04\u4e2d\uff0c\u6211\u5f97\u5230\u4e86\u6e38\u620f\u7684\u7ec4\u88c5<a href =\u201c https:\/\/gitlab.com\/demensdeum\/death-mask\/death-mask\u201c target =\u201c _ black\u201d rel =\u201c noopener\u201d>\u201c noopener\u201d> death-mask <\/a>\u5728\u5c4f\u5e55\u4e0a\u6ca1\u6709\u663e\u793a\u4efb\u4f55\u4e1c\u897f\uff08\u4ec5\u5728\u5c4f\u5e55\u4e0a\u663e\u793a\u4efb\u4f55\u4e1c\u897f\uff09\u3002\u572816.10 I <strong>\u4f7f\u7528Chroot\u548c\u7ec4\u4ef6\u65f6\uff0c\u6211\u4f1a\u4f7f\u7528Graphics <\/strong>\u8fdb\u884c\u6e38\u620f\u7ec4\u4ef6\u3002 <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1446\" src=\"https:\/\/demensdeum.com\/blog\/wp-content\/uploads\/2018\/08\/NOTSUREIF.jpg\" alt=\"\" width=\"417\" height=\"234\" \/><\/p>\n<p>\u4f3c\u4e4e\u5728Ubuntu 18.04 <\/p>\n<p>\u4e2d\u7834\u88c2\u4e86<\/p>\n<p> <strong> ldd <\/strong>\u663e\u793a\u4e86\u4e0e\u76f8\u540c\u5e93SDL2\u7684Linkka\uff0cGl\u3002\u5728Renderdoc\u9a7e\u9a76\u975e\u5de5\u4f5c\u7248\u672c\uff0c\u6211\u5728\u9876\u70b9\u7740\u8272\u5668\u7684\u5165\u53e3\u5904\u770b\u5230\u5783\u573e\uff0c\u4f46\u6211\u9700\u8981\u66f4\u575a\u5b9e\u7684\u786e\u8ba4\u3002\u4e3a\u4e86\u7406\u89e3\u4e8c\u8fdb\u5236\u6280\u672f\u4e4b\u95f4\u7684\u533a\u522b\uff0c\u6211\u5c06\u5b83\u4eec\u4fe9\u90fd\u901a\u8fc7<strong> apitrace <\/strong>\u9a71\u52a8\u3002\u5783\u573e\u573a\u7684\u6bd4\u8f83\u8868\u660e\uff0c\u65b0\u9c9c\u7684Ubunta\u4e0a\u7684\u5927\u4f1a\u6253\u7834\u4e86OpenGL\u7684\u6f5c\u5728\u5ba2\u6237\u8ba1\u5212\uff0c\u5b9e\u9645\u4e0a\u5c06\u5783\u573e\u53d1\u9001\u5230\u90a3\u91cc\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1448\" src=\"https:\/\/demensdeum.com\/blog\/wp-content\/uploads\/2018\/08\/apicalls.png\" alt=\"\" width=\"1902\" height=\"234\" srcset=\"https:\/\/demensdeum.com\/blog\/wp-content\/uploads\/2018\/08\/apicalls.png 1902w, https:\/\/demensdeum.com\/blog\/wp-content\/uploads\/2018\/08\/apicalls-300x37.png 300w, https:\/\/demensdeum.com\/blog\/wp-content\/uploads\/2018\/08\/apicalls-768x94.png 768w, https:\/\/demensdeum.com\/blog\/wp-content\/uploads\/2018\/08\/apicalls-1024x126.png 1024w\" sizes=\"auto, (max-width: 1902px) 100vw, 1902px\" \/><\/p>\n<p>\u77e9\u9635\u805a\u96c6\u5728GLM\u5e93\u4e2d\u3002\u4ece16.04\uff06\uff038211;\u6211\u518d\u6b21\u83b7\u5f97\u4e86\u6e38\u620f\u7684\u5de5\u4f5c\u6784\u5efa\u3002\u95ee\u9898\u662fGLM 9.9.0\u4e2d\u5355\u4e2a\u77e9\u9635\u7684\u521d\u59cb\u5316\u7684\u5dee\u5f02\uff0c\u6709\u5fc5\u8981\u6e05\u695a\u5730\u6307\u51fa\u6784\u9020\u51fd\u6570\u4e2d\u7684Mat4\uff081.0f\uff09\u53c2\u6570\u3002\u66f4\u6539\u4e86\u521d\u59cb\u5316\u5e76<a href =\u201c https:\/\/github.com\/g-truc\/glm\/issues\/797\u201d rel =\u201c noopener\u201d target =\u201c _ black\u201d>\u901a\u8fc7\u5199\u4e0b<\/a>\u56fe\u4e66\u9986\u7684\u4f5c\u8005\uff0c\u6211\u5f00\u59cb\u505a<a href =\u201c \u201c NOOPENER\u201d>\u6d4b\u8bd5FSGL <\/a>\u3002\u5728\u6211\u5728FSGL\u4e2d\u53d1\u73b0\u7f3a\u9677\u7684\u5199\u4f5c\u8fc7\u7a0b\u4e2d\uff0c\u6211\u5c06\u8fdb\u4e00\u6b65\u63cf\u8ff0\u5b83\u4eec\u3002 <\/p>\n<h3>\u786e\u5b9a\u751f\u547d\u4e2d\u7684\u8c01<\/ h3><\/h3>\n<p>\u5bf9\u4e8e\u4f7f\u7528OpenGL\u8fdb\u884c\u6b63\u786e\u7684\u5de5\u4f5c\uff0c\u60a8\u9700\u8981\u81ea\u613f\u5f3a\u884c\u5f3a\u884c<\/em> <\/strong>\u8bf7\u6c42\u67d0\u4e2a\u7248\u672c\u7684\u4e0a\u4e0b\u6587\u3002\u56e0\u6b64\uff0c\u5b83\u67e5\u627eSDL2\uff08\u60a8\u9700\u8981\u4e25\u683c\u5c06\u7248\u672c\u653e\u7f6e\u5728\u521d\u59cb\u5316\u4e0a\u4e0b\u6587\u4e4b\u524d\uff09\uff1a<\/p>\n<p> <\uff01 - \u4f7f\u7528hilite.me-> <\/p>\n<p>\u751f\u6210\u7684html<\/p>\n<div style =\u201c\u80cc\u666f\uff1a#ffffffflafflow\uff1aauto; width\uff1aauto; ofero; bordo; border; solid Gray;\u8fb9\u6846\u5bbd\u5ea6\uff1a.1EM .1EM .1EM .8EM; PADDING\uff1a.2EM .6EM;\u201c>\n<pre style =\u201c margin\uff1a0; line-height\uff1a125\uff05;\u201d> sdl_gl_seettribute\uff08sdl_gl_context_major_version\uff0c<span style =\u201c color\uff1a\uff030000dd; font; font-teight\uff1abold-teoight\uff1abold; bold; bold; bold; bold;\u201c> 3 <\/span>\uff09> 3 <\/spas>\uff09;<br \/>\nsdl_gl_settribute\uff08sdl_gl_context_minor_version\uff0c<span style =\u201c\u989c\u8272\uff1a\uff030000DD; font-weight;\u201d> 2 <\/span>\uff09;<br \/>\nsdl_gl_settribute\uff08sdl_gl_context_profile_mask\uff0csdl_gl_context_profile_core_core\uff09;<br \/>\n<\/ pre>\n<\/div>\n<p>\u4f8b\u5982\uff0crenderdoc\u4e0d\u9002\u54083.2\u4ee5\u4e0b\u7684\u4e0a\u4e0b\u6587\u3002\u6211\u60f3\u6307\u51fa\u7684\u662f\uff0c\u5207\u6362\u4e0a\u4e0b\u6587<strong>\u4e4b\u540e\uff0c\u770b\u5230\u76f8\u540c\u7684\u9ed1\u5c4f<\/strong>\u7684\u53ef\u80fd\u6027\u5f88\u9ad8\u3002\u4e3a\u4ec0\u4e48\uff1f <br \/>\n\u56e0\u4e3aOpenGL 3.2\u7684<strong>\u4e0a\u4e0b\u6587\u5fc5\u987b\u9700\u8981VAO\u7f13\u51b2\u6db2\u7684\u5b58\u5728\uff0c\u800c\u6ca1\u670999\uff05\u7684\u56fe\u5f62\u9a71\u52a8\u7a0b\u5e8f\u4e0d\u8d77\u4f5c\u7528\u3002\u6dfb\u52a0\u7b80\u5355\uff1a<br \/>\n<\uff01 - \u4f7f\u7528hilite.me-> <\/p>\n<p>\u751f\u6210\u7684html<\/p>\n<div style =\u201c\u80cc\u666f\uff1a#ffffffflafflow\uff1aauto; width\uff1aauto; ofero; bordo; border; solid Gray;\u8fb9\u6846\u5bbd\u5ea6\uff1a.1EM .1EM .1EM .8EM; PADDING\uff1a.2EM .6EM;\u201c>\n<pre style =\u201c margin\uff1a0; line-height\uff1a125\uff05;\u201d> glgenvertexarrays\uff08<span style =\u201c color\uff1a\uff030000dd; font-weight\uff1abold;\u201c bold;\u201d> 1 <\/span>\uff0c<span style =\u201c color\u3002\uff033333333;\u201d>\uff06<\/span> vao<br \/>\nGlbindvertexaray\uff08VAO\uff09;<br \/>\n<\/ pre>\n<\/div>\n<h3>\u4e0d\u7761\u89c9\uff0c\u51bb\u7ed3<\/ h3><\/h3>\n<p>\u6211\u5728kubuntu\u4e0a\u4e5f\u9047\u5230\u4e86\u4e00\u4e2a\u6709\u8da3\u7684\u95ee\u9898\uff0c\u800c\u4e0d\u662f\u4e00\u4e2a\u9ed1\u8272\u7684\u6b63\u65b9\u5f62\uff0c\u6211\u88ab\u900f\u660e\u4e86\uff0c<strong>\u6709\u65f6<\/strong>\u4e00\u5207\u90fd\u6b63\u786e\u5730\u5448\u73b0\u3002\u6211\u5728Stack Overflow\u4e0a\u627e\u5230\u4e86\u89e3\u51b3\u6b64\u95ee\u9898\u7684\u89e3\u51b3\u65b9\u6848\uff1a<br \/>\n<a href=\"https:\/\/stackoverflow.com\/questions\/38411515\/sdl2-opengl-window-appears-semi-transparent-sometimes\" target=\"_blank\" rel=\"noopener\">https:\/\/stackoverflow.com\/questions\/38411515\/sdl2-opengl-window-appears-semi-transparent-sometimes<\/a><\/p>\n<p> FSGL\u6d4b\u8bd5\u6e32\u67d3\u4ee3\u7801\u4e5f\u5b58\u5728<strong>\u7761\u7720\uff082s\uff09<\/strong>;\u56e0\u6b64\uff0c\u5728Xubuntu\u548cUbuntu\u4e0a\uff0c\u6211\u6536\u5230\u4e86\u6b63\u786e\u7684\u6e32\u67d3\u5e76\u5c06\u5e94\u7528\u7a0b\u5e8f\u5165\u7761\uff0c\u4f46\u662f\u5728Kubuntu\u4e0a\uff0c\u6211\u5728Dolphin\u53d1\u5c04\u768480\uff05\u548c30\uff05\u7684\u53d1\u5c04\u548c\u7ec8\u7aef\u4e2d\u6536\u5230\u4e86\u900f\u660e\u7684\u5c4f\u5e55\u3002\u4e3a\u4e86\u89e3\u51b3\u6b64\u95ee\u9898\uff0c\u6211\u6309\u7167\u6587\u6863\u4e2d\u7684\u5efa\u8bae\u5728SDLEVENT\u8c03\u67e5\u540e\u5728\u6bcf\u4e2a\u5e27\u4e2d\u6dfb\u52a0\u4e86\u6e32\u67d3\u3002 <\/p>\n<p>\u6d4b\u8bd5\u4ee3\u7801\uff1a<br \/>\n<a href=\"https:\/\/gitlab.com\/demensdeum\/FSGLtests\/blob\/master\/renderModelTest\/\" target=\"_blank\" rel=\"noopener\">https:\/\/gitlab.com\/demensdeum\/FSGLtests\/blob\/master\/renderModelTest\/<\/a><\/p>\n<p><H3>\u4e0e\u9a7e\u9a76\u5458\u4ea4\u8c08<\/ h3><\/h3>\n<p> Opengl supports the communication channel between the application and the driver, to activate it, you need to turn on the flags Gl_debug_outPut, GL_DEBUG_OUTPUT_SYNCHRONUS, affix the warning <SPAN Class = \"PL-C1\"> GLDEBUGMESSAGECONTROL <\/SPAN> and tie the calback through <span class = \"PL-C1\"> GLDEBUGMESSAGECALLBACK <\/span>\u3002 <br \/>\n\u53ef\u4ee5\u5728\u6b64\u5904\u4ee5\u521d\u59cb\u5316\u7684\u793a\u4f8b\uff1a<br \/>\n<a href=\"https:\/\/github.com\/rock-core\/gui-vizkit3d\/blob\/master\/src\/EnableGLDebugOperation.cpp\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/rock-core\/gui-vizkit3d\/blob\/master\/src\/EnableGLDebugOperation.cpp<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Malevich\u5b9a\u671f\u51fa\u73b0\u5728OpenGL\u4e0a\u7684\u4efb\u4f55\u5f00\u53d1\u4eba\u5458\u3002\u8fd9\u662f\u51fa\u4e4e\u610f\u6599\u800c\u5927\u80c6\u5730\u53d1\u751f\u7684\uff0c\u60a8\u53ea\u9700\u542f\u52a8\u8be5\u9879\u76ee\u5e76\u770b\u5230\u4e00\u4e2a\u9ed1\u8272\u6b63\u65b9\u5f62\u800c\u4e0d\u662f\u4e00\u4e2a\u7f8e\u5999\u7684\u6e32\u67d3\uff1a \u4eca\u5929\uff0c\u6211\u5c06\u51fa\u4e8e\u4ec0\u4e48\u539f\u56e0\u88ab\u4e00\u4e2a\u9ed1\u8272\u5e7f\u573a\u62dc\u8bbf\uff0c\u53d1\u73b0\u7684\u95ee\u9898\u662f\u56e0\u4e3aOpenGL\u4e0d\u4f1a\u5728\u5c4f\u5e55\u4e0a\u7ed8\u5236\u4efb\u4f55\u5185\u5bb9\uff0c\u6709\u65f6\u751a\u81f3\u4f7f\u7a97\u6237\u900f\u660e\u3002 \u4f7f\u7528\u5de5\u5177 \u5bf9\u4e8e\u8c03\u8bd5OpenGL\uff0c\u6709\u4e24\u4e2a\u5de5\u5177\u5e2e\u52a9\u4e86\u6211\uff1a renderdoc and renderdoc \u548c and and and and apitrace \u3002 Renderdoc\uff06\uff038211;\u7528\u4e8e\u8c03\u8bd5OpenGL\u6e32\u67d3\u8fc7\u7a0b\u7684\u5de5\u5177\uff0c\u60a8\u53ef\u4ee5\u67e5\u770b\u6240\u6709\u5185\u5bb9\uff06\uff038211;\u9876\u70b9\uff0c\u7740\u8272\u5668\uff0c\u7eb9\u7406\uff0c\u9a7e\u9a76\u5458\u7684\u503a\u52a1\u6d88\u606f\u3002 Apitrace\uff06\uff038211;\u4e00\u4e2a\u8ffd\u8e2a\u56fe\u5f62API\u6311\u6218\u7684\u5de5\u5177\uff0c\u8fdb\u884c\u8f6c\u50a8\u8c03\u7528\u5e76\u663e\u793a\u53c2\u6570\u3002\u8fd8\u6709\u4e00\u4e2a\u5f88\u597d\u7684\u673a\u4f1a\u53ef\u4ee5\u901a\u8fc7WDIFF\uff08\u6216\u6ca1\u6709\u4f46\u4e0d\u90a3\u4e48\u65b9\u4fbf\uff09\u6bd4\u8f83\u4e24\u4e2a\u8f6c\u50a8 \u68c0\u67e5\u60a8\u4e0e\u8c01\u4e00\u8d77\u5de5\u4f5c \u6211\u6709\u4e00\u4e2a\u64cd\u4f5c\u7cfb\u7edfubuntu 16.10\uff0c\u5e26\u6709\u65e7\u7684\u4f9d\u8d56\u9879SDL2\uff0cGLM\uff0cAssimp\uff0cGlew\u3002\u5728\u6700\u65b0\u7248\u672c\u7684Ubuntu 18.04\u4e2d\uff0c\u6211\u5f97\u5230\u4e86\u6e38\u620f\u7684\u7ec4\u88c5\u201c noopener\u201d> death-mask \u5728\u5c4f\u5e55\u4e0a\u6ca1\u6709\u663e\u793a\u4efb\u4f55\u4e1c\u897f\uff08\u4ec5\u5728\u5c4f\u5e55\u4e0a\u663e\u793a\u4efb\u4f55\u4e1c\u897f\uff09\u3002\u572816.10 I \u4f7f\u7528Chroot\u548c\u7ec4\u4ef6\u65f6\uff0c\u6211\u4f1a\u4f7f\u7528Graphics \u8fdb\u884c\u6e38\u620f\u7ec4\u4ef6\u3002 \u4f3c\u4e4e\u5728Ubuntu 18.04 \u4e2d\u7834\u88c2\u4e86 ldd \u663e\u793a\u4e86\u4e0e\u76f8\u540c\u5e93SDL2\u7684Linkka\uff0cGl\u3002\u5728Renderdoc\u9a7e\u9a76\u975e\u5de5\u4f5c\u7248\u672c\uff0c\u6211\u5728\u9876\u70b9\u7740\u8272\u5668\u7684\u5165\u53e3\u5904\u770b\u5230\u5783\u573e\uff0c\u4f46\u6211\u9700\u8981\u66f4\u575a\u5b9e\u7684\u786e\u8ba4\u3002\u4e3a\u4e86\u7406\u89e3\u4e8c\u8fdb\u5236\u6280\u672f\u4e4b\u95f4\u7684\u533a\u522b\uff0c\u6211\u5c06\u5b83\u4eec\u4fe9\u90fd\u901a\u8fc7 apitrace \u9a71\u52a8\u3002\u5783\u573e\u573a\u7684\u6bd4\u8f83\u8868\u660e\uff0c\u65b0\u9c9c\u7684Ubunta\u4e0a\u7684\u5927\u4f1a\u6253\u7834\u4e86OpenGL\u7684\u6f5c\u5728\u5ba2\u6237\u8ba1\u5212\uff0c\u5b9e\u9645\u4e0a\u5c06\u5783\u573e\u53d1\u9001\u5230\u90a3\u91cc\uff1a \u77e9\u9635\u805a\u96c6\u5728GLM\u5e93\u4e2d\u3002\u4ece16.04\uff06\uff038211;\u6211\u518d\u6b21\u83b7\u5f97\u4e86\u6e38\u620f\u7684\u5de5\u4f5c\u6784\u5efa\u3002\u95ee\u9898\u662fGLM 9.9.0\u4e2d\u5355\u4e2a\u77e9\u9635\u7684\u521d\u59cb\u5316\u7684\u5dee\u5f02\uff0c\u6709\u5fc5\u8981\u6e05\u695a\u5730\u6307\u51fa\u6784\u9020\u51fd\u6570\u4e2d\u7684Mat4\uff081.0f\uff09\u53c2\u6570\u3002\u66f4\u6539\u4e86\u521d\u59cb\u5316\u5e76\u901a\u8fc7\u5199\u4e0b\u56fe\u4e66\u9986\u7684\u4f5c\u8005\uff0c\u6211\u5f00\u59cb\u505a\u6d4b\u8bd5FSGL \u3002\u5728\u6211\u5728FSGL\u4e2d\u53d1\u73b0\u7f3a\u9677\u7684\u5199\u4f5c\u8fc7\u7a0b\u4e2d\uff0c\u6211\u5c06\u8fdb\u4e00\u6b65\u63cf\u8ff0\u5b83\u4eec\u3002 \u786e\u5b9a\u751f\u547d\u4e2d\u7684\u8c01 \u5bf9\u4e8e\u4f7f\u7528OpenGL\u8fdb\u884c\u6b63\u786e\u7684\u5de5\u4f5c\uff0c\u60a8\u9700\u8981\u81ea\u613f\u5f3a\u884c\u5f3a\u884c \u8bf7\u6c42\u67d0\u4e2a\u7248\u672c\u7684\u4e0a\u4e0b\u6587\u3002\u56e0\u6b64\uff0c\u5b83\u67e5\u627eSDL2\uff08\u60a8\u9700\u8981\u4e25\u683c\u5c06\u7248\u672c\u653e\u7f6e\u5728\u521d\u59cb\u5316\u4e0a\u4e0b\u6587\u4e4b\u524d\uff09\uff1a \u751f\u6210\u7684html sdl_gl_seettribute\uff08sdl_gl_context_major_version\uff0c 3 \uff09> 3 \uff09; sdl_gl_settribute\uff08sdl_gl_context_minor_version\uff0c 2 \uff09; sdl_gl_settribute\uff08sdl_gl_context_profile_mask\uff0csdl_gl_context_profile_core_core\uff09; \u4f8b\u5982\uff0crenderdoc\u4e0d\u9002\u54083.2\u4ee5\u4e0b\u7684\u4e0a\u4e0b\u6587\u3002\u6211\u60f3\u6307\u51fa\u7684\u662f\uff0c\u5207\u6362\u4e0a\u4e0b\u6587\u4e4b\u540e\uff0c\u770b\u5230\u76f8\u540c\u7684\u9ed1\u5c4f\u7684\u53ef\u80fd\u6027\u5f88\u9ad8\u3002\u4e3a\u4ec0\u4e48\uff1f \u56e0\u4e3aOpenGL 3.2\u7684\u4e0a\u4e0b\u6587\u5fc5\u987b\u9700\u8981VAO\u7f13\u51b2\u6db2\u7684\u5b58\u5728\uff0c\u800c\u6ca1\u670999\uff05\u7684\u56fe\u5f62\u9a71\u52a8\u7a0b\u5e8f\u4e0d\u8d77\u4f5c\u7528\u3002\u6dfb\u52a0\u7b80\u5355\uff1a \u751f\u6210\u7684html glgenvertexarrays\uff08 1<a class=\"more-link\" href=\"https:\/\/demensdeum.com\/blog\/zh\/2018\/08\/05\/black-screen-opengl\/\">Continue reading <span class=\"screen-reader-text\">&#8220;\u6211\u4eec\u51fb\u8d25\u4e86\u9a6c\u91cc\u7ef4\u5947\uff0c\u9ed1\u8272\u6b63\u65b9\u5f62opengl&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[49,61,52],"tags":[],"class_list":["post-1440","post","type-post","status-publish","format-standard","hentry","category-blog","category-techie","category-tutorials","entry"],"translation":{"provider":"WPGlobus","version":"3.0.2","language":"zh","enabled_languages":["en","ru","zh","de","fr","ja","pt","hi"],"languages":{"en":{"title":true,"content":true,"excerpt":false},"ru":{"title":true,"content":true,"excerpt":false},"zh":{"title":true,"content":true,"excerpt":false},"de":{"title":true,"content":true,"excerpt":false},"fr":{"title":true,"content":true,"excerpt":false},"ja":{"title":true,"content":true,"excerpt":false},"pt":{"title":true,"content":true,"excerpt":false},"hi":{"title":false,"content":false,"excerpt":false}}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/demensdeum.com\/blog\/zh\/wp-json\/wp\/v2\/posts\/1440","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/demensdeum.com\/blog\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/demensdeum.com\/blog\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/zh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/zh\/wp-json\/wp\/v2\/comments?post=1440"}],"version-history":[{"count":23,"href":"https:\/\/demensdeum.com\/blog\/zh\/wp-json\/wp\/v2\/posts\/1440\/revisions"}],"predecessor-version":[{"id":4220,"href":"https:\/\/demensdeum.com\/blog\/zh\/wp-json\/wp\/v2\/posts\/1440\/revisions\/4220"}],"wp:attachment":[{"href":"https:\/\/demensdeum.com\/blog\/zh\/wp-json\/wp\/v2\/media?parent=1440"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/zh\/wp-json\/wp\/v2\/categories?post=1440"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/zh\/wp-json\/wp\/v2\/tags?post=1440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}