RenderMan  26.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RixShaderInfo.h
Go to the documentation of this file.
1 /*
2 # ------------------------------------------------------------------------------
3 #
4 # Copyright (c) 2020 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 #ifndef _RixShaderQuery_h
38 #define _RixShaderQuery_h
39 
40 #include "RixInterfaces.h"
41 
46 
47 public:
48 
51  {
61  };
62 
71  };
72 
75  {
82  };
83 
86  {
91  };
92 
93 public:
94 
95  virtual ~RixShaderParameter() {};
96 
98  virtual const char*
99  Name(void) const = 0;
100 
102  virtual const char*
103  StructName(void) const = 0;
104 
106  virtual RixShaderParameterType
107  Type(void) const = 0;
108 
110  virtual RixShaderBaseType
111  BaseType(void) const = 0;
112 
114  virtual RixShaderAggregateType
115  AggregateType(void) const = 0;
116 
119  VectorSemantics(void) const = 0;
120 
122  virtual bool
123  IsOutput(void) const = 0;
124 
126  virtual bool
127  IsStruct(void) const = 0;
128 
130  virtual bool
131  IsArray(void) const = 0;
132 
134  virtual int
135  ArrayLength(void) const = 0;
136 
138  virtual int
139  DefaultSize(void) const = 0;
140 
142  virtual const int*
143  DefaultI(void) const = 0;
144 
146  virtual const float*
147  DefaultF(void) const = 0;
148 
150  virtual const char**
151  DefaultS(void) const = 0;
152 
155  virtual int
156  MetaDataSize(void) const = 0;
157 
163  virtual const RixShaderParameter* const*
164  MetaData(void) const = 0;
165 
166 };
167 
173 
174 public:
175 
176  virtual ~RixShaderQuery(void) {};
177 
188  virtual bool
189  Open(const char* name, const char* searchPath) = 0;
190 
192  virtual const char*
193  LastError(void) = 0;
194 
197  virtual int
198  ParameterCount(void) const = 0;
199 
207  virtual const RixShaderParameter* const*
208  Parameters(void) const = 0;
209 
212  virtual int
213  MetaDataCount(void) const = 0;
214 
222  virtual const RixShaderParameter* const*
223  MetaData(void) const = 0;
224 
226  virtual const char*
227  ShaderName(void) const = 0;
228 
230  virtual const char*
231  ShaderType(void) const = 0;
232 };
233 
246 class RixShaderInfo : public RixInterface {
247 public:
248 
251  virtual RixShaderQuery*
252  CreateQuery(void) = 0;
253 
254 protected:
255 
257 
258 };
259 #endif