For faster navigation, this Iframe is preloading the Wikiwand page for ไดเรกต์เอกซ์.

ไดเรกต์เอกซ์

บทความนี้ไม่มีการอ้างอิงจากแหล่งที่มาใด กรุณาช่วยปรับปรุงบทความนี้ โดยเพิ่มการอ้างอิงแหล่งที่มาที่น่าเชื่อถือ เนื้อความที่ไม่มีแหล่งที่มาอาจถูกคัดค้านหรือลบออก (เรียนรู้ว่าจะนำสารแม่แบบนี้ออกได้อย่างไรและเมื่อไร)

ไดเรกต์เอกซ์ (DirectX) เป็นไลบรารีที่ช่วยอำนวยความสะดวกให้กับนักเขียนโปรแกรม เพื่อส่งคำสั่งควบคุมการวาดภาพไปยังอุปกรณ์ฮาร์ดแวร์ประมวลผลภาพ ซึ่งได้ถูกใช้อย่างแพร่หลายในการพัฒนาวิดีโอเกมและเกมคอมพิวเตอร์สำหรับไมโครซอฟท์ วินโดวส์ เอกซ์บอกซ์ และ เอกซ์บอกซ์ 360

ส่วนประกอบ

[แก้]

โดยทั่วไปแล้ว ไดเรกต์เอกซ์ ประกอบด้วยส่วนย่อย 5 ส่วน (อาจไม่เหมือนกันเปลี่ยนแปลงไปตามแต่ละเวอร์ชัน) คือ

  • DirectDraw (DDraw) ส่วนสำหรับการวาดภาพ 2 มิติ
  • Direct3D (D3D) ส่วนสำหรับการวาดภาพแบบ 3 มิติ แบ่งเป็น 2 ประเภทคือ
    • Direct3DRM (Retained Mode) (D3DRM) ส่วนการวาดภาพ 3 มิติ อย่างง่าย
    • Direct3DIM (Immediate Mode) (D3DIM) ส่วนการวาดภาพ 3 มิติ อย่างยาก
  • DirectInput (DXInput) ส่วนสำหรับการรับข้อมูลจากผู้ใช้ เช่น keyboard mouse และ joystick
  • DirectSound (DXSound) ส่วนสำหรับการประมวลผลเสียง และสร้างเสียง
  • DirectPlay (DXPlay) ส่วนสำหรับการทำงานสำหรับผู้เล่นหลายคนผ่านระบบเครือข่าย

ตัวอย่าง

[แก้]

สร้างสามเหลี่ยมที่มี สีแดง เขียว และ น้ำเงิน

// Render a triangle
D3DTLVERTEX v[3];
v[0] = D3DTLVERTEX (D3DVECTOR (160, 50,0) ,1,D3DRGB (1,0,0) ,D3DRGB (0,0,0) ,0,0) ;
v[1] = D3DTLVERTEX (D3DVECTOR (240,200,0) ,1,D3DRGB (0,1,0) ,D3DRGB (0,0,0) ,0,0) ;
v[2] = D3DTLVERTEX (D3DVECTOR ( 80,200,0) ,1,D3DRGB (0,0,1) ,D3DRGB (0,0,0) ,0,0) ;

D3DDevice->BeginScene () ; 
D3DDevice->DrawPrimitive (D3DPT_TRIANGLELIST, D3DVT_TLVERTEX, &v, 3, NULL) ; 
D3DDevice->EndScene () ;

ไดเรกต์เอกซ์ได้พัฒนามาจนถึง DirectX 10 ซึ่งสามารถใช้งานได้เฉพาะใน วินโดวส์วิสตา รองรับเฉพาะการ์ดจอรุ่นใหม่และสเปคเครื่องระดับสูง ไมโครซอฟยังมีการตรวจสอบลิขสิทธิ์ ให้ดาวน์โหลดได้เฉพาะผู้ใช้ซอฟต์แวร์ลิขสิทธิ์อีกด้วย

DirectX 11

[แก้]

ไดเรกต์เอกซ์ได้เปิดตัว DirectX 11 ซึ่งสามารถใช้งานได้ใน วินโดวส์ 7 ขึ้นไป โดยรองรับการ์ดจอรุ่นใหม่และสเปคเครื่องระดับสูง ไมโครซอฟยังมีการตรวจสอบลิขสิทธิ์ ให้ดาวน์โหลดได้เฉพาะผู้ใช้ซอฟต์แวร์ลิขสิทธิ์อีกด้วย

DirectX 12

[แก้]

ต่อมาในวันที่ 20 มีนาคม 2557 ในงาน GDC 2015 ก็ได้เปิดตัว DirectX 12 โดยเป้าหมายของ DirectX 12 คือ ลดการใช้ทรัพยากรที่ไม่จำเป็น , รีดประสิทธิภาพให้ดีขึ้น (ดีกว่า DirectX 11 ถึงสูงสุด 70%) โดยเริ่มใช้ใน วินโดวส์ 10

ส่วนการ์ดจอที่รองรับ DirectX 12 คือ

- NVIDIA ที่ใช้ชิพสถาปัตยกรรม Fermi , Kepler , Maxwell หรือใหม่กว่านี้

- Intel HD Graphic ที่มาพร้อมกับซีพียู Intel 4th Gen

- AMD ที่ใช้ชิพสถาปัตยกรรม GCN (ตั้งแต่ Radeon HD 7000 เป็นต้นไป)

Project Alky

[แก้]

โปรเจกต์แอลกี้ได้เริ่มขึ้นเมื่อไมโครซอฟเปิดตัว DirectX 10 เพื่อแก้ไขให้ DirectX 10 สามารถใช้ได้กับ วินโดวส์เอกซ์พี, ลินุกซ์ และเครื่องสเปคต่ำ โดยตัวโปรเจกต์เป็นฟรีแวร์ โปรเจกต์แอลกี้พัฒนาโดย Cody Brocious อายุ 19 ปี

ดูเพิ่ม

[แก้]

แหล่งข้อมูลอื่น

[แก้]
{{bottomLinkPreText}} {{bottomLinkText}}
ไดเรกต์เอกซ์
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?