diff options
| author | vimene <vincent.menegaux@gmail.com> | 2026-01-13 02:04:52 +0100 |
|---|---|---|
| committer | vimene <vincent.menegaux@gmail.com> | 2026-01-13 02:04:52 +0100 |
| commit | db41d43345ea73cf7c1bbb29448e52ffb822e3e0 (patch) | |
| tree | 4635d654e301b3f31f8d2626f3bc2c6f2a6e50a8 /src/ctrl | |
| parent | 7f08187a46e30925e4563585fab2c6f92400330a (diff) | |
| download | engine-db41d43345ea73cf7c1bbb29448e52ffb822e3e0.tar.gz | |
added textures for the hardware renderer
- removed "using" directive in .hpp
- reverse order of arguments for quaternion rotation, i.e. q.rot(v)
instead of v.rot(q), where q is a quaterinon and v a vector
- pass the inverse of the view matrix to render_and_present_frame, to
allow light calculation in shaders (we used to just pass the matrix of
the quaternion of the transformation, i.e. discard scaling and
translations)
- added another mesh and texture (viking_room) for testing purposes
- added transparent background option
- added Quaternion::look_towards(), which is the equivalent of
Matrix4::look_at() but only for rotations
- various improvement to .obj parsing
- load texture coordinates from .obj file
- merged duplicate vertices in Mesh::linearize_indices()
Diffstat (limited to 'src/ctrl')
| -rw-r--r-- | src/ctrl/keyboard.hpp | 2 | ||||
| -rw-r--r-- | src/ctrl/mouse.hpp | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/src/ctrl/keyboard.hpp b/src/ctrl/keyboard.hpp index f7bdf3d..dc8e259 100644 --- a/src/ctrl/keyboard.hpp +++ b/src/ctrl/keyboard.hpp @@ -4,8 +4,6 @@ #include <cstdint> #include "math/vector.hpp" -using engine::math::Vector2; - namespace engine::controllers { enum class KeyboardKey { diff --git a/src/ctrl/mouse.hpp b/src/ctrl/mouse.hpp index 5c7af80..3b45b4d 100644 --- a/src/ctrl/mouse.hpp +++ b/src/ctrl/mouse.hpp @@ -10,7 +10,7 @@ class Mouse { public: constexpr Mouse(MouseMotionCallback mouse_motion_cb) : mouse_motion_cb{mouse_motion_cb} {} - void mouse_motion_event(Vector2 rel) const & { + void mouse_motion_event(engine::math::Vector2 rel) const & { mouse_motion_cb(rel); } |
