PDA

View Full Version : CL_GraphicContext::get_pixeldata patch for GL/GL1 target



huntercool
10-22-2010, 02:32 PM
Here's a patch to get screenshots working.

Tested on ATI 5870, Windows 7.

Have not tested Nvidia cards.

rombust
10-22-2010, 03:51 PM
Maybe that patch will also require a "framebuffer active" check for the GL target, like you did for the GL1 target.

So, you can still get pixels from the framebuffer (without calling clReadBuffer(CL_BACK);)

I think there is a "framebuffer_bound" bool in GL that you can use.

huntercool
10-26-2010, 09:42 AM
There sure was a "framebuffer_bound" in the GL target.

This patch should work.

rombust
10-29-2010, 08:04 AM
Patch applied to ClanLib 2.2 and 2.3 svn

Many Thanks