Search in sources :

Example 1 with IPointRenderable

use of gaiasky.render.IPointRenderable in project gaiasky by langurmonkey.

the class PointRenderSystem method renderStud.

@Override
public void renderStud(Array<IRenderable> renderables, ICamera camera, double t) {
    this.camera = camera;
    ExtShaderProgram shaderProgram = getShaderProgram();
    shaderProgram.begin();
    shaderProgram.setUniformMatrix("u_projView", camera.getCamera().combined);
    addEffectsUniforms(shaderProgram, camera);
    renderables.forEach(r -> {
        IPointRenderable renderable = (IPointRenderable) r;
        renderable.render(this, camera, getAlpha(renderable));
        renderable.blend();
        renderable.depth();
        for (int md = 0; md < meshIdx; md++) {
            MeshData meshd = meshes.get(md);
            meshd.mesh.setVertices(meshd.vertices, 0, meshd.vertexIdx);
            meshd.mesh.render(shaderProgram, glType);
            meshd.clear();
        }
    });
    shaderProgram.end();
    // Reset indices
    meshIdx = 1;
    curr = meshes.get(0);
}
Also used : ExtShaderProgram(gaiasky.util.gdx.shader.ExtShaderProgram) IPointRenderable(gaiasky.render.IPointRenderable)

Aggregations

IPointRenderable (gaiasky.render.IPointRenderable)1 ExtShaderProgram (gaiasky.util.gdx.shader.ExtShaderProgram)1