Rendering both sides of a mesh.

Started by
2 comments, last by Mastadex 19 years, 4 months ago
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.
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.
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.
-- Jonathan
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.

This topic is closed to new replies.

Advertisement