Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Graphics > OpenGL 3D API > Re: The error w...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 4 Topic 4819 of 5017
Post > Topic >>

Re: The error was 'GLXBadDrawable'.

by "jbwest" <jbwest@[EMAIL PROTECTED] > Jun 30, 2008 at 10:14 AM

"mathieu" <mathieu.malaterre@[EMAIL PROTECTED]
> wrote in message 
news:954030fd-1bf8-4ceb-a0fe-759f8227b99d@[EMAIL PROTECTED]
> On Jun 30, 5:19 pm, "jbwest" <jbw...@[EMAIL PROTECTED]
> wrote:
>> "mathieu" <mathieu.malate...@[EMAIL PROTECTED]
> wrote in message
>>
>>
news:6ed1cefc-393a-4846-8217-0632f447ed34@[EMAIL PROTECTED]
>>
>>
>>
>> > Hi there,
>>
>> >  I have a program that open *one* X11 'Display' and then within a
>> > loop I create a X11 'Window' & an associated GLXContext.
>> >  It works fine for the first ~450 windows but simply seg fault on the
>> > glXMakeCurrent call with:
>>
>> > ...
>> > The error was 'GLXBadDrawable'.
>> >  (Details: serial 36264 error_code 158 request_code 143 minor_code
>> > 26)
>> > ...
>>
>> >  Is there some kind of maximum number of glx context I can open
>> > within the same Display ? If so how can I request this max number ?
>>
>> > Thanks
>> > -Mathieu
>>
>> There's always some maximum limit of windows imposed by your windowing
>> system.
>> Nope, can't ask fer it. A windowing system limit depends (in x11) on
the
>> x-server's limits,
>> and your app isn't the only user of X11, so theres no one per-app
limit. 
>> X
>> server probably out of memory.
>>
>> It's like asking if there's a limit on how much memory you can
allocate.
>> There is, but the only way to know is
>> to get memory until it fails...
>
> Ok I was not clear let me rephrase that.
>
> Using nvidia opengl implementation the call to glXMakeCurrent fails at
> around ~450 windows. While if I LD_PRELOAD the Mesa3D implementation
> then I have virtually not limit (I stopped testing at ~2500 window).
>
> And just to avoid any further misundertanding I am not talking about
> the 'Xlib: maximum number of clients reached' issue (when you are
> calling too many time XOpenDisplay). I only have one instance of a
> Display*.
>
> Thanks again
> -Mathieu

450 windows is still a lot of opengl windows and since it fails with a bad

drawable either
a) you have a memory bug -- run valgrind!
b) your window creation failed, so the glxMakeCurrent failed.


run valgrind, run X11 synchronously, check for errors...

MESA is much more of a software construct, but it could be as simple as it

uses memory differently and hides your memory bug.

450 full-screen windows is (rgba + 24 bits depth = 7 bytes x ~ 1meg window
= 
7m * 450 == ~ 3gigs whoops!).
You need a 64 bit machine ...

jbw
 




 4 Posts in Topic:
The error was 'GLXBadDrawable'.
mathieu <mathieu.malat  2008-06-30 08:09:24 
Re: The error was 'GLXBadDrawable'.
"jbwest" <jb  2008-06-30 08:19:06 
Re: The error was 'GLXBadDrawable'.
mathieu <mathieu.malat  2008-06-30 09:13:49 
Re: The error was 'GLXBadDrawable'.
"jbwest" <jb  2008-06-30 10:14:45 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Nov 21 4:54:48 CST 2008.