Delete shared texture

Hi,

i have shared texture, between two DC’s. I use wglSharelist().

When i delete texture, everything is ok, but when i load another one, there is a hardcoded breakpoint in debug mode. In release mode, application freezes.

I’m adding texture to one context by standard functions:
glGenTextures, glBindTexture, gluBuild2DMipmaps (or glTexImage2D).

In order to delete I use glDeleteTexture().

At the moment of loading texture, both dc exists for sure. Sharing texture is also fine. Maybe i need to add some other instructions ? I’m using rad dev studio, if it’s matter.

Please help me :slight_smile: Thank you for your time.

Hello,

since noone replied with a solution, I’ve managed to get rid of this problem.

After texture deletion, second DC is reinitialized. This is not perfect solution, but still no error.

Maybe someone know, how to delete texture safely, when sharing between dc’s ?