This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
raylib-render-extras - Some render functions that avoids extra overhead when rendering multiple instances. | |
Tested with Raylib 4.2 might work with other versions | |
See https://youtu.be/2EOjGwhYXds?si=fcJzO1VjbLQ1dzRW&t=319 for a brief explanation of the functions | |
Copyright (c) 2024 Lingon Studios | |
The code is derived from Raylib Copyright (c) 2013-2024 Ramon Santamaria (@raysan5) | |
This software is provided "as-is", without any express or implied warranty. In no event |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package obj | |
import "core:fmt" | |
import "core:math/linalg" | |
import "core:os" | |
import "core:strconv" | |
import "core:strings" | |
// https://en.wikipedia.org/wiki/Wavefront_.obj_file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
const builtin = @import("builtin"); | |
pub const StringContext = struct { | |
pub inline fn hash(_: @This(), s: []const u8) u64 { | |
return std.hash_map.hashString(s); | |
} | |
pub inline fn eql(_: @This(), a: []const u8, b: []const u8) bool { | |
return std.mem.eql(u8, a, b); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Port of some collision functions to Odin by Jakub Tomšů. | |
// | |
// from Real-Time Collision Detection by Christer Ericson, published by Morgan Kaufmann Publishers, © 2005 Elsevier Inc | |
// | |
// This should serve as an reference implementation for common collision queries for games. | |
// The goal is good numerical robustness, handling edge cases and optimized math equations. | |
// The code isn't necessarily very optimized. | |
// | |
// There are a few cases you don't want to use the procedures below directly, but instead manually inline the math and adapt it to your needs. | |
// In my experience this method is clearer when writing complex level queries where I need to handle edge cases differently etc. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#define COBJMACROS | |
#include <windows.h> | |
#include <d3d11.h> | |
// | |
// interface | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.zig-cache/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::time::{Duration, Instant}; | |
/// How many confirmations to wait for | |
const REQUIRED_CONFIRMATIONS: u32 = 1; | |
const WAIT_TIME_IN_SECONDS: u64 = 60; | |
const HARD_TIMEOUT_FACTOR: u64 = 10; | |
/// Time before giving up on waiting for transaction confirmation. After this time, we expect the | |
/// Transaction Monitor to bump the gas price and re-broadcast the transaction. |
In the last years I've been asked multiple times about the comparison between raylib and SDL libraries. Unfortunately, my experience with SDL was quite limited so I couldn't provide a good comparison. In the last two years I've learned about SDL and used it to teach at University so I feel that now I can provide a good comparison between both.
Hope it helps future users to better understand this two libraries internals and functionality.
NewerOlder