Jump to content
  • Advertisement
Sign in to follow this  
Mastadex

Rendering both sides of a mesh.

This topic is 4956 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 think the term for this is culling?? Correct me if Im wrong. What I want to do is have a face of a mesh be shown on both sides so when I rotate the mesh around it doesnt disapear half way. What are the steps involved? Im know, im a n00000b.

Share this post


Link to post
Share on other sites
Advertisement
What api are you using OpenGL or D3D. If you are using D3D you need to used a pointer of LPDIRECT3DDEVICE9 to ascess to SetRenderState
for example.
LPDIRECT3DDEVICE9 d3ddevicce9;
d3ddevice9->SetRenderState(D3DRS_CULLMODE,D3DCULL_NONE);


I do not rememeber how to do it in OpenGL.

Share this post


Link to post
Share on other sites
Just in case: under OpenGL disable culling do:
glDisable(GL_CULL_FACE);

By default OpenGL doesn't perform culling.

A useful thing to do can be to draw the front faces solid and the back faces as wireframe. (If you are having orientation problems.)

Under OpenGL, this would be:
glPolygonMode(GL_FRONT, GL_FILL);
glPolygonMode(GL_BACK, GL_LINE);

By default both front and back are filled.

I don't know about DirectX.

Share this post


Link to post
Share on other sites
ok cool.

Im using D3D. One problem i noticed is that if i turn it on, my graphics look a little garbled. especially if they are far in the distance.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!