Main Page Namespace List Class Hierarchy Compound List File List Namespace Members Compound Members
WPCG::WP_GLState Class Reference
#include <WP_GLState.h>
List of all members.
Detailed Description
this singleton class keeps track of OpenGL's internal state and prevents redundant and expensive state changes
-
Author:
-
Copyright (C) 2001 W.P. van Paassen peter@paassen.tmfweb.nl
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Constructor & Destructor Documentation
WPCG::WP_GLState::~WP_GLState |
( |
|
) |
[inline] |
|
Member Function Documentation
void WPCG::WP_GLState::disableBlending |
( |
|
) |
[inline] |
|
|
this function disables blending in OpenGL |
void WPCG::WP_GLState::disableCulling |
( |
|
) |
[inline] |
|
|
this function disables (polygon) culling in OpenGL |
void WPCG::WP_GLState::disableDepthTest |
( |
|
) |
[inline] |
|
|
this function disables depth testing (z-buffering) in OpenGL |
void WPCG::WP_GLState::disableFog |
( |
|
) |
[inline] |
|
|
this function disables fog in OpenGL |
void WPCG::WP_GLState::disableLight0 |
( |
|
) |
[inline] |
|
|
this function disables light 0 in OpenGL |
void WPCG::WP_GLState::disableLight1 |
( |
|
) |
[inline] |
|
|
this function disables light 1 in OpenGL |
void WPCG::WP_GLState::disableLight2 |
( |
|
) |
[inline] |
|
|
this function disables light 2 in OpenGL |
void WPCG::WP_GLState::disableLight3 |
( |
|
) |
[inline] |
|
|
this function disables light 3 in OpenGL |
void WPCG::WP_GLState::disableLight4 |
( |
|
) |
[inline] |
|
|
this function disables light 4 in OpenGL |
void WPCG::WP_GLState::disableLight5 |
( |
|
) |
[inline] |
|
|
this function disables light 5 in OpenGL |
void WPCG::WP_GLState::disableLight6 |
( |
|
) |
[inline] |
|
|
this function disables light 6 in OpenGL |
void WPCG::WP_GLState::disableLight7 |
( |
|
) |
[inline] |
|
|
this function disables light 7 in OpenGL |
void WPCG::WP_GLState::disableLighti |
( |
GLuint |
number |
) |
|
|
|
a helper function for disabling the use of light number in OpenGL -
Parameters:
-
number |
the number of the to be disabled light. Values from 0 - 7 are valid |
|
void WPCG::WP_GLState::disableLighting |
( |
|
) |
[inline] |
|
|
this function disables lighting in OpenGL |
void WPCG::WP_GLState::disableNormalize |
( |
|
) |
[inline] |
|
|
this function disables normalizing of normal vectors in OpenGL |
void WPCG::WP_GLState::disablePolygonSmooth |
( |
|
) |
[inline] |
|
|
this function disables the smoothing of polygons in OpenGL |
void WPCG::WP_GLState::disableTexture2D |
( |
|
) |
[inline] |
|
|
this function disables 2D texture mapping in OpenGL |
void WPCG::WP_GLState::enableBlending |
( |
|
) |
[inline] |
|
|
this function enables blending in OpenGL |
void WPCG::WP_GLState::enableCulling |
( |
|
) |
[inline] |
|
|
this function enables (polygon) culling in OpenGL |
void WPCG::WP_GLState::enableDepthTest |
( |
|
) |
[inline] |
|
|
this function enables depth testing (z-buffering) in OpenGL |
void WPCG::WP_GLState::enableFog |
( |
|
) |
[inline] |
|
|
this function enables fog in OpenGL |
void WPCG::WP_GLState::enableLight0 |
( |
|
) |
[inline] |
|
|
this function enables light 0 in OpenGL |
void WPCG::WP_GLState::enableLight1 |
( |
|
) |
[inline] |
|
|
this function enables light 1 in OpenGL |
void WPCG::WP_GLState::enableLight2 |
( |
|
) |
[inline] |
|
|
this function enables light 2 in OpenGL |
void WPCG::WP_GLState::enableLight3 |
( |
|
) |
[inline] |
|
|
this function enables light 3 in OpenGL |
void WPCG::WP_GLState::enableLight4 |
( |
|
) |
[inline] |
|
|
this function enables light 4 in OpenGL |
void WPCG::WP_GLState::enableLight5 |
( |
|
) |
[inline] |
|
|
this function enables light 5 in OpenGL |
void WPCG::WP_GLState::enableLight6 |
( |
|
) |
[inline] |
|
|
this function enables light 6 in OpenGL |
void WPCG::WP_GLState::enableLight7 |
( |
|
) |
[inline] |
|
|
this function enables light 7 in OpenGL |
void WPCG::WP_GLState::enableLighti |
( |
GLuint |
number |
) |
|
|
|
a helper function for enabling the use of light number in OpenGL -
Parameters:
-
number |
the number of the to be enabled light. Values from 0 - 7 are valid |
|
void WPCG::WP_GLState::enableLighting |
( |
|
) |
[inline] |
|
|
this function enables lighting in OpenGL |
void WPCG::WP_GLState::enableNormalize |
( |
|
) |
[inline] |
|
|
this function enables normalizing of normal vectors in OpenGL |
void WPCG::WP_GLState::enablePolygonSmooth |
( |
|
) |
[inline] |
|
|
this function enables the smooting of polygons in OpenGL |
void WPCG::WP_GLState::enableTexture2D |
( |
|
) |
[inline] |
|
|
this function enables 2D texture mapping in OpenGL |
WP_GLState* WPCG::WP_GLState::getInstance |
( |
|
) |
[inline, static] |
|
|
this static function is used to obtain an instance of this class -
Returns:
-
a pointer to a WP_GLState object by which OpenGL's internal state must be changed
|
void WPCG::WP_GLState::modelview |
( |
|
) |
[inline] |
|
|
this function changes the matrixmode to GL_MODELVIEW in OpenGL |
void WPCG::WP_GLState::projection |
( |
|
) |
[inline] |
|
|
this function changes the matrixmode to GL_PROJECTION in OpenGL |
int WPCG::WP_GLState::render_mode |
( |
|
) |
[inline] |
|
|
this function changes the rendering mode to framebuffer mode (GL_RENDER). This is used for the actual rendering to the screen -
Returns:
-
the number of hits (objects) by drawing into the selection buffer, 0 if previous mode was not selection mode
|
void WPCG::WP_GLState::selection_mode |
( |
|
) |
[inline] |
|
|
this function changes the rendering mode to selection mode. This is used for rendering into the selection buffer instead into the frame_buffer |
Member Data Documentation
WP_GLState * WPCG::WP_GLState::_instance = 0 [static]
|
|
|
a static WP_GLState pointer to the only instance (singleton) of this class |
bool WPCG::WP_GLState::_modelview
|
|
|
a boolean indicating if the current matrix mode is GL_MODELVIEW in OpenGL |
bool WPCG::WP_GLState::_projection
|
|
|
a boolean indicating if the current matrix mode is GL_PROJECTION in OpenGL |
bool WPCG::WP_GLState::_selection
|
|
|
a boolean indicating if the current rendering mode is selection buffer rendering |
bool WPCG::WP_GLState::blending
|
|
|
a boolean indicating if blending is enabled in OpenGL |
bool WPCG::WP_GLState::culling
|
|
|
a boolean indicating if culling is enabled in OpenGL |
bool WPCG::WP_GLState::depthTest
|
|
|
a boolean indicating if depth testing (z-buffering) is enabled in OpenGL |
bool WPCG::WP_GLState::fog
|
|
|
a boolean indicating if fog is enabled in OpenGL |
bool WPCG::WP_GLState::light0
|
|
|
a boolean indicating if light 0 is enabled in OpenGL |
bool WPCG::WP_GLState::light1
|
|
|
a boolean indicating if light 1 is enabled in OpenGL |
bool WPCG::WP_GLState::light2
|
|
|
a boolean indicating if light 2 is enabled in OpenGL |
bool WPCG::WP_GLState::light3
|
|
|
a boolean indicating if light 3 is enabled in OpenGL |
bool WPCG::WP_GLState::light4
|
|
|
a boolean indicating if light 4 is enabled in OpenGL |
bool WPCG::WP_GLState::light5
|
|
|
a boolean indicating if light 5 is enabled in OpenGL |
bool WPCG::WP_GLState::light6
|
|
|
a boolean indicating if light 6 is enabled in OpenGL |
bool WPCG::WP_GLState::light7
|
|
|
a boolean indicating if light 7 is enabled in OpenGL |
bool WPCG::WP_GLState::lighting
|
|
|
a boolean indicating if lighting is enabled in OpenGL |
bool WPCG::WP_GLState::normalize
|
|
|
a boolean indicating if every normal will be normalized by OpenGL |
bool WPCG::WP_GLState::polygonSmooth
|
|
|
a boolean indicating if polygon smoothing is enabled in OpenGL |
bool WPCG::WP_GLState::texture2D
|
|
|
a boolean indicating if 2D texture mapping is enabled in OpenGL |
The documentation for this class was generated from the following files:
Generated on Tue Jan 28 20:26:39 2003 by
1.2.14 written by Dimitri van Heesch,
© 1997-2002