]> git.lizzy.rs Git - minetest.git/blobdiff - src/shader.cpp
Remove ClientMap::m_camera_mutex
[minetest.git] / src / shader.cpp
index cbde9295e587d4ad918cd2826e2350039605cc2d..917d878bb213b510f7564ab9de68092857f97ee8 100644 (file)
@@ -367,7 +367,7 @@ ShaderSource::ShaderSource(IrrlichtDevice *device):
 
        m_shader_callback = new ShaderCallback(this, "default");
 
-       m_main_thread = get_current_thread_id();
+       m_main_thread = thr_get_current_thread_id();
 
        // Add a dummy ShaderInfo as the first index, named ""
        m_shaderinfo_cache.push_back(ShaderInfo());
@@ -397,7 +397,7 @@ u32 ShaderSource::getShader(const std::string &name,
                Get shader
        */
 
-       if(get_current_thread_id() == m_main_thread){
+       if (thr_is_current_thread(m_main_thread)) {
                return getShaderIdDirect(name, material_type, drawtype);
        } else {
                /*errorstream<<"getShader(): Queued: name=\""<<name<<"\""<<std::endl;*/
@@ -456,7 +456,7 @@ u32 ShaderSource::getShaderIdDirect(const std::string &name,
        /*
                Calling only allowed from main thread
        */
-       if(get_current_thread_id() != m_main_thread){
+       if (!thr_is_current_thread(m_main_thread)) {
                errorstream<<"ShaderSource::getShaderIdDirect() "
                                "called not from main thread"<<std::endl;
                return 0;
@@ -504,7 +504,7 @@ void ShaderSource::insertSourceShader(const std::string &name_of_shader,
                        "name_of_shader=\""<<name_of_shader<<"\", "
                        "filename=\""<<filename<<"\""<<std::endl;*/
 
-       sanity_check(get_current_thread_id() == m_main_thread);
+       sanity_check(thr_is_current_thread(m_main_thread));
 
        m_sourcecache.insert(name_of_shader, filename, program, true);
 }