Dynamic VS Static Lists

I have an on-screen information panel that shows some information about the displayed data.

It works fine when I build it everytime I call ondraw(). But it does not even show up when I tried to create it once and just call the list in ondraw().

Basically, all I did was wrap the creation in a class and build the list as below. Note that the “// create the list” part is exactly as the building of the list.

I thought that the class does not see the context. But I made sure that the currentContext is set right when the list is being build.

Any Ideas ??? Please …

GLuint list;
list = glGenLists( 1 );
glNewList( list, GL_COMPILE );

// create the list

glEndList();
m_object list;

Are you building the list AFTER the OpenGL context has been created? This could be a problem if, for instance, you put the list creation in the constructor of a class and are using a global instance of that class.