Jump to content

  • Log In with Google      Sign In   
  • Create Account


Does OpenGL perform Hidden Surface Removal?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Gammastrahler   Members   -  Reputation: 150

Like
Likes
Like

Posted 20 June 2001 - 12:58 AM

hi all, this is my question! is HSR performed by opengl? or must i implement it for myself? thanks + greets gammastrahler

Sponsor:

#2 Null and Void   Moderators   -  Reputation: 1087

Like
Likes
Like

Posted 20 June 2001 - 01:09 AM

Yes and no. It only does generic stuff (like removal of polygons that face in one direction (clockwise or counter clockwise), and if the video card can do it, advanced Z-Buffer occlusion), and makes no assumptions about what you're trying to render. For advanced more occlusion (portals, BSP, quadtree, ROAM) you should write the code yourself.

[Resist Windows XP's Invasive Production Activation Technology!]

Edited by - Null and Void on June 20, 2001 8:11:38 AM

#3 Julio   Members   -  Reputation: 116

Like
Likes
Like

Posted 20 June 2001 - 01:20 AM

simply,
glEnable(GL_CULL_FACE);
glCullFace(GL_BACK); //can also use GL_FRONT, or GL_FRONT_AND_BACK

HHSDrum@yahoo.com

#4 Ingenu   Members   -  Reputation: 811

Like
Likes
Like

Posted 20 June 2001 - 01:39 AM

OpenGL does Hidden Surface Removal.
It''s called a Zbuffer or depth buffer and it removes hidden surfaces (surfaces behind other surfaces).

Back Face Culling (BFC) is another Hidden Surface Removal (HSR) technic which can be used along with Z-Buffering.
(And you really want to use it, it boost rendering)

BFC is not in a good pipeline position in the current OpenGL pipeline, and you should better do it yourself rather than ask OpenGL to do.
I think that they may/would be extensions to do the tests at a more appropriate place in the pipeline.


-* So many things to do, so little time to spend. *-


#5 KwamiMatrix   Members   -  Reputation: 122

Like
Likes
Like

Posted 21 June 2001 - 07:23 PM

As stated earlier, if you know that a particular part of an object is not going to be seen (like the inside of a closed box), then you can use glEnable(GL_CULL_FACE); If for instance, you want to compare the z axis distance of a already displayed pixel and a new pixel that will be placed in its spot, you would just use the debt buffer and call glEnable(GL_DEBTH_TEST); In the initializing code of your software, make sure that you clear out the structure with a call to glclear(GL_DEBTH_BUFFER_BIT);

Edem Attiogbe




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS