Objects names

I have a problem with objects names, i write following:
glInitNames();
glPushName(0);
glBindTexture(…,…);
glLoadName(1);
glBegin(…);
.
.
.
glEnd();

glBindTexture(…,…);
glLoadName(2);
glBegin(…);
.
.
.
glEnd();

but there is no texture on the second object.
Can somebody help me ?

Does it work when you bind the same texture from the first one to the second one? That is what I would try next.

it works when i bind just the first texture => both object have the same texture, but that’s not what i want

Ya, I know that’s not what you want. I am just trying to remote debug with you by trying a few things. :wink:

Are you using glGenTextures to create both textures?

I wonder what would happen if you tried to display your second texture onto the first object? That would tell you if you at least set the second texture up correctly.

The mystake was that the texture didn’t have the same height and width. Now it works