{"id":11865,"date":"2024-09-01T13:45:49","date_gmt":"2024-09-01T04:45:49","guid":{"rendered":"https:\/\/www.webcyou.com\/?p=11865"},"modified":"2024-09-01T13:45:50","modified_gmt":"2024-09-01T04:45:50","slug":"rust-sdl2-examples%e3%82%92%e3%81%99%e3%81%b9%e3%81%a6%e8%a9%a6%e3%81%99","status":"publish","type":"post","link":"https:\/\/www.webcyou.com\/?p=11865","title":{"rendered":"Rust-SDL2 examples\u3092\u3059\u3079\u3066\u8a66\u3059"},"content":{"rendered":"\n<p>\u3069\u3082\u3067\u3059\u3002<\/p>\n<p>\u307e\u305f\u307e\u305f\u3001\u4e45\u3057\u3076\u308a\u611f\u3002<\/p>\n<p>\u4eca\u56de\u306fRust\u306eSDL2\u30d1\u30c3\u30b1\u30fc\u30b8\u3067\u3042\u308bRust-SDL2\u306eexamples\u3092\u3059\u3079\u3066\u8a66\u3057\u3066\u898b\u305f\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u305d\u306e\u30b3\u30de\u30f3\u30c9\u3068\u69d8\u5b50\u306e\u4e00\u89a7\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u524d\u306b\u3001Rust\u306ecargo\u3067\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u30b3\u30de\u30f3\u30c9\u306b\u3064\u3044\u3066\u3002<\/p>\n<p>\u00a0<\/p>\n<h4>cargo\u30b3\u30de\u30f3\u30c9<\/h4>\n<p>cargo\u30b3\u30de\u30f3\u30c9\u306e\u4e2d\u3067\u3001\u300cexample\u300d\u30b3\u30de\u30f3\u30c9\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u306f\u3001\u4ee5\u4e0b\u306e\u69d8\u306b\u300cexamples\u300d\u30d5\u30a1\u30eb\u30c0\u306b\u683c\u7d0d\u3055\u308c\u305fRust\u306eexample\u30d5\u30a1\u30a4\u30eb\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">\u251c\u2500\u2500 &lt;examples&gt;\n\u2502   \u2514\u2500\u2500 &lt;examples.rs&gt;<\/pre>\n<p>\u3053\u306e\u69d8\u306b\u3001Rust\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\uff08cargo\uff09\u3067\u306f\u30d5\u30a9\u30eb\u30c0\u540d\u306b\u3088\u3063\u3066\u3001\u6697\u9ed9\u7684\u306b\u5f79\u5272\u304c\u4e0e\u3048\u3089\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u4ed6\u306b\u3082\u300cbenches\u300d\u300cbin\u300d\u300ctests\u300d\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3089\u306e\u30d5\u30a9\u30eb\u30c0\u304c\u5b58\u5728\u3057\u3066\u3044\u308b\u5834\u5408\u3001cargo\u30b3\u30de\u30f3\u30c9\u3067Rust\u30d5\u30a1\u30a4\u30eb\uff08.rs\uff09\u306b\u5bfe\u3059\u308b\u64cd\u4f5c\u304c\u884c\u3048\u307e\u3059\u3002<\/p>\n<p data-sourcepos=\"35:1-36:79\"><strong>\u300cexamples\u300d<\/strong>\u3067\u3042\u308c\u3070\u3001<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example [\u30d5\u30a1\u30a4\u30eb\u540d]<\/pre>\n<p><strong>\u300cbin\u300d<\/strong>\u3067\u3042\u308c\u3070\u3001<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --bin [\u30d5\u30a1\u30a4\u30eb\u540d]<\/pre>\n<p><strong>\u300ctests\u300d<\/strong>\u3067\u3042\u308c\u3070\u3001<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo test<\/pre>\n<p><strong>\u300cbenches\u300d<\/strong>\u3067\u3042\u308c\u3070\u3001<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo bench<\/pre>\n<p>\u3068\u3044\u3063\u305f\u5177\u5408\u306b\u3001\u5404\u30d5\u30a9\u30eb\u30c0\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308bRust\u30d5\u30a1\u30a4\u30eb\uff08.rs\uff09\u306b\u5bfe\u3059\u308b\u64cd\u4f5c\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001<strong>\u300cexamples\u300d<\/strong>\u306f\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3068\u3057\u3066\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5b9f\u884c\u3067\u304d\u307e\u3059\u306e\u3067\u3001\u4eca\u56de\u306f\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u5b9f\u884c\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">\u00a0<\/pre>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo example [\u5b9f\u884c\u3057\u305f\u3044\u30d5\u30a1\u30a4\u30eb\u540d]\n<\/pre>\n<p>\u00a0<\/p>\n<h4>Rust-SDL2<\/h4>\n<p><a href=\"https:\/\/github.com\/Rust-SDL2\/rust-sdl2\/tree\/master\">Rust-SDL2 GitHub<\/a><\/p>\n<p><a href=\"https:\/\/github.com\/Rust-SDL2\/rust-sdl2\/tree\/master\/examples\">Rust-SDL2 GitHUb examples\u30d5\u30a9\u30eb\u30c0<\/a><\/p>\n<p>\u305d\u308c\u3067\u306f\u3001\u9806\u306b\u5b9f\u884c\u3057\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u00a0<\/p>\n<p><strong><span class=\"notion-enable-hover\" data-token-index=\"0\">animation<\/span><\/strong><!-- notionvc: 7771a93a-0886-450c-9bc1-ae0925978733 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example animation<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-11868\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-3.jpeg\" alt=\"\" width=\"601\" height=\"495\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-3.jpeg 700w, https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-3-300x247.jpeg 300w\" sizes=\"auto, (max-width: 601px) 100vw, 601px\" \/><\/p>\n<p>\u304b\u308f\u3044\u3044\u30ad\u30e3\u30e9\u30af\u30bf\u30fc\u304c\u5de6\u53f3\u306b\u52d5\u3044\u3066\u304a\u308a\u307e\u3059\u3002<\/p>\n<p>\u00a0<\/p>\n<p><strong><span class=\"notion-enable-hover\" data-token-index=\"0\">audio-capture-and-replay<\/span><\/strong><!-- notionvc: 0e2540d8-d9cf-4edc-baaf-7d7b9f786aad --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example audio-capture-and-replay<\/pre>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">Capturing 3 seconds... Please rock!\nCapture Spec = AudioSpec { freq: 22050, format: S16LSB, channels: 2, silence: 0, samples: 1024, size: 4096 }\nAudioDriver: \"coreaudio\"\nAverage Volume of your Recording = 0.80597985%\nMax Volume of your Recording = 5.81988%\nPlaying...\nPlayback Spec = AudioSpec { freq: 22050, format: S16LSB, channels: 2, silence: 0, samples: 1024, size: 4096 }<\/pre>\n<p>\u30de\u30a4\u30af\u63a5\u7d9a\u306e\u30b5\u30f3\u30d7\u30eb\u306e\u3088\u3046\u3067\u3001\u30de\u30a4\u30af\u306e\u8a31\u53ef\u3092\u6c42\u3081\u3089\u308c\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u884c\u3059\u308b\u3068\u81ea\u52d5\u7684\u306b\u7d42\u4e86\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u00a0<\/p>\n<p><strong><span class=\"notion-enable-hover\" data-token-index=\"0\">audio-queue-squarewave<\/span><\/strong><!-- notionvc: 368d38d5-4e4f-46a0-9a77-c07535dafb47 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example audio-queue-squarewave<\/pre>\n<p>\u30d3\u30fc\u30d7\u97f3\u304c\u518d\u751f\u3055\u308c\u307e\u3059\u3002<!-- notionvc: c63dcc1f-b5c4-412f-bb9b-897e7372642b --><\/p>\n<p>\u00a0<\/p>\n<p><strong><span class=\"notion-enable-hover\" data-token-index=\"0\">audio-squarewave<\/span><\/strong><!-- notionvc: 2235e49b-285d-4901-b3b7-81671a39e872 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example audio-squarewave<\/pre>\n<p>\u3055\u304d\u307b\u3069\u3088\u308a\u3082\u9ad8\u3044\u97f3\u304c\u9cf4\u308a\u307e\u3059\u3002<!-- notionvc: 4b96cf2e-f2e1-4081-aa5b-aaa7d4d6bd63 --><\/p>\n<p>\u00a0<\/p>\n<p><strong><span class=\"notion-enable-hover\" data-token-index=\"0\">audio-wav<\/span><\/strong><!-- notionvc: bac11f54-f035-4cbf-90c5-317c663dd298 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example audio-wav<\/pre>\n<p>\u30dd\u3063\u4e00\u77ac\u9cf4\u308a\u307e\u3059\u3002<!-- notionvc: 67133b99-e555-4113-b0fa-3e9f4582333d --><\/p>\n<p>\u00a0<\/p>\n<p><strong><span class=\"notion-enable-hover\" data-token-index=\"0\">audio-whitenoise<\/span><\/strong><!-- notionvc: 0c81baa7-5007-44ba-916a-2e51cdd4105d --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example audio-whitenoise<\/pre>\n<p>\u305d\u306e\u540d\u306e\u901a\u308a\u3001\u30db\u30ef\u30a4\u30c8\u30ce\u30a4\u30ba\u3002\u30b6\u30fc\u3068\u30ce\u30a4\u30ba\u97f3\u304c\u9cf4\u308a\u307e\u3059\u3002<\/p>\n<p>\u00a0<\/p>\n<p><strong>cursor<\/strong><!-- notionvc: 44b8c936-63b7-412f-98b6-cbf74e57633d --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example cursor --features=\"image\" [cursor image path]<\/pre>\n<p>\u30ab\u30fc\u30bd\u30eb\u3092\u5909\u66f4\u3059\u308b\u30c7\u30e2\u3002\u753b\u50cf\u306e\u6307\u5b9a\u304c\u5fc5\u8981\u3002<\/p>\n<p>\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u753b\u50cf\u3092\u6307\u5b9a\u3059\u308b\u5834\u5408\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example cursor --features=\"image\" .\/assets\/cursor.png<\/pre>\n<p>\u753b\u50cf\u3067\u306f\u3001\u30ab\u30fc\u30bd\u30eb\u304c\u6d88\u3048\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u70b9\u304c\u6b8b\u308a\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-11867\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-2.jpeg\" alt=\"\" width=\"601\" height=\"488\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-2.jpeg 700w, https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-2-300x243.jpeg 300w\" sizes=\"auto, (max-width: 601px) 100vw, 601px\" \/><\/p>\n<p>\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u753b\u50cf\u306f\u3053\u3061\u3089\u3002\u30ab\u30fc\u30bd\u30eb\u3092\u5909\u66f4\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11881\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/cursor.png\" alt=\"\" width=\"32\" height=\"32\" \/><\/p>\n<p>\u00a0<\/p>\n<p><strong>demo<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example demo<\/pre>\n<p>Draw\u95a2\u6570\u3067\u3001Color::RGB(255, 0, 0)\u306e\u8d64\u3092\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u771f\u3063\u8d64\u306b\u67d3\u307e\u308a\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-11869\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-4.jpeg\" alt=\"\" width=\"601\" height=\"488\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-4.jpeg 700w, https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-4-300x243.jpeg 300w\" sizes=\"auto, (max-width: 601px) 100vw, 601px\" \/><\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p><strong><span class=\"notion-enable-hover\" data-token-index=\"0\">events<\/span><\/strong><!-- notionvc: 9e0610eb-d6d9-45f7-884a-02f3e25ca685 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example events<\/pre>\n<p>\u30ad\u30fc\u30dc\u30fc\u30c9\u3084\u30de\u30a6\u30b9\u3001\u30a6\u30a3\u30f3\u30c9\u30a6\u79fb\u52d5\u306a\u3069\u306e\u30a4\u30d9\u30f3\u30c8\u3092\u30ad\u30e3\u30c3\u30c1\u3057\u3001\u30ed\u30b0\u306b\u51fa\u529b\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">This example simply prints all events SDL knows about.\nWindow { timestamp: 123, window_id: 1, win_event: Shown }\nWindow { timestamp: 135, window_id: 1, win_event: Exposed }\nWindow { timestamp: 496, window_id: 1, win_event: FocusGained }\nWindow { timestamp: 2806, window_id: 1, win_event: Moved(595, 227) }\nWindow { timestamp: 2915, window_id: 1, win_event: Moved(623, 215) }\nWindow { timestamp: 3851, window_id: 1, win_event: Enter }\nWindow { timestamp: 3921, window_id: 1, win_event: Leave }\nWindow { timestamp: 6148, window_id: 1, win_event: Enter }\nKeyDown { timestamp: 6604, window_id: 1, keycode: Some(Keycode(115)), scancode: Some(S), keymod: NOMOD, repeat: false }\nTextInput { timestamp: 6606, window_id: 1, text: \"s\" }\nKeyUp { timestamp: 6752, window_id: 1, keycode: Some(Keycode(115)), scancode: Some(S), keymod: NOMOD, repeat: false }\nMouseButtonDown { timestamp: 7649, window_id: 1, which: 0, mouse_btn: Left, clicks: 1, x: 206, y: 456 }\nMouseButtonUp { timestamp: 7753, window_id: 1, which: 0, mouse_btn: Left, clicks: 1, x: 206, y: 456 }\nKeyDown { timestamp: 8238, window_id: 1, keycode: Some(Keycode(100)), scancode: Some(D), keymod: NOMOD, repeat: false }\nTextInput { timestamp: 8239, window_id: 1, text: \"d\" }\nKeyUp { timestamp: 8377, window_id: 1, keycode: Some(Keycode(100)), scancode: Some(D), keymod: NOMOD, repeat: false }\nWindow { timestamp: 8827, window_id: 1, win_event: Leave }\nWindow { timestamp: 9181, window_id: 1, win_event: FocusLost }<\/pre>\n<p>\u00a0<\/p>\n<p><strong><span class=\"notion-enable-hover\" data-token-index=\"0\">game-controller<\/span><\/strong><!-- notionvc: e5fde687-b112-4ab2-86a7-10c6cf21ba29 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example game-controller<\/pre>\n<p>\u30b2\u30fc\u30e0\u30d1\u30c3\u30c9\u306e\u64cd\u4f5c\u3067\u30ed\u30b0\u304c\u51fa\u529b\u3057\u307e\u3059\u3002<\/p>\n<p>\u5148\u306b\u30b2\u30fc\u30e0\u30d1\u30c3\u30c9\u306e\u63a5\u7d9a\u304c\u5fc5\u8981\u3067\u3001\u672a\u63a5\u7d9a\u3060\u3068\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">Button DPadLeft down\nButton DPadLeft up\nButton DPadLeft down\nButton DPadLeft up\nButton DPadRight down\nButton DPadRight up\nButton DPadUp down\nButton DPadUp up\nButton A down\nButton A up\nButton B down\nButton B up\nButton Y down\nButton X down\nButton Y up\nButton X up\nButton B down\nButton B up<\/pre>\n<p><br \/><!-- notionvc: f93b10e6-1909-4026-86b6-6af841dc55a1 --><\/p>\n<p>\u00a0<\/p>\n<p><strong><span class=\"notion-enable-hover\" data-token-index=\"0\">game-of-life-unsafe-textures<\/span><\/strong><!-- notionvc: a21187c1-d7b1-46d2-81fd-d7dbf2b8a7c8 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example game-of-life-unsafe-textures --features=\"unsafe_textures\"<\/pre>\n<p>\u30e9\u30a4\u30d5\u30b2\u30fc\u30e0\u306e\u30b5\u30f3\u30d7\u30eb\u3067\u3059\u3002&#8211;featires=&#8221;unsafe_textures&#8221;\u306e\u6307\u5b9a\u304c\u5fc5\u8981\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-11870\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-5.jpeg\" alt=\"\" width=\"600\" height=\"522\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-5.jpeg 700w, https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-5-300x261.jpeg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>\u30de\u30a6\u30b9\u306e\u5de6\u30af\u30ea\u30c3\u30af\u3067\u30bb\u30eb\u3092\u8ffd\u52a0\u3002\u30b9\u30da\u30fc\u30b9\u30ad\u30fc\u62bc\u4e0b\u3067\u30b9\u30bf\u30fc\u30c8\u3001\u30b9\u30c8\u30c3\u30d7\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-11883\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-5-1.png\" alt=\"\" width=\"621\" height=\"540\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-5-1.png 700w, https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-5-1-300x261.png 300w\" sizes=\"auto, (max-width: 621px) 100vw, 621px\" \/><\/p>\n<p><strong><span class=\"notion-enable-hover\" data-token-index=\"0\">game-of-life<\/span><\/strong><!-- notionvc: b2fc8d51-2600-4500-868d-33ecd7e0e3f3 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example game-of-life<\/pre>\n<p>\u4e0a\u8a18\u540c\u69d8\u3001\u30e9\u30a4\u30d5\u30b2\u30fc\u30e0\u306e\u30b5\u30f3\u30d7\u30eb\u3067\u3059\u3002\u3053\u3061\u3089\u306f\u3001&#8211;featires=&#8221;unsafe_textures&#8221;\u306e\u6307\u5b9a\u306f\u4e0d\u5fc5\u8981\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u00a0<\/p>\n<p><strong>gfx-demo<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example gfx-demo --features=\"gfx\"<\/pre>\n<p>sdl::gfz\u306e\u30c7\u30e2\u3068\u306a\u308a\u307e\u3059\u3002&#8211;featires=&#8221;gfx&#8221;\u306e\u6307\u5b9a\u304c\u5fc5\u8981\u3002<\/p>\n<p>\u30de\u30a6\u30b9\u30af\u30ea\u30c3\u30af\u3067\u3001\u30e9\u30a4\u30f3\u304c\u30c9\u30ed\u30fc\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u30af\u30ea\u30c3\u30af\u3057\u305f\u5ea7\u6a19\u3082\u30ed\u30b0\u3067\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">mouse btn down at (206,421)\nmouse btn down at (489,212)\nmouse btn down at (352,163)\nmouse btn down at (701,96)\nmouse btn down at (650,427)<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-11871\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-6.jpeg\" alt=\"\" width=\"601\" height=\"488\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-6.jpeg 700w, https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-6-300x243.jpeg 300w\" sizes=\"auto, (max-width: 601px) 100vw, 601px\" \/><\/p>\n<p>\u00a0<\/p>\n<p><strong><span class=\"notion-enable-hover\" data-token-index=\"0\">haptic<\/span><\/strong><!-- notionvc: e089d802-9e97-4710-a756-a8f26f579adf --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example haptic<\/pre>\n<p>\u30cf\u30d7\u30c6\u30a3\u30c3\u30af\uff08\u89e6\u899a\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\uff09\u30c7\u30d0\u30a4\u30b9\u306e\u30c7\u30e2\u3002<\/p>\n<p>\u3053\u3061\u3089\u3082\u30b2\u30fc\u30e0\u30d1\u30c3\u30c9\u306e\u63a5\u7d9a\u304c\u5fc5\u8981\u3067\u3059\u304c\u3001PS4\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3060\u3068\u3001<\/p>\n<p>\u30cf\u30d7\u30c6\u30a3\u30c3\u30af\uff08\u89e6\u899a\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\uff09\u30c7\u30d0\u30a4\u30b9\u304c\u898b\u3064\u304b\u3089\u306a\u3044\u3002\u3068\u306e\u3053\u3068\u3067\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">\u00a0<\/pre>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">Success: opened \"PS4 Controller\"\nError: \"SDL error: Haptic: There are 0 haptic devices available\"<\/pre>\n<p>\u00a0<\/p>\n<p><strong><span class=\"notion-enable-hover\" data-token-index=\"0\">image-demo<\/span><\/strong><!-- notionvc: 2ee73b01-85c0-45bf-8cea-79365c05e9f1 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">cargo run --example image-demo --features=\"image\" [image path]<\/pre>\n<p>\u30a4\u30e1\u30fc\u30b8\u8868\u793a\u306e\u30c7\u30e2\u3067\u3059\u3002\u3053\u3061\u3089\u306f&#8211;featires=&#8221;image&#8221;\u306e\u6307\u5b9a\u3068\u3001\u8868\u793a\u3055\u305b\u305f\u3044\u30a4\u30e1\u30fc\u30b8\u306e\u30d1\u30b9\u304c\u5fc5\u8981\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-11872\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-7.jpeg\" alt=\"\" width=\"600\" height=\"487\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-7.jpeg 700w, https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-7-300x243.jpeg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>\u30b4\u30c3\u30d1\u30fc\u304f\u3093\u3092\u8868\u793a\u3055\u305b\u3066\u307f\u305f\u3068\u3053\u308d\u3067\u3059\u3002<\/p>\n<p>\u00a0<\/p>\n<p><strong><span class=\"notion-enable-hover\" data-token-index=\"0\">joystick<\/span><\/strong><!-- notionvc: 8a465f43-f0a7-4eff-994f-90ee38923bc1 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example joystick<\/pre>\n<p>\u3053\u3061\u3089\u3082\u5148\u306b\u30b2\u30fc\u30e0\u30d1\u30c3\u30c9\u306e\u63a5\u7d9a\u304c\u5fc5\u8981\u3067\u3001\u672a\u63a5\u7d9a\u3060\u3068\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>PS4\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092Bluetooth\u3067\u63a5\u7d9a\u3057\u3001\u64cd\u4f5c\u3057\u305f\u3068\u3053\u308d\u30ed\u30b0\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">1 joysticks available\nSuccess: opened \"PS4 Controller\"\n\"PS4 Controller\" power level: Unknown\nButton 12 down\nButton 12 up\nButton 1 down\nError setting rumble to (0, 65535): SdlError(\"That operation is not supported\")\nButton 1 up\nSet rumble to (0, 0)\nButton 13 down\nButton 13 up\nButton 3 down\nButton 3 up\nButton 0 down\nError setting rumble to (65535, 0): SdlError(\"That operation is not supported\")\nButton 0 up\nSet rumble to (0, 0)<\/pre>\n<p>\u00a0<\/p>\n<p><strong><span class=\"notion-enable-hover\" data-token-index=\"0\">keyboard-state<\/span><\/strong><!-- notionvc: 76bcf5c1-18b2-4f66-a2b1-bcf0188e791a --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example keyboard-state<\/pre>\n<p>\u3053\u3061\u3089\u306f\u3001\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u72b6\u614b\u3092\u51fa\u529b\u3059\u308b\u30c7\u30e2\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u64cd\u4f5c\u306b\u3088\u3063\u3066\u30ed\u30b0\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">new_keys: {Keycode(97)}\told_keys:{}\nnew_keys: {}\told_keys:{Keycode(97)}\nnew_keys: {Keycode(13)}\told_keys:{}\nnew_keys: {}\told_keys:{Keycode(13)}\nnew_keys: {Keycode(115)}\told_keys:{}\nnew_keys: {}\told_keys:{Keycode(115)}\nnew_keys: {Keycode(102), Keycode(100)}\told_keys:{}\nnew_keys: {Keycode(101)}\told_keys:{Keycode(102), Keycode(100)}\nnew_keys: {Keycode(119), Keycode(110)}\told_keys:{}\nnew_keys: {}\told_keys:{Keycode(101), Keycode(119)}\nnew_keys: {Keycode(105)}\told_keys:{}\nnew_keys: {}\told_keys:{Keycode(110)}\nnew_keys: {}\told_keys:{Keycode(105)}\nnew_keys: {Keycode(32)}\told_keys:{}\nnew_keys: {}\told_keys:{Keycode(32)}<\/pre>\n<p>\u00a0<\/p>\n<p><strong><span class=\"notion-enable-hover\" data-token-index=\"0\">message-box<\/span><\/strong><!-- notionvc: 321f5528-4b43-4a60-bbf4-e7153df1fc86 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example message-box<\/pre>\n<p>\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u9589\u3058\u308b\u969b\u306b\u30a2\u30e9\u30fc\u30c8\u30c0\u30a4\u30a2\u30ed\u30b0\u3092\u8868\u793a\u3059\u308b\u30c7\u30e2\u3067\u3059\u3002<\/p>\n<p>\u9078\u629e\u80a2\u306e\u30ed\u30b0\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">Ok(CustomButton(ButtonData { flags: RETURNKEY_DEFAULT, button_id: 1, text: \"Ok\" }))<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-11884\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-8-0.png\" alt=\"\" width=\"418\" height=\"294\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-8-0.png 700w, https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-8-0-300x211.png 300w\" sizes=\"auto, (max-width: 418px) 100vw, 418px\" \/><\/p>\n<p>\u6700\u5f8c\u306bOK\u304bNG\u304b\u3001\u307e\u305f\u306f\u30ad\u30e3\u30f3\u30bb\u30eb\u306e\u9078\u629e\u3059\u308b\u30dc\u30bf\u30f3\u304c\u8868\u793a\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-11873\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-8.jpeg\" alt=\"\" width=\"415\" height=\"437\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-8.jpeg 700w, https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-8-285x300.jpeg 285w\" sizes=\"auto, (max-width: 415px) 100vw, 415px\" \/><\/p>\n<p>\u00a0<\/p>\n<p><strong><span class=\"notion-enable-hover\" data-token-index=\"0\">mixer-demo<\/span><\/strong><!-- notionvc: 327a962e-5c7b-4456-9cb5-2a0ff4794606 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example mixer-demo --features=\"mixer\" [sound file path]<\/pre>\n<p>\u97f3\u6e90\u30d5\u30a1\u30a4\u30eb\u306e\u30df\u30ad\u30b7\u30f3\u30b0\u30c7\u30e2\u3067\u3059\u3002<\/p>\n<p>\u3053\u3061\u3089\u306f&#8211;featires=&#8221;mixer&#8221;\u306e\u6307\u5b9a\u3068\u3001\u97f3\u6e90\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u306e\u6307\u5b9a\u304c\u5fc5\u8981\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u30a2\u30bb\u30c3\u30c8\u3092\u6307\u5b9a\u3059\u308b\u5834\u5408\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example mixer-demo --features=\"mixer\" .\/assets\/sine.wav<\/pre>\n<p>\u30ed\u30b0\u306b\u305d\u308c\u305e\u308c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">linked version: 2.8.0\navailable chunk(sample) decoders: 7\n  decoder 0 =&gt; WAVE\n  decoder 1 =&gt; AIFF\n  decoder 2 =&gt; VOC\n  decoder 3 =&gt; FLAC\n  decoder 4 =&gt; MOD\n  decoder 5 =&gt; MP3\n  decoder 6 =&gt; OGG\navailable music decoders: 8\n  decoder 0 =&gt; CMD\n  decoder 1 =&gt; WAVE\n  decoder 2 =&gt; FLAC\n  decoder 3 =&gt; XMP\n  decoder 4 =&gt; MOD\n  decoder 5 =&gt; MPG123\n  decoder 6 =&gt; MP3\n  decoder 7 =&gt; OGG\nquery spec =&gt; Ok((44100, 32784, 2))\nmusic =&gt; &lt;Music&gt;\nmusic type =&gt; MusicWav\nmusic volume =&gt; 128\nplay =&gt; Ok(())\nchunk volume =&gt; 128\nplaying sound twice\nplay ends! from rust cb\nplayed sound\nfading out ... Ok(())<\/pre>\n<p>\u00a0<\/p>\n<p><strong>mouse-state<\/strong><!-- notionvc: a2f42ff8-2ecf-48be-846f-47c2a408c0da --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example mouse-state<\/pre>\n<p>\u30de\u30a6\u30b9\u304c\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u3068\u304d\u306e\u5ea7\u6a19\u3068\u3069\u306e\u30dc\u30bf\u30f3\u304c\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u304c\u30ed\u30b0\u3067\u51fa\u529b\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">X = 166, Y = 238 : {Left} -&gt; {}\nX = 166, Y = 238 : {} -&gt; {Left}\nX = 166, Y = 238 : {Right} -&gt; {}\nX = 166, Y = 238 : {} -&gt; {Right}\nX = 166, Y = 238 : {Left} -&gt; {}\nX = 166, Y = 238 : {} -&gt; {Left}\nX = 166, Y = 238 : {Left} -&gt; {}\nX = 358, Y = 310 : {} -&gt; {Left}\nX = 382, Y = 320 : {Left} -&gt; {}\nX = 149, Y = 388 : {} -&gt; {Left}\nX = 149, Y = 387 : {Left} -&gt; {}\nX = 151, Y = 396 : {} -&gt; {Left}\nX = 245, Y = 455 : {Left} -&gt; {}\nX = 305, Y = 414 : {} -&gt; {Left}\nX = 328, Y = 394 : {Left} -&gt; {}\nX = 331, Y = 335 : {} -&gt; {Left}\nX = 311, Y = 231 : {Left} -&gt; {}\nX = 310, Y = 229 : {} -&gt; {Left}<\/pre>\n<p>\u00a0<\/p>\n<p><strong><span class=\"notion-enable-hover\" data-token-index=\"0\">no-renderer<\/span><\/strong><!-- notionvc: a5cdbeec-c27a-4f0b-8155-0345c341c484 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example no-renderer<\/pre>\n<p>\u30ad\u30fc\u30dc\u30fc\u30c9\u30ad\u30fc\u62bc\u4e0b\u3067\u8272\u5909\u5316\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-11874\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-9.jpeg\" alt=\"\" width=\"600\" height=\"487\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-9.jpeg 700w, https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-9-300x243.jpeg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>\u00a0<\/p>\n<p><strong><span class=\"notion-enable-hover\" data-token-index=\"0\">relative-mouse-state<\/span><\/strong><!-- notionvc: 759678b5-3b12-454b-bafe-f8c6f807e794 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example relative-mouse-state<\/pre>\n<p>\u30de\u30a6\u30b9\u304c\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u3068\u304d\u306e\u76f8\u5bfe\u5ea7\u6a19\u304c\u30ed\u30b0\u3067\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">Relative - X = 163, Y = -34\nRelative - X = -58, Y = 6\nRelative - X = -17, Y = -109\nRelative - X = 229, Y = -109\nRelative - X = 0, Y = 0\nRelative - X = 300, Y = -72\nRelative - X = 0, Y = 0\nRelative - X = 2, Y = 3\nRelative - X = 7, Y = 18\nRelative - X = 10, Y = 49\nRelative - X = 0, Y = 16\nRelative - X = -38, Y = 164\nRelative - X = -36, Y = 112\nRelative - X = -474, Y = 66\nRelative - X = -46, Y = -297\nRelative - X = 4, Y = -114<\/pre>\n<p>\u00a0<\/p>\n<p><strong><span class=\"notion-enable-hover\" data-token-index=\"0\">renderer-target<\/span><\/strong><!-- notionvc: f11106d2-81ac-469f-af64-654260c502d3 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example renderer-target<\/pre>\n<p>\u3068\u3042\u308b\u70b9\u3092\u8d77\u70b9\u3068\u3057\u3001\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u306e\u30bf\u30fc\u30b2\u30c3\u30c8\u304c\u56de\u8ee2\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-11882\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-9-0.png\" alt=\"\" width=\"600\" height=\"487\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-9-0.png 700w, https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-9-0-300x243.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>\u00a0<\/p>\n<p><strong><span class=\"notion-enable-hover\" data-token-index=\"0\">renderer-texture<\/span><\/strong><!-- notionvc: 76915bb1-2fc4-431a-aec6-a107e1cdd75c --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example renderer-texture<\/pre>\n<p>\u30b0\u30e9\u30c7\u30fc\u30b7\u30e7\u30f3\u30ab\u30e9\u30fc\u306eRect\u304c2\u3064\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-11875\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-10.png\" alt=\"\" width=\"601\" height=\"488\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-10.png 700w, https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-10-300x243.png 300w\" sizes=\"auto, (max-width: 601px) 100vw, 601px\" \/><\/p>\n<p><strong><span class=\"notion-enable-hover\" data-token-index=\"0\">renderer-yuv<\/span><\/strong><!-- notionvc: 662c4a73-8a00-4b82-9a16-f0c16242fd84 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example renderer-yuv<\/pre>\n<p>\u5148\u7a0b\u3088\u308a\u9bae\u3084\u304b\u306a\u30b0\u30e9\u30c7\u30fc\u30b7\u30e7\u30f3\u30ab\u30e9\u30fc\u306eRect\u304c\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-11876\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-11.png\" alt=\"\" width=\"601\" height=\"488\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-11.png 700w, https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-11-300x243.png 300w\" sizes=\"auto, (max-width: 601px) 100vw, 601px\" \/><\/p>\n<p><strong><span class=\"notion-enable-hover\" data-token-index=\"0\">resource-manager<\/span><\/strong><!-- notionvc: 3a7d5b61-30ba-4f84-8e12-4d59450c49d6 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">cargo run --example resource-manager --features=\"ttf image\" [image path]  [font path]<\/pre>\n<p>\u30a4\u30e1\u30fc\u30b8\u3068\u30d5\u30a9\u30f3\u30c8\u3092\u30de\u30cd\u30fc\u30b8\u30e1\u30f3\u30c8\u3059\u308b\u30c7\u30e2\u3067\u3059\u3002<\/p>\n<p>\u3053\u3061\u3089\u306f\u3001&#8211;featires=&#8221;ttf image&#8221;\u306e\u6307\u5b9a\u3068\u3001image\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u3001\u30d5\u30a9\u30f3\u30c8\u30ea\u30bd\u30fc\u30b9\u306e\u30d1\u30b9\u304c\u5fc5\u8981\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-11866\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-1.jpeg\" alt=\"\" width=\"601\" height=\"488\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-1.jpeg 700w, https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-1-300x243.jpeg 300w\" sizes=\"auto, (max-width: 601px) 100vw, 601px\" \/><\/p>\n<p>\u30b4\u30c3\u30d1\u30fc\u304f\u3093\u3092\u8868\u793a\u3057\u3066\u307f\u305f\u5f62\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u00a0<\/p>\n<p><strong><span class=\"notion-enable-hover\" data-token-index=\"0\">sensors<\/span><\/strong><!-- notionvc: 922b5189-8c8f-447d-b2f7-beb616bb6630 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example sensors<\/pre>\n<p>\u3053\u3061\u3089\u306f\u305d\u306e\u307e\u307e\u3060\u3068\u30a8\u30e9\u30fc\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">error[E0004]: non-exhaustive patterns: `SDL_SensorType::SDL_SENSOR_ACCEL_L`, `SDL_SensorType::SDL_SENSOR_GYRO_L`, `SDL_SensorType::SDL_SENSOR_ACCEL_R` and 1 more not covered<\/pre>\n<p>\u00a0<\/p>\n<p><strong><span class=\"notion-enable-hover\" data-token-index=\"0\">ttf-demo<\/span><\/strong><!-- notionvc: ed737bc5-0058-4c51-9a79-a3b6b571fb40 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example ttf-demo --features=\"ttf\" [font path]<\/pre>\n<p>\u30d5\u30a9\u30f3\u30c8\u30ea\u30bd\u30fc\u30b9\u306e\u6307\u5b9a\u306e\u30c7\u30e2\u3067\u3059\u3002<\/p>\n<p>\u3053\u3061\u3089\u306f\u3001&#8211;featires=&#8221;ttf&#8221;\u306e\u6307\u5b9a\u3068\u30d5\u30a9\u30f3\u30c8\u30ea\u30bd\u30fc\u30b9\u306e\u30d1\u30b9\u304c\u5fc5\u8981\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u6307\u5b9a\u3057\u305f\u30d5\u30a9\u30f3\u30c8\u3067\u3001\u300cHello Rust\u300d\u306e\u6587\u5b57\u5217\u304c\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-11877\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-12.png\" alt=\"\" width=\"599\" height=\"486\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-12.png 700w, https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-12-300x243.png 300w\" sizes=\"auto, (max-width: 599px) 100vw, 599px\" \/><\/p>\n<p><strong><span class=\"notion-enable-hover\" data-token-index=\"0\">window-properties<\/span><\/strong><!-- notionvc: 8f312a83-6ccd-47c9-91e2-5ae017648732 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">cargo run --example window-properties<\/pre>\n<p>\u30a6\u30a3\u30f3\u30c9\u30a6\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u30c7\u30e2\u3067\u3059\u3002<\/p>\n<p>\u30a6\u30a3\u30f3\u30c9\u30a6\u30bf\u30a4\u30c8\u30eb\u306e\u3068\u3053\u308d\u304c\u30ab\u30a6\u30f3\u30c8\u30a2\u30c3\u30d7\u3055\u308c\u3066\u3044\u308b\u306e\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-11878\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-13.png\" alt=\"\" width=\"600\" height=\"487\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-13.png 700w, https:\/\/www.webcyou.com\/wp-content\/uploads\/2024\/09\/sdl-rust-13-300x243.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306fRust-SDL2 examples\u3092\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>Rust\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u304a\u3044\u3066\u3001\u300cexamples\u300d\u306a\u3069\u306e\u4ed5\u7d44\u307f\u306f\u4fbf\u5229\u306a\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u30af\u30ec\u30fc\u30c8\u3092\u958b\u767a\u3059\u308b\u969b\u306a\u3069\u306f\u300cexamples\u300d\u3082\u7528\u610f\u3057\u3066\u304a\u304f\u3068\u5229\u7528\u8005\u5074\u3082\u52a9\u304b\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u306e\u3067\u3001\u7a4d\u6975\u7684\u306b\u7528\u610f\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\u3041\u307e\u305f\u307e\u305f\u3041\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3069\u3082\u3067\u3059\u3002 \u307e\u305f\u307e\u305f\u3001\u4e45\u3057\u3076\u308a\u611f\u3002 \u4eca\u56de\u306fRust\u306eSDL2\u30d1\u30c3\u30b1\u30fc\u30b8\u3067\u3042\u308bRust-SDL2\u306eexamples\u3092\u3059\u3079\u3066\u8a66\u3057\u3066\u898b\u305f\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u305d\u306e\u30b3\u30de\u30f3\u30c9\u3068\u69d8\u5b50\u306e\u4e00\u89a7\u306b\u306a\u308a\u307e\u3059\u3002 \u305d\u306e\u524d\u306b\u3001Rust\u306ecargo\u3067\u7528\u610f\u3055 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":11689,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[299],"tags":[327,350,338,178,78,114,118],"class_list":["post-11865","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-rust","tag-rust","tag-sdl2","tag-338","tag-178","tag-78","tag-114","tag-118"],"_links":{"self":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/11865","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11865"}],"version-history":[{"count":8,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/11865\/revisions"}],"predecessor-version":[{"id":11890,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/11865\/revisions\/11890"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/media\/11689"}],"wp:attachment":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11865"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11865"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11865"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}