3#include "OpenGLES3.hpp"
4#include <Covellite.Egl\Egl.hpp>
15OpenGLES3::OpenGLES3(
const Data_t & _Data) :
16 OpenGLCommonShader(_Data, uT(
""),
18 "#define COVELLITE_SHADER_MOBILE\r\n"),
19 m_pDisplay(::std::make_unique<covellite::egl::Display>()),
20 m_pConfig(::std::make_unique<covellite::egl::Config>(*m_pDisplay, ::covellite::any_cast<ANativeWindow *>(_Data.Handle))),
21 m_pSurface(::std::make_unique<covellite::egl::Surface>(*m_pDisplay, *m_pConfig, ::covellite::any_cast<ANativeWindow *>(_Data.Handle))),
22 m_pContext(::std::make_unique<covellite::egl::Context>(*m_pDisplay, *m_pConfig, 3))
24 m_pContext->MakeCurrent(*m_pSurface);
27OpenGLES3::~OpenGLES3(
void) =
default;
29void OpenGLES3::PresentFrame(
void)
36 glEnable(GL_SCISSOR_TEST);
39 glScissor(0, m_Height - m_Top, m_Width, m_Top);
42 TODO(
"Цвет заголовка Android - в настройках?");
43 glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
44 glClear(GL_COLOR_BUFFER_BIT);
46 glDisable(GL_SCISSOR_TEST);
49 m_pSurface->SwapBuffers();
51 OpenGLCommonShader::PresentFrame();