(Reproduced) DirectX 8.0 Introduction

zhaozj2021-02-16  139

DirectX 8.0 Introduction

Release Date: 1/11/2001

| Update Date: 6/21/2004

Philip Taylor

Welcome to Driving DirectX. In this month's column, we will start exploring Microsoft® DirectX® 8.0. First, we will summarize all the exciting features provided by developers. You can find DirectX 8.0 runtime and SDK download links in the DirectX Developer Center (English). Some people say that this will be the most powerful DirectX version for a long time. The following new feature list provides a proof of this.

This page

Foreword DirectX 8.0 GraphicsDirectX AudiodirectX 8.0 DirectPlayDirectX 8.0 DirectInputDirectX 8.0 DirectShow Conference

Foreword

Each component of DirectX 8.0 includes important new features, which greatly enhances the DirectX functionality. Graphics, audio and network three components are completely overwritten. DirectInput® includes new configuration features, operating mapping, and better international support. DirectShow® The first time DirectX appears in runtime and SDK.

In short, the new features provided by DirectX 8.0 include:

• DirectX Graphics - Integrate DirectDraw and Direct3D Microsoft DirectDraw® and Microsoft Direct3D® into DirectX Graphics components. The API has been largely updated and is now easier to use and support the latest graphics hardware. The most striking new feature is to support programmable shaders (shader is a piece of code written in coloring languages, the coloring language is designed to be used in programmable vertex pipelines or programmable pixel pipelines). • DirectX Audio - Integrate DirectMusic and DirectSound Microsoft DirectMusic® and Microsoft DirectSound® are now closely integrated into the new DirectX Audio component. WAV files or other resources can now be loaded by the DirectMusic loader, played via the DirectMusic player and synchronized with MIDI audio. • DirectPlay scalability and performance better Microsoft DirectPlay® components have been greatly updated, and their ease of use and feature are improved, particularly significant in scalability and performance. In addition, DirectPlay now supports voice communication between players. • Operation in DirectInput mapping Microsoft DirectInput introduces an important new feature: operation mapping. Connections can be established between the input operation and the input device by operating the mapping. You only need to enter device processing without having to rely on a specific device object. • DirectX contains DirectShow Now Microsoft DirectShow is an component of DirectX, which has been updated in this release. 0000-00-00 MICROFT DIRECTSHOW

These new features are described in detail below for each component.

Back to top

DirectX 8.0 Graphics

Many new features have been added in the DirectX 8.0 Microsoft Direct3D® API interface, and many original performances are also enhanced.

• DirectDraw and Direct3D Complete Integration • Programmable Porthot Processing Language • Programmable Pixel Processing Language • Multi-Sampling Rendering Support • Point Objects • 3D Stereo Texture • Higher Order Multi-order Support • Create Tools for Various D3Ds • With an indexed vertex color • extended Direct3DX tool library

One of DirectX Graphics is the most significant change in the DirectDraw (2D graphics interface) and Direct3D (3D graphics interface) into a public interface. So far, DirectDraw and Direct 3D have been cross each other, so they are divided into two independent interfaces that are increasingly uncomfortable. New integration simplifies the initialization and control of Direct3D cores, making these operations simpler. This change not only simplifies the initialization of the application, but also improves the performance of data allocation and management, thereby reducing the occupation of memory. Another reason for the merged interface is that the development of DirectDraw is almost completely stopped, and the modifications made to it in DirectX 6.0 and DirectX 7.0 are just slightly beautified. Figure 1 below shows a new Direct3D architecture. Figure 1: DirectX 8.0 Graphics Architecture

The integration of graphics APIs also enables parallel vertex input streams to make the dynamically applied data structure more flexible.

The addition of programmable shader can be said to be the most significant feature of Direct3D updates in DirectX 8.0. The language has a very good expansion - considering that a large number of new features will emerge in the next few years, our small supplements to the color language will receive several times. Coloring languages ​​are available for vertex processing and pixel processing.

Programmable vertex handling language allows programmers to write hardware shaders for the following situations:

• Deformation / Transition Animation • Define Matrix Toner Finding • User-Defined Light Model • General Environment Concentration • Process Geometry • Any Other Developer Defined Algorithm

Programmable pixel processing language allows programmers to write custom hardware shaders for the following situations:

• General texture combined expression • Pixel light (concave map) • According to pixel environment map (for photo-level real effects) • Other developers defined algorithms

Note that the coloring language added to the vertex and pixel operation is exist at the same time as the transformation and lighting in the vertex pipeline and the "old" method such as multiple textures in the pixel pipeline. Figure 2 illustrates the DirectX 8.0 graphics pipeline.

Figure 2: DirectX 8.0 graphics pipeline support for new and old methods

Other wonderful features make it simple to achieve a variety of special effects. Multiple sampling rendering support can achieve a full range of renewal and multiple sampling effects, such as dynamic softening and depth of field. Point object support can achieve high performance rendering of particulate systems such as flashing, explosion, raining, and snow. Stereoscopic texture can be attenuated in a pixel light and a stereoscopic fuzzy effect, and can be applied to more complex geometry.

Higher order of primitives supports the appearance of three-dimensional content, and the mapping of content created with mainstream 3D creative tools is also simpler. In addition, DirectX 8.0 Graphics also includes three-dimensional content creation tool plug-in to export the appearance grid to the .x file so that in the future in Direct3D (using various Direct3D technology), multiple precision level details (LOD) geometry and higher level surface Use in the data. The vertex of the index extends the geometric color mixing support, so that the matrix for the vertex mixing can be referenced by the matrix index.

A large number of functions have been added to the Direct3DX (D3DX) tool library, and the help layer constructed above Direct3D simplifies common tasks that 3D graphics developers. D3DX now includes "Defining Appearance" libraries (supporting using grid) and features for assembling vertices and pixel shaders. Note that the features provided by D3D_OverLoads are now moved to the D3DX tool library. (D3D_OverLoads first introduced in Microsoft DirectX 5.0.)

Back to top

DirectX Audio

Microsoft DirectX 8.0 AUDIO provides new architectures for playing integrated music and sound effects. Although still use Name Microsoft DirectSound and Microsoft DirectMusic, there is no significant difference between them. I hope that the DirectMusic API will be the preferred API that creates an interactive sound effect. Some new features of DirectX 8.0 AUDIO include:

• .wav file and message-based sound integration In a playback mechanism • The audio channel model is more flexible, powerful, including individual controls for paragraph status • DLS2 synthesis, including special effects • Audio scripting • Container object, for use Save all components of the DirectMusic Producer project in a single file • more powerful controls for performance, paragraphs and channels

The new audio architecture uses the DirectMusic synthesizer as the primary DirectX 8.0 Audio sound generator. This highly optimized downloadable sound level 2 (DLS2) synthesizer can create all sounds, mix them, and send the results to the DirectSound cache for further processing. The DirectMusic synthesizer can also mix multiple separate sounds before output. Thus, a plurality of separate sounds can be processed by the same audio effect, and assigned to the same position in the three-dimensional space. They only use a DirectSound3D cache to minimize the use of the CPU and the minimum requirements for 3D hardware. See Figure 3 for new audio architectures.

Figure 3: DirectX 8.0 AUDIO architecture

.wav files and resources can now be loaded through the DirectMusic loader and play it through the DirectMusic. Applications no longer need to analyze .WAV files, and copy or flow into the DirectSound cache. The timing of .wav file is based on the DirectMusic master clock, and .WAV file can be played while the music event occurs, and can be treated by tools like other paragraphs. The DirectSound API will still be supported, you can still play directly with the DirectSound cache. WAV file. DirectSound will still be an API for .WAV file capture and full duplex.

In previous versions of DirectMusic, the performance channel is mapped to the port while each port is sent to a DirectSound cache. Under the new model, the channels in the paragraph are mapped to the audio channel, and the control data flows from the player to the final output. The output of the synthesizer can be sent to a plurality of play caches, while each play has its own three-dimensional position and effect. The audio channel is created dynamically by the application, or in the paragraph. Each playback example of the paragraph has its own audio channel, so parameters such as volume, sound quality, and tone such as each paragraph state can be modified separately.

