Game in glut, figures and their sizes -


just started programming glut. i'm trying make little game, can't find away make cube bigger , smaller when hits wall without using buttons. ideas?

here code:

glloadname(cube); glcolor3f(0.2, 0, 1); glpushmatrix(); glrotatef(20, 0, 15, 0); glutsolidcube(size); if (size = 0.5) {     size + 0.2; } glutpostredisplay(); glutswapbuffers(); glpopmatrix(); 


Comments