Help!!! How to change colours randomly and use gluCylinders?

Hi, how do i make the colours to change randomly by itself and use gluCylinders?

Sorry that I can’t show the codes because this website doesn’t allow parenthesis in the html

If U need the code, please email to me, the email is 30240385@student.murdoch.edu.au or icq 32986218, so that we can further discuss this.

can’t you do anything by yourself?

Originally posted by <?>:
can’t you do anything by yourself?
hey, how do u noe i never try it out myself?

Hello.

Random is a Delphi function and you probobaly work in C++ or something so the random function is something else…

glColor3f(Random(100)*0.01,Random(100)*0.01,Random(100)*0.01);

Put this before your call to gluCylinder.

Did you mean the following:

  1. I would like my gluCylinder to change colors at random?

or

  1. How to change colors at random?
  2. How do you use gluCylinder?

In C/C++ you can use the rand() function to generate a random number.

For gluCylinder you can find an example here: nehe.gamedev.net

Originally posted by Orange_82:
[b]Hi, how do i make the colours to change randomly by itself and use gluCylinders?

Sorry that I can’t show the codes because this website doesn’t allow parenthesis in the html

If U need the code, please email to me, the email is 30240385@student.murdoch.edu.au or icq 32986218, so that we can further discuss this.[/b]

Oh, I meant

  1. How to change colors @ random?
  2. How to create the gluCylinders?

And I have solved the gluCylinders problem. Thank you MateeC and Nexuone for replying. :smiley:

Regards,
O’

Originally posted by nexusone:
[b]Did you mean the following:

  1. I would like my gluCylinder to change colors at random?

or

  1. How to change colors at random?
  2. How do you use gluCylinder?

In C/C++ you can use the rand() function to generate a random number.

For gluCylinder you can find an example here: nehe.gamedev.net

[quote]Originally posted by Orange_82:
[b]Hi, how do i make the colours to change randomly by itself and use gluCylinders?

Sorry that I can’t show the codes because this website doesn’t allow parenthesis in the html

If U need the code, please email to me, the email is 30240385@student.murdoch.edu.au or icq 32986218, so that we can further discuss this.[/b]
[/b][/QUOTE]