Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

加载新字符集导致字体旧纹理被丢弃,TextMesh内纹理对象失效 #93

Open
mouse0w0 opened this issue Oct 28, 2021 · 0 comments
Assignees
Labels
type: bug Something isn't working

Comments

@mouse0w0
Copy link
Member

https://github.com/UnknownDomainGames/PanguEngine/blob/79d0ee15a8fcb22dd12c3e11cb8a2075f8ec724b/graphics/src/main/java/engine/graphics/font/TextMesh.java#L8-L13

TextMesh类中会存储文本网格的纹理。

https://github.com/UnknownDomainGames/PanguEngine/blob/79d0ee15a8fcb22dd12c3e11cb8a2075f8ec724b/graphics/src/main/java/engine/graphics/lwjgl/font/FontPlaneTexture.java#L72-L77

FontPlaneTexture#dirty为true时(例如调用FontPlaneTexture#putBlock),会在下一渲染循环中调用FontPlaneTexture#bakeTexture,该方法将会dispose字体纹理对象,致使所引用该纹理的所有TextMesh对象无法正常渲染。

@mouse0w0 mouse0w0 added the type: bug Something isn't working label Oct 28, 2021
@mouse0w0 mouse0w0 self-assigned this Nov 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant