D
Deleted User
Guest
It's works on real hardware...
I didn't say it didn't. I meant hardware rendering as in using GPU commands for hardware acceleration rather than directly drawing to the framebuffer.
It's works on real hardware...

The sizes of the textures don't matter any more. The GPU doesn't render sprites but triangles with the textures on them.Don't textures have sized at a power of 2 anyways?
Cid2mizard, why not post a code sample of how you're loading/displaying the textures when it works with ctrulib, that might help solve some of the confusion.
The sizes of the textures don't matter any more. The GPU doesn't render sprites but triangles with the textures on them.
Don't textures have sized at a power of 2 anyways?
Cid2mizard, why not post a code sample of how you're loading/displaying the textures when it works with ctrulib, that might help solve some of the confusion.
the short answer is if you dont want to use smaller textures then you can't use this lib. the gpu can't handle large textures, it's only possible using 'software drawing' ie. writing the pixels of the screen manually.Ok you can find Dawnlike 3DS source code with 50 tilemap and the big (floor.bin) 7184*16, compil and works on emu and hardware with only ctrulib...
http://3ds.nintendomax.com/CID/DawnLike_3DS_src.rar
Again , the code is not optimized , sorry if it stings the eyes ... I post the sources for getting things done ...
the short answer is if you dont want to use smaller textures then you can't use this lib. the gpu can't handle large textures, it's only possible using 'software drawing' ie. writing the pixels of the screen manually.
Also I have a request: I am trying to port my framework that sits on top of a different lib to the 3ds using your code. But the other lib supports texture repeating. A sprite in it is just a subrect inside of a texture, and making the sprite twice as wide as the texture would show the texture repeated when the sprite is drawn. This is particularly useful for GUI code. Would it be possible to support this?
I know it's possibleIt should be possible, there's a constant in ctrulib for configuring textures to repeat: https://github.com/smealum/ctrulib/blob/master/libctru/include/3ds/gpu/gpu.h#L45
the short answer is if you dont want to use smaller textures then you can't use this lib. the gpu can't handle large textures, it's only possible using 'software drawing' ie. writing the pixels of the screen manually.
Also I have a request: I am trying to port my framework that sits on top of a different lib to the 3ds using your code. But the other lib supports texture repeating. A sprite in it is just a subrect inside of a texture, and making the sprite twice as wide as the texture would show the texture repeated when the sprite is drawn. This is particularly useful for GUI code. Would it be possible to support this?


You might find something in the lua 3DS sourcecode.anyone have an example of loading an RGB binary file off the SD card into memory and using it as a texture or am I going to have to make .c files of all my textures?

You might find something in the lua 3DS sourcecode.

sf2d_texture *sfil_load_PNG_file(const char *filename, sf2d_place place);
sf2d_texture *sfil_load_PNG_buffer(const void *buffer, sf2d_place place);
sf2d_texture *sfil_load_JPEG_file(const char *filename, sf2d_place place);
sf2d_texture *sfil_load_JPEG_buffer(const void *buffer, unsigned long buffer_size, sf2d_place place);
sf2d_texture *sfil_load_BMP_file(const char *filename, sf2d_place place);
sf2d_texture *sfil_load_BMP_buffer(const void *buffer, sf2d_place place);

Alright, I've ported my image loading code from the YA2D PSP library to sf2d. This new library is called libsfil (Simple and Fast Image Loading)
API:
Code:sf2d_texture *sfil_load_PNG_file(const char *filename, sf2d_place place); sf2d_texture *sfil_load_PNG_buffer(const void *buffer, sf2d_place place); sf2d_texture *sfil_load_JPEG_file(const char *filename, sf2d_place place); sf2d_texture *sfil_load_JPEG_buffer(const void *buffer, unsigned long buffer_size, sf2d_place place); sf2d_texture *sfil_load_BMP_file(const char *filename, sf2d_place place); sf2d_texture *sfil_load_BMP_buffer(const void *buffer, sf2d_place place);
Source: https://github.com/xerpi/sfillib