Off-screen rendering in X
I''ve looked into this subject a little, and all I''ve found is the pixmap-approach. I wonder if this is the best way, as I''ve found no extensions for this (and pixmap-rendering actually seems a little unreliable).
Thanx in advance for replies!
Another question I had in mind:
How do one create a pixmap with a specific visual, differing from the window visual? Is it even possible, and if so, is the only way to manually set an XVisualInfo-struct?
How do one create a pixmap with a specific visual, differing from the window visual? Is it even possible, and if so, is the only way to manually set an XVisualInfo-struct?
Another problem:
I tried pixmaps, but when I call glXMakeCurrent, X-Window crashes without any error messages at all. I''ve searched for a few examples on off-screen rendering using pixmaps, which seem to work for their authors, but not for me! They all crash...
I''m getting desperate. If any of you know what''s wrong, I''d greatly appreciate your replies.
Also, if you know of any other methods for off-screen rendering (preferrably to-texture-rendering), I''m very willing to listen.
I tried pixmaps, but when I call glXMakeCurrent, X-Window crashes without any error messages at all. I''ve searched for a few examples on off-screen rendering using pixmaps, which seem to work for their authors, but not for me! They all crash...
I''m getting desperate. If any of you know what''s wrong, I''d greatly appreciate your replies.
Also, if you know of any other methods for off-screen rendering (preferrably to-texture-rendering), I''m very willing to listen.
*sighs* I wrote a longer reply, but my computer died before I posted it.
Basically...
Rendering to surface and then binding that surface as a texture is a pain under glx. This is mostly ''cause you dont have direct access to the pixel data of pixmaps (them being server side objects).
Consider using the opengl off-screen rendering proceedures (Im sorry, I''ve forgotten what they''re called).
Basically...
Rendering to surface and then binding that surface as a texture is a pain under glx. This is mostly ''cause you dont have direct access to the pixel data of pixmaps (them being server side objects).
Consider using the opengl off-screen rendering proceedures (Im sorry, I''ve forgotten what they''re called).
Well, I know what the problem about the pixmaps was. Differing bit-depths and stuff...
You mean Pbuffers? I got them working, until I added alpha-blending to the attributes. This time, only the program crashes. Gotta fix that too.
You mean Pbuffers? I got them working, until I added alpha-blending to the attributes. This time, only the program crashes. Gotta fix that too.
*nods* Yeah; If you create a pixmap you get hassels if its not the same depth as the server (Even if the server supports that depth), esepcially when you try to mix & match (BadMatch errors abound). Try using XSyncronize (display, True) during testing to find errors; it forces the server to syncronize every call, rather just when you do events, or flush. For example, that means if you create a window which is bad, it bails on the XCreateWindow() call, not on your XNextEvent() call.
And, yes. Pbuf's are what I was talking about.
(Edit -
Ps. Try comp.windows.x on the usenet for lots of people to help with Xlib programming (& glx stuff). There are relatively few people who actually understand the API, and a fair number of them can be found @ comp.windows.x.
)
[edited by - Shadow Mint on July 21, 2002 8:02:34 PM]
And, yes. Pbuf's are what I was talking about.
(Edit -
Ps. Try comp.windows.x on the usenet for lots of people to help with Xlib programming (& glx stuff). There are relatively few people who actually understand the API, and a fair number of them can be found @ comp.windows.x.
)
[edited by - Shadow Mint on July 21, 2002 8:02:34 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement