Main Page
Namespaces
Classes
Files
File List
File Members
include
Graphics
GteBlendState.h
Go to the documentation of this file.
1
// David Eberly, Geometric Tools, Redmond WA 98052
2
// Copyright (c) 1998-2017
3
// Distributed under the Boost Software License, Version 1.0.
4
// http://www.boost.org/LICENSE_1_0.txt
5
// http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
6
// File Version: 3.0.0 (2016/06/19)
7
8
#pragma once
9
10
#include <
Mathematics/GteVector4.h
>
11
#include <
Graphics/GteDrawingState.h
>
12
13
namespace
gte
14
{
15
16
class
GTE_IMPEXP
BlendState
:
public
DrawingState
17
{
18
public
:
19
enum
GTE_IMPEXP
Mode
20
{
21
BM_ZERO
,
22
BM_ONE
,
23
BM_SRC_COLOR
,
24
BM_INV_SRC_COLOR
,
25
BM_SRC_ALPHA
,
26
BM_INV_SRC_ALPHA
,
27
BM_DEST_ALPHA
,
28
BM_INV_DEST_ALPHA
,
29
BM_DEST_COLOR
,
30
BM_INV_DEST_COLOR
,
31
BM_SRC_ALPHA_SAT
,
32
BM_FACTOR
,
33
BM_INV_FACTOR
,
34
BM_SRC1_COLOR
,
35
BM_INV_SRC1_COLOR
,
36
BM_SRC1_ALPHA
,
37
BM_INV_SRC1_ALPHA
38
};
39
40
enum
GTE_IMPEXP
Operation
41
{
42
OP_ADD
,
43
OP_SUBTRACT
,
44
OP_REV_SUBTRACT
,
45
OP_MIN
,
46
OP_MAX
47
};
48
49
enum
GTE_IMPEXP
ColorWrite
50
{
51
CW_ENABLE_RED
= 1,
52
CW_ENABLE_GREEN
= 2,
53
CW_ENABLE_BLUE
= 4,
54
CW_ENABLE_ALPHA
= 8,
55
CW_ENABLE_ALL = 15
56
};
57
58
enum
GTE_IMPEXP
59
{
60
NUM_TARGETS = 8
61
};
62
63
struct
GTE_IMPEXP
Target
64
{
65
bool
enable
;
// default: false
66
Mode
srcColor
;
// default: BM_ONE
67
Mode
dstColor
;
// default: BM_ZERO
68
Operation
opColor
;
// default: OP_ADD
69
Mode
srcAlpha
;
// default: BM_ONE
70
Mode
dstAlpha
;
// default: BM_ZERO
71
Operation
opAlpha
;
// default: OP_ADD
72
unsigned
char
mask
;
// default: CW_ENABLE_ALL
73
};
74
75
// Construction.
76
BlendState
();
77
78
// Member access. The members are intended to be write-once before
79
// you create an associated graphics state.
80
bool
enableAlphaToCoverage
;
// default: false
81
bool
enableIndependentBlend
;
// default: false
82
Target
target
[NUM_TARGETS];
83
Vector4<float>
blendColor
;
// default: (0,0,0,0)
84
unsigned
int
sampleMask
;
// default: 0xFFFFFFFF
85
};
86
87
}
BM_FACTOR
BM_FACTOR
Definition:
GteBlendState.h:21
BM_DEST_ALPHA
BM_DEST_ALPHA
Definition:
GteBlendState.h:21
BM_INV_SRC_COLOR
BM_INV_SRC_COLOR
Definition:
GteBlendState.h:21
OP_ADD
OP_ADD
Definition:
GteBlendState.h:42
gte::BlendState::Target::enable
bool enable
Definition:
GteBlendState.h:65
gte::BlendState::Target::opAlpha
Operation opAlpha
Definition:
GteBlendState.h:71
BM_INV_DEST_ALPHA
BM_INV_DEST_ALPHA
Definition:
GteBlendState.h:21
BM_INV_DEST_COLOR
BM_INV_DEST_COLOR
Definition:
GteBlendState.h:21
gte::DrawingState
Definition:
GteDrawingState.h:15
BM_INV_FACTOR
BM_INV_FACTOR
Definition:
GteBlendState.h:21
gte::BlendState::Target::mask
unsigned char mask
Definition:
GteBlendState.h:72
OP_REV_SUBTRACT
OP_REV_SUBTRACT
Definition:
GteBlendState.h:42
BM_SRC1_ALPHA
BM_SRC1_ALPHA
Definition:
GteBlendState.h:21
gte::BlendState::enableAlphaToCoverage
bool enableAlphaToCoverage
Definition:
GteBlendState.h:80
gte::BlendState::Target::opColor
Operation opColor
Definition:
GteBlendState.h:68
target
GLenum target
Definition:
glcorearb.h:1662
GteVector4.h
BM_ONE
BM_ONE
Definition:
GteBlendState.h:21
BM_INV_SRC_ALPHA
BM_INV_SRC_ALPHA
Definition:
GteBlendState.h:21
BM_SRC_ALPHA_SAT
BM_SRC_ALPHA_SAT
Definition:
GteBlendState.h:21
CW_ENABLE_GREEN
CW_ENABLE_GREEN
Definition:
GteBlendState.h:52
gte::BlendState::GTE_IMPEXP
GTE_IMPEXP
Definition:
GteBlendState.h:58
gte::BlendState::Target::dstColor
Mode dstColor
Definition:
GteBlendState.h:67
BM_SRC_COLOR
BM_SRC_COLOR
Definition:
GteBlendState.h:21
gte
Definition:
GLX/GteWICFileIO.h:16
gte::Vector< 4, Real >
OP_MIN
OP_MIN
Definition:
GteBlendState.h:42
BM_DEST_COLOR
BM_DEST_COLOR
Definition:
GteBlendState.h:21
CW_ENABLE_RED
CW_ENABLE_RED
Definition:
GteBlendState.h:51
gte::BlendState::Target::srcAlpha
Mode srcAlpha
Definition:
GteBlendState.h:69
OP_SUBTRACT
OP_SUBTRACT
Definition:
GteBlendState.h:42
BM_SRC_ALPHA
BM_SRC_ALPHA
Definition:
GteBlendState.h:21
gte::BlendState::enableIndependentBlend
bool enableIndependentBlend
Definition:
GteBlendState.h:81
gte::BlendState::Target::srcColor
Mode srcColor
Definition:
GteBlendState.h:66
BM_ZERO
BM_ZERO
Definition:
GteBlendState.h:21
BM_INV_SRC1_COLOR
BM_INV_SRC1_COLOR
Definition:
GteBlendState.h:21
CW_ENABLE_BLUE
CW_ENABLE_BLUE
Definition:
GteBlendState.h:53
CW_ENABLE_ALPHA
CW_ENABLE_ALPHA
Definition:
GteBlendState.h:54
gte::BlendState::sampleMask
unsigned int sampleMask
Definition:
GteBlendState.h:84
BM_SRC1_COLOR
BM_SRC1_COLOR
Definition:
GteBlendState.h:21
gte::BlendState::Target::dstAlpha
Mode dstAlpha
Definition:
GteBlendState.h:70
gte::BlendState::blendColor
Vector4< float > blendColor
Definition:
GteBlendState.h:83
gte::BlendState
Definition:
GteBlendState.h:16
gte::BlendState::Target
Definition:
GteBlendState.h:63
GTE_IMPEXP
#define GTE_IMPEXP
Definition:
GTEngineDEF.h:63
GteDrawingState.h
geometric_tools_engine
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 03:59:59