PDA

View Full Version : I need help with glnewlist and lists in general!



bansheeogl
05-07-2005, 06:20 AM
Hi im making a mesh with glnewlist, etc.

When I call glCallList with the list name as param, the FPS drops down (this is good, looks like somethings being processed) but nothings shown! I tryed with many screen coords just to see if that was the problem.. but no.. I got tired of trying. and also I have the same code in another language and works nice. so I dont know

can anyone suggest me what could be wrong? did this happend before to any of you?

UrbanLegend
05-07-2005, 09:41 AM
showing your actual code here might help folks diagnose the issue

bansheeogl
05-07-2005, 10:45 AM
cant, too long but I will resume

This is the generation part (the data and all other parts were ripped off because they are very big.


teaList = glGenLists(1)
glNewList(teaList, GL_COMPILE)
glPushMatrix()

glRotatef(270, 1, 0, 0)

glEnable(GL_MAP2_VERTEX_3)
glMapGrid2f(grid, 0, 1, grid, 0, 1)

For i=0 To 3

glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, rimbank)
glEvalMesh2(GL_FILL, 0, grid, 0, grid)

glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, bodybank1)
glEvalMesh2(GL_FILL, 0, grid, 0, grid)

glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, bodybank2)
glEvalMesh2(GL_FILL, 0, grid, 0, grid

glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, lidbank1)
glEvalMesh2(GL_FILL, 0, grid, 0, grid)

glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, lidbank2)
glEvalMesh2(GL_FILL, 0, grid, 0, grid)

glRotatef(90, 0, 0, 1)


Next


For i=0 To 1

glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, handlebank1)
glEvalMesh2(GL_FILL, 0, grid, 0, grid)

glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, handlebank2)
glEvalMesh2(GL_FILL, 0, grid, 0, grid)


glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, spoutbank1)
glEvalMesh2(GL_FILL, 0, grid, 0, grid)

glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, spoutbank2)
glEvalMesh2(GL_FILL, 0, grid, 0, grid)

glScalef(1,-1,1)


Next


glDisable(GL_MAP2_VERTEX_3)
glPopMatrix()
glEndList() Now.. I just call


glMatrixMode(GL_MODELVIEW)
glLoadIdentity()

glTranslatef(0.0,0.0,z)

glRotatef (xrot,1.0,0.0,0.0)
glRotatef (yrot,0.0,1.0,0.0)

glColor3f (1.0,0,0)

glTranslatef (0.0,-1.0,0.0)

glCallList (teaList)
glFlush();
Anythings wrong?

bansheeogl
05-07-2005, 12:31 PM
not c++ thou, dont start saying the syntax is wrong because its not any c language.

bansheeogl
05-08-2005, 02:34 PM
and? anyone will help? or people just asks for code for theirselves or they just do it so they bother the others.. or to make the forum slower.. or just because they are evil

CWiC
05-09-2005, 04:19 AM
Can you see any rendering when you substitute glCallList with actual rendering code? I think yes, as you claim that you have problems with lists, but you don't state that, so I decide to ask - it's may help in problem diagnosis.