|
@@ -30,6 +30,7 @@
|
|
#include "gfx/primBuilder.h"
|
|
#include "gfx/primBuilder.h"
|
|
#include "gfx/gfxDrawUtil.h"
|
|
#include "gfx/gfxDrawUtil.h"
|
|
#include "postFx/postEffectManager.h"
|
|
#include "postFx/postEffectManager.h"
|
|
|
|
+#include "gfx/screenshot.h"
|
|
|
|
|
|
IMPLEMENT_CONOBJECT(GuiColorPickerCtrl);
|
|
IMPLEMENT_CONOBJECT(GuiColorPickerCtrl);
|
|
|
|
|
|
@@ -707,17 +708,10 @@ void GuiColorPickerCtrl::activateEyeDropper()
|
|
// Set up our resolution.
|
|
// Set up our resolution.
|
|
Point2I resolution = getRoot()->getExtent();
|
|
Point2I resolution = getRoot()->getExtent();
|
|
|
|
|
|
- // Texture handle to resolve the target to.
|
|
|
|
- eyeHandle.set(resolution.x, resolution.y, GFXFormatR8G8B8A8_SRGB, &GFXRenderTargetSRGBProfile, avar("%s() - bb (line %d)", __FUNCTION__, __LINE__));
|
|
|
|
-
|
|
|
|
- // Get our active render target (should be backbuffer).
|
|
|
|
- eyeHandle = PFXMGR->getBackBufferTex();
|
|
|
|
|
|
+ eyeDropperCap = gScreenShot->_captureBackBuffer();
|
|
|
|
|
|
- if (eyeHandle.isValid())
|
|
|
|
- {
|
|
|
|
- eyeDropperCap = new GBitmap(eyeHandle.getWidth(), eyeHandle.getHeight(), false, GFXFormatR8G8B8A8);
|
|
|
|
- eyeHandle.copyToBmp(eyeDropperCap);
|
|
|
|
- }
|
|
|
|
|
|
+ // Texture handle to resolve the target to.
|
|
|
|
+ eyeHandle.set(eyeDropperCap, &GFXStaticTextureSRGBProfile, false, avar("%s() - bb (line %d)", __FUNCTION__, __LINE__));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|