SRSDK  0.10.39
Loading...
Searching...
No Matches
interlacer.opengl.hpp
Go to the documentation of this file.
1#ifndef CNSDK_LEIA_CORE_CXX_INTERLACER_OPENGL_HPP
2#define CNSDK_LEIA_CORE_CXX_INTERLACER_OPENGL_HPP
3
6
12namespace leia {
13
18public:
19 InterlacerOpenGL(Core& core, InterlacerInitConfiguration const& config, void* context)
20 : Interlacer(leia_interlacer_opengl_initialize(core.GetHandle(), config.GetHandle(), context), true)
21 {
22 }
27
28 void DoPostProcess(int32_t width, int32_t height, bool blendedInterlace)
29 {
30 leia_interlacer_opengl_do_post_process(_interlacer, width, height, blendedInterlace);
31 }
32 void SetOutputRenderTarget(uint32_t renderTarget)
33 {
34 leia_interlacer_opengl_set_output_render_target(_interlacer, renderTarget);
35 }
36
49 void SetSourceViews(uint32_t glTextureId, uint32_t glTextureTarget, int32_t viewIndex, int layer)
50 {
51 leia_interlacer_opengl_set_source_views(_interlacer, glTextureId, glTextureTarget, viewIndex, layer);
52 }
53
54 InterlacerOpenGL(leia_interlacer* nonOwningInterlacer) : Interlacer(nonOwningInterlacer, false)
55 {
56 }
57};
58
61{
62 if (interlacer && interlacer->GetGraphicsAPI() == LEIA_GRAPHICS_API_OPENGL)
63 {
64 return static_cast<InterlacerOpenGL*>(interlacer);
65 }
66 return nullptr;
67}
68
69} // namespace leia
70
75#endif // CNSDK_LEIA_CORE_CXX_INTERLACER_OPENGL_HPP
C++ wrapper for leia_core.
Definition core.hpp:151
C++ wrapper for leia_interlacer.
Definition interlacer.hpp:26
leia_interlacer * _interlacer
Definition interlacer.hpp:367
LEIA_NODISCARD GraphicsAPI GetGraphicsAPI()
Definition interlacer.hpp:344
LEIA_NODISCARD leia_interlacer * GetHandle() const
Definition interlacer.hpp:350
C++ wrapper for leia_interlacer_init_configuration.
Definition interlacer.hpp:604
C++ wrapper for OpenGL leia_interlacer.
Definition interlacer.opengl.hpp:17
InterlacerOpenGL(InterlacerOpenGL const &)=delete
void DoPostProcess(int32_t width, int32_t height, bool blendedInterlace)
Definition interlacer.opengl.hpp:28
InterlacerOpenGL(Core &core, InterlacerInitConfiguration const &config, void *context)
Definition interlacer.opengl.hpp:19
void SetSourceViews(uint32_t glTextureId, uint32_t glTextureTarget, int32_t viewIndex, int layer)
Set the OpenGL view texture.
Definition interlacer.opengl.hpp:49
void SetOutputRenderTarget(uint32_t renderTarget)
Definition interlacer.opengl.hpp:32
InterlacerOpenGL(leia_interlacer *nonOwningInterlacer)
Definition interlacer.opengl.hpp:54
InterlacerOpenGL & operator=(InterlacerOpenGL &&)=default
InterlacerOpenGL & operator=(InterlacerOpenGL const &)=delete
InterlacerOpenGL(InterlacerOpenGL &&)=default
@ LEIA_GRAPHICS_API_OPENGL
Definition types.h:14
#define LEIA_NODISCARD
Definition defines.h:86
Definition types.hpp:10
LEIA_NODISCARD InterlacerOpenGL * AsOpenGL(Interlacer *interlacer)
Definition interlacer.opengl.hpp:60
The main entity used for performing interlacing on Leia devices.
Definition interlacer.h:41