I am now busy getting the GLX and Xlib working together. Somehow I get a strange error. The window is properly created and mapped, the visual is properly selected and the valid rc is also being created (I tested it). Hovewer, I get a “zero division exception” on the line where I bind the context to the window. Basically, I followed glxgears code (and glxgears runs). What am I doing wrong? I use nvidia glx module for Xorg
…i think it’s just some kind of punishment for using an exotic programming language
it seems a bit strange to me you that have to pass the window twice to glXMakeContextCurrent. why is the pascal function different from the C function? is it possible that it is an error that your compiler ignores?
The second drawable parameter is for the read window.
glXMakeContextCurrent is the glx 1.3 version of glXMakeCurrent. Did you tried the other version ?
Also, as far as I know, glx 1.3 is only supported on nVidia hardwares and glx initialization is different on this version. Try to go back to full glx 1.2, it works well everywhere.
Usually I work with .NET and Boo, that’s an exotic language Pascal is still older then C
Now to the topic: using the usual glxMakeCurrent has the same effect (the same exception) - I just wanted to try the other version it out. As you can see, I actually use teh old plain glx 1.1 (no fbuffer configurations etc.)
RigidBody, maybe you are right and that is an compiler issue. I’ll try to write it using C and look if it will work.
ad 1) : the more restrictions you enforce, the higher is the probability that a visual with that restrictions does not exist on your system. but as you said, you checked the visual and the gl context? so the problem doesn’t seem to be there.
ad 2) : don’t know, i never use glXMakeContextCurrent have you tried glXMakeCurrent in your code?
and finally, maybe you could register for the wiki… i don’t think there are so many people who have knowledge about pascal and opengl
glXMakeCurrent throwed exacly the same exception. I bet it is implemented as a glXMakeContextCurrent call
The exception arised when I tried to bind the context to the window, so maybe it didn’t like the window. Probably it was the border color or stuffs… anyway, thank you, now I have a working sample.
I will probably contribute to the wiki, I was looking to this for long time already