Skip to content

Commit

Permalink
编辑器模式下物体缩放轴的vertex_data_size计算中多加了8,有一个多余的白色方块
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenLoki authored and hyv1001 committed Sep 25, 2023
1 parent f7a2751 commit 89f1ddd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engine/source/editor/source/axis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ namespace Piccolo
uint32_t stride = sizeof(MeshVertexDataDefinition);

// vertex
size_t vertex_data_size = ((2 * segments + 8) * 3 + 8) * stride;
size_t vertex_data_size = ((2 * segments + 8) * 3) * stride;
m_mesh_data.m_static_mesh_data.m_vertex_buffer = std::make_shared<BufferData>(vertex_data_size);
uint8_t* vertex_data = static_cast<uint8_t*>(m_mesh_data.m_static_mesh_data.m_vertex_buffer->m_data);

Expand Down

4 comments on commit 89f1ddd

@stanhome
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这次提交导致引擎启动奔溃
Critical error detected c0000374
A breakpoint instruction (__debugbreak() statement or a similar call) was executed in PiccoloEditor.exe.

@kwbm
Copy link
Contributor

@kwbm kwbm commented on 89f1ddd Oct 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这次提交确实导致了崩溃,缩放轴的vertex_data_size计算应该没有多算,你遇到的多余白色方块是什么具体问题表现呢?可以使用renderdoc截帧分析一下

@ChenLoki
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个问题我在Mac和windows上都做了测试,mac上可以正常运行,windows上会崩溃。mac上的截图如下,在+8的情况下,scale轴的中心处会有一个白色的方块
截屏2024-01-16 16 33 19
截屏2024-01-16 16 32 36

@kwbm
Copy link
Contributor

@kwbm kwbm commented on 89f1ddd Jan 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

手边没有mac环境,方便的话可以使用renderdoc抓帧分析一下,具体是在哪一步绘制的时候出现的?是mesh的vertex_data还是索引的数据出了问题?
renderdoc release页面未提供mac发行版本,不过可以自己编译(https://github.com/baldurk/renderdoc/blob/v1.x/docs/CONTRIBUTING/Compiling.md)

Please sign in to comment.