PDA

View Full Version : Pointer to Offscreen Pbuffer



OliverS
06-11-2002, 06:33 AM
Does anybody know a workaround to get a pointer to an offscreen pbuffer. I know that there are no extensions to get that pointer !
But is there some kind of trick ??

Thanks

Oliver

Bob
06-11-2002, 11:15 AM
You can write to the company developing your driver and ask for the source code to the driver, so you can modify it yourself. Other than that, I guess there no tricks.

AdrianD
06-11-2002, 11:52 AM
If you want gain DIRECT accecss to your hardware, you'll probably look for some kind of DIRECT api... and there is such kind of API out there: it's called "DirectX".

Omaha
06-11-2002, 12:45 PM
Oh, zzzzzing.

NordFenris
06-11-2002, 01:09 PM
If you don't need to do that while GL mucks around, but before or after, then you can do one of the following:

Get the screen buffer (using WGL, XGL or AGL) before you swap the buffers (After)
Perform all your blitting on an offscreen buffer, use it as a texture and fill the screen with it.

Also, you can do a helluva lot of calls to glReadPixels but that is hysterically slow.

dorbie
06-11-2002, 01:25 PM
That is rubbish, if I implement a function in OpenGL that says "lock pbuffer" and in there implement a readback to host memory and give you a pointer to the host memory I placed the copy would you be happy Adrian?

Bottom line is this is graphics hardware and you don't want to be messing around with direct memory access like this. If you need to do it then readback the area you need to edit. Everything else merely papers over the cracks and pretends you have a programming paradigm which doesn't actually match what most of the hardware does. The drawbacks of that delusion should be clear, despite the Microsoft FUD.