... shown in the following bit of code:
IDirectXFile *pDXFile = NULL;
HRESULT Result = DirectXFileCreate(&pDXFile);
As you can see from the previous lines of code, the DirectXFileCreate function ... State
14
Table of Contents
AdvancedAnimationwithDirectX 1
Introduction 4
Part One: Preparations 7
Chapter 1: Preparing for the Book 8
Overview 8
Installing the DirectX SDK 8
Choosing the ... On with the Book 34
Part Two: Animation Basics 36
Chapter 2: Timing in Animation and Movement 37
Using Time−Based Motion 37
Reading Time in Windows 37
Animating with Time 38
Moving with...
... Files
The companion files can be downloaded from the following web site:
www.wordware.com/files/dx9
These files include the sourcecode discussed in the book along with the
game Mobots Attack!. ... Data
Walsh, Peter (Peter Andrew), 1980-
Advanced 3D game programming withDirectX 9.0 / by Peter Walsh.
p. cm.
ISBN 1-55622-968-2 (pbk.)
1. Computer games Programming. 2. DirectX. I. Title.
QA76.76.C672W382 ... are preceded with a “g_” (an example would be int g_hIn
-
stance); static variables are preceded with an “s_” (static float s_fTimer);
and member variables of classes are preceded with an “m_”...
... Cover
Table of Contents
Advanced 3D Game Programming Using DirectX 9.0
Introduction
Chapter 1-Windows
Chapter 2-Getting Started with DirectX
Chapter 3-Communicating with DirectInput
Chapter ... Direct3D
Chapter 9 -Advanced 3D Programming
Chapter 10 -Advanced Direct3D
Chapter 11-Scene Management
Appendix-An STL Primer
10
What are the requirements for using the code?
The code was written ... Of course, I must thank
Jim Hill, Wes Beckwith, and Tim McEvoy of Wordware for being such great people to work with.
Thanks to Phil Taylor on the DirectX team at Microsoft for agreeing to do...
... Contents
Advanced 3D Game Programming Using DirectX 9.0
Introduction
Chapter 1
- Windows
Chapter 2
- Getting Started withDirectX
Chapter 3
- Communicating with DirectInput ... Started withDirectX
Overview
Now that you know enough about Windows, it's time to get down and dirty with DirectX. This chapter
shows you everything you need to know to get started with ... are some pieces of code that would get much faster with a little
obfuscation.
38
The way I'll do this is with two classes. One of them will abstract the Windows code that needs to be...
... I'm going to dive into the code that initializes Direct3D for full-screen rendering. The way
the code actually gets called is in cApplication::InitGraphics. That code calls the static function ... devices through a COM
interface, just like with Direct3D. The interface name in DirectX 9.0 is IDirectInputDevice8.
Note
You may be wondering why in DirectX 9.0 the device is called IDirectInputDevice8. ... filled with the address of the
newly created device.
So if you were going to create a standard hardware accelerated device with software vertex processing
you could use the following code: ...
... SafeRelease( pDSBPrimary );
With all the code in place, you can actually write the sound layer class. The header appears in Listing
4.3, and the sourcecode is in Listing 4.4.
Listing ... /*******************************************************************
* Advanced 3D Game Programming using DirectX 9.0
144
hwnd
Handle to the window to be associated with the DirectSound object. This should be the ... SetFormat() method on the primary buffer. Listing 4.2
has
code that sets the primary format to 22 KHz, 16-bit stereo.
Listing 4.2: Sample code to change the format of the primary buffer
153
...
... to know how to draw the triangles with the supplied
information. There are currently three ways to do this; the third has just become a hardware feature with
DirectX 9.0. Here is a polygon mesh ... horizontal fov will be hardcoded, and the code chooses a vertical field of view that will keep
the aspect ratio of the screen. This makes sense: You couldn't get away with using the same field ... the
light.
Spotlights have two angles associated with them. One is the internal cone whose angle is generally
referred to as theta (θ). Points within the internal cone receive all of the light...
... Thủ thuật xem sourcecode của các trang web cấm chức năng xem sourcecode
Đã bao giờ các bạn muốn xem sourcecode của một trang web nhưng khi bấm phải chuột
và dùng chức năng view source thì không ... _http://www.viewhtml.com ra và paste
đường link đó vào mục URL rồi bấm nút View HTML Source. Trang web này sẽ tự động
trả lại toàn bộ SourceCode HTML của đường link trên. Sau đó bạn dùng chức năng Search
để ... chức năng View Source được.
Chúng tôi giới thiệu một thủ thuật đơn giản và hiệu quả để thực hiện công việc đó. Ví dụ:
đường dẫn đầy đủ đến flash tên là MyLove của trang tialia.com là
Code:
http://www.tialia.com/pmusic.php?onlinemusicid=83100
Bạn...