예제 #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");
        }
예제 #2
0
파일: Scene.cs 프로젝트: polytronicgr/Demo
        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");
        }