14 #ifndef RU_PixelFunction_h
15 #define RU_PixelFunction_h
33 { myScope[0] = myScope[1] = myScope[2] = myScope[3] =
true; }
36 void setScope(
bool *scope);
37 bool isScoped(
int i)
const {
return myScope[i]; }
38 const bool *
getScope()
const {
return myScope; }
39 bool isPartialScope()
const;
42 bool isComponentDependent()
const;
45 bool areAllComponentsNeeded()
const;
47 void buildPixelEngine();
48 void buildVectorEngine();
55 for(
int i= 0; i<myFunctions.entries(); i++)
56 if(myParms(i)->isScoped(comp))
57 val = myFunctions(i)( myParms(i),
val, comp );
63 for(
int i= 0; i<myVectorFunctions.entries(); i++)
65 myVectorFunctions(i)( myParms(i), vals,myParms(i)->getScope());
71 const char *
getLocals()
const {
return myLocalVars; }
83 float **vals,
const bool *scope);
99 virtual void getPixelShader(
UT_String &frag_shader);
101 void addConstant(
const char *
name,
105 void addLocal(
const char *
name,
108 void addArray(
const char *
name,
114 void addArray(
const char *
name,
127 void addFunction(
const char *function_name,
132 void usesGlobal(
const char *
name);
135 {
return myHead->myFunctionIndex; }
137 {
return myHead->myNumComps; }
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
float processValue(float val, int comp) const
const char * getFunctionCode() const
virtual bool eachComponentDifferent() const
virtual bool needAllComponents() const
int getFunctionIndex() const
GLint GLsizei GLsizei height
IMATH_NAMESPACE::V2f float
void processValues(float **vals) const
const bool * getScope() const
GLuint const GLchar * name
const char * getLocals() const
bool isScoped(int i) const
const char * getShaderCode() const
void setNext(RU_PixelFunction *next)
bool usesNumCompsGlobal() const
void(* RUVectorFunc)(RU_PixelFunction *, float **, const bool *)
void setNumComps(int comps)
float(* RUPixelFunc)(RU_PixelFunction *, float, int)
RU_PixelFunction * next() const