tags:

views:

82

answers:

1

I have simplified my problem to this example:

#include <GL/glut.h>

int main(int argc, char** argv)
{
    glutInit(&argc, argv);

    glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
    glutInitWindowSize (600, 600);
    glutInitWindowPosition( 0, 0 );

    int win = glutCreateWindow("Recon");

    return 0;
}

When it executes the glutCreateWindow, it takes about 1 minute and the screens flicker several times.

This is ridiculously long. This can't be normal.

Environment:

  • Fedora 10
  • Dual NVIDIA GTX280 cards driving 3 monitors.
  • NVIDIA driver version 190.53 CUDA 2.3 installed
  • gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)

Any ideas as to what could be wrong?

Edit: I have no display function because my ultimate goal is to create a rendering context so that I can create a Pixel Buffer Object from some CUDA code (which for the moment is not going to be displaying its output. I have also tried creating a context with a series of glx calls with the same delay and flickering happening when gkxMakeCurrent is called.

+1  A: 

Do you have a display function? I'm not sure if this will help, but maybe putting in a display function in which you clear the buffers might help?

e.g. glutDisplayFunc(myDisplay);

void myDisplay()
{
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // clear the screen
    glutSwapBuffers();
}

What compiler are you using? And, have you looked into any possible performance issues associated with Fedora 10 and openGL (I'm looking into the second bit right now).

Edit: There are definitely some anecedotal stories of a performance hit in Fedora 10 Here and Here. The second one seems to describe at least one of your symptoms. Are you able to try your code on another OS?

SauceMaster
Thanks. See my edits for some answers. I need to run this eventually on Debian 5, so I may try that now. Well, tomorrow. :)
Steve Fallows
Accepted - problem not seen in Debian 5.
Steve Fallows
What a strange issue for an OS. I wonder what's causing it.
SauceMaster