You don't create an ID with any OpenGL function. All glBindTexture does, is binds loaded texture data to an ID.
Code:
GLuint CreateTexture(int texId)
{
glGenTextures(1, &texId);
glBindTexture(GL_TEXTURE_2D, texId);
return texId
}
...
Init()
{
GLuint texture = CreateTexture(0);
}
...
Draw()
{
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, texture);
//drawstuff
}
Variations can be made of this method to suit your needs. All your really doing, is passing the texture data, through and unsigned integer via glBindTexture(). The texture is initialized with glGenTextures().
Texture creation is frairly straight forward, but if you have any questions (or, more likely, if this isn't what you mean/were looking for), just ask