Skip to content

Commit

Permalink
[tz::ren] created new doxygen module name for tz::ren
Browse files Browse the repository at this point in the history
  • Loading branch information
harrand committed Sep 18, 2023
1 parent 85d3bde commit 3d75c94
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,10 @@ add_library(topaz STATIC
# tz::ren
src/tz/ren/animation.cpp
src/tz/ren/animation.hpp
src/tz/ren/api.hpp
src/tz/ren/mesh.cpp
src/tz/ren/mesh.hpp
src/tz/ren/tz_ren.hpp
)

if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
Expand Down
2 changes: 1 addition & 1 deletion src/tz/gl/tz_gl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace tz::gl
/**
* @ingroup tz_cpp
* @defgroup tz_gl2 Graphics Library
* Hardware-accelerated 3D graphics library.
* Low-level 3D graphics library.
*
* Rendering 3D graphics in Topaz is achieved by doing the following:
* - Populate a @ref tz::gl::renderer_info describing how to render what you want.
Expand Down
20 changes: 20 additions & 0 deletions src/tz/ren/api.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#ifndef TOPAZ_REN_API_HPP
#define TOPAZ_REN_API_HPP

namespace tz::ren
{
/**
* @ingroup tz_ren
* Interface for a high-level `tz::ren` renderer class.
*/
class ihigh_level_renderer
{
public:
/**
* Append this renderer to the end of the render-graph, without specifying any dependencies.
*/
virtual void append_to_render_graph() = 0;
};
}

#endif // TOPAZ_REN_API_HPP
5 changes: 3 additions & 2 deletions src/tz/ren/mesh.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#ifndef TOPAZ_REN_MESH_HPP
#define TOPAZ_REN_MESH_HPP
#include "tz/ren/api.hpp"
#include "tz/gl/renderer.hpp"
#include "tz/core/data/vector.hpp"
#include "tz/core/matrix.hpp"
Expand Down Expand Up @@ -85,7 +86,7 @@ namespace tz::ren
* todo: document
* a two-pass (compute gpu command generation => render) mesh renderer. pbr?
*/
class mesh_renderer
class mesh_renderer : public ihigh_level_renderer
{
struct object_tag_t{};
public:
Expand Down Expand Up @@ -123,7 +124,7 @@ namespace tz::ren

void remove_object(object_handle oh);
texture_handle add_texture(tz::vec2ui dimensions, std::span<const std::byte> image_data);
void append_to_render_graph();
virtual void append_to_render_graph() override;

tz::trs get_camera_transform() const;
void set_camera_transform(tz::trs camera_transform);
Expand Down
15 changes: 15 additions & 0 deletions src/tz/ren/tz_ren.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#ifndef TOPAZ_REN_TZ_REN_HPP
#define TOPAZ_REN_TZ_REN_HPP

namespace tz::ren
{
/**
* @ingroup tz_cpp
* @defgroup tz_ren Rendering Library
* High-level 3D rendering library. Built ontop of @ref tz_gl2.
*
* The rendering library is mostly comprised of high-level renderer classes.
*/
}

#endif // TOPAZ_REN_TZ_REN_HPP

0 comments on commit 3d75c94

Please sign in to comment.