Skip to main content
gamedev.net
🔒 Locked

Error Rendering Scene... Text Output

Started by Mark04 Jan 13, 2005 at 6:11 PM 1 replies 750+ views
Original Post
Mark04
Mark04
Hi I am using VB to render some scenes with object. I want to display some text such as showing the FPS. I am currently using this line in my Render() sub: D3DX.DrawText MyFont, RGB(255, 255, 255), "My String", MyRect, DT_LEFT But I am getting an error when I run the scene: "Error Rendering Scene" (#91: Unknown) Any info on what I might be doing wrong? Thanks in advance. Mark.
Drew_Benton
Drew_Benton
Ok I have never used DX in VB before - so here are some suggestions from comparing your code to this code.

1. Make sure the 'MyRect' has valid dimensions
2. Try using &HFFFFFFFF instead of RGB(255, 255, 255)
3. Try some other DT_'s

DT_LEFT          - The text appears along the left of the RECT (Left Justify)DT_TOP           - The text appears across the top of the RECT      DT_CENTER        - The text is centered horizontally in the RECT (Center Justify)  DT_RIGHT         - The text is along the right edge of the RECT (Right Justify)      DT_VCENTER       - The text is centered verticallyDT_BOTTOM        - The text appears along the bottom edgeDT_SINGLELINE    - The string passed is a single line - line feeds and carriage returns are                 - ignored


That is the best thing I have to offer for that code segment. Most important of all, make sure the MyFont is setup correctly.

- Drew

[edit]From another GD thread, they had to use the D3DColorXRGB function instead of the RGB to get it to work - so you can use that as well if the hex version fixes your problem. The link is here for the MSDN refrence.[/edit]
Mark04
Mark04
Hi,

Thanks for the reply.

I have tried those suggestions and am still getting the same error!?

Also, how do I set up the font as you mentioned in the previous reply?
Thanks

Mark.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.