public class MapRenderer
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static float |
COORD_SCALE
scale factor used for short vertices
|
static long |
frametime |
static int |
MAX_INDICES
Number of Indices that can be rendered with bindQuadIndicesVBO()
|
static int |
MAX_QUADS
Number of Quads that can be rendered with bindQuadIndicesVBO()
|
| Constructor and Description |
|---|
MapRenderer(Map map) |
| Modifier and Type | Method and Description |
|---|---|
static void |
animate()
Trigger next redraw from GL-Thread.
|
static void |
bindQuadIndicesVBO()
Bind indices for rendering up to MAX_QUADS (512),
ie.
|
static void |
bindQuadVertexVBO(int location)
Bind VBO for a simple quad.
|
static java.nio.FloatBuffer |
getFloatBuffer(int size) |
static java.nio.IntBuffer |
getIntBuffer(int size) |
static java.nio.ShortBuffer |
getShortBuffer(int size) |
void |
onDrawFrame() |
void |
onSurfaceChanged(int width,
int height) |
void |
onSurfaceCreated() |
static void |
setBackgroundColor(int color) |
void |
setViewPortScale(float scale)
Set the scale value for map viewport.
|
public static float COORD_SCALE
public static final int MAX_QUADS
public static final int MAX_INDICES
public static long frametime
public MapRenderer(Map map)
public static void setBackgroundColor(int color)
public void setViewPortScale(float scale)
public void onDrawFrame()
public void onSurfaceChanged(int width,
int height)
public void onSurfaceCreated()
public static void bindQuadVertexVBO(int location)
public static void bindQuadIndicesVBO()
public static void animate()
public static java.nio.FloatBuffer getFloatBuffer(int size)
public static java.nio.ShortBuffer getShortBuffer(int size)
public static java.nio.IntBuffer getIntBuffer(int size)