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 
115 
121 };
122 
124 {
125  GR_ALPHA_PASS_OPAQUE = 0x1, // Only opaque objects
126  GR_ALPHA_PASS_NORMAL = 0x2, // All transparent objects
127  GR_ALPHA_PASS_INVISIBLE = 0x4, // Don't render in any pass.
128 
129  GR_ALPHA_PASS_ALL = 0x3 // Ignore alpha and render all objects.
130 };
131 
133 {
134  GR_SHADING_SOLID, // only draw solid objects
135  GR_SHADING_WIREFRAME, // only draw wireframe objects
136  GR_SHADING_LIGHT_MASK, // HQ Lighting - only the mask
137  GR_SHADING_PRE_PASS, // prepass, usually for depth and g-buffer
138  GR_SHADING_ANY // ignore object shading mode; draw everything.
139 };
140 
142 {
143  GR_THREADING_SINGLE = 0x0, // Draw all prims, only single-threaded pass
144  GR_THREADING_PRE_MULTI = 0x1, // Draw prims that can't draw multi-threaded
145  GR_THREADING_MULTI = 0x2, // Draw prims that can draw multithreaded
146 };
147 
149 {
153 };
154 
156 {
162 };
163 
165 {
167 
175 
182 
187 
188  GR_MAX_DECORATIONS, // max number of builtin decorations
189 
192 };
193 
195 {
200 };
201 
203 {
208 
210 };
211 
213 {
217 
219 };
220 
222 {
224 
230 };
231 
233 {
241 };
242 
244 {
252 };
253 
255 {
256  GR_PICK_NONE = 0x0000,
257 
258  // For single picking from a buffer.
259  GR_PICK_SINGLE = 0x0001,
260 
261  // For multi-component picking.
265 
266  // For picking in UV viewports.
269  GR_PICK_UV_FLAG = 0x0300,
270 
271  // Indicates we are picking to do snapping.
273  // Don't allow picking of selected components (mostly to avoid snapping
274  // to geometry that is being moved).
276  // Invert the sense of the box/lasso/paint pick (outside is selected)
277  GR_PICK_OUTSIDE = 0x4000,
278  // As if the surface was wireframe
279  GR_PICK_AS_WIRE = 0x8000,
280 
281  // As if the surface was one solid shape
282  GR_PICK_PACKED = 0x10000,
283  // reduced ID render for selection prims
285 
286  // OpenGL 4.2 (GL_ARB_image_load_store) based picking.
287  GR_PICK_GL42 = 0x1000000
288 };
289 
291 {
292 public:
294  : myUseObjectNodes(true),
295  myPickNonSelectable(false),
296  myPickTemplates(false),
297  myPickGhosted(true),
298  myPickXray(false)
299  { }
300 
301  // Controls whether details must be associated with object nodes. If false,
302  // any displayed detail is considered an "object" for picking purposes.
304 
309 };
310 
311 // bitfield for why GR_Primitive::update() was called.
312 // be sure to update GUI_RenderCommon.h:GUI_SetupResult if the bitfield gets
313 // larger than 0x8000.
315 {
316  GR_UNCHANGED = 0x0,
317 
318  GR_GEO_CHANGED = 0x001,
330  GR_LOD_CHANGED = 0x1000,
342 };
343 
345 {
347 
352 
353  // These don't strictly exist as attribute types,
354  // but are useful for selections.
357 
358  GR_ALL_ATTRIBS = 0xFFFFFFFF
359 };
360 
362 {
366 };
367 
369 {
370  GR_BASE_PRIM_NORMAL, // most primitives are normal prim types.
371 
372  GR_BASE_PRIM_PACKED, // container primitives
377 
378  GR_BASE_PRIM_VISUALIZE // visualizer output
379 };
380 
382 {
387 };
388 
390 {
393 };
394 
395 #include <UT/UT_Array.h>
396 #include <utility>
398 
399 #include <UT/UT_IntrusivePtr.h>
402 class GR_Light;
404 
405 
406 #ifdef USE_VULKAN
407 #include <RV/RV_Type.h>
408 #else
409 typedef int RV_TextureRef;
410 class RV_TextureParms;
411 #endif
412 
414 {
416 };
417 
418 #include <UT/UT_BoundingBox.h>
419 #include <UT/UT_Matrix4.h>
420 #include <UT/UT_VectorTypes.h>
421 class RV_VKImage;
423 {
428 };
429 #endif
const UT_Vector3FArray & myFrustumPoints
Definition: GR_Defines.h:425
UT_IntrusivePtr< GR_Material > GR_MaterialPtr
Definition: GR_Defines.h:400
GR_DecorRenderFlags
Definition: GR_Defines.h:232
GR_DecorationOverride
Definition: GR_Defines.h:221
GR_ParticleType
Definition: GR_Defines.h:155
GR_DecorFontType
Definition: GR_Defines.h:212
const UT_BoundingBox & mySceneBounds
Definition: GR_Defines.h:426
GR_AttribMask
Definition: GR_Defines.h:344
GR_AgentWireMode
Definition: GR_Defines.h:389
GR_Decoration
Definition: GR_Defines.h:164
UT_IntrusivePtr< GR_Light > GR_LightPtr
Definition: GR_Defines.h:402
GR_AlphaPass
Definition: GR_Defines.h:123
float fpreal32
Definition: SYS_Types.h:200
int RV_TextureRef
Definition: GR_Defines.h:409
GR_DecorVisibility
Definition: GR_Defines.h:194
GR_ShadingPass
Definition: GR_Defines.h:132
GR_RenderMode
Definition: GR_Defines.h:48
GR_BasePrimType
Definition: GR_Defines.h:368
GR_ThreadingPass
Definition: GR_Defines.h:141
GR_ShadingMode
Definition: GR_Defines.h:31
Base class for all light types.
Definition: GR_Light.h:41
GR_DecorFontSize
Definition: GR_Defines.h:202
GR_UpdateReason
Definition: GR_Defines.h:314
GR_PrimAcceptResult
Definition: GR_Defines.h:361
GR_RenderFlags
Definition: GR_Defines.h:88
UT_Array< std::pair< UT_Matrix4D, UT_Vector2i > > GR_FrustumList
Definition: GR_Defines.h:397
GR_RenderVersion
Definition: GR_Defines.h:22
fpreal32 furthest
Definition: GR_Defines.h:415
fpreal32 closest
Definition: GR_Defines.h:415
GR_LightingPass
Definition: GR_Defines.h:148
GR_BoundaryMode
Definition: GR_Defines.h:381
const UT_Vector3D & myCameraPos
Definition: GR_Defines.h:424
GR_DepthExtremes myDepthExtremes
Definition: GR_Defines.h:427
GR_SelectMode
Definition: GR_Defines.h:243
GR_PickStyle
Definition: GR_Defines.h:254