Jump to content
  • Advertisement

Archived

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

Teknofreek

Easy way to render colored wireframes?

This topic is 5942 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 some stuff that I''m rendering as line lists to generate wireframe renderings. I want to be able to color the wireframe, but I really don''t need the color to vary over the wireframe, so storing a diffuse color per-vertex seems like over-kill to me. Is there an easy and efficient way to render these suckers all in one color without adding diffuse color to my FVF? -John

Share this post


Link to post
Share on other sites
Advertisement
you don''t need to render as linelists to render wire frame:
see SetRenderState(D3DRS_FILLMODE,FILLMODE_WIREFRAME) or something like that, i can''t remember exactly.
Basically theere''s a fill mode renderstate you can set to wireframe.
then you can just render geometry like normal (as tri lists or whatever you''re using)
if you wanted to change the colour you could perhaps use lighting and materials and apply a material of a particular colour to everything, which would save having to use the diffuse colour at each vertex.

HTH
Toby

Gobsmacked - by Toby Murray

Share this post


Link to post
Share on other sites
>>you don''t need to render as linelists to render wire frame: see SetRenderState(D3DRS_FILLMODE,FILLMODE_WIREFRAME) or something like that, i can''t remember exactly.<<

That''s cool. But actually, in this case, I just want to do it the line list way, since I''m not exactly doing a wireframe per triangle.

>>if you wanted to change the colour you could perhaps use lighting and materials and apply a material of a particular colour to everything, which would save having to use the diffuse colour at each vertex.<<

I could be wrong, but doesn''t using a material and lighting to color an object require a diffuse and/or normal anyway? Besides that though, rendering with lighting would be more intensive than I''d want to spend for wireframes...since I just want ''em a solid color.

Thanks for the ideas though!

-John

Share this post


Link to post
Share on other sites
Or use a Vertex Shader using a colour as a constant?

Neil

WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!