Bladeren bron

Fix build

Daniele Bartolini 8 jaren geleden
bovenliggende
commit
ebce82d16e

+ 1 - 1
src/device/device.cpp

@@ -588,7 +588,7 @@ void Device::render(World& world, UnitId camera_unit)
 	bgfx::setViewTransform(0, to_float_ptr(view), to_float_ptr(proj));
 	bgfx::setViewTransform(0, to_float_ptr(view), to_float_ptr(proj));
 	bgfx::setViewTransform(1, to_float_ptr(view), to_float_ptr(proj));
 	bgfx::setViewTransform(1, to_float_ptr(view), to_float_ptr(proj));
 	bgfx::setViewTransform(2, to_float_ptr(MATRIX4X4_IDENTITY), to_float_ptr(ortho_proj));
 	bgfx::setViewTransform(2, to_float_ptr(MATRIX4X4_IDENTITY), to_float_ptr(ortho_proj));
-	bgfx::setViewSeq(2, true);
+	bgfx::setViewMode(2, bgfx::ViewMode::Sequential);
 
 
 	bgfx::touch(0);
 	bgfx::touch(0);
 	bgfx::touch(1);
 	bgfx::touch(1);

+ 2 - 2
src/resource/mesh_resource.cpp

@@ -389,8 +389,8 @@ namespace mesh_resource_internal
 		for (u32 i = 0; i < array::size(mr->geometries); ++i)
 		for (u32 i = 0; i < array::size(mr->geometries); ++i)
 		{
 		{
 			MeshGeometry& mg = *mr->geometries[i];
 			MeshGeometry& mg = *mr->geometries[i];
-			bgfx::destroyVertexBuffer(mg.vertex_buffer);
-			bgfx::destroyIndexBuffer(mg.index_buffer);
+			bgfx::destroy(mg.vertex_buffer);
+			bgfx::destroy(mg.index_buffer);
 		}
 		}
 	}
 	}
 
 

+ 2 - 2
src/resource/texture_resource.cpp

@@ -99,7 +99,7 @@ namespace texture_resource_internal
 		br.read(data, size);
 		br.read(data, size);
 
 
 		tr->mem        = bgfx::makeRef(data, size);
 		tr->mem        = bgfx::makeRef(data, size);
-		tr->handle.idx = bgfx::invalidHandle;
+		tr->handle.idx = BGFX_INVALID_HANDLE;
 
 
 		return tr;
 		return tr;
 	}
 	}
@@ -113,7 +113,7 @@ namespace texture_resource_internal
 	void offline(StringId64 id, ResourceManager& rm)
 	void offline(StringId64 id, ResourceManager& rm)
 	{
 	{
 		TextureResource* tr = (TextureResource*)rm.get(RESOURCE_TYPE_TEXTURE, id);
 		TextureResource* tr = (TextureResource*)rm.get(RESOURCE_TYPE_TEXTURE, id);
-		bgfx::destroyTexture(tr->handle);
+		bgfx::destroy(tr->handle);
 	}
 	}
 
 
 	void unload(Allocator& a, void* resource)
 	void unload(Allocator& a, void* resource)

+ 2 - 2
src/world/material_manager.cpp

@@ -75,7 +75,7 @@ void MaterialManager::offline(StringId64 id, ResourceManager& rm)
 		TextureHandle* th = get_texture_handle(mr, i, base);
 		TextureHandle* th = get_texture_handle(mr, i, base);
 		bgfx::UniformHandle sh;
 		bgfx::UniformHandle sh;
 		sh.idx = th->sampler_handle;
 		sh.idx = th->sampler_handle;
-		bgfx::destroyUniform(sh);
+		bgfx::destroy(sh);
 	}
 	}
 
 
 	for (u32 i = 0; i < mr->num_uniforms; ++i)
 	for (u32 i = 0; i < mr->num_uniforms; ++i)
@@ -83,7 +83,7 @@ void MaterialManager::offline(StringId64 id, ResourceManager& rm)
 		UniformHandle* uh = get_uniform_handle(mr, i, base);
 		UniformHandle* uh = get_uniform_handle(mr, i, base);
 		bgfx::UniformHandle bgfx_uh;
 		bgfx::UniformHandle bgfx_uh;
 		bgfx_uh.idx = uh->uniform_handle;
 		bgfx_uh.idx = uh->uniform_handle;
-		bgfx::destroyUniform(bgfx_uh);
+		bgfx::destroy(bgfx_uh);
 	}
 	}
 }
 }
 
 

+ 5 - 5
src/world/render_world.cpp

@@ -50,11 +50,11 @@ RenderWorld::~RenderWorld()
 {
 {
 	_unit_manager->unregister_destroy_function(this);
 	_unit_manager->unregister_destroy_function(this);
 
 
-	bgfx::destroyUniform(_u_light_intensity);
-	bgfx::destroyUniform(_u_light_range);
-	bgfx::destroyUniform(_u_light_color);
-	bgfx::destroyUniform(_u_light_direction);
-	bgfx::destroyUniform(_u_light_position);
+	bgfx::destroy(_u_light_intensity);
+	bgfx::destroy(_u_light_range);
+	bgfx::destroy(_u_light_color);
+	bgfx::destroy(_u_light_direction);
+	bgfx::destroy(_u_light_position);
 
 
 	_mesh_manager.destroy();
 	_mesh_manager.destroy();
 	_sprite_manager.destroy();
 	_sprite_manager.destroy();

+ 1 - 1
src/world/shader_manager.cpp

@@ -90,7 +90,7 @@ void ShaderManager::offline(StringId64 id, ResourceManager& rm)
 		sd.program = BGFX_INVALID_HANDLE;
 		sd.program = BGFX_INVALID_HANDLE;
 		sd = hash_map::get(_shader_map, data.name, sd);
 		sd = hash_map::get(_shader_map, data.name, sd);
 
 
-		bgfx::destroyProgram(sd.program);
+		bgfx::destroy(sd.program);
 
 
 		hash_map::remove(_shader_map, data.name);
 		hash_map::remove(_shader_map, data.name);
 	}
 	}