<div dir="ltr">It sounds like the application in question doesn't take enough care to reset all GL state that affects glReadPixels to the necessary values.<div><br></div><div>I recommend you either:</div><div><br></div><div>- study apitrace/retrace/glstate_images.cpp source code</div><div><br></div><div>-  take a trace of glretrace itself:</div><div><br></div><div>    apitrace trace -o glretrace.trace glretrace -S some-frame-call-no your-app.trace</div><div><div class="gmail_extra">    apitrace trace dump glretrace.trace</div><div class="gmail_extra"><br></div><div class="gmail_extra">and compare what glretrace does to dump the screenshot, vs what your app does.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Jose</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 24, 2015 at 6:29 PM, Divick Kishore <span dir="ltr"><<a href="mailto:divick.kishore@gmail.com" target="_blank">divick.kishore@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
    I am using apitrace to debug some erroneous output with an<br>
application. The application is such that it does not render to<br>
regular framebuffer instead it renders to FBO and then reads back via<br>
glReadPixels which is passed on over network/socket for rendering.<br>
<br>
The issue that I see is that if I dump the framebuffer just before the<br>
readpixels in apitrace, it shows the correct output but surprisingly<br>
it doesn't show the correct output when I do readback in the<br>
application. This just doesn't seem right to me as I presume that<br>
apitrace would also be using readpixels to generate output at a given<br>
call.<br>
<br>
I understand that without the trace or the code it is hard to guess<br>
what is going on but just in case apitrace is doing something<br>
differently to generate the frames at a given call will help us nail<br>
down why there is a difference.<br>
<br>
Note that there is only one particular frame/scene in the game which<br>
is not right while earlier frames seem fine. I have already<br>
checked/tried different readback modes RGB, RGBA etc. along with<br>
different packing alignments etc but that doesn't seem to fix it.<br>
<br>
I would appreciate any help or pointers.<br>
Thanks,<br>
Divick<br>
_______________________________________________<br>
apitrace mailing list<br>
<a href="mailto:apitrace@lists.freedesktop.org">apitrace@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/apitrace" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/apitrace</a><br>
</blockquote></div><br></div></div></div>