From db41d43345ea73cf7c1bbb29448e52ffb822e3e0 Mon Sep 17 00:00:00 2001 From: vimene Date: Tue, 13 Jan 2026 02:04:52 +0100 Subject: 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() --- src/fb/chfb.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/fb/chfb.hpp') diff --git a/src/fb/chfb.hpp b/src/fb/chfb.hpp index 7f6857b..1748abf 100644 --- a/src/fb/chfb.hpp +++ b/src/fb/chfb.hpp @@ -7,14 +7,13 @@ namespace engine::fb { -using engine::math::Vector3, engine::o3d::VertexData; - class CharacterFrameBuffer { public: CharacterFrameBuffer(unsigned int w, unsigned int h); void resize(unsigned int w, unsigned int h); void clear(); - void draw_point(int x, int y, const Vector3& loc, const VertexData& vd, const Vector3& normal); + void draw_point(int x, int y, const engine::math::Vector3& loc, + const engine::math::Vector3& normal, const engine::math::Vector2& uv, const engine::o3d::VertexData& vd); constexpr unsigned int width() const & { return w; -- cgit v1.2.3