I'm trying to port this piece of code from gl-rs to glow, which saves a compiled program binary to cache and loads it later onto the GPU
let program = gl::CreateProgram();
// attach shaders + compile
let mut length = 0;
gl::GetProgramiv(program, gl::PROGRAM_BINARY_LENGTH, &mut length);
let mut binary = vec![0; length as usize];
let mut format = 0;
gl::GetProgramBinary(
program,
length,
std::ptr::null_mut(),
&mut format,
binary.as_mut_ptr().cast(),
);
// later on
let blob = get_program_from_cache();
gl::ProgramBinary(program, format, blob.as_ptr().cast(), blob.len() as GLsizei);
However it seems like glow is missing shims from ARB_get_program_binary, but they seem to be defined on context.raw, at least for native targets.
I'm trying to port this piece of code from
gl-rs
to glow, which saves a compiled program binary to cache and loads it later onto the GPUHowever it seems like
glow
is missing shims fromARB_get_program_binary
, but they seem to be defined oncontext.raw
, at least for native targets.