SmallChange
1.0.0
A collection of extensions to Coin3D
Loading...
Searching...
No Matches
GLDepthBufferElement.h
1
#ifndef SMALLCHANGE_GLDEPTHBUFFERELEMENT_H
2
#define SMALLCHANGE_GLDEPTHBUFFERELEMENT_H
3
4
/**************************************************************************\
5
* Copyright (c) Kongsberg Oil & Gas Technologies AS
6
* All rights reserved.
7
*
8
* Redistribution and use in source and binary forms, with or without
9
* modification, are permitted provided that the following conditions are
10
* met:
11
*
12
* Redistributions of source code must retain the above copyright notice,
13
* this list of conditions and the following disclaimer.
14
*
15
* Redistributions in binary form must reproduce the above copyright
16
* notice, this list of conditions and the following disclaimer in the
17
* documentation and/or other materials provided with the distribution.
18
*
19
* Neither the name of the copyright holder nor the names of its
20
* contributors may be used to endorse or promote products derived from
21
* this software without specific prior written permission.
22
*
23
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
\**************************************************************************/
35
36
#include <Inventor/elements/SoElement.h>
37
#include <Inventor/elements/SoSubElement.h>
38
39
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
40
#include <SoWinLeaveScope.h>
41
#endif
// win
42
43
#include <SmallChange/basic.h>
44
45
46
class
SMALLCHANGE_DLL_API
GLDepthBufferElement
:
public
SoElement
{
47
typedef
SoElement
inherited
;
48
49
SO_ELEMENT_HEADER(
GLDepthBufferElement
);
50
public
:
51
static
void
initClass(
void
);
52
protected
:
53
virtual
~GLDepthBufferElement
();
54
55
public
:
56
enum
Func {
57
NEVER,
58
ALWAYS,
59
LESS,
60
LEQUAL,
61
EQUAL,
62
GEQUAL,
63
GREATER,
64
NOTEQUAL
65
};
66
67
static
void
set(SoState * state,
const
Func func,
const
SbBool enable);
68
virtual
void
init(SoState * state);
69
virtual
void
push(SoState * state);
70
virtual
void
pop(SoState * state,
71
const
SoElement
* prevTopElement);
72
73
virtual
SbBool matches(
const
SoElement
* element)
const
;
74
virtual
SoElement
* copyMatchInfo(
void
)
const
;
75
76
private
:
77
void
updategl(
void
)
const
;
78
SbBool enable;
79
Func func;
80
};
81
82
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
83
#include <SoWinEnterScope.h>
84
#endif
85
86
#endif
// !SMALLCHANGE_GLDEPTHBUFFERELEMENT_H
GLDepthBufferElement
The SoGLDrawStyleElement controls the OpenGL depth buffer.
Definition
GLDepthBufferElement.h:46
SoElement
lib
SmallChange
elements
GLDepthBufferElement.h
Generated on Tue Sep 10 2024 20:35:47 for SmallChange by
1.10.0