Skip to content

Commit 81f1589

Browse files
committed
stuff
1 parent 3e1b9ef commit 81f1589

4 files changed

Lines changed: 15 additions & 6 deletions

File tree

src/ruisapp/glue/egl_utils.hxx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,11 @@ struct egl_context_wrapper {
278278
context_attrs.data()
279279
);
280280
if (egl_context == EGL_NO_CONTEXT) {
281-
throw std::runtime_error(utki::cat(
281+
auto message = utki::cat(
282282
"eglCreateContext() failed, error: ", //
283283
egl_error_to_string(eglGetError())
284-
));
284+
);
285+
throw std::runtime_error(std::move(message));
285286
}
286287
return egl_context;
287288
}())

src/ruisapp/glue/windows/application.cxx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,14 @@ application_glue::application_glue(const utki::version_duplet& gl_version) :
5353
)),
5454
resource_loader_ruis_rendering_context([&]() {
5555
utki::logcat_debug("application_glue::application_glue(): creating shared gl context", '\n');
56-
auto c = utki::make_shared<ruis::render::opengl::context>(this->shared_gl_context_native_window);
56+
#ifdef RUISAPP_RENDER_OPENGL
57+
using context_type = ruis::render::opengl::context;
58+
#elif defined(RUISAPP_RENDER_OPENGLES)
59+
using context_type = ruis::render::opengles::context;
60+
#else
61+
# error "Unknown graphics API"
62+
#endif
63+
auto c = utki::make_shared<context_type>(this->shared_gl_context_native_window);
5764
utki::logcat_debug("application_glue::application_glue(): shared gl context created", '\n');
5865
return c;
5966
}()),

src/ruisapp/glue/windows/window.cxx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,10 @@ native_window::native_window(
199199
gl_version,
200200
window_params
201201
),
202-
egl_surface(this->egl_display, this->egl_config, EGLNativeWindowType(this->window.handle)),
202+
egl_surface(this->egl_display,//
203+
this->egl_config, EGLNativeWindowType(this->window.handle)),
203204
egl_context(
204-
this->egl_display,
205+
this->egl_display,//
205206
gl_version,
206207
this->egl_config,
207208
shared_gl_context_native_window ? shared_gl_context_native_window->egl_context.context : EGL_NO_CONTEXT

src/ruisapp/glue/windows/window.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class native_window : public ruis::render::native_window
7272
} opengl_context;
7373
#elif defined(RUISAPP_RENDER_OPENGLES)
7474
egl_display_wrapper egl_display;
75-
egl_config_wrapper elg_config;
75+
egl_config_wrapper egl_config;
7676
egl_surface_wrapper egl_surface;
7777
egl_context_wrapper egl_context;
7878
#endif

0 commit comments

Comments
 (0)