NULL sets a program to stock.

This commit is contained in:
Themaister 2012-05-06 22:34:57 +02:00
parent 43dbec58a3
commit a5f1634dca

View File

@ -1221,6 +1221,8 @@ bool gl_cg_load_shader(unsigned index, const char *path)
memset(&prg[index], 0, sizeof(prg[index]));
if (path)
{
if (load_program(index, path, true))
{
set_program_attributes(index);
@ -1233,6 +1235,12 @@ bool gl_cg_load_shader(unsigned index, const char *path)
return false;
}
}
else
{
prg[index] = prg[0];
return true;
}
}
bool gl_cg_save_cgp(const char *path, const struct gl_cg_cgp_info *info)
{