D3D odd thing

Started by
6 comments, last by Illco 18 years, 10 months ago
if :FVF = D3DFVF_XYZ | D3DFVF_TEX1 |D3DFVF_DIFFUSE; set the renderstate :wireframe mode .so what happen? the wireframe color isn't the diffuse color . it is many color. if you have set D3DFVF_TEX1,and disable texture render .the above will happen. but why?
Advertisement
Hello,

I do not fully understand the situation, I do understand you use the FVF(D3DFVF_XYZ | D3DFVF_TEX1 | D3DFVF_DIFFUSE), then you set the renderstate fillingmode to wireframe? And then you render the scene?

It will really help if you post a screenshot of both situations.
Have you set the texture to NULL?
pDevice->SetTexture( 0, NULL );


Have you initialized the vertex color? If not D3D will access random colors and the lines will be colorful.

Greetz,

Illco

(/me wonders what happens if ratings drop to zero)
based on just your FVF, you're probably putting the diffuse after the texture which is the wrong order in the structure. The FVF flags in that order makes no difference by the way. It should be position, diffuse, and then texture coordinate in the structure.
Quote:Original post by Illco
(/me wonders what happens if ratings drop to zero)

Nothing earth-shattering, it has cons and pros.
Cons:
1) People will probably look down at you
2) People with low rating thresholds (in the control panel) won't see your posts or threads

Pros:
1) You can't be rated down anymore

It depends on your render states.

If you modulate texture with diffuse you'll get the texture and the diffuse color on your lines. You can SetTexture NULL to get only the diffuse without changing the states.

Or: If you only want the color of the diffuse member set colorop to selectarg and the selectarg to diffuse.

Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>

Quote:Original post by Illco
Have you set the texture to NULL?
pDevice->SetTexture( 0, NULL );


Have you initialized the vertex color? If not D3D will access random colors and the lines will be colorful.

Greetz,

Illco

(/me wonders what happens if ratings drop to zero)



I do SetTexture( 0, NULL ); and set diffuse red color,but wireframe is still colorful.
Note that the diffuse color you specified should be in each vertex. Consider Lee's suggestion. Also if the color differs from vertex to vertex, D3D will interpolate it along the primitive (line).

User rating: 0


Who knew! Really, Derek, isn't there any motivation for doing more research yourself? It seems you use GameDev as some highly-interactive tutorial which will guide you each step, but, looking back, have you learned anything? If so, I'm honestly (no really) interested in what your goals are and what you have achieved so far.

Greetz,

Illco

This topic is closed to new replies.

Advertisement