Package cc.plural.ecs.renderer

Examples of cc.plural.ecs.renderer.Shader


        }
        String rendererDump = renderer.toString();
        if (logger.isInfoEnabled()) {
            logger.info(rendererDump);
        }
        Shader shader = renderer.getDefaultShader();
        String shaderDump = shader.getState();
        if (logger.isInfoEnabled()) {
            logger.info(shaderDump);
        }
       
        float left = 0;
View Full Code Here


            }
            if (gameObject.spatial == null) {
                continue;
            }

            Shader shader = getDefaultShader();
            Texture texture = gameObject.geometry.texture;
            Mesh mesh = gameObject.geometry.mesh;

            Transformation transformation = gameObject.getWorld();
            transformation.load(modelMatrix);

            texture.enable();
            {
                shader.enable();
                {
                    shader.setUniform(shader.getUniformLocation("projectionMatrix"), projectionMatrix);
                    shader.setUniform(shader.getUniformLocation("viewMatrix"), viewMatrix);
                    shader.setUniform(shader.getUniformLocation("modelMatrix"), modelMatrix);

                    mesh.enable(shader);
                    GL11.glDrawElements(GL11.GL_TRIANGLES, mesh.getIndicesCount(), GL11.GL_UNSIGNED_SHORT, 0);
                    mesh.disable(shader);
                }
                shader.disable();
            }
            texture.disable();
        }

        batch.clear();
View Full Code Here

TOP

Related Classes of cc.plural.ecs.renderer.Shader

Copyright © 2018 www.massapicom. 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.