DirectX 8.0

Source: Internet
Author: User
DirectX 8.0 overview released on: 1/11/2001 | updated on: 6/21/2004

Philip Taylor

Welcome to driving DirectX. In this month's topic, we will begin to explore Microsoft DirectX 8.0. First, we will summarize all the highlights of this new version for developers. You can find the download link for the DirectX 8.0 runtime and SDK In the DirectX Developer Center (English. Some people say that this will be the most powerful DirectX version for a long time. The new feature list below provides evidence for this statement.

Content on this page
Preface
DirectX 8.0 graphics
DirectX audio
Directplay 8.0
DirectX 8.0 directinput
DirectX 8.0 DirectShow
Conclusion

Preface

Each component of DirectX 8.0 includes important new features, which greatly enhance the functionality of DirectX. The graphics, audio, and network components are completely rewritten. Directinput includes new configuration functions, Operation ing, and better international support. DirectShow appears at runtime and SDK as part of DirectX for the first time.

In short, new features provided by DirectX 8.0 include:

DirectX graphics --IntegrationDirectDrawAndDirect3d

Microsoft DirectDraw and Microsoft direct3d are integrated into the DirectX graphics component. The API has been greatly updated and is now easier to use and supports the latest graphics hardware. The most striking new feature is the support for programmable colorants (the colorant is a piece of code written in a colorant language, the coloring language is designed for use in a programmable vertex assembly line or a programmable pixel assembly line ).

DirectX audio --IntegrationDirectmusicAndDirectsound

Microsoft directmusic and Microsoft directsound are now tightly integrated into the new DirectX audio component. Wav files or other resources can now be loaded by the directmusic loader, played using the directmusic player, and synchronized with the MIDI audio.

DirectplayBetter scalability and Performance

The Microsoft directplay component has been greatly updated, and its usability and functions have been improved, especially in terms of scalability and performance. In addition, directplay now supports voice communication between players.

DirectinputOperation ing in

Microsoft directinput introduces an important new feature: Operation ing. You can establish a connection between the input operation and the input device through Operation ing. You only need to enter a device for processing, and do not have to rely on a specific device object.

DirectXContainsDirectShow

Microsoft DirectShow is an integral part of DirectX and has been updated in this version.

The following describes these new features in detail based on each component.

Back to Top

DirectX 8.0 graphics

DirectX 8.0 added many new features to the Microsoft direct3d API interface, and many of the original performance was enhanced.

Full integration of DirectDraw and direct3d

Programmable vertex processing language

Programmable pixel processing language

Support for multi-sample Rendering

Vertex object

3D texture

Support for higher-level elements

Support for various d3d 3D content creation tools

Color Mixing of indexed vertices

Extended direct3dx tool Library

One of the most significant changes in DirectX graphics is to merge DirectDraw (2d graphic interface) and direct3d (3D graphic interface) into a public interface. For a long period of time so far, DirectDraw and direct3d have always crossed each other. Therefore, it is increasingly difficult to divide them into two independent interfaces. The new integration simplifies the initialization and control of the direct3d core, making these operations easier. This change not only simplifies application initialization, but also improves data allocation and management performance, thus reducing memory usage. Another reason for merging interfaces is that the development of DirectDraw is almost completely stopped. The changes made to DirectX 6.0 and DirectX 7.0 are only slightly beautifying. Figure 1 below shows the new direct3d architecture.

Figure 1: DirectX 8.0 graphics Architecture

The integration of graphic APIS also enables parallel vertex input streams, making the ing of dynamic application data structures more flexible.

The addition of the programmable shader is the most significant feature of direct3d update in DirectX 8.0. Language scalability is very good-considering that there will be a large number of new features in the graphic hardware in the next few years, our small complement to the coloring language will return several times. The coloring language is provided for vertex processing and pixel processing at the same time.

The programmable vertex processing language enables programmers to write hardware splitters for the following situations:

Deformation/transition Animation

Define matrix palette appearance

User-Defined Illumination Model

General Environment textures

Procedural ry

Algorithms defined by other developers

The programmable pixel processing language enables programmers to write custom hardware pasters for the following situations:

General texture merge expressions

By pixel illumination (concave and convex textures)

Paster by Pixel environment (for photo-level real effect)

Algorithms defined by other developers

Note that the coloring language added for vertex and pixel operations is the same as the "old" method used for transformation and illumination in the vertex assembly line and multiple textures in the pixel assembly line. Figure 2 illustrates the DirectX 8.0 graphic assembly line.

Figure 2: DirectX 8.0 graphic assembly line support for new and old methods

