Coder Social home page Coder Social logo

didot's People

Contributors

zenith391 avatar zigster64 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

zigster64

didot's Issues

Unable to evaluate constant expression

This is on Windows 10 with Zig 0.7.1

When trying to build the basic example, I get a compiler error that says:

.\deps\didot\build.zig:35:32: error: unable to evaluate constant expression
            const target = step.target.toTarget().os.tag;
                               ^
.\build.zig:18:28: note: called from here
  try engine.addEngineToExe(exe, .{
                           ^
.\build.zig:4:33: note: called from here
pub fn build(b: *Builder) !void {
                                ^
.\deps\didot\build.zig:35:48: note: referenced here
            const target = step.target.toTarget().os.tag;
                                               ^
.\build.zig:18:3: note: referenced here
  try engine.addEngineToExe(exe, .{
  ^

The build file is the default zig build file with the code from the How to use section of the readme pasted into it (with the strings changed to the proper directory), and the source file is the example code from the readme as well.

Porting to zig 0.9.0

Hello, I'm new to zig and don't have a PR, but here's my findings on what need to be changed

  1. Allocator now is object itself, not pointer
    1.1. Replace declarations allocator: *Allocator with allocator: Allocator
    1.2. Replace usage &allocator.allocator with allocator.allocator()
    There are cases with ?Allocator, I'm not sure if that's valid.
  2. Mutex is now locking itself, doesn't return held object
    2.1. Replace declarations: held: blabla @TypeOf(std.Thread.Mutex.acquire)... to mutex: std.Thread.Mutex
    2.2. Replace lock held = lock.acquire() to mutex.lock()
    2.3. Replace defer held.release() to defer mutex.unlock() and held.release() to mutex.unlock()
  3. c_void changed to anyopaque. Not sure, may be it need to be *allowzero anyopaque.
  4. There is package in buld.zig that named zlm but refers to zalgebra, not sure if they're interchangable
  5. Example in README.md somewhat outdated, I have changed some parts according to karts example
    5.1. Changed .rotation = Vec3.new(-120.0, -15.0, 0).toRadians() to .rotation = Quat.fromEulerAngle(Vec3.new(-120, -15, 0))
    5.2. primitive name need to be asset var cube = try didot_obj.GameObject.createObject(allocator, asset.get("Mesh/Cube"));
    asset is referenced as const asset = &app.scene.assetManager;
    5.3. usingnamespace @import(...) not working anymore, I ended up with const didot_gfx = @import("didot-graphics"); etc.
  6. Some deprecated std.debug.warn changed to std.debug.print

This is where I ended up now. I have trouble building glfw on windows, so I replaced all cImports with https://github.com/JonSnowbd/ZT/ but that's another story.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.