#value with comptime-only type 'comptime_int' depends on runtime control flow

1 messages · Page 1 of 1 (latest)

fresh pine
#

because shaderT has type comptime_int, it must be known at compile time, but the value of shaderT depends on the runtime value shaderType.

#

Try casting gl.VERTEX_SHADER and gl.FRAGMENT_SHADER to runtime int types like u8, u64 or usize

plain cedar
#

Yes, but that type is invalid at runtime