PDA

View Full Version : Help!!! How to change colours randomly and use gluCylinders?

Orange_82
06-04-2004, 08:14 AM
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.

06-04-2004, 08:36 PM
can't you do anything by yourself?

Orange_82
06-04-2004, 09:26 PM
Originally posted by <?>:
can't you do anything by yourself?hey, how do u noe i never try it out myself?

HairyFotr
06-04-2004, 10:06 PM
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.

nexusone
06-05-2004, 05:51 AM
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:
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.

Orange_82
06-05-2004, 12:43 PM
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. :D

Regards,
O'

Originally posted by nexusone:
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:
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.