Language:EN
Pages: 2
Rating : ⭐⭐⭐⭐⭐
Price: $10.99
Page 1 Preview
part chapter introducing directinputg ddevice

Part chapter introducing directinputg ddevice-

98 Part I
Chapter 4: Introducing DirectInput

g_pd3dDevice->SetCursorPosition(g_MouseX, g_MouseY,
D3DCURSOR_IMMEDIATE_UPDATE);

� DirectInput devices are represented by the IDirectInput- Device8 interface and are created by calling IDirectInput8:: CreateDevice. They represent a single input device, such as a keyboard, a mouse, or a joystick. One per device is needed.

� After devices are created, a programmer sets their starting properties, such as cooperative level, data format, and mouse cursor, and then acquires the device on each input cycle to read user input from it. This is achieved by taking a snapshot of the device using GetDeviceState and then questioning the returned data.

Chapter 5
Wrapping Direct3D

Finally, there is CXPen. This encapsulates ID3DXSprite. Practi-cally, this works very much like a GDI pen — or even a normal pen— in that it paints pixels onto the back buffer. It operates hand in hand with textures, and its purpose is to ultimately render one or more instances of CXTexture onto the screen. Typically,

99

You are viewing 1/3rd of the document.Purchase the document to get full access instantly

Immediately available after payment
Both online and downloadable
No strings attached
How It Works
Login account
Login Your Account
Place in cart
Add to Cart
send in the money
Make payment
Document download
Download File
img

Uploaded by : Diane Clohessy-Shields

PageId: DOC2EC56B3