Writing a Direct3D Immediate Mode Application

ID: Q153681


The information in this article applies to:


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 Software Library:

~ D3D.EXE
For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:
Q119591 How to Obtain Microsoft Support Files from Online Services


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 kbSDKWin32 kbWinOS95 kbDirectX200 
Version           : WINDOWS:2.0,95
Platform          : WINDOWS 
Issue type        : kbinfo 

Last Reviewed: June 21, 1999