Jump to content
  • Advertisement
Sign in to follow this  
derek7

D3D odd thing

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

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?

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!