Unhandled exception ....DDERR_OUTOFVIDEOMEMORY

Hi All

In my program many projections occur. An External texture and few objects are imported loaded and displaied. The program should project these and draw them on the screen many times. But in the middle of this job, the PC crashes at a specific point when the number of projections reaches a specific value because it runs out of memory, a message displaied says: Unhandled exception at 0x7… in program_name exe: Microsoft C++ exception: std::bad_alloc at memory location
the debugger says: WGL Message:WGL: DDraw: Allocate: Create: DDERROR = DDERR_OUTOFVIDEOMEMORY

anyone have seen such a problem or know anything how to solve it?
if the problem is about memory, so how to free the memory after loading the i?
is there any way to free the memory that can be full because of the large number of projections and drawing.

thank you

This kind of thing generally happens if you’re creating new OpenGL objects (such as textures, buffers or display lists) each frame. You should search your rendering functions for calls such as glGenTextues, glGenBuffers or glGenLists happening at runtime and either (preferably) move them to a load time routine, or (not so preferably) use the appropriate glDelete- call when done drawing the frame.

thank you very much

I will try the solutions you suggested and come back to tell about the outcome.

thanks again