🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
OpenGL help on this please?
for(int i = 0 ; i < 3 ; i++)
{
vasp enemyvasp = {(rand()%10-10),(rand()%10-10),
(float)(20-(rand()%30))/vaspSpeed,
(float)(20-(rand()%30))/vaspSpeed} ;
Enemy.push_back(enemyvasp);
}
The numbers 10-10 in the vasp enemyvasp = {(rand()%10-10),(rand()%10-10), Line should put the "vasps" that i will be drawn somewhere else in the program in some location at the "screen" tho when none of my drawings has any "zoom"
the glTranslatef(xcoord,ycoord,zoom) so the screen aint really tremendous. Problem is the "vasps" (quads) will not show up on the "screen" any ideas on what numbers to use? or how to make the rand over to a float or double? vasp is a struct
struct vasp
{
float x ; // vasp X position
float y ; // vasp Y position
float vaspmoveX ; // vasp X movement
float vaspmoveY ; // vasp Y movement
};
This..
(rand()%10-10)
is the same as doing
rand()%0
because the 10-10 is evaluated first.
Try ((rand()%10)-10).
Degra
(rand()%10-10)
is the same as doing
rand()%0
because the 10-10 is evaluated first.
Try ((rand()%10)-10).
Degra
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement