|
TDX_LIBRARY INFORMATION
|
|
If you would like to know more information about something not on this page, ask us and we'll add it to a page.
OVERVIEW OF THE TDX_LIBRARY
Top
Next
The TDx_Library is a concept whereby entire subsections of the Microsoft DirectX 7.0a SDK are being translated and optimized
to work easily within the award-winning Borland C++ Builder
Rapid Application Development Compiler (BCB), versions 1, 3, 4, 5 and 6.
The TDx_Library consists of separate BCB component libraries that each wrap a subsection of the DirectX SDK
into BCB's VCL style component architecture, seamlessly integrating the full power of DirectX into bcb's
rapid application development environment, reducing the overall development time and complexity when developing
applications using DirectX and BCB.
Each individual library wraps DirectX on a low-level basis, simplifying and translating all working DirectX
structures and interfaces into much easier to use BCB-style components, with bcb-style properties, methods
and events, all fantastic when mixing and matching with existing BCB components.
We've even translated DirectX callbacks to bcb-style events, such as OnDDEnumerate() and OnEnumDisplayModes().
DirectX interfaces are automatically created and destroyed, structures are cleaned automatically, error checking
is performed automatically, you can even access and modify the internals of the components to mix and match with
existing DirectX code.
Can't remember all the details all the time? Press F1 in BCB, up pops comprehensive help,
customized to BCB and the TDx_Library.
The TDx_Library is designed to reduce the time it takes to program DirectX using BCB.
It is a very advanced toolset which :-
- seamlessly integrates the full power of DirectX 7 into BCB
- enhances both BCB and DirectX application development
- reduces overall development time using DirectX
- reduces the overall complexity of DirectX programming.
For more information, click :-
BENEFITS OF USING THE TDX_LIBRARY
Top
Next
Prev
There are many benefits available to the end user of the TDx_Library, including :-
- Rapid Application Development DirectX
- Advanced Multimedia for BCB Applications
- Blindingly fast 2D & 3D Graphics, awesome Sound, all kinds of Input Devices, and even multiplayer networking
Additionally, this entire website is aimed at helping you understand :-
- How BCB works
- How DirectX works
- How the TDx_Library works
- How to use the TDx_Library to it's best capacity
- And... how to "translate" from existing DirectX code to TDx_Library code...
... there's heaps of DirectX code on the net
... and the TDx_Library just makes it all so much easier.
Also, there's nothing better for understanding the TDx_Library, than first understanding :-
For more information, click :-
SEAMLESS INTEGRATION OF DIRECTX AND BCB
Top
Next
Prev
The TDx_Library achieves a seamless integration of DirectX and BCB by translating everything available in DirectX
into many individual BCB "components" - visual objects that can be dragged and dropped to rapidly create a Windows application.
Individual "components" are then arranged into various "component libraries", each of which "wrap" all functionality
within an entire subsection of the DirectX SDK, such as DirectDraw, DirectSound, DirectInput, DirectPlay or Direct3DI.
For Example :-
For a much more detailed explanation of exactly how the TDx_Library achieves the end-result,
the seamless integration of DirectX into BCB, try the "How It Works" tutorial:
RAD DIRECTX
Top
Next
Prev
The TDx_Library components are available to the end-programmer to visually drag & drop as desired into any BCB application that requires the use of DirectX.
For example, to create a working DirectSound test application, use a standard BCB5 TForm.
Then add 1 x TButton, 1 x TDx_Sound, 1 x TDx_SoundBuffer and 1 x TDSBufferDesc :-
Add a little bit of code :-
// ------------------------------------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
// create an interface to the default DirectSound device
if (Dx_Sound1->Create(NULL))
 {
// create a DirectSoundBuffer from a .wav file
// and store the buffer information in DSBufferDesc1
if (Dx_SoundBuffer1->CreateFromFile("TEST.WAV", DSBufferDesc1, Dx_Sound1))
{
// play the .wav file once
if (Dx_SoundBuffer1->Play(0,0))
{
// do whatever you like until the sound stops playing
while (Dx_SoundBuffer1->Playing)
DoSomething();
}
// destroy the sound buffer
Dx_SoundBuffer1->Destroy();
}
 // destroy the DirectSound interface
 Dx_Sound1->Destroy();
 }
}
Press F9 to build the project: a DirectSound test application playing a file called TEST.WAV
RAD DirectX in action.
For more information, click :-
CORE FUNCTIONALITY OF THE TDX_LIBRARY
Top
Next
Prev
The TDx_Library has many features designed to make DirectX programming much easier with BCB,
and is also suitable for BCB programmers who want easy access to some of the advanced features of DirectX :-
-
Wraps Literally Everything
2D and 3D graphics, 2D and 3D sound, force-feedback input devices, internet support, literally everything that is available in the complete DirectX 7.0a sdk, will ultimately become available in the TDx_Library.
- BCB-Style Component Architecture
You can drop components onto a TForm, configure them using the BCB Object Inspector (including properties and events), add your custom form to the BCB Object Repository, then code a minimal amount of code to get your application working - usually 1 line of code per action.
- Structure and Interface Wrapper Components
All DirectX structures and interfaces have been converted to components so that you can use the full benefits of the BCB rapid-application-development environment, such as :-
Component Copy & Paste,
BCB Object Inspector,
BCB Object Repository,
BCB Code Editor Highlighting,
F1 Instant Help,
and so on.
For example, the DDBLTFX structure becomes a TDDBltFX component, a DSBUFFERDESC structure becomes a TDSBufferDesc component, the IDirectDraw7 interface becomes a TDx_Draw component, the IDirectSoundBuffer interface becomes a TDx_SoundBuffer component, and so on.
- BCB-Style Naming Conventions
DirectX "hungarian notation" naming conventions have been changed to more readable BCB-style naming conventions, for example "lpddSCaps" becomes "SCaps", making DirectX much easier to read and understand.
- DirectX Cleaned Up
Structures, structure members, methods, method parameters and flags that are not actually available in DirectX are no longer visible, letting you concentrate on programming what actually works.
- Converted Structure Members
DirectX structure member types have been translated into BCB-style property types. For example, a DWORD is now a dword, an LPBOOL is now a bool*, an LPRECT is now a TRect, and so on. Structure members that contain DirectX flags can be setup using the BCB Object Inspector.
- Converted Function Calls
DirectX functions have been translated into BCB-Style component methods, with most functions returning a bool that signals whether or not the function call was successful.
- Converted Function Parameters
DirectX function parameter types have been translated into BCB-style method parameter types. For example, an LPBOOL is now a bool*, an LPRECT is now a TRect*, and so on. Methods have been converted so that you are no longer required to pass in unused parameters or parameters that can only be a single value.
- Automatic Structure Setup
Each structure is automatically filled with zero's and the dwSize member set to the sizeof() the structure correctly.
- Multiple Structure Wrappers
Arrays of structures are handled automatically by the relevant component, letting you concentrate on using the structures, not managing their memory allocation and default setup.
- Automatic Interface Creation & Destruction
Each interface component has Create() and Destroy() methods that automatically create and destroy the latest version of the relevant DirectX interface. For example, the TDx_Draw component has a method, TDx_Draw::Create() which automatically creates an LPDIRECTDRAW and uses IDirectDraw::QueryInterface() to create an internal LPDIRECTDRAW7. Similarly, the TDx_Draw::Destroy() method deletes it's own internal interfaces.
- Create() and Destroy() Extras
Each interface component has a Created property to let you know if the Create() worked, and OnCreate() and OnDestroy() events that can be used to correctly cascade object creation and destruction.
- Automatic Error Detection
All known DirectX errors are trapped and sent to bcb-style OnError() events automatically, complete with complex error messages. This feature is invaluable for runtime error retrieval. The ErrorValue property can to be used to check the last known error message. Additionally, all array-style structure members are automatically checked for out-of-bounds indexing errors.
- OnError() Extras
Each component has an ErrorValue property to let you know the last error code returned from a call to a DirectX function, and occasionally when a value goes out of bounds.
- Automatic Callback to Event Redirection
All known 'callbacks' used by DirectX have been redirected to an 'OnEnumXXX' event of the appropriate component. eg. the IDirectDraw7::EnumVideoPorts() function now automatically calls the TDx_Draw::OnEnumVideoPorts() BCB-style event instead. No more fiddling with callbacks.
- Automated Resource Loading
Some components have extra methods to load or save bitmaps, palettes, sounds and so on. For example, the TDx_Draw, TDx_DrawPalette and TDx_Sound components contain methods like LoadFromFile(), CreateFromFile(), SaveToFile() and so on that dramatically speed implementation.
- Integrated BCB-Style Help
An informative context sensitive help file is completely integrated into BCB. Press F1 in BCB and the help you require is displayed. Includes a "see-also" section which lets you navigate related information with ease. eg. If you are looking at a method and want to see what uses it, press F1.
- Examples, Demos & Tutorials
We will be creating many examples, demos and tutorials that will enable you to learn how to use our tools quickly and easily.
- BCB Version 1/3/4/5/6 Compatibility
All of our components are designed to function identically in Borland C++ Builder v1, v3, v4, v5 and v6, using a single copy of the component source code.
WRAPPING OF DIRECTX STRUCTURES & INTERFACES
Top
Next
Prev
The wrapping of DirectX is performed on a low-level, one-to-one, basis :-
- Each DirectX Structure has been converted into a single BCB component, with optimizations when required :-
- Sructure maintenance has been automated
- Structure members have been translated to BCB Properties
- Structure members have been renamed to remove "Hungarian Notation"
- Structure member Types have been translated into VCL Property Types
- Structure member Flags have been converted into BCB TSet<>'s
- Structure member Flags have automatic text representation's
- Structures have Automated Error Checking
- Structures within Structures have been enhanced
- Additional functionality (when required) includes :-
- Multiple Internal Structures are managed automatically by a single BCB component
- Internal Component Cross-Referencing is managed automatically by all BCB components
- Each DirectX Interface has been converted into a single BCB component, with many enhancements :-
- Interfaces to DirectX are automatically Created by the component
- Interfaces to DirectX are automatically Destroyed by the component
- Interface functions have been translated to BCB methods
- Interface function parameters have been renamed to remove "Hungarian Notation"
- Interface function parameters have been translated into VCL Parameter Types
- Interface function parameters that are redunant have been removed
- Methods have Automated Error Checking
- Additional functionality (when required) includes :-
- Certain interfaces can be created automatically, for example :-
- A DirectDrawSurface can be created from a .BMP file
- A DirectSoundBuffer can be created from a .WAV file
- Methods automatically call corresponding BCB events, for example :-
- TDx_Draw::Create() calls TDx_Draw::OnCreate() when it's successfully created it's internal interface.
- TDx_Draw::Destroy() calls TDx_Draw::OnDestroy() just prior to destroying it's internal interface.
- Interface Callback Functions have been translated into easy to use BCB Events, for example :-
- TDx_Draw::DDEnumerate() calls TDx_Draw::OnDDEnumerate() for each device enumerated.
- TDx_Draw::EnumDisplayModes() calls TDx_Draw::OnEnumDisplayModes() for each mode enumerated.
For more information, click :-
THE TDX_LIBRARY
Top
Prev
The table below contains details on the current status of the TDx_Library, and links to more information :-
|
|