Original Post
I can't find what is wrong with my gl List. Im new to it. Found many examples on net but can't get to work my.
This is basic of my code:
all idea of using it is just to increase a preformance when showing 100*100 tiles(GL_QUADS at this point)
when is do
it works but i get 2 fps.
p.s if you have to ask why so many tiles, then it is for zooming.
This is basic of my code:
Tiledmap::Tiledmap(){
......
initTile();
}
void Tiledmap::show(){
... some "for" loop and glTranslatef
glCallList(DrawTile);
}
void Tiledmap::initTile(){
DrawTile=glGenLists(1);
glNewList(DrawTile,GL_COMPILE);
glColor4ub(90,90,0,255);
glBegin(GL_QUADS);
glVertex2f(0,0);
glVertex2f(32,0);
glVertex2f(32,32);
glVertex2f(0,32);
glEnd();
glEndList();
}all idea of using it is just to increase a preformance when showing 100*100 tiles(GL_QUADS at this point)
when is do
void Tiledmap::show(){
... some "for" loop and glTranslatef
glColor4ub(90,90,0,255);
glBegin(GL_QUADS);
glVertex2f(x,y);
glVertex2f(x*32,y);
glVertex2f(x*32,y*32);
glVertex2f(x,y*32);
glEnd();
}it works but i get 2 fps.
p.s if you have to ask why so many tiles, then it is for zooming.