You are using the hardcoded value [icode]32f[/icode] in your code, you should assign this to a variable for greater code readability. I’m going to assume that it is meant to be the width of your sheet. Assuming so, the mistake you’ve made is quite obvious. Since it seems that you’re unfortunately making another minecraft clone, let me refer to this Figure 1.
Now, I’m going to be referring to the [icode]S[/icode] coord, which is the texture coordinate along the bottom edge of the image, and the [icode]T[/icode] coord, along the vertical edge. [icode]glTexCoord[/icode] takes the parameters [icode](S, T)[/icode]. As such, the bottom left is [icode](0, 0)[/icode], the bottom right is [icode](0, 1)[/icode], the top left is [icode](1, 0)[/icode] and the top right is [icode](1, 1)[/icode].
[icode](1, 0)[/icode] [icode](1, 1)[/icode]
[icode](0, 0)[/icode] [icode](0, 1)[/icode]
Figure 1
Now, as you are currently seeing your entire spritesheet on your box, you obviously sending [icode](0, 0)[/icode], [icode](0, 1)[/icode], [icode](1, 0)[/icode] and [icode](1, 1)[/icode]. To pick out say, the dirt, you’re going to have to know it’s relative position in the sheet, in this case it is at [icode](6, 4)[/icode], the width in pixels of the entire sheet (in this case, 16), and the width in sprites of the entire sheet (in this case, 16 again). From this, we can calculate where in the sheet you want to render.
Okay so I got this far through the post before you solved it…