Rendering both sides of a mesh.
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.
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.
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement