1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 14:37:16 +00:00

clear shaders on resetGL

This commit is contained in:
Zeno Rogue 2019-10-26 17:02:20 +02:00
parent 2645eae237
commit 68c7514c2c
3 changed files with 7 additions and 3 deletions

View File

@ -596,6 +596,10 @@ EX void resetGL() {
if(GDIM == 3 && !floor_textures) make_floor_textures();
#endif
cgi.initPolyForGL();
compiled_programs.clear();
matched_programs.clear();
glhr::current_glprogram = nullptr;
ray::reset_raycaster();
}
#endif

View File

@ -102,7 +102,7 @@ struct raycaster : glhr::GLprogram {
shared_ptr<raycaster> our_raycaster;
void reset_raycaster() { our_raycaster = nullptr; };
EX void reset_raycaster() { our_raycaster = nullptr; };
void enable_raycaster() {
if(!our_raycaster) {

View File

@ -37,9 +37,9 @@ constexpr int aTexture = 8;
constexpr int INVERSE_EXP_BINDING = 2;
#endif
map<string, shared_ptr<glhr::GLprogram>> compiled_programs;
EX map<string, shared_ptr<glhr::GLprogram>> compiled_programs;
map<unsigned, shared_ptr<glhr::GLprogram>> matched_programs;
EX map<unsigned, shared_ptr<glhr::GLprogram>> matched_programs;
glhr::glmatrix model_orientation_gl() {
glhr::glmatrix s = glhr::id;