차세대 그래픽 개발 환경.NET & DirectX 강성재 Community Specialist Microsoft Corporation
Agenda DirectX 9.0 살펴보기 DirectX 9.0 살펴보기.NET 과 DirectX 9 Managed Programming.NET 과 DirectX 9 Managed Programming
DirectX 9.0 살펴보기 Foundation Layer Foundation Layer DirectGraphics DirectInput DirectSound DirectPlay DirectMusic Media Layer Media Layer DirectShow
Windows Graphics Stack D3D Rendering DXG Infrastructure D3DX Application Driver Hardware Gameplay Shader Compiler, shader mgt routines Software emulation, hw transport Execution Command translation, buffering Resource Mgt, OS
DirectX ® High Level Shader Language (HLSL) Design Baseline Design Baseline Preprocessor Preprocessor Types Types Variables Variables User Functions User Functions Some Intrinsic functions Some Intrinsic functions
Design Baseline ‘ C ’ -like syntax ‘ C ’ -like syntax A standard language A standard language like C++ or C# ™ or HTML in Visual Studio ®.NET
Preprocessor #define #define #elif #elif #else #else #endif #endif #error #error Preprocessor present in all file formats ASM, HLSL, Effect
Types Basic types Basic types float int bool double half Structs and arrays supported Structs and arrays supported
Variables Local / global Local / global Static Static Const Const
User Functions Standard ‘ C ’ -like functions Standard ‘ C ’ -like functions Output type and input parameters Output type and input parameters Parameters are passed by copy in/copy out mechanism Parameters are passed by copy in/copy out mechanism in/out declaration Inlined internally Inlined internally NO recursion
Some Intrinsic functions
DirectX 8 Vertex Declaration v0skipv1 Strm0Strm1 Declaration Vertex layout vs 1.1 mov r0, v0 … Shader program Shader handle
posnormdiff Strm0Strm1 posnormdiff Strm0 Declaration Vertex layout vs 1.1 dcl_position v0 dcl_diffuse v1 mov r0, v0 … Shader program (Shader handle) New Vertex Declaration vs 1.1 dcl_position v0 dcl_diffuse v1 mov r0, v0 …
.NET 과 DirectX 9 Managed Programming What is Managed DirectX? What is Managed DirectX? Managed DirectX Namespace Managed DirectX Namespace
What is Managed DirectX? A thin wrapping of DirectX to provide support to CLS Compliant Languages (i.e. C#) A thin wrapping of DirectX to provide support to CLS Compliant Languages (i.e. C#) Eliminates using COM interop or the DXVB library Eliminates using COM interop or the DXVB library Removes performance cost of COM interop Using the DXVB library was unsupported
What is Managed DirectX? Features supported in Managed DirectX Features supported in Managed DirectX Graphics Feature parity with Direct3D, D3DX DirectDraw ® (DirectX 7 level interfaces) Audio Feature parity with DirectSound ® Input Feature parity with DirectInput ® Networking Feature parity with DirectPlay ® Video Simple audio/video playback functionality Diagnostics Easily access data provided by DxDiag
What is Managed DirectX? Principle Namespaces Principle Namespaces Microsoft.DirectX Microsoft.DirectX.Direct3D Microsoft.DirectX.DirectPlay Microsoft.DirectX.DirectDraw Microsoft.DirectX.DirectSound Microsoft.DirectX.DirectMusic Microsoft.DirectX.DirectInput Microsoft.DirectX.AudioVideoPlayback Microsoft.DirectX.Diagnostics
demo demo
Design DX10 차세대 하드웨어 적용 차세대 하드웨어 적용 새로운 Shader models Refactoring APIs 와 DDIs Refactoring APIs 와 DDIs 관리형 GPU 와 CPU 관리형 GPU 와 CPU
5-Year Plan 2002 DX DX DX DX DX9+, DX10 in Longhorn 2004 DX9+, DX10 in Longhorn New shader models Introduce GPU management 2005 안정된 DX 안정된 DX10 Begin technology transfers to VStudio team (compilers, tools) Core OS team (GPU management) 2006 Blackcomb 2006 Blackcomb
Q & A ?
© 2002 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.