From e9bb7aaae4a2c27e833330c681da46016338d820 Mon Sep 17 00:00:00 2001 From: Emux Date: Fri, 9 Dec 2016 20:11:50 +0200 Subject: [PATCH] Render buckets improvements --- .../oscim/renderer/bucket/CircleBucket.java | 5 +++-- .../oscim/renderer/bucket/HairLineBucket.java | 20 ++++++++++++++++++- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/vtm/src/org/oscim/renderer/bucket/CircleBucket.java b/vtm/src/org/oscim/renderer/bucket/CircleBucket.java index 27061e3f..49190e98 100644 --- a/vtm/src/org/oscim/renderer/bucket/CircleBucket.java +++ b/vtm/src/org/oscim/renderer/bucket/CircleBucket.java @@ -128,9 +128,10 @@ public class CircleBucket extends RenderBucket { for (; b != null && b.type == CIRCLE; b = b.next) { CircleBucket cb = (CircleBucket) b; + CircleStyle circle = cb.circle.current(); - GLUtils.setColor(s.uColor, cb.circle.fillColor, 1); - gl.uniform1f(s.uScale, cb.circle.radius); + GLUtils.setColor(s.uColor, circle.fillColor, 1); + gl.uniform1f(s.uScale, circle.radius); gl.vertexAttribPointer(s.aPos, 2, GL.SHORT, false, 0, cb.vertexOffset); diff --git a/vtm/src/org/oscim/renderer/bucket/HairLineBucket.java b/vtm/src/org/oscim/renderer/bucket/HairLineBucket.java index 840d7a46..cfc7d04b 100644 --- a/vtm/src/org/oscim/renderer/bucket/HairLineBucket.java +++ b/vtm/src/org/oscim/renderer/bucket/HairLineBucket.java @@ -1,3 +1,20 @@ +/* + * Copyright 2013 Hannes Janetzek + * Copyright 2016 devemux86 + * + * This file is part of the OpenScienceMap project (http://www.opensciencemap.org). + * + * This program is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU Lesser General License for more details. + * + * You should have received a copy of the GNU Lesser General License along with + * this program. If not, see . + */ package org.oscim.renderer.bucket; import org.oscim.backend.GL; @@ -120,8 +137,9 @@ public class HairLineBucket extends RenderBucket { for (; l != null && l.type == HAIRLINE; l = l.next) { HairLineBucket ll = (HairLineBucket) l; + LineStyle line = ll.line.current(); - GLUtils.setColor(s.uColor, ll.line.color, 1); + GLUtils.setColor(s.uColor, line.color, 1); gl.vertexAttribPointer(s.aPos, 2, GL.SHORT, false, 0, ll.vertexOffset);