glInterceptor + GLUI subwindow = error?

Hello,

has anybody tried using GLUI & glInterceptor successfully? For me it breaks when I try to create GLUI subwindows. It’s a pity because both of them are extremely convenient.

Thanks,
babis

Can you be more specific in what breaks?

Right, sorry I forgot. In wglDescribePixelFormat in GLUI_Master.create_glui() function. Thanks for the GREAT tool by the way :slight_smile:

I kinda meant - does it “break” by crashing? Issuing errors in the log? Just stops working?

Have you tried doing a test run with Full_debug profile?

gliLog : “Function wglDescribePixelFormat is being called on a thread that does not have the main context”

Actually it breaks 3 times inn : wglDescribePixelFormat ,wglGetPixelFormat ,wglDescribePixelFormat & then continues normally.

I disabled thread checking in glIntercept ini,just in case, but as it gets an error, it still breaks there.

Well, I don’t know what could be causing the issue. It could be a GLUI bug or a bug in your code. Can you post an example app to test?

Here’s a minimal prog with no code of my own at all :



#include <GL/glui.h>
#include <GL/glut.h>
#include <stdlib.h>
#include <stdio.h>


void glutResize(int width, int height){}
void glutDisplay(void){glutSwapBuffers();}
void glutKeyboard(unsigned char key, int x, int y){}
void glutMouse(int button, int state, int x, int y){}
void glutMotion(int x, int y){}
void glutSpecial(int value, int x, int y){}

int main ( int argc, char ** argv)
{

    glutInitDisplayMode( GLUT_DOUBLE | GLUT_DEPTH | GLUT_RGBA | GLUT_MULTISAMPLE );
    glutInitWindowPosition( 0, 0 );
    glutInitWindowSize( 800, 600 );
    glutInit( &argc, argv );

    int main_win = glutCreateWindow("Test");

    GLUI_Master.set_glutDisplayFunc( glutDisplay );
    GLUI_Master.set_glutReshapeFunc( glutResize );  
    GLUI_Master.set_glutKeyboardFunc( glutKeyboard );
    GLUI_Master.set_glutSpecialFunc( glutSpecial );
    GLUI_Master.set_glutMouseFunc( glutMouse );
    glutMotionFunc( glutMotion );
    GLUI_Master.set_glutIdleFunc( glutDisplay );

    GLUI * glui = GLUI_Master.create_glui( "Widgets", 0, 400, 50 );
    glui->set_main_gfx_window( main_win );

    glutMainLoop();

    return 0;
}


The funny thing is that, purely out of luck, I found the cause.
It breaks & gets an error IF NVidia’s thread optimization is enabled. I disabled it & runs fine.

But now, whose fault is it? GLUI, glIntercept or NVidia’s (latest) drivers??