View Full Version : glXMakeCurrent fails

03-22-2003, 12:06 AM
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)

03-25-2003, 12:10 AM
can anybody help me please?

03-25-2003, 12:34 PM
Please give some example code.

03-26-2003, 05:44 AM
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);
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)));

03-26-2003, 12:50 PM
Are your display and drawable valid (drawable != 0 and display opened with XOpenDisplay())?

03-26-2003, 12:55 PM
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.