02-28-2004, 12:23 PM
Hi there... I'm trying to use this GLX function as part of some wrangling to get a pbuffer under OpenGL+Linux up and running... Admittedly, I don't know anything about GLX, so in a sense I'm a bit ignorant... Please forgive.
The question: Things (i.e., from glXGetCurrentDisplay to glXMakeContextCurrent) actually works. What I don't understand is when this context "goes out of scope" and the old one is restored...?! My "test drawing" and subsequent glReadPixels and writing to file indicates that the thing gets written to the pbuffer properly (*), but after those codelines, the rest of my original program seems to just revert to drawing to the visible framebuffer... I would have expected everything from that point on to end up in the pbuffer!!! Is my "pbuffer context" discarded as soon as I do a glEnable, Disable, End, Begin, or something?!
I guess the main problem here is that I don't actually know where to look... Googling didn't help, for once... :-(
(*) Funny thing is that a glClear on the pbuffer misses the last row and last column of pixels! Oh, well... thats nit-picking...
The question: Things (i.e., from glXGetCurrentDisplay to glXMakeContextCurrent) actually works. What I don't understand is when this context "goes out of scope" and the old one is restored...?! My "test drawing" and subsequent glReadPixels and writing to file indicates that the thing gets written to the pbuffer properly (*), but after those codelines, the rest of my original program seems to just revert to drawing to the visible framebuffer... I would have expected everything from that point on to end up in the pbuffer!!! Is my "pbuffer context" discarded as soon as I do a glEnable, Disable, End, Begin, or something?!
I guess the main problem here is that I don't actually know where to look... Googling didn't help, for once... :-(
(*) Funny thing is that a glClear on the pbuffer misses the last row and last column of pixels! Oh, well... thats nit-picking...