*
This commit is contained in:
@@ -1253,6 +1253,9 @@ void VulkanRenderSession::pushStage(EnumRenderStage stage) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
VKCTX->ThreadVertexObj.pushStage(stage);
|
VKCTX->ThreadVertexObj.pushStage(stage);
|
||||||
|
|
||||||
|
if(stage == EnumRenderStage::Shutdown)
|
||||||
|
VKCTX->ThreadVertexObj.join();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<VoxelVertexPoint> VulkanRenderSession::generateMeshForVoxelChunks(const std::vector<VoxelCube> cubes) {
|
std::vector<VoxelVertexPoint> VulkanRenderSession::generateMeshForVoxelChunks(const std::vector<VoxelCube> cubes) {
|
||||||
|
|||||||
@@ -234,6 +234,10 @@ class VulkanRenderSession : public IRenderSession, public IVulkanDependent {
|
|||||||
return std::pair{vertexVoxels, vertexNodes};
|
return std::pair{vertexVoxels, vertexNodes};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void join() {
|
||||||
|
Thread.join();
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Буферы для хранения вершин
|
// Буферы для хранения вершин
|
||||||
VertexPool<VoxelVertexPoint> VertexPool_Voxels;
|
VertexPool<VoxelVertexPoint> VertexPool_Voxels;
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <glm/geometric.hpp>
|
#include <glm/geometric.hpp>
|
||||||
|
#include <iostream>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
|||||||
@@ -764,10 +764,10 @@ void RemoteClient::NetworkAndResource_t::decrementAssets(ResUses_t::RefAssets_t&
|
|||||||
}
|
}
|
||||||
|
|
||||||
void RemoteClient::onUpdate() {
|
void RemoteClient::onUpdate() {
|
||||||
Pos::Object pos = CameraPos;
|
Pos::Object cameraPos = CameraPos;
|
||||||
|
|
||||||
Pos::GlobalRegion r1 = LastPos >> 12 >> 4 >> 2;
|
Pos::GlobalRegion r1 = LastPos >> 12 >> 4 >> 2;
|
||||||
Pos::GlobalRegion r2 = pos >> 12 >> 4 >> 2;
|
Pos::GlobalRegion r2 = cameraPos >> 12 >> 4 >> 2;
|
||||||
if(r1 != r2) {
|
if(r1 != r2) {
|
||||||
CrossedRegion = true;
|
CrossedRegion = true;
|
||||||
}
|
}
|
||||||
@@ -781,7 +781,7 @@ void RemoteClient::onUpdate() {
|
|||||||
glm::quat q = CameraQuat.toQuat();
|
glm::quat q = CameraQuat.toQuat();
|
||||||
glm::vec4 v = glm::mat4(q)*glm::vec4(0, 0, -6, 1);
|
glm::vec4 v = glm::mat4(q)*glm::vec4(0, 0, -6, 1);
|
||||||
Pos::GlobalNode pos = (Pos::GlobalNode) (glm::vec3) v;
|
Pos::GlobalNode pos = (Pos::GlobalNode) (glm::vec3) v;
|
||||||
pos += pos >> Pos::Object_t::BS_Bit;
|
pos += cameraPos >> Pos::Object_t::BS_Bit;
|
||||||
|
|
||||||
if(action == 0) {
|
if(action == 0) {
|
||||||
// Break
|
// Break
|
||||||
@@ -794,7 +794,7 @@ void RemoteClient::onUpdate() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LastPos = pos;
|
LastPos = cameraPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::tuple<WorldId_t, Pos::Object, uint8_t>> RemoteClient::getViewPoints() {
|
std::vector<std::tuple<WorldId_t, Pos::Object, uint8_t>> RemoteClient::getViewPoints() {
|
||||||
|
|||||||
Reference in New Issue
Block a user