This file contains 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
/// <summary> | |
/// Precalculated values which are power of two. Exponent begins with zero! | |
/// </summary> | |
let PowerOfTwo = [| for i in 0..20 -> int (System.Math.Pow(2., float i)) |] | |
let toBoolean<'T> (v:'T) = System.Convert.ToBoolean(v) | |
// size = 12 | |
// This maps a edge index to a vertex pair | |
// 12 edges = 12 vertex pairs | |
let cubeEdgesSurfacenets = |
This file contains 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
// Wrong function | |
[SuppressUnmanagedCodeSecurity] | |
[DllImport("glfw3", CallingConvention = CallingConvention.Cdecl, | |
EntryPoint = "glfwCreateWindowSurface")] | |
public static extern VkResult CreateWindowSurface(IntPtr instance, GLFWwindow window, IntPtr allocator, out long surface); | |
// Working function | |
[<SuppressUnmanagedCodeSecurity>] | |
[<DllImport("glfw3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "glfwCreateWindowSurface")>] | |
extern VkResult CreateWindowSurface(uint64 instance, nativeint window, nativeint allocator, unativeint& surface); |
This file contains 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
namespace Fable.Import | |
open System | |
open System.Text.RegularExpressions | |
open Fable.Core | |
open Fable.Core.JsInterop | |
open Fable.Import.JS | |
open Fable.Import.Browser | |
module rec Cherry = |
NewerOlder