LoadShaderFromMemory function

Shader LoadShaderFromMemory(
  1. String vsCode,
  2. String fsCode
)

Implementation

raylib.Shader LoadShaderFromMemory(String vsCode, String fsCode) {
  final vsPtr = vsCode.toNativeUtf8().cast<Char>();
  final fsPtr = fsCode.toNativeUtf8().cast<Char>();
  try {
    return raylib.LoadShaderFromMemory(vsPtr, fsPtr);
  } finally {
    ffi.malloc.free(vsPtr);
    ffi.malloc.free(fsPtr);
  }
}