void GLESGraphicsystem::activateGraphicContext()
{
- LOG_DEBUG("GLESGraphicsystem", "Activate Graphic Context");
EGLBoolean eglStatus = false;
eglStatus = eglMakeCurrent(m_eglDisplay, m_eglSurface, m_eglSurface, m_eglContext);
void GLESGraphicsystem::releaseGraphicContext()
{
- LOG_DEBUG("GLESGraphicsystem", "Release Graphic Context");
EGLBoolean eglStatus = false;
eglStatus = eglMakeCurrent(m_eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
}
void GLESGraphicsystem::renderSurface(Surface* surface)
{
// LOG_DEBUG("GLESGraphicsystem", "renderSurface " << surface->getID());
-
+ GLenum glErrorCode = GL_NO_ERROR;
// check if surface is cropped completely, if so then skip rendering
if (ViewportTransform::isFullyCropped(surface->getDestinationRegion(), m_currentLayer->getSourceRegion() ) )
return; // skip rendering of this surface, because it is cropped by layer source region
glDrawArrays(GL_TRIANGLES, index, 6);
glBindBuffer(GL_ARRAY_BUFFER, 0);
- glGetError(); // TODO
+ glErrorCode = glGetError();
+ if ( GL_NO_ERROR != glErrorCode )
+ {
+ LOG_ERROR("GLESGraphicsystem", "GL Error occured :" << glErrorCode );
+ };
delete textureCoordinates;
}
void GLXGraphicsystem::activateGraphicContext()
{
- LOG_DEBUG("GLXGraphicsystem", "Activate Graphic Context");
- glXMakeCurrent(m_x11display, m_window, m_context);
-
+ glXMakeCurrent(m_x11display, m_window, m_context);
}
void GLXGraphicsystem::releaseGraphicContext()
{
- LOG_DEBUG("GLXGraphicsystem", "Release Graphic Context");
glXMakeCurrent(m_x11display, None, NULL);
}
XVisualInfo* windowVis = GetMatchingVisual(m_x11display);
- LOG_DEBUG("X11GLXRenderer", "Initialising opengl");
+ LOG_DEBUG("GLXGraphicsystem", "Initialising opengl");
m_context = glXCreateContext(m_x11display, windowVis, 0, GL_TRUE);
if (!m_context)
{
void GLXGraphicsystem::renderSurface(Surface* currentSurface)
{
// LOG_DEBUG("GLXGraphicsystem", "renderSurface " << currentSurface->getID() );
-
+ GLenum glErrorCode = GL_NO_ERROR;
const Rectangle &layerDestinationRegion = (m_currentLayer)->getDestinationRegion();
const Rectangle &layerSourceRegion = (m_currentLayer)->getSourceRegion();
m_binder->unbindSurfaceTexture(currentSurface);
glPopMatrix();
+ glErrorCode = glGetError();
+ if ( GL_NO_ERROR != glErrorCode )
+ {
+ LOG_ERROR("GLXGraphicsystem", "GL Error occured :" << glErrorCode );
+ };
currentSurface->drawCounter++;
delete textureCoordinates;
}