Ticket #171 (new usability)

Opened 18 months ago

Last modified 6 months ago

XGetImage() fails for GL windows

Reported by: michael.mccarty@… Owned by: jeremyhu@…
Priority: major Milestone: OpenGL.framework DRI
Component: xserver Version: 2.3.1 (xserver-1.4)
Keywords: Cc:

Description

I'm porting an X11 application to OS X and there's a section of code that uses XGetImage() to get the color of the pixel below the mouse cursor (i.e. XGetImage(dpy,d,x,y,1,1,...) ). This works as expected unless the cursor happens to be over a GL window in which case it simply returns the X window background color.

Change History

Changed 18 months ago by jeremyhu@…

  • version changed from 2.1.4 (xserver-1.3) to 2.3.1 (xserver-1.4)
  • milestone set to OpenGL.framework DRI

Changed 18 months ago by jeremyhu@…

  • owner changed from jeremyhu@… to gstaplin@…

Changed 14 months ago by gstaplin@…

Unfortunately this is a known problem. The way that the Xplugin surfaces work with OpenGL and XQuartz is that they are layered above the actual window used for X11 rendering, so the surface stacks above the other memory for the window. When you call XGetImage you get none of the actual OpenGL content. I have some ideas for working around this that I have experimented with, but nothing concrete the completely solves the problem. For now, you can work around it with glReadPixels and things like that.

Changed 6 months ago by jeremyhu@…

  • owner changed from gstaplin@… to jeremyhu@…
Note: See TracTickets for help on using tickets.