Multimedia Seminar DirectX – use und concepts
2 structure development / definition parts of DirectX versions concepts perspective
3 review – MS DOS Application had exclusive access to the hardware Programming in consideration of different hardware configurations required
4 review - Windows 95 multitasking ressources had to be shared poor performance in MM applications
5 definition what is DirectX as direct as possible as fast as possible as decent as possible
6 alternatives OpenGL 3dfx Glide
7 structure development / definition parts of DirectX versions concepts perspective
8 DirectX Components DirectGraphics DirectAudio DirectVideo DirectPlay DirectInput DirectShow
9 structure development / definition parts of DirectX versions concepts perspective
10 versions development course of the versions important features
11 DirectX 1 published 1995 with Win95 DirectDraw, DirectInput, DirectSound, DirectPlay no support for 3D Graphics yet
12 DirectX 2 published 1996 introduction of Direct3D creation of simple vector graphics
13 DirectX 3 DirectSound-3D extension for DirectSound support for Intels MMX extensions
14 DirectX 5 many new extensions -> skipped V4 force Feedback input devices hardwaresupport for 3D Audio introduction DirectX Media 3D API updated
15 DirectX 6 further 3D extensions (effects, texture compression, …) integration 3Dnow updated MMX support introduction of DirectMusic API
16 DirectX 7 further 3D API updates (Vertex Blending, Cubic Environment Mapping, …) MS Visual Basic Interface
17 DirectX 8 3D API extensions (point sprites to design rain or snow, …) support for Vertex Shader D3D & DirectDraw -> DirectGraphics, DirectSound & DirectMusic -> DirectAudio
18 DirectX 9 (actual version) HLSL performance enhancements in Vertex- and Pixelshader more exact calculations in D3D API interface to Visual Studio.NET development environment
19 DxDiag test DirectX functions display system hardware
20 Shader Definitions: Shader Pixel Vertex
21 Vertex Shader geometric calculations no creation but transformation used before Pixel Shader possible parameter passing
22 Pixel Shader adressing of textures color and transparency calculation using parameters passed by the Vertex Shader for calculations SIMD
23 Shader programming pre-DirectX9 Complex visual effects had to be implemented in assembler DP3 R0, c[11].xyzx, c[11].xyzx RSQ R0, R0.x MUL R0, R0.x, c[11].xyzx MOV R1, c[3] MUL R1, R1.x, c[0].xyzx DP3 R2, R1.xyzx, R1.xyzx RSQ R2, R2.x MUL R1, R2.x, R1.xyzx ADD R2, R0.xyzx, R1.xyzx DP3 R3, R2.xyzx, R2.xyzx RSQ R3, R3.x MUL R2, R3.x, R2.xyzx DP3 R2, R1.xyzx, R2.xyzx MAX R2, c[3].z, R2.x MOV R2.z, c[3].y MOV R2.w, c[3].y LIT R2, R2
24 Shader programming DirectX 9 HLSL / Cg differences concept of HLSL/Cg (profiles) benefits
25 Shader programming in HLSL / Cg using known C/C++ constructs float4 cSpec = pow(max(0, dot(Nf, H)), phongExp).xxx; float4 cPlastic = Cd * (cAmbi + cDiff) + Cs * cSpec;
26 examples for effects Environment Bump Mapping
27 Anisotropic BRDF shading
28 fisheye lenseeffect
29 procedural deformation
30 phong shading
31 Structure of the DirectX APIs DirectX Media DirectX Foundation
32 structure development / definition parts of DirectX versions concepts perspective
33 Direct X - concepts HAL and HEL „Pseudo Einprozess System“ filter concept
34 HAL und HEL concept for programming without knowledge of the hardware
35 „Pseudo“ single process system more effective hardware usage by exclusive access release of control over hardware in case of request by other components already used by MS Game SDK, Vorgänger of DirectX
36 filter concept in detail used for processing streams, for example in DirectShow uses module architecture for stream processing -> flexible usage modules presented by filter filter types: source~, transform~, rendering~, effect~, splitter~.
37 FilterGraph GraphEdit
38 supported development environments Visual C and C++ Borland C++ MS Visual Basic Borland Delphi Smalltalk MT Java
39 DirectX Programming DirectX SDK as free download available, which contains the programming interfaces programming based on Component Object Model
40 COM client-server architecture used to import (make available) classes reusability many DirectX SDK functions can be reached by COM
41 COM server provides exportable classes (COM objects) COM objects contain the code and are defined by the COM interface 3 different server types:In-Process- Server, Local Server, Remote Server
42 COM – in process server COM object implemented in DLL file fast access every process using a COM object has to load it in the memory -> high memory usage
43 COM - local server executable Windows programs which implement the COM-Objects Start of these programs in case of request of an implemented object communication via RPC-protocol (remote procedure call) -> slow once loaded, a local server can provide several clients -> low memory usage
44 COM - remote server used if server and client are connected by a network uses DCOM (distributed COM) also using RPC -> slow access insecure RPC implementation in DCOM made W32.Blaster attack possible
45 COM client uses functions of the COM server knows the possible functions, declared in the interface conversation between server and client is done by the marshaler (which can e.g. convert data types)
46 COM interface represents a pointer referencing functions of the COM object each Interface has a unique ID (GUID – global unique identifier) has to be implemented in a specific IDL (Interface Definition Language) COM objects live as long as there exist references to their interface
47 structure development / definition parts of DirectX versions concepts perspective
48 perspective – DirectX Next release expected 2005 together with Longhorn unified shaders PPP - Programmable Primitive Processor Framebuffer access by shader virtual memory management integer instruction set
49 Questions ? ? ? ? ? ?
50 The end Thanks for your attention