PDA

View Full Version : Objects names



jirkamelich
12-08-2002, 07:53 AM
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 ?

GameMaker
12-08-2002, 08:11 AM
Does it work when you bind the same texture from the first one to the second one? That is what I would try next.

jirkamelich
12-08-2002, 08:12 AM
it works when i bind just the first texture => both object have the same texture, but that's not what i want

GameMaker
12-08-2002, 08:54 AM
Ya, I know that's not what you want. I am just trying to remote debug with you by trying a few things. ;-)

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.

jirkamelich
12-08-2002, 11:09 AM
The mystake was that the texture didn't have the same height and width. Now it works