예제 #1
0
 public EntityRenderer(StaticShader shader, Matrix4 projectionMatrix)
 {
     this.shader = shader;
     shader.Start();
     shader.LoadProjectionMatrix(projectionMatrix);
     shader.Stop();
 }
        public Renderer(int w, int h, StaticShader shader)
        {
            Width  = w;
            Height = h;

            CreateProjectionMatrix();
            shader.Start();
            shader.LoadProjectionMatrix(projectionMatrix);
            shader.Stop();
        }
예제 #3
0
 public Renderer(StaticShader shader)
 {
     projectionMatrix = Matrix4.CreatePerspectiveFieldOfView(
         (float)((Math.PI / 180) * 70f),
         1280f / 720f,
         0.1f,
         1000f);
     shader.Use();
     shader.LoadProjectionMatrix(ref projectionMatrix);
     shader.UnUse();
 }