Foundation
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Examples::MipGenerationApp Class Reference
Inheritance diagram for Examples::MipGenerationApp:
Foundation::Rendering::RenderApplication Foundation::Native::NativeApplication

Public Member Functions

 ~MipGenerationApp () override
 
void OnDeviceSetup () override
 Actions to take after device specific resources has been set up.
 
void OnRendererSetup () override
 Set up the renderer by creating passes, resources, and other configurations.
 
void OnRendererPostSetup () override
 Action to take after the renderer has been set up.
 
void OnBeforeFrame () override
 Action to take before each frame is executed.
 
- Public Member Functions inherited from Foundation::Rendering::RenderApplication
template<typename Backend , typename... Args>
void Initialize (ApplicationInitDesc const &desc={}, Args &&... args)
 Initialize the application with the specified RHI backend.
 
RHIExtent2D GetFramebufferSize () const
 Retrieve the framebuffer size of the current window.
 
FrameTiming GetTiming () const
 Retrieve the timing information of the last frame.
 
RendererGetRenderer () const
 Retrieve the underlying Renderer instance.
 
RHISwapchainGetSwapchain () const
 Retrieve the current RHISwapchain instance.
 
Native::NativeWindowGetNativeWindow ()
 Retrieve the current NativeWindow instance.
 
AllocatorGetAllocator ()
 Retrieve the allocator used for general application allocations.
 
AllocatorGetRendererAllocator ()
 Retrieve the allocator used for renderer allocations.
 
void RunForever ()
 Start the Render thread and run the application loop indefinitely, until the window is closed or the application is exited.
 
void WaitForFrame ()
 Wait for the render thread to start, or the next frame to be rendered.
 
void ResetRendererOnNextFrame ()
 Reset the renderer on the next frame, calling OnRendererSetup internally.
 
void Shutdown ()
 Flag the application to exit.
 
- Public Member Functions inherited from Foundation::Native::NativeApplication
template<typename T = float>
T GetApplicationTime () const
 Returns a high-resolution time in seconds since the application started.
 
size_t GetApplicationCounter () const
 Returns a high-resolution time in nanoseconds since the application started.
 
 NativeApplication ()
 
virtual ~NativeApplication ()
 

Public Attributes

UniquePtr< TexturePoolmTexturePool
 
TexturePoolHandle mSampleImage {kInvalidTexturePoolHandle}
 
ResourceHandle mRenderedSRV {kInvalidHandle}
 
float mBlur = 1.0f
 
ImTextureID mRenderedImageID {0}
 

Additional Inherited Members

- Static Public Member Functions inherited from Foundation::Native::NativeApplication
static NativeWindow CreateNativeWindow (uint32_t width, uint32_t height, const char *title)
 Creates a window with the specified width, height, and title.
 
- Protected Member Functions inherited from Foundation::Rendering::RenderApplication
virtual void OnAfterFrame ()
 Action to take after each frame is executed.
 
virtual void OnApplicationTick ()
 Action to take on every application tick.
 
- Protected Attributes inherited from Foundation::Rendering::RenderApplication
ApplicationInitDesc mDesc
 
DefaultAllocator mAlloc
 
DefaultAllocator mAllocRenderer
 
Native::NativeWindow mWindow
 
UniquePtr< RHIApplicationmRHI
 
RHIApplicationScopedObjectHandle< RHIDevicemDevice
 
RHIDeviceScopedObjectHandle< RHISwapchainmSwapchain
 
UniquePtr< RenderermRenderer
 
FrameTiming mTiming {}
 
Async::Thread mRenderThread
 
Async::Condition mRenderFrame
 
Async::Mutex mRenderMutex
 
bool mRenderThreadReset {false}
 
bool mRenderThreadStarted {false}
 
bool mAppShouldClose {false}
 

Detailed Description

Examples
MipGeneration.cpp.

Constructor & Destructor Documentation

◆ ~MipGenerationApp()

Examples::MipGenerationApp::~MipGenerationApp ( )
inlineoverride

Member Function Documentation

◆ OnBeforeFrame()

void Examples::MipGenerationApp::OnBeforeFrame ( )
inlineoverridevirtual

Action to take before each frame is executed.

This is run on the Render thread.

This is invoked before the renderer executes the passes, but after the current frame is acquired from the swapchain.

Implementation may leave this empty if no action is needed.

Note
This should not be directly called.

Reimplemented from Foundation::Rendering::RenderApplication.

◆ OnDeviceSetup()

void Examples::MipGenerationApp::OnDeviceSetup ( )
inlineoverridevirtual

Actions to take after device specific resources has been set up.

This is run on the main thread, i.e. the calling thread of Initialize(), after the device and swapchain is created, but before the Renderer is created.

Implementation may leave this empty if no action is needed.

Note
This should not be directly called.

Reimplemented from Foundation::Rendering::RenderApplication.

Examples
MipGeneration.cpp.

◆ OnRendererPostSetup()

void Examples::MipGenerationApp::OnRendererPostSetup ( )
inlineoverridevirtual

Action to take after the renderer has been set up.

This is run on the Render thread, immediately after OnRendererSetup has been called, and before the first frame is rendered.

Implementation may leave this empty if no action is needed.

Note
This should not be directly called.

Reimplemented from Foundation::Rendering::RenderApplication.

◆ OnRendererSetup()

void Examples::MipGenerationApp::OnRendererSetup ( )
inlineoverridevirtual

Set up the renderer by creating passes, resources, and other configurations.

Note
This is where you should set up your rendering pipeline.
This is invoked by InitializeRenderer on the Render thread, within a Renderer::BeginSetup and Renderer::EndSetup clause, thus invoking Renderer::BeginSetup, Renderer::EndSetup here again is incorrect. and will be called again if the swapchain is recreated.
This MUST be implemented by the subclass.
This should not be directly called.

Implements Foundation::Rendering::RenderApplication.

Examples
MipGeneration.cpp.

Member Data Documentation

◆ mBlur

float Examples::MipGenerationApp::mBlur = 1.0f

◆ mRenderedImageID

ImTextureID Examples::MipGenerationApp::mRenderedImageID {0}

◆ mRenderedSRV

ResourceHandle Examples::MipGenerationApp::mRenderedSRV {kInvalidHandle}

◆ mSampleImage

TexturePoolHandle Examples::MipGenerationApp::mSampleImage {kInvalidTexturePoolHandle}

◆ mTexturePool

UniquePtr<TexturePool> Examples::MipGenerationApp::mTexturePool

The documentation for this class was generated from the following file: