public void DrawLetter(Entity ent) { WorldViewProj wvp = new WorldViewProj() { World = transform_.localmatrix_, View = Matrix.Identity, Projection = Matrix.Identity }; transform_.SetWVP(wvp); //ent.modelrenderer_.Draw(); }
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_); }
public void SetWVP(WorldViewProj wvp) { constantbuffer_.UpdateStruct(wvp); }