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

[#33] Fix limitation of 3D path length #39

Merged
merged 3 commits into from
Sep 27, 2023

Conversation

GuzulFromUkraine
Copy link
Collaborator

The main reason the Path has limited number of points to be drawn is that vertexBuffer indices are UNSIGNED_SHORT type and thus unique index values are limited due to "Max Short" value.

Add IntBufferObject, make Path use it as drawState.elementBuffer. Change interiorElements, outlineElements and verticalElements type to Int.

modified:   worldwind/src/androidMain/kotlin/earth/worldwind/util/kgl/AndroidKgl.kt
modified:   worldwind/src/commonMain/kotlin/earth/worldwind/draw/DrawShapeState.kt
new file:   worldwind/src/commonMain/kotlin/earth/worldwind/render/buffer/IntBufferObject.kt
modified:   worldwind/src/commonMain/kotlin/earth/worldwind/shape/Path.kt
modified:   worldwind/src/commonMain/kotlin/earth/worldwind/util/kgl/Kgl.kt

The main reason the Path has limited number of points to be drawn is
that vertexBuffer indices are UNSIGNED_SHORT type and thus
unique index values are limited due to "Max Short" value.

Add IntBufferObject, make Path use it as drawState.elementBuffer.
Change interiorElements, outlineElements and verticalElements type to
Int.

	modified:   worldwind/src/androidMain/kotlin/earth/worldwind/util/kgl/AndroidKgl.kt
	modified:   worldwind/src/commonMain/kotlin/earth/worldwind/draw/DrawShapeState.kt
	new file:   worldwind/src/commonMain/kotlin/earth/worldwind/render/buffer/IntBufferObject.kt
	modified:   worldwind/src/commonMain/kotlin/earth/worldwind/shape/Path.kt
	modified:   worldwind/src/commonMain/kotlin/earth/worldwind/util/kgl/Kgl.kt
PJHogan
PJHogan previously approved these changes Sep 25, 2023
Add basic `bufferData` implementation to AnddroidKgl, JoglKgl, LwjglKgl
and WebKgl.
	modified:   worldwind/src/commonMain/kotlin/earth/worldwind/render/buffer/FloatBufferObject.kt
	modified:   worldwind/src/commonMain/kotlin/earth/worldwind/render/buffer/IntBufferObject.kt
	modified:   worldwind/src/commonMain/kotlin/earth/worldwind/render/buffer/ShortBufferObject.kt
	modified:   worldwind/src/commonMain/kotlin/earth/worldwind/shape/Polygon.kt
	modified:   worldwind/src/jsMain/kotlin/earth/worldwind/util/kgl/WebKgl.kt
@PJHogan PJHogan merged commit 70386d7 into develop Sep 27, 2023
1 check passed
Copy link
Member

@PJHogan PJHogan left a comment

Choose a reason for hiding this comment

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

Nice work!!!

@ComBatVision ComBatVision deleted the fix/limitation-of-path-length branch September 28, 2023 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants