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>
12 
13 namespace gte
14 {
15 
17 {
18 public:
19  enum GTE_IMPEXP Mode
20  {
22  BM_ONE,
32  BM_FACTOR,
37  BM_INV_SRC1_ALPHA
38  };
39 
40  enum GTE_IMPEXP Operation
41  {
45  OP_MIN,
46  OP_MAX
47  };
48 
49  enum GTE_IMPEXP ColorWrite
50  {
55  CW_ENABLE_ALL = 15
56  };
57 
59  {
60  NUM_TARGETS = 8
61  };
62 
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
Definition: GteBlendState.h:21
BM_DEST_ALPHA
Definition: GteBlendState.h:21
BM_INV_SRC_COLOR
Definition: GteBlendState.h:21
OP_ADD
Definition: GteBlendState.h:42
BM_INV_DEST_ALPHA
Definition: GteBlendState.h:21
BM_INV_DEST_COLOR
Definition: GteBlendState.h:21
BM_INV_FACTOR
Definition: GteBlendState.h:21
OP_REV_SUBTRACT
Definition: GteBlendState.h:42
BM_SRC1_ALPHA
Definition: GteBlendState.h:21
bool enableAlphaToCoverage
Definition: GteBlendState.h:80
GLenum target
Definition: glcorearb.h:1662
BM_ONE
Definition: GteBlendState.h:21
BM_INV_SRC_ALPHA
Definition: GteBlendState.h:21
BM_SRC_ALPHA_SAT
Definition: GteBlendState.h:21
CW_ENABLE_GREEN
Definition: GteBlendState.h:52
BM_SRC_COLOR
Definition: GteBlendState.h:21
OP_MIN
Definition: GteBlendState.h:42
BM_DEST_COLOR
Definition: GteBlendState.h:21
CW_ENABLE_RED
Definition: GteBlendState.h:51
OP_SUBTRACT
Definition: GteBlendState.h:42
BM_SRC_ALPHA
Definition: GteBlendState.h:21
bool enableIndependentBlend
Definition: GteBlendState.h:81
BM_ZERO
Definition: GteBlendState.h:21
BM_INV_SRC1_COLOR
Definition: GteBlendState.h:21
CW_ENABLE_BLUE
Definition: GteBlendState.h:53
CW_ENABLE_ALPHA
Definition: GteBlendState.h:54
unsigned int sampleMask
Definition: GteBlendState.h:84
BM_SRC1_COLOR
Definition: GteBlendState.h:21
Vector4< float > blendColor
Definition: GteBlendState.h:83
#define GTE_IMPEXP
Definition: GTEngineDEF.h:63


geometric_tools_engine
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 03:59:59