![]() |
UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
|
#include <opengl_panorama.hpp>

Public Member Functions | |
| PanoramaScene () | |
| PanoramaScene (GlProgram program, Model model) | |
| std::vector< codec_t > | get_codecs () |
| void | put_frame (video_frame *f, bool pbo_frame=false) |
| void | render (int width, int height) |
| void | render (int width, int height, const glm::mat4 &pvMat) |
| void | rotate (float dx, float dy) |
Public Attributes | |
| float | fov = 55 |
| Model | model |
| GlProgram | program |
| float | rot_x = 0 |
| float | rot_y = 0 |
| TripleBufferTexture | tex |
| std::mutex | tex_mut |
| FrameUploader | uploader |
Class representing the scene to render. Contains the model and texture to be rendered. Automatically performs pixel format coversions if needed. It is possible to call put_frame() from another thread, but limitations apply
Definition at line 48 of file opengl_panorama.hpp.
| PanoramaScene::PanoramaScene | ( | ) |
Definition at line 76 of file opengl_panorama.cpp.
Definition at line 79 of file opengl_panorama.cpp.
References TripleBufferTexture::allocateTextures(), and tex.

|
inline |
Definition at line 89 of file opengl_panorama.hpp.
References FrameUploader::get_supported_codecs(), and uploader.
Referenced by display_panogl_get_property().

| void PanoramaScene::put_frame | ( | video_frame * | f, |
| bool | pbo_frame = false ) |
Uploads a video frame to be rendered. Can be called from other thread, but must be always called from the thread that called it the first time.
| f | video frame to upload |
| pbo_frame | true if video frame contains the image data in a PBO buffer |
Definition at line 121 of file opengl_panorama.cpp.
References FrameUploader::attach_dst_texture(), Texture::get(), TripleBufferTexture::get_back(), PROFILE_FUNC, FrameUploader::put_frame(), TripleBufferTexture::swap_back(), tex, tex_mut, and uploader.
Referenced by handle_user_event(), and worker().

| void PanoramaScene::render | ( | int | width, |
| int | height ) |
Renders the scene.
| width | Width of result used for aspect ration correction |
| height | Height of result used for aspect ration correction |
Definition at line 85 of file opengl_panorama.cpp.
References fov, render(), rot_x, and rot_y.
Referenced by display_xrgl_run(), draw(), and render().

| void PanoramaScene::render | ( | int | width, |
| int | height, | ||
| const glm::mat4 & | pvMat ) |
Renders the scene.
| width | Width of result used for aspect ration correction |
| height | Height of result used for aspect ration correction |
| pvMat | custom perspective and view Matrix to be used |
Definition at line 99 of file opengl_panorama.cpp.
References GlProgram::get(), Texture::get(), TripleBufferTexture::get_front(), TripleBufferTexture::is_new_front_available(), model, PROFILE_FUNC, program, Model::render(), TripleBufferTexture::swap_front(), tex, and tex_mut.

| void PanoramaScene::rotate | ( | float | dx, |
| float | dy ) |
Rotate the view. The vertical rotation is constrained to -90 to 90 degrees.
| dx | horizontal angle to rotate by |
| dy | vertical angle to rotate by |
Definition at line 144 of file opengl_panorama.cpp.
Referenced by display_panogl_run().
| float PanoramaScene::fov = 55 |
Definition at line 99 of file opengl_panorama.hpp.
Referenced by display_panogl_run(), and render().
| Model PanoramaScene::model |
Definition at line 92 of file opengl_panorama.hpp.
Referenced by render().
| GlProgram PanoramaScene::program |
Definition at line 91 of file opengl_panorama.hpp.
Referenced by render().
| float PanoramaScene::rot_x = 0 |
Definition at line 97 of file opengl_panorama.hpp.
| float PanoramaScene::rot_y = 0 |
Definition at line 98 of file opengl_panorama.hpp.
| TripleBufferTexture PanoramaScene::tex |
Definition at line 93 of file opengl_panorama.hpp.
Referenced by PanoramaScene(), put_frame(), and render().
| std::mutex PanoramaScene::tex_mut |
Definition at line 94 of file opengl_panorama.hpp.
Referenced by put_frame(), and render().
| FrameUploader PanoramaScene::uploader |
Definition at line 96 of file opengl_panorama.hpp.
Referenced by get_codecs(), and put_frame().