Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mesh sample #44

Merged
merged 1 commit into from Sep 10, 2018
Merged

Add mesh sample #44

merged 1 commit into from Sep 10, 2018

Conversation

mborgerson
Copy link
Member

@mborgerson mborgerson commented Aug 10, 2018

This PR adds a new sample which draws real 3D geometry, with textures and lights. Based on my triangle sample, and in part on the 0ldskoo1 sample (which is in-turn based on pbkit samples). The code here is a little easier to navigate over the other 3d samples. Simple text mesh of 'nxdk' and planar mapping of the texture.

screenshot

The code needs a little cleanup, specifically replacing some of the magic numbers with their symbolic counterparts, but I think it's in good addition as-is. Cleanup can happen in follow-up PR.

@dracc
Copy link
Contributor

dracc commented Aug 13, 2018

I've built and tested both in xqemu and on real hardware.
Works just fine, apart from a few flickers on my box.

Screenshot
Blue tint is due to crappy phone and bad angle.

@JayFoxRox
Copy link
Member

JayFoxRox commented Aug 15, 2018

Cleanup can happen in follow-up PR.

I mostly agree. However, I'd like to see the following changes before a merge:

  1. Document where the texture.h came from, or how to create one.
  2. Document where the verts.h came from, or how to create one (rename to mesh.h?).
  3. Remove reboot after 600 frames, because it feels like a crash.

The reboot feels too much like a crash. The 0ldskoo1 already confuses people by creating a solid rectangle ontop of the 3D visuals. If they run the mesh sample next they'll assume nxdk is very broken.

Not being able to generate new textures / meshes is a big problem, too. Simply because people can't tinker with it then. Especially beginners will likely start with artwork-swaps.

The code here is a little easier to navigate over the other 3d samples.

I still feel it's much too complicated to be honest.
I feel like this should be a more simple example using the fixed-function pipeline.
We should also hide all the pb_push behind a slightly higher level API (but below something like GL).
Anyhow, all of this should be done in a follow-up PR.
For now, having another functional sample is a lot better than not having it.


I ran this sample on my Xbox and it worked fine when starting it from evox. It did crash when trying to run it using XBDM on a debug BFM kernel (not sure which one I used; it's probably also a more generic nxdk issue).

I only skimmed over the code yet, but it works and I want to have this merged soon, too.
I also trust your coding skills.

Anyhow, LGTM, but I'd like to see the 3 things listed above documented / changed.

@JayFoxRox JayFoxRox merged commit 704baf7 into XboxDev:master Sep 10, 2018
@JayFoxRox
Copy link
Member

Merged. Please address those things I've mentioned in my review as a follow-up, or create an issue @mborgerson

@mborgerson mborgerson deleted the demo/mesh branch September 10, 2018 16:43
@mborgerson
Copy link
Member Author

Issue #45

dracc pushed a commit to dracc/nxdk that referenced this pull request Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants