Pixel buffer woes both CUDA and nvsg related.

I’m not sure whether or not to post this in the CUDA forums, or in here.


Gives me the following assertion from the scenegraph:

I have a little hunch that Open GL isn’t initialized in my code, but the function referenced to in the manual, that is supposed to initialize gl with cuda “cuGLInit()”.

The problem is that neither cuGLInit() nor cudaGLInit() exists.

Looking at the simple GL example bundled with CUDA there is a initGLfunction that looks like this:

CUTBoolean initGL()


    // initialize necessary OpenGL extensions


    if (! glewIsSupported( "GL_VERSION_2_0 " 


  )) {

        fprintf( stderr, "ERROR: Support for necessary OpenGL extensions missing.");

        fflush( stderr);

        return CUTFalse;


   // default initialization

    glClearColor( 0.0, 0.0, 0.0, 1.0);

    glDisable( GL_DEPTH_TEST);

   // viewport

    glViewport( 0, 0, window_width, window_height);

   // projection

    glMatrixMode( GL_PROJECTION);


    gluPerspective(60.0, (GLfloat)window_width / (GLfloat) window_height, 0.1, 10.0);


   return CUTTrue;


Do I really have to set up a seperate gl context that cuda can use?