What would cause this?

Started by
3 comments, last by ynoTWhit 21 years, 5 months ago
I have two little problems. First, sometimes when I go full screen depending on the resolution and bit depth, the IDirect3DDevice8:resent() fails, but clear, beginscene, and endscene were already called and didn''t fail. If you can help me with this I''d appreciate it. Secondly I coded a little spinning triangle thing, and it won''t rasertize right. It will only show bits and pieces of the actual triangle, its not textured, but its lit, and there culling was turned off, and lighting was turned on. Please if anyone has anyone ideas, I''d greatly appreciate it.
Advertisement
by the way I''m calling present like this:
assert(SUCCEEDED(dev->present(0,0,0,0)));
and dev is valid.
Not sure about the first problem but the second one
sounds like you did not set up the normals for each
vertex. Anytime lighting is on, you have to use
normals. That''s my uneducated guess anyways
,
Christopher

Don''t use assert like that. You don''t want your program to crash just if your device is lost! If Present does fail, then simply call Reset on the device.
I''m pretty sure that I set my normals up right, and still no success. I''m utterly confused. I''m using this FVF:

DFVF_XYZ|D3DFVF_NORMALS|D3DFVF_DIFFUSE|D3DFVF_SPECULAR

with this structure:

struct VERTEX {
float x, y, z, nx, ny, nz;
DWORD d, s;
}

If anyone can help me I''d greatly appreciate it, also it might help you to help me if I could post a picture of what the render looks like, is this possible? if so how do I do it? Thanks for you help. And present still fails after I validate the device.

This topic is closed to new replies.

Advertisement