Archived

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

Question about the FVFormat and a possible bug

This topic is 5241 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

Ok, I admit although a quick learner I am still very new to Direct3D so before I sumbit this to nvidia as a bug in their drivers I want to ask if I am using something badly. Ok, basically what I have is for my terrain I declare my vertex like (D3DFVF_XYZ | D3DFVF_NORMAL| D3DFVF_TEX2 | D3DFVF_PSIZE) For my terrain I have a position and a normal and dual texturing so that stuff is pretty standard. The questionsable usage is D3DFVF_PSIZE. First let me explain how I was using it. For each Vertex I was assigning them a TargetHeight that I stored in the space the D3DFVF_PSIZE reserves so that when an LOD changed I would alter the current height to be more like the target height until they were identical. My eventual plan was to have this accessible from the vertex for storing information for a vertex shader I have planned. I set it up correctly with the FVF define about and storing the variables in the struct in the correct order. I went on to use this struct for my terrain and it worked fine. It rendered using vertex buffers on my computer and every other computer just fine. It rendered using Index buffers on every other computer and the REF device just fine but not on my graphics card. This took me forever to find the bug but for some reason specifically on my Video card it wouldnt render any index buffers using a FVF with the D3DFVF_PSIZE flag. Is this a bug in their drivers for my vid card? Or is this something that I am even lucky it works on anything else using any Draw function. // Full Sail Student with a passion for games // This post in no way indicates my being awake when writing it

Share this post


Link to post
Share on other sites
PSize is meant for points, and point lists cannot be indexed, so maybe it''s something weird going on in the driver, but it''s also weird for your app to be using data this way.

Use D3DFVF_TEX3 | D3DFVF_D3DFVF_TEXCOORDSIZE1(2) instead, which will place the extra data as a single dimensional texture coord, which is pretty much the same thing, except more cards will like it.

Share this post


Link to post
Share on other sites
Yes, this is approximately the way I am implementing it now, I had a different struct before and was trying to keep it to a 32 byte structusing PSIZE instead of an extra TexCoord was "necessary" at that point heh. I have a feeling that struct size might be what the D3DFVF_D3DFVF_TEXCOORDSIZE1(2) in your post could be for, I dont recognize that and will look it up following this post. Ohh well.

// Full Sail Student with a passion for games
// This post in no way indicates my being awake when writing it

Share this post


Link to post
Share on other sites