Display list performance problems with OSX, but not with Windows.

Started by Obsyd, February 24, 2012, 14:43:00

Previous topic - Next topic

Obsyd

Hi there!

I have 255*125 Quads all of them are 64*32 pixels in size and textured. My problem is that in Windows I get 3000FPS, but in OSX the FPS is only 80!
I'm using a single display list to render the "map" of my quads. And I only GL_COMPILE the list once, since the 255*125 "map" is static!

Thanks for your help!

Obsyd

Ok, I think I found out something here.

Under Windows the display list is in the vram.
Under OSX its in the system ram.
So how do I get OSX to put my display list in vram?

(I think this is a driver problem..) :(

Obsyd

If I use DLon=1; The performance is 4-5 times better on a windows system. On OSX there is no performance gain.
What am I doing wrong? :(



if (DLon == 1) {
            if (DLbuild == 1) {

                DLtest = glGenLists(1);

                glNewList(DLtest, GL_COMPILE);
                init_textures.iso.bind();
                for (int i = 0; i <= 4800; i = i + 32) {
                    for (int j = 0; j <= 6400; j = j + 64) {

                        glBegin(GL_QUADS);
                        glTexCoord2f(0, 0);
                        glVertex2f(j, i);
                        glTexCoord2f(1, 0);
                        glVertex2f(j + init_textures.iso.getTextureWidth(), i);
                        glTexCoord2f(1, 1);
                        glVertex2f(j + init_textures.iso.getTextureWidth(), i + init_textures.iso.getTextureHeight());
                        glTexCoord2f(0, 1);
                        glVertex2f(j, i + init_textures.iso.getTextureHeight());
                        glEnd();
                    }
                }

                init_textures.iso2.bind();
                for (int i = 16; i <= 4800; i = i + 32) {
                    for (int j = 32; j <= 6400; j = j + 64) {

                        glBegin(GL_QUADS);
                        glTexCoord2f(0, 0);
                        glVertex2f(j, i);
                        glTexCoord2f(1, 0);
                        glVertex2f(j + init_textures.iso2.getTextureWidth(), i);
                        glTexCoord2f(1, 1);
                        glVertex2f(j + init_textures.iso2.getTextureWidth(), i + init_textures.iso2.getTextureHeight());
                        glTexCoord2f(0, 1);
                        glVertex2f(j, i + init_textures.iso2.getTextureHeight());
                        glEnd();
                    }
                }
                glEndList();
                System.out.println("DLcompiled");
                DLbuild = 4;
            }

            glCallList(DLtest);


        } else {

            init_textures.iso.bind();
            for (int i = 0; i <= 4800; i = i + 32) {
                for (int j = 0; j <= 6400; j = j + 64) {

                    glBegin(GL_QUADS);
                    glTexCoord2f(0, 0);
                    glVertex2f(j, i);
                    glTexCoord2f(1, 0);
                    glVertex2f(j + init_textures.iso.getTextureWidth(), i);
                    glTexCoord2f(1, 1);
                    glVertex2f(j + init_textures.iso.getTextureWidth(), i + init_textures.iso.getTextureHeight());
                    glTexCoord2f(0, 1);
                    glVertex2f(j, i + init_textures.iso.getTextureHeight());
                    glEnd();
                }
            }

            init_textures.iso2.bind();
            for (int i = 16; i <= 4800; i = i + 32) {
                for (int j = 32; j <= 6400; j = j + 64) {

                    glBegin(GL_QUADS);
                    glTexCoord2f(0, 0);
                    glVertex2f(j, i);
                    glTexCoord2f(1, 0);
                    glVertex2f(j + init_textures.iso2.getTextureWidth(), i);
                    glTexCoord2f(1, 1);
                    glVertex2f(j + init_textures.iso2.getTextureWidth(), i + init_textures.iso2.getTextureHeight());
                    glTexCoord2f(0, 1);
                    glVertex2f(j, i + init_textures.iso2.getTextureHeight());
                    glEnd();
                }
            }
        }

CodeBunny

Dunno, is Mac using OpenGL ES or something? Display Lists are technically deprecated (though I certainly find them useful), so maybe Mac has dropped hardware accelerated support.

RiverC

What supplements for their functionality? I'm curious to know, since they are very useful...