why does not load large image after sprites initialization?

SGDK only sub forum

Moderator: Stef

Post Reply
alko
Very interested
Posts: 148
Joined: Thu Aug 07, 2014 9:31 am
Location: Russian Federation

why does not load large image after sprites initialization?

Post by alko » Sat May 12, 2018 6:06 pm

why does not load large image after sprites initialization?

Image

Image

and

Image

Image
Image

User avatar
Stef
Very interested
Posts: 2757
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: why does not load large image after sprites initialization?

Post by Stef » Sun May 13, 2018 11:25 am

You are calling SPR_clear() before SPR_init(..) ?? you should not do that ^^
Also initializing sprite engine means you reserve a part of VRAM to it and maybe you don't have enough VRAM to load the image then.

alko
Very interested
Posts: 148
Joined: Thu Aug 07, 2014 9:31 am
Location: Russian Federation

Re: why does not load large image after sprites initialization?

Post by alko » Sun May 13, 2018 8:00 pm

Stef wrote:
Sun May 13, 2018 11:25 am
You are calling SPR_clear() before SPR_init(..) ??
but how to clean up the sprites after previous scene?...
In addition, this does not affect the result in my case.
Image
Also initializing sprite engine means you reserve a part of VRAM to it and maybe you don't have enough VRAM to load the image then.
I tried different variables in function SPR_init. :cry:
Image

alko
Very interested
Posts: 148
Joined: Thu Aug 07, 2014 9:31 am
Location: Russian Federation

Re: why does not load large image after sprites initialization?

Post by alko » Mon May 14, 2018 7:45 pm

Solved:
called function SPR_end() after SPR_init ()
Image

User avatar
Stef
Very interested
Posts: 2757
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: why does not load large image after sprites initialization?

Post by Stef » Mon May 14, 2018 10:07 pm

SPR_end() just after SPR_init() ?? you mean when you don't need it sprite engine anymore ? Calling SPP_end() means you close the sprite engine... if you just want to reset it you can replace SPR_end() / SPR_init(..) by SPR_reset() / SPR_clear() sequence which is faster :) Also you may try the new SPR_defragVram() method (only on github currently), it can be useful when you do a lot of add/release sprite sequence.

alko
Very interested
Posts: 148
Joined: Thu Aug 07, 2014 9:31 am
Location: Russian Federation

Re: why does not load large image after sprites initialization?

Post by alko » Thu May 17, 2018 5:46 pm

Stef wrote:
Mon May 14, 2018 10:07 pm
SPR_end() / SPR_init(..) by SPR_reset() / SPR_clear()
all the same image are not loaded. :?
Image

User avatar
Stef
Very interested
Posts: 2757
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: why does not load large image after sprites initialization?

Post by Stef » Fri May 18, 2018 3:09 pm

I think you should investigate about VRAM usage looking into Kmod or other emulators providing VRAM view, difficult to say what is happening exactly here...

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest