Functions
General Functions

Functions

HRESULT D3DCreate (HWND hWnd, DWORD dwWidth, DWORD dwHeight, CVD3D &d3d)
 This function creates a Direct3D object for the given window.
 
HRESULT D3DGetAvailableTextureMemory (CVD3D d3d, UINT &AvailableMemory)
 This function returns the amount of available physical memory of the GPU card in MByte.
 
HRESULT D3DGetProjectionType (CVD3D d3d, TProjectionType &ProjType)
 This function returns the current projection type used to render images.
 
HRESULT D3DGetWorldView (CVD3D d3d, float &fRotX, float &fRotY, float &fRotZ, float &fTransX, float &fTransY, float &fTransZ)
 This function returns the world view used to render images defined by a previous call to D3DSetWorldView.
 
BOOL D3DIsD3D (OBJ d3d)
 This function checks if the given handle points to a CVD3D type.
 
BOOL D3DIsObject (OBJ d3dObject)
 This function checks if the given handle points to a CVD3DOBJECT type or not.
 
HRESULT D3DSetProjectionType (CVD3D d3d, TProjectionType ProjType)
 This function sets the projection type used to render images to the given value.
 
HRESULT D3DSetWorldView (CVD3D d3d, float fRotX, float fRotY, float fRotZ, float fTransX, float fTransY, float fTransZ)
 This function sets the world view used to render images by defining translations in x, y, and z as well as rotations around the x, y and z-axis.
 
HRESULT D3DSetWorldViewIdentity (CVD3D d3d)
 This function resets the world view used to render to an identity matrix, meaning no rotation and translation is applied.
 

Detailed Description

Function Documentation

HRESULT D3DCreate ( HWND  hWnd,
DWORD  dwWidth,
DWORD  dwHeight,
CVD3D d3d 
)

This function creates a Direct3D object for the given window.

dwWidth and dwHeight specify the maximum image size that can be created in the context of this object.

Attention
Make sure that the lifetime of the window exceeds the lifetime of the object being created by this call. Reference counting is implemented using the ShareObject and ReleaseObject functions of the Image Manager. To finally free the object use ReleaseObject.
Parameters
[in]hWndThe window handle.
[in]dwWidthThe maximum width of an image that can be created.
[in]dwHeightThe maximum height of an image that can be created.
[out]d3dNewly created CVD3D object.
Returns
0 if no error occurred, otherwise a value != 0 indicates the error code.
Supported platforms:
Win32
Win64
Related Topics:
Glossary
D3DGetInfo
Examples:
Delphi - Delphi BayerToRGB Example
Visual Basic .Net - VB.NET GPU Example
Visual C++ - VC GPU Demo
HRESULT D3DGetAvailableTextureMemory ( CVD3D  d3d,
UINT &  AvailableMemory 
)

This function returns the amount of available physical memory of the GPU card in MByte.

Attention
It might be possible to create even more textures, but in this case the textures will be held in system memory which will slow down rendering.
Parameters
[in]d3dThe D3D context.
[out]AvailableMemoryAmount of available video memory in MByte.
Returns
0 if no error occurred, otherwise a value != 0 indicates the error code.
Supported platforms:
Win32
Win64
Related Topics:
Glossary
Examples:
Visual Basic .Net - VB.NET GPU Example
HRESULT D3DGetProjectionType ( CVD3D  d3d,
TProjectionType ProjType 
)

This function returns the current projection type used to render images.

Refer to the Glossary to learn more about projection types.

Parameters
[in]d3dThe D3D context.
[out]ProjTypeCurrent projection type. See TProjectionType for possible values.
Returns
0 if no error occurred, otherwise a value != 0 indicates the error code.
Supported platforms:
Win32
Win64
Related Topics:
Glossary
D3DRender
D3DSetProjectionType
TProjectionType
D3DSetWorldView
D3DSetWorldViewIdentity
Examples:
Visual Basic .Net - VB.NET GPU Example
Visual C++ - VC GPU Demo
HRESULT D3DGetWorldView ( CVD3D  d3d,
float &  fRotX,
float &  fRotY,
float &  fRotZ,
float &  fTransX,
float &  fTransY,
float &  fTransZ 
)

This function returns the world view used to render images defined by a previous call to D3DSetWorldView.

Attention
To use this functions you have to make sure that the projection type is set to TPT_PERSPECTIVE.
Parameters
[in]d3dThe D3D context.
[out]fRotXThe rotation around the x-axis. The rotation is given in the range of 0 degree to 360 degrees.
[out]fRotYThe rotation around the y-axis. The rotation is given in the range of 0 degree to 360 degrees.
[out]fRotZThe rotation around the z-axis. The rotation is given in the range of 0 degree to 360 degrees.
[out]fTransXThe translation of the x-axis. A value of 1 corresponds to a shift of max(ImageWidth, ImageHeight)/2 e.g., to the right.
[out]fTransYThe translation of the y-axis. A value of 1 corresponds to a shift of max(ImageWidth, ImageHeight)/2 e.g., to the right.
[out]fTransZThe translation of the z-axis. A value of 1 corresponds to a shift of max(ImageWidth, ImageHeight)/2 e.g., to the right.
Returns
0 if no error occurred, otherwise a value != 0 indicates the error code.
Supported platforms:
Win32
Win64
Related Topics:
Glossary
D3DCreate
D3DRender
D3DSetWorldView
D3DSetWorldViewIdentity
D3DSetProjectionType
D3DGetProjectionType
Examples:
Visual Basic .Net - VB.NET GPU Example
Visual C++ - VC GPU Demo
BOOL D3DIsD3D ( OBJ  d3d)

This function checks if the given handle points to a CVD3D type.

Parameters
[in]d3dHandle to the object to be processed.
Returns
TRUE if it is a CVD3D object, FALSE otherwise.
Supported platforms:
Win32
Win64
Related Topics:
D3DCreate
Examples:
Delphi - Delphi BayerToRGB Example
Visual Basic .Net - VB.NET GPU Example
Visual C++ - VC GPU Demo
BOOL D3DIsObject ( OBJ  d3dObject)

This function checks if the given handle points to a CVD3DOBJECT type or not.

Parameters
[in]d3dObjectHandle to the object to be processed.
Returns
TRUE if it is a CVD3DOBJECT object, FALSE otherwise.
Supported platforms:
Win32
Win64
Related Topics:
D3DCreateSurfaceEntrance
D3DCreateSurface
D3DCreateTextureEntrance
D3DCreateTexture
Examples:
Delphi - Delphi BayerToRGB Example
Visual Basic .Net - VB.NET GPU Example
Visual C++ - VC GPU Demo
HRESULT D3DSetProjectionType ( CVD3D  d3d,
TProjectionType  ProjType 
)

This function sets the projection type used to render images to the given value.

Refer to the Glossary to learn more about projection types.

Parameters
[in]d3dThe D3D context.
[in]ProjTypeThe new projection type. See TProjectionType for possible values.
Returns
0 if no error occurred, otherwise a value != 0 indicates the error code.
Supported platforms:
Win32
Win64
Related Topics:
Glossary
D3DRender
D3DGetProjectionType
TProjectionType
D3DSetWorldView
D3DSetWorldViewIdentity
Examples:
Visual Basic .Net - VB.NET GPU Example
Visual C++ - VC GPU Demo
HRESULT D3DSetWorldView ( CVD3D  d3d,
float  fRotX,
float  fRotY,
float  fRotZ,
float  fTransX,
float  fTransY,
float  fTransZ 
)

This function sets the world view used to render images by defining translations in x, y, and z as well as rotations around the x, y and z-axis.

Attention
To use this functions you have to make sure that the projection type is set to TPT_PERSPECTIVE.
Parameters
[in]d3dThe Direct3DObject
[in]fRotXThe rotation around the x-axis. The rotation is given in the range of 0 degree to 360 degrees.
[in]fRotYThe rotation around the y-axis. The rotation is given in the range of 0 degree to 360 degrees.
[in]fRotZThe rotation around the z-axis. The rotation is given in the range of 0 degree to 360 degrees.
[in]fTransXThe translation of the x-axis. A value of 1 corresponds to a shift of max(ImageWidth, ImageHeight)/2 e.g., to the right.
[in]fTransYThe translation of the y-axis. A value of 1 corresponds to a shift of max(ImageWidth, ImageHeight)/2 e.g., to the right.
[in]fTransZThe translation of the z-axis. A value of 1 corresponds to a shift of max(ImageWidth, ImageHeight)/2 e.g., to the right.
Returns
0 if no error occurred, otherwise a value != 0 indicates the error code.
Supported platforms:
Win32
Win64
Related Topics:
Glossary
D3DCreate
D3DRender
D3DSetWorldView
D3DSetWorldViewIdentity
D3DSetProjectionType
D3DGetProjectionType
Examples:
Visual Basic .Net - VB.NET GPU Example
Visual C++ - VC GPU Demo
HRESULT D3DSetWorldViewIdentity ( CVD3D  d3d)

This function resets the world view used to render to an identity matrix, meaning no rotation and translation is applied.

Attention
To use this functions ensure that the projection type is set to TPT_PERSPECTIVE.
Parameters
[in]d3dThe D3D context.
Returns
0 if no error occurred, otherwise a value != 0 indicates the error code.
Supported platforms:
Win32
Win64
Related Topics:
Glossary
D3DCreate
D3DRender
D3DSetWorldView
D3DSetProjectionType
D3DGetProjectionType
Examples:
Delphi - Delphi BayerToRGB Example
Visual Basic .Net - VB.NET GPU Example
Visual C++ - VC GPU Demo