i have bug that only happen when retina flag disabled.
i try draw multiple render texture to achive some multi post effect: so i have 3 render texture,
fbo 1 for final pos effect
fbo 2 for back buffer w/light
fbo 3 for light mask
i apply this using fbo mechanisms of cocos2dx
push the fbo1 to screen
push the fbo2 to fbo1
fbo 3 just for sampler texture for render in fbo2 shader
gameplay actor will be drawn on fbo2, after that fbo2 will be rendered to fbo1 ( we can apply some effect here) then fbo1 drawn to screen, then do some gui layering.
the thing is all gp actor drawn into fbo2 , "seems" become scaled down 3 times, so its like the small game screen on left bottom corner, but the light from fbo3 or gui that directly drawn to screen normal positioned and not scaled .
i really dontknow who is scale my fbo2, but i check the matrix its all correct. but seems lot setviewport in rendertexture.h, idont know how its work actualy, so if any one know how viewport work on fbo,
- no direct open gl acces for my code except attach shader
- if i dont use fbo2 one, ( using fbo1 directly ), the bug doesnt happen
** this doesnt happen on retina true ( scaled 2x ) , this happen on win32 or mac when i disabled retina ,
** tracing draw order correcty
** log below on command:
( i render some sprite to this fbo first ex: alpha gradient mask)
( i render gp actor here)
( render attached fbo2 texture with shader carries sampler of attached texture 3)
( render attached fbo1 texturee)* may caries some shader
( render gui part )