How do you know when you run out of texture memory?
How do you know when you run out of texture memory?
When I run my game in the emulator it works but some of the textures look weird,
when I run it on the DS it just shows a blank screen,
Im converting a game from desktop to DS and the textures may take up more graphics memory than the DS has, is there a way of telling if that is the problem?
when I run it on the DS it just shows a blank screen,
Im converting a game from desktop to DS and the textures may take up more graphics memory than the DS has, is there a way of telling if that is the problem?
Re: How do you know when you run out of texture memory?
Im using 3D quads to draw to the screen
so all my images are textures by the way
so all my images are textures by the way
Re: How do you know when you run out of texture memory?
1. you know how big your textures are
2. you know how much vram you allocated for textures
3. glTexImage2D has a return value
2. you know how much vram you allocated for textures
3. glTexImage2D has a return value
Re: How do you know when you run out of texture memory?
emulators tend to be very forgiving in regards to exceptions that will hang the hardware. if you have not already, try running: at the start of your main function. if an exception occurs at will dump registers and stack to a red screen which you can use to find the source of the problem.
Code: Select all
defaultExceptionHandler();
Re: How do you know when you run out of texture memory?
'defaultExceptionHandler();'
thanks for the BROtip
thanks for the BROtip
Re: How do you know when you run out of texture memory?
when i put that in my main function it says:
error: expected constructor, destructor, or type conversion before ';' token
error: expected constructor, destructor, or type conversion before ';' token
Re: How do you know when you run out of texture memory?
you need to add a header file eitherslenkar wrote:when i put that in my main function it says:
error: expected constructor, destructor, or type conversion before ';' token
#include <nds.h>
or minimally
#include <nds/arm9/exceptions.h>
Re: How do you know when you run out of texture memory?
ah yes I put it in the wrong place, it compiles now thanks
Re: How do you know when you run out of texture memory?
ok now if I run it in the emulator.. the emulator simply closes
If I run it on the hardware (original DS) it turns itself off!
Am I supposed to be calling the function every frame , or just once before the game loop?
If I run it on the hardware (original DS) it turns itself off!

Am I supposed to be calling the function every frame , or just once before the game loop?
Re: How do you know when you run out of texture memory?
no, just call it once like I indicated. if you call "exit" then it will do this. add the following code to your project - systemErrorExit gets called before exit shuts down the DS. this example relies on stdout/printf being setup and wait for the A button to be pressed before shuting down.
Code: Select all
#ifdef __cplusplus
extern "C" {
#endif
void systemErrorExit(int rc) {
printf("exit with code %d\n",rc);
while(1) {
swiWaitForVBlank();
if (keysCurrent() & KEY_A) break;
}
}
#ifdef __cplusplus
};
#endif
Who is online
Users browsing this forum: No registered users and 2 guests