Example #1
0
File: sf2d.c Project: Voka/lpp-3ds
int sf2d_fini()
{
	if (!sf2d_initialized) return 0;

	//aptUnhook(&apt_hook_cookie);

	gfxExit();
	shaderProgramFree(&shader);
	DVLB_Free(dvlb);

	linearFree(pool_addr);
	linearFree(gpu_cmd);
	vramFree(gpu_fb_addr);
	vramFree(gpu_depth_fb_addr);

	sf2d_initialized = 0;

	return 1;
}
Example #2
0
void TestAll() {
    const std::string tag = "MemoryFills";

    u8* buffer = (u8*)vramAlloc(0x400);

    Test(tag, "Fill24Bits", Fill24Bits(buffer), true);
    Test(tag, "Fill32Bits", Fill32Bits(buffer), true);

    vramFree(buffer);
}
Example #3
0
void C3D_TexDelete(C3D_Tex* tex)
{
	if (!tex->data) return;

	if (addrIsVRAM(tex->data))
		vramFree(tex->data);
	else
		linearFree(tex->data);

	tex->data = NULL;
}
Example #4
0
void sf2d_free_texture(sf2d_texture *texture)
{
	if (texture) {
		if (texture->place == SF2D_PLACE_RAM) {
			linearFree(texture->data);
		} else if (texture->place == SF2D_PLACE_VRAM) {
			vramFree(texture->data);
		}
		free(texture);
	}
}
Example #5
0
void GUIFontDestroy(struct GUIFont* font) {
	vramFree(font->texture.data);
	vramFree(font->icons.data);
	free(font);
}
Example #6
0
void gpuExit(void)
{
	linearFree(cmdBuf);
	vramFree(depthBuf);
	vramFree(colorBuf);
}