Original Post
I have a unit (cpp file and associated header file) wich contains the class of my form: There is a function in the application that is looped. It calls the UpdateGridPanel and the UpdateWorldPanel functions. In another unit, i create a Display list that should exist until the form closes. For some reason the display list only works the first time it is called (that is immeadiately after it is created). After this it is just like the display list is empty. I heard that if you load textures, OpenGL automaticly clears the list of textures as soon as the window is closed or... (?) I thought the problem might be because i work with two hdc's (device contexts) and/ or two hrc's (rendering contexts). I'd better stop talking because i said more than i know So if you know why the display list doesn't work and/or what you can do about it, please let me know. greetings Kwak [Edited by - Kwak on April 21, 2006 9:59:06 AM]
class TMain_Form : public TForm
{
__published:
// Pointers to components
...
// BasicFrameFunctions
void __fastcall CreateMainForm(TObject *Sender);
void __fastcall CloseMainForm(TObject *Sender, TCloseAction &Action);
void __fastcall ResizeMainForm(TObject *Sender);
// MainForm: Events
...
private: // User declarations
HDC hdcGridPanel;
HDC hdcWorldPanel;
HGLRC hrcGridPanel;
HGLRC hrcWorldPanel;
int PixelFormat;
...
public: // User declarations
__fastcall TMain_Form(TComponent* Owner);
void __fastcall TMain_Form::SetPixelFormatDescriptor();
void __fastcall TMain_Form::MainFormLoop(TObject*, bool&);
...
// BasicGUIFunctions
void __fastcall UpdateGridPanel();
void __fastcall UpdateWorldPanel();
...
};