Skip to main content

Support Solid.js

Code Example

import { useMemo } from 'react'
import { createGL, onFrame } from 'glre/solid'

export const Canvas = () => {
        const gl = createGL()

        onFrame(() => {
                gl.clear()
                gl.viewport()
                gl.drawArrays()
                return true
        })

        return <canvas ref={gl.ref} />
}