Exemplo n.º 1
0
        public void DrawLetter(Entity ent)
        {
            WorldViewProj wvp = new WorldViewProj()
            {
                World      = transform_.localmatrix_,
                View       = Matrix.Identity,
                Projection = Matrix.Identity
            };

            transform_.SetWVP(wvp);
            //ent.modelrenderer_.Draw();
        }
Exemplo n.º 2
0
        private void InitializeConstantBuffer()
        {
            worldviewproj_ = new WorldViewProj()
            {
                World          = worldmatrix_,
                WorldInverse   = new Matrix(),
                View           = new Matrix(),
                Projection     = new Matrix(),
                CameraPosition = new Vector3()
            };

            // Le constant buffer des transformations devra toujours se trouver à l'index 0 pour éviter les blagues
            constantbuffer_ = new CBuffer <WorldViewProj>(0, worldviewproj_);
        }
Exemplo n.º 3
0
 public void SetWVP(WorldViewProj wvp)
 {
     constantbuffer_.UpdateStruct(wvp);
 }