The DirectMusic Syntactor is now based on a DLS2 standard, providing higher quality sound synthesis. The new features of the DLS2 synthesizer include six-stage packages, speech layers, release waveforms, and additional low frequency oscillator (LFO). Each voice has an optional low-pass resonant filter. As part of the new audio architecture, DLS2 synthesizers can be used for simple sound effects, including:

• Any loop point • Filter for each sound • Mix • Automatic flow playback • ACM codec integration for playback • Effect Processing Bus • Easily load .WAV file

By using scripts, composer and sound designers can more control over the player. The application does not need to handle the details of the playback, and in order to call the script. For example, a game event may trigger a script function. By modifying the function, the script author can easily modify the response of the channel's game event.

All components of the DirectMusic Producer project can be kept in a file, finding and loading all objects is very easy. The container can also be embedded in the paragraph, so all the content required to play a paragraph can be saved in this paragraph. DirectX Audio is more powerful to performance, paragraphs and channels. Performance Notification Event now has a new notification type DMUS_NOTIFICATION_MUSICALMOSTEND, which means that the last main sector in the queue is about to end. In this way, the application has the opportunity to plan to play new paragraphs.

The new features of the paragraph include: Composers can set up in paragraphs, specify where to start playing paragraphs, thereby maintaining relationships between paragraphs and time signatures. The main segment can include any point of the coupling other paragraphs. These points can not only connect the nearest section, beats or mesh, but also more control. When the current main segment is played, the paragraphs specified by the new paragraph join flag DMUS_SEGF_SEGMENTEND can be played. The new DMUS_SEG_REPEAT_INFINITE logo makes a paragraph to play unlimited multiple times.

For channels, new configurations, and play tags allow each play or loop to play a certain paragraph, the channel can be rewritten. For example, you can configure a string such that new and sound is created each time you play this paragraph. The application can separately set the configuration of each channel, disable play, and parameter control. The channel can be configured to operate according to clock time rather than music. By configuring the channel in the self-control paragraph, it can be used to replace the parameter channel in the main segment or control. Finally, the paragraph containing the lyrics channel can send timestamp text to the player.

Limited to the space, the other new audio characteristics will not be described here. If you are studying audio in depth, studying the audio characteristics of DirectX 8 may cost your large amount of time. See the new documentation and examples in the SDK.

Back to top

DirectX 8.0 Directplay

DirectPlay is an advanced software interface between applications and communication services. With Directplay, connecting the game through the Internet, modem links, or networks will be very simple. DirectPlay provides both advanced transport layer services (for example, with guaranteed or non-guaranteed delivery, communication stifling on slow links, and abandoning connection testing, etc.), also provides session layer services (including player name table management and point-to-point host Transfer). Figure 4 shows the DirectPlay architecture and how it provides independence that is independent of the communication service provider.

Figure 4: DirectPlay architecture

Here is a list of new features of Microsoft DirectPlay API for DirectX 8.0:

• The interface has been overwritten. • Front-end operations are now independent of the other parts of DirectPlay. • Voice transmission has been added. • Addressing information has become a URL-based data format from the GUID-based data format. • The scalability is more powerful, and memory management is more perfect. • Better support for firewall and network address translator (NAT).

Separate Creating Point-to-Point Session and Interfaces of the Client / Server Session, making the complexity of the creation network application have been miraculously simplified. The interfaces used to create a DirectPlay transfer session include:

• iDirectplay8peer, provide methods for creating point-to-point sessions • IdirectPlay8Client, providing methods for creating client / server applications • IdirectPlay8Server, providing a server-side part of a client / server application

DirectPlay no longer requires the front-end client to work with the DirectPlay app. This way, front-end service providers and applications can implement DirectPlay without having to match each other. The front end implementation is now divided into two simplified interfaces:

