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
52  GR_RENDER_MATERIAL, // Shaded, material components for HQ Lighting
53  GR_RENDER_CONSTANT, // Solid, constant color/alpha
54 
55  // Wireframe modes
56  GR_RENDER_WIREFRAME, // Line outline
57  GR_RENDER_HIDDEN_LINE, // Line outline, hidden lines removed
58  GR_RENDER_XRAY_LINE, // Line outline, hidden lines dimmed
59  GR_RENDER_GHOST_LINE, // Line outline, BG color fill w/ghost color
60  GR_RENDER_MATERIAL_WIREFRAME, // Line outline pass following material pass
61 
62  // Utility modes
63  GR_RENDER_DEPTH, // Solid, depth only
64  GR_RENDER_DEPTH_CUBE, // Depth only, 6 faces of a cubemap
65  GR_RENDER_DEPTH_LINEAR, // Solid, depth only, non-projected depth
66  GR_RENDER_DEPTH_CASCADING, // Depth only, cascaching shadowmap
67  GR_RENDER_MATTE, // Solid, constant color/alpha, depth-check
68  GR_RENDER_XRAY, // XRay Render geometry
69  GR_RENDER_OBJECT_PICK, // Object selection
70  GR_RENDER_SHADER_AS_IS, // Render the geometry without setting a shader
71  GR_RENDER_SNAP, // Render geometry attribs {N.x, N.y, Z}
72  GR_RENDER_SELECTION_ID, // Render a unique pick ID for selected prims
73 
74  // Bounding box modes
75  GR_RENDER_BBOX, // Bounding boxes only
76 
77  GR_RENDER_POST_PASS, // A post-pass was requested by a primitive
78 
82 };
83 
84 // bitfield for modifying the basic GR_RenderMode. A flag may not apply to all
85 // render modes (like a FLAT_SHADED and GR_RENDER_WIREFRAME combination).
87 {
89 
100 
104  GR_RENDER_FLAG_IMAGE = 0xC00, // alias to UV Pos
105 
110 
113 
119 };
120 
122 {
123  GR_ALPHA_PASS_OPAQUE = 0x1, // Only opaque objects
124  GR_ALPHA_PASS_NORMAL = 0x2, // All transparent objects
125  GR_ALPHA_PASS_INVISIBLE = 0x4, // Don't render in any pass.
126 
127  GR_ALPHA_PASS_ALL = 0x3 // Ignore alpha and render all objects.
128 };
129 
131 {
132  GR_SHADING_SOLID, // only draw solid objects
133  GR_SHADING_WIREFRAME, // only draw wireframe objects
134  GR_SHADING_LIGHT_MASK, // HQ Lighting - only the mask
135  GR_SHADING_PRE_PASS, // prepass, usually for depth and g-buffer
136  GR_SHADING_ANY // ignore object shading mode; draw everything.
137 };
138 
140 {
141  GR_THREADING_SINGLE = 0x0, // Draw all prims, only single-threaded pass
142  GR_THREADING_PRE_MULTI = 0x1, // Draw prims that can't draw multi-threaded
143  GR_THREADING_MULTI = 0x2, // Draw prims that can draw multithreaded
144 };
145 
147 {
151 };
152 
154 {
160 };
161 
163 {
165 
173 
180 
185 
186  GR_MAX_DECORATIONS, // max number of builtin decorations
187 
190 };
191 
193 {
198 };
199 
201 {
206 
208 };
209 
211 {
215 
217 };
218 
220 {
222 
228 };
229 
231 {
239 };
240 
242 {
250 };
251 
253 {
254  GR_PICK_NONE = 0x0000,
255 
256  // For single picking from a buffer.
257  GR_PICK_SINGLE = 0x0001,
258 
259  // For multi-component picking.
263 
264  // For picking in UV viewports.
267  GR_PICK_UV_FLAG = 0x0300,
268 
269  // Indicates we are picking to do snapping.
271  // Don't allow picking of selected components (mostly to avoid snapping
272  // to geometry that is being moved).
274  // Invert the sense of the box/lasso/paint pick (outside is selected)
275  GR_PICK_OUTSIDE = 0x4000,
276  // As if the surface was wireframe
277  GR_PICK_AS_WIRE = 0x8000,
278 
279  // As if the surface was one solid shape
280  GR_PICK_PACKED = 0x10000,
281  // reduced ID render for selection prims
283 
284  // OpenGL 4.2 (GL_ARB_image_load_store) based picking.
285  GR_PICK_GL42 = 0x1000000
286 };
287 
289 {
290 public:
292  : myUseObjectNodes(true),
293  myPickNonSelectable(false),
294  myPickTemplates(false),
295  myPickGhosted(true),
296  myPickXray(false)
297  { }
298 
299  // Controls whether details must be associated with object nodes. If false,
300  // any displayed detail is considered an "object" for picking purposes.
302 
307 };
308 
309 // bitfield for why GR_Primitive::update() was called.
310 // be sure to update GUI_RenderCommon.h:GUI_SetupResult if the bitfield gets
311 // larger than 0x8000.
313 {
314  GR_UNCHANGED = 0x0,
315 
316  GR_GEO_CHANGED = 0x001,
328  GR_LOD_CHANGED = 0x1000,
340 };
341 
343 {
345 
350 
351  // These don't strictly exist as attribute types,
352  // but are useful for selections.
355 
356  GR_ALL_ATTRIBS = 0xFFFFFFFF
357 };
358 
360 {
364 };
365 
367 {
368  GR_BASE_PRIM_NORMAL, // most primitives are normal prim types.
369 
370  GR_BASE_PRIM_PACKED, // container primitives
375 
376  GR_BASE_PRIM_VISUALIZE // visualizer output
377 };
378 
380 {
385 };
386 
388 {
391 };
392 
393 #include <UT/UT_Array.h>
394 #include <utility>
396 
397 #include <UT/UT_IntrusivePtr.h>
400 class GR_Light;
402 
403 
404 #ifdef USE_VULKAN
405 #include <RV/RV_Type.h>
406 #else
407 typedef int RV_TextureRef;
408 class RV_TextureParms;
409 #endif
410 
412 {
414 };
415 
416 #include <UT/UT_BoundingBox.h>
417 #include <UT/UT_Matrix4.h>
418 #include <UT/UT_VectorTypes.h>
419 class RV_VKImage;
421 {
426 };
427 #endif
const UT_Vector3FArray & myFrustumPoints
Definition: GR_Defines.h:423
UT_IntrusivePtr< GR_Material > GR_MaterialPtr
Definition: GR_Defines.h:398
GR_DecorRenderFlags
Definition: GR_Defines.h:230
GR_DecorationOverride
Definition: GR_Defines.h:219
GR_ParticleType
Definition: GR_Defines.h:153
GR_DecorFontType
Definition: GR_Defines.h:210
const UT_BoundingBox & mySceneBounds
Definition: GR_Defines.h:424
GR_AttribMask
Definition: GR_Defines.h:342
GR_AgentWireMode
Definition: GR_Defines.h:387
GR_Decoration
Definition: GR_Defines.h:162
UT_IntrusivePtr< GR_Light > GR_LightPtr
Definition: GR_Defines.h:400
GR_AlphaPass
Definition: GR_Defines.h:121
float fpreal32
Definition: SYS_Types.h:200
int RV_TextureRef
Definition: GR_Defines.h:407
GR_DecorVisibility
Definition: GR_Defines.h:192
GR_ShadingPass
Definition: GR_Defines.h:130
GR_RenderMode
Definition: GR_Defines.h:48
GR_BasePrimType
Definition: GR_Defines.h:366
GR_ThreadingPass
Definition: GR_Defines.h:139
GR_ShadingMode
Definition: GR_Defines.h:31
Base class for all light types.
Definition: GR_Light.h:40
GR_DecorFontSize
Definition: GR_Defines.h:200
GR_UpdateReason
Definition: GR_Defines.h:312
GR_PrimAcceptResult
Definition: GR_Defines.h:359
GR_RenderFlags
Definition: GR_Defines.h:86
UT_Array< std::pair< UT_Matrix4D, UT_Vector2i > > GR_FrustumList
Definition: GR_Defines.h:395
GR_RenderVersion
Definition: GR_Defines.h:22
fpreal32 furthest
Definition: GR_Defines.h:413
fpreal32 closest
Definition: GR_Defines.h:413
GR_LightingPass
Definition: GR_Defines.h:146
GR_BoundaryMode
Definition: GR_Defines.h:379
const UT_Vector3D & myCameraPos
Definition: GR_Defines.h:422
GR_DepthExtremes myDepthExtremes
Definition: GR_Defines.h:425
GR_SelectMode
Definition: GR_Defines.h:241
GR_PickStyle
Definition: GR_Defines.h:252