home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / Direct3D / Text3D / readme.txt < prev    next >
Encoding:
Text File  |  2001-10-10  |  2.2 KB  |  53 lines

  1. //-----------------------------------------------------------------------------
  2. // Name: Text3D Direct3D Sample
  3. // 
  4. // Copyright (c) 1998-2001 Microsoft Corporation. All rights reserved.
  5. //-----------------------------------------------------------------------------
  6.  
  7.  
  8. Description
  9. ===========
  10.    The Text3D sample shows how to draw 2D text and 3D text in a 3D scene. This 
  11.    is most useful for display stats, in game menus, etc.
  12.  
  13.  
  14. Path
  15. ====
  16.    Source:     DXSDK\Samples\Multimedia\D3D\Text3D
  17.    Executable: DXSDK\Samples\Multimedia\D3D\Bin
  18.  
  19.  
  20. User's Guide
  21. ============
  22.    The following keys are implemented. The dropdown menus can be used for the
  23.    same controls.
  24.       <Enter>     Starts and stops the scene
  25.       <Space>     Advances the scene by a small increment
  26.       <F1>        Shows help or available commands.
  27.       <F2>        Prompts user to select a new rendering device or display mode
  28.       <Alt+Enter> Toggles between fullscreen and windowed modes
  29.       <Esc>       Exits the app.
  30.  
  31.  
  32. Programming Notes
  33. =================
  34.    This sample uses the common class, CD3DFont, to display 2D text in a 3D
  35.    scene. The source code for the class can be found in the "common" directory
  36.    (described below), and is of most interest to this sample. The class uses
  37.    GDI to load a font and output each letter to a bitmap. That bitmap, in turn,
  38.    is used to create a texture.
  39.  
  40.    When the CD3DFont class' DrawText() function is called, a vertex buffer is
  41.    filled with polygons that are textured using the font texture created as 
  42.    mentioned above. The polygons may be drawn as a 2D overlay (useful for
  43.    printing stats, etc.) or truly integrated in the 3D scene.
  44.  
  45.    The sample also shows how to use D3DXCreateText() to create a D3DX mesh
  46.    containing a 3D model of a text string.  Note that D3DXCreateText may not
  47.    work with certain types of fonts, such as bitmap fonts and some symbol fonts.
  48.  
  49.    This sample makes use of common DirectX code (consisting of helper functions,
  50.    etc.) that is shared with other samples on the DirectX SDK. All common
  51.    headers and source code can be found in the following directory:
  52.       DXSDK\Samples\Multimedia\Common
  53.