0% found this document useful (0 votes)
106 views5 pages

11-OpenGL Visibility Detection Functions

The document discusses various OpenGL visibility detection functions including: 1) Polygon culling functions like glEnable(GL_CULL_FACE) and glCullFace() for back-face removal. 2) Depth buffer functions like glutInitDisplayMode() and glClear(GL_DEPTH_BUFFER_BIT) for initializing and activating the depth buffer. 3) Wireframe rendering functions like glPolygonMode() for displaying only object edges. 4) Depth cueing functions like glEnable(GL_FOG) and glFogi() for varying brightness based on distance from the viewer.

Uploaded by

Farewell
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
106 views5 pages

11-OpenGL Visibility Detection Functions

The document discusses various OpenGL visibility detection functions including: 1) Polygon culling functions like glEnable(GL_CULL_FACE) and glCullFace() for back-face removal. 2) Depth buffer functions like glutInitDisplayMode() and glClear(GL_DEPTH_BUFFER_BIT) for initializing and activating the depth buffer. 3) Wireframe rendering functions like glPolygonMode() for displaying only object edges. 4) Depth cueing functions like glEnable(GL_FOG) and glFogi() for varying brightness based on distance from the viewer.

Uploaded by

Farewell
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Smt. Kamala & Sri. Venkappa M.

Agadi
College of Engineering & Technology Lakshmeshwar – 582116
Department of Computer Science & Engineering

Subject: Computer Graphics & Visualization- Sub Code: 18CS62


Topic: OpenGL Visibility Detection Functions

Mr. Vikram Shirol


Associate Professor
Dept of CSE
[email protected]

Website: http://www.agadiengcollege.com : http://facebook.com/sksvlxr


: https://twitter.com/SKSVMACET_LXR
OpenGL Visibility-Detection Functions
OpenGL Polygon-Culling Functions
• Back-face removal is accomplished with the functions
glEnable (GL_CULL_FACE);
glCullFace (mode);
• Where ‘mode’ => GL_BACK / GL_FRONT / GL_FRONT_AND_BACK
• The culling routine is turned off with
glDisable (GL_CULL_FACE);
OpenGL Depth-Buffer Functions
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB |
GLUT_DEPTH);
• Depth buffer values can then be initialized with
glClear (GL_DEPTH_BUFFER_BIT);
• The OpenGL depth-buffer visibility-detection routines are activated
with the following function:
glEnable (GL_DEPTH_TEST);
• And we deactivate the depth-buffer routines with
glDisable (GL_DEPTH_TEST);
OpenGL Wire-Frame Surface-Visibility Methods
• A wire-frame display of a standard graphics object can be obtained in
OpenGL by requesting that only its edges are to be generated.
glPolygonMode (GL_FRONT_AND_BACK, GL_LINE);
• But this displays both visible and hidden edges.
OpenGL Depth-Cueing Function

• We can vary the brightness of an object as a function of its distance


from the viewing position with

glEnable (GL_FOG);
glFogi (GL_FOG_MODE, GL_ LINEAR);

You might also like