目前分類:DirectX 10 (7)

瀏覽方式: 標題列表 簡短摘要

DXUT is a layer that is built on top of Direct3D to help make samples, prototypes, tools, and professional games more robust and easier to build. It simplifies Windows and Direct3D APIs, based on typical usage.

它簡化了建立視窗、建立 Direct3D device、處理 windows messages 的程序,使我們可以更輕易的寫程式。

Genius 發表在 痞客邦 留言(1) 人氣()

CALLBACK function 本質上是實作給系統呼叫用的。一般 windows 應用程式都會實作多個 callback function,每個都對應到不同的 events。當事件發生時,系統會通知應用程式呼叫對應的 callback function。callback function 通常會有自己的參數列,提供系統傳關於 event 細部的參數或資訊。最常見的 callback function 例子就是 windows procedure。這個函式被系統用來把視窗的訊息傳遞給應用程式。DirectX 會依需求去實作不同的 callback function。

 

Genius 發表在 痞客邦 留言(0) 人氣()

知道如何創造windows display後,接下來就要設定Direct3D 11 device

要新增兩個東西:device & swap chain

Genius 發表在 痞客邦 留言(0) 人氣()

Creates a device that represents the display adapter and a swap chain used for rendering.

Syntax

HRESULT D3D11CreateDeviceAndSwapChain( 
__in IDXGIAdapter *pAdapter, 
__in D3D_DRIVER_TYPE DriverType, 
__in HMODULE Software, 
__in UINT Flags, 
__in const D3D_FEATURE_LEVEL *pFeatureLevels, 
__in UINT FeatureLevels, 
__in UINT SDKVersion, 
__in const DXGI_SWAP_CHAIN_DESC *pSwapChainDesc, 
__out IDXGISwapChain **ppSwapChain, 
__out ID3D11Device **ppDevice, 
__out D3D_FEATURE_LEVEL *pFeatureLevel, 
__out ID3D11DeviceContext **ppImmediateContext 
);

Genius 發表在 痞客邦 留言(0) 人氣()

Direct3D 11 Return Codes

the following table contains return codes from API functions.

Genius 發表在 痞客邦 留言(0) 人氣()

DirectX 應用程式所使用的專案類型為 Win32 Application 專案

還必須指定 DirectX 標頭檔 & 函式庫檔案所在的目錄路徑

Genius 發表在 痞客邦 留言(0) 人氣()

學DirectX前,先學學如何寫windows 視窗程式吧!

純以 Win32 API 製作出如上圖般的視窗,要作出一個簡單的視窗,共分六個步驟:

Genius 發表在 痞客邦 留言(0) 人氣()