10 sdr_load(const char *fname, int *sz)
17 if (!(fp = fopen(fname, "r"))) {
18 fprintf(stderr, "Failed to open shader file: %s: %s.\n", fname, strerror(errno));
22 fstat(fileno(fp), &sp);
25 if (!(sdr_text = malloc(filesz + 1))) {
30 fread(sdr_text, 1, filesz, fp);
35 fprintf(stderr, "Failed to load shader source code from: %s.\n", fname);
43 img_dump_rgba(const char *fname,