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 1 commit into
base: develop
Choose a base branch
from

Conversation

IOTRFAFH
Copy link
Contributor

No description provided.

@@ -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

@EMaksymenko EMaksymenko 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.

@EMaksymenko EMaksymenko force-pushed the develop branch 5 times, most recently from 5811728 to cfa9e03 Compare November 21, 2024 19:45
@IOTRFAFH IOTRFAFH force-pushed the lines_batching_attempt branch 3 times, most recently from dde82c9 to f2e153a Compare December 1, 2024 10:57
@EMaksymenko EMaksymenko force-pushed the develop branch 2 times, most recently from 4bfbf07 to eeaba99 Compare December 28, 2024 23:14
@IOTRFAFH IOTRFAFH force-pushed the lines_batching_attempt branch 2 times, most recently from 0019b76 to 90542bd Compare January 16, 2025 08:48
@IOTRFAFH IOTRFAFH force-pushed the lines_batching_attempt branch from 90542bd to a8af57c Compare January 16, 2025 09:18
@EMaksymenko EMaksymenko force-pushed the develop branch 5 times, most recently from f95141a to e1868c1 Compare January 18, 2025 14:59
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