All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GBufferMaterialGenerator.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2014 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 #ifndef _GBUFFER_MATERIAL_GENERATOR_HH_
18 #define _GBUFFER_MATERIAL_GENERATOR_HH_
19 
21 #include "gazebo/util/system.hh"
22 
23 namespace gazebo
24 {
25  namespace rendering
26  {
34  {
36  public: enum GBufferType
37  {
40  GBT_FAT
41  };
42 
45  public: enum GBufferPermutations
46  {
47  // (Regular) Textures
48  GBP_NO_TEXTURES = 0x00000000,
49  GBP_ONE_TEXTURE = 0x00000001,
50  GBP_TWO_TEXTURES = 0x00000002,
51  GBP_THREE_TEXTURES = 0x00000003,
52  GBP_TEXTURE_MASK = 0x0000000F,
53 
54  // Material properties
55  GBP_HAS_DIFFUSE_COLOUR = 0x00000010,
56 
57  // The number of texture coordinate sets
58  GBP_NO_TEXCOORDS = 0x00000000,
59  GBP_ONE_TEXCOORD = 0x00000100,
60  GBP_TWO_TEXCOORDS = 0x00000200,
61  GBP_TEXCOORD_MASK = 0x00000700,
62 
63  // Do we have a normal map
64  GBP_NORMAL_MAP = 0x00000800,
65 
66  // Are we skinned?
67  GBP_SKINNED = 0x00010000
68  };
69 
71  public: GBufferMaterialGenerator(GBufferType _type);
72 
73  // The mask of the flags that matter for generating the fragment shader
74  public: static const uint32_t FS_MASK = 0x0000FFFF;
75 
76  // The mask of the flags that matter for generating the vertex shader
77  public: static const uint32_t VS_MASK = 0x00FFFF00;
78 
79  // The mask of the flags that matter for generating the material
80  public: static const uint32_t MAT_MASK = 0xFF00FFFF;
81  };
82  }
83 }
84 
85 #endif
Class for generating materials for objects to render themselves to the GBuffer.
Definition: GBufferMaterialGenerator.hh:33
GBufferPermutations
The relevant options for objects that are rendered to the GBuffer.
Definition: GBufferMaterialGenerator.hh:45
Definition: GBufferMaterialGenerator.hh:39
GBufferType
The types of g buffers.
Definition: GBufferMaterialGenerator.hh:36
Caching, on-the-fly material generator.
Definition: MaterialGenerator.hh:39
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48