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

Line disappers if you draw it for too long #26

Closed
nm17 opened this issue Jun 12, 2021 · 3 comments
Closed

Line disappers if you draw it for too long #26

nm17 opened this issue Jun 12, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@nm17
Copy link
Contributor

nm17 commented Jun 12, 2021

Lorien version: 78c06a8 or release v0.2.0

OS/device including version:
KDE neon Testing Edition 20.04
Nvidia driver: 460.80

Issue description:
If you draw for long enough with pressed left mouse button the line you drew disappears.

Demonstration here: https://www.youtube.com/watch?v=LDZc1JiYunI

--- Debugging process started ---
Godot Engine v3.3.2.stable.official - https://godotengine.org
OpenGL ES 2.0 Renderer: GeForce GTX 1650/PCIe/SSE2
OpenGL ES Batching: ON
 
Loading i18n file: res://Assets/I18n/en.txt
Loading i18n file: res://Assets/I18n/it.txt
Loading i18n file: res://Assets/I18n/es.txt
Loading i18n file: res://Assets/I18n/de.txt
Stroke points: 1571 (517 removed by optimizer)
Stroke points: 1592 (739 removed by optimizer)
Stroke points: 19 (7 removed by optimizer)
Stroke points: 17 (8 removed by optimizer)
Stroke points: 1237 (918 removed by optimizer)

Steps to reproduce:
Just draw a line for long enough and it will disappear

@nm17 nm17 added the bug Something isn't working label Jun 12, 2021
@nm17
Copy link
Contributor Author

nm17 commented Jun 12, 2021

Found the cause for this bug:

W 0:00:12.398   _prefill_polygon: poly has too many indices to draw, increase batch buffer size
  <C++ Source>  ./drivers/gles_common/rasterizer_canvas_batcher.h:1628 @ _prefill_polygon()

Increasing the batch buffer in project settings seems to solve this problem somewhat, but it still deletes very large lines.

@mbrlabs
Copy link
Owner

mbrlabs commented Jun 12, 2021

Thanks for the report. Yeah, that's a Godot limitation. There is an easy fix though: if a certain length is reached (say 1000 points per brush stroke) we can finish the current stroke and immediately start a new one, so it looks like one continous line.

@mbrlabs
Copy link
Owner

mbrlabs commented Jun 13, 2021

Fixed in bdf7eca

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants