Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 368 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
368
Dung lượng
4,09 MB
Nội dung
[...]... add a path to the top of the list This time, provide the DirectX\ Lib path 7 Click OK For Visual C++ NET: 1 Click Tools | Options from the main menu 2 Click the Projects category 3 Click the VC++ Directories option 4 Select Include Files from the top right-hand drop-down list 5 Add a path tothe DirectX\ Include folder using the New tool button 6 Select Library Files from the top right-hand drop-down list... will need to perform the following steps: Chapter 1: Getting Started with DirectX 7 1 Click Tools | Options from the main menu 2 Select the Directories tab 3 Select Include Files from the right-hand drop-down list 4 In the Directories list, add a path to the top of the list that points to the DirectX\ Include path 5 Select Library Files from the right-hand drop-down list 6 Again, in the Directories list,... all files needed to both develop and run DirectX applications TheDirectX SDK the debug DirectX æ TIPDLLs This makes it often installsdevelopers toversions of theDirectX simpler for debug their applications, but results in a performance penalty To solve this, you can install theDirectX runtime after installing the SDK This replaces the debug DLLs with the retail versions Obtaining DirectX So now that... projects and other media that have been included in the SDK to demonstrate how DirectX works Take care, you could get lost here, as there are lots of them n Utilities The Utilities folder is home to a number of tools distributed with the SDK These are small applications intended to make the developer’s life a little easier DirectX Utilities TheDirectX SDK comes with a number of utility applications These... returns a pointer to a valid Direct3D object, which we’ll need to hold onto throughout our application We’ll use it later The code to create a Direct3D object would look like this: IDirect3D9* g_pD3D = NULL; if(NULL == (g_pD3D = Direct3DCreate9(D3D_SDK_VERSION))) return E_FAIL; [ NOTE Rather than using IDirect3D9*, you can also use the typedef LPDIRECT3D9 Chapter 2 Step 2 — Create a Direct3D Object ... eyes of the game character So, the game allows the player to look left, right, up, and down and also allows the character to walk forward, backward, left, and right Furthermore, the character will be able to shoot a gun at creatures that try to attack To create this game a developer must consider many factors Some of these include the following: n Engine A developer will need to make an engine for the. .. use will be to create other objects, which will do stuff like drawing images, etc., for us 3 Create a Direct3D device One of the other objects a Direct3D object (step 2) creates for us is a Direct3D device A Direct3D device represents the system’s graphics card and uses it to draw images In other words, we use theDirect3D device to actually draw images in our app’s window 4 Configure the message loop... DirectX coders to flick back and forth through the book and find what they need Those new toDirectX can read this book through from beginning to end, trying their hand at each topic as they go xiv Introduction What Is Contained in the Companion Files? The companion files can be downloaded from www.wordware.com/files/dx 9graphics They include the following: n All code featured in this book n Panda DirectX. .. developers with a report on the current status of DirectX It can list the calls made to the API and the current values of DirectX s internal variables Chapter 1 n 9 10 Chapter 1: Getting Started with DirectX Figure 1.3 n DirectX Caps Viewer DirectX Caps Viewer is an abbreviation for theDirectX Capabilities Viewer This application is like the standard system information tool that accompanies Windows... list 7 Add a path to the DirectX\ Lib folder using the New tool button 8 Click OK Exploring DirectX Once theDirectX SDK has been installed, it’s always a good idea to check out the newly installed files and folders DirectX will have been installed to a path of your choosing; typically this may be C:\DXSDK or a similar path Try opening up this folder using the standard Windows Explorer to take a look You’ll . definitive guide to Direct3D / by Alan Thorn. p. cm. Includes bibliographical references and index. ISBN-13: 97 8-1 -5 562 2-2 2 9- 7 ISBN-10: 1-5 562 2-2 2 9- 7 (pbk.) 1. Computer graphics. 2. DirectX. I Inc. Printed in the United States of America ISBN-13: 97 8-1 -5 562 2-2 2 9- 7 ISBN-10: 1-5 562 2-2 2 9- 7 1 098 7654321 0503 DirectX and Direct3D are registered trademarks of Microsoft Corporation in the United. alt="" DirectX ® 9 Graphics: The Definitive Guide to Direct3D ® Alan Thorn Wordware Publishing, Inc. Library of Congress Cataloging-in-Publication Data Thorn, Alan. DirectX 9 graphics : the definitive