Lecture 15: Per frame updates

Computer graphics in Game development

Ivan Belyavtsev

20.02.2021

Window procedure events

  • WM_KEYDOWN - each time when user press a key
  • WM_KEYUP - each time when user release a key
  • WM_PAINT - each time when the windows is redrawing [1]

On update method

  • Adjust the world variables according to modifiers
  • Recalculate projection matrices
  • Measure performance [1]

Order of linear transformation

  • Linalg.h: mul(mat<T,M,N> a, vec<T,N> b)
  • DirectXMath: XMVECTOR XM_CALLCONV XMVector4Transform(FXMVECTOR V, FXMMATRIX M) [2]

On key down

  • Parse the keystroke
  • Adjust the modifiers [1]

On key up

  • Parse the keystroke
  • Reset the modifiers [1]

Lab: Per frame updates

Homework

  1. Implement DX12 lab
  2. Commit&push your implementation
  3. Make sure that the teacher has access to your repo (djbelyak)
  4. Point the repo’s URL and tag (branch, or commit hash) in Moodle

Due date: Friday, 5 March 2021, 12:00 AM

References

1.
Satran M., Jacobs M. Get started with Win32 and c++ [Electronic resource]. 2018. URL: https://docs.microsoft.com/en-us/windows/win32/learnwin32/learn-to-program-for-windows.
2.
DirectXMath programming guide [Electronic resource]. 2018. URL: https://docs.microsoft.com/en-us/windows/win32/dxmath/ovw-xnamath-progguide.
// reveal.js plugins