PDA

View Full Version : Textures and Display Lists



koz
02-28-2007, 05:46 AM
I am working with some code the uses 3 large RGB textures (4096x2048) inside a display list. On the windows platform I am seeing textures disappear and reappear but Linux seems fine. This usually happens when other display listed texture intensive programs are running on the same box. A second very similar application uses the same textures in immediate mode and runs fine on both platforms.

What are the pros (if any) and cons of using textures inside a display list on present day hardware (nvidia quadro w/pci express)? Do display listed textures use more on board video ram?

Thanks,
Bob

nib
02-28-2007, 07:33 AM
Works fine in my mac program.

Though, I have seen this problem before and I think it might be a memory issue? :(

I'm not sure how to solve it but what happens if you don't delete the system memory after to create your texture? Maybe use GL_COMPRESSED_RGB to free up some more vram memory. I wonder if the card is out of memory then opengl runs back to the system memory copy? Not sure...

Just curious, is it a transparent texture?

Overmind
02-28-2007, 07:49 AM
What do you mean, you use textures inside a display list?

Is the glTexImage2D-call inside the display list, or only the glBindTexture?

koz
02-28-2007, 08:10 AM
> Is the glTexImage2D-call inside the display list, > or only the glBindTexture?

It looks like both glTexImage2D and glBindTexture are inside the display list.

koz
02-28-2007, 08:11 AM
> Just curious, is it a transparent texture?
No transparent textures.

nib
02-28-2007, 08:13 AM
In my case,

glActiveTexture(GL_TEXTURE0);
glEnable(GL_TEXTURE_2D);
glBindTexture (GL_TEXTURE_2D, _id );

//do stuff

glActiveTexture(GL_TEXTURE0);
glDisable(GL_TEXTURE_2D);

----

There is a list of no no calls on p. 288 in the red book and these are not in that list, if I recall.

koz
02-28-2007, 08:28 AM
Thanks nib. By the way, it looks like we are Texas neighbors. :>)

koz
02-28-2007, 08:57 AM
Well, I just pulled the textures out of the DL and I still have the problem. I guess I'm dealing with a GL state issue or something.

Thanks,
Koz

nib
02-28-2007, 10:20 AM
I just put a glPushMatrix and glPopMatrix and the start and end of my lists. So, no transform funny business spills out.

Yep, I'm an Austin transplant. No more California mouse wheel for nib ... real estate is going to blow over there.