Opengl Out_of_memory

Hi,

I am recompiling some lists and this error comes up.

I am using glNewList and glEndlist. I have tried using gldelelists - but it still does not work.

Any help gratefully appreciated.

do
	{
		icTrianglesConstant[ui] =  ui + 100;
		glDeleteLists( icTrianglesConstant[ui], 30000 );
		glNewList(    //create or replace a display list
			icTrianglesConstant[ui] ,//MMGLTRIANGLE, //Specifies the display-list name
			GL_COMPILE); //Commands are merely compiled OR GL_COMPILE_AND_EXECUTE Commands are executed as they are compiled into the display list. 

			quadObj = gluNewQuadric (); //creates and returns a pointer to a new quadrics object
			gluQuadricDrawStyle (quadObj, GLU_FILL);// GLU_SILHOUETTE );//GLU_LINE); //specify the draw style desired for quadrics
			glBegin(GL_TRIANGLES);
	
				if( ui * 30000 <= uiTriPointer)
					CompileTriangles( hwnd, (ui - 1) * 30000, ui * 30000  );
				else
					CompileTriangles( hwnd, (ui - 1) * 30000, uiTriPointer  );
			glEnd();
		
		glEndList(); 
		mmGetGLErroorCode( hwnd);
		ui++;
	}while(  (ui - 1) * 30000 <= uiTriPointer && ui < 1000 );

One thing I’d highly recommend is to learn the new style of OpenGL and how to write in GLSL. I have one good tutorial for you:
http://learnopengl.com
It helps me out with my problems.
In the case that you’re just new that is. If you are meaning to do it this way, I’m sorry.

[QUOTE=devmane144;1282303]One thing I’d highly recommend is to learn the new style of OpenGL and how to write in GLSL. I have one good tutorial for you:
http://learnopengl.com
It helps me out with my problems.
In the case that you’re just new that is. If you are meaning to do it this way, I’m sorry.[/QUOTE]

Thank you.

What platform are you developing for? Mobile? Seems an unusual error in this day and age.