Writing a Direct3D Immediate Mode Application

ID: Q153681


The information in this article applies to:
  • Microsoft DirectX Software Development Kit, version 2.0, used with:
    • Microsoft Windows 95


SUMMARY

Direct3D is designed to enable interactive 3-D graphics on Windows. It also provides access to 3-D accelerator hardware in a device-independent manner. Direct3D Immediate Mode is Microsoft's low-level 3-D API and it is ideal for developers who need to port games and other high-performance 3-D applications to Windows. Direct3-D Retained Mode is built on top of Immediate Mode.

The D3D.exe code sample is a basic Direct3D Immediate Mode application that demonstrates the steps necessary to create and render 3-D objects in Direct3D Immediate Mode. This sample renders to a full screen, 8 bits-per-pixel DirectDraw surface using double buffering. Direct3D renders to the back buffer and IDirectDrawSurface::Flip() is called to update the display.

Rendering is done by using execute buffers in Immediate Mode. Execute buffers are also used to set up different states for the renderer. The D3D.EXE sample demonstrates how to set up these execute buffers with vertex data and a list of opcodes so that when interpreted, they instruct the rendering engine to produce an image. For a detailed overview of Direct3D Immediate Mode, you should view the "Immediate-Mode Overview" section of the DirectX 2 SDK help file. To find this section, go to the "Contents" tab of the Help file viewer and double-click on "Direct3D." Then double- click on "Immediate-Mode Overview" to view a list of topics.


MORE INFORMATION

The following file is available for download from the Microsoft Download Center. Click the file name below to download the file:

D3d.exe
For more information about how to download files from the Microsoft Download Center, please visit the Download Center at the following Web address
http://www.microsoft.com/downloads/search.asp
and then click How to use the Microsoft Download Center.


REFERENCES

Direct3D code from portions of the OCT1 DirectX 2 sample was used in parts of the D3D.EXE sample.

Additional query words: kbgraphic kbfile

Keywords : kbfile kbsample kbDirect3dIM KbDirectX kbSDKWin32 kbWinOS95 kbfaq kbDirectX200
Version : WINDOWS:2.0,95
Platform : WINDOWS
Issue type : kbinfo


Last Reviewed: January 21, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.