JP Bridges
Newcomer
- Joined
- Jul 19, 2003
- Messages
- 11
Folks,
Has anyody had any experience using Microsoft:irectX:irect3D::Line.
I'm using it and drawing lines but when the D3D Device gets reset (for example when you resize the window) the Device enters an invalid state. It basically says that I must uninitialise any state blocks associated with the device before it can be reset.
Now this only happens when I use Line... so I guess it's talking about state blocks associated with the line class.
Here is (in a roundabout way) what I'm doing.
1. Create Device...
2. On a paint event...
a) Line * pLine = new Line(device);
b) Set Line States (width, etc).
c) Device->BeginScene
d) Line->Begin
e) Line->Draw
f) Line->End
g) Device->EndScene
h) Device->Present
Now as stated this works great, until the device is reset, then it grumbles - pretty fatally.
Am I using Line correctly? Does anybody know why I get errors?
JP
Has anyody had any experience using Microsoft:irectX:irect3D::Line.
I'm using it and drawing lines but when the D3D Device gets reset (for example when you resize the window) the Device enters an invalid state. It basically says that I must uninitialise any state blocks associated with the device before it can be reset.
Now this only happens when I use Line... so I guess it's talking about state blocks associated with the line class.
Here is (in a roundabout way) what I'm doing.
1. Create Device...
2. On a paint event...
a) Line * pLine = new Line(device);
b) Set Line States (width, etc).
c) Device->BeginScene
d) Line->Begin
e) Line->Draw
f) Line->End
g) Device->EndScene
h) Device->Present
Now as stated this works great, until the device is reset, then it grumbles - pretty fatally.
Am I using Line correctly? Does anybody know why I get errors?
JP