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 {
27 };
28 
29 // public shading modes the user can see
31 {
44 };
45 
46 // private shading modes the renderer uses
48 {
49  // Beauty modes
50  GR_RENDER_BEAUTY, // Shaded, lit
51  GR_RENDER_MATERIAL, // Shaded, material components for HQ Lighting
52  GR_RENDER_CONSTANT, // Solid, constant color/alpha
53 
54  // Wireframe modes
55  GR_RENDER_WIREFRAME, // Line outline
56  GR_RENDER_HIDDEN_LINE, // Line outline, hidden lines removed
57  GR_RENDER_XRAY_LINE, // Line outline, hidden lines dimmed
58  GR_RENDER_GHOST_LINE, // Line outline, BG color fill w/ghost color
59  GR_RENDER_MATERIAL_WIREFRAME, // Line outline pass following material pass
60 
61  // Utility modes
62  GR_RENDER_DEPTH, // Solid, depth only
63  GR_RENDER_DEPTH_CUBE, // Depth only, 6 faces of a cubemap
64  GR_RENDER_DEPTH_LINEAR, // Solid, depth only, non-projected depth
65  GR_RENDER_DEPTH_CASCADING, // Depth only, cascaching shadowmap
66  GR_RENDER_MATTE, // Solid, constant color/alpha, depth-check
67  GR_RENDER_XRAY, // XRay Render geometry
68  GR_RENDER_OBJECT_PICK, // Object selection
69  GR_RENDER_SHADER_AS_IS, // Render the geometry without setting a shader
70  GR_RENDER_SNAP, // Render geometry attribs {N.x, N.y, Z}
71  GR_RENDER_SELECTION_ID, // Render a unique pick ID for selected prims
72 
73  // Bounding box modes
74  GR_RENDER_BBOX, // Bounding boxes only
75 
76  GR_RENDER_POST_PASS, // A post-pass was requested by a primitive
77 
81 };
82 
83 // bitfield for modifying the basic GR_RenderMode. A flag may not apply to all
84 // render modes (like a FLAT_SHADED and GR_RENDER_WIREFRAME combination).
86 {
88 
99 
103  GR_RENDER_FLAG_IMAGE = 0xC00, // alias to UV Pos
104 
109 
112 
115 };
116 
118 {
119  GR_ALPHA_PASS_OPAQUE = 0x1, // Only opaque objects
120  GR_ALPHA_PASS_NORMAL = 0x2, // All transparent objects
121  GR_ALPHA_PASS_INVISIBLE = 0x4, // Don't render in any pass.
122 
123  GR_ALPHA_PASS_ALL = 0x3 // Ignore alpha and render all objects.
124 };
125 
127 {
128  GR_SHADING_SOLID, // only draw solid objects
129  GR_SHADING_WIREFRAME, // only draw wireframe objects
130  GR_SHADING_LIGHT_MASK, // HQ Lighting - only the mask
131  GR_SHADING_PRE_PASS, // prepass, usually for depth and g-buffer
132  GR_SHADING_ANY // ignore object shading mode; draw everything.
133 };
134 
136 {
140 };
141 
143 {
149 };
150 
152 {
154 
162 
169 
174 
175  GR_MAX_DECORATIONS, // max number of builtin decorations
176 
179 };
180 
182 {
187 };
188 
190 {
195 
197 };
198 
200 {
204 
206 };
207 
209 {
211 
217 };
218 
220 {
227 };
228 
230 {
238 };
239 
241 {
242  GR_PICK_NONE = 0x0000,
243 
244  // For single picking from a buffer.
245  GR_PICK_SINGLE = 0x0001,
246 
247  // For multi-component picking.
251 
252  // For picking in UV viewports.
255  GR_PICK_UV_FLAG = 0x0300,
256 
257  // Indicates we are picking to do snapping.
259  // Don't allow picking of selected components (mostly to avoid snapping
260  // to geometry that is being moved).
262  // Invert the sense of the box/lasso/paint pick (outside is selected)
263  GR_PICK_OUTSIDE = 0x4000,
264  // As if the surface was wireframe
265  GR_PICK_AS_WIRE = 0x8000,
266 
267  // As if the surface was one solid shape
268  GR_PICK_PACKED = 0x10000,
269  // reduced ID render for selection prims
271 
272  // OpenGL 4.2 (GL_ARB_image_load_store) based picking.
273  GR_PICK_GL42 = 0x1000000
274 };
275 
277 {
278 public:
280  : myUseObjectNodes(true),
281  myPickNonSelectable(false),
282  myPickTemplates(false),
283  myPickGhosted(true),
284  myPickXray(false)
285  { }
286 
287  // Controls whether details must be associated with object nodes. If false,
288  // any displayed detail is considered an "object" for picking purposes.
290 
295 };
296 
297 // bitfield for why GR_Primitive::update() was called.
298 // be sure to update GUI_RenderCommon.h:GUI_SetupResult if the bitfield gets
299 // larger than 0x8000.
301 {
302  GR_UNCHANGED = 0x0,
303 
304  GR_GEO_CHANGED = 0x001,
316  GR_LOD_CHANGED = 0x1000,
326 };
327 
329 {
331 
336 
337  // These don't strictly exist as attribute types,
338  // but are useful for selections.
341 
342  GR_ALL_ATTRIBS = 0xFFFFFFFF
343 };
344 
346 {
350 };
351 
353 {
354  GR_BASE_PRIM_NORMAL, // most primitives are normal prim types.
355 
356  GR_BASE_PRIM_PACKED, // container primitives
361 
362  GR_BASE_PRIM_VISUALIZE // visualizer output
363 };
364 
366 {
371 };
372 
374 {
377 };
378 
379 #include <UT/UT_Array.h>
380 #include <utility>
382 
383 #include <UT/UT_IntrusivePtr.h>
386 class GR_Light;
388 
389 
390 #ifdef USE_VULKAN
391 #include <RV/RV_Type.h>
392 #else
393 typedef int RV_TextureRef;
394 class RV_TextureParms;
395 #endif
396 
397 
398 
399 
400 #endif
UT_IntrusivePtr< GR_Material > GR_MaterialPtr
Definition: GR_Defines.h:384
GR_DecorRenderFlags
Definition: GR_Defines.h:219
GR_DecorationOverride
Definition: GR_Defines.h:208
GR_ParticleType
Definition: GR_Defines.h:142
GR_DecorFontType
Definition: GR_Defines.h:199
GR_AttribMask
Definition: GR_Defines.h:328
GR_AgentWireMode
Definition: GR_Defines.h:373
GR_Decoration
Definition: GR_Defines.h:151
UT_IntrusivePtr< GR_Light > GR_LightPtr
Definition: GR_Defines.h:386
GR_AlphaPass
Definition: GR_Defines.h:117
int RV_TextureRef
Definition: GR_Defines.h:393
GR_DecorVisibility
Definition: GR_Defines.h:181
GR_ShadingPass
Definition: GR_Defines.h:126
GR_RenderMode
Definition: GR_Defines.h:47
GR_BasePrimType
Definition: GR_Defines.h:352
GR_ShadingMode
Definition: GR_Defines.h:30
Base class for all light types.
Definition: GR_Light.h:36
GR_DecorFontSize
Definition: GR_Defines.h:189
GR_UpdateReason
Definition: GR_Defines.h:300
GR_PrimAcceptResult
Definition: GR_Defines.h:345
GR_RenderFlags
Definition: GR_Defines.h:85
UT_Array< std::pair< UT_Matrix4D, UT_Vector2i > > GR_FrustumList
Definition: GR_Defines.h:381
GR_RenderVersion
Definition: GR_Defines.h:21
GR_LightingPass
Definition: GR_Defines.h:135
GR_BoundaryMode
Definition: GR_Defines.h:365
GR_SelectMode
Definition: GR_Defines.h:229
GR_PickStyle
Definition: GR_Defines.h:240