initialize cache mutexes in right file
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
// This file takes minecraft chunks (decoded by cave_parse) and
|
||||
// uses stb_voxel_render to turn them into vertex buffers.
|
||||
|
||||
#define STB_GLEXT_DECLARE "glext_list.h"
|
||||
#include "stb_gl.h"
|
||||
@ -452,6 +454,7 @@ void reset_cache_size(int size)
|
||||
cache_size = size;
|
||||
}
|
||||
|
||||
// this must be called inside mutex
|
||||
void deref_fastchunk(fast_chunk *fc)
|
||||
{
|
||||
if (fc) {
|
||||
@ -672,6 +675,9 @@ void mesh_init(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
chunk_cache_mutex = SDL_CreateMutex();
|
||||
chunk_get_mutex = SDL_CreateMutex();
|
||||
|
||||
for (i=0; i < 256; ++i) {
|
||||
memcpy(minecraft_tex1_for_blocktype[i], minecraft_info[i]+1, 6);
|
||||
minecraft_trans_for_blocktype[i] = (minecraft_info[i][0] != C_solid && minecraft_info[i][0] != C_water);
|
||||
|
Reference in New Issue
Block a user