D3d draw cylinder

Explanation
Even if you don't use a texture, you must fill in the hrepeat and vrepeat parameters. If you are not using a texture, it does not matter what value you enter. If however you are using a texture, set vrepeat to how many times the texture should be repeated along the horizontal edges of faces, and hrepeat to how many times the texture should be repeated along the vertical edges of faces. Repeating a texture that tiles well can be used to cover large areas without losing definition.

Example
d3d_draw_cylinder(0,16,16,16,16,0,spr_texture,5,5,true,16) The additional parameters in the cylinder are closed and steps. Steps is the number of rotational steps used to draw the round part of the cylinder. Because (most) 3d rendering software can not handle curved surfaces, we simply approximate a curved surface by drawing many flat surfaces. For example if you put steps as 5, the top view of your cylinder would look like this: Closed is an option for whether to have caps at the end of your cylinder. You may find you often don't want to close the cylinder. It is one way of making a "barrel" that has the correct texture on the top, bottom and side. You could draw a cylinder with no caps, and then draw 2 floors at either end, with circular textures for the ends of the barrel.

// first draw a cylinder to represent the body of the barrel (x-8, y-8, z, x+8, y+8, z+32, tex_barrel_side, 1, 1, 0, 24) // then draw a floor at the bottom (x-8, y-8, z, x+8, y+8, z, tex_barrel_end, 1, 1) // finally draw a floor at the top (x-8, y-8, z+32, x+8, y+8, z+32, tex_barrel_end, 1, 1)