Object-oriented Toolkit



Build shader expression DAG from object instances:

//--- Texture coordinate generators
rShParam n_hv = new ShParabolic(GL_H0,GL_T,GL_S,GL_N);
rShParam n_lv = new ShParabolic(GL_L0,GL_T,GL_S,GL_N);

//--- Shader expression
rShTexture n_a = new ShTexture(a,hv);
rShTexture n_b = new ShTexture(a,lv);
rShNode n_ab = new ShModulate(n_a,n_b);
rShTexture n_C = new ShSignedTexture(c,hv);
rShTexture n_D = new ShSignedTexture(d,lv);
rShNode n_CD = new ShModulate(n_C,n_D);
rShNode n_F = new ShAdd(n_ab,n_CD);
rShNode n_f = new ShShift(n_F,3);
rShNode n_E = new ShLighting(0);
rShNode n_R = new ShModulate(n_f,n_E);

//--- Compile shader
shCompile(1,n_R);

//--- Activate shader
glShader(1);