problems with DLs

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.

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 . Why do you use it? If C++ is too hard I would suggest delphi… but this is OT.

Jan

- 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.

[b]But thanks for showing me again why I really do not at all like VB . Why do you use it? If C++ is too hard I would suggest delphi… but this is OT.

Jan

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

another thing i observed was that, when i create the same DL somewhere else in the program, say the display routine, it works.

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.

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.