Skip to main content
gamedev.net
🔒 Locked

Backface culling

Started by Rudan Jan 4, 2001 at 1:24 PM 1 replies 700+ views
Original Post
Rudan
Rudan
I''ve got two questions about backface culling and openGL. 1: When I was searching for info about backface culling I saw alot of people saying that you should use glEnable(GL_CULL_FACE) and not make your own cause it would just slow everything down. But when I made my own I gained about 15-20 fps. So, can someone explain why I should''nt use my own? 2: When using my own backface culling function I send it the vertices if the triangle to check. But the problem is that those vertices are part of a character, and these vertices are rotated using my own functions(not glRotate). So far everything works fine but then I rotate the whole character with glRotate and since my backface culling function doesn''t care about that last rotation of the whole character you can rotate around the character and you see the triangles that are missing. Anyone got a solution to this? Kinda hard to explain, I hope someone understand. (Just tell me if you don''t get it, and i''ll try to explain better) Thanks...
-----------------------------Reporter: Are they slow-moving, chief?Sheriff: Yeah, they're dead. They're all messed up.-Night of the living dead
Julio
Julio
well, if you use opengl''s culling implimentation you''ll just stop the polygon from being drawn. If you use your own techinuque you can take that face out of the entire graphics pipeline. You won''t have to do any calculations you don''t need to.

HHSDrum@yahoo.com www.polarisoft.n3.net
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
Julio
Julio
oh, and to answer your second question. your own culling technique would be better here too. it culls faces that are drawn opposite of whatever is specified, counter clock-wise, or clock-wise order. you can change this with glCullFace(GL_CCW); (counter clock-wise) or glCullFace(GL_CW) (clock-wise). You might look into frustum culling. occulsion culling is always good though, sometimes I wonder if the extra calculations for occlusion culling are worth it. hope that helps,
Joe

HHSDrum@yahoo.com www.polarisoft.n3.net
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.