HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
VEX_RslResolver.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_RslResolver.h ( VEX Library, C++)
7
*
8
* COMMENTS: Resolver for Rsl (RenderMan Shader Language).
9
*
10
* Since shader code can't be embedded in a RIB stream, the way this
11
* resolver works is that:
12
* - The resolver will save the object code to a pre-defined directory.
13
* - The shader name will be changed to point to the object code in
14
* question.
15
*/
16
17
#ifndef __VEX_RslResolver__
18
#define __VEX_RslResolver__
19
20
#include "
VEX_API.h
"
21
class
UT_String
;
22
23
// ============================================================================
24
class
VEX_API
VEX_RibResolver
25
{
26
public
:
27
/// @{ Specifies where the temporary source code file is created
28
/// and where the compiled object file is saved.
29
static
void
setCachePath(
const
char
*
path
);
30
static
const
char
*getCachePath();
31
/// @}
32
33
// Helper that simply replaces the shader name with the appropriate path.
34
static
void
patchShader(
UT_String
&
shader
,
const
char
*path);
35
36
protected
:
37
virtual
~
VEX_RibResolver
();
38
virtual
bool
canResolve(
const
char
*shader) = 0;
39
virtual
bool
doResolve(
UT_String
&shader,
int
context_type) = 0;
40
};
41
42
// ============================================================================
43
class
VEX_API
VEX_RslResolver
:
public
VEX_RibResolver
44
{
45
public
:
46
static
bool
canResolveShader(
UT_String
&
shader
);
47
static
bool
resolveShader(
UT_String
&shader,
int
context_type);
48
49
protected
:
50
VEX_RslResolver
();
51
~
VEX_RslResolver
()
override
;
52
static
VEX_RslResolver
*getRslResolver(
const
char
*shader);
53
};
54
55
// ============================================================================
56
// TODO: factor out VEX_RslResolver and VEX_OslResolver into one class without
57
// static list of resolvers
58
class
VEX_API
VEX_OslResolver
:
public
VEX_RibResolver
59
{
60
public
:
61
static
bool
canResolveShader(
UT_String
&
shader
);
62
static
bool
resolveShader(
UT_String
&shader,
int
context_type);
63
64
protected
:
65
VEX_OslResolver
();
66
~
VEX_OslResolver
()
override
;
67
static
VEX_OslResolver
*getOslResolver(
const
char
*shader);
68
};
69
#endif
70
VEX_RibResolver
Definition:
VEX_RslResolver.h:24
path
GLsizei const GLchar *const * path
Definition:
glcorearb.h:3341
VEX_API
#define VEX_API
Definition:
VEX_API.h:14
VEX_RslResolver
Definition:
VEX_RslResolver.h:43
shader
GLuint shader
Definition:
glcorearb.h:785
UT_String
Definition:
UT_String.h:72
VEX_OslResolver
Definition:
VEX_RslResolver.h:58
VEX_API.h
VEX
VEX_RslResolver.h
Generated on Sat Mar 25 2023 02:52:54 for HDK by
1.8.6