PDA

View Full Version : problems with DLs



mithun_daa
01-05-2004, 07:24 AM
this is wierd. iv been workin with a looot of display lists, but i never had this kind of a problem. herez the code thatz causeing the prob. :
temp3 = glGenLists(1)
temp4 = glIsList(temp3)

glNewList temp3, lstCompile
glPushMatrix
glBegin bmQuads

glTexCoord2f 1, 0
glVertex3f dblImgOvrX - dblRectX, dblImgOvrY, -dblZmax

glTexCoord2f 1, 1
glVertex3f dblImgOvrX - dblRectX, dblImgOvrY - dblRectY, -dblZmax

glTexCoord2f 0, 1
glVertex3f dblImgOvrX, dblImgOvrY - dblRectY, -dblZmax

glTexCoord2f 0, 0
glVertex3f dblImgOvrX, dblImgOvrY, -dblZmax

glEnd
glPopMatrix

glEndList
temp4 = glIsList(temp3)

when im debugging, temp4 always is false. that means the DL is never being created. the genlist is returning a 0. when i force it to some number i still get the same results.plz help
thank u.

JanHH
01-05-2004, 07:30 AM
what I find pointless:

- the push/pop matrix inside of the display list
- the assignment temp4=gllsList(temp3) at the end of the code, doesn't this erase the just created DL?

if this were c++ I would gess it's an issue of pointer dereferencing, but then, your program wouldn't even compile. But I guess it is really a VB problem and not an OpenGL problem.

But thanks for showing me again why I really do not at all like VB http://www.opengl.org/discussion_boards/ubb/wink.gif. Why do you use it? If C++ is too hard I would suggest delphi.. but this is OT.

Jan

mithun_daa
01-05-2004, 07:37 AM
- the assignment temp4=gllsList(temp3) at the end of the code, doesn't this erase the just created DL?
as far as i could follow, glislist just returns a true if a DL has been created with the name, temp3 in this case. initially it has to return false, and after the DL is created it should return a true meaning that the DL exists.

But thanks for showing me again why I really do not at all like VB http://www.opengl.org/discussion_boards/ubb/wink.gif. Why do you use it? If C++ is too hard I would suggest delphi.. but this is OT.

Jan

[/QUOTE]
i have no choice. i was told u use it and thatz exactly what im doing.

mithun_daa
01-05-2004, 07:51 AM
another thing i observed was that, when i create the same DL somewhere else in the program, say the display routine, it works.

mithun_daa
01-05-2004, 08:04 AM
Originally posted by mithun_daa:
another thing i observed was that, when i create the same DL somewhere else in the program, say the display routine, it works.

alright i fixed it. i had to make my Rendering Context active. i didnt know i had to do that for DLs.
thanx anywayz.

JanHH
01-05-2004, 02:29 PM
OK sorry.. I just never heard of glIsList before. I just wanted to post the issue with the rendering context but then read that you already fixed it.