Loading...
Searching...
No Matches
StencilMode.h
Go to the documentation of this file.
1
2//
3// SFML - Simple and Fast Multimedia Library
4// Copyright (C) 2007-2024 Laurent Gomila (laurent@sfml-dev.org)
5//
6// This software is provided 'as-is', without any express or implied warranty.
7// In no event will the authors be held liable for any damages arising from the use of this software.
8//
9// Permission is granted to anyone to use this software for any purpose,
10// including commercial applications, and to alter it and redistribute it freely,
11// subject to the following restrictions:
12//
13// 1. The origin of this software must not be misrepresented;
14// you must not claim that you wrote the original software.
15// If you use this software in a product, an acknowledgment
16// in the product documentation would be appreciated but is not required.
17//
18// 2. Altered source versions must be plainly marked as such,
19// and must not be misrepresented as being the original software.
20//
21// 3. This notice may not be removed or altered from any source distribution.
22//
24
25#pragma once
26
28// Headers
31
32
50
51
67
68
73typedef struct
74{
75 unsigned int value;
77
78
91
#define CSFML_GRAPHICS_API
sfStencilComparison
Enumeration of the stencil test comparisons that can be performed.
Definition StencilMode.h:40
@ sfStencilComparisonNotEqual
The stencil test passes if the new value is strictly unequal to the value in the stencil buffer.
Definition StencilMode.h:47
@ sfStencilComparisonGreaterEqual
The stencil test passes if the new value is greater than or equal to the value in the stencil buffer.
Definition StencilMode.h:45
@ sfStencilComparisonNever
The stencil test never passes.
Definition StencilMode.h:41
@ sfStencilComparisonEqual
The stencil test passes if the new value is strictly equal to the value in the stencil buffer.
Definition StencilMode.h:46
@ sfStencilComparisonLess
The stencil test passes if the new value is less than the value in the stencil buffer.
Definition StencilMode.h:42
@ sfStencilComparisonGreater
The stencil test passes if the new value is greater than the value in the stencil buffer.
Definition StencilMode.h:44
@ sfStencilComparisonLessEqual
The stencil test passes if the new value is less than or equal to the value in the stencil buffer.
Definition StencilMode.h:43
@ sfStencilComparisonAlways
The stencil test always passes.
Definition StencilMode.h:48
sfStencilUpdateOperation
Enumeration of the stencil buffer update operations.
Definition StencilMode.h:59
@ sfStencilUpdateOperationReplace
If the stencil test passes, the value in the stencil buffer is set to the new value.
Definition StencilMode.h:62
@ sfStencilUpdateOperationZero
If the stencil test passes, the value in the stencil buffer is set to zero.
Definition StencilMode.h:61
@ sfStencilUpdateOperationIncrement
If the stencil test passes, the value in the stencil buffer is incremented and if required clamped.
Definition StencilMode.h:63
@ sfStencilUpdateOperationInvert
If the stencil test passes, the value in the stencil buffer is bitwise inverted.
Definition StencilMode.h:65
@ sfStencilUpdateOperationDecrement
If the stencil test passes, the value in the stencil buffer is decremented and if required clamped.
Definition StencilMode.h:64
@ sfStencilUpdateOperationKeep
If the stencil test passes, the value in the stencil buffer is not modified.
Definition StencilMode.h:60
const sfStencilMode sfStencilMode_default
Define the default values for a StencilMode.
Definition StencilMode.h:96
Stencil modes for drawing.
Definition StencilMode.h:84
sfStencilValue stencilReference
The reference value we're performing the stencil test with.
Definition StencilMode.h:87
sfStencilValue stencilMask
The mask to apply to both the reference value and the value in the stencil buffer.
Definition StencilMode.h:88
bool stencilOnly
Whether we should update the color buffer in addition to the stencil buffer.
Definition StencilMode.h:89
sfStencilUpdateOperation stencilUpdateOperation
The update operation to perform if the stencil test passes.
Definition StencilMode.h:86
sfStencilComparison stencilComparison
The comparison we're performing the stencil test with.
Definition StencilMode.h:85
Stencil value type (also used as a mask)
Definition StencilMode.h:74
unsigned int value
The stored stencil value.
Definition StencilMode.h:75