• Advertisement

Archived

This topic is now archived and is closed to further replies.

What would cause this?

This topic is 5589 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
by the way I''m calling present like this:
assert(SUCCEEDED(dev->present(0,0,0,0)));
and dev is valid.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement