33#include "NDEVRGraphics/Headers/DLLInfo.h"
34#include "NDEVRGraphics/Headers/GraphicsUpdateArguments.h"
35#include "NDEVRGraphics/Headers/GraphicsPipeline.h"
36#include "Design/Headers/WindowInstance.h"
37#include "Base/Headers/Time.h"
42 class ModelPipelineManager;
66 void render(
bool wait_until_needed,
bool force_render =
true);
89 return m_args.frame_time;
93 m_render_pipeline->cleanup();
153 bool _render(
bool wait_until_needed,
bool force_render);
162 std::function<void()> m_post_render_function;
164 bool m_request_redraw;
165 volatile uint08 m_pause_time;
Provides a constant, unmodifiable pointer that has shared ownership of a dynamically allocated object...
A core class where all Design Objects including models, materials, and geometries are stored.
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Options that are used for performing an update on a Graphics Engine call.
Responsible for updating resources or layouts of data in-between calls to render.
A root class that stores an an array of pixel data that can be displayed as an Image.
A light-weight wrapper that will be a no-op if there is not a valid log reference,...
A core class that represents a node on model hierarchy.
LogPtr log()
Returns the log pointer.
void setOverrideMaterial(UUID material)
Sets a material override for all rendered objects.
void grabImage(Image *image)
Grabs the current frame into an image immediately.
virtual ~Renderer()
Destructor.
void updateArgs(bool force_render)
Updates the render arguments from current state.
void setPostRenderFunction(const std::function< void()> &function)
Sets a function called after each render completes.
uint04 multisample() const
Returns the current multisample count.
fltp08 getFPS() const
Returns the target frames per second.
void run()
Starts the render thread.
DynamicPointer< GraphicsPipeline > pipeline() const
Returns the graphics pipeline.
bool isActive()
Checks whether this renderer is active.
void setActive(bool is_active)
Sets whether this renderer is active.
GraphicsUpdateArguments & getArguments()
Returns the render arguments.
void setFPS(fltp08 fps)
Sets the target frames per second.
Time getFrameStartTime() const
Returns the start time of the current frame.
void render(bool wait_until_needed, bool force_render=true)
Renders a single frame.
void grabImageNextRender(Image *image)
Queues an image grab for the next render.
void ensureLastRenderComplete()
Blocks until the last submitted render is complete.
void setupSurface()
Creates the rendering surface for the window.
GraphicsUpdater * updater() const
Returns the associated graphics updater.
void updatePipeline()
Recreates and updates the rendering pipeline.
void cleanup()
Cleans up all GPU resources.
void setWindowInstance(WindowInstance *window)
Sets the window instance for this renderer.
void renderLoop()
Enters the continuous render loop.
const DynamicPointer< GraphicsDevice > & device() const
Returns the graphics device.
void update()
Performs a single update cycle.
Renderer(const DynamicPointer< GraphicsPipeline > &pipeline, const ConstPointer< Camera > &camera, WindowInstance *instance, LogPtr log)
Constructs a renderer for a given pipeline, camera, and window.
void pause(TimeSpan span)
Pauses rendering for a duration.
void requestRedraw()
Requests a redraw on the next update cycle.
virtual void setCamera(const ConstPointer< Camera > &camera)
Sets the camera to render from.
void init(DesignObjectLookup *lookup)
Initializes the renderer with a design object lookup.
Stores a time span, or difference between two times, with an optional start time.
Represents a timestamp with utilities for manipulation and conversion.
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Creates and manages the resources necessary for converting a DesignObjectLookup into 3D rendered data...
Contains core information about a Viewport.
The primary namespace for the NDEVR SDK.
uint64_t uint08
-Defines an alias representing an 8 byte, unsigned integer
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
double fltp08
Defines an alias representing an 8 byte floating-point number.