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 #include <UT/UT_Optional.h>
18 
19 #define GR_DRAW_WIREFRAME 0x01
20 #define GR_DRAW_SHADED 0x02
21 
23 {
28 };
29 
30 // public shading modes the user can see
32 {
45 };
46 
47 // private shading modes the renderer uses
49 {
50  // Beauty modes
51  GR_RENDER_BEAUTY, // Shaded, lit (GL)
53  GR_RENDER_UV = GR_RENDER_BEAUTY, // UV view (VK)
54  GR_RENDER_MATERIAL, // Shaded, material components for HQ Lighting
55  GR_RENDER_CONSTANT, // Solid, constant color/alpha
56 
57  // Wireframe modes
58  GR_RENDER_WIREFRAME, // Line outline
59  GR_RENDER_HIDDEN_LINE, // Line outline, hidden lines removed
60  GR_RENDER_XRAY_LINE, // Line outline, hidden lines dimmed
61  GR_RENDER_GHOST_LINE, // Line outline, BG color fill w/ghost color
62  GR_RENDER_MATERIAL_WIREFRAME, // Line outline pass following material pass
63 
64  // Utility modes
65  GR_RENDER_DEPTH, // Solid, depth only
66  GR_RENDER_DEPTH_CUBE, // Depth only, 6 faces of a cubemap
67  GR_RENDER_DEPTH_LINEAR, // Solid, depth only, non-projected depth
68  GR_RENDER_DEPTH_CASCADING, // Depth only, cascaching shadowmap
69  GR_RENDER_MATTE, // Solid, constant color/alpha, depth-check
70  GR_RENDER_XRAY, // XRay Render geometry
71  GR_RENDER_OBJECT_PICK, // Object selection
72  GR_RENDER_SHADER_AS_IS, // Render the geometry without setting a shader
73  GR_RENDER_SNAP, // Render geometry attribs {N.x, N.y, Z}
74  GR_RENDER_SELECTION_ID, // Render a unique pick ID for selected prims
75 
76  // Bounding box modes
77  GR_RENDER_BBOX, // Bounding boxes only
78 
79  GR_RENDER_POST_PASS, // A post-pass was requested by a primitive
80 
84 };
85 
86 // bitfield for modifying the basic GR_RenderMode. A flag may not apply to all
87 // render modes (like a FLAT_SHADED and GR_RENDER_WIREFRAME combination).
89 {
91 
102 
106  GR_RENDER_FLAG_IMAGE = 0xC00, // alias to UV Pos
107 
112 
114 
117 
123 };
124 
126 {
127  GR_ALPHA_PASS_OPAQUE = 0x1, // Only opaque objects
128  GR_ALPHA_PASS_NORMAL = 0x2, // All transparent objects
129  GR_ALPHA_PASS_INVISIBLE = 0x4, // Don't render in any pass.
130 
131  GR_ALPHA_PASS_ALL = 0x3 // Ignore alpha and render all objects.
132 };
133 
135 {
136  GR_SHADING_SOLID, // only draw solid objects
137  GR_SHADING_WIREFRAME, // only draw wireframe objects
138  GR_SHADING_LIGHT_MASK, // HQ Lighting - only the mask
139  GR_SHADING_PRE_PASS, // prepass, usually for depth and g-buffer
140  GR_SHADING_SHADOW, // shadow pass
141  GR_SHADING_ANY // ignore object shading mode; draw everything.
142 };
143 
145 {
146  GR_THREADING_SINGLE = 0x0, // Draw all prims, only single-threaded pass
147  GR_THREADING_PRE_MULTI = 0x1, // Draw prims that can't draw multi-threaded
148  GR_THREADING_MULTI = 0x2, // Draw prims that can draw multithreaded
149 };
150 
152 {
156 };
157 
159 {
165 };
166 
168 {
170 
178 
185 
190 
191  GR_MAX_DECORATIONS, // max number of builtin decorations
192 
195 };
196 
198 {
203 };
204 
206 {
211 
213 };
214 
216 {
220 
222 };
223 
225 {
227 
233 };
234 
236 {
244 };
245 
247 {
255 };
256 
258 {
259  GR_PICK_NONE = 0x0000,
260 
261  // For single picking from a buffer.
262  GR_PICK_SINGLE = 0x0001,
263 
264  // For multi-component picking.
268 
269  // For picking in UV viewports.
272  GR_PICK_UV_FLAG = 0x0300,
273 
274  // Indicates we are picking to do snapping.
276  // Don't allow picking of selected components (mostly to avoid snapping
277  // to geometry that is being moved).
279  // Invert the sense of the box/lasso/paint pick (outside is selected)
280  GR_PICK_OUTSIDE = 0x4000,
281  // As if the surface was wireframe
282  GR_PICK_AS_WIRE = 0x8000,
283 
284  // As if the surface was one solid shape
285  GR_PICK_PACKED = 0x10000,
286  // reduced ID render for selection prims
288 
289  // OpenGL 4.2 (GL_ARB_image_load_store) based picking.
290  GR_PICK_GL42 = 0x1000000
291 };
292 
294 {
295 public:
297  : myUseObjectNodes(true),
298  myPickNonSelectable(false),
299  myPickTemplates(false),
300  myPickGhosted(true),
301  myPickXray(false)
302  { }
303 
304  // Controls whether details must be associated with object nodes. If false,
305  // any displayed detail is considered an "object" for picking purposes.
307 
312 };
313 
314 // bitfield for why GR_Primitive::update() was called.
315 // be sure to update GUI_RenderCommon.h:GUI_SetupResult if the bitfield gets
316 // larger than 0x8000.
318 {
319  GR_UNCHANGED = 0x0,
320 
321  GR_GEO_CHANGED = 0x001,
333  GR_LOD_CHANGED = 0x1000,
345 };
346 
347 enum GR_AttribMask : unsigned
348 {
350 
355 
356  // These don't strictly exist as attribute types,
357  // but are useful for selections.
360 
361  GR_ALL_ATTRIBS = 0xFFFFFFFF
362 };
363 
365 {
369 };
370 
372 {
373  GR_BASE_PRIM_NORMAL, // most primitives are normal prim types.
374 
375  GR_BASE_PRIM_PACKED, // container primitives
380 
381  GR_BASE_PRIM_VISUALIZE // visualizer output
382 };
383 
385 {
390 };
391 
393 {
396 };
397 
398 // Connectivity types
399 #define GR_GEO_POINTS_IDX 0
400 #define GR_BASIC_WIRE_IDX 1
401 #define GR_GEO_WIRE_IDX 2
402 #define GR_GEO_SHADED_IDX 4
403 #define GR_GEO_ALL_SHADED 0x40000000
404 
405 #include <UT/UT_Array.h>
406 #include <utility>
408 
409 #include <UT/UT_IntrusivePtr.h>
412 class GR_Light;
414 
415 
416 #ifdef USE_VULKAN
417 #include <RV/RV_Type.h>
418 #else
419 typedef int RV_TextureRef;
420 class RV_TextureParms;
421 #endif
422 
424 {
426 };
427 
428 #include <UT/UT_BoundingBox.h>
429 #include <UT/UT_Matrix4.h>
430 #include <UT/UT_VectorTypes.h>
431 class RV_VKImage;
433 {
438 };
439 #endif
const UT_Vector3FArray & myFrustumPoints
Definition: GR_Defines.h:435
UT_IntrusivePtr< GR_Material > GR_MaterialPtr
Definition: GR_Defines.h:410
GR_DecorRenderFlags
Definition: GR_Defines.h:235
GR_DecorationOverride
Definition: GR_Defines.h:224
GR_ParticleType
Definition: GR_Defines.h:158
GR_DecorFontType
Definition: GR_Defines.h:215
const UT_BoundingBox & mySceneBounds
Definition: GR_Defines.h:436
GR_AgentWireMode
Definition: GR_Defines.h:392
GR_Decoration
Definition: GR_Defines.h:167
UT_IntrusivePtr< GR_Light > GR_LightPtr
Definition: GR_Defines.h:412
GR_AlphaPass
Definition: GR_Defines.h:125
float fpreal32
Definition: SYS_Types.h:200
int RV_TextureRef
Definition: GR_Defines.h:419
GR_AttribMask
Definition: GR_Defines.h:347
GR_DecorVisibility
Definition: GR_Defines.h:197
GR_ShadingPass
Definition: GR_Defines.h:134
GR_RenderMode
Definition: GR_Defines.h:48
GR_BasePrimType
Definition: GR_Defines.h:371
GR_ThreadingPass
Definition: GR_Defines.h:144
GR_ShadingMode
Definition: GR_Defines.h:31
Base class for all light types.
Definition: GR_Light.h:41
GR_DecorFontSize
Definition: GR_Defines.h:205
GR_UpdateReason
Definition: GR_Defines.h:317
GR_PrimAcceptResult
Definition: GR_Defines.h:364
GR_RenderFlags
Definition: GR_Defines.h:88
UT_Array< std::pair< UT_Matrix4D, UT_Vector2i > > GR_FrustumList
Definition: GR_Defines.h:407
GR_RenderVersion
Definition: GR_Defines.h:22
fpreal32 furthest
Definition: GR_Defines.h:425
fpreal32 closest
Definition: GR_Defines.h:425
GR_LightingPass
Definition: GR_Defines.h:151
GR_BoundaryMode
Definition: GR_Defines.h:384
const UT_Vector3D & myCameraPos
Definition: GR_Defines.h:434
GR_DepthExtremes myDepthExtremes
Definition: GR_Defines.h:437
GR_SelectMode
Definition: GR_Defines.h:246
GR_PickStyle
Definition: GR_Defines.h:257