hi everyone:
i use Mali Graphics Debugger to analyse an android app
i found that the number of vertex is higher than other game
how can i reduce vertex number?
Hi zhong,
For the vertex positions, If you take a look at the shader which is transforming those positions, they will likely end up being valid screen space coordinates post transformation input values can be completely arbitrary, it's the output of the shader that counts.
As for the FBO's, if you can only see one FBO in MGD, FB0, then you are only rendering to one. You can confirm this in either the "Framebuffers" view or the "Assets" view.
As for the garbage at the side of the screen, is this visible in the final image on the device? Are you calling glClear(GL_COLOR_BUFFER_BIT) at the start of the frame? Is the viewport/scissor region set to the full size of the window when you do this? You can step through the draw calls in a captured frame with MGD and see which draw call introduces the garbage data. If it's there in the very first draw call then it's either being drawn by that draw call or you are not clearing the full buffer at the start of the frame.
As you're using Cocos2D, it's likely the above is actually abstracted below the level at which you are working. Can you let me know if there are any performance issues with your game that prompted this investigation, or are you just taking a look out of interest?
Thanks,
Chris
Hi Chris,
For the vertex positions and the garbage at the side of the screen,i found the reason ,i use samsung i9300 which resolution is 720×1280 , but viewport of my game is (-66,0,853,1280) ,i think the correct viewport is (0,0,720,1280)
Thanks a lot
Glad that was the correct issue, an easy fix. Are there any other issues you'd like help with?