Jump to content

running animation performance drops at 1st time, but later it becomes normal


tywang2006
 Share

Recommended Posts

Hi guys, i  run renderer.textureManager.updateTexture(resource.texture) every time when the texture loaded before the game starts. I assume it will be successful to upload texture to GPU. However, the animation make the game frame drop slightly obviously at the first time then it back to 60fps at normal. Any one has some idea about it, the animation texture is very big because the game needs to run in full hd resolution. thanks

Link to comment
Share on other sites

1 minute ago, ivan.popelyshev said:

OK, then you have to render any element in HD before we you the game. Just empty container with "filterArea = app.screen" or renderer.screen will do.

I found a issue, when i call renderer.textureManager.updateTexture(resource.texture), it return null, but check source code, it should returen gltexture instead.

 

then I have another queston, why it will return null, it means the texture has been uploaded to GPU, which doesnt make sense to me

Link to comment
Share on other sites

19 hours ago, ivan.popelyshev said:

OH, you yhave to pass BaseTexture there! "updateTexture(resource.texture.baseTexture)"

Ivan, i found another issue, during the time playing the game, some animation will slow again like What i said, is it due to gc rule internally, if some animation not fired for a while, it will gc automatically? that is what i guess, i think you are far more understanding its GC rule:)

Link to comment
Share on other sites

2 hours ago, ivan.popelyshev said:

yeah, "not fired for a while" , exactly. You an turn it off

"renderer.textureGC.mode=PIXI.GC_MODES.MANUAL" or something like that

cool, so this gc mode is only for  webgl to manage gltexture, is that right?

Link to comment
Share on other sites

23 hours ago, ivan.popelyshev said:

yeah, "not fired for a while" , exactly. You an turn it off

"renderer.textureGC.mode=PIXI.GC_MODES.MANUAL" or something like that

I did PIXI.settings.GC_MODE = PIXI.GC_MODES.MANUAL; but it seems not working, the gltexture seems been gc while it hasnt been used for a while

Link to comment
Share on other sites

20 minutes ago, ivan.popelyshev said:

because you create renderer/application before you change the setting?

haha i read source code, i did 

PIXI.settings.GC_MODE = PIXI.GC_MODES.MANUAL;
          app = new PIXI.Application(width, height);

so renderer is created after setting gc haha

Link to comment
Share on other sites

On 6/9/2017 at 2:47 PM, ivan.popelyshev said:

Are you sure that "renderer.textureGC.mode" is 1?

basically the render.textureGC.mode is not avaliable, it is all from PIXI.Setting.GC_MODE. it seems fine now, if the issue is raised again, I will check then discuss with you:d0

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...