RenderMan API  23.0
RixShaderInfo.h
Go to the documentation of this file.
1 /*
2  # ------------------------------------------------------------------------------
3  #
4  # Copyright (c) 1986-2019 Pixar. All rights reserved.
5  #
6  # The information in this file (the "Software") is provided for the exclusive
7  # use of the software licensees of Pixar ("Licensees"). Licensees have the
8  # right to incorporate the Software into other products for use by other
9  # authorized software licensees of Pixar, without fee. Except as expressly
10  # permitted herein, the Software may not be disclosed to third parties, copied
11  # or duplicated in any form, in whole or in part, without the prior written
12  # permission of Pixar.
13  #
14  # The copyright notices in the Software and this entire statement, including the
15  # above license grant, this restriction and the following disclaimer, must be
16  # included in all copies of the Software, in whole or in part, and all permitted
17  # derivative works of the Software, unless such copies or derivative works are
18  # solely in the form of machine-executable object code generated by a source
19  # language processor.
20  #
21  # PIXAR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
22  # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL PIXAR BE
23  # LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
24  # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
25  # OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
26  # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. IN NO CASE WILL
27  # PIXAR'S TOTAL LIABILITY FOR ALL DAMAGES ARISING OUT OF OR IN CONNECTION WITH
28  # THE USE OR PERFORMANCE OF THIS SOFTWARE EXCEED $50.
29  #
30  # Pixar
31  # 1200 Park Ave
32  # Emeryville CA 94608
33  #
34  # ------------------------------------------------------------------------------
35 */
36 
37 
38 #ifndef _RixShaderQuery_h
39 #define _RixShaderQuery_h
40 
41 #include "RixInterfaces.h"
42 
47 
48 public:
49 
52  {
62  };
63 
72  };
73 
76  {
83  };
84 
87  {
92  };
93 
94 public:
95 
96  virtual ~RixShaderParameter() {};
97 
99  virtual const char*
100  Name(void) const = 0;
101 
103  virtual const char*
104  StructName(void) const = 0;
105 
107  virtual RixShaderParameterType
108  Type(void) const = 0;
109 
111  virtual RixShaderBaseType
112  BaseType(void) const = 0;
113 
115  virtual RixShaderAggregateType
116  AggregateType(void) const = 0;
117 
120  VectorSemantics(void) const = 0;
121 
123  virtual bool
124  IsOutput(void) const = 0;
125 
127  virtual bool
128  IsStruct(void) const = 0;
129 
131  virtual bool
132  IsArray(void) const = 0;
133 
135  virtual int
136  ArrayLength(void) const = 0;
137 
139  virtual int
140  DefaultSize(void) const = 0;
141 
143  virtual const int*
144  DefaultI(void) const = 0;
145 
147  virtual const float*
148  DefaultF(void) const = 0;
149 
151  virtual const char**
152  DefaultS(void) const = 0;
153 
156  virtual int
157  MetaDataSize(void) const = 0;
158 
164  virtual const RixShaderParameter* const*
165  MetaData(void) const = 0;
166 
167 };
168 
174 
175 public:
176 
177  virtual ~RixShaderQuery(void) {};
178 
189  virtual bool
190  Open(const char* name, const char* searchPath) = 0;
191 
193  virtual const char*
194  LastError(void) = 0;
195 
198  virtual int
199  ParameterCount(void) const = 0;
200 
208  virtual const RixShaderParameter* const*
209  Parameters(void) const = 0;
210 
213  virtual int
214  MetaDataCount(void) const = 0;
215 
223  virtual const RixShaderParameter* const*
224  MetaData(void) const = 0;
225 
227  virtual const char*
228  ShaderName(void) const = 0;
229 
231  virtual const char*
232  ShaderType(void) const = 0;
233 };
234 
247 class RixShaderInfo : public RixInterface {
248 public:
249 
252  virtual RixShaderQuery*
253  CreateQuery(void) = 0;
254 
255 protected:
256 
258 
259 };
260 #endif
virtual int MetaDataSize(void) const =0
Call Metadata() first before calling this.
virtual ~RixShaderParameter()
Definition: RixShaderInfo.h:96
RixShaderVectorSemantics
A vector's disposition.
Definition: RixShaderInfo.h:86
virtual const char * StructName(void) const =0
virtual const int * DefaultI(void) const =0
virtual int DefaultSize(void) const =0
virtual RixShaderBaseType BaseType(void) const =0
RixShaderParameterType
parameter types
Definition: RixShaderInfo.h:51
virtual RixShaderParameterType Type(void) const =0
RixShaderAggregateType
composed types
Definition: RixShaderInfo.h:75
RixShaderBaseType
data types
Definition: RixShaderInfo.h:65
virtual bool IsArray(void) const =0
virtual int ArrayLength(void) const =0
virtual const float * DefaultF(void) const =0
virtual RixShaderVectorSemantics VectorSemantics(void) const =0
virtual bool IsOutput(void) const =0
virtual RixShaderAggregateType AggregateType(void) const =0
virtual const char ** DefaultS(void) const =0
virtual ~RixShaderQuery(void)
A generic way to interrogate shaders on disk about their parameters.
virtual const RixShaderParameter *const * MetaData(void) const =0
if the parameter is a struct then its fields can be referenced through the meta data entries...
virtual bool IsStruct(void) const =0
virtual const char * Name(void) const =0