मैं दो छवियों के बीच "क्रॉस-ओवर" प्रभाव करने के लिए glReadPixels के साथ एक स्क्रीनशॉट ले रहा हूं।ओपनजीएल ES - glReadPixels
जैम एसडीके सिम्युलेटर पर, स्क्रीनशॉट ठीक लिया जाता है और "क्रॉस-ओवर" प्रभाव इलाज काम करता है:
बहरहाल, यह है कि यह कैसे iOS और Android उपकरणों पर दिखता है - भ्रष्ट: http://www.eikona.info/images/81269689420703803966.png
मैं हमेशा आरजीबीए 1 बाइट/चैनल के रूप में स्क्रीन को पढ़ता हूं, documentation says के रूप में यह हमेशा स्वीकार किया जाता है।
uint8* Gfx::ScreenshotBuffer(int& deviceWidth, int& deviceHeight, int& dataLength) {
/// width/height
deviceWidth = IwGxGetDeviceWidth();
deviceHeight = IwGxGetDeviceHeight();
int rowLength = deviceWidth * 4; /// data always returned by GL as RGBA, 1 byte/each
dataLength = rowLength * deviceHeight;
// set the target framebuffer to read
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glPixelStorei(GL_PACK_ALIGNMENT, 1);
uint8* buffer = new uint8[dataLength];
glReadPixels(0, 0, deviceWidth, deviceHeight, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
return buffer;
}
void Gfx::ScreenshotImage(CIwImage* img, uint8*& pbuffer) {
int deviceWidth, deviceHeight, dataLength;
pbuffer = ScreenshotBuffer(deviceWidth, deviceHeight, dataLength);
img->SetFormat(CIwImage::ABGR_8888);
img->SetWidth(deviceWidth);
img->SetHeight(deviceHeight);
img->SetBuffers(pbuffer, dataLength, 0, 0);
}
यदि आप अपना 'अप-डाउन' ब्लॉक हटाते हैं, तो भ्रष्टाचार दूर हो जाता है? बस ऊपर उल्टा? या यह _and_ उल्टा हो गया है? – sarnold
बात यह है कि मेरे पास डिवाइस नहीं है इसलिए मुझे अपने क्लाइंट को भेजने की ज़रूरत है, उसके बाद उसे स्थापित करने और परीक्षण करने की प्रतीक्षा करें ... इसमें सब कुछ हो सकता है :-( –
उपरोक्त टिप्पणियां हैं अब मेरे नए निष्कर्षों को प्रतिबिंबित करने के लिए मेरे संदेश को दोबारा संपादित करने के बाद अप्रासंगिक। –