- Joined
- Aug 12, 2008
- Messages
- 1,952
- Reaction score
- 801
- Trophies
- 2
- Age
- 37
- Location
- Winter Haven
- XP
- 2,301
- Country

Code:
sfillib-master/libsfil/source/sfil_jpeg.c:5:21: fatal error: jpeglib.h: No such file or directory

sfillib-master/libsfil/source/sfil_jpeg.c:5:21: fatal error: jpeglib.h: No such file or directory
Not sure if its something I am doing wrong, but there is no jpeglib.h to be found.Code:sfillib-master/libsfil/source/sfil_jpeg.c:5:21: fatal error: jpeglib.h: No such file or directory


Xerpi bro,
I have an issue help please
On my app i frequently change textures ( first free texture then create texture). When i change the texture a couple of times ( probably 10) the texture create command stops from loading new textures.
I'm currently loading textures to RAM. I will try to place textures in VRAM to see if i have same results.
Have a nice day.

void sf2d_end_frame()
{
GPU_FinishDrawing();
printf("22\n");
gfxFlushBuffers();
gfxSwapBuffers();
GPUCMD_Finalize();
printf("23\n");
gfxFlushBuffers();
gfxSwapBuffers();
GPUCMD_FlushAndRun(NULL);
printf("24\n");
gfxFlushBuffers();
gfxSwapBuffers();
gspWaitForP3D();
printf("25\n");
gfxFlushBuffers();
gfxSwapBuffers();
Do you have the code uploaded somewhere (github maybe)?
Take a look at gsSafeWait used in portal3ds. It is in gs.c. Essentially it puts a timeout on the wait functions. Instead of waiting forever for an event it gives up after 40 ms. Every once in a while the wait call will timeout. I am not sure if it an issue with ctrulib or the state of the system as a result of the hacks needed to get homebrew running.Think I tracked down the problem with CIA.
22, 23, and 24 print, but 25 is never printed the system is unresponsive. something must be keeping the system from continuing from gspWaitForP3D(); more debugging is needed.Code:void sf2d_end_frame() { GPU_FinishDrawing(); printf("22\n"); gfxFlushBuffers(); gfxSwapBuffers(); GPUCMD_Finalize(); printf("23\n"); gfxFlushBuffers(); gfxSwapBuffers(); GPUCMD_FlushAndRun(NULL); printf("24\n"); gfxFlushBuffers(); gfxSwapBuffers(); gspWaitForP3D(); printf("25\n"); gfxFlushBuffers(); gfxSwapBuffers();
Cool, I think I've found the problem: inside of some if's you do free_texture(tex) and then instead of assigning the new texture you create to tex, you redeclare tex (sf2d_texture *tex) so the pointer gets lost after exiting the if scope.Just created the repo. So the RAM is getting overflowed by the command then linearSpaceFree() is less than the new texture.
https://github.com/markwinap/3DS_Nyan_Cat


So i finally got ninjhax working and i still cant get sf2dlib homebrew to work on hardware even as 3dsx.

What are you actually trying to render? As in, what is your code like? Also, are you on the latest ctrulib? Some time ago, there was a similar issue that had to be fixed.
#include <stdio.h>
#include <3ds.h>
#include <sf2d.h>
int main()
{
sf2d_init();
sf2d_set_clear_color(RGBA8(0x40, 0x40, 0x40, 0xFF));
consoleInit(GFX_BOTTOM, NULL);
printf("Hello World!");
gfxFlushBuffers();
gfxSwapBuffers();
while (aptMainLoop()) {
sf2d_start_frame(GFX_TOP, GFX_LEFT);
sf2d_end_frame();
sf2d_swapbuffers();
hidScanInput();
if (hidKeysDown() & KEY_START) break;
}
gfxSwapBuffers();
return 0;
}
devkitpro updater is not showing any new versions of ctrulib.
citra - top screen is a grey color, bottom screen says Hello World!Code:#include <stdio.h> #include <3ds.h> #include <sf2d.h> int main() { sf2d_init(); sf2d_set_clear_color(RGBA8(0x40, 0x40, 0x40, 0xFF)); consoleInit(GFX_BOTTOM, NULL); printf("Hello World!"); gfxFlushBuffers(); gfxSwapBuffers(); while (aptMainLoop()) { sf2d_start_frame(GFX_TOP, GFX_LEFT); sf2d_end_frame(); sf2d_swapbuffers(); hidScanInput(); if (hidKeysDown() & KEY_START) break; } gfxSwapBuffers(); return 0; }
hardware - top screen is a black color, bottom screen says Hello World! pressing start does nothing, system is completely unresponsive.
Cool, I think I've found the problem: inside of some if's you do free_texture(tex) and then instead of assigning the new texture you create to tex, you redeclare tex (sf2d_texture *tex) so the pointer gets lost after exiting the if scope.

Try building ctrulib manually.
What good 3d library using gpu there is for 3ds since i want to create a custom port of open hexagon(open source super hexagon)for 3ds
You need to install the portlibs: https://github.com/xerpi/3ds_portlibs
Just fyi, and in case it helps anyone, "make"-ing this failed on my mac because the preinstalled version of tar doesn't support -xaf (specifically the -a switch, which doesn't seem vital for extraction anyway). I changed all instances in the makefile to -xf and it works fine.
PS: thanks for the great libs, will be trying them out now!