• IDirectPlay8lobbyClient, is used to manage front-end clients, and calculate and start the front-end identification application. • IDirectPlay8lobbiedApplication, is used to register an application that can be started by the front-end in the system so that it can really start by the front end. It is also used to obtain connection information from the front end, and do not query the user when the game is started. DirectPlay Voice provides a set of interfaces to add real-time voice communication to your application. The following new interface provides voice support:

• iDirectPlayVoiceClient provides a way to create and manage clients in a DirectPlay Voice session. • IdirectPlayVoiceserver provides a way to carry and manage the DirectPlay Voice session. • iDirectPlayVoiceTest is used to test audio settings on the client computer.

Figure 5 shows the components available when using DirectPlay Voice.

Figure 5: DirectPlay Voice Components

The previous version of DirectPlay uses binary data blocks through the GUID address, it is difficult to implement and read. In DirectX 8.0, DirectPlay introduces address representations in the URL format and uses a new set of interfaces to create and operate new addressing formats:

• iDirectPlay8Address provides basic addressing methods for creating and operating the DirectPlay address. • iDirectPlay8Addressip provides an IP provider dedicated addressing service.

For DirectX 8.0, DirectPlay has been revised to provide excellent performance and powerful scalability. The increase in user bandwidth gives the online game design and implementation. Improved DirectPlay thread buffer pool management makes developers easier to design variable and more reliable applications, and can support a large number of online players at the same time.

Writing online games across the NAT, Firewalls and Other Internet Connection (ICS) methods may be very difficult, which is especially difficult to write online games for non-guaranteed (UDP) communications. In DirectX 8.0, these issues have been paid to DirectPlay development, which will support possible NAT solutions. The DirectPlay TCP / IP service provider uses a single, developer optional UDP port to the game data, so that the firewall and NAT can be appropriately configured. In addition, DirectPlay uses UDP, so for the game of the client / server architecture, some NAT's clients can be directly connected to the game without additional configuration.

Back to top

DirectX 8.0 DirectInput

DirectInput provides the most advanced interface for various input devices such as joysticks, helmets, multi-pointed mouse and power feedback equipment. DirectInput bypass the Windows message system by directly with the device driver, DirectInput has bypass the Windows message system.

The list of new features in Microsoft DirectInput API for DirectX Version 8.0 is as follows:

• Operation map • Support for international applications • New interface creation support • Changes to the game rod slider data

Operating mapping is a major progress in supporting input devices. Operating mapping simplifies the input loop, reducing the needs of custom game drivers, custom device analyzers, and custom configuration user interfaces in the game. Operating mapping also includes the default user interface, allowing users to quickly and easily configure the device. This standard API is implemented through a low-level user interface API, allowing the application to access device images directly in its custom user interface.

DirectXPUT devices in DirectX 8.0 support new properties, which can handle localized key names entered from the international keyboard. Two keyboard properties have been added: Diprop_KeyName, used to retrieve localized key names; Diprop_scancode, used to retrieve scanning code. These features are very useful for most DirectINPUT-based applications issued around the world. DirectInput objects are now represented by iDirectInput8 interfaces. New Helper Functions DirectInput8CREATE creates objects and retrieves this interface. IDirectInput8 has a new CLSID and cannot be obtained by calling QueryInterface for the interface of the CLSID_DirectIntinPut class. This is different from the previous DirectX version.

The game rod slider data is assigned to the Z-axis of the DiJoyState or DijoyState2 structure in the previous DirectX version, and now is located in the RGLSLIDER array of these structures. Although this change can result in the necessary adjustments to existing code, it is easier to understand.

Back to top

DirectX 8.0 DirectShow

DirectShow in this release has also made great modifications. Some new features added to DirectX 8.0 include:

• New Filter Graphics Features • Windows MediaTM Format Support • Video Editing Supply • New DVD Support • New MPEG-2 Transport and Program Flow Support • Support for Broadcast Driver Architecture • DirectX Media Objects

