Hello!
I've been trying for several days to get this to work and at this point I am convinced that it is a bug.
According to the docs if I modify a texture in main memory and call GX_InvalidateTexAll() it's supposed to reload the texture into the texture cache, but it just doesn't work on real hardware. It works in dolphin for some reason though.
I can even change to a completely different texture image with GX_InitTexObjData() and that works fine but just changing pixels in the texture does nothing.
I've attached an example program that shows a spinning white textured cube and pressing left or right on the dpad of a gamecube controller in the player one slot should erase pixels on the texture.
Am I just doing something wrong?
GX_InvalidateTexAll() does nothing
GX_InvalidateTexAll() does nothing
- Attachments
-
- example.zip
- example program
- (3.95 KiB) Downloaded 537 times
-
- main.cpp
- example program main file
- (6.76 KiB) Downloaded 549 times
Re: GX_InvalidateTexAll() does nothing
I finally got it working. Apparently I needed to manually flush the cpu cache to main memory.
From the header, I added after changing the texture
From the
Code: Select all
#include <ogc/cache.h>
Code: Select all
DCFlushRange(texarray, 0x400);
Who is online
Users browsing this forum: No registered users and 2 guests