Package org.oscim.renderer
Class MapRenderer
java.lang.Object
org.oscim.renderer.MapRenderer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic floatscale factor used for short verticesstatic longstatic final intNumber of Indices that can be rendered with bindQuadIndicesVBO()static final intNumber of Quads that can be rendered with bindQuadIndicesVBO() -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidanimate()Trigger next redraw from GL-Thread.static voidBind indices for rendering up to MAX_QUADS (512), ie.static voidbindQuadVertexVBO(int location) Bind VBO for a simple quad.static FloatBuffergetFloatBuffer(int size) static IntBuffergetIntBuffer(int size) static ShortBuffergetShortBuffer(int size) voidvoidonSurfaceChanged(int width, int height) voidstatic voidsetBackgroundColor(int color) voidsetViewPortScale(float scale) Set the scale value for map viewport.
-
Field Details
-
COORD_SCALE
public static float COORD_SCALEscale factor used for short vertices -
MAX_QUADS
public static final int MAX_QUADSNumber of Quads that can be rendered with bindQuadIndicesVBO()- See Also:
-
MAX_INDICES
public static final int MAX_INDICESNumber of Indices that can be rendered with bindQuadIndicesVBO()- See Also:
-
frametime
public static long frametime
-
-
Constructor Details
-
MapRenderer
-
-
Method Details
-
setBackgroundColor
public static void setBackgroundColor(int color) -
setViewPortScale
public void setViewPortScale(float scale) Set the scale value for map viewport. -
onDrawFrame
public void onDrawFrame() -
onSurfaceChanged
public void onSurfaceChanged(int width, int height) -
onSurfaceCreated
public void onSurfaceCreated() -
bindQuadVertexVBO
public static void bindQuadVertexVBO(int location) Bind VBO for a simple quad. Handy for simple custom RenderLayers Vertices: float[]{ -1, -1, -1, 1, 1, -1, 1, 1 } GL.drawArrays(GL20.TRIANGLE_STRIP, 0, 4); -
bindQuadIndicesVBO
public static void bindQuadIndicesVBO()Bind indices for rendering up to MAX_QUADS (512), ie. MAX_INDICES (512*6) in one draw call. Vertex order is 0-1-2 2-1-3 -
animate
public static void animate()Trigger next redraw from GL-Thread. This should be used to animate LayerRenderers instead of calling Map.render(). -
getFloatBuffer
-
getShortBuffer
-
getIntBuffer
-