{
Render_Engine *re = (Render_Engine *)data;
- if (re->context_3d == NULL)
- {
- re->context_3d = eng_gl_context_new(re->win);
-
- if (re->context_3d == NULL)
- {
- ERR("Failed to create OpenGL context for 3D.");
- return;
- }
- }
-
- eng_gl_context_use(re->context_3d);
+ if (!re->context_3d)
+ re->context_3d = eng_gl_context_new(re->win);
+ if (re->context_3d) eng_gl_context_use(re->context_3d);
}
static E3D_Renderer *
{
Render_Engine *re = (Render_Engine *)data;
- if (re->renderer_3d == NULL)
- {
- re->renderer_3d = e3d_renderer_new();
-
- if (re->renderer_3d == NULL)
- {
- ERR("Failed to create 3D renderer.");
- return NULL;
- }
- }
-
+ if (!re->renderer_3d)
+ re->renderer_3d = e3d_renderer_new();
return re->renderer_3d;
}