Short Courses on Computer Graphics, Image Processing and Computer Vision
Let me know what you think Mail me...

Course 3D_MDX: 3D-Graphics with Managed DirectX 9.0

Copyright © by V. Miszalok, last update: 2011-03-13

  Visitors since 01-01-2002
deutsch english
Entwicklungsumgebung und Graphikkarten-Treiber
Installieren Sie das DirectX 9.0 Software Development Kit
DirectX 9.0 SDK Dokumentation für Visual Studio
Buchempfehlung
Empfehlung: Weitere Tutorials
Animierte Dreiecke
Zylinder mit gerichtetem Licht
Zylinder mit Textur
Standard Meshes = Primitive
Ein Mesh aus File.x lesen
Mesh Viewer
Fähigkeiten der Graphikkarte
Development Environment and Graphics Driver
Download the DirectX 9.0 Software Development Kit
DirectX 9.0 SDK Documentation for Visual Studio
Recommended: The books from Miller and Weller/Lobao/Hatton
Recommended: Further Tutorials
Moving Triangles
Cylinder with Directional Light
Cylinder with Texture
Standard Meshes = Primitives
Read a Mesh from File.x
Mesh Viewer
Graphics Card Properties

Entwicklungsumgebung und Graphikkarten-Treiber

Betriebssystem 1. Wahl: Windows 7.
Entwicklungsumgebung 1. Wahl: Visual C# 2010 Express.
Entwicklungsumgebung 2. Wahl: Visual Studio 2010 Professional.
Entwicklungsumgebung 3. Wahl: Visual Studio 2008 plus Service Pack 1.

- Starten Sie das DirectX-Diagnoseprogramm C:\Windows\System32\dxdiag.exe (oder wo dxdiag.exe sich auch immer auf Ihrer Festplatte sich verbergen mag).
- Auf der dxdiag-Anzeige-Karteikarte stehen Hersteller und Typ Ihrer Graphikkarte.
- Suchen Sie im Internet den Hersteller und laden Sie den neuesten Treiber für Ihre Karte und installieren Sie diesen.
- Testen Sie den Erfolg mit dxdiag.exe.

Development Environment and Graphics Driver

Operating system 1. choice: Windows 7.
Development system 1. choice: Visual C# 2010 Express.
Development system 2. choice: Visual Studio 2010 Professional.
Development system 3. choice: Visual Studio 2008 plus service pack 1.

- Test the DirectX properties of Your graphic board as follows: Start C:\Windows\System32\dxdiag.exe (or wherever it may be hidden on the hard disk).
- Check the manufacturer and the type of Your graphics card on the dxdiag-Display-tab .
- Search the manufacturer on the internet and download the newest driver version of the card and install it.
- Test again whether the update succeeded with dxdiag.exe.


Installieren Sie das DirectX 9.0 Software Development Kit

Suchen Sie unter Systemsteuerung → Software → Microsoft ..., ob ein altes DirectX SDK auf Ihrem Rechner installiert ist. Falls ja, deinstallieren Sie dieses so vollständig wie möglich.

Downloaden Sie das neueste Software Development Kit DirectX SDK (June 2010) 571.7 MB.
Installieren Sie das neue in einem speziellen eigenen Verzeichnis C:\DXSDK oder D:\DXSDK. Sie müssen dazu
1) C:\DXSDK anlegen (oder leeren, falls schon vorhanden)
2) DXSDK_Jun10.exe 571.7 MB dorthin kopieren und starten
3) den automatischen Entpacker auf C:\DXSDK lenken
4) während des Setup den Default-Zielpfad auf C:\DXSDK ändern.
Kontrollieren Sie den Erfolg der Installation mit: Start → Ausführen... → dxdiag.

Download the DirectX 9.0 Software Development Kit

Check Settings → Software → Microsoft ..., if a former DirectX SDK is installed on your computer. In this case deinstall it as completly as possible.
Download the most recent Software Development Kit DirectX SDK (June 2010) 571.7 MB.
You must deinstall any older DirectX SDK before You install the new one in its own directory C:\DXSDK or D:\DXSDK.
Recommendation:
1) create C:\DXSDK (clean it, if already created).
2) paste DXSDK_Jun10.exe 571.7 MB to C:\DXSDK and start it.
3) redirect unzip to C:\DXSDK.
4) during Setup redirect the default path to C:\DXSDK.
Check the installation success: Start → Run... → dxdiag.


