๋ฐ˜์‘ํ˜•

DirectX์™€ GDI์˜ ์ฐจ์ด์ 

SharpDX๋ฅผ ์„ค๋ช…ํ•˜๊ธฐ ์ „์—, DirectX๊ฐ€ ๋ฌด์—‡์ธ์ง€ ๊ทธ๋ฆฌ๊ณ  GDI์™€ ๋ฌด์Šจ ์ฐจ์ด๊ฐ€ ์žˆ๋Š”์ง€๋ถ€ํ„ฐ ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

์šฐ๋ฆฌ๊ฐ€ ํ”ํžˆ ์•Œ๊ณ  ์žˆ๋Š” GDI(Graphics Device Interface)๋Š” ์œˆ๋„์šฐ ์šด์˜ ์ฒด์ œ์˜ ๊ทธ๋ž˜ํ”ฝ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋กœ, ๋„ํ˜•(์ง์„ , ์‚ฌ๊ฐํ˜•, ์›ํ˜• ๋“ฑ) ๋˜๋Š” ๋ฌธ์ž์—ด, ์ด๋ฏธ์ง€ ๋“ฑ์„ ๊ทธ๋ฆด ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์ด๋ณด๋‹ค ๋” ์ง„๋ณด๋œ ๊ธฐ์ˆ ์ด GDI+์ด๋ฉฐ, GDI๋ณด๋‹ค ๋” ๋‹ค์–‘ํ•œ ๊ทธ๋ž˜ํ”ฝ ๋ Œ๋”๋ง ๊ธฐ๋Šฅ์„ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค. ์ฃผ์š” ํŠน์ง•์œผ๋กœ, GDI๋Š” CPU์—์„œ ์ˆ˜ํ–‰๋˜๋‹ค ๋ณด๋‹ˆ ํ•˜๋“œ์›จ์–ด ๊ฐ€์†์„ ์ง€์›ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

DirectX๋Š” ๊ฒŒ์ž„, ๋ฉ€ํ‹ฐ๋ฏธ๋””์–ด ๋ฐ ๊ทธ๋ž˜ํ”ฝ ์‘์šฉ ํ”„๋กœ๊ทธ๋žจ์—์„œ ์‚ฌ์šฉ๋˜๋Š” ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์ž…๋‹ˆ๋‹ค. ๊ธฐ๋ณธ์ ์ธ ์ž…๋ ฅ ์žฅ์น˜(ํ‚ค๋ณด๋“œ, ๋งˆ์šฐ์Šค ๋“ฑ)์™€ ์‚ฌ์šด๋“œ ์ถœ๋ ฅ, 2์ฐจ์›๋ฟ๋งŒ ์•„๋‹ˆ๋ผ 3์ฐจ์› ๋ Œ๋”๋ง ๊ธฐ๋Šฅ๋„ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค. ๋˜ํ•œ GDI์™€ ๋‹ค๋ฅด๊ฒŒ ํ•˜๋“œ์›จ์–ด ๊ฐ€์†์„ ์ง€์›ํ•˜์—ฌ ๋†’์€ ํ’ˆ์งˆ์˜ ๊ทธ๋ž˜ํ”ฝ ๋ Œ๋”๋ง์ด ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.

๋‘ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์˜ ๊ณ„์ธต์ ์ธ ์ฐจ์ด๋ฅผ ๋ณด๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

GDI์™€-DirectX-๊ณ„์ธต
GDI์™€ DirectX ๊ณ„์ธต

GDI๋Š” ์ปค๋„ ๋ชจ๋“œ์—์„œ, DirectX๋Š” ์‚ฌ์šฉ์ž ๋ชจ๋“œ์—์„œ ์‹คํ–‰๋ฉ๋‹ˆ๋‹ค. ์ผ๋ฐ˜์ ์œผ๋กœ ์ปค๋„ ๋ชจ๋“œ์—์„œ ์‹คํ–‰๋˜๋Š” ์ฝ”๋“œ๊ฐ€ ํ•˜๋“œ์›จ์–ด์™€ ์ง์ ‘์ ์œผ๋กœ ์ƒํ˜ธ์ž‘์šฉํ•˜์—ฌ ์‚ฌ์šฉ์ž ๋ชจ๋“œ๋ณด๋‹ค ๋” ๋น ๋ฅด๊ฒŒ ์‹คํ–‰๋ฉ๋‹ˆ๋‹ค. ๋‹จ์ˆœํžˆ ์ด๋ฏธ์ง€ ์ž์ฒด๋งŒ ๋ Œ๋”๋ง ํ•œ๋‹ค๋ฉด GDI๊ฐ€ ๋” ๋น ๋ฅผ ์ˆ˜ ์žˆ์ง€๋งŒ, ํŠน์ˆ˜ํ•œ ์กฐ๊ฑด(์ข€ ๋” ๋ณต์žกํ•œ ๊ทธ๋ž˜ํ”ฝ ์ฒ˜๋ฆฌ)์—์„œ๋Š” DirectX์˜ ์„ฑ๋Šฅ์ด ๋†’์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ, ์–ด๋–ค ๋ชฉ์ ์œผ๋กœ ๊ทธ๋ž˜ํ”ฝ์„ ์ฒ˜๋ฆฌํ•  ๊ฒƒ์ธ๊ฐ€์— ๋”ฐ๋ผ ์ ์ ˆํ•œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์„ ํƒํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

