background with gradients

hello of people, how can i make the background of my of - opengl app to have gradient of colors?
is there is a command or something in of? If not which options do i have?

thanks in advance!!!


Hi Matias,

Im not sure about one command that can be used to obtain a gradient background, but you can try to obtain a similar effect using 2 fors and some rects similar to:

for(int y = 0 ; y < height/rectSize ; y++ ){ // columns   
   for(int x = 0 ; x < width/rectSize ; x++ ){ // rows  
     /*here you can make a color transformation*/  
      ofRect( x*rectSize , y*rectSize , rectSize, rectSize  );        

Maybe you it can help you.