设备上跑通 人脸检测和 线条绘制
This commit is contained in:
+12
-2
@@ -24,6 +24,14 @@ void ReceiveFacePoint(float* pos, int pointCount, int width, int height)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void TextureLoadProcessWithVulkan(uint8_t* data, int width, int height, int rowStride, size_t dataSize)
|
||||
{
|
||||
Texture& tex_bg = FaceApp::Get()->tex_bg;
|
||||
FaceApp::Get()->processWithVulkan(data, width, height, rowStride, dataSize, tex_bg, false);
|
||||
}
|
||||
|
||||
bool FaceApp::LoadOBJ(const std::string& filename,
|
||||
std::vector<TextureLoadingVertexStructure>& vertices,
|
||||
std::vector<uint32_t>& indices) {
|
||||
@@ -477,6 +485,8 @@ void FaceApp::setup_descriptor_set()
|
||||
|
||||
void FaceApp::render(VkCommandBuffer commandBuffer)
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(mtx);
|
||||
std::unique_lock<std::mutex> lock_point(mtx_point);
|
||||
//Application::render(commandBuffer);
|
||||
|
||||
vkCmdBindDescriptorSets(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, m_pipelineLayout_bg, 0, 1, &m_descriptor_set_bg, 0, NULL);
|
||||
@@ -539,8 +549,8 @@ void FaceApp::initVulkan()
|
||||
Application::initVulkan();
|
||||
createVmaAllocator();
|
||||
LoadOBJ("face_picture_3dmax.obj", obj_vertices, obj_indices);
|
||||
loadTexture("demo0.png", tex_demo0);
|
||||
loadTexture("out.png", tex_bg);
|
||||
loadTexture("demo0.png", tex_demo0, true);
|
||||
loadTexture("out.png", tex_bg, false);
|
||||
createVertexBuffer();
|
||||
createUniformBuffer();
|
||||
setup_descriptor_pool();
|
||||
|
||||
Reference in New Issue
Block a user