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
import { createRef, HTMLAttributes, useEffect, useState } from "react" | |
const positions = [ | |
-1, -1, // Bottom left | |
1, -1, // Bottom right | |
-1, 1, // Top left | |
1, 1 // Top right | |
]; | |
function createShader(gl: WebGLRenderingContext, type: GLenum, source: string): WebGLShader | null { |
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
local profiler = { | |
call_stack = {}, -- Stack to keep track of active function calls | |
timings = {}, -- Stores the total time spent in each function | |
call_counts = {} -- Stores how many times each function was called | |
} | |
local function get_time() | |
return os.clock() | |
end |
OlderNewer