Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Eber Kain

Several non-newbie questions

This topic is 6230 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

First, can someone show me how to set up a glutTimerFunc Is there a better way to draw this, and still be able to use the colors as i do. for (int z = -10; z<10; z++) { for (int y = -10; y<10; y++) { glLoadMatrixf(cam.m); glTranslatef(0,y,z); glBegin(GL_POINTS); for (int x = -10; x<10; x++) { if (builder.x == x && builder.y == y && builder.z == z) glColor3f(1,0,0); else if (builder.z == z) glColor3f(0.8,0.8,0.8); else glColor3f(0.3,0.3,0.3); glVertex2f(x,0); } glEnd(); } } What image format should i use for my particles, and whats the fastest way to draw them. home.earthlink.net/~eberkain/

Share this post


Link to post
Share on other sites
Advertisement
I think that each registration of glutTimerFunc only gives one callback. Another option is to use glutGet(GLUT_ELAPSED_TIME) for timing purposes.

Push and Pop can perhaps be faster than LoadMatrix.
It is faster to use vertex arrays and update the part of the arrays you are changing each frame.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!