Filtering Graphics Manager supports some new features, including dynamic graphics generation and real-time sources. Use dynamic graphics generation, you can now modify the filter graphics during graphics run. Previously, to add or delete filters, the application must stop the graphic, thereby interrupting the data stream. DirectShow now supports real-time source synthesis, for example, can synthesize real-time audio streams with real-time video streams.

Two new filters allow DirectShow applications to read or write files in Microsoft Windows Media format. ASF Reader Filter is used to read and analyze files in Windows Media format; ASF File Writer filters are used to write files in Windows Media format and can perform the necessary composite and compression operations. DirectShow and Windows Media SDK now provide a complete solution to write applications to create and play Windows Media format streams.

New DirectShow Editor (DES) API supports video editing. DES is built on the core DirectShow architecture, providing an interface specifically designed to operate video editing projects. DirectShow's framework is more suitable for creating a video editing application, as an application developer, you will benefit from it. DES replaces the cutting table while the shearing table will no longer be supported.

Two new interface IDVDControl2 and IDVDinfo2 greatly extend the functionality of the DVD navigator. The DVD Navigator now implements a complete DVD Annex-J command set, which can play karaoke or play a disc. The new MSWebDVD ActiveX® control makes this feature to be used in scripting-based applications.

The new filter MPEG-2 demultiplexer provides support for MPEG-2 transport streams and program streams in push mode (received data from real-time sources) to MPEG-2 transport streams. This filter cooperates with the new real-time source synthesis support in the filtration pattern to provide excellent MPEG-2 enhancement support.

Microsoft Broadcast Driver Architecture (BDA) is a norm of new generation / mode TV modulation equipment. In DirectX 8.0, DirectShow supports BDA compatible devices through a set of new kernel mode device filters and "BDA modulation models". "BDA Modulation Model" is a set of objects that provides methods for modulating various types of numbers and analog networks. DirectX Media Object (DMO) provides a new way to write data stream components. Similar to the DirectShow filter, DMO accepts input data and uses it to generate output data. However, the DMO API is much more simpler than the corresponding DirectShow API. Therefore, DMO is easier to create, test, and use than DirectShow filters. DMO is fully compatible with DirectShow. You can use DMO as long as you need to use DirectShow's services, such as graphic synchronization, intelligent connection, data stream automation and thread management. However, DMO does not need to use filtration graphics, so the application can use DMO without DirectShow.

DirectX 8.0 version of DirectShow contains more features, but limited to space, no more. Please remember the trial new and improved DirectShow.

Back to top

Conclusion

In short, DirectX 8.0 is an exciting version that has a variety of excellent features needed for multimedia developers. Whether you pay attention to 3D graphics, audio, network or video, you can find new features. In Microsoft, we look forward to DirectX developers to release world-class DirectX 8.0 applications next year. Don't hesitate, hurry to the DirectX Developer Center (English) Download DirectX 8.0!

You are welcome to give feedback. Welcome to me to write to me by the following address, please attach your opinions, questions, the topic, or your own links on the different views of this column involved. However, your letter does not necessarily get special reply, and don't send me technical support. Keep in mind that Microsoft maintains two active mailing lists, which is a forum for developers sharing information: DirectXAV For audio and video problems, the URL is http://discuss.microsoft.com/archives/directxav.html (English); DirectXDEV For graphics, networks and inputs, the URL is http://discuss.microsoft.com/archives/directxdev.html.

Philip Taylor is a project manager for DirectX SDK. Since the first public beta version of DirectX 1, he has been engaged in DirectX and has a DirectX 2 game that has been actually released. In the spare time, he is active in many three-dimensional graphic programming mailing list. You can contact him through msdn@microsoft.com.

Archive DRIVING DIRECTX column article

September 18th ALPHA flashing effect

On August 22nd now, you have seen it, now you haven't seen: alpha mixed, Part 2

On July 26th, now you have seen it, now you haven't seen: alpha mixed, Part 1

What kind of light can you get on June 22?

May 15th D3DFrame Getting Started

On April 17 DirectX point claims