PDA

View Full Version : Random positions , and Mouse event



Dole555
03-17-2011, 11:56 AM
Hello every one ,

I'm begginer in OpenGL ,,
rand() function
Whats the number should be after the % ..
should any one give me a small discription of it ,,
it's syntax ,, and should i use a single one for all objects or one for all ??

the mouse event whe i want to move the object to the mouse clicking position i know i should translete the mouse coordinate to the monitor coordinate how this will be done ?

thank u :)

McLeary
03-17-2011, 12:05 PM
About rand() function: http://www.cplusplus.com/reference/clibrary/cstdlib/rand/

Dole555
03-19-2011, 07:04 AM
Thanks McLeary that was helpful ,, but if I want to use it to generate random coordinate for an object which numbers i should range it in to keep it in the screen boundries

thanks