glXMakeCurrent fails

in the init I called glXChooseVisual successfully, after that a glXCreateContext, also successfully, but the glXMakeCurrent fails…

does anybody have any idea what is going wrong?

(it’s my first opengl testing sample)

can anybody help me please?

Please give some example code.

Originally posted by plastichead:
Please give some example code.

vinfo := glXChooseVisual(display, XDefaultScreen(display), @attr[0]);
if vinfo = nil then Error(‘no visual satisfies requirement’);
result := glXCreateContext(display, vinfo, 0, true);
XFree(vinfo);
if result = nil then Error(‘cannot create gl context’);
if not glxMakeCurrent(display, drawable, result) then
Error('glXMakeCurrent failed: ‘+IntToStr(integer(display))+’ : ‘+IntToStr(drawable)+’ : '+IntToStr(integer(result)));

Are your display and drawable valid (drawable != 0 and display opened with XOpenDisplay())?

A general programming tip: Reduce your code to a minimum that works.

In your case it seems that you can’t do this, so reduce your code to a minimum you think that should work. Then post it here, please.