Esempio n. 1
0
        public void updateUniforms(ShaderProgram shaderProgram)
        {
            worldMatrix.Set(shaderProgram);

            GL.ActiveTexture(TextureUnit.Texture0);
            GL.BindTexture(TextureTarget.Texture2D, MeshMaterial.textureGLIndex);

            GL.Uniform4(ColorDataIndex, DiffuseColor);
            GL.Uniform1(ScaleDataIndex, Scale);

            Error.checkGLError("Mesh.updateUniforms");
        }
Esempio n. 2
0
        public void drawScene()
        {
            shaderProgram.Use();

            projectionMatrix.Set(shaderProgram);
            viewMatrix.Set(shaderProgram);

            drawMesh(zTriangle);
            drawMesh(origoTriangle);
            drawMesh(xTriangle);

            drawMesh(yTriangle);
            //
            drawMesh(voxelMesh);

            Error.checkGLError("Scene.drawScene");
        }