Package org.terasology.rendering.assets.mesh

Examples of org.terasology.rendering.assets.mesh.Mesh.render()


        float scale = 0.75f * (float) Math.pow(textureScale, 0.5);
        glScalef(scale, scale, scale);

        if (iconTexture instanceof Asset<?>) {
            Mesh itemMesh = IconMeshFactory.getIconMesh(iconTexture);
            itemMesh.render();
        }

        glPopMatrix();

        shader.deactivateFeature(ShaderProgramFeature.FEATURE_USE_MATRIX_STACK);
View Full Code Here


        }

        textureMat.setTexture("texture", texture.getTexture());
        textureMat.setFloat4("color", color.rf(), color.gf(), color.bf(), color.af() * alpha);
        textureMat.bindTextures();
        mesh.render();
    }

    public void drawText(String text, Font font, HorizontalAlign hAlign, VerticalAlign vAlign, Rect2i absoluteRegion,
                         Color color, Color shadowColor, float alpha) {
        TextCacheKey key = new TextCacheKey(text, font, absoluteRegion.width(), hAlign, color, shadowColor);
View Full Code Here

        textureMat.setFloat2("texSize", uw * textureArea.width(), uh * textureArea.height());

        textureMat.setTexture("texture", texture.getTexture());
        textureMat.setFloat4("color", 1, 1, 1, alpha);
        textureMat.bindTextures();
        mesh.render();
    }

    private void addRectPoly(MeshBuilder builder, float minX, float minY, float maxX, float maxY, float texMinX, float texMinY, float texMaxX, float texMaxY) {
        builder.addPoly(new Vector3f(minX, minY, 0), new Vector3f(maxX, minY, 0), new Vector3f(maxX, maxY, 0), new Vector3f(minX, maxY, 0));
        builder.addTexCoord(texMinX, texMinY);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.