Hi… Guys…
Help me…Plz!!
Why not draw and what is my problems?
It my psudo code…
// Class CGLDoc
#include “item.h”
class CGLDoc
{
…
CItem item;
…
}
void CGLDoc::OnFileOpen()
{
…
item.ReadItem();
…
}
// Class GLView
void GLView::OnPaint()
{
…
pDoc->item.draw();
…
}
// Class CItem
class CItem
{
…
GLuint nList;
…
}
void CItem::ReadItem()
{
…
nList = glGenLists(1); // returns zero
glNewList(nList, GL_COMPILE);
glBegin(GL_LINES);
glVertex3d(0,0,0);
glVertex3d(1,1,1);
glEnd();
glEndList();
…
}
void CItem::draw()
{
…
glCallList(nList); // Not Draw…
…
}
[This message has been edited by choi1012 (edited 05-28-2002).]
[This message has been edited by choi1012 (edited 05-28-2002).]