Jump to content
  • Advertisement

Archived

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

NPComplete

Display Lists and Lesson 23

This topic is 6511 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

I did a lil map with lesson 23, and i would like to put objects into this map. These objects are display lists of a ball. I would like the ball to move back and forth (i have a goodidea how this will work) but my problem is, how do i put in a display list into lesson 23. For example, if i want a display list of the ball in front of some sector triangle in the map. How would i modify the code for this. for example, if i have a display list, GLuint BallDisplayList. The following is a cut and paste of the lesson23 drawing code. for (int loop_m = 0; loop_m < numtriangles; loop_m++) { glBindTexture(GL_TEXTURE_2D, texture[sector1.triangle[loop_m].texture]); // ( Modified ) glBegin(GL_TRIANGLES); glNormal3f( 0.0f, 0.0f, 1.0f); x_m = sector1.triangle[loop_m].vertex[0].x; y_m = sector1.triangle[loop_m].vertex[0].y; z_m = sector1.triangle[loop_m].vertex[0].z; u_m = sector1.triangle[loop_m].vertex[0].u; v_m = sector1.triangle[loop_m].vertex[0].v; glTexCoord2f(u_m,v_m); glVertex3f(x_m,y_m,z_m); x_m = sector1.triangle[loop_m].vertex[1].x; y_m = sector1.triangle[loop_m].vertex[1].y; z_m = sector1.triangle[loop_m].vertex[1].z; u_m = sector1.triangle[loop_m].vertex[1].u; v_m = sector1.triangle[loop_m].vertex[1].v; glTexCoord2f(u_m,v_m); glVertex3f(x_m,y_m,z_m); x_m = sector1.triangle[loop_m].vertex[2].x; y_m = sector1.triangle[loop_m].vertex[2].y; z_m = sector1.triangle[loop_m].vertex[2].z; u_m = sector1.triangle[loop_m].vertex[2].u; v_m = sector1.triangle[loop_m].vertex[2].v; glTexCoord2f(u_m,v_m); glVertex3f(x_m,y_m,z_m); glEnd(); } How can i print the display list of the ball in the above drawing code? Or is there an easier way to do this? -NPC

Share this post


Link to post
Share on other sites
Advertisement

  • 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!