Exemple #1
0
 void SetState(double x, double y, double s){
   shader.UseProgram();
   shader.setUniform("x",x);
   shader.setUniform("y",y);
   shader.setUniform("s",s);
   shader.setUniform("width",(int)300);
   shader.setUniform("height",(int)300);
 }
Exemple #2
0
 void SetPos(double x, double y){
   shader.UseProgram();
   shader.setUniform("position",x,y);
 }
Exemple #3
0
 void SetColor(Vec<float,4> color){
   shader.UseProgram();
   shader.setUniform("color", color);
 }
Exemple #4
0
 void SetUVState(Vec<double,2> pos, Vec<double,2> size){
   shader.UseProgram();
   shader.setUniform("uvSize",size);
   shader.setUniform("uvPos",pos);
 }
Exemple #5
0
 void SetTexture(unsigned int channel){
   shader.UseProgram();
   shader.setUniform("tex",(int)channel);
 }
Exemple #6
0
 void SetColor(Color col){
   shader.UseProgram();
   shader.setUniform("color",col.As<float>() / 255.0f);
 }
Exemple #7
0
 void SetSize(double w, double h){
   shader.UseProgram();
   shader.setUniform("size",w,h);
 }