Skip to content
This repository has been archived by the owner on Feb 6, 2025. It is now read-only.

Rewrite local README with updated startup instructions #44

Closed
wants to merge 2 commits into from

Conversation

jempiere
Copy link
Contributor

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

@castholm
Copy link
Contributor

Thanks, and sorry it took so long to get to this PR. I think including the startup instructions in the README would be useful, so I adapted some of your changes into #51.

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

Successfully merging this pull request may close these issues.

4 participants