Homebrew Homebrew Development

elhobbs

Well-Known Member
Member
Joined
Jul 28, 2008
Messages
1,044
Trophies
1
XP
3,033
Country
United States
I see. I'll look into those.

As for the ctrulib and the devkitpro version of ctrulib, I recalled WinterMute and others are looking into updating the package a bit, so I didn't include a link to update the ctrulib or so in the guide.



Like you said, subdirectories don't need to be included. But I'm certain you don't need the C++ and C++/5.3.0 top level directories in your include paths. By default, those directories are subdirectories of the arm-eabi-none/include directory, which is what you have.

Also, that Visual Studio screenshot was done on a brand new project. I didn't bother to remove the Windows includes because that was done in a rush.

The screenshots are to demonstrate that you only need a minimum total of 2 include paths to get a project to work with IntelliSense / Content Assist. (Aside from the default Windows include paths, those are unnecessary.)
I am not sure if you already discovered this but intellisense really does not like if you add "#define <3ds.h>" as the first include in a .c file (.cpp works fine). it seems that it gets confused when it sees __attribute__ in 3ds/svc.h
here is an example that shows the issue (the example code itself is nonsense and not intended to show best practice):

//this hides __attribute__ from intellisense
#if defined(__INTELLISENSE__) && defined(_3DS)
#define __attribute__(x)
#undef _WIN32
#endif

#include <3ds.h>
#include <stdio.h>
#include <stdlib.h>

void _3ds_shutdown() {
gfxSet3D(false);
printf("goodbye\n");
gfxExit();
}

void _3ds_init() {
gfxInitDefault();
consoleInit(GFX_BOTTOM, 0);
consoleSetWindow(0, 0, 0, 40, 19);
osSetSpeedupEnable(true);
atexit(_3ds_shutdown);
}

int main(int argc, char ** argv) {

_3ds_init();

printf("Hello World\n");
while (1);
return 0;
}
 

delete12345

Well-Known Member
Member
Joined
Feb 27, 2010
Messages
695
Trophies
1
Age
32
Location
Taipei, Taiwan
XP
1,276
Country
United States
I need some help.

The last 5% of my Pica project is the rendering part of the physics engine. I suddenly got overwhelmed, and I couldn't think up a good way to put A (Pica) and B (citro3d) together, despite both of them are using the same formats, same libraries, and same data structures.

I plan to let the end user write their own rendering methods, but I haven't figure out the best approach on how to write the rendering methods out.

@kprovost7314 You were playing around with citro3d for a while. Perhaps you can help me on this. Do you know a better way of storing vertex buffer data of vertices, instead of having a static constant array of vertices up in the header file?
 

YugamiSekai

Mr. Picross
Member
Joined
Dec 24, 2014
Messages
2,015
Trophies
1
Age
22
XP
2,285
Country
United States
@kprovost7314 You were playing around with citro3d for a while. Perhaps you can help me on this. Do you know a better way of storing vertex buffer data of vertices, instead of having a static constant array of vertices up in the header file?
Sorry but I've been trying to learn lighting and having more than one scene for the guide and get OBJ/FBX files loaded by writing a simple parser anyone can use. I don't know of a simpler way or storing vertex buffer data at the moment but I can probably see what I can do.
 

catlover007

Developer
Developer
Joined
Oct 23, 2015
Messages
722
Trophies
1
XP
3,942
Country
Germany
@kprovost7314 You were playing around with citro3d for a while. Perhaps you can help me on this. Do you know a better way of storing vertex buffer data of vertices, instead of having a static constant array of vertices up in the header file?
This is easy. Just use some library to load model files of your choice(just search on Github). Use the data you've got to calculate the size of a second buffer(in linear memory) and fill it with the data you've got from the library in the format the GPU is configured to read(e.g. instead of seperate buffers interlaced data). Et voilà, you have a buffer you can use for the GPU.
 

delete12345

Well-Known Member
Member
Joined
Feb 27, 2010
Messages
695
Trophies
1
Age
32
Location
Taipei, Taiwan
XP
1,276
Country
United States
Anyone else uses Citro3D? Asking to see if other than a few people I know of that touch upon Citro3D.

This is easy. Just use some library to load model files of your choice(just search on Github). Use the data you've got to calculate the size of a second buffer(in linear memory) and fill it with the data you've got from the library in the format the GPU is configured to read(e.g. instead of seperate buffers interlaced data). Et voilà, you have a buffer you can use for the GPU.

Ok, I try. No guarantees though.
 

YugamiSekai

Mr. Picross
Member
Joined
Dec 24, 2014
Messages
2,015
Trophies
1
Age
22
XP
2,285
Country
United States
Does anyone know how to work with video formats in 3DS homebrew (preferably moflex or mp4)? I know I'm supposed to find a library but how would I code it on the 3DS side of things?
 

RealityNinja

Well-Known Member
Member
Joined
Nov 4, 2015
Messages
1,716
Trophies
0
Location
Pokéland
XP
667
Country
France

YugamiSekai

Mr. Picross
Member
Joined
Dec 24, 2014
Messages
2,015
Trophies
1
Age
22
XP
2,285
Country
United States
Do you know you can actually port C++ code to C? Like what I did with my physics engine?

Also, citro3d does not support quads, lines, and points. Only triangles and variations of triangles (strips, fans, etc.). Just found out.
I didn't know that. Plus the code that Omegadrien showed looked complicated.
 

catlover007

Developer
Developer
Joined
Oct 23, 2015
Messages
722
Trophies
1
XP
3,942
Country
Germany
If you want to draw a lot of lines(>~300) I wouldn't recommend you to just copy paste their method. One square root per line is some what expensive
 

delete12345

Well-Known Member
Member
Joined
Feb 27, 2010
Messages
695
Trophies
1
Age
32
Location
Taipei, Taiwan
XP
1,276
Country
United States
If you want to draw a lot of lines(>~300) I wouldn't recommend you to just copy paste their method. One square root per line is some what expensive

That's also a concern, still hunching over on how to implement a custom method to convert mathematically calculated vertices/indices from the physics engine into vertex buffers that citro3d uses.
 

elhobbs

Well-Known Member
Member
Joined
Jul 28, 2008
Messages
1,044
Trophies
1
XP
3,033
Country
United States
-fixed problem-
If you go so far as to ask for help from the community then I feel you should post the solution to the community (rather than remove the original question) - even if you find the solution for your self. It could help someone else. Just my two cents though.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Veho @ Veho: It's how we used to cheat at Pokewalker.