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

Rewrite local README with updated startup instructions #44

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jempiere
Copy link

This document maintains most of the original language in the previous README, while incorporating a modernized version of the information found here. This project and its test provided here executes as-intended with zig version 0.13.0-dev.351+64ef45eb0 on macos-aarch64.

  • By selecting this checkbox, I agree to license my contributions to this project under the license(s) described in the LICENSE file, and I have the right to do so or have received permission to do so by an employer or client I am producing work for whom has this right.

Copy link
Contributor

@terraquad terraquad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, but the syntax highlighting uses the wrong programming language.

### build.zig
A depedency step must be added in order for your project to build with mach-glfw. Below
the line beginning with `const exe = b.addExecutable`, add the following snippet:
```typescript
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be ```zig


### src/main.zig
Below follows an example program, to test your functionality:
```typescript
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be ```zig


## Issues persisting?
If you're manually configuring your `build.zig.zon`, verify that this structure exists:
```typescript
Copy link
Contributor

@terraquad terraquad Aug 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be ```zig

- `Monitor.getGammaRamp`, `Monitor.setGammaRamp`

Non-critical errors (such as the failure of `Window.getPos`) can still be caught and handled:
```typescript
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be ```zig

// ... other dependencies of yours
.@"mach-glfw" = .{
.url = "https://pkg.machengine.org/mach-glfw/FULL_HASH_LATEST_COMMIT.tar.gz",
.hash = "" // place anything here--zig build will error and give you the correct hash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this line, as it being present makes Zig assume the hash should be "". It'll only tell you the correct hash when this line is not present.


- [hexops/vulkan-zig-generated](https://github.com/hexops/vulkan-zig-generated)

- OpenGL: [castholm/zigglegen](https://github.com/hexops/mach-glfw-opengl-example) - [example](https://github.com/hexops/mach-glfw-opengl-example)
Copy link

@dandeduck dandeduck Sep 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a link to zigglegen

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be https://github.com/castholm/zigglgen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants