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,
~1500 verts is really nothing for a full frame, so I wouldn't even worry about reducing the number of verts in your application. If you've losing perf somewhere that would be the last place I'd look. Is all your rendering done to the window surface or do you use any FBOs?
That said, your verts come from your assets, so if you want to use less verts that's what you need to modify.
Thanks,
Chris
Hi Chris,
i use cocos2d to render
i just use cocosbuilder to conbine png or jpg to ccbi file
then addChild to the scene
cocos2d will help me complete other steps
so i do not understand this words "Is all your rendering done to the window surface or do you use any FBOs"
can you tell me how to use Mali graphics debugger to find FBOS or other useful data?
Forgive my poor English o(∩_∩)o
i found the edge of framebuffers is unusual, not full of the screen
can you tell me what happen with my app?
and vertex position is a negative number
thanks,
Zhong
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?
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?