Timeline for GLSL shaders work when hardcoded, not when loaded from file
Current License: CC BY-SA 3.0
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 15, 2015 at 4:01 | vote | accept | user137 | ||
| Aug 14, 2015 at 20:15 | comment | added | Andon M. Coleman | @user137: It returns the char array, for sure. The problem is that the std::string object you got that array from, is destroyed after that load_shader (...) call returns. You need to make a copy, not get the address of an array that's about to be destroyed ;) | |
| Aug 14, 2015 at 17:18 | comment | added | user137 | I guess I assumed the .c_str() function would return the char array and that the original string would no longer be needed. | |
| Aug 14, 2015 at 8:05 | history | answered | kolrabi | CC BY-SA 3.0 |