OGLplus  (0.59.0) a C++ wrapper for rendering APIs

eagine::application::video_context Class Reference

Class holding video rendering-related application support objects. More...

#include <eagine/application/context.hpp>

Public Member Functions

auto parent () const noexcept -> execution_context &
 Returns a reference to the parent application execution context.
 
auto frame_number () const noexcept
 Returns the current video frame number.
 
void begin ()
 Start working in this video rendering context (make it current). More...
 
void end ()
 Stop working with this video rendering context. More...
 
void commit ()
 Apply the rendering commands done since the last commit (swap buffers). More...
 
auto init_gl_api () noexcept -> bool
 Tries to intialize the GL rendering API in this video context. More...
 
auto has_gl_api () const noexcept
 Indicates if the GL rendering API in this video context is initialized. More...
 
auto gl_api () const noexcept -> oglp::gl_api &
 Returns a reference to the GL rendering API in this context. More...
 
auto surface_size () noexcept -> std::tuple< int, int >
 Returns the rendering surface's dimensions (in pixels).
 
auto surface_aspect () noexcept -> float
 Returns the rendering surface's aspect ratio.
 
void clean_up () noexcept
 Cleans up and releases this rendering context and APIs.
 

Detailed Description

Class holding video rendering-related application support objects.

See also
video_options
audio_context
execution_context

Instances of this class represent a single (possibly one of several) video rendering contexts in an application.

Member Function Documentation

◆ begin()

void eagine::application::video_context::begin ( )

Start working in this video rendering context (make it current).

See also
end
commit

◆ commit()

void eagine::application::video_context::commit ( )

Apply the rendering commands done since the last commit (swap buffers).

See also
begin
end

◆ end()

void eagine::application::video_context::end ( )

Stop working with this video rendering context.

See also
begin
commit

◆ gl_api()

auto eagine::application::video_context::gl_api ( ) const -> oglp::gl_api&
inlinenoexcept

Returns a reference to the GL rendering API in this context.

See also
init_gl_api
Precondition
has_gl_api()

◆ has_gl_api()

auto eagine::application::video_context::has_gl_api ( ) const
inlinenoexcept

Indicates if the GL rendering API in this video context is initialized.

See also
init_gl_api
gl_api

◆ init_gl_api()

auto eagine::application::video_context::init_gl_api ( ) -> bool
noexcept

Tries to intialize the GL rendering API in this video context.

See also
has_gl_api
gl_api

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

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).