HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GR_Defines.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: GR_Defines.h
7  *
8  * COMMENTS: Drawing definitions for the render library.
9  *
10  */
11 
12 
13 #ifndef __GR_Defines_h__
14 #define __GR_Defines_h__
15 
16 #include <UT/UT_VectorTypes.h>
17 
18 #define GR_DRAW_WIREFRAME 0x01
19 #define GR_DRAW_SHADED 0x02
20 
22 {
26 };
27 
28 // public shading modes the user can see
30 {
43 };
44 
45 // private shading modes the renderer uses
47 {
48  // Beauty modes
49  GR_RENDER_BEAUTY, // Shaded, lit
50  GR_RENDER_MATERIAL, // Shaded, material components for HQ Lighting
51  GR_RENDER_CONSTANT, // Solid, constant color/alpha
52 
53  // Wireframe modes
54  GR_RENDER_WIREFRAME, // Line outline
55  GR_RENDER_HIDDEN_LINE, // Line outline, hidden lines removed
56  GR_RENDER_XRAY_LINE, // Line outline, hidden lines dimmed
57  GR_RENDER_GHOST_LINE, // Line outline, BG color fill w/ghost color
58  GR_RENDER_MATERIAL_WIREFRAME, // Line outline pass following material pass
59 
60  // Utility modes
61  GR_RENDER_DEPTH, // Solid, depth only
62  GR_RENDER_DEPTH_CUBE, // Depth only, 6 faces of a cubemap
63  GR_RENDER_DEPTH_LINEAR, // Solid, depth only, non-projected depth
64  GR_RENDER_DEPTH_CASCADING, // Depth only, cascaching shadowmap
65  GR_RENDER_MATTE, // Solid, constant color/alpha, depth-check
66  GR_RENDER_XRAY, // XRay Render geometry
67  GR_RENDER_OBJECT_PICK, // Object selection
68  GR_RENDER_SHADER_AS_IS, // Render the geometry without setting a shader
69  GR_RENDER_SNAP, // Render geometry attribs {N.x, N.y, Z}
70  GR_RENDER_SELECTION_ID, // Render a unique pick ID for selected prims
71 
72  // Bounding box modes
73  GR_RENDER_BBOX, // Bounding boxes only
74 
75  GR_RENDER_POST_PASS, // A post-pass was requested by a primitive
76 
80 };
81 
82 // bitfield for modifying the basic GR_RenderMode. A flag may not apply to all
83 // render modes (like a FLAT_SHADED and GR_RENDER_WIREFRAME combination).
85 {
87 
98 
102  GR_RENDER_FLAG_IMAGE = 0xC00, // alias to UV Pos
103 
108 
111 };
112 
114 {
115  GR_ALPHA_PASS_OPAQUE = 0x1, // Only opaque objects
116  GR_ALPHA_PASS_NORMAL = 0x2, // All transparent objects
117  GR_ALPHA_PASS_INVISIBLE = 0x4, // Don't render in any pass.
118 
119  GR_ALPHA_PASS_ALL = 0x3 // Ignore alpha and render all objects.
120 };
121 
123 {
124  GR_SHADING_SOLID, // only draw solid objects
125  GR_SHADING_WIREFRAME, // only draw wireframe objects
126  GR_SHADING_LIGHT_MASK, // HQ Lighting - only the mask
127  GR_SHADING_ANY // ignore object shading mode; draw everything.
128 };
129 
131 {
135 };
136 
138 {
144 };
145 
147 {
149 
157 
164 
169 
170  GR_MAX_DECORATIONS, // max number of builtin decorations
171 
174 };
175 
177 {
182 };
183 
185 {
190 
192 };
193 
195 {
199 
201 };
202 
204 {
206 
212 };
213 
215 {
222 };
223 
225 {
233 };
234 
236 {
237  GR_PICK_NONE = 0x0000,
238 
239  // For single picking from a buffer.
240  GR_PICK_SINGLE = 0x0001,
241 
242  // For multi-component picking.
246 
247  // For picking in UV viewports.
250  GR_PICK_UV_FLAG = 0x0300,
251 
252  // Indicates we are picking to do snapping.
254  // Don't allow picking of selected components (mostly to avoid snapping
255  // to geometry that is being moved).
257  // Invert the sense of the box/lasso/paint pick (outside is selected)
258  GR_PICK_OUTSIDE = 0x4000,
259  // As if the surface was wireframe
260  GR_PICK_AS_WIRE = 0x8000,
261 
262  // As if the surface was one solid shape
263  GR_PICK_PACKED = 0x10000,
264  // reduced ID render for selection prims
266 
267  // OpenGL 4.2 (GL_ARB_image_load_store) based picking.
268  GR_PICK_GL42 = 0x1000000
269 };
270 
272 {
273 public:
275  : myUseObjectNodes(true),
276  myPickNonSelectable(false),
277  myPickTemplates(false),
278  myPickGhosted(true),
279  myPickXray(false)
280  { }
281 
282  // Controls whether details must be associated with object nodes. If false,
283  // any displayed detail is considered an "object" for picking purposes.
285 
290 };
291 
292 // bitfield for why GR_Primitive::update() was called.
293 // be sure to update GUI_RenderCommon.h:GUI_SetupResult if the bitfield gets
294 // larger than 0x8000.
296 {
297  GR_UNCHANGED = 0x0,
298 
299  GR_GEO_CHANGED = 0x001,
311  GR_LOD_CHANGED = 0x1000,
319 };
320 
322 {
324 
329 
330  // These don't strictly exist as attribute types,
331  // but are useful for selections.
334 
335  GR_ALL_ATTRIBS = 0xFFFFFFFF
336 };
337 
339 {
343 };
344 
346 {
347  GR_BASE_PRIM_NORMAL, // most primitives are normal prim types.
348 
349  GR_BASE_PRIM_PACKED, // container primitives
354 
355  GR_BASE_PRIM_VISUALIZE // visualizer output
356 };
357 
359 {
364 };
365 
367 {
370 };
371 
372 #include <UT/UT_Array.h>
373 #include <utility>
375 
376 #endif
GR_DecorRenderFlags
Definition: GR_Defines.h:214
GR_DecorationOverride
Definition: GR_Defines.h:203
GR_ParticleType
Definition: GR_Defines.h:137
GR_DecorFontType
Definition: GR_Defines.h:194
GR_AttribMask
Definition: GR_Defines.h:321
GR_AgentWireMode
Definition: GR_Defines.h:366
GR_Decoration
Definition: GR_Defines.h:146
GR_AlphaPass
Definition: GR_Defines.h:113
GR_DecorVisibility
Definition: GR_Defines.h:176
GR_ShadingPass
Definition: GR_Defines.h:122
GR_RenderMode
Definition: GR_Defines.h:46
GR_BasePrimType
Definition: GR_Defines.h:345
GR_ShadingMode
Definition: GR_Defines.h:29
GR_DecorFontSize
Definition: GR_Defines.h:184
GR_UpdateReason
Definition: GR_Defines.h:295
GR_PrimAcceptResult
Definition: GR_Defines.h:338
GR_RenderFlags
Definition: GR_Defines.h:84
UT_Array< std::pair< UT_Matrix4D, UT_Vector2i > > GR_FrustumList
Definition: GR_Defines.h:374
GR_RenderVersion
Definition: GR_Defines.h:21
GR_LightingPass
Definition: GR_Defines.h:130
GR_BoundaryMode
Definition: GR_Defines.h:358
GR_SelectMode
Definition: GR_Defines.h:224
GR_PickStyle
Definition: GR_Defines.h:235