HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VEX_OslTypes.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: VEX_OslTypes.h (VEX Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __VEX_OslTypes__
12 #define __VEX_OslTypes__
13 
14 #include "VEX_API.h"
15 
16 /// TODO: While we have a library for VEX language (ie, this one), currently
17 /// we don't have any library for RSL or OSL stuff.
18 /// We already started putting RSL-related entities in this library (eg,
19 /// VEX_RslResolver), so this is continuation of this trend. Ideally, at some
20 /// point we should factor out any RSL and OSL code out of this library into a
21 /// new RSL and OSL library (or some base language library).
22 
23 // ============================================================================
24 /// RenderMan shader context types.
25 typedef enum {
26  OSL_INVALID_CONTEXT = 0x00000000,
27  OSL_SURFACE_CONTEXT = 0x00000001,
28  OSL_DISPLACE_CONTEXT = 0x00000002,
29  OSL_GENERIC_CONTEXT = 0x00000004,
30  OSL_VOLUME_CONTEXT = 0x00000008,
32 
33 
34 // ============================================================================
35 /// Basic management of shader contexts in OSL.
37 {
38 public:
39  /// Get the name token of a context.
40  static const char *getNameFromContextType( OSL_ContextType t );
41 
42  /// Returns a context label token for a given type.
43  static const char *getLabelFromContextType( OSL_ContextType t );
44 
45  /// Map the context name to a context type.
46  static OSL_ContextType getContextTypeFromName( const char *name );
47 };
48 
49 #endif
50 
51 
#define VEX_API
Definition: VEX_API.h:14
Basic management of shader contexts in OSL.
Definition: VEX_OslTypes.h:36
GLuint const GLchar * name
Definition: glcorearb.h:786
OSL_ContextType
RenderMan shader context types.
Definition: VEX_OslTypes.h:25
GLdouble t
Definition: glad.h:2397