修改了

This commit is contained in:
xsl
2025-10-23 21:16:10 +08:00
parent 2876599568
commit b73e94b7bf
11 changed files with 24 additions and 29 deletions
+4
View File
@@ -737,6 +737,10 @@ void Application::createTexture(VkDevice device, VkPhysicalDevice physicalDevice
void Application::processWithVulkan(uint8_t* data, int width, int height, int rowStride, size_t dataSize, Texture& out_texture, bool srgb)
{
if(!isInited())
{
return;
}
std::unique_lock<std::mutex> lock(mtx);
if (out_texture.image == VK_NULL_HANDLE)
{
+9 -4
View File
@@ -512,13 +512,13 @@ void FaceApp::render(VkCommandBuffer commandBuffer)
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);
//vkCmdBindPipeline(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, m_graphicsPipeline_bg);
vkCmdBindDescriptorSets(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, m_pipelineLayout_bg, 0, 1, &m_descriptor_set_bg, 0, NULL);
vkCmdBindPipeline(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, m_graphicsPipeline_bg);
//vkCmdPushConstants(commandBuffer, m_pipelineLayout_bg, VK_SHADER_STAGE_VERTEX_BIT, 0, sizeof(float), &myFloatValue);
vkCmdPushConstants(commandBuffer, m_pipelineLayout_bg, VK_SHADER_STAGE_VERTEX_BIT, 0, sizeof(float), &myFloatValue);
//vkCmdDraw(commandBuffer, 6, 1, 0, 0);
vkCmdDraw(commandBuffer, 6, 1, 0, 0);
vkCmdBindDescriptorSets(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, m_pipelineLayout, 0, 1, &m_descriptor_set, 0, NULL);
@@ -674,6 +674,11 @@ void FaceApp::uploadVertexData() {
void FaceApp::update_face_vertex_buffer(float* pos, int pointCount)
{
if(!isInited())
{
return;
}
std::lock_guard<std::mutex> lock(mtx_point);
last_update_time = getCurrentTimeMillis();