ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/rendercache.c
(Generate patch)

Comparing deliantra/Deliantra-Client/rendercache.c (file contents):
Revision 1.13 by root, Mon Nov 19 00:10:34 2018 UTC vs.
Revision 1.14 by root, Mon Nov 19 00:56:08 2018 UTC

82 c.y = y + h; 82 c.y = y + h;
83 } 83 }
84 } 84 }
85 }; 85 };
86 86
87 int drawcount = 0;
87 ska::flat_hash_map<rc_key_t, array_t> h; 88 ska::flat_hash_map<rc_key_t, array_t> h;
88 89
89 void clear () 90 void clear ()
90 { 91 {
92 drawcount = 0;
91 h.clear (); 93 h.clear ();
92 } 94 }
93 95
94 array_t &array (const rc_key_t &k) 96 array_t &array (const rc_key_t &k)
95 { 97 {
147 glEnd (); 149 glEnd ();
148 } 150 }
149 } 151 }
150 152
151 glDisable (GL_TEXTURE_2D); 153 glDisable (GL_TEXTURE_2D);
154
155 if (ecb_expect_false (++drawcount == 16))
156 for (auto &&it = h.begin (); it != h.end (); ++it)
157 it->second.shrink_to_fit ();
152 } 158 }
153}; 159};
154 160

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines