diff --git a/kmscube/cube-egl.cpp b/kmscube/cube-egl.cpp
index 4213536dfe786c556b4060cd6b9b54da238700c8..7dcfa0b69912c55984472cc0e25ac460eb36a29d 100644 (file)
--- a/kmscube/cube-egl.cpp
+++ b/kmscube/cube-egl.cpp
#include "cube-egl.h"
#include "cube.h"
-#include "test.h"
+#include <kms++util/kms++util.h>
using namespace std;
m_context = eglCreateContext(m_display, m_config, EGL_NO_CONTEXT, context_attribs);
FAIL_IF(!m_context, "failed to create context");
- eglMakeCurrent(m_display, EGL_NO_SURFACE, EGL_NO_SURFACE, m_context);
+ EGLBoolean ok = eglMakeCurrent(m_display, EGL_NO_SURFACE, EGL_NO_SURFACE, m_context);
+ FAIL_IF(!ok, "eglMakeCurrent() failed");
}
EglState::~EglState()
void EglSurface::make_current()
{
- eglMakeCurrent(egl.display(), esurface, esurface, egl.context());
+ EGLBoolean ok = eglMakeCurrent(egl.display(), esurface, esurface, egl.context());
+ FAIL_IF(!ok, "eglMakeCurrent() failed");
}
void EglSurface::swap_buffers()
{
- eglSwapBuffers(egl.display(), esurface);
+ EGLBoolean ok = eglSwapBuffers(egl.display(), esurface);
+ FAIL_IF(!ok, "eglMakeCurrent() failed");
}