Other highlights make it easier to implement various special effects. Multi-sample rendering supports comprehensive back-to-sample and multi-sample effects, such as dynamic softening and depth of field. Point Object supports high-performance rendering of particle systems such as flickering, explosion, rain, and snow. Stereo textures can reduce area attenuation in pixel-based illumination and stereo blur effects, and can be applied to more complex geometric images.

Higher level elements improve the appearance of 3D content, and it is easier to map content created using mainstream 3D creation tools. In addition, DirectX 8.0 graphics also includes the 3D content creation tool plug-in to export the appearance mesh. X Files for later use in direct3d (using various direct3d technologies), multi-precision level details (lods) ry and higher level surface data. The color mixing of vertices with indexes extends the color mixing support of geometric images. In this way, a matrix used for the color mixing of vertices can be referenced through the matrix index.

A large number of functions are added to the direct3dx tool library. The Helper layer constructed on top of direct3d simplifies Common Tasks encountered by 3D graphic developers. D3dx now includes the "define appearance" library (supporting grid usage) and features for assembling vertices and pixel pasters. Note that the functions previously provided by d3d_overloads have been moved to the d3dx tool library. (D3d_overloads was first introduced in Microsoft DirectX 5.0 .)

Back to Top

DirectX audio

Microsoft DirectX 8.0 audio provides a new architecture for playing integrated music and sound effects. Although Microsoft directsound and Microsoft directmusic are still used, there is no significant difference between them. In the future, we hope that directmusic APIs will become the preferred API for creating interactive sound effects.

Some new features of DirectX 8.0 audio include:

. Wav files and message-based sound are integrated into a playing mechanism.

The audio channel model is more flexible and powerful, including the individual control of the section status.

Dls2 synthesis, including special effects

Audio script writing

Container object used to save all components of the directmusic producer project in a single file

More powerful control over playing, paragraphs, and channels

The new audio architecture uses directmusic synthesizer as the main 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 independent sounds before output. In this way, multiple independent sounds can be processed through the same audio effect and allocated to the same position in 3D space. They use only one directsound3d cache to minimize CPU usage and 3D hardware requirements. See figure 3 to learn about the new audio architecture.

Figure 3: DirectX 8.0 audio Architecture

. Wav files and resources can now be loaded using the directmusic loader and played using the directmusic player. The application no longer needs to analyze the. Wav file and copy it or import it to the directsound cache .. Wav files are played at regular intervals Based on directmusic.. wav files can be played simultaneously when a music event occurs, and can be processed by tools like other paragraphs. The directsound API is still supported, and you can still play the. Wav file directly through the directsound cache. Directsound will still be an API for. Wav file capture and full duplex.

In earlier versions of directmusic, the playing channel is mapped to the port, and each port sends its output to a directsound cache. In the new model, the channels in the paragraph are mapped to the audio channel, controlling the data flow from the player to the final output. The synthesizer output can be sent to multiple playback caches, and each playback cache has its own three-dimensional position and effect. The audio channel is dynamically created by the application or designed in paragraphs. Each playback instance of a paragraph has its own audio channel. Therefore, you can independently modify the parameters such as the volume, sound quality, and tone of each section.

Directmusic synthesizer is now based on the dls2 standard to provide higher quality sound synthesis. New features of the dls2 synthesizer include six-level encapsulation, speech layering, release waveforms, and additional low-frequency oscillator (LFO ). Each voice has an optional low-pass resonance filter. As part of the new audio architecture, the dls2 synthesizer can be used to play simple sound effects, including:

Any cycle point

Filters for each sound

Sound mixing

Automatic stream playback

ACM codec integration for playback

Performance processing Bus

Easily load. wav files

By using scripts, the composite and sound designer can control the player more freely. The application does not need to process the playback details, instead it calls the script. For example, a game event may trigger a script function. Through the modification function, the script author can easily modify the channel's response to game events.

All components of the directmusic producer project can be stored in one file, so it is very easy to find and load all objects. The container can also be embedded in a paragraph, so all the content required to play a paragraph can be saved in this paragraph.

DirectX audio provides more powerful control over performance, paragraphs, and channels. The playing notification event now has a new notification type dmus_notification_musicalmostend, which indicates that the last main section in the queue is about to end. In this way, the application has the opportunity to plan to play new paragraphs.

New features of a paragraph include: the composite can set a point in the paragraph to specify where to start playing the paragraph, so as to maintain the relationship between the paragraph and the time signature. A main paragraph can contain any point that is connected to other paragraphs. These points can be connected not only to the nearest section, cycle, or grid, but also to more control. When the current main section is completed, you can play the section specified by the new section join Mark dmus_segf_segmentend. The new dmus_seg_repeat_infinite mark allows a paragraph to be played Infinitely multiple times.

