gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Display list with multiple textures

#176019 - Rajveer - Mon Mar 21, 2011 2:08 pm

If I have a single display list with geometry that uses different textures, and I change the texture being used within the display list itself, is there any way to set which texture to use dynamically?

I'm guessing not as TEXIMAGE_PARAM and PLTT_BASE take the address of the texture/palette, so if I were to create a display list with these hardcoded I'd have to ensure that the texture and palette that I want are always at the address stored in the list?

#176020 - elhobbs - Mon Mar 21, 2011 2:23 pm

a display list is just a block of memory. is there any reason you cannot just find the command where you set the texture and change it? the only issue would be to make sure you either flush the cache after the update or update it through the no-cache memory range.

#176021 - Rajveer - Mon Mar 21, 2011 11:25 pm

Yeah I could do that, I was just wondering if there was another way that would be simpler. Although tbh it didn't occur to me to just overwrite the commands in the list itself during load :)

#176022 - elhobbs - Tue Mar 22, 2011 12:34 am

if you need to change them often you may want to cache the offsets instead of searching each time.