devkitpro / 3ds-examples Goto Github PK
View Code? Open in Web Editor NEWExamples for 3DS using devkitARM, libctru, citro3d and citro2d
Home Page: https://devkitpro.org/viewforum.php?f=39
Examples for 3DS using devkitARM, libctru, citro3d and citro2d
Home Page: https://devkitpro.org/viewforum.php?f=39
Some examples directories that contains sub-directories like graphics/bitmap, camera/ or audio/ don't have a "cascading foreach" Makefile.
Additionally the source directory in camera/ are named src/ while stile refereed to as source in the default Makefile
I have successfully compiled and uploaded the MVD example code to my N3DS running Luma and A9LH.
However why I try to start loading the video, the call to mvdstdInit() returns 0xd8e06406.
As far as I can gather, this means the service is not accessible. How can I make it accessible?
What are the steps I need to take to make this working?
Thanks in advance for your work.
I would like to contribute a bit with the result of my exploration of the sdmc example from 3ds_examples. This example shows a raw image that must be present in the memory card.
Could you expand the explanation of the process of creating that image included in the source code with a little bit more information?
In main.c
//this example shows you how to load a binary image file from the SD card and display it on the lower screen
//for this to work you should copy test.bin to same folder as your .3dsx
//this file was generated with GIMP by saving a 240x320 image to raw RGB
e. g., with
//this example shows you how to load a binary image file from the SD card and display it on the lower screen
//for this to work you should copy test.bin to the same folder as your .3dsx
//this file was generated with GIMP by saving a 240x320 image to raw RGB
// or using convert (ImageMagick)
// convert -rotate 90 -resize 240x320! your_image.png bgr:test.bin
// Change "convert" by "magick" if you are in windows platform and using a ImageMagick versión >= 7
I suggest including the, probably, original bitmap test.png in the files of this example. I attach the one I get with the reverse command.
Also, if you are using Citra as an emulator for executing 3DS Homebrew, the raw image that must be present in the virtualized memory card mapped on a local directory, that in Linux it is done with the command
$ cp test.bin $HOME/.local/share/citra-emu/sdmc/test.bin;
This example have build error
C:\devkitPro\examples\3ds\graphics\bitmap\24bit-color
opus audio decoder does not work on citra, but does work on a real 3DS
a way to build as a cia file, not a 3dsx file
so people could load it faster without loading the hombrew launcher
the image:
gets distorted so you can't see it, well you can, but it looks like this:
changing the brew.png image to this image
downloaded from website, that's it
i have to use the cmd because msys wont detect convert as coming from imagemagick, instead it comes from System32 (god i hate windows 11)
I want to use the NFC-Reader to read out various nfc-chips i have lying around (Amiibos, student identity cards, ...) But even the example does not work properly :/
Compiling in "3ds-examples/nfc/" works but when run it tells:
libctru nfc example.
nfcInit() failed: 0xd0a17480.
Press START to exit
System Information: N3DS 11.4.0-37E, Luma 8.0
devkitPro: 1.6.0
devkitARM: 46
I have the latest PICASSO, Citro3D and Ctrulib but I keep getting this error.
While running make on all the examples, the geoshader example gave me an error
https://gist.github.com/nickthegamer5/8c2e0e5af596681829a172c52e3abc6a
I have Citro, the newest ctrulib and devkitarm
one day i downloaded a project, i modified it and BOUM devkitpro won't make me the file (3dsx). the project is koopa cruiser, i don't know how to fix it :/
KoopaCruiser-0.5.zip
:( someone can help me? even without modifying the source code i can't build the file.
Is not really that relevant but there's a missing header. All other examples compiled successfully.
3ds/graphics/bitmap/24bit-color/source/main.c:20:10: fatal error: brew_bgr.h: No such file or directory
#include "brew_bgr.h"
Errors:
mingw32-make[1]: Entering directory 'C:/dka/examples/3ds/app_launch'
Makefile:10: C:dka/devkitARM/3ds_rules: No such file or directory
mingw32-make[1]: *** No rule to make target 'C:dka/devkitARM/3ds_rules'. Stop.
mingw32-make[1]: Leaving directory 'C:/dka/examples/3ds/app_launch'
Makefile:13: recipe for target 'examples' failed
mingw32-make: *** [examples] Error 1
Yes, I just updated libctru to the latest version from Github. And previously I tested it on the latest release version, which didn't work either.
Here's what happens when I try to compile it:
D:\Users\Flarn\Desktop\3DS_stuff\3ds-examples-master>make
make[1]: Entering directory `/d/Users/Flarn/Desktop/3DS_stuff/3ds-examples-master/app_launch'
linking app_launch.elf
main.o: In function `main':
d:/Users/Flarn/Desktop/3DS_stuff/3ds-examples-master/app_launch/source/main.c:30: undefined reference to `aptOpenSession'
d:/Users/Flarn/Desktop/3DS_stuff/3ds-examples-master/app_launch/source/main.c:32: undefined reference to `APT_PrepareToDoAppJump'
d:/Users/Flarn/Desktop/3DS_stuff/3ds-examples-master/app_launch/source/main.c:34: undefined reference to `APT_DoAppJump'
d:/Users/Flarn/Desktop/3DS_stuff/3ds-examples-master/app_launch/source/main.c:36: undefined reference to `aptCloseSession'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [/d/Users/Flarn/Desktop/3DS_stuff/3ds-examples-master/app_launch/app_launch.elf] Error 1
make[1]: *** [build] Error 2
make[1]: Leaving directory `/d/Users/Flarn/Desktop/3DS_stuff/3ds-examples-master/app_launch'
make: *** [examples] Error 1
D:\Users\Flarn\Desktop\3DS_stuff\3ds-examples-master>_
Using o3ds with firmware 9.4.0-21E
No error messages, but also no image appears
I tried to do some tests with the textured_cube sample trying to change material values with these ones: http://devernay.free.fr/cours/opengl/materials.html but in any order i put them (like ARGB with A = 1.0, RGB0, 0RGB) it resulted in a wrong shader effect.
What's the correct order for these values?
Once running on the 3DS, the console log shows this:
"ssclStartConnection() failed: 0xd8a0b814"
According to 3dbrew, this error translates to
"Server cert verification failed since the RootCA isn't trusted".
I could be wrong, but I believe this means that the builtin_rootca.der
file needs to be updated.
If I am doing something wrong, and there is a way to fix this myself, please let me know.
From the audio folder, the opus-decoding, filter, and streaming examples are broken for me. They produce no sound. Only the mic example is working, which uses CSND instead of the DSP. I have an N3DS, and the built 3dsx files are started from HBL version 2.1.0
On a fairly fresh MacOS machine, when trying to build 3ds examples (and other 3ds programs) I get an error linking:
/opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/14.1.0/../../../../arm-none-eabi/bin/ld: /opt/devkitpro/devkitARM/bin/../libexec/gcc/arm-none-eabi/14.1.0/liblto_plugin.so: error loading plugin: dlsym(0x933e2050, _onload): symbol not found
MacOS 14.4.1, xcode command line tools 15.3
Works fine when building on my Asahi Fedora install
Hello,
I am trying to compile the software keyboard to use it in my homebrew, but when I am building it it says that there are many function undeclared.
Any way to fix this?
There is missing header file brew_bgr.h in graphics/bitmap/24bit-color
It should focus on how to get raw text, not an image. i got it to do this at one point but the code's been lost in the development of my own program.
I'm on WSL, although the same issue happened when compiling with MSYS2.
Everything leading up to that exampled compiled just fine.
And before on an actual linux machine, about a year ago, I was able to compile the examples.
make[1]: Entering directory '/home/krasno/3ds-examples/graphics/gpu/2d_shapes'
main.c
In file included from /opt/devkitpro/libctru/include/citro3d.h:14,
from /opt/devkitpro/libctru/include/citro2d.h:15,
from /home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:2:
/opt/devkitpro/libctru/include/c3d/mtxstack.h:21:39: error: unknown type name 'GPU_SHADER_TYPE'
21 | void MtxStack_Bind(C3D_MtxStack* stk, GPU_SHADER_TYPE unifType, int unifPos, int unifLen);
| ^~~~~~~~~~~~~~~
In file included from /opt/devkitpro/libctru/include/citro3d.h:16,
from /opt/devkitpro/libctru/include/citro2d.h:15,
from /home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:2:
/opt/devkitpro/libctru/include/c3d/uniforms.h:9:8: error: unknown type name 'u16'
9 | extern u16 C3D_BoolUnifs[2];
| ^~~
/opt/devkitpro/libctru/include/c3d/uniforms.h:15:44: error: unknown type name 'GPU_SHADER_TYPE'
15 | static inline C3D_FVec* C3D_FVUnifWritePtr(GPU_SHADER_TYPE type, int id, int size)
| ^~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/uniforms.h:23:44: error: unknown type name 'GPU_SHADER_TYPE'
23 | static inline C3D_IVec* C3D_IVUnifWritePtr(GPU_SHADER_TYPE type, int id)
| ^~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/uniforms.h:30:37: error: unknown type name 'GPU_SHADER_TYPE'
30 | static inline void C3D_FVUnifMtxNx4(GPU_SHADER_TYPE type, int id, const C3D_Mtx* mtx, int num)
| ^~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/uniforms.h:38:37: error: unknown type name 'GPU_SHADER_TYPE'
38 | static inline void C3D_FVUnifMtx4x4(GPU_SHADER_TYPE type, int id, const C3D_Mtx* mtx)
| ^~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/uniforms.h:43:37: error: unknown type name 'GPU_SHADER_TYPE'
43 | static inline void C3D_FVUnifMtx3x4(GPU_SHADER_TYPE type, int id, const C3D_Mtx* mtx)
| ^~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/uniforms.h:48:37: error: unknown type name 'GPU_SHADER_TYPE'
48 | static inline void C3D_FVUnifMtx2x4(GPU_SHADER_TYPE type, int id, const C3D_Mtx* mtx)
| ^~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/uniforms.h:53:34: error: unknown type name 'GPU_SHADER_TYPE'
53 | static inline void C3D_FVUnifSet(GPU_SHADER_TYPE type, int id, float x, float y, float z, float w)
| ^~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/uniforms.h:62:34: error: unknown type name 'GPU_SHADER_TYPE'
62 | static inline void C3D_IVUnifSet(GPU_SHADER_TYPE type, int id, int x, int y, int z, int w)
| ^~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/uniforms.h:68:36: error: unknown type name 'GPU_SHADER_TYPE'
68 | static inline void C3D_BoolUnifSet(GPU_SHADER_TYPE type, int id, bool value)
| ^~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/uniforms.h:78:25: error: unknown type name 'GPU_SHADER_TYPE'
78 | void C3D_UpdateUniforms(GPU_SHADER_TYPE type);
| ^~~~~~~~~~~~~~~
In file included from /opt/devkitpro/libctru/include/citro3d.h:17,
from /opt/devkitpro/libctru/include/citro2d.h:15,
from /home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:2:
/opt/devkitpro/libctru/include/c3d/attribs.h:7:9: error: unknown type name 'u64'
7 | u64 permutation;
| ^~~
/opt/devkitpro/libctru/include/c3d/attribs.h:12:56: error: unknown type name 'GPU_FORMATS'
12 | int AttrInfo_AddLoader(C3D_AttrInfo* info, int regId, GPU_FORMATS format, int count);
| ^~~~~~~~~~~
In file included from /opt/devkitpro/libctru/include/citro3d.h:18,
from /opt/devkitpro/libctru/include/citro2d.h:15,
from /home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:2:
/opt/devkitpro/libctru/include/c3d/buffers.h:18:90: error: unknown type name 'u64'
18 | nt BufInfo_Add(C3D_BufInfo* info, const void* data, ptrdiff_t stride, int attribCount, u64 permutation);
| ^~~
In file included from /opt/devkitpro/libctru/include/citro3d.h:19,
from /opt/devkitpro/libctru/include/citro2d.h:15,
from /home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:2:
/opt/devkitpro/libctru/include/c3d/base.h:18:22: error: unknown type name 'shaderProgram_s'
18 | void C3D_BindProgram(shaderProgram_s* program);
| ^~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/base.h:21:21: error: unknown type name 'GPU_SCISSORMODE'
21 | void C3D_SetScissor(GPU_SCISSORMODE mode, u32 left, u32 top, u32 right, u32 bottom);
| ^~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/base.h:23:21: error: unknown type name 'GPU_Primitive_t'
23 | void C3D_DrawArrays(GPU_Primitive_t primitive, int first, int size);
| ^~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/base.h:24:23: error: unknown type name 'GPU_Primitive_t'
24 | void C3D_DrawElements(GPU_Primitive_t primitive, int count, int type, const void* indices);
| ^~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/base.h:27:23: error: unknown type name 'GPU_Primitive_t'
27 | void C3D_ImmDrawBegin(GPU_Primitive_t primitive);
| ^~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/base.h: In function 'C3D_ImmDrawRestartPrim':
/opt/devkitpro/libctru/include/c3d/base.h:33:9: warning: implicit declaration of function 'GPUCMD_AddWrite' [-Wimplicit-function-declaration]
33 | GPUCMD_AddWrite(GPUREG_RESTART_PRIMITIVE, 1);
| ^~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/base.h:33:25: error: 'GPUREG_RESTART_PRIMITIVE' undeclared (first use in this function)
33 | GPUCMD_AddWrite(GPUREG_RESTART_PRIMITIVE, 1);
| ^~~~~~~~~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/base.h:33:25: note: each undeclared identifier is reported only once for each function it appears in
In file included from /opt/devkitpro/libctru/include/citro3d.h:21,
from /opt/devkitpro/libctru/include/citro2d.h:15,
from /home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:2:
/opt/devkitpro/libctru/include/c3d/texenv.h: At top level:
/opt/devkitpro/libctru/include/c3d/texenv.h:6:9: error: unknown type name 'u16'
6 | u16 srcRgb, srcAlpha;
| ^~~
/opt/devkitpro/libctru/include/c3d/texenv.h:12:9: error: unknown type name 'u16'
12 | u16 funcRgb, funcAlpha;
| ^~~
/opt/devkitpro/libctru/include/c3d/texenv.h:14:9: error: unknown type name 'u16'
14 | u16 scaleRgb, scaleAlpha;
| ^~~
/opt/devkitpro/libctru/include/c3d/texenv.h:19:19: warning: implicit declaration of function 'BIT' [-Wimplicit-function-declaration]
19 | C3D_RGB = BIT(0),
| ^~~
/opt/devkitpro/libctru/include/c3d/texenv.h:19:9: error: enumerator value for 'C3D_RGB' is not an integer constant
19 | C3D_RGB = BIT(0),
| ^~~~~~~
/opt/devkitpro/libctru/include/c3d/texenv.h:20:9: error: enumerator value for 'C3D_Alpha' is not an integer constant
20 | C3D_Alpha = BIT(1),
| ^~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texenv.h: In function 'C3D_TexEnvInit':
/opt/devkitpro/libctru/include/c3d/texenv.h:33:27: warning: implicit declaration of function 'GPU_TEVSOURCE
' [-Wimplicit-function-declaration]
33 | env->srcRgb = GPU_TEVSOURCES(GPU_PREVIOUS, 0, 0);
| ^~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texenv.h:33:42: error: 'GPU_PREVIOUS' undeclared (first use in this function)
33 | env->srcRgb = GPU_TEVSOURCES(GPU_PREVIOUS, 0, 0);
| ^~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texenv.h:36:27: error: 'GPU_REPLACE' undeclared (first use in this function)
36 | env->funcRgb = GPU_REPLACE;
| ^~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texenv.h:39:27: error: 'GPU_TEVSCALE_1' undeclared (first use in this function)
39 | env->scaleRgb = GPU_TEVSCALE_1;
| ^~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texenv.h: At top level:
/opt/devkitpro/libctru/include/c3d/texenv.h:50:9: error: unknown type name 'GPU_TEVSRC'
50 | GPU_TEVSRC s1,
| ^~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texenv.h:51:9: error: unknown type name 'GPU_TEVSRC'
51 | GPU_TEVSRC s2 _C3D_DEFAULT(GPU_PRIMARY_COLOR),
| ^~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texenv.h:52:9: error: unknown type name 'GPU_TEVSRC'
52 | GPU_TEVSRC s3 _C3D_DEFAULT(GPU_PRIMARY_COLOR))
| ^~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texenv.h:62:9: error: unknown type name 'GPU_TEVOP_RGB'
62 | GPU_TEVOP_RGB o1,
| ^~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texenv.h:63:9: error: unknown type name 'GPU_TEVOP_RGB'
63 | GPU_TEVOP_RGB o2 _C3D_DEFAULT(GPU_TEVOP_RGB_SRC_COLOR),
| ^~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texenv.h:64:9: error: unknown type name 'GPU_TEVOP_RGB'
64 | GPU_TEVOP_RGB o3 _C3D_DEFAULT(GPU_TEVOP_RGB_SRC_COLOR))
| ^~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texenv.h:70:9: error: unknown type name 'GPU_TEVOP_A'
70 | GPU_TEVOP_A o1,
| ^~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texenv.h:71:9: error: unknown type name 'GPU_TEVOP_A'
71 | GPU_TEVOP_A o2 _C3D_DEFAULT(GPU_TEVOP_A_SRC_ALPHA),
| ^~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texenv.h:72:9: error: unknown type name 'GPU_TEVOP_A'
72 | GPU_TEVOP_A o3 _C3D_DEFAULT(GPU_TEVOP_A_SRC_ALPHA))
| ^~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texenv.h:77:73: error: unknown type name 'GPU_COMBINEFUNC'
77 | static inline void C3D_TexEnvFunc(C3D_TexEnv* env, C3D_TexEnvMode mode, GPU_COMBINEFUNC param)
| ^~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texenv.h:90:63: error: unknown type name 'GPU_TEVSCALE'
90 | static inline void C3D_TexEnvScale(C3D_TexEnv* env, int mode, GPU_TEVSCALE param)
| ^~~~~~~~~~~~
In file included from /opt/devkitpro/libctru/include/citro3d.h:22,
from /opt/devkitpro/libctru/include/citro2d.h:15,
from /home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:2:
/opt/devkitpro/libctru/include/c3d/effect.h:5:19: error: unknown type name 'GPU_CULLMODE'
5 | void C3D_CullFace(GPU_CULLMODE mode);
| ^~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/effect.h:6:35: error: unknown type name 'GPU_TESTFUNC'
6 | void C3D_StencilTest(bool enable, GPU_TESTFUNC function, int ref, int inputMask, int writeMask);
| ^~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/effect.h:7:20: error: unknown type name 'GPU_STENCILOP'
7 | void C3D_StencilOp(GPU_STENCILOP sfail, GPU_STENCILOP dfail, GPU_STENCILOP pass);
| ^~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/effect.h:7:41: error: unknown type name 'GPU_STENCILOP'
7 | void C3D_StencilOp(GPU_STENCILOP sfail, GPU_STENCILOP dfail, GPU_STENCILOP pass);
| ^~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/effect.h:7:62: error: unknown type name 'GPU_STENCILOP'
7 | void C3D_StencilOp(GPU_STENCILOP sfail, GPU_STENCILOP dfail, GPU_STENCILOP pass);
| ^~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/effect.h:9:38: error: unknown type name 'GPU_EARLYDEPTHFUNC'
9 | void C3D_EarlyDepthTest(bool enable, GPU_EARLYDEPTHFUNC function, u32 ref);
| ^~~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/effect.h:10:33: error: unknown type name 'GPU_TESTFUNC'
10 | void C3D_DepthTest(bool enable, GPU_TESTFUNC function, GPU_WRITEMASK writemask);
| ^~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/effect.h:10:56: error: unknown type name 'GPU_WRITEMASK'
10 | void C3D_DepthTest(bool enable, GPU_TESTFUNC function, GPU_WRITEMASK writemask);
| ^~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/effect.h:11:33: error: unknown type name 'GPU_TESTFUNC'
11 | void C3D_AlphaTest(bool enable, GPU_TESTFUNC function, int ref);
| ^~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/effect.h:12:21: error: unknown type name 'GPU_BLENDEQUATION'
12 | void C3D_AlphaBlend(GPU_BLENDEQUATION colorEq, GPU_BLENDEQUATION alphaEq, GPU_BLENDFACTOR srcClr, GPU_BLENDFACTOR dstClr, GPU_BLENDFACTOR srcAlpha, GPU_BLENDFACTOR dstAlpha);
| ^~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/effect.h:12:48: error: unknown type name 'GPU_BLENDEQUATION'
12 | void C3D_AlphaBlend(GPU_BLENDEQUATION colorEq, GPU_BLENDEQUATION alphaEq, GPU_BLENDFACTOR srcClr, GPU_BLENDFACTOR dstClr, GPU_BLENDFACTOR srcAlpha, GPU_BLENDFACTOR dstAlpha);
| ^~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/effect.h:12:75: error: unknown type name 'GPU_BLENDFACTOR'
12 | void C3D_AlphaBlend(GPU_BLENDEQUATION colorEq, GPU_BLENDEQUATION alphaEq, GPU_BLENDFACTOR srcClr, GPU_BLENDFACTOR dstClr, GPU_BLENDFACTOR srcAlpha, GPU_BLENDFACTOR dstAlpha);
| ^~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/effect.h:12:99: error: unknown type name 'GPU_BLENDFACTOR'
12 | lphaBlend(GPU_BLENDEQUATION colorEq, GPU_BLENDEQUATION alphaEq, GPU_BLENDFACTOR srcClr, GPU_BLENDFACTOR dstClr, GPU_BLENDFACTOR srcAlpha, GPU_BLENDFACTOR dstAlpha);
| ^~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/effect.h:12:123: error: unknown type name 'GPU_BLENDFACTOR'
12 | ION colorEq, GPU_BLENDEQUATION alphaEq, GPU_BLENDFACTOR srcClr, GPU_BLENDFACTOR dstClr, GPU_BLENDFACTOR srcAlpha, GPU_BLENDFACTOR dstAlpha);
| ^~~~~~~~~~~~~~~
In file included from /opt/devkitpro/libctru/include/citro3d.h:22,
from /opt/devkitpro/libctru/include/citro2d.h:15,
from /home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:2:
/opt/devkitpro/libctru/include/c3d/effect.h:12:149: error: unknown type name 'GPU_BLENDFACTOR'
12 | TION alphaEq, GPU_BLENDFACTOR srcClr, GPU_BLENDFACTOR dstClr, GPU_BLENDFACTOR srcAlpha, GPU_BLENDFACTOR dstAlpha);
| ^~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/effect.h:13:23: error: unknown type name 'GPU_LOGICOP'
13 | void C3D_ColorLogicOp(GPU_LOGICOP op);
| ^~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/effect.h:14:21: error: unknown type name 'GPU_FRAGOPMODE'
14 | void C3D_FragOpMode(GPU_FRAGOPMODE mode);
| ^~~~~~~~~~~~~~
In file included from /opt/devkitpro/libctru/include/citro3d.h:23,
from /opt/devkitpro/libctru/include/citro2d.h:15,
from /home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:2:
/opt/devkitpro/libctru/include/c3d/texture.h:17:9: error: unknown type name 'GPU_TEXCOLOR'
17 | GPU_TEXCOLOR fmt : 4;
| ^~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texture.h:25:25: error: unknown type name 'u16'
25 | u16 height;
| ^~~
/opt/devkitpro/libctru/include/c3d/texture.h:26:25: error: unknown type name 'u16'
26 | u16 width;
| ^~~
/opt/devkitpro/libctru/include/c3d/texture.h:37:25: error: unknown type name 'u16'
37 | u16 lodBias;
| ^~~
/opt/devkitpro/libctru/include/c3d/texture.h:44:22: error: expected identifier or '(' before numeric constant
44 | typedef struct ALIGN(8)
| ^
/opt/devkitpro/libctru/include/c3d/texture.h:52:3: warning: data definition has no type or storage class
52 | } C3D_TexInitParams;
| ^~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texture.h:52:3: warning: type defaults to 'int' in declaration of 'C3D_TexInitParams' [-Wimplicit-int]
/opt/devkitpro/libctru/include/c3d/texture.h:54:61: error: expected declaration specifiers or '...' before
C3D_TexInitParams'
54 | bool C3D_TexInitWithParams(C3D_Tex* tex, C3D_TexCube* cube, C3D_TexInitParams p);
| ^~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texture.h:55:55: error: unknown type name 'GPU_TEXFACE'
55 | void C3D_TexLoadImage(C3D_Tex* tex, const void* data, GPU_TEXFACE face, int level);
| ^~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texture.h:56:42: error: unknown type name 'GPU_TEXFACE'
56 | void C3D_TexGenerateMipmap(C3D_Tex* tex, GPU_TEXFACE face);
| ^~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texture.h:94:46: error: unknown type name 'u16'
94 | static inline bool C3D_TexInit(C3D_Tex* tex, u16 width, u16 height, GPU_TEXCOLOR format)
| ^~~
/opt/devkitpro/libctru/include/c3d/texture.h:94:57: error: unknown type name 'u16'
94 | static inline bool C3D_TexInit(C3D_Tex* tex, u16 width, u16 height, GPU_TEXCOLOR format)
| ^~~
/opt/devkitpro/libctru/include/c3d/texture.h:94:69: error: unknown type name 'GPU_TEXCOLOR'
94 | static inline bool C3D_TexInit(C3D_Tex* tex, u16 width, u16 height, GPU_TEXCOLOR format)
| ^~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texture.h:100:52: error: unknown type name 'u16'
100 | static inline bool C3D_TexInitMipmap(C3D_Tex* tex, u16 width, u16 height, GPU_TEXCOLOR format)
| ^~~
/opt/devkitpro/libctru/include/c3d/texture.h:100:63: error: unknown type name 'u16'
100 | static inline bool C3D_TexInitMipmap(C3D_Tex* tex, u16 width, u16 height, GPU_TEXCOLOR format)
| ^~~
/opt/devkitpro/libctru/include/c3d/texture.h:100:75: error: unknown type name 'GPU_TEXCOLOR'
100 | static inline bool C3D_TexInitMipmap(C3D_Tex* tex, u16 width, u16 height, GPU_TEXCOLOR format)
| ^~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texture.h:106:69: error: unknown type name 'u16'
106 | static inline bool C3D_TexInitCube(C3D_Tex* tex, C3D_TexCube* cube, u16 width, u16 height, GPU_TEXCOLOR format)
| ^~~
/opt/devkitpro/libctru/include/c3d/texture.h:106:80: error: unknown type name 'u16'
106 | static inline bool C3D_TexInitCube(C3D_Tex* tex, C3D_TexCube* cube, u16 width, u16 height, GPU_TEXCOLOR format)
| ^~~
/opt/devkitpro/libctru/include/c3d/texture.h:106:92: error: unknown type name 'GPU_TEXCOLOR'
106 | tic inline bool C3D_TexInitCube(C3D_Tex* tex, C3D_TexCube* cube, u16 width, u16 height, GPU_TEXCOLO
format)
| ^~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texture.h:112:50: error: unknown type name 'u16'
112 | static inline bool C3D_TexInitVRAM(C3D_Tex* tex, u16 width, u16 height, GPU_TEXCOLOR format)
| ^~~
/opt/devkitpro/libctru/include/c3d/texture.h:112:61: error: unknown type name 'u16'
112 | static inline bool C3D_TexInitVRAM(C3D_Tex* tex, u16 width, u16 height, GPU_TEXCOLOR format)
| ^~~
/opt/devkitpro/libctru/include/c3d/texture.h:112:73: error: unknown type name 'GPU_TEXCOLOR'
112 | static inline bool C3D_TexInitVRAM(C3D_Tex* tex, u16 width, u16 height, GPU_TEXCOLOR format)
| ^~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texture.h:118:52: error: unknown type name 'u16'
118 | static inline bool C3D_TexInitShadow(C3D_Tex* tex, u16 width, u16 height)
| ^~~
/opt/devkitpro/libctru/include/c3d/texture.h:118:63: error: unknown type name 'u16'
118 | static inline bool C3D_TexInitShadow(C3D_Tex* tex, u16 width, u16 height)
| ^~~
/opt/devkitpro/libctru/include/c3d/texture.h:124:75: error: unknown type name 'u16'
124 | static inline bool C3D_TexInitShadowCube(C3D_Tex* tex, C3D_TexCube* cube, u16 width, u16 height)
| ^~~
/opt/devkitpro/libctru/include/c3d/texture.h:124:86: error: unknown type name 'u16'
124 | static inline bool C3D_TexInitShadowCube(C3D_Tex* tex, C3D_TexCube* cube, u16 width, u16 height)
| ^~~
/opt/devkitpro/libctru/include/c3d/texture.h:130:15: error: unknown type name 'GPU_TEXTURE_MODE_PARAM'
130 | static inline GPU_TEXTURE_MODE_PARAM C3D_TexGetType(C3D_Tex* tex)
| ^~~~~~~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texture.h: In function 'C3D_TexGetType':
/opt/devkitpro/libctru/include/c3d/texture.h:132:17: error: 'GPU_TEXTURE_MODE_PARAM' undeclared (first use in this function)
132 | return (GPU_TEXTURE_MODE_PARAM)((tex->param>>28)&0x7);
| ^~~~~~~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texture.h: At top level:
/opt/devkitpro/libctru/include/c3d/texture.h:147:58: error: unknown type name 'GPU_TEXFACE'
147 | static inline void* C3D_TexCubeGetImagePtr(C3D_Tex* tex, GPU_TEXFACE face, int level, u32* size)
| ^~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texture.h: In function 'C3D_TexUpload':
/opt/devkitpro/libctru/include/c3d/texture.h:154:9: warning: implicit declaration of function 'C3D_TexLoadImage' [-Wimplicit-function-declaration]
154 | C3D_TexLoadImage(tex, data, GPU_TEXFACE_2D, 0);
| ^~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texture.h:154:37: error: 'GPU_TEXFACE_2D' undeclared (first use in this function)
154 | C3D_TexLoadImage(tex, data, GPU_TEXFACE_2D, 0);
| ^~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texture.h: At top level:
/opt/devkitpro/libctru/include/c3d/texture.h:157:51: error: unknown type name 'GPU_TEXTURE_FILTER_PARAM'
157 | static inline void C3D_TexSetFilter(C3D_Tex* tex, GPU_TEXTURE_FILTER_PARAM magFilter, GPU_TEXTURE_FILTER_PARAM minFilter)
| ^~~~~~~~~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texture.h:157:87: error: unknown type name 'GPU_TEXTURE_FILTER_PARAM'
157 | static inline void C3D_TexSetFilter(C3D_Tex* tex, GPU_TEXTURE_FILTER_PARAM magFilter, GPU_TEXTURE_FILTER_PARAM minFilter)
| ^~~~~~~~~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texture.h:163:57: error: unknown type name 'GPU_TEXTURE_FILTER_PARAM'
163 | static inline void C3D_TexSetFilterMipmap(C3D_Tex* tex, GPU_TEXTURE_FILTER_PARAM filter)
| ^~~~~~~~~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texture.h:169:49: error: unknown type name 'GPU_TEXTURE_WRAP_PARAM'
169 | static inline void C3D_TexSetWrap(C3D_Tex* tex, GPU_TEXTURE_WRAP_PARAM wrapS, GPU_TEXTURE_WRAP_PARAM wrapT)
| ^~~~~~~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/texture.h:169:79: error: unknown type name 'GPU_TEXTURE_WRAP_PARAM'
169 | static inline void C3D_TexSetWrap(C3D_Tex* tex, GPU_TEXTURE_WRAP_PARAM wrapS, GPU_TEXTURE_WRAP_PARA
wrapT)
| ^~~~~~~~~~~~~~~~~~~~~
In file included from /opt/devkitpro/libctru/include/citro3d.h:24,
from /opt/devkitpro/libctru/include/citro2d.h:15,
from /home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:2:
/opt/devkitpro/libctru/include/c3d/proctex.h:33:25: error: unknown type name 'u16'
33 | u16 uNoiseAmpl;
| ^~~
/opt/devkitpro/libctru/include/c3d/proctex.h:34:25: error: unknown type name 'u16'
34 | u16 uNoisePhase;
| ^~~
/opt/devkitpro/libctru/include/c3d/proctex.h:42:25: error: unknown type name 'u16'
42 | u16 vNoiseAmpl;
| ^~~
/opt/devkitpro/libctru/include/c3d/proctex.h:43:25: error: unknown type name 'u16'
43 | u16 vNoisePhase;
| ^~~
/opt/devkitpro/libctru/include/c3d/proctex.h:51:25: error: unknown type name 'u16'
51 | u16 uNoiseFreq;
| ^~~
/opt/devkitpro/libctru/include/c3d/proctex.h:52:25: error: unknown type name 'u16'
52 | u16 vNoiseFreq;
| ^~~
/opt/devkitpro/libctru/include/c3d/proctex.h:79:9: error: enumerator value for 'C3D_ProcTex_U' is not an integer constant
79 | C3D_ProcTex_U = BIT(0),
| ^~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/proctex.h:80:9: error: enumerator value for 'C3D_ProcTex_V' is not an integer constant
80 | C3D_ProcTex_V = BIT(1),
| ^~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/proctex.h:91:25: error: unknown type name 'GPU_PROCTEX_LUTID'
91 | void C3D_ProcTexLutBind(GPU_PROCTEX_LUTID id, C3D_ProcTexLut* lut);
| ^~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/proctex.h:97:54: error: unknown type name 'GPU_PROCTEX_CLAMP'
97 | static inline void C3D_ProcTexClamp(C3D_ProcTex* pt, GPU_PROCTEX_CLAMP u, GPU_PROCTEX_CLAMP v)
| ^~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/proctex.h:97:75: error: unknown type name 'GPU_PROCTEX_CLAMP'
97 | static inline void C3D_ProcTexClamp(C3D_ProcTex* pt, GPU_PROCTEX_CLAMP u, GPU_PROCTEX_CLAMP v)
| ^~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/proctex.h:103:72: error: unknown type name 'GPU_PROCTEX_MAPFUNC'
103 | static inline void C3D_ProcTexCombiner(C3D_ProcTex* pt, bool separate, GPU_PROCTEX_MAPFUNC rgb, GPU_PROCTEX_MAPFUNC alpha)
| ^~~~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/proctex.h:103:97: error: unknown type name 'GPU_PROCTEX_MAPFUNC'
103 | nline void C3D_ProcTexCombiner(C3D_ProcTex* pt, bool separate, GPU_PROCTEX_MAPFUNC rgb, GPU_PROCTEX_MAPFUNC alpha)
| ^~~~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/proctex.h:116:54: error: unknown type name 'GPU_PROCTEX_SHIFT'
116 | static inline void C3D_ProcTexShift(C3D_ProcTex* pt, GPU_PROCTEX_SHIFT u, GPU_PROCTEX_SHIFT v)
| ^~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/proctex.h:116:75: error: unknown type name 'GPU_PROCTEX_SHIFT'
116 | static inline void C3D_ProcTexShift(C3D_ProcTex* pt, GPU_PROCTEX_SHIFT u, GPU_PROCTEX_SHIFT v)
| ^~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/proctex.h:122:55: error: unknown type name 'GPU_PROCTEX_FILTER'
122 | static inline void C3D_ProcTexFilter(C3D_ProcTex* pt, GPU_PROCTEX_FILTER min)
| ^~~~~~~~~~~~~~~~~~
In file included from /opt/devkitpro/libctru/include/citro3d.h:25,
from /opt/devkitpro/libctru/include/citro2d.h:15,
from /home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:2:
/opt/devkitpro/libctru/include/c3d/light.h:42:9: error: enumerator value for 'C3DF_LightEnv_Dirty' is not an integer constant
42 | C3DF_LightEnv_Dirty = BIT(0),
| ^~~~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/light.h:43:9: error: enumerator value for 'C3DF_LightEnv_MtlDirty' is not an integer constant
43 | C3DF_LightEnv_MtlDirty = BIT(1),
| ^~~~~~~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/light.h:44:9: error: enumerator value for 'C3DF_LightEnv_LCDirty' is not an integer constant
44 | C3DF_LightEnv_LCDirty = BIT(2),
| ^~~~~~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/light.h:67:41: error: unknown type name 'GPU_LIGHTLUTID'
67 | void C3D_LightEnvLut(C3D_LightEnv* env, GPU_LIGHTLUTID lutId, GPU_LIGHTLUTINPUT input, bool negative, C3D_LightLut* lut);
| ^~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/light.h:67:63: error: unknown type name 'GPU_LIGHTLUTINPUT'
67 | void C3D_LightEnvLut(C3D_LightEnv* env, GPU_LIGHTLUTID lutId, GPU_LIGHTLUTINPUT input, bool negative, C3D_LightLut* lut);
| ^~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/light.h:71:9: error: enumerator value for 'GPU_SHADOW_PRIMARY' is not an integer constant
71 | GPU_SHADOW_PRIMARY = BIT(16),
| ^~~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/light.h:72:9: error: enumerator value for 'GPU_SHADOW_SECONDARY' is not an integer constant
72 | GPU_SHADOW_SECONDARY = BIT(17),
| ^~~~~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/light.h:73:9: error: enumerator value for 'GPU_INVERT_SHADOW' is not an integer constant
73 | GPU_INVERT_SHADOW = BIT(18),
| ^~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/light.h:74:9: error: enumerator value for 'GPU_SHADOW_ALPHA' is not an integer constant
74 | GPU_SHADOW_ALPHA = BIT(19),
| ^~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/light.h:77:45: error: unknown type name 'GPU_FRESNELSEL'
77 | void C3D_LightEnvFresnel(C3D_LightEnv* env, GPU_FRESNELSEL selector);
| ^~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/light.h:78:46: error: unknown type name 'GPU_BUMPMODE'
78 | void C3D_LightEnvBumpMode(C3D_LightEnv* env, GPU_BUMPMODE mode);
| ^~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/light.h:96:9: error: unknown type name 'u16'
96 | u16 position[3]; u16 padding0;
| ^~~
/opt/devkitpro/libctru/include/c3d/light.h:96:26: error: unknown type name 'u16'
96 | u16 position[3]; u16 padding0;
| ^~~
/opt/devkitpro/libctru/include/c3d/light.h:97:9: error: unknown type name 'u16'
97 | u16 spotDir[3]; u16 padding1;
| ^~~
/opt/devkitpro/libctru/include/c3d/light.h:97:26: error: unknown type name 'u16'
97 | u16 spotDir[3]; u16 padding1;
| ^~~
/opt/devkitpro/libctru/include/c3d/light.h:105:9: error: enumerator value for 'C3DF_Light_Enabled' is not an integer constant
105 | C3DF_Light_Enabled = BIT(0),
| ^~~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/light.h:106:9: error: enumerator value for 'C3DF_Light_Dirty' is not an integer constant
106 | C3DF_Light_Dirty = BIT(1),
| ^~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/light.h:107:9: error: enumerator value for 'C3DF_Light_MatDirty' is not an integer constant
107 | C3DF_Light_MatDirty = BIT(2),
| ^~~~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/light.h:112:9: error: enumerator value for 'C3DF_Light_SPDirty' is not an integer constant
112 | C3DF_Light_SPDirty = BIT(14),
| ^~~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/light.h:113:9: error: enumerator value for 'C3DF_Light_DADirty' is not an integer constant
113 | C3DF_Light_DADirty = BIT(15),
| ^~~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/light.h:118:9: error: unknown type name 'u16'
118 | u16 flags, id;
| ^~~
In file included from /opt/devkitpro/libctru/include/citro3d.h:27,
from /opt/devkitpro/libctru/include/citro2d.h:15,
from /home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:2:
/opt/devkitpro/libctru/include/c3d/fog.h:24:21: error: unknown type name 'GPU_FOGMODE'
24 | void C3D_FogGasMode(GPU_FOGMODE fogMode, GPU_GASMODE gasMode, bool zFlip);
| ^~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/fog.h:24:42: error: unknown type name 'GPU_GASMODE'
24 | void C3D_FogGasMode(GPU_FOGMODE fogMode, GPU_GASMODE gasMode, bool zFlip);
| ^~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/fog.h:38:22: error: unknown type name 'GPU_GASLUTINPUT'
38 | void C3D_GasLutInput(GPU_GASLUTINPUT input);
| ^~~~~~~~~~~~~~~
In file included from /opt/devkitpro/libctru/include/citro3d.h:29,
from /opt/devkitpro/libctru/include/citro2d.h:15,
from /home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:2:
/opt/devkitpro/libctru/include/c3d/framebuffer.h:8:9: error: unknown type name 'u16'
8 | u16 width;
| ^~~
/opt/devkitpro/libctru/include/c3d/framebuffer.h:9:9: error: unknown type name 'u16'
9 | u16 height;
| ^~~
/opt/devkitpro/libctru/include/c3d/framebuffer.h:10:9: error: unknown type name 'GPU_COLORBUF'
10 | GPU_COLORBUF colorFmt;
| ^~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/framebuffer.h:11:9: error: unknown type name 'GPU_DEPTHBUF'
11 | GPU_DEPTHBUF depthFmt;
| ^~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/framebuffer.h:20:9: error: enumerator value for 'C3D_CLEAR_COLOR' is not an integer constant
20 | C3D_CLEAR_COLOR = BIT(0),
| ^~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/framebuffer.h:21:9: error: enumerator value for 'C3D_CLEAR_DEPTH' is not an integer constant
21 | C3D_CLEAR_DEPTH = BIT(1),
| ^~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/framebuffer.h:25:49: error: unknown type name 'GPU_COLORBUF'
25 | u32 C3D_CalcColorBufSize(u32 width, u32 height, GPU_COLORBUF fmt);
| ^~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/framebuffer.h:26:49: error: unknown type name 'GPU_DEPTHBUF'
26 | u32 C3D_CalcDepthBufSize(u32 width, u32 height, GPU_DEPTHBUF fmt);
| ^~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/framebuffer.h:30:54: error: unknown type name 'GPU_TEXFACE'
30 | void C3D_FrameBufTex(C3D_FrameBuf* fb, C3D_Tex* tex, GPU_TEXFACE face, int level);
| ^~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/framebuffer.h:32:45: error: unknown type name 'gfxScreen_t'
32 | void C3D_FrameBufTransfer(C3D_FrameBuf* fb, gfxScreen_t screen, gfx3dSide_t side, u32 transferFlags);
| ^~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/framebuffer.h:32:65: error: unknown type name 'gfx3dSide_t'
32 | void C3D_FrameBufTransfer(C3D_FrameBuf* fb, gfxScreen_t screen, gfx3dSide_t side, u32 transferFlags);
| ^~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/framebuffer.h:34:57: error: unknown type name 'u16'
34 | static inline void C3D_FrameBufAttrib(C3D_FrameBuf* fb, u16 width, u16 height, bool block32)
| ^~~
/opt/devkitpro/libctru/include/c3d/framebuffer.h:34:68: error: unknown type name 'u16'
34 | static inline void C3D_FrameBufAttrib(C3D_FrameBuf* fb, u16 width, u16 height, bool block32)
| ^~~
/opt/devkitpro/libctru/include/c3d/framebuffer.h:41:67: error: unknown type name 'GPU_COLORBUF'
41 | static inline void C3D_FrameBufColor(C3D_FrameBuf* fb, void* buf, GPU_COLORBUF fmt)
| ^~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/framebuffer.h:56:67: error: unknown type name 'GPU_DEPTHBUF'
56 | static inline void C3D_FrameBufDepth(C3D_FrameBuf* fb, void* buf, GPU_DEPTHBUF fmt)
| ^~~~~~~~~~~~
In file included from /opt/devkitpro/libctru/include/citro3d.h:30,
from /opt/devkitpro/libctru/include/citro2d.h:15,
from /home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:2:
/opt/devkitpro/libctru/include/c3d/renderqueue.h:15:9: error: unknown type name 'gfxScreen_t'
15 | gfxScreen_t screen;
| ^~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/renderqueue.h:16:9: error: unknown type name 'gfx3dSide_t'
16 | gfx3dSide_t side;
| ^~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/renderqueue.h:23:9: error: enumerator value for 'C3D_FRAME_SYNCDRAW' is not an integer constant
23 | C3D_FRAME_SYNCDRAW = BIT(0), // Perform C3D_FrameSync before checking the GPU status
| ^~~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/renderqueue.h:24:9: error: enumerator value for 'C3D_FRAME_NONBLOCK' is not an integer constant
24 | C3D_FRAME_NONBLOCK = BIT(1), // Return false instead of waiting if the GPU is busy
| ^~~~~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/renderqueue.h:45:9: error: unknown type name 'GPU_DEPTHBUF'
45 | GPU_DEPTHBUF __e;
| ^~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/renderqueue.h:62:65: error: unknown type name 'GPU_COLORBUF'
62 | C3D_RenderTarget* C3D_RenderTargetCreate(int width, int height, GPU_COLORBUF colorFmt, C3D_DEPTHTYPE depthFmt);
| ^~~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/renderqueue.h:63:63: error: unknown type name 'GPU_TEXFACE'
63 | C3D_RenderTarget* C3D_RenderTargetCreateFromTex(C3D_Tex* tex, GPU_TEXFACE face, int level, C3D_DEPTHTYPE depthFmt);
| ^~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/renderqueue.h:65:58: error: unknown type name 'gfxScreen_t'
65 | void C3D_RenderTargetSetOutput(C3D_RenderTarget* target, gfxScreen_t screen, gfx3dSide_t side, u32 transferFlags);
| ^~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/renderqueue.h:65:78: error: unknown type name 'gfx3dSide_t'
65 | void C3D_RenderTargetSetOutput(C3D_RenderTarget* target, gfxScreen_t screen, gfx3dSide_t side, u32 transferFlags);
| ^~~~~~~~~~~
/opt/devkitpro/libctru/include/c3d/renderqueue.h: In function 'C3D_RenderTargetDetachOutput':
/opt/devkitpro/libctru/include/c3d/renderqueue.h:69:9: warning: implicit declaration of function 'C3D_RenderTargetSetOutput'; did you mean 'C3D_RenderTargetDetachOutput'? [-Wimplicit-function-declaration]
69 | C3D_RenderTargetSetOutput(NULL, target->screen, target->side, 0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| C3D_RenderTargetDetachOutput
/opt/devkitpro/libctru/include/c3d/renderqueue.h: At top level:
/opt/devkitpro/libctru/include/c3d/renderqueue.h:79:60: error: unknown type name 'u16'
79 | void C3D_SyncMemoryFill(u32* buf0a, u32 buf0v, u32* buf0e, u16 control0, u32* buf1a, u32 buf1v, u32* buf1e, u16 control1);
| ^~~
/opt/devkitpro/libctru/include/c3d/renderqueue.h:79:109: error: unknown type name 'u16'
79 | ill(u32* buf0a, u32 buf0v, u32* buf0e, u16 control0, u32* buf1a, u32 buf1v, u32* buf1e, u16 control1);
| ^~~
In file included from /opt/devkitpro/libctru/include/citro2d.h:16,
from /home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:2:
/opt/devkitpro/libctru/include/tex3ds.h:45:9: error: unknown type name 'u16'
45 | u16 width; ///< Sub-texture width (pixels)
| ^~~
/opt/devkitpro/libctru/include/tex3ds.h:46:9: error: unknown type name 'u16'
46 | u16 height; ///< Sub-texture height (pixels)
| ^~~
/opt/devkitpro/libctru/include/tex3ds.h:79:92: error: unknown type name 'decompressCallback'
79 | 3DS_Texture Tex3DS_TextureImportCallback(C3D_Tex* tex, C3D_TexCube* texcube, bool vram, decompressCallback callback, void* userdata);
| ^~~~~~~~~~~~~~~~~~
In file included from /opt/devkitpro/libctru/include/citro2d.h:18,
from /home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:2:
/opt/devkitpro/libctru/include/c2d/base.h:274:42: error: unknown type name 'gfxScreen_t'
274 | C3D_RenderTarget* C2D_CreateScreenTarget(gfxScreen_t screen, gfx3dSide_t side);
| ^~~~~~~~~~~
/opt/devkitpro/libctru/include/c2d/base.h:274:62: error: unknown type name 'gfx3dSide_t'
274 | C3D_RenderTarget* C2D_CreateScreenTarget(gfxScreen_t screen, gfx3dSide_t side);
| ^~~~~~~~~~~
In file included from /opt/devkitpro/libctru/include/c2d/text.h:7,
from /opt/devkitpro/libctru/include/citro2d.h:21,
from /home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:2:
/opt/devkitpro/libctru/include/c2d/font.h:50:29: error: unknown type name 'CFG_Region'
50 | C2D_Font C2D_FontLoadSystem(CFG_Region region);
| ^~~~~~~~~~
/opt/devkitpro/libctru/include/c2d/font.h:70:1: error: unknown type name 'charWidthInfo_s'
70 | charWidthInfo_s* C2D_FontGetCharWidthInfo(C2D_Font font, int glyphIndex);
| ^~~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c2d/font.h:80:42: error: unknown type name 'fontGlyphPos_s'
80 | void C2D_FontCalcGlyphPos(C2D_Font font, fontGlyphPos_s* out, int glyphIndex, u32 flags, float scaleX, float scaleY);
| ^~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c2d/font.h:86:1: error: unknown type name 'FINF_s'
86 | FINF_s* C2D_FontGetInfo(C2D_Font font);
| ^~~~~~
In file included from /opt/devkitpro/libctru/include/citro2d.h:21,
from /home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:2:
/opt/devkitpro/libctru/include/c2d/text.h:30:9: error: enumerator value for 'C2D_AtBaseline' is not an integer constant
30 | C2D_AtBaseline = BIT(0), ///< Matches the Y coordinate with the baseline of the font.
| ^~~~~~~~~~~~~~
/opt/devkitpro/libctru/include/c2d/text.h:31:9: error: enumerator value for 'C2D_WithColor' is not an integer constant
31 | C2D_WithColor = BIT(1), ///< Draws text with color. Requires a u32 color value.
| ^~~~~~~~~~~~~
In file included from /opt/devkitpro/libctru/include/citro2d.h:21,
from /home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:2:
/opt/devkitpro/libctru/include/c2d/text.h:37:9: error: enumerator value for 'C2D_WordWrap' is not an integer constant
37 | C2D_WordWrap = BIT(4), ///< Draws text with wrapping of full words before specified width. Requires a float value, passed after color if C2D_WithColor is specified.
| ^~~~~~~~~~~~
/home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c: In function 'main':
/home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:16:9: warning: implicit declaration of function 'gfxInitDefault' [-Wimplicit-function-declaration]
16 | gfxInitDefault();
| ^~~~~~~~~~~~~~
/home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:20:9: warning: implicit declaration of function 'consoleInit' [-Wimplicit-function-declaration]
20 | consoleInit(GFX_BOTTOM, NULL);
| ^~~~~~~~~~~
/home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:20:21: error: 'GFX_BOTTOM' undeclared (first use in this function)
20 | consoleInit(GFX_BOTTOM, NULL);
| ^~~~~~~~~~
/home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:23:33: warning: implicit declaration of function 'C2D_CreateScreenTarget'; did you mean 'C2D_SceneTarget'? [-Wimplicit-function-declaration]
23 | C3D_RenderTarget* top = C2D_CreateScreenTarget(GFX_TOP, GFX_LEFT);
| ^~~~~~~~~~~~~~~~~~~~~~
| C2D_SceneTarget
/home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:23:56: error: 'GFX_TOP' undeclared (first use in this function)
23 | C3D_RenderTarget* top = C2D_CreateScreenTarget(GFX_TOP, GFX_LEFT);
| ^~~~~~~
/home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:23:65: error: 'GFX_LEFT' undeclared (first use in this function)
23 | C3D_RenderTarget* top = C2D_CreateScreenTarget(GFX_TOP, GFX_LEFT);
| ^~~~~~~~
/home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:48:16: warning: implicit declaration of function 'aptMainLoop' [-Wimplicit-function-declaration]
48 | while (aptMainLoop())
| ^~~~~~~~~~~
/home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:50:17: warning: implicit declaration of funct
ion 'hidScanInput' [-Wimplicit-function-declaration]
50 | hidScanInput();
| ^~~~~~~~~~~~
/home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:53:29: warning: implicit declaration of function 'hidKeysDown' [-Wimplicit-function-declaration]
53 | u32 kDown = hidKeysDown();
| ^~~~~~~~~~~
/home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:54:29: error: 'KEY_START' undeclared (first use in this function)
54 | if (kDown & KEY_START)
| ^~~~~~~~~
/home/krasno/3ds-examples/graphics/gpu/2d_shapes/source/main.c:86:9: warning: implicit declaration of function 'gfxExit' [-Wimplicit-function-declaration]
86 | gfxExit();
| ^~~~~~~
make[2]: *** [/opt/devkitpro/devkitARM/base_rules:85: main.o] Error 1
make[1]: *** [Makefile:155: all] Error 2
make[1]: Leaving directory '/home/krasno/3ds-examples/graphics/gpu/2d_shapes'
make: *** [Makefile:15: examples] Error 1```
</details>
i have created a 3ds homebrew application using the template and im planning to release it under the gnu gpl v3.0 and im wondering if it would be okay for me to include the makefile in my project.
Hello! I was attempting to compile a couple of examples, however during the compile process I ran into an issue with the make process!
A:\3dsprojects\3ds-examples\graphics\gpu\textured_cube>make
main.c
A:/3dsprojects/3ds-examples/graphics/gpu/textured_cube/source/main.c:1:10: fatal error: 3ds.h: No such file or directory
1 | #include <3ds.h>
| ^~~~~~~
compilation terminated.
make[1]: *** [/opt/devkitpro/devkitARM/base_rules:85: main.o] Error 1
make: *** [Makefile:165: all] Error 2
A:\3dsprojects\3ds-examples\graphics\gpu\textured_cube>
I believe I have the library paths set up correctly (I installed devkitPro software) and my paths for those are as follows:
where my A: drive is where I installed devkitPro software, if I am misunderstanding something please let me know!
The microphone example in 3ds-examples/audio/mic is not working on my N3DS (B9S w/ luma 10.0.1). Compiles and runs fine but no audio is recorded and/or played - only silence. Can anyone confirm this working on the above config?
C:\Users\...\3ds-examples\graphics\bitmap\24bit-color>make
brew.png
Invalid Parameter - /Users
make[1]: *** [brew.bgr] Error 4
make: *** [build] Error 2
Hi , any documentation or readme to get started with this ?
i can't compile the box2d example due to it being missing on the lib folder in the libctru folder
what is a working way to install the box2d lib
and if this isn't the correct repo for me to ask for this
please say what would be the one
I'm having trouble getting stable audio playback in a game I'm working on, so I decided to look at the examples for guidance. I could not find a sample file that was compatible with the opus-decoding example, but the modplug-decoding example comes with one, so I tried that.
Void Linux x86_64
3ds-cmake 1.5.1-1
3ds-examples 20230610-1
3ds-libmodplug 0.8.9.0-1
3ds-libogg 1.3.4-2
3ds-libopus 1.3-1
3ds-libvorbisidec 1.2.1-3
3ds-opusfile 0.11-1
3ds-pkg-config 0.28-5
3ds-zlib 1.3-1
3dslink 0.6.2-1
3dstools 1.3.1-2
armv4t-pkg-config 0.28-1
citro2d 1.6.0-1
citro3d 1.7.1-2
devkit-env 1.0.1-2
devkitARM r62-1
devkitARM-gdb 13.2-1
devkitPPC r44.2-2
devkitPPC-gdb 13.2-1
devkitarm-cmake 1.2.2-1
devkitarm-crtls 1.2.3-1
devkitarm-rules 1.5.1-1
devkitpro-keyring 20180316-1
dkp-cmake-common-utils 1.5.2-1
general-tools 1.4.4-1
grit 0.9.2-1
libctru 2.3.1-1
libogc 2.5.0-2
mmutil 1.10.1-1
picasso 2.7.2-2
ppc-pkg-config 0.28-5
tex3ds 2.3.0-3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.