DirectX ๊ตฌ์„ฑ ์š”์†Œ

DirectX๊ฐ€ ์—ฌ๋Ÿฌ ๋ถ„์•ผ๋กœ ์ง€์›ํ•˜๋‹ค ๋ณด๋‹ˆ, DirectX์—๋Š” ๋‹ค์–‘ํ•œ ๊ตฌ์„ฑ ์š”์†Œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ทธ์ค‘ ๋Œ€ํ‘œ์ ์ธ ๊ฒƒ ๋ช‡ ๊ฐœ๋งŒ ๋‚˜์—ดํ•˜๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

  • Direct2D: 2D ๊ทธ๋ž˜ํ”ฝ์„ ์œ„ํ•œ API(๊ธฐ์กด GDI/GDI+ ๋Œ€์ฒด)
  • Direct3D: 3D ๊ทธ๋ž˜ํ”ฝ์„ ์œ„ํ•œ API
  • DirectWrite: ํ…์ŠคํŠธ ๋ Œ๋”๋ง์„ ์œ„ํ•œ API

SharpDX๋ž€?

์ด์ œ ๋ณธ๋ก ์œผ๋กœ ์™”์Šต๋‹ˆ๋‹ค. SharpDX๋ž€, DirectX API๋ฅผ .Net์— ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋„๋ก ๋ž˜ํ•‘ ๋œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์ž…๋‹ˆ๋‹ค. ์ฆ‰, C#์—์„œ DirectX๋ฅผ ์‰ฝ๊ฒŒ ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ผ๊ณ  ์ดํ•ดํ•˜๋ฉด ๋˜๊ฒ ์Šต๋‹ˆ๋‹ค.

http://sharpdx.org/

 

Home | SharpDX

SharpDX is an open-source managed .NET wrapper of the DirectX API. NOTE: As of 29 Mar 2019, SharpDX is no longer being under development or maintenance SharpDX has been around for almost 9 years, the project is relatively stable and has been used by many p

sharpdx.org

SharpDX์—์„œ ์ œ๊ณตํ•˜๋Š” API ์ข…๋ฅ˜๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

  • 3D ๊ทธ๋ž˜ํ”ฝ: Direct3D9+, Direct3D11+, Direct3D12+
  • 2D ๊ทธ๋ž˜ํ”ฝ: Direct2D1+, DirectWrite+, WIC
  • ๊ทธ๋ž˜ํ”ฝ ์ฝ”์–ด: DXGI+, MediaFoundation, DirectComposition, DirectManipulation, Animation
  • ์‚ฌ์šด๋“œ: DirectSound, XAudio, X3DAudio
  • ์ž…๋ ฅ: DirectInput, RawInput, XInput

์ฐธ๊ณ ๋กœ, SharpDX๋Š” 2019๋…„ 3์›” 29์ผ๋ถ€๋กœ ๋” ์ด์ƒ ๊ฐœ๋ฐœ ๋ฐ ์œ ์ง€ ๊ด€๋ฆฌ๊ฐ€ ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ๊ธฐ์ˆ  ๋ฆฌ๋”์™€ ์ปค๋ฎค๋‹ˆํ‹ฐ ์ฐธ์—ฌ๊ฐ€ ๋ถ€์กฑํ•˜์—ฌ ๋” ์ด์ƒ ๊ฐœ๋ฐœ๋˜์ง€ ์•Š๋Š”๋‹ค๊ณ  ํ•˜๋Š”๊ตฐ์š”. ํ•˜์ง€๋งŒ NuGet์—์„œ๋Š” ๋‹ค์šด๋กœ๋“œ๊ฐ€ ๊ฐ€๋Šฅํ•˜๋ฉฐ, ์—ฌ์ „ํžˆ ์‚ฌ์šฉํ•˜๋Š” ๋ฐ์—๋Š” ๋ฌธ์ œ๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค. ๋งŒ์•ฝ, ์ตœ์‹  ๋ฒ„์ „์˜ DirectX๋ฅผ .Net์—์„œ ์‚ฌ์šฉํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด ์ง์ ‘ ๋ž˜ํ•‘ํ•˜์—ฌ ์‚ฌ์šฉํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

๋‹ค์Œ ํฌ์ŠคํŒ…์—์„œ๋Š” .Net WinForm ํ”„๋กœ์ ํŠธ์—์„œ SharpDX๋ฅผ ์–ด๋–ป๊ฒŒ ์‚ฌ์šฉํ•˜๋Š”์ง€, ๊ทธ๋ฆฌ๊ณ  GDI+์™€ ๋น„๊ตํ•˜์—ฌ ์–ผ๋งˆ๋‚˜ ์„ฑ๋Šฅ ์ฐจ์ด๊ฐ€ ๋‚˜๋Š”์ง€ ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

๋ฐ˜์‘ํ˜•

'Programming > DirectX' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

[DirectX] .Net WinForm์—์„œ GDI+์™€ SharpDX ์‚ฌ์šฉํ•˜๊ธฐ (์˜ˆ์ œ ํฌํ•จ)  (1) 2023.06.10