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

Draw call batching for Paths #81

Open
wants to merge 49 commits into
base: develop
Choose a base branch
from

Conversation

IOTRFAFH
Copy link
Contributor

No description provided.

Your Name added 30 commits October 14, 2024 10:28
…eShape, TODO recreate buffer if color or lineWidth changes in standard shapes, preallocate pickmode id
…nges to shapes, rename StaticPath to LinesBatch
…y, override doRender method for LinesBatch
…when Path became batchable after some changes
…setColor to offset pickColor inside lineSet (not working as expected, proper lines not selected)
… been changed, added texturing to lines batch
@@ -9,31 +9,46 @@ import earth.worldwind.util.kgl.KglUniformLocation
open class TriangleShaderProgram : AbstractShaderProgram() {
override var programSources = arrayOf(
"""
#version 300 es
Copy link
Member

Choose a reason for hiding this comment

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

Should we add ES 3.0 declaration in Android manifest also? Or we already have it there?

Copy link
Contributor Author

@IOTRFAFH IOTRFAFH Oct 14, 2024

Choose a reason for hiding this comment

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

just use it for this file. We will need to rewrite all other shaders if this will be added to manifest, probably should be done in separate pr if ever

@@ -44,14 +45,36 @@ abstract class AbstractShape(override var attributes: ShapeAttributes): Abstract
override var highlightAttributes: ShapeAttributes? = null
override var isHighlighted = false
var maximumIntermediatePoints = 10
protected lateinit var activeAttributes: ShapeAttributes
protected var isSurfaceShape = false
lateinit var activeAttributes: ShapeAttributes
Copy link
Member

Choose a reason for hiding this comment

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

Do we still need to have it public?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, still used in PathSet to get attributes

protected var isSurfaceShape = false
lateinit var activeAttributes: ShapeAttributes
protected set
var isSurfaceShape = false
Copy link
Member

Choose a reason for hiding this comment

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

Smae here. Do we still need to hava it public?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, still used in PathSet to get attributes

var lastRequestedFrameIndex = 0L

open fun addToBatch(rc : RenderContext) : Boolean {
return rc.currentLayer is RenderableLayer && allowBatching && !isHighlighted
Copy link
Member

Choose a reason for hiding this comment

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

In case of Graticule it will not b a renderable layer. Can we remove this cast check?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added TODO comment, better to address that in another PR with more testing

Copy link
Member

@ComBatVision ComBatVision left a comment

Choose a reason for hiding this comment

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

Please review my comments.

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