Responsible for preparation for drawing frames to 'outputs'.
More...
#include <render_target.hpp>
|
|
virtual | ~render_target ()=default |
| | Destroy render_target and release resources.
|
| virtual void | attach (player &player)=0 |
| | Attach render_target to the player.
|
| virtual void | detach (player &player)=0 |
| | Detach render_target from the player.
|
| virtual void | prepare_to_offscreen_render (int32_t width, int32_t height)=0 |
| | Prepare render target to offscreen rendering of the player.
|
| virtual void | prepare_to_screen_render (void *surface)=0 |
| | Prepare render target to screen rendering.
|
| virtual void | set_frame_time_us (uint64_t time_us) noexcept=0 |
| | Set presentation frame time.
|
|
virtual uint64_t | get_frame_time_us () const noexcept=0 |
| | Get frame time microseconds.
|
|
virtual int32_t | get_render_width () const noexcept=0 |
| | Get render surface size width.
|
|
virtual int32_t | get_render_height () const noexcept=0 |
| | Get render surface size height.
|
| virtual texture_t | get_output_texture () const noexcept=0 |
| | Returns the drawn texture.
|
| virtual void | present (int32_t left, int32_t top, int32_t width, int32_t height, const float *const mat4)=0 |
| | Draw the frame on the prepared surface.
|
Responsible for preparation for drawing frames to 'outputs'.
This part of the RenderTarget is owned and controlled only by the player
Definition at line 26 of file render_target.hpp.
◆ attach()
| virtual void bnb::player_api::interfaces::render_target::attach |
( |
player & | player | ) |
|
|
pure virtual |
Attach render_target to the player.
Called by the player on the render thread.
- Parameters
-
◆ detach()
| virtual void bnb::player_api::interfaces::render_target::detach |
( |
player & | player | ) |
|
|
pure virtual |
Detach render_target from the player.
Called by the player on the render thread.
- Parameters
-
◆ get_output_texture()
| virtual texture_t bnb::player_api::interfaces::render_target::get_output_texture |
( |
| ) |
const |
|
pure virtualnoexcept |
Returns the drawn texture.
With an OpenGL backend, to get an opengl texture you need to do this: reinterpret_cast<GLuint>(render_terget->get_output_texture())
◆ prepare_to_offscreen_render()
| virtual void bnb::player_api::interfaces::render_target::prepare_to_offscreen_render |
( |
int32_t | width, |
|
|
int32_t | height ) |
|
pure virtual |
Prepare render target to offscreen rendering of the player.
- Parameters
-
| width | rendering surface width |
| height | rendering surface height |
◆ prepare_to_screen_render()
| virtual void bnb::player_api::interfaces::render_target::prepare_to_screen_render |
( |
void * | surface | ) |
|
|
pure virtual |
Prepare render target to screen rendering.
- Parameters
-
◆ present()
| virtual void bnb::player_api::interfaces::render_target::present |
( |
int32_t | left, |
|
|
int32_t | top, |
|
|
int32_t | width, |
|
|
int32_t | height, |
|
|
const float *const | mat4 ) |
|
pure virtual |
Draw the frame on the prepared surface.
- Parameters
-
| left | viewport x coord |
| top | viewport y coord |
| width | of the viewport |
| height | of the viewport |
| mat4 | texture matrix |
◆ set_frame_time_us()
| virtual void bnb::player_api::interfaces::render_target::set_frame_time_us |
( |
uint64_t | time_us | ) |
|
|
pure virtualnoexcept |
Set presentation frame time.
- Parameters
-
| time_us | time in microseconds |
The documentation for this class was generated from the following file:
- /Users/itumashyk/Workspace/banuba_sdk/platform/desktop/player_api/bnb/player_api/interfaces/render_target.hpp