Jump to content

How can Check BaseTexture updated to GPU Memory


GBear
 Share

Recommended Posts

hi.

this is normal shot. loaded all and everything ok
norma.png

this is not normal. because not loaded basetexture or not updated to basetexture to gpu
this image will be show like upper image. but very short time, under image can see.
so i want not drawing under image. if i can't check correct.. i wanna dray empty image.
 many big images is loaded at starting time. and i updated to gpu by updateTexture function of renderer object;
and than i see under breaking texture for very short time(during not updated to gpu )

do you have any good idea please tell me..

not_normal.png

Link to comment
Share on other sites

i wrote new code 
it call updateTexture of renderer function 
and update by force 

my  pseudo code  like following..


var ch = new Character();
ch.visible = false;


var renderer = Core.SceneManager.renderer;
	if (baseTexture.hasLoaded) {
		renderer.updateTexture(baseTexture);
		if(ch) {
			ch.visible = true;
		}
	} else {
		baseTexture.once('update', function () {
			renderer.updateTexture(this);
			if(ch) {
				ch.visible = true;
			}
		}, baseTexture);
	}



but i couldn't resolve upper issue..

somebady know about that..

Character is using spine..
thx..

Link to comment
Share on other sites

  • 2 weeks later...

somebody know how upper issue fix?

broken image is happened if baseTexture is not loaded yet.

i find this issue happen like follow issue..
  - load Big Texture like UI Pack. (UI Pack is created by texturePacket. so it has png and altas)
  - create Sprite of part of UI like Login Button
  - but UI Pack is not loaded yet..
  - and than Login Button draw like upper image that broken texture
             - if UI Pack is loaded. everything draw good
  
  in this case sprite know width and height . because ui pack's atlas loaded and generate textures on cache. but textures is not have loaded bastexture..
 
 in this case how can i draw empty(blank) texture?

please tell us...

thx..

ps> if loaded all before using drawing . it will be ok.  but i have to load during playing game like monsters, objects, npcs,,,etcs...
 

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...