For audio channels, the new configuration and playback tag allow you to rewrite the audio channel each time a paragraph is played or played cyclically. For example, you can configure a chord sound so that a new sound is created each time you play the paragraph. The application can separately set the configuration of each channel to disable playback and Parameter Control. The audio channel can be configured to operate based on the clock time rather than the music time. You can use the channel in the Automatic Control Section to replace the main section or the parameter channel in the control. Finally, a section containing the lyrics can send the time stamp to the player.

Due to space limitations, other new audio features will not be described here. If you are studying audio in depth, it may take a lot of time to study the audio characteristics of DirectX 8. See the new documentation and examples in the SDK.

Back to Top

Directplay 8.0

Directplay is an advanced software interface between applications and communication services. With directplay, it is very easy to connect to the game through the Internet, modem link or network. Directplay provides advanced transport layer services (for example, guaranteed or unguaranteed transmission, transmission on slow links, and disconnection detection ), it 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 unrelated to the communication service provider.

Figure 4 directplay Architecture

The following is a list of new features of Microsoft directplay API for DirectX 8.0:

The interface has been completely rewritten.

Front-end operations are not related to other parts of directplay.

Audio transmission has been added.

Addressing information has changed from guid-based data format to URL-based data format.

More powerful scalability and improved memory management.

Better support for Firewalls and network address translators (NAT.

Separating the interfaces for creating point-to-point sessions and Client/Server sessions simplifies the complexity of creating network applications. Interfaces used to create directplay transmission sessions include:

Idirectplay8peer: Provides the method for creating point-to-point sessions

Idirectplay8client: Provides the method to create the client part of the Client/Server Application

Idirectplay8server: Provides the method to create the server part of the Client/Server Application

Directplay no longer requires that the front-end client be used only with the directplay application. In this way, both the front-end service provider and application can implement directplay without matching each other. Frontend implementation is now divided into two simplified interfaces:

Idirectplay8lobbyclient, used to manage front-end clients, and to compute and start front-end recognition applications.

Idirectplay8lobbiedapplication is used to register an application that can be started by the frontend in the system so that it can be started by the frontend. It is also used to obtain connection information from the front end, so that users do not need to be queried when the game starts.

Directplay voice provides a set of interfaces to add real-time voice communication to applications. The following new interfaces provide voice support:

Idirectplayvoiceclient provides methods to create and manage clients in directplay voice sessions.

Idirectplayvoiceserver provides methods to host and manage directplay voice sessions.

Idirectplayvoicetest is used to test the audio settings on the client computer.

Figure 5 shows the components available when directplay voice is used.

Figure 5: directplay voice component

Previous versions of directplay used binary data blocks through the guid address, making it difficult to implement and read. In DirectX 8.0, directplay introduces the URL format address representation method, and uses a new set of interfaces to create and operate the new addressing format:

Idirectplay8address provides the basic addressing method for creating and operating directplay addresses.

Idirectplay8addressip provides IP address-specific addressing services.

For DirectX 8.0, directplay has been completely rewritten to provide superior performance and powerful scalability. The increase in user bandwidth has brought tremendous impact to the design and implementation of online games. Improved directplay thread buffer pool management makes it easier for developers to design changeable and more reliable applications and support a large number of online players at the same time.

It may be difficult to write online games that span Nat, firewall, and other Internet Connection Sharing (ICS) methods. It is especially difficult to write online games for unsecured (UDP) communication. In DirectX 8.0, directplay has paid attention to these issues during development. It will support possible Nat solutions. The directplay TCP/IP service provider uses a single, developer-selectable UDP port for game data, so that firewall and Nat can be configured as appropriate. In addition, directplay uses UDP. Therefore, for a client/server architecture game, some nat clients can directly connect to the game without additional configuration.

Back to Top

DirectX 8.0 directinput

Directinput provides the most advanced interfaces for various input devices, such as game poles, helmets, multi-Key mouse, and force feedback devices. By directly working with the device driver, directinput bypasses the Windows message system and provides the best performance.

The new features in Microsoft directinput API for DirectX 8.0 are listed as follows:

Operation ing

Better support for international applications

Support for creating new interfaces

Changes to the game bar slider data

Operation ing is a major improvement in supporting input devices. The operation ing simplifies the input loop and reduces the need for custom game drivers, device analyzer, and custom configuration user interfaces in the game. The operation ING also includes the Default User Interface, allowing you to configure devices quickly and easily. This standard API is implemented through low-level user interface APIs, allowing applications to directly access device images in their custom user interfaces.

The directinput device in DirectX 8.0 supports new properties that process the localized key names entered from the International keyboard. Two keyboard attributes are added: diprop_keyname, which is used to retrieve the localized key name and diprop_scancode, which is used to retrieve the scan code. These features are useful for most directinput-based applications released worldwide.

The directinput object is now represented through the idirectinput8 interface. The new helper function directinput8create can create an object and retrieve this interface. Idirectinput8 has a new CLSID and cannot be obtained by calling QueryInterface for the clsid_directinput Class Object. This is different from the previous DirectX version.

The game rod slider data is allocated to the Z axis of the dijoystate or dijoystate2 structure in previous DirectX versions, and is now located in the rglslider array of these structures. Although this change will lead to necessary adjustments to the existing code, it is easier to understand after all.

Back to Top

DirectX 8.0 DirectShow

DirectShow in this version has also been greatly modified. Some new features added in DirectX 8.0 include:

New Graphic Filter features

Supported Windows Media Formats

Video editing support

New DVD support

New MPEG-2 transfer and Program Stream support

Support for broadcast driver architecture

DirectX Media objects

The filter graphics Manager supports some new features, including Dynamic Graph Generation and real-time source merging. Dynamic Graph Generation allows you to modify the filtered image during graph running. Previously, to add or delete a filter, the application must stop the graph and interrupt the data stream. DirectShow now supports real-time source synthesis-for example, merging real-time audio streams and real-time video streams.

Two new filters enable the DirectShow application to read or write files in Microsoft Windows Media Format. The ASF reader filter is used to read and analyze files in Windows Media Format. The ASF file writer filter is used to write files in Windows Media Format and perform necessary composite and compression operations. DirectShow and Windows Media SDK now provide a complete solution for compiling applications to create and play windows media streams.

The new DirectShow editing Service (DES) API supports video editing. Based on the core DirectShow architecture, des provides a set of interfaces specifically designed to operate the video editing project. The DirectShow framework is more suitable for creating video editing applications. You will benefit from it as an application developer. Des replaces the cut table, and the cut table is no longer supported.

Two new interfaces, idvdcontrol2 and idvdinfo2, greatly expand the functions of the DVD navigator. The DVD navigator now implements a complete command set of the DVD Annex-J, which can play either the karaoke or the album. The new mswebdvd ActiveX Control enables this feature to be used in script-based applications.

The new filter MPEG-2 demultiplexer provides support for MPEG-2 transfer streams and program streams in Push mode (receiving data from real-time sources. The filter works with new real-time source merging support in the filter image to provide excellent MPEG-2 enhancement support.

The Microsoft broadcast driver architecture is the specification for the next generation of digital/analog television modulation devices. In DirectX 8.0, DirectShow supports SWAp compatible devices through a new set of kernel-mode device filters and the "SWAp modulation model. The Gini modulation model is a collection of objects and provides modulation methods for various types of numbers and analog networks.

DirectX Media object (DMO) provides a new method for writing 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 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 the services provided by DirectShow, such as instance synchronization, smart connection, automatic processing of data streams, and thread management. However, dmo does not need to filter images, so the application can use DMO without DirectShow.

DirectShow of DirectX 8.0 contains more functions, but it is not mentioned here. Remember to try the DirectShow that you have added and improved.

Back to Top

Conclusion

In short, DirectX 8.0 is an exciting version with a variety of excellent features required by multimedia developers. Whether you are interested in 3D graphics, audio, network, or video, you can discover new features. At Microsoft, we look forward to the release of world-class DirectX 8.0 applications by DirectX developers next year. Do not hesitate to download DirectX 8.0 from the DirectX Developer Center!

You are welcome to provide feedback. You are welcome to write to me at the address below. Please attach your comments, questions, opinions on the topic, or links to your own views on the topics involved in this column. However, you may not receive a special reply or send technical support questions to me. Keep in mind that Microsoft maintains two active email lists, a forum where similar developers share information: directxav for audio and video problems with http://DISCUSS.MICROSOFT.COM/archives/DIRECTXAV.html ); directxdev targets graphics, networks, and inputs, with a URL of http://DISCUSS.MICROSOFT.COM/archives/DIRECTXDEV.html ).

Philip Taylor is the project manager of DirectX SDK. He has been engaged in DirectX since the first open beta version of DirectX 1, and has been working on the release of DirectX 2 games for some time. He has been active in many 3D graphic programming email lists in his spare time. You can contact him via msdn@microsoft.com.

Archived driving DirectX Column

September 18 Alpha flashing effect

Now you can see 2nd, but now you haven't seen: Alpha mixed color, part 1

Now you can see 1st, but now you haven't seen: Alpha mixed color, part 1

What kind of light do you get in June 22?

Getting started with d3dframe in May 15

One idea of DirectX in April 17

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.