This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Mali Graphics Debugger, how  can  i  reduce vertex number?

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?

   

Parents
  • 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

Reply
  • 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

Children