-
Notifications
You must be signed in to change notification settings - Fork 14
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
base: develop
Are you sure you want to change the base?
Conversation
…eShape, TODO recreate buffer if color or lineWidth changes in standard shapes, preallocate pickmode id
…nges to shapes, rename StaticPath to LinesBatch
…lity in PathPolygonsLabelsActivity
…r highways in PathPolygonsLabesActivity
…y, override doRender method for LinesBatch
…ble and batch them as needed
…when Path became batchable after some changes
…setColor to offset pickColor inside lineSet (not working as expected, proper lines not selected)
…o batches in RenderableLayer
… been changed, added texturing to lines batch
.../src/commonMain/kotlin/earth/worldwind/shape/milstd2525/AbstractMilStd2525TacticalGraphic.kt
Outdated
Show resolved
Hide resolved
.../src/commonMain/kotlin/earth/worldwind/shape/milstd2525/AbstractMilStd2525TacticalGraphic.kt
Outdated
Show resolved
Hide resolved
worldwind/src/commonMain/kotlin/earth/worldwind/layer/RenderableLayer.kt
Outdated
Show resolved
Hide resolved
worldwind/src/commonMain/kotlin/earth/worldwind/layer/RenderableLayer.kt
Outdated
Show resolved
Hide resolved
worldwind/src/commonMain/kotlin/earth/worldwind/layer/RenderableLayer.kt
Outdated
Show resolved
Hide resolved
worldwind/src/commonMain/kotlin/earth/worldwind/layer/RenderableLayer.kt
Outdated
Show resolved
Hide resolved
worldwind/src/commonMain/kotlin/earth/worldwind/render/VertexState.kt
Outdated
Show resolved
Hide resolved
@@ -9,31 +9,46 @@ import earth.worldwind.util.kgl.KglUniformLocation | |||
open class TriangleShaderProgram : AbstractShaderProgram() { | |||
override var programSources = arrayOf( | |||
""" | |||
#version 300 es |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this 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.
5811728
to
cfa9e03
Compare
No description provided.