Git Product home page Git Product logo

jok's People

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

jok's Issues

Usage of @splat

Right now, if I use any of the functions that use @splat, it causes a compile error:

/home/mpokhil/Source/jok/src/j2d/Vector.zig:97:39: error: expected type 'u32', found 'type'
    const result = self.data / @splat(f32, l);
                                      ^~~
referenced by:
    move: /home/.../src/main.zig:63:30
    update: /home/.../src/main.zig:146:13
    remaining reference traces hidden; use '-freference-trace' to see all reference traces

/home/.../jok/src/j2d/Vector.zig:23:27: error: expected type 'u32', found 'type'
    const result = @splat(f32, val);

Just changing all instance of @splat(f32, ...) in jok.j2d.Vector to @splat(2, ...) works as expected.

Should I create a PR for this?

High DPI support

Not so sure how other engines/frameworks are dealing with high dpi. Hope someone can provide some clues.

allow defer in jd2 and jd3?

Using defer on pairs of setup and cleanup is a common zig idiom, but since the end() functions can error, its impossible right now.

Suggested refactor:

  • make an error union variable;
  • rewrite the try expressions to catch, save the error and return;
  • make begin() try the end error as the first thing;

so it would be something like

+ var end_error: anyerror!void = {};
...
pub fn begin(opt: BeginOpt) !void {
    + try end_error;
    ....
}
...
-pub fn end() !void {
+pub fn end() void {
-    try [expr];
+    [expr] catch |e| return end_error = e;
}

Gonna write down a PR, just thought it would be good to open an issue first.

Error compiling examples

Hi! I'm trying to compile the examples, but I'm getting:

PS D:\programming\__zig\jok> zig build hello
zig build-exe hello Debug native: error: error(compilation): clang failed with stderr: D:\programming\__zig\jok\src\deps\audio\c\sdl_impl.c:594:18: error: call to undeclared function 'ma_context_init__sdl'; ISO 
C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

The SDL version I've setup is SDL2-devel-2.28.5-mingw

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.