DirectX SDK

ID3DXContext::DrawDebugText

The ID3DXContext::DrawDebugText method draws a null-terminated string to the render buffer.

HRESULT DrawDebugText(
  float topLeftX,
  float topLeftY,
  D3DCOLOR color,
  LPSTR pString
); 

Parameters

topLeftX
The x-coordinate of the top left corner of the string to be drawn on the render target.
topLeftY
The y-coordinate of the top left corner of the string to be drawn on the render target.
color
A D3DCOLOR type specifying the color of the string to be drawn on the render target.
pString
A pointer to the null-terminated string to be drawn on the render target.

Return Values

If the method succeeds, the return value is S_OK.

If the method fails, the return value may be one of the following values:

D3DXERR_NULLPOINTER
D3DXERR_FAILEDDRAWTEXT
DDERR_DCALREADYCREATED
DDERR_GENERIC
DDERR_INVALIDOBJECT
DDERR_INVALIDPARAMS
DDERR_INVALIDSURFACETYPE
DDERR_SURFACELOST
DDERR_UNSUPPORTED
DDERR_WASSTILLDRAWING

Remarks

This method is provided as a convenience for debugging and gathering information during development.

The coordinate and color parameters of this method each have a range of 0.0 to 1.0.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Version: Requires DirectX 7.0.
  Header: Declared in d3dxcore.h.
  Library: Use d3dx.lib.