{"id":2848,"date":"2019-09-11T21:08:14","date_gmt":"2019-09-11T12:08:14","guid":{"rendered":"http:\/\/okamurax.com\/?p=2848"},"modified":"2020-05-05T01:00:54","modified_gmt":"2020-05-04T16:00:54","slug":"c-directx%e7%ac%ac%e4%b8%80%e6%ad%a9","status":"publish","type":"post","link":"https:\/\/appbay.org\/?p=2848","title":{"rendered":"C# DirectX\u7b2c\u4e00\u6b69"},"content":{"rendered":"<p>DirectX Software Development Kit (SDK)<br \/>\n\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5fc5\u8981\u306a\u5834\u5408\u3001<br \/>\n\u305d\u306e\u307e\u307e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\u5931\u6557\u3059\u308b\u306e\u3067\u3001<br \/>\nMicrosoft Visual C++ \u95a2\u9023\u3092\u5168\u3066\u524a\u9664\u3057\u3066\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<br \/>\n(2010\u304c\u539f\u56e0\u306e\u6a21\u69d8\u30672010\u3060\u3051\u3067\u3082\u3044\u3051\u308b\u3063\u307d\u3044)<\/p>\n<pre class=\"lang:c# decode:true\">public partial class Form1 : Form\r\n{\r\nprivate Device device = null;\r\npublic Form1()\r\n{\r\n    \/\/ \u53c2\u7167\u8a2d\u5b9a\u3067DLL\u8ffd\u52a0\r\n    \/\/ C:\\Windows\\assembly\\GAC\\Microsoft.DirectX\r\n\r\n    \/\/ app.config\u3092\u4ee5\u4e0b\u306e\u7528\u306b\u66f8\u304d\u63db\u3048\u308b\r\n    \/\/ &lt;startup&gt; \u3092\u4e0b\u8a18\u306e\u3088\u3046\u306b\u5909\u66f4 \r\n    \/\/ &lt;startup useLegacyV2RuntimeActivationPolicy=\"true\"&gt;\r\n\r\n    \/\/ \u30c7\u30d0\u30c3\u30b0 &gt; \u30a6\u30a3\u30f3\u30c9\u30a6 &gt; \u4f8b\u5916\u8a2d\u5b9a\r\n    \/\/ Managed Debugging Assistants &gt; LoaderLock\u306e\u30c1\u30a7\u30c3\u30af\u3092\u5916\u3059\u3002\r\n\r\n    InitializeComponent();\r\n\r\n    PresentParameters pp = new PresentParameters();\r\n    pp.Windowed = true;\r\n    pp.SwapEffect = SwapEffect.Discard;\r\n\r\n    device = new Device(\r\n        0,\r\n        DeviceType.Hardware,\r\n        this,\r\n        CreateFlags.SoftwareVertexProcessing, pp);\r\n\r\n    this.Paint += (s, e) =&gt;\r\n    {\r\n        device.Clear(\r\n            ClearFlags.Target,\r\n            Color.DarkBlue,\r\n            1.0f,\r\n            0);\r\n        device.BeginScene();\r\n        device.EndScene();\r\n        device.Present();\r\n    };\r\n\r\n    this.FormClosed += (s, e) =&gt;\r\n    {\r\n        device.Dispose();\r\n        device = null;\r\n    };\r\n\r\n}\r\n}<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>DirectX Software Development Kit (SDK) \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5fc5\u8981\u306a\u5834\u5408\u3001 \u305d\u306e\u307e\u307e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\u5931\u6557\u3059\u308b\u306e\u3067\u3001 Microsoft Visual C++ \u95a2\u9023\u3092\u5168\u3066\u524a\u9664\u3057\u3066\u304b\u3089\u30a4\u30f3\u30b9 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/appbay.org\/?p=2848\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;C# DirectX\u7b2c\u4e00\u6b69&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[9],"class_list":["post-2848","post","type-post","status-publish","format-standard","hentry","category-1","tag-c-net"],"_links":{"self":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/2848","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2848"}],"version-history":[{"count":6,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/2848\/revisions"}],"predecessor-version":[{"id":2855,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/2848\/revisions\/2855"}],"wp:attachment":[{"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2848"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2848"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2848"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}