DirectX 9.0 SDK Dokumentation für Visual Studio

Für Visual Studio 2010 gibt es keine Hilfetexte über DirectX Managed.
Sie sind auf die Onlinetexte des Microsoft Developer Networks MSDN angewiesen und brauchen deshalb während der Programmierung eine Internetverbindung.
Sie finden die Seiten über DirectX Managed unter: http://msdn2.microsoft.com/en-us/library/default.aspx, wo Sie im Inhaltsverzeichnis verzweigen: Windows Development → Graphics and MultimediaDirectX → DirectX 9.0 for Managed Code.

DirectX 9.0 SDK Documentation for Visual Studio

There are no help texts about DirectX Managed for Visual Studio 2010.
You are dependent on the online texts of the Microsoft Developer Network MSDN and You need an internet connection during programming.
The pages about DirectX Managed are here: http://msdn2.microsoft.com/en-us/library/default.aspx, where You have to branch through the table of contents:
Windows Development → Graphics and Multimedia → DirectX → DirectX 9.0 for Managed Code.


Buchempfehlung:

KONEROW Jens: Managed DirectX und C#, 300 Seiten,
ISBN: 978-3-939084-17-4, 30 €, entwickler-press.de

 

Recommended: The books from Miller and Weller/Lobao/Hatton

Unfortunatly the SDK includes not so much help texts. I therefore recommend the books:
1) Tom Miller: Managed DirectX 9 Graphics and Game Programming, SAMS 2003,
ISBN: 0-672-32596-9. US$ 34.99.
2) WELLER, LOBAO, HATTON: Beginning .NET Game Programming in C#, Barnes&Noble 2004, ISBN: 1590593197. US$ 44.99. http://www.bn.com
The DirectX SDK from the books CDs are out of date, do not install them.
Tom Miller's samples base on DirectX 9.0b which is out of date and his projects use the older DirectX Managed libraries:
Microsoft.DirectX           Version 1.0.1901.0
Microsoft.DirectX.Direct3D  Version 1.0.1901.0
Microsoft.DirectX.Direct3DX Version 1.0.1901.0
The differences to the new versions are minimal but build and link errors occur.


Empfehlung: Weitere Tutorials

Zur Vertiefung des Stoffs empfehle ich weitere Tutorials:
1. von Craig Andera:
   sites.google.com/site/craigandera/craigs-stuff/directx-home
2. von Riemer Grootjans:
   http://users.pandora.be/riemer/index.html
3. von Microsoft:
   siehe unter: C:\DXSDK\Samples\Managed\Direct3D\Tutorials

Recommended: Further Tutorials

To go more deeply into DirectX:
1. Craig Andera's Tutorial:
   sites.google.com/site/craigandera/craigs-stuff/directx-home
2. Riemer Grootjans Tutorial:
   http://users.pandora.be/riemer/index.html
3. Microsoft Tutorials:
   see: C:\DXSDK\Samples\Managed\Direct3D\Tutorials

Animierte Dreiecke

1. Wie erzeugt man ein Direct3D Device ?
2. Wie rendert man ein Dreieck ?
3. Wie animiert man eine Drehung ?

20kB Demo.exe → Zuerst lokal speichern, dann starten
Link C# Bauanleitung
PDF C# Bauanleitung Druckversion
   
   

Moving Triangles

1. Creating a Direct3D Device
2. Rendering a Triangle
3. Animating a Rotation

20kB Demo.exe → Download it and start it from Your local disk
Link C# Guidance
PDF C# Guidance Print Version
Link C# Complete Code
PDF C# Complete Code Print Version
Link C# Code Comments
PDF C# Code Comments Print Version

Zylinder mit gerichtetem Licht

1. Wie erzeugt man einen Zylinder ?
2. Wie erzeugt man Lichtquellen ?

20kB Demo.exe → Zuerst lokal speichern, dann starten
Link C# Bauanleitung
PDF C# Bauanleitung Druckversion

Cylinder with Directional Light

1. Creating a Cylinder
2. Creating Light Sources

20kB Demo.exe → Download it and start it from Your local disk
Link C# Guidance
PDF C# Guidance Print Version
Link C# Code Comments
PDF C# Code Comments Print Version

Zylinder mit Textur

1. Wie erzeugt man einen texturierbaren Zylinder ?
2. Wie benutzt man Texturen ?
3. Lesen beliebiger Bilder als Texturen zur Laufzeit
4. Wie dreht man um 3 Achsen ?

20kB Demo.exe → Zuerst lokal speichern, dann starten
Link C# Bauanleitung
PDF C# Bauanleitung Druckversion

Cylinder with Texture

1. Creating a Texturable Cylinder
2. Using Textures
3. Reading Arbitrary Textures at Run Time
4. x,y,z- Rotation

20kB Demo.exe → Download it and start it from Your local disk
Link C# Guidance
PDF C# Guidance Print Version
Link C# Code Comments
PDF C# Code Comments Print Version

Standard Meshes = Primitive

Die sechs primitiven Maschenwerke
Basisversion: mesh_primitive1 animiert alle zusammen.
Grid-Version: grid1 kombiniert den Cylinder-Typ zu einem 3D-Gitter.

20kB Demo.exe → lokal speichern, dann starten
Link C# Bauanleitung
PDF C# Bauanleitung Druckversion
   
   
   

Standard Meshes = Primitives

Six primitve meshes are predefined. mesh_primitive1 animates them all at once and grid1 combines cylinders to a 3D-grid.

20kB Demo.exe → Start it from Your local disk
Link C# Guidance
PDF C# Guidance Print Version
Link C# Code Comments
PDF C# Code Comments Print Version
20kB Demo.exe Cylinder Grid
Link C# Guidance to Cylinder Grid
PDF C# Cylinder Grid Print Version

Ein Mesh aus File.x lesen

1. Wie lädt man ein 3D-Maschenwerk ?
2. Wie bedeckt man die Maschen mit einer Textur ?
3. Lesen beliebiger 3D Maschenwerke und beliebiger Bilder als Texturen
Diese Übung setzt voraus, dass DirectX SDK im Verzeichnis C:\DXSDK installiert ist.

20kB Demo.exe → lokal speichern, dann starten
Link C# Bauanleitung
PDF C# Bauanleitung Druckversion

Read a Mesh from File.x

1. Loading a mesh
2. Covering the mesh with a texture
3. Reading arbitrary meshes textured with arbitrary images
This tutorial assumes that the DirectX SDK is installed in directory C:\DXSDK.

20kB Demo.exe → Start it from Your local disk
Link C# Guidance
PDF C# Guidance Print Version
Link C# Code Comments
PDF C# Code Comments Print Version

Mesh Viewer

1. Mesh-Auswahl aus dem DirectX-SDK rendern.
2. Wie vereinfacht man ein 3D-Maschenwerk ?
3. Wie zeigt man das Kantennetz ?
Diese Übung setzt voraus, dass DirectX SDK im Verzeichnis C:\DXSDK installiert ist.

28 kB Demo.exe → lokal speichern, dann starten
Link C# Bauanleitung
PDF C# Bauanleitung Druckversion

Mesh Viewer

1. Render a selection of meshes from the DirectX-SDK.
2. How to simplify a mesh ?
3. How to display the wire frame ?
This tutorial assumes that the DirectX SDK is installed in directory C:\DXSDK.

28 kB Demo.exe → Start it from Your local disk
Link C# Guidance
PDF C# Guidance Print Version
Link C# Code Comments
PDF C# Code Comments Print Version

Fähigkeiten der Graphikkarte

3D-Anwendungen brauchen zur Laufzeit Information über die vorhandene Hardware.

1. Wieviel Graphikkarten besitzt das System ?
2. Welche Auflösungen und Farbformate unterstützt die Graphikkarte ?
3. Welche Auflösungen und Formate sind gerade aktiv ?
4. Welche Fähigkeiten besitzt die Graphikkarte und ihr Treiber ?

20kB Demo.exe → lokal speichern, dann starten
Link C# Bauanleitung
PDF C# Bauanleitung Druckversion

Graphics Card Properties

At run time 3D games need information about the graphics hardware.

1. How many grapic cards are on the system (Multimonitor ?)
2. What resolutions and color formats are available ?
3. What resolutions and color formats are currently active ?
4. What are the capabilities of the graphics card and its driver ?

20kB Demo.exe → Start it from Your local disk
Link C# Guidance
PDF C# Guidance Print Version
Link C# Code Comments
PDF C# Code Comments Print Version
top of page: