Results 1 to 36 of 36

Thread: [Resolved] draw text in object space [VB,DX8]

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2001
    Location
    Sweden
    Posts
    174

    [Resolved] draw text in object space [VB,DX8]

    I need to write some text on the screen, but my coordinates is a D3DVECTOR datatype. Is it either possible to write text directly in objectspace or do I need to convert objectspace to screen coordinates?

    Tried the code similar to this but it just get messed-up coordinates:

    VB Code:
    1. Dim vp As D3DVIEWPORT8
    2. Dim objCoord As D3DVECTOR
    3. Dim scrCoord As D3DVECTOR
    4.  
    5. D3DDevice.GetViewport vp
    6. D3DDevice.GetTransform D3DTS_PROJECTION, matProj
    7. D3DDevice.GetTransform D3DTS_VIEW, matView
    8. D3DDevice.GetTransform D3DTS_WORLD, matWorld
    9.  
    10. objCoord = myCoordinatesHere
    11.  
    12. D3DXVec3Project scrCoord, objCoord, vp, matProj, matView, matWorld

    Any suggestions?
    Last edited by eXterminator; Nov 22nd, 2004 at 08:31 AM.
    [In time of development time stands still]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width