Skip to main content
GameDev.net gamedev.net
🔒 Locked

Line Width

Started by guodah Apr 10, 2006 at 4:21 PM 3 replies 500+ views
Original Post
guodah
guodah
Hi, GD's, I tried to use ID3DXLine::SetWidth to set the width of a line, but this function always returns error. I have tried many values: 1.0f, 2.0f, 5.0f.... Anybody has an idea? Thanks a million! Dan
jollyjeffers
jollyjeffers
uhhm, what error?! [smile]

As in, give us some more details - whats the return code? Or, you can probably help yourself by using the debug runtimes - if you're mis-using a function the debug runtimes will scream and shout at you as to what it doesn't like (invalid parameter etc..). See the link in my signiture if you're not familiar with the debug runtimes.

hth
Jack
<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ |
circlesoft
circlesoft
If I remember correctly, you have to set the line width outside of the Begin() / End() pair. I did that once before and got the behavior you described.
Antheus
Antheus
Are you setting the width before begin?

line->SetWidth(x);line->Begin();line->Draw(...);line->End();


I'm not sure if calling SetWidth after begin would cause an error, but it wouldn't change the width.
guodah
guodah
Thanks, everybody.

Putting SetWidth outside Begin/End works. hahah, so happy.

Topic Locked

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

Sign in to